Skip to content

Instantly share code, notes, and snippets.

@vreamer
Created August 25, 2020 04:32
Show Gist options
  • Select an option

  • Save vreamer/292d05d5ff7be71edfa0908fe22f4a50 to your computer and use it in GitHub Desktop.

Select an option

Save vreamer/292d05d5ff7be71edfa0908fe22f4a50 to your computer and use it in GitHub Desktop.
Show notification on create
package com.example.direct_reply_notification
import android.os.Bundle
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
NotificationHelper.createChannel(this)
NotificationHelper.showNotification(this) // show notification on create
// can be called anywhere when you need to show notification
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment