gcmlistenerservice

GCM Notification onclick does not open specified activity

南笙酒味 提交于 2019-12-23 04:56:33
问题 None of previoues asked questions solve my problem unfortunately. My application insists to does not open specified activity. Instead it opens main activity which is GCMService.java private void sendNotification(String message) { Intent intent = new Intent(this, LaunchActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 , intent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG

GCM Error - googleCloudMessaging.register

与世无争的帅哥 提交于 2019-12-21 07:24:33
问题 I have the problem that the android application says. "The application xxxx Sorry stopped" to work with the push notificaction, when performing the debugger that happens when it passes: method 1 InstanceID InstanceId = InstanceID.getInstance (context); token = instanceID.getToken (key_id.toString () GoogleCloudMessaging.INSTANCE_ID_SCOPE); getToken error, method 2 Both an the same mistake if (googleCloudMessaging == null) { googleCloudMessaging = GoogleCloudMessaging.getInstance(context); }

Android - Sending Push Notifications via GCM with app in foreground/background

痴心易碎 提交于 2019-12-12 03:33:11
问题 I'm adding Push Notifications via GCM to my app, but I am stuck on something. When I send a Push Notification with my app on foreground (open and on screen), it displays normally, as intended: But when I send it with my app on background, it displays like this: So my large image and icon background color doesn't display. Code for GCM HTTP Call: { "notification": { "title": "Tecolutla, Veracruz", "body": "¡Bienvenidos a Tecolutla!", "icon": "push" }, "priority": "high", "data": { "Mensaje":

GCM Error - googleCloudMessaging.register

蓝咒 提交于 2019-12-04 00:25:30
I have the problem that the android application says. "The application xxxx Sorry stopped" to work with the push notificaction, when performing the debugger that happens when it passes: method 1 InstanceID InstanceId = InstanceID.getInstance (context); token = instanceID.getToken (key_id.toString () GoogleCloudMessaging.INSTANCE_ID_SCOPE); getToken error, method 2 Both an the same mistake if (googleCloudMessaging == null) { googleCloudMessaging = GoogleCloudMessaging.getInstance(context); } token = googleCloudMessaging.register(key_id); note that the token is generated but the application is

GCM Push Notification Not Revived

霸气de小男生 提交于 2019-11-28 14:22:59
Below you can find the manifest file, is their anything wrong with configuration of GCM push notification classes ? no notification is received at all on android devices but apple devices receive the notification package="ac.iec" <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/> <permission android:name="ac.iec.permission.C2D_MESSAGE" android:protectionLevel="signature"/> <uses-permission android:name="ac.iec.permission.C2D_MESSAGE"/> <receiver android:name="com.google.android.gms.gcm.GcmReceiver" android

GcmListenerService is not called When Application is in Background

人盡茶涼 提交于 2019-11-27 19:31:48
GcmListenerService is not called when application is in background or when phone is locked or in sleep mode but notification is fired. How this will be called When App is in foreground its working ideally. Code for GcmListenerService is following public class MyGcmListenerService extends GcmListenerService { private static final String TAG = "MyGcmListenerService"; LocalDataBaseManager mDbManager; String message; Random randomNumber; long ID; /** * Called when message is received. * * @param from SenderID of the sender. * @param data Data bundle containing message data as key/value pairs. *

GCM Push Notification Not Revived

非 Y 不嫁゛ 提交于 2019-11-27 08:41:11
问题 Below you can find the manifest file, is their anything wrong with configuration of GCM push notification classes ? no notification is received at all on android devices but apple devices receive the notification package="ac.iec" <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/> <permission android:name="ac.iec.permission.C2D_MESSAGE" android:protectionLevel="signature"/> <uses-permission android:name=

GcmListenerService is not called When Application is in Background

走远了吗. 提交于 2019-11-26 19:54:34
问题 GcmListenerService is not called when application is in background or when phone is locked or in sleep mode but notification is fired. How this will be called When App is in foreground its working ideally. Code for GcmListenerService is following public class MyGcmListenerService extends GcmListenerService { private static final String TAG = "MyGcmListenerService"; LocalDataBaseManager mDbManager; String message; Random randomNumber; long ID; /** * Called when message is received. * * @param