0

I am continuosly getting this exception for android 4.4.2 , tried everything , checked all the stackoverflow solutions but nothing worked for me.

Fatal Exception: android.app.RemoteServiceException: Bad notification posted from package app.desidime: Couldn't expand RemoteViews for: StatusBarNotification(pkg=app.desidime user=UserHandle{0} id=978946 tag=null score=20: Notification(pri=2 contentView=app.desidime/0x109007e vibrate=null sound=content://settings/system/notification_sound defaults=0x0 flags=0x10 kind=[null])) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:149) at android.app.ActivityThread.main(ActivityThread.java:5257) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) at dalvik.system.NativeStart.main(NativeStart.java)

Here is my code to generate notification :

/**
 * return Notification Builder instance
 *
 * @param context
 * @param pendingIntent
 * @param title
 * @return
 */
private NotificationCompat.Builder getNotificationBuilder(Context context, PendingIntent pendingIntent, String title, String description) {
    NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
    builder.setContentTitle(title)
            .setContentText(description)
            .setContentIntent(pendingIntent)
            .setSmallIcon(R.drawable.ic_small_notification)
            .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher));
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        builder.setPriority(NotificationCompat.PRIORITY_MAX).setCategory(NotificationCompat.CATEGORY_MESSAGE);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            builder.setColor(ContextCompat.getColor(context, R.color.primary));
        }
    }
    return builder;
}

*minSdkVersion is 15. Device ASUS_T00J, ASUS_Z002.

And I am not able to recreate this scenario at my end as well. Just getting exception in play store app.

Tasneem
  • 793
  • 8
  • 24

0 Answers0