02. add a button to main.xml
03. add a image(imageiconxyz) to image manager.
04. put a score directly block and enter this string value to when button clicked activity.
please help me click to link
Notification.Builder mBuilder = new Notification.Builder(MainActivity.this);
mBuilder.setSmallIcon(R.drawable.imageiconxyz);
mBuilder.setContentTitle("title");
mBuilder.setContentText("text");
mBuilder.setDefaults( Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Intent notificationIntent = new Intent(getApplicationContext(),MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, notificationIntent, Intent.FLAG_ACTIVITY_NEW_TASK);
mBuilder.setContentIntent(pendingIntent).setAutoCancel(true);
notificationManager.notify(1, mBuilder.build());
05. now you can save and run your project. thank you for watching.
Are you like to earn money with link sharing.
You can earn per vist 0.025$.(only this referal link)
Click to register
https://join-adf.ly/21268483
2 Comments
Well
ReplyDeleteYes it is best
Delete