Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Intent intent = new Intent(getApplicationContext(), NotificationMessage.class); //
- PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0);
- NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
- .setSmallIcon(currentapiVersion)
- .setContentTitle(this.getResources().getString(R.string.app_name))
- .setStyle(new NotificationCompat.BigTextStyle().bigText(msg))
- .setContentText(msg)
- .setAutoCancel(true)
- .setPriority(Notification.PRIORITY_HIGH)
- .setContentIntent(contentIntent);
- mNotificationManager.notify((int) notificatioId, notificationBuilder.build());
Add Comment
Please, Sign In to add comment