google-cloud-messaging

Sending Notification to user when user is offline in android using XMPP

倖福魔咒の 提交于 2020-01-13 12:05:49
问题 I implemented an Android chat application using Smack client with XMPP server. Everything works fine when the user is online, now when the user is offline (the app is not in running state). I would like to push notification using GCM. Is there a way to achieve that, and is there a way that we can manage our server itself to take care of that? 回答1: You can send push notification any time the user is online or not but the device has internet.You have all devices device tokens so when you send a

Sending Notification to user when user is offline in android using XMPP

主宰稳场 提交于 2020-01-13 12:05:08
问题 I implemented an Android chat application using Smack client with XMPP server. Everything works fine when the user is online, now when the user is offline (the app is not in running state). I would like to push notification using GCM. Is there a way to achieve that, and is there a way that we can manage our server itself to take care of that? 回答1: You can send push notification any time the user is online or not but the device has internet.You have all devices device tokens so when you send a

Push notification when app is in background

我是研究僧i 提交于 2020-01-13 05:00:08
问题 I implemented Google Cloud Messaging in my Android app. When I send a message with JSON while I have opened the app, it acts different than when I have the app closed. When I have the app open , and receive the notification, it starts the intent I want it to start. When I have the app closed when i receive the notification, and I click on the notification, it opens the Main intent. How can I say which intent it needs to open when I have closed my app and receive the push notification? The

Issue with GCM. Manifest malformed as a result of capital letter in package name

早过忘川 提交于 2020-01-13 03:12:06
问题 I have a problem when I try to add GCM in my application, when the package name starts with capital letter. The problem is in the code: <permission android:name="Myapplication.com.permission.C2D_MESSAGE" android:protectionLevel="signature" /> When you try to install it in the emulator the output is: install_parse_failed_manifest_malformed If you are starting a new application you can solve it changing the package name from "Myapplication.com" to "myapplication.com" (little letters), but if

Is Google Account required for GCM (Google Cloud Messaging)?

拟墨画扇 提交于 2020-01-12 19:26:13
问题 I need to write a simple app to get PUSH Notifications. I used GCM which uses Google Play Services to get information. My questions is - to access GCM, is Google Account required or not? Can i use another email account to identify device? Is there any other way to get push notification for another email account or device? 回答1: Quoting from GCM Characteristics It uses an existing connection for Google services. For pre-3.0 devices, this requires users to set up their Google account on their

How to send data from server to Android?

左心房为你撑大大i 提交于 2020-01-12 05:51:13
问题 I am working on a project where I want my server to send some data to my application (without calling of web service from mobile). It is like a web panel which operates mobile app to add data. So when user add data in website and click add, it should add that data to the mobile app (if mobile is connected to the internet). It is also like sending command to android app. I planned to use Push Notification (GCM) for this, but push notifications will not be a good option as I dnt want user to

why GCM is not giving push notification in android device?

徘徊边缘 提交于 2020-01-11 10:34:27
问题 I am new to android and doing a demo app for gcm push notification. I have developed all this code and GCM push notification is coming on devices in my environment, but when I test this code in other network device gets registration id,but server side gets mismatch sender id response when sending messages to cloud. My code is given bellow: checkNotNull(CommonUtilities.SENDER_ID, "SENDER_ID"); GCMRegistrar.checkDevice(this); GCMRegistrar.checkManifest(this); setContentView(R.layout.activity

why GCM is not giving push notification in android device?

风格不统一 提交于 2020-01-11 10:34:26
问题 I am new to android and doing a demo app for gcm push notification. I have developed all this code and GCM push notification is coming on devices in my environment, but when I test this code in other network device gets registration id,but server side gets mismatch sender id response when sending messages to cloud. My code is given bellow: checkNotNull(CommonUtilities.SENDER_ID, "SENDER_ID"); GCMRegistrar.checkDevice(this); GCMRegistrar.checkManifest(this); setContentView(R.layout.activity

GCM Error=MissingRegistration sending messages via JSON

匆匆过客 提交于 2020-01-10 11:48:49
问题 I'm testing push GCM via Fiddler Headers: User-Agent: Fiddler Authorization: key=AIzaSyAkXfcuLLCZ-5n18wwO6XeJ13g-z9ja Host: android.googleapis.com Content-Length: 286 Body: {"registration_ids":["APA91bHyn8YHcH_vSuOo7_A0PMgF5SU1K0FebOFGKXYTqpN5x4eD0tVBvzQLn749TVcczN5gSjB1wqf5AzYfxFI_qskA1Nzipf-9MfdEom1PI1vkFqKIg9B8vZvPLOLozE7jaRzELuyDzpFRbO3Xh5lT-KDA"],"collapse_key":"8b990f5a-78fc-4bad-b242-ffc740a750fb","data":{"message":"message to device"}} I've got a error Error=MissingRegistration Where

Checking status of GCM message

倖福魔咒の 提交于 2020-01-10 10:17:19
问题 I'm trying to send a message to my phone by using GCM. I receive a message id=0... response but my phone doesn't show any message. Is there a way to check the status of messages(sent,waiting etc.) 回答1: Nope. If you received message_id=xxxx response, then GCM server has accepted your request and will process it ASAP. Whatever happens after that you have no control over with. You won't get another response whether the messages are delivered to the intended devices. 回答2: Google has recently