Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
Refactor GCMIntentService to FCMService
Browse files Browse the repository at this point in the history
  • Loading branch information
macdonst committed Jan 12, 2017
1 parent b65fe74 commit aa6e3ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void onReceive(Context context, Intent intent) {
int notId = intent.getIntExtra(NOT_ID, 0);
Log.d(LOG_TAG, "not id = " + notId);
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(GCMIntentService.getAppName(context), notId);
notificationManager.cancel(FCMService.getAppName(context), notId);

if (extras != null) {
Bundle originalExtras = extras.getBundle(PUSH_BUNDLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import java.util.Random;

@SuppressLint("NewApi")
public class GCMIntentService extends FirebaseMessagingService implements PushConstants {
public class FCMService extends FirebaseMessagingService implements PushConstants {

private static final String LOG_TAG = "PushPlugin_FCMService";
private static HashMap<Integer, ArrayList<String>> messageMap = new HashMap<Integer, ArrayList<String>>();
Expand Down
4 changes: 2 additions & 2 deletions src/android/com/adobe/phonegap/push/PushHandlerActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class PushHandlerActivity extends Activity implements PushConstants {
*/
@Override
public void onCreate(Bundle savedInstanceState) {
GCMIntentService gcm = new GCMIntentService();
FCMService gcm = new FCMService();

Intent intent = getIntent();

Expand All @@ -37,7 +37,7 @@ public void onCreate(Bundle savedInstanceState) {

if(!startOnBackground){
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(GCMIntentService.getAppName(this), notId);
notificationManager.cancel(FCMService.getAppName(this), notId);
}

boolean isPushPluginActive = PushPlugin.isActive();
Expand Down

0 comments on commit aa6e3ce

Please sign in to comment.