From b9f1a63fce7161c09f1d438768dfc0abe56dfd75 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Fri, 17 Mar 2017 23:42:42 +0100 Subject: rename playstore to standardpush --- .../pixart/messenger/services/PushMessageReceiver.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/standardPush/java/de/pixart/messenger/services/PushMessageReceiver.java (limited to 'src/standardPush/java/de/pixart/messenger/services/PushMessageReceiver.java') diff --git a/src/standardPush/java/de/pixart/messenger/services/PushMessageReceiver.java b/src/standardPush/java/de/pixart/messenger/services/PushMessageReceiver.java new file mode 100644 index 000000000..33c5119e0 --- /dev/null +++ b/src/standardPush/java/de/pixart/messenger/services/PushMessageReceiver.java @@ -0,0 +1,17 @@ +package de.pixart.messenger.services; + +import android.content.Intent; +import android.os.Bundle; + +import com.google.android.gms.gcm.GcmListenerService; + +public class PushMessageReceiver extends GcmListenerService { + + @Override + public void onMessageReceived(String from, Bundle data) { + Intent intent = new Intent(this, XmppConnectionService.class); + intent.setAction(XmppConnectionService.ACTION_GCM_MESSAGE_RECEIVED); + intent.replaceExtras(data); + startService(intent); + } +} -- cgit v1.2.3