google-cloud-messaging

Android GCM “Not registered” though getRegistrationId returns an ID

纵饮孤独 提交于 2020-01-03 05:02:09
问题 We use GCM with multiple Android devices. A few devices (not all) which we were able to notify using GCM, are recently failing to receive the GCM trigger (GCM server returns not registered). However, when we call getRegistrationId() on the device we get the same registration ID when it was functional. Any idea why the server is returning not registered while the client is returning an actual ID? 回答1: NotRegistered is returned by GCM if If the client app unregisters with GCM. If the client app

Android GCM: How to detect registered canonical ids in my own server?

为君一笑 提交于 2020-01-03 04:20:10
问题 I have an app published at the play store. When I want to send a notification, some users (for example, me) receive duplicate messages. I know that I have to handle it when I send the messages to recover the canonical ids and update the old registered id. But, Can I do something to fix this situation without sending any notification? 回答1: You should figure out a way to notify your server when GCM sends your app a new registration id. Currently when you get a registration id from GCM, you send

How to receive GCM message when app is closed or in background?

一世执手 提交于 2020-01-03 04:12:20
问题 When the App is in foreground, the GcmListenerService will be called and I can do performance here. But what if the app is in background? When the app is in background, I can still receive the notification but it is just the notification part without data part. How can I customize the on receive event to receive a GCM message when my app is in background or even closed?? the onMessageReceived() method will not be called if the app is in background. Is there any other method works when app is

How to receive GCM message when app is closed or in background?

巧了我就是萌 提交于 2020-01-03 04:12:10
问题 When the App is in foreground, the GcmListenerService will be called and I can do performance here. But what if the app is in background? When the app is in background, I can still receive the notification but it is just the notification part without data part. How can I customize the on receive event to receive a GCM message when my app is in background or even closed?? the onMessageReceived() method will not be called if the app is in background. Is there any other method works when app is

Android: CipherStream-API for AEAD Ciphers inacceptable slow

混江龙づ霸主 提交于 2020-01-03 03:49:05
问题 We are having an android app which a decrypting and encrypting large (up to 100MB) files over HTTP-Streams. Therefore, we are using CipherInputStreams and CipherOutputStreams which works fine for AES/CBC/PKCS7Padding . We recently switched to AES/GCM/NoPadding . Now the encryption and decryption is inacceptable slow for files over roughly 50MB. Debugging into the android source code, reveals the issues: https://android.googlesource.com/platform/libcore/+/master/ojluni/src/main/java/javax

How to open isolated popup on GCM notification like Viber

泪湿孤枕 提交于 2020-01-03 03:01:31
问题 Generally upon receiving message using Android GCM we call generateNotfication that fires a notification. I want to know that instead of firing a notification in notification bar, I would like to open an isolated popup window, where user can perform further actions as Viber do. As for viber, No matter where ever a user is, upon receiving a text message it open a smart popup dialog where you can reply. Why i call it isolated, because i don't the whole application to launch, just an activity in

Android - GCM push notification that sends user to Activity does not result in onCreate call

a 夏天 提交于 2020-01-02 11:03:14
问题 I am able to create push notifications, and to send the user to whichever Activity I want, but I notice that whenever the user lands on that Activity, the onCreate function does not get called. Is that supposed to be the case? How do I set it so that the onCreate of the Activity is called? Here is my Activity: public class QuestionActivity extends BaseListActivity { @Override public void onCreate(Bundle savedInstanceState) and here is how the notification is generated: Intent

Android - GCM push notification that sends user to Activity does not result in onCreate call

巧了我就是萌 提交于 2020-01-02 11:00:12
问题 I am able to create push notifications, and to send the user to whichever Activity I want, but I notice that whenever the user lands on that Activity, the onCreate function does not get called. Is that supposed to be the case? How do I set it so that the onCreate of the Activity is called? Here is my Activity: public class QuestionActivity extends BaseListActivity { @Override public void onCreate(Bundle savedInstanceState) and here is how the notification is generated: Intent

Parse.com push notifications not shown in background on android

落爺英雄遲暮 提交于 2020-01-02 10:25:20
问题 I'm using Parse.com with an Ionic app and the PushPlugin and trying to implement Parse's Push Notifications through GCM with a custom Sender ID. When I'm sending a message to all devices, or using the REST API with cURL, iOS notifications trigger fine when the app is in the background but android notifications are not. Here's what I tried with the rest API First for iOS, which is working well: curl -X POST \ -H "X-Parse-Application-Id: APP-ID" \ -H "X-Parse-REST-API-Key: API-KEY" \ -H

how to turn off notification programmatically in android when app running?

北慕城南 提交于 2020-01-02 08:50:28
问题 I am trying to develop an android app in which i am implementing chat functionality. but when i receive the message it makes a notification sound. How can i stop the notification when the user is using the app programmatically ? private void ChatNotifications(String uid, String fuid, String message) { NotificationCompat.BigTextStyle notiStyle = new NotificationCompat.BigTextStyle(); notiStyle.setBigContentTitle("message"); // notiStyle.setSummaryText(quote); notiStyle.bigText(message); Intent