Guest User

Untitled

a guest
Nov 18th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Intent intent = new Intent(getApplicationContext(), NotificationMessage.class); //
  2. PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0);
  3. NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
  4. .setSmallIcon(currentapiVersion)
  5.  
  6. .setContentTitle(this.getResources().getString(R.string.app_name))
  7. .setStyle(new NotificationCompat.BigTextStyle().bigText(msg))
  8. .setContentText(msg)
  9. .setAutoCancel(true)
  10. .setPriority(Notification.PRIORITY_HIGH)
  11. .setContentIntent(contentIntent);
  12. mNotificationManager.notify((int) notificatioId, notificationBuilder.build());
Add Comment
Please, Sign In to add comment