How can I disable closing the notification panel after the user clicks on my notification (on the body, not on the action buttons)?
I use notificationBuilder.setOngoing(true)and notificationBuilder.setAutoCancel( false), but the panel continues to close. What am I doing wrong?
Add: I also use this code:
Intent intentNotification intentNotification = new Intent( contextApplication, MyBroadcast.class);
intentNotification.putExtra( "reload", "1");
PendingIntent pendingIntent = PendingIntent.getBroadcast( contextApplication, 0, intentNotification, PendingIntent.FLAG_UPDATE_CURRENT);
notificationBuilder.setContentIntent( pendingIntent);
notificationBuilder.setAutoCancel( false); // this not work because setContentIntent work
If I remove this notification panel with a code, it is displayed on the screen. When I add this hidden code bar. But I need to create a call in MyBroadcast by clicking on the notification body. Any way to invoke my broadcast by clicking on the notification body?
Add2: In response to @NIPHIN, I am trying to restore the inheritance panel inside my translator:
if( android.os.Build.VERSION.SDK_INT <= 16) Class.forName( "android.app.StatusBarManager").getMethod( "expand").invoke( contextApplication.getSystemService( "statusbar"));
else Class.forName( "android.app.StatusBarManager").getMethod( "expandNotificationsPanel").invoke( contextApplication.getSystemService( "statusbar"));
// manifest need <uses-permission android:name="android.permission.EXPAND_STATUS_BAR"/>
, : .
?