@@ -0,0 +1,1655 @@
+package api.ashish.androidactionkit.actions;%0A%0Aimport java.util.Calendar;%0A%0Aimport android.R;%0Aimport android.app.NotificationManager;%0Aimport android.app.PendingIntent;%0Aimport android.content.Context;%0Aimport android.content.Intent;%0Aimport android.support.v4.app.NotificationCompat;%0Aimport api.ashish.androidactionkit.MainActivity;%0A%0A/**%0A * %0A * Action which shows notification after each new trigger.%0A * %0A *  @author %22Ashish Kalbhor%22 %3Cashish.kalbhor@gmail.com%3E%0A */%0A%0Apublic class NotificationAction%0A%7B%0A%0A%09private Context context = null;%0A%0A%09NotificationManager notifymgr = null;%0A%0A%0A%09public void onCreate(Context context)%0A%09%7B%0A%09%09this.context = context;%0A%09%09this.notifymgr = (NotificationManager)this.context.getSystemService(Context.NOTIFICATION_SERVICE);%0A%09%7D%0A%0A%09public void perform(String NotifyData)%0A%09%7B%0A%09%09String message = NotifyData;%0A%09%09%0A%09%09Intent resultIntent = new Intent(this.context, MainActivity.class);%0A%09%09PendingIntent resultPendingIntent = PendingIntent.getActivity(this.context, 0, resultIntent,%0A%09%09%09%09Intent.FLAG_ACTIVITY_NEW_TASK);%0A%0A%09%09int smallIcon = R.drawable.alert_dark_frame;%0A%0A%09%09NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this.context);%0A%09%09mBuilder.setContentTitle(%22Notification Action%22)%0A%09%09             .setContentText(message)%0A    %09             .setSmallIcon(smallIcon)%0A%09%09              .setLights(0xFFFF0000, 500, 500) ;%0A%09%09%0A%09%09mBuilder.setContentIntent(resultPendingIntent);%0A%09%09%0A%09         mBuilder.setAutoCancel(true);  //for clearing notification automatically%0A         %0A%09%09this.notifymgr.notify((int)Calendar.getInstance().getTimeInMillis(), mBuilder.getNotification());%0A%0A%09%7D%0A%0A%0A%09public void onDestroy()%0A%09%7B%0A%09%09this.notifymgr = null;%0A%09%7D%0A%0A%7D%0A

Add Notification Action