@@ -0,0 +1,2811 @@
+package com.open.notificacion;%0Aimport java.io.File;%0A%0Aimport org.apache.cordova.CallbackContext;%0Aimport org.apache.cordova.CordovaPlugin;%0Aimport org.apache.cordova.PluginResult;%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0Aimport android.app.Notification;%0Aimport android.app.NotificationManager;%0Aimport android.app.PendingIntent;%0Aimport android.content.Context;%0Aimport android.content.Intent;%0Aimport android.media.RingtoneManager;%0Aimport android.net.Uri;%0Aimport android.util.Log;%0A%0Apublic class Notificacion extends CordovaPlugin%7B%0A%09@SuppressWarnings(%22deprecation%22)%0A%09private void makeNotification(String uriPath,String ticker,String contentTitle,String contentText,String mimeType,String summaryText)%7B%0A%09%09String path =%22/storage/sdcard0/azabacheShare/flyer_personalizado.jpg%22;%0A%09%09Intent intent = new Intent(Intent.ACTION_VIEW);%0A%09%09Uri data = Uri.fromFile( new File(path));%0A%09%09intent.setDataAndType(data,%22image/*%22);%0A%09%09%0A%09%09PendingIntent resultPendingIntent =%0A                PendingIntent.getActivity(%0A                        this.cordova.getActivity().getApplicationContext(),%0A                        0,%0A                        intent,%0A                        PendingIntent.FLAG_UPDATE_CURRENT%0A                );%0A%09%09%0A%09%09%0A%09%09android.app.Notification mBuilder = new android.app.Notification(android.R.drawable.ic_menu_gallery,%22Imagen%22,System.currentTimeMillis());%0A%09%09mBuilder.tickerText=ticker;%0A%09%09mBuilder.defaults = Notification.DEFAULT_VIBRATE;%0A%09%09mBuilder.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);%0A%09%09mBuilder.ledARGB=0xff0000;%0A%09%09mBuilder.ledOnMS=1000;%0A%09%09mBuilder.ledOffMS=2500;%0A%09%09mBuilder.priority = Notification.PRIORITY_HIGH;%0A%09%09%0A%09%09mBuilder.setLatestEventInfo(cordova.getActivity().getApplicationContext(), contentTitle, contentText, resultPendingIntent);%0A        NotificationManager mNotificationManager =%0A                (NotificationManager) this.cordova.getActivity().getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);%0A        mNotificationManager.notify(1, mBuilder);%0A%09%7D%0A%09@Override%0A%09public boolean execute(String action,JSONArray args,CallbackContext callbackContext)%7B%0A%09%09try %7B%0A%09%09%09JSONObject jsonObj = args.getJSONObject(0);%0A%09%09%09makeNotification(jsonObj.getString(%22uri%22),jsonObj.getString(%22ticker%22),jsonObj.getString(%22contentTitle%22),jsonObj.getString(%22contentText%22),%0A%09%09%09%09%09jsonObj.getString(%22mimeType%22),jsonObj.getString(%22summaryText%22));%0A%09%09%09callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));%0A%09%09%09return true;%0A%09%09%7D catch (JSONException e) %7B%0A%09%09%09// TODO: handle exception%0A%09%09%09Log.e(%22PhoneGapLog%22, %22Notificacion Plugin: Error: %22 + PluginResult.Status.JSON_EXCEPTION);%0A%09%09%09e.printStackTrace();%0A%09%09%09callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION));%0A%09%09%09return false;%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Create Notificacion.java