We are implementing the GCM Push notification for app updates on AppCenter Client app
We have setup the following values in the server configuration
jndiName="ibm.appcenter.gcm.signature.googleapikey value="***"
jndiName="ibm.appcenter.push.schedule.period.unit" value="seconds"
jndiName="ibm.appcenter.push.schedule.period.amount" value="40"
And our app is still not receiving push notifications from GCM,
is there anything additional in the AppCenter Client to modify to enable this feature?
we have already set the config.json file gcmProject attribute with the GCM project number and rebuilt the apk accordingly.
the logs don't show any exceptions and no registered devices are available for push notification update
This type of question does not fit StackOverflow, which is meant for programming-related questions. Please open an IBM PMR (support ticket) to address this kind of server configuration question.
Related
Our app uses Expo push notification to deliver push messages. It works just fine for most clients, but I am trying to debug one client where he is not receiving the push messages. Here is what I am seeing:
Using Expo push notification tool as well as my own client code, I
can send messages to his Expo push token. Expo server responds with
ok status. I checked the status given the receipt id and the status
also says ok.
But the client never receives the messages. I ensure
that the app is not already opened on his iOS device and that
notification is enabled for the app.
My question is: how do I debug this further? I understand that Apple server might decide to send or not to send messages based on various factors. How do I find out what Apple server did with the messages?
I have googled quite a bit but I couldn’t find much info on how to proceed. I hope that someone has experienced the same, and can help with some leads.
Thanks for your help,
Huey
I am using a native Android and IOS app which connects to Mobilefirst server. The app is connecting to MFP server for App authenticity and for creating user identity(Adapter authentication).
Now when I went console/devices
I see status specific to device which contains Active, Lost, Stolen, Expired and Disabled.
And under installed apps I see status Enabled and disabled. I see Certificate Serial Number value being No certificate. Do I need to add anything to get this certificate will this matter to enable or disable the status of the app.
My question is how do I use these features in Native apps?
You start by reading the documentation. You can go ahead and start reading here: http://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.monitor.doc/monitor/c_device_mgmt.html
It has nothing to do with programming so I'm not going to write anymore about this in Stack Overflow (it is too much to cover anyway).
When I send multiple notifications to Apple or Android devices through MFP, Apple devices will receive all the notifications on the other hand Android will only receive the last notification. We are using Unicast Notification to send messages to user devices using this REST API.
Android devices will also receive all the push notifications sent by the MFP server. The notification shade ( center) will however display only the last received. This does not mean the earlier ones are lost. They are all still available, just not visible in the notification shade.
You have not mentioned the complete build version of your MFP. To see all the notifications in the shade-
install the latest ifix from FixCentral, rebuild your application. Edit your wlclient.properties and add the following property-
showAllNotificationsInTray=true
we have an app which uses JSONStore to support offline, if device is offline and user submit data it stores it offline, now when device is online and when user login to the app it sync with server and submit all data to server.
the question is, Is it possible when device comes online then my offline data sync with server without user open my app ?
Does worklight support that? Or I have to do something else?
please advice
Like Idan said, Worklight does not support this, but depending on the OS, it could support it.
For instance, on Android, you could use BroadcastReceivers to detect changes in network connectivity, and execute an action when it happens, regardless of whether your app is closed or not.
Here is the API for the receiver: http://developer.android.com/reference/android/content/BroadcastReceiver.html and here is a SO answer explaining how to use it to detect WiFi connectivity: https://stackoverflow.com/a/22626736/2245921 So you can modify this BroadcastReceiver to run the sync code that you would normally do if your app was already open.
If you are using any other platform (iOS, Windows) there might be an equivalent that you can use.
Also, keep in mind that if you are doing a hybrid application, you can create your own Cordova plugin to execute native code from Javascript. Here is the documentation on how to do so: http://cordova.apache.org/docs/en/3.5.0/guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide
I'm using Worklight 6.1 on Liberty profile 8.5.5 in Windows XP in a VMWare in a Mac.
I have an Android app that receives notifications. I'm using an adapter to send the notifications.
It is my own app but the adapter is the same as in the push notifications sample project provided by IBM.
For sending the notification I'm directly calling the adapter from a browser using the REST call (protocol://server:port/app/[dev/]invoke?adapter=myAdapter&procedure...)
When I execute the application in the development server the notifications arrives almost immediately, but when I test the application in the test server (mentioned above) the notifications takes a lot of time to arrive, if they arrive.
However, when the notification does arrive, the next notifications arrives in seconds.
It is something I have experienced in the past also with previous Worklight versions.
I do not know what is the difference between the servers or if the problem is related to the server.
Any hints for debugging this?
I have enabled the trace:
<logging traceSpecification="*=audit=enabled:com.worklight.integration.notification.*=finest=enabled" />
I can see the trace:
com.worklight.integration.notification.gcm.GCMSender 1 sendNoRetry Sending JSON to GCM server: {"collapse_key":"myPush","data":{"alert":"Hay una nueva ficha","payload":"{\n \"alias\": \"myPush\",\n \"identificador\": \"a035\",\n \"nombre\": \"aName35\"\n}","badge":"1"},"registration_ids":["APA91bG03cXkyVM6pA2-CO1g-tZUQL6FwJgugaa68YngIyGbbR_oDzVNn-1RULpoktvMUKwF3D1qK4bx-4OVeAbUzBqNpqO3m_1hwz0Z6I0B_DS_Jvc0wzI_fjKpJ9vqPNO58Bdt40ms"]} [project DemoM]
But I do not know if that trace means that everything has gone ok and the message is now in the GCM servers.
I have also enabled sniffers (WireShark in Mac and SmartSniff in XP) in dev server and stand alone server but I have not been able to detect any pattern. Everything is under https so I only see some traces for google hosts but I can not take any conclusions. Although it is valid to see a trace for google gcm immediately after the server trace that takes less than 500ms
Anyway now it is taking time to the notification to arrive in both servers so I guess everything is working fine in the worklight side.