I am developing an application for a customer. The process of app publishing is completely on the customer (I don't own the account that is used for publishing).
Now I am adding Google Cloud Messaging (GCM) to the app. So to make GCM prerequisites, using the Google APIs Console web site I have to (1) create a Google API project and enable the GCM Service and (2) obtain the Server API Key.
Obviously the only account I can use for making GCM prerequisites is my own account.
I am concerned about the generated GCM prerequisites may not work in production, because of different Google accounts used for publishing the app and for making GCM prerequisites. Also what if I then remove/modify Google API project from my account by mistake? Are my concerns valid? There seems to be no info on this topic.
Agreeing with #abielita in the comments section, the GCM service should still work regardless if the config details are from a different account than that of the one that published it.
The thing that will be complicated is when there is something modified in your project (the one associated with the GCM service) that caused the GCM service to stop, the client will have to try and debug/troubleshoot the issue, which they might contact Google for. And the thing is, I don't think Google (or any company in this matter) would disclose any details of any project that isn't officially their own without any consent from the owner (you). This might delay the process to resolving some things.
With all that said, I would suggest that as much as possible, use the same project, or at the very least, have your client create their own project that you can use for the GCM/FCM service.
Related
I have an Android app that subscribes to a FCM topic named ("alert")....
I only want the signed,published version of my app Google Play Store to receive messages from the "alert" topic. I do not want an unsigned/debug APK a developer creates with the same package name to be able to subscribe to the topic an receive notifications, even if the unsigned/debug version has the google-services.json configuration. Is it possible to configure the FCM topic to restrict access to only my published app from Google Play Store?
I thought this was possible by configuring the API KEY used in the app from https://console.developers.google.com/apis/credentials, and specifying the key restriction to Android apps, and specify a package name and SHA1 from my signing certificate I used for the app...But it seems like even if I do this, an unsigned/debug version of my app still is able to successfully subscribe to the topic and receive messages.
There is currently no way to restrict users to subscribe to a topic.
FCM topics are public. There is no way to prevent specific users from subscribing to them -- in this case, users or app versions. So long as they are authorized to make a request and know the name of the topic, they could easily subscribe.
I want to use FCM(Firebase Cloud Messaging) in my organization's internal App which is not going to be hosted on google play. Does it require any kind of payment? I searched about it, all the searches pointed to google play developer console which charges $25 as one time registration fees. I assume registering on google play developer console is required when we want to host an App on google play. Correct me if I am wrong.
Currently I am able to use FCM in the App just by signing in using my gmail account. I want to know whether payment is necessary for using google FCM service in the App.
As already mentioned in the comments by #jankigadhiya, FCM service is free of charge, though there are premium packages, as seen in the Firebase Pricings page.
The $25 registration fee for the Google Play Dev Console is only necessary IF you are planning to publish your app via the Google Play Store, as described:
Google Play Developer Console enables developers to easily publish and distribute their applications directly to users of Android-compatible phones.
Most of the perks/advantage when registering are for apps who's target is the public market. Since you're app is for internal use only, the advantage I think you can make use of should you choose to register for a Google Play Dev Console is Viewing the App Performance Statistics.
This How to use the Google Play Dev Console help doc should prove helpful.
Im working on an app with server-client communication. It will have a small
messaging system and maybe i will also synchronize the conigurations with GCM.
All users have to register to use the app and to use the functionalities
from our provided website and they can communicate with other registered user
using the app or the website.
If i use GCM to implement the messaging and the config synchronization, does
every user has to have a google account? This Tutorial says that i have
to create a google account. That wouldnt be good for me.. actually i dont want
my users to be forced to have a google account.
From Android GCM Overview
It uses an existing connection for Google services. For pre-3.0 devices, this requires users to set up their Google account on their mobile devices. A Google account is not a requirement on devices running Android 4.0.4 or higher.
If you are using GCM from the google play service library yes you need a google account because google play services gets updated through the play store.
Current Google GCM documentation requires you to install Google Play Services and to use them for GCM (Google Cloud Messaging). The library is 1.1MB, yet my current .apk is half that size. My app is intended to receive GCM and display some data on the screen, so I don't need Google Play Services' Maps API, G+ login, etc. Nor I need to be able to respond back to the server after getting GCM.
SDK Manager allows download and installation of standalone Google Cloud Messaging for Android package. It is the one that was used before Google I/O 2013, where Play Services were announced.
My question is: what is the difference in performance between GPS's GCM and standalone GCM for Android? Do I really have to switch to GPS? Is standalone GCM depricated? Can I still receive data (up to 4K) with standalone GCM?
As far as I know, yes, the old one is deprecated (it says so here http://developer.android.com/reference/gcm-packages.html), but still works.
I would recommend using the Play Services version, though, since it's MUCH easier to configure and use, and if you don't need G+ login or anything else you don't have to use it. Yes, your APK will be a little bit bigger, but I think it's worth it.
Plus, any new features or improvements to the protocol will most likely be only for the Play Services library, and not for the old one.
The old GCM though deprecated, still works. And there is a probability it will be working for some more time.
Personally, I implemented the new GCM using the play services and it seems to be buggy as there were devices that could not get the registration ID and got the SERVICE_NOT_AVAILABLE error. So after some research I wasn't able to find a solution for it, and reverted to the old GCM method that uses GCMIntentService, and I was able to get back the registration IDs.
Bottom Line : Seems you can use the old GCM method for the time being.
You don't need to worry much about increase in app size while using GCM using Play Services as long as you're using Proguard.
Description of The Google Play services client library mentions
The client library has a light footprint if you use ProGuard as part
of your build process, so it won't have an adverse impact on your
app's file size.
I haven't myself measured the difference in apk with the two different approaches. Will update if I do.
the new GCM method also uses the GcmIntentService where stays the handle configuration for received message and where i configured my sendNotification(msg) method
Check the device to make sure it has the Google Play Services APK. If it doesn't, display a dialog that allows users to download the APK from the Google Play Store or enable it in the device's system settings.
It will save you from project memory size.
Is GCM production-ready?
I just wonder if anyone has switched over to it and can report back that it's behaving as advertised. I transitioned from C2DM to GCM a few days ago in a dev build, but my GCM dashboard is still reporting zero data usage which makes me feel not-good. (this is under the Google APIs console, the graph titled Traffic Reports for [your app name]). I've been successfully sending messages between dev builds using GCM.
It seems OK, but I'm hesitant to unleash this on hundreds of thousands of users.
It's official at C2DM documentation that the service has been officially deprecated as of June 26, 2012. This means that C2DM has stopped accepting new users and quota requests..
According to this I assume that GCM is working now and developers are trully encouraged to migrate from C2DM to GCM.
"Developers must use GCM for new development."
According to Google's documentation, it's not supposed to work on the API console :
Viewing statistics
To view statistics and any error messages for your GCM applications:
Go to the Android Developer Console.
Login with your developer account.
You will see a page that has a list of all of your apps.
Click on the "statistics" link next to the app for which you want to view GCM stats.
Now you are on the statistics page.
Go to the drop-down menu and select the GCM metric you want to view.
Note: Stats on the Google API Console are not enabled for GCM. You must use the Android Developer Console.