Is there any way I can enable all notification settings by default when my app gets installed ?
Users are receiving notifications but sound is disabled by default and we need to manually enable it on the device. Not all users can do this manually. It would be great to know if there is any way we can check all these things when our app gets installed like WhatsApp or Telegram (they have everything checked by default)
Android Push Notifications For Android, the notifications by default appear on the lock screen, and when the phone is unlocked, are visible as small icons on the notification bar at the top of the screen.
The All default settings turns on or off the default notification sound for text messages within the app. As you scroll down there are other types of notifications in Google Messages that you can control individually.
In-app notifications are messages that app creators can send to users within their app. They're commonly used to direct users toward points of interest to boost usage, retention, and lifetime value (LTV).
Try using with this below permission in AndroidManifest file
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>
and set notification priority for both below and above Oreo versions IMPORTANCE_HIGH
for Oreo and above, and PRIORITY_HIGH or PRIORITY_MAX
for below Oreo versions
Reference link for priority note
Priority for version below Oreo
mBuilder.setSmallIcon(R.drawable.app_logo)
.setAutoCancel(true)
.setContentIntent(resultPendingIntent)
.setContentTitle(title)
.setStyle(bigPictureStyle)
.setSound(soundUri)
.setPriority(NotificationCompat.PRIORITY_HIGH) // prirority here for version below Oreo
.setWhen(System.currentTimeMillis())
.setLargeIcon(BitmapFactory.decodeResource(mCtx.getResources(), R.drawable.app_logo))
.setContentText(message)
.build();
Priority for Oreo and above
Refer this link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With