google-cloud-messaging

Bundle of type java.lang.String cannot be converted to JSONArray

别来无恙 提交于 2019-12-25 12:05:51
问题 I am working on Android application in which I am getting Json message through GCM and I am passing notification through Bundles. Everything is working fine and I am getting Bundles message in my notification tray. But I want to parse that JSON Bundle message and it is given me an error: Bundle of type java.lang.String cannot be converted to JSONArray My JSON Response coming through Bundles is given below along with the code. Bundle[{summary=Game update 49ers touchdown, android.support

Bundle of type java.lang.String cannot be converted to JSONArray

◇◆丶佛笑我妖孽 提交于 2019-12-25 12:05:11
问题 I am working on Android application in which I am getting Json message through GCM and I am passing notification through Bundles. Everything is working fine and I am getting Bundles message in my notification tray. But I want to parse that JSON Bundle message and it is given me an error: Bundle of type java.lang.String cannot be converted to JSONArray My JSON Response coming through Bundles is given below along with the code. Bundle[{summary=Game update 49ers touchdown, android.support

Bundle of type java.lang.String cannot be converted to JSONArray

蓝咒 提交于 2019-12-25 12:05:06
问题 I am working on Android application in which I am getting Json message through GCM and I am passing notification through Bundles. Everything is working fine and I am getting Bundles message in my notification tray. But I want to parse that JSON Bundle message and it is given me an error: Bundle of type java.lang.String cannot be converted to JSONArray My JSON Response coming through Bundles is given below along with the code. Bundle[{summary=Game update 49ers touchdown, android.support

How to pass user context object to the response callback of async Jetty HTTP client?

拜拜、爱过 提交于 2019-12-25 09:22:17
问题 When sending notifications to single recipients over Google Firebase Cloud Messaging, sometimes a response comes back ( 200 + error:MissingRegistration , 200 + error:InvalidRegistration , 200 + error:NotRegistered ), which requires deleting the token of that recipient (because she for example reinstalled the Android app and the token has changed). My question is: How to pass that string (the FCM token) back to the response callback of the non-blocking Jetty HTTP client? Currently my

Converting/migrating from GCM to FCM for push notification

本秂侑毒 提交于 2019-12-25 08:37:05
问题 If I migrate my current GCM configuration to FCM what will happen to all the users of my Android app? Will I have to force all users to update or will the APK continue working as it is? Please guide me. Thanks in advance. 回答1: If you're simply referring to import your GCM project to Firebase, you should still be able to send messages to your users with GCM implemented apps (see my answer here). For migrating the app implementation from GCM to FCM, you don't necessarily have to force an update

Firebase cloud messaging conflict fb

守給你的承諾、 提交于 2019-12-25 08:15:08
问题 My project works well util I add FCM to build.gradle. The error here Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzr; My dependencies: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.google.firebase:firebase-messaging:9.4.0' ... compile 'com.facebook.android:facebook-android-sdk:[4,5)' compile 'com.facebook.android:audience-network-sdk:4.14.1

GCM not delivery if internet off

倖福魔咒の 提交于 2019-12-25 07:43:59
问题 Why if internet of receiver when notification start is inactive And Then It Will turned on the notification neve r arrived? Sorry for My English here my php: <?php include_once 'connection.php'; $myconn = connectToDatabase(); $ricevente = $_POST['ricevente']; $mittente = $_POST['mittente']; $type = $_POST['type']; $id = $_POST['id']; $data = $_POST['data']; $api = getCode($ricevente); $Authorization='AIzaSyBfrXTHDg_TDoD1dKgoSbeTNH2heV_aq30'; $headers = array( 'Authorization: key=' .

The GCM Notification message from the Notification Bar will not be shown in the activity if the app isn't started already

怎甘沉沦 提交于 2019-12-25 07:29:43
问题 I am using this tutorial for push notifications http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/ It works fine but when I click on the status bar to see the received message, it doesn't show in the MainActivity which it starts. What is the issue? MainActivity which receives the message @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.v(TAG

Android GCM registration ID change

安稳与你 提交于 2019-12-25 06:58:56
问题 I know this is a silly question but important for me. I am developing an application which uses GCM. I searched and read regarding the GCM and having some question related to this as: Is the registration_id of GCM change after App update? If yes then how to handle it? Is the registration_id of GCM change after Android update? If yes then how to handle it? Is the registration id changes with every time registration to GCM from the same device and same app? Do the app need to call registration