summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-11-08 12:37:03 -0500
committerJules Laplace <jules@okfoc.us>2016-11-08 12:37:03 -0500
commitef4f212fc1482136dba1e690ec589b315b4a377f (patch)
tree0b7e16d72567fafcfd3e08d7c5c591ad07a63458 /StoneIsland/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java
parent5fa81da81260d65113f57a293b6256d334fe8e2d (diff)
build 0.7.0
Diffstat (limited to 'StoneIsland/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java')
-rwxr-xr-xStoneIsland/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java42
1 files changed, 0 insertions, 42 deletions
diff --git a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java b/StoneIsland/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java
deleted file mode 100755
index c4489fc1..00000000
--- a/StoneIsland/platforms/android/src/com/adobe/phonegap/push/RegistrationIntentService.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.adobe.phonegap.push;
-
-import android.content.Context;
-
-import android.app.IntentService;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.util.Log;
-
-import com.google.android.gms.gcm.GoogleCloudMessaging;
-import com.google.android.gms.iid.InstanceID;
-
-import java.io.IOException;
-
-public class RegistrationIntentService extends IntentService implements PushConstants {
- public static final String LOG_TAG = "PushPlugin_RegistrationIntentService";
-
- public RegistrationIntentService() {
- super(LOG_TAG);
- }
-
- @Override
- protected void onHandleIntent(Intent intent) {
- SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences(COM_ADOBE_PHONEGAP_PUSH, Context.MODE_PRIVATE);
-
- try {
- InstanceID instanceID = InstanceID.getInstance(this);
- String senderID = sharedPreferences.getString(SENDER_ID, "");
- String token = instanceID.getToken(senderID,
- GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
- Log.i(LOG_TAG, "new GCM Registration Token: " + token);
-
- // save new token
- SharedPreferences.Editor editor = sharedPreferences.edit();
- editor.putString(REGISTRATION_ID, token);
- editor.commit();
-
- } catch (Exception e) {
- Log.d(LOG_TAG, "Failed to complete token refresh", e);
- }
- }
-} \ No newline at end of file