Android Color Notification Icon

I found the answer to my question here: https://stackoverflow.com/a/44950197/4394594 I don’t know entirely what the problem was, but by putting the huge png that I was using for the icon into the this tool https://romannurik.github.io/AndroidAssetStudio/icons-notification.html#source.type=image&source.space.trim=1&source.space.pad=0&name=ic_skylight_notification and by placing the generated icons it gave into my mipmap folder, I was able to get the setColor(…) property … Read more

Flutter: Push notifications even if the app is closed

For reminders i would recomend Flutter Local Notifications Plugin. It has a powerful scheduling api. From the documentation of local notification: Scheduling when notifications should appear – Periodically show a notification (interval-based) – Schedule a notification to be shown daily at a specified time – Schedule a notification to be shown weekly on a specified … Read more

Android multiple line notification like Gmail app

NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.notification_icon) .setContentTitle(“Event tracker”) .setContentText(“Events received”) NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle(); String[] events = {“line 1″,”line 2″,”line 3″,”line 4″,”line 5″,”line 6”}; // Sets a title for the Inbox in expanded layout inboxStyle.setBigContentTitle(“Event tracker details:”); … // Moves events into the expanded layout for (int i=0; i < events.length; i++) { inboxStyle.addLine(events[i]); … Read more

How to update Notification with RemoteViews?

Here’s a detail example for you to update the notification using RemoteViews: private static final int NOTIF_ID = 1234; private NotificationCompat.Builder mBuilder; private NotificationManager mNotificationManager; private RemoteViews mRemoteViews; private Notification mNotification; … // call this method to setup notification for the first time private void setUpNotification(){ mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); // we need to build … Read more

Any way to link to the Android notification settings for my app?

The following will work in Android 5.0 (Lollipop) and above: Intent intent = new Intent(); intent.setAction(“android.settings.APP_NOTIFICATION_SETTINGS”); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //for Android 5-7 intent.putExtra(“app_package”, getPackageName()); intent.putExtra(“app_uid”, getApplicationInfo().uid); // for Android 8 and above intent.putExtra(“android.provider.extra.APP_PACKAGE”, getPackageName()); startActivity(intent); Notes: This is not officially supported in Android 5-7, but it works just fine. It IS officially supported as of Android 8. … Read more