Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void openNotify(String title, String msg)
- {
- NotificationCompat.Builder builder =
- new NotificationCompat.Builder(this)
- .setSmallIcon(R.mipmap.ic_launcher)
- .setContentTitle(title)
- .setContentText(msg)
- .setAutoCancel(true);
- Notification notification = builder.build();
- NotificationManager notificationManager =
- (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
- notificationManager.notify(1, notification);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment