[TIMOB-23677] Android: GCM is eventually being deprecated for FCM
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Closed |
Resolution | Done |
Resolution Date | 2018-04-17T13:31:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | cloudpush |
Reporter | Ashraf Abu |
Assignee | Hans Knöchel |
Created | 2016-07-25T13:52:45.000+0000 |
Updated | 2018-08-23T12:40:34.000+0000 |
Description
GCM [https://developers.google.com/cloud-messaging/faq] is going to be eventually deprecated for FCM [https://firebase.google.com/docs/cloud-messaging/]
We should be prepared for this and look and identify what different projects/parts we need to update.
Attachments
File | Date | Size |
---|---|---|
Screen_Shot_2016-10-19_at_3_31_33_PM.png | 2016-10-19T22:41:20.000+0000 | 64272 |
Screen_Shot_2016-10-19_at_3_36_09_PM.png | 2016-10-19T22:42:31.000+0000 | 30894 |
Screen_Shot_2016-10-19_at_3_36_44_PM.png | 2016-10-19T22:43:10.000+0000 | 19301 |
Screen_Shot_2016-10-19_at_3_38_23_PM.png | 2016-10-19T22:44:24.000+0000 | 46895 |
Screenshot_20161007-222415.png | 2016-10-07T16:30:15.000+0000 | 72777 |
Screen Shot 2016-10-07 at 10.22.24 PM.png | 2016-10-07T16:30:28.000+0000 | 51267 |
Screen Shot 2016-10-19 at 2.22.46 PM.png | 2016-10-19T08:32:46.000+0000 | 66747 |
Screen Shot 2016-10-19 at 2.30.10 PM.png | 2016-10-19T08:32:46.000+0000 | 67670 |
Related docs https://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications http://docs.appcelerator.com/platform/latest/#!/api/Modules.CloudPush https://wiki.appcelerator.org/display/guides2/Configuring+push+services
Hi [~cng] , I have tested FCM for android push notification. It's working as expected. https://developers.google.com/cloud-messaging/gcm#senderid [^Screenshot_20161007-222415.png] [^Screen Shot 2016-10-07 at 10.22.24 PM.png] We need to update our documentation. http://docs.appcelerator.com/platform/latest/#!/guide/Configuring_push_services
Hi [~cng] and [~wkong], Workaround : 1. Create a sample test project. 2. Inculde sample code : [push](https://gist.github.com/aminulaust/3946931bf2221a3b0c0a34516603679b) , ti.cloud and ti.cloudpush 3. Now create a [firebase project :](https://console.firebase.google.com) 4. Copy *Project ID* from firebase. 5. Then copy Web API Key from firebase. !Screen Shot 2016-10-19 at 2.22.46 PM.png|thumbnail! 6. Finally configure your Appcelerator Dashboard with Project ID and Web API Key.!Screen Shot 2016-10-19 at 2.30.10 PM.png|thumbnail! 7. Now send push notification. Thanks
[~adesai] FYI. [~emerriman] Any chance you could confirm this?
Question - Will the workaround suggested by [~aislam] work with a GCM id or FCM id?
I think we need to confirm that, which it would be great if [~emerriman] or [~wkong] could assist.
Hi [~adesai], The workaround suggested by me was FCM id. Please take a look on firebase console screenshot : !Screen Shot 2016-10-19 at 2.22.46 PM.png|thumbnail!
Thanks [~aislam]. If [~emerriman] can confirm this, then this may be a second alternative that we can suggest to the Enedis team as well. (Providing them with GCM keys created with our account being the first).
Hello all, Confirmed. We have two ways that you can push using FCM: 1) The method described by [~aislam] above - this is the simplest. Simply create a new project in Firebase console, and use the "Server key (legacy token)" as "GCM API Key". Then add the "SenderID" to the "GCM Sender ID" and you can push. Of course you must follow the other steps listed to create a mobile app and create and register users, subscribe for push, etc.. 2) You can import a project into Firebase. Basically similar, the end result will be a new key is generated. The steps for this are: 2.1) Log into Firebase console 2.2) Choose "Import Google Project" from the project menu 2.3) Select "Project Settings" from the gear menu 2.4) Select the "CLOUD MESSAGING" Tab and use the key and sender ID as previously described If you return to the Older google API console, you will see two new keys are added to the project.
Hi - Following the steps given by Aminul I get an error in the console whilst running (see below). This is a new project that has never had google play services enabled. Using Titanium SDK 5.5.1 GA and latest versions of ti.cloud and ti.cloudpush. [ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
Hello [~johngoodland] We have seen this as well, and after investigating it seems to be a Google bug. See: https://code.google.com/p/google-plus-platform/issues/detail?id=755 And on stack overflow: http://stackoverflow.com/questions/18068627/logcat-message-the-google-play-services-resources-were-not-found-check-your-pr Seems to be affecting many Google devs.
FCM is already supported since a while, see https://github.com/hansemannn/titanium-firebase-cloud-messaging for details (including support for both iOS and Android).
Closed as completed. If this is in error, please reopen.
Comment from above states that FCM is supported, but link is to a module maintained by Hans, not an Axway project. Does this have any official support from Axway other than Hans being on the Appcelerator development team and is this / has this code been rolled up into the core product?