How to make the notification buttons to appear as they are supposed to (like on the 2nd notification on the image below)?
This is my code:
Notification.Builder nb = new Notification.Builder(mCtx);
nb.setTicker("DATART");
nb.setSmallIcon(R.drawable.ic_menu_info_details_select);
nb.setContentText("DATART text");
nb.setContentTitle(mCtx.getString(R.string.app_name));
nb.setContentIntent(getClickIntent());
nb.setAutoCancel(true);
nb.setDefaults(Notification.DEFAULT_VIBRATE | Notification.DEFAULT_SOUND);
nb.setLights(LED, LEDON, LEDOFF);
nb.addAction(android.R.drawable.ic_btn_speak_now, "Prihodit", PendingIntent.getActivity(mCtx, 0, new Intent(mCtx, AuctionProductDetail.class), 0));
nb.addAction(android.R.drawable.ic_dialog_map, "Mapa", PendingIntent.getActivity(mCtx, 0, new Intent(mCtx, AuctionProductDetail.class), 0));
return nb.build();
Looks like I have to set the android:targetSdkVersion to 11 or above
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