android-c2dm

Starting LocationManager as Service Android

空扰寡人 提交于 2019-12-04 13:19:00
问题 What I'm attempting to do is when receiving a c2dm message, start a service that asks for location for 'x' amount of time and then hands that location off to our server. The c2dm message starts the service correctly, and the GPS location turns on, but it never updates. It just sits there for the length of time I specify (currently 12 seconds) in the thread and does nothing. I'm using the exact same code somewhere else in my app (not as a service) and it works perfectly. What am I doing wrong?

C2DM retry registration permission denial

こ雲淡風輕ζ 提交于 2019-12-04 12:22:07
Any ideas on how to solve this permission denial error on retry registration event are greatly appreciated. Permission Denial: broadcasting Intent { act=com.google.android.c2dm.intent.RETRY flg=0x4 (has extras) } from com.my.package (pid=-1, uid=10041) requires com.google.android.c2dm.permission.SEND due to receiver com.my.package/com.google.android.c2dm.C2DMBroadcastReceiver manifest <uses-sdk android:minSdkVersion="8" /> <permission android:name="com.my.package.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /

Launch application when GCM notification received

*爱你&永不变心* 提交于 2019-12-04 08:31:05
I have GCM notification implementation. I know that the client application receives the notification whether it is in the foreground, background or killed state. What I would like to know is, how can I launch my application on notification received, when the application is in the killed state? jasdmystery In the message receiver, I do the following: final Intent notificationIntent = new Intent(context, YourActivity.class); notificationIntent.setAction(Intent.ACTION_MAIN); notificationIntent.addCategory(Intent.CATEGORY_LAUNCHER); Here replace YourActivity.class with the entry activity. This

Android “hello world” pushnotification example [closed]

霸气de小男生 提交于 2019-12-04 07:30:00
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am new to android application development and I am learning little bit. I am in a hard mission for sending push notification ( cloud messaging ) from my web server ( PHP ) to android application ( just a "helloworld" ). I did some "googling" and few of my doubts are Google is sending notification using our

Android C2DM : Duplicate message to the same device and App

我的梦境 提交于 2019-12-04 02:59:47
问题 I'm wondering if anyone has faced this issue with Google C2DM? This is the scenario I am faced with: User installs the app and registers with C2DM server for a registration key. User uninstalls the app. User reinstalls the app (and registers with C2DM server for new registration key). Now I send message from my server to the user's phone and they get a duplicate message. Could anyone shed any insight into wether this is expected behaviour or how I can fix it? Thanks, 回答1: Not sure if this is

Simple implementation of Android C2DM required

余生颓废 提交于 2019-12-03 13:34:26
问题 I am trying to implement Android c2dm. I have looked into documentation and seen the jump note and chrome to phone samples that are provided... But i couldnt really figure out the process. It would be great if i could simple implementation of c2dm where in when we send a request from server, it displays simple notification... Plz help 回答1: Please take a look at my open source project at: http://github.com/geeknam/Push-Contacts The server side is written in Python. If you are familiar with

Why and how is push-notification (like GCM) battery efficient?

倖福魔咒の 提交于 2019-12-03 10:06:54
Wanted to understand the fundamental reasons for push-notification like Google Cloud Messaging (earlier called Google Cloud to Device Messaging) being more battery friendly, for cloud <--> device communication ? In my view, the alternative technologies involve "polling" (over TCP/IP) while keeping the connection in CONNECTED state, using keep-alives. Or is there something better ? My limited undertanding of GCM is that, it also uses TCP/IP and keepalives, but the client never polls the server for status. Instead the server informs the client about an incoming message, and applications who

C2DM with PHP using OAuth2.0 (ClientLogin is deprecated!)

ε祈祈猫儿з 提交于 2019-12-03 09:22:59
问题 Note: Before you spend your time reading on, please know that C2DM is itself deprecated now and replaced by GCM (http://developer.android.com/guide/google/gcm/c2dm.html) -- Original question -- Do we have example code for implementing PHP server-side code to push messages to Android devices using C2DM? I have searched for many code samples which are using old authentication method ClientLogin which is deprecated. Reference: https://developers.google.com/accounts/docs/AuthForInstalledApps

Starting LocationManager as Service Android

柔情痞子 提交于 2019-12-03 07:54:13
What I'm attempting to do is when receiving a c2dm message, start a service that asks for location for 'x' amount of time and then hands that location off to our server. The c2dm message starts the service correctly, and the GPS location turns on, but it never updates. It just sits there for the length of time I specify (currently 12 seconds) in the thread and does nothing. I'm using the exact same code somewhere else in my app (not as a service) and it works perfectly. What am I doing wrong? This starts the service when receiving a c2dm message. context.startService(new Intent(context,

What is the maximum number of characters that can be displayed in Android and iOS push notification?

巧了我就是萌 提交于 2019-12-03 05:30:59
What is the maximum number of characters that can be displayed in push notification in Android without the text being truncated? The documentation for iPhone states that the notification payload has to be under 256 bytes in total, but I was unable to find something similar for Android. Jorgesys Android The message size limit in Firebase Cloud Messaging (FCM) is 4 kbytes. https://firebase.google.com/docs/cloud-messaging/concept-options#notification-messages-with-optional-data-payload https://firebase.google.com/docs/cloud-messaging/server#choose The message size limit in GCM is 4 kbytes.