From 8f03316d04ba3a51ce16d90ffe94d7611c013652 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 19 Feb 2017 04:22:43 +0100 Subject: get rid of old parse plugin --- .../src/android/ParsePluginReceiver.java | 61 ---------------------- 1 file changed, 61 deletions(-) delete mode 100644 StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/android/ParsePluginReceiver.java (limited to 'StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/android/ParsePluginReceiver.java') diff --git a/StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/android/ParsePluginReceiver.java b/StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/android/ParsePluginReceiver.java deleted file mode 100644 index fa917a48..00000000 --- a/StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/android/ParsePluginReceiver.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.apache.cordova.core; - -import com.parse.ParsePushBroadcastReceiver; -import com.parse.ParseAnalytics; - -import android.app.Activity; -import android.app.TaskStackBuilder; -import android.content.Context; -import android.content.Intent; -import android.os.Build; -import android.net.Uri; -import android.util.Log; - -import org.json.JSONObject; -import org.json.JSONException; - -public class ParsePluginReceiver extends ParsePushBroadcastReceiver -{ - private static final String TAG = "ParsePluginReceiver"; - private static final String RECEIVED_IN_FOREGROUND = "receivedInForeground"; - - @Override - protected void onPushReceive(Context context, Intent intent) { - JSONObject pushData = getPushData(intent); - - if (pushData != null) { - if (ParsePlugin.isInForeground()) { - ParsePlugin.javascriptEventCallback(pushData); - } else { - super.onPushReceive(context, intent); - } - } - } - - @Override - protected void onPushOpen(Context context, Intent intent) { - JSONObject pushData = getPushData(intent); - - if (pushData != null) { - if (ParsePlugin.isInForeground()) { - ParseAnalytics.trackAppOpened(intent); - ParsePlugin.javascriptEventCallback(pushData); - } else { - super.onPushOpen(context, intent); - ParsePlugin.setLaunchNotification(pushData); - } - } - } - - private static JSONObject getPushData(Intent intent){ - JSONObject pushData = null; - try { - pushData = new JSONObject(intent.getStringExtra("com.parse.Data")); - pushData.put(RECEIVED_IN_FOREGROUND, ParsePlugin.isInForeground()); - } catch (JSONException e) { - Log.e(TAG, "JSONException while parsing push data:", e); - } finally{ - return pushData; - } - } -} -- cgit v1.2.3-70-g09d2