I am developing Android app for a company which has thousands of Employees and all of them will use this app and company will be able to track all employees through the app.
One feature of my app is to send data from Server to Android. For this i am using C2DM. Since C2DM require active Gmail account on each device so all of the employees need to create Gmail account for them and sign in to that account to use my app(this is my understanding of problem) but my Client (Company Manager) dont want to let this to employees to create Gmail account for them.
In your opinion what should be best for me. do i continue to develop in C2DM or should i use some other mechanism ?
I am stuck in this problem
any help is appreciated.Thanks
Before you go too far, please note that C2DM service is not for sending "data" to client/phone. Its meant for notifications. They payload is limited 1024 bytes. When you receive a notification, you should then establish a connection with your server and pull the data.
If your organization is using Google Apps, the domain administrator can programmatically provision accounts for all the users.
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.
I'm working on an Ionic project developing two different Apps:
1) The Companies App - Companies will be able to post new job opportunities.
2) The users App - They will be able to check for any role, if an user applies for a role, the Company that is offering the job, should receive a Push Notification.
As you can see, my problem is: how an App will Push to the other one ? Does Ionic have a solution for that? If not, there is another way to solve this?
Looking forward to hear from you! Thank you!
The whole point of push notifications is to give backend servers the ability to initiate communication and notify mobile devices with updates. This said, You have to do server side logic to achieve what you need, here is a sample scenario for your case:
Register your companies app to ionic.io, following the steps on ionic push quick start guide, when you register your app gets a unique ID that you can use from your server side code to send push notifications, sample code for python can be found in API Examples
Company A uses the companies app to post a new job that will be added in a database on your server. Company A can choose to subsbribe to push notifications, when they do, a unique token ID will be generated for this device, send this token to your backend server because you will need it to send the notification, check API Examples
User B uses the users app to apply for the job, his application is
propagated to the server.
Your server side code will determine that this job was posted by company A which is subscribed to push notifications, and will use the company token id, the application id, and the application secret key to send a notifications to the company on the companies app.
We are developing an app that requires the users to be connected to the internet either via WiFi or via 4G or 3G.
Can we use GCM, Google Cloud Messaging, to register and verify a user instead of SMS ?
That is, we are trying to find an alternative to text message or SMS, for sending a verification code to the user, similar to the way that apps like WhatsApp do.
If you want to provide 2 step authentication for users of your website, certainly GCM is a very good option. Create table that links GCM ids to user ids. YOu will of course need to write a bit of code to handle GCM registration id changes.
If you want to provide 2 step authentication for users of your android app. GCM certainly isn't a good option. Why because the 2 step authentication should involve a different device.
You can also try Google Authenticator app. No need for SMS when you use it.
Is GCM the only way for push notifications in android? And is it advisable over other methods (if there are any)?
So let's say my app from a device registers on GCM. Is it the app itself which is assosciated with the device that registers itself, or the user and his email id that register? If my user switches devices in future, will the same 'registration token' work for him ? Or in a similar scenario if a user with another g-mail id registers to my app from the same device, do i push notifications to the same device with 2 different registration tokens?
Extending to what i asked in 2, suppose a single user has his g-mail id working on my app on different devices. Does GCM push the notification to all those devices, or only one of them? And if one, then how does it prioritize?
No, there are other push notification services in Android, like Parse. However, it is strongly recommended to use the default push notification service that is present in any Android device that has Google Play Store, because that reduces battery usage. If you are pushing your app somewhere else though, like Amazon Store, keep in mind that Kindle Fire does not comply with this and doesn't have Google Play Services -- at least as far as I know.
The registration token is very volatile and is not bound at all to an email. Actually, sometimes the same device may get a new GCM ID out of the blue. There are many tutorials on GCM's best practices, but Google's is the best way to start. What you should do to prevent problems is store the GCM id of your device in your database, so you can always know which ID is currently associated to your device. GCM may give you new IDs for no reason, so always parse its response properly and store the new ID it may provide, linking it to the device.
GCM doesn't really care which Google account is your app using. That means you can register as many devices as you want with the same account. You have to manage to which devices you push notifications, because the ID is managed by device.
Be careful: there's been some changes with the API lately, so a lot of unnoficial tutorials you find on the internet may point to deprecated methods.
There are other ways of sending notifications, Tokodu and RabbitMQ for example. I wont go over if X is better than Y, since it's not allowed on StackOverflow.
A unique device token is generated for the device, how you use this device token is totally up to you. You can make it unique for the user by, for example, implementing a login system, so that the device token is created and stored in a database (together with the user information). Let's say if two different users uses your application on a shared device, they can both receive notifications on the same device if you allow them to. It depends on your own implementation.
This again depends on how you chose to implement the GCM features on your client and server side. For example, you can choose to store device tokens for each and every device the user has installed the app on, or you can store the latest device token so that notifications are only sent to one of the user's devices.
I hope this helps clear some things up.
Besides good answers above, if you need a push notification solution for a working environment without Internet access, I suggest SignalR of Microsoft, which has already supported Android and Java (you can find out more at GitHub).
Hope this helps little!
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