/*
    Copyright 2013-2014 appPlant UG
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance�
    with the License.  You may obtain a copy of the License at
     http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
 */

package zoko7677.cordova.plugin.background;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.ActivityNotFoundException;
import android.os.IBinder;
import android.app.PendingIntent;

import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Field;
import java.util.Iterator;

import android.app.TaskStackBuilder;
import android.app.Notification;
import android.app.NotificationManager;
import android.media.RingtoneManager;
 
public class CancelNotification extends CordovaPlugin {
 private void onResume(){
    Intent intent = getIntent();
    String extraAddress = intent.getStringExtra("id");    
    webView.loadUrl("javascript:alert('load notifi mode "+extraAddress+"');");
 }
}

@@ -939,1005 +939,547 @@
 oid.
-content.ComponentName;%0Aimport android.content.Context;%0Aimport android.content.Intent;%0Aimport android.content.ServiceConnection;%0Aimport android.content.SharedPreferences;%0Aimport android.content.pm.PackageManager;%0Aimport android.content.pm.PackageManager;%0Aimport android.content.pm.PackageInfo;%0Aimport android.content.pm.PackageManager.NameNotFoundException;%0Aimport android.content.ActivityNotFoundException;%0Aimport android.os.IBinder;%0Aimport android.app.PendingIntent;%0A%0Aimport org.apache.cordova.CallbackContext;%0Aimport org.apache.cordova.CordovaPlugin;%0Aimport org.json.JSONArray;%0Aimport org.json.JSONExcep
+os.Bundle;%0Aimport android.widget.TextView;%0A %0Apublic class CancelNotification extends Activity%7B%0A %0A    TextView tv = null;%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        System.out.println(%22onCreate%22);%0A %0A        setContentView(R.layout.notifica
 tion
+)
 ;%0A
-import org.json.JSONObject;%0A%0Aimport java.lang.reflect.Field;%0Aimport java.util.Iterator;%0A%0Aimport android.app.TaskStackBuilder;%0Aimport android.app.Notification;%0Aimport android.app.NotificationManager;%0Aimport android.media.RingtoneManager;%0A %0Apublic class CancelNotification extends CordovaPlugin %7B%0A private void onResume()%7B%0A    Intent intent = getIntent();%0A    String extraAddress = intent
+        tv = (TextView)findViewById(R.id.tv);%0A %0A        Bundle extras = getIntent().getExtras();%0A %0A        if(extras != null)%7B%0A            String data1 = extras.getString(%22data1%22);%0A            String data2 = extras
 .get
@@ -1488,105 +1488,194 @@
 ring
-Extra(%22id
+(%22data2
 %22);
+%0A
     
-%0A
     
-webView.loadUrl(%22javascript:alert('load notifi mode %22+extraAddress+%22');%22);%0A %7D
+    System.out.println(%22Ddata1 : %22 + data1);%0A            tv.setText(%22Data Sent from Clicking Notification nData 1 : %22 + data1 + %22nData 2 : %22 + data2);%0A        %7D%0A    %7D%0A 
 %0A%7D%0A

Update CancelNotification.java