Event OnClick for a button in a custom notification
I am writing code in my MyActivity.java class that extends android.app.Activity It creates a custom notification, when user click on the button it sends a broadcast. There is a broadcast receiver that receives the broadcast. private void createDownloadNotification() { Intent closeButton = new Intent(“Download_Cancelled”); closeButton.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent pendingSwitchIntent = PendingIntent.getBroadcast(this, 0, closeButton, 0); RemoteViews … Read more