android - Activity not displaying -


I made a broadcast receiver which makes a notification, an activity went launched by clicking on a notification, the activity started But I can not enable this to see, I am using the following code:

  Private Notification Manager Information Manager; Public void onReceive (Context context, Intent intent) @Override {if (notificationManager == NULL) {notificationManager = (NotificationManager) reference .getSystemService (Context.NOTIFICATION_SERVICE); } Builder NotificationCompat.Builder = new NotificationCompat.Builder (reference) .setTicker ( "the ticker") .setSmallIcon (R.drawable.ic_launcher) .setContentTitle ( "Notice Title") .setContentText ( "the content") .setAutoCancel (true ) .setContentIntent (PendingIntent.getActivity (context, 0, new intent (context, NotificationDialog.class) .addFlags (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK), 0)); Notification Manager Notice ("Interstitial_tag", 0, BuilderGetNotification ()); }  

Note: notification delog. Java is my activity, this activity is running because I do not see debug, but. Trying for hours, but no answer can be found, any suggestions would be appreciated.

FLAG_ACTIVITY_CLEAR_TOP FLAG_ACTIVITY_CLEAR_TASK

< Notification Manager of Private Notification Manager instead of pre> ; Public void onReceive (Context context, Intent intent) @Override {if (notificationManager == NULL) {notificationManager = (NotificationManager) reference .getSystemService (Context.NOTIFICATION_SERVICE); } Builder NotificationCompat.Builder = New NotificationCompat.Builder (reference) .setTicker ("its ticker") .setSmallIcon (.rc.rawable.ic_launcher) .setContentTitle ("Information Title") .setContentText ("Its Content") .setAutoCancel (True ) .setContentIntent (PendingIntent.getActivity (context, 0, new intent (context, NotificationDialog.class) .addFlags (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP), 0)); Notification Manager Notice ("Interstitial_tag", 0, BuilderGetNotification ()); }

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -