Created
February 11, 2019 04:19
-
-
Save ameliacv/177fd1e30710e40b69fa42adc1e7ed67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new Intent(WHAT EVER YOU WANT); | |
//u can put extra data too | |
PendingIntent pendingIntent = PendingIntent.getActivity(CONTEXT, 1, intent, 0); | |
NotificationCompat.Builder mBuilder = | |
(NotificationCompat.Builder) new NotificationCompat.Builder(CONTEXT) | |
.setSmallIcon(YOUR ICON) | |
.setContentTitle(CONTEXT.getString(R.string.alert_success_upload)) | |
.setContentText(BLAH); | |
mBuilder.setContentIntent(pendingIntent); | |
notificationManager = | |
(NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); | |
notificationManager.notify(1, mBuilder.build()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment