Untitled

 avatar
unknown
plain_text
a year ago
1.1 kB
3
Indexable
class MainActivity: FlutterActivity() {
      override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        SmartechDeeplinkReceivers().onReceive(this, intent)
        
        Log.d("MainActivity", "MainActivity open2")


          SmartPush.getInstance(WeakReference(this)).createNotificationChannelGroup("customSoundGroup", "testgroup")
          val smtBuilder: SMTNotificationChannel.Builder= SMTNotificationChannel.Builder(
              "1234",
              "CustSound",
              NotificationManager.IMPORTANCE_HIGH)
          smtBuilder.setChannelDescription("thisischanneldesc")

          //To set the description to the channel add below method.
          smtBuilder.setChannelGroupId("customSoundGroup")

          //To set sound to channel, add below method. (Note that sound name must be without extention.)
          smtBuilder.setNotificationSound("lau")

          val smtNotificationChannel: SMTNotificationChannel = smtBuilder.build()

          SmartPush.getInstance(WeakReference(this)).createNotificationChannel(smtNotificationChannel)


      }
}
Editor is loading...
Leave a Comment