We are changing from an App vendor to a home-built App and we have tens of thousands of users opted in to push notifications in our Android App and this is the main way that users get into our App each day.
We have the tokens for the users from the current push vendor so we can migrate those into our push vendor, however the existing App is using our old App vendor's GCM (google cloud messaging) account from their Google Account.
I believe that if we setup our new App and push vendor configuration with our own GCM (or preferably FCM, firebase cloud messaging) account, then even with the push tokens we won't be able to reach the users in the new app until they open it and re-opt back in. We'd like to avoid this since the existing users mostly come in via a push, so they will go dark once we update the App in the Play Store and can no longer push to them.
Is there a way to avoid this? Perhaps a way to migrate them from the current GCM account to a new FCM account and preserving the ability to push to them without them having to open the App? The App bundle Id and name and all that are staying the same and continue in our same Google Play Developer Console, it's only the GCM account that we want to change to our GCM/FCM account.
Thanks for any assistance you can provide.
Related
I want to add push notification to my app with Firebase Cloud Messaging but i don't know the right way to set this up.
My app looks like this:
I have multiple customers (companies) who host their own server with a database for their employees.
Every employee of my customers will download the app to receive push notifications from their company's server which implements the firebase admin sdk to send push notifications.
I thought the easiest way would be to let every customer set up their own fcm project and then add the api key to the app.
This is easy to set up in android, but in ios every company would need an apple dev account for the certificates which costs them 99€ every year just too receive push notifications.
So maybe only i need to set up one firebase project myself and generate a server key for every customer. This way only i need a apple dev account.
Is it possible to let every customer send push notifications through my fcm project to their employees but not to any other employees of different customers. They should not be allowed to see any data of other customers or send messages to them.
What's the intended way to set this up and is there a limit to push notifications in one firebase account? If only i host a fcm project for every customer i might hit the limit.
Thanks in advance for your help.
They should not be allowed to see any data of other customers or send messages to them.
If you require isolation between customers, then they should definitely not be using the same project. They should be in different projects, so they can't send messages outside of their own user base.
My android app uses GCM and urbanairship for push notifications.
Now Google has deprecated GCM and is recommending to switch to FCM.
The problem is I don't have access to the Google account which was used to set up GCM as it was set up using one of the developers account who has left. So I can not migrate from GCM to FCM as told in the migration tutorials.
In this scenario, how can I switch to FCM using a different Google account keeping in mind that I use urbanairship?
I want to preserve the registration tokens, or get them replaced without asking customers to uninstall and reinstall the app.
Is it possible that the app registers itself with FCM when I roll down an update?
The problem is I don't have access to the Google account which was used to set up GCM as it was set up using one of the developers account who has left.
This is not an uncommon situation. What I would suggest is contacting Google Support about the GCM Project. It would be best for you to get access to current project, specially if you are the one managing/using it.
After getting access, you could then migrate it to Firebase as needed.
In this scenario, how can I switch to FCM using a different Google account keeping in mind that I use urbanairship?
You can't switch to a different account. However, you could modify your app to receive messages from a different project. I haven't used UrbanAirship before, but AFAIK, if they are using GCM underneath their service, then they too should be handling the FCM migration part.
Is it possible that the app registers itself with FCM when I roll down an update?
In order to register an app is for it to call getToken(). So technically, yes. But you would have to handle pairing/saving the token to it's corresponding user.
With all that said, I would strongly suggest you contact Google Support first.
Here is how I solved the problem:
1. Created a new Google FCM account.
2. Created a new project in Urbanairship console using keys from new Google FCM account.
3. Updated the backend code to send notifications twice - once for old urbanairship project and once for new project. Out of the two attempts, one will fail for sure and one will succeed for sure as customer will be using either of the two versions of the app.
4. Customers using old version of app will have registation tokens which are available with old urbanairship project. Customers using new version of app will have registation tokens which are available with new urbanairship project.
5. When customer updates the app, urbanairship takes care of registering the token with new FCM account server. I don't have to do anything here. This was not expected as token is updated upon fresh installation and not during updates.
So to summarize:
UA Project Old -> Google GCM -> Device with old app version
UA Project New -> Google FCM -> Device with new app version
Here is the FCM Urban Airship migration guide. Assuming you are able to recover your GCM account you only need to follow that guide with your existing sender ID. If you change accounts, you will have to configure the new FCM project API key in the Urban Airship dashboard. The SDK will automatically update all the channels with the new registration token. During the transition period, only devices that have updated will be able to receive push.
I am using Google's Firebase to manage some of the back end aspects of my mobile application.
Mainly I am using it for authentication with email as well as sending push notifications.
Currently, I have around 10 users who have been registered for a push notification token.
My question is that, I want to send a notification to only 8 users. Is this possible, because I can't seem to find a location where I can select the users.
I tried disabling the users from the Authentication tab but that seems not to make it work as authenticated users and Push-registered users seem to be different.
You can target FCM messages:
To the iOS or Android app that is being used (through the Console only).
To an Analytics audience that the user of the app is part of (through the Console only).
To a topic the app instance is subscribed to (through the Console and the API).
To a group of devices, if you know their group ID (through the Console and the API).
To a specific device instance (i.e. a specific app on a specific phone) if you know their instance ID token (through the Console and the API).
There is no way in the Firebase console to select the users to send a message to. In fact: Firebase Cloud Messaging has no concept of a user, all it knows is the token that identifies the app that it's part of on the device that it's installed on.
I want to send a notification from some server to android device. The most obvious(and power-hungry) way is to keep searching some database for any new messages using a service/broadcast receiver.
I am sure there are other ways to get this job done. I took a look at GCM(google cloud messaging) , and it seems that google always keeps some TCP/IP connection active. This essentially means that using GCM will use less power.
However, I have a few questions regarding GCM.
Does a user NEED to have google services, and a registered play id ?
If a user side-loads an apk, will he still be able to receive notifications ?
I would like to know if there are alternatives to GCM
What about devices running forked android versions, like nokia X , kindle etc? How are push notifications sent to those devices ?
Does a user NEED to have google services, and a registered play id ?
Yes, it is necessary to use Google Play Services in your development. However users do not need to have a Google account or the Google Play Services Installed.
If a user side-loads an apk, will he still be able to receive notifications ?
Yes.
The steps that must be followed to send a notification to a device are:
Developer creates application in Google Developer Console
User installs application
Application gets a NotificationID and sends it to your database
You store the NotificationID at your servers with any other information related (your username, device info, etc.)
Whenever you want to send a Notification you connect to GCM sending one or more NotificationID and the notification content.
The users related to the NotificationID will receive in your Application the notification content.
Do any action you need.
Have a look here.
IMHO there is not any real alternative to GCM in Android (based on efficiency and simplicity). You may look for 3rd party services that will help you in the implementation and add value (marketing, business intelligence). As an example of this take a look to UrbanShip.
If you want to implement your own solution you should have a look to WebSockets. This will mantain an active communication between your server and the device. Those sockets are thought for real time communication between your server and the mobile.
Two issues:
How is the application affecting the battery depends on your implementation and the application use-case (how frecuent are you sending information, how long is the connection stablished).
I am not aware of any native implementation of this in Android but there are a few Libraries coming from open source projects. Google it.
We have a system that generates android apps automatically. The users enter in our website and login in their accounts and the users make a description of wich functionalities want and our system automatically generates the signed android apk and publishes on market.
The apps are published on the market with our developer account, not with the user account.
Such users would need PUSH notifications, for example, through GCM, to their applications. Therefore, we need to know if there is any way to automate the process so that users only have to enter on our website their google accounts and the message they want to send their applications, and our system must automatically send the messages to the phones that uses the user applications.
You have to remember and highlight the following factors:
Applications are published in the market under our developer account.
Users who have created their apps through our system have their own google accounts (not developer accounts) and want to send their messages from their accounts of Google and to its applications only, not those of others users and not using our google developer account.
The whole process should be automatic and transparent to the user, since they should only provide these data, their google account, the message they want to send, and the app that must receive the message.
Would it be possible to do this by GCM?
There is a GCM API with which to communicate to perform all these steps automatically?
Thanks
I think you could, but the user must register in GoogleApis to have their own SENDER_ID, then you should make a webservice in which you associate each user to their SENDER_ID and provide them an interface that only send notificatios using their SENDER_ID, however you should have a strong enough server to achieve this since Big Data could be an issue because you must also store the device_ids associated with each of your clients application, also you would be getting registration and unregistration intents from each application installed.
I have used Both Server Side (Grails) & Client Side (Titanium) to send notifications to the android device. So, I will be explaining you both one by one. But before that you need to add ADT plugin in to your Grails framework.check out http://tinyurl.com/chfthpe