Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I have been worked on web apps and recently started working with an app based company. Here I have a case where I need to send GCM to users. I am bit confused that whether I should send GCM directly to users without storing it into my database OR I should store some data of GCM(like gcm message, gcm sent time, gcm status, etc) that has been sent by our app ? If yes, then what could be the best table design to store gcm data in RDBMS ?
I personally feel that I should store it in database so that I can keep track of it in future and might be helpful at time debugging. And at some regular time interval I can remove old GCM data from table.
Whether you save the details or not is up to you. It is possible.
If your goal for storing information of your GCM messages is for Statistics or Diagnosis, Google GCM actually has a Statistics and Diagnostics tool that you can use. However, as per View & diagnose Google Cloud Messaging (GCM) statistics.
GCM statisticss will be available for only published Google Play apps.
Also mentioned in this answer:
Note: Stats on the Google API Console are not enabled for GCM. You must use the Developer Console.
The Developer Console meaning the Google Play Developer Console.
Should you choose to storing the details your own way, answering what would be the best table design is a bit complicated. Since, you have a lot of factors to consider, depending on your use case and other stuff like that in order to decide which one to use.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
So, I'm working on a chat app and I am having trouble sending notifications using FCM to chat groups or channels.
There are 2 options I tried using:
Device groups: This is perfect but, The docs says that I can only add 20 devices to a group and that's no good as I need many more to be added.
Topic Messaging: This is also good but I wish there was a way to restrict hackers from joining to other topics and getting notifications from private messages/channels.
A third option is to store everyones device token in my database and then send each one a notification but this sounds so inefficient but I'm not really sure. Is this approach fine?
I'd suggest the 3rd option.
I don't know if Firebase supports such option yet.
At user's login save their FCM token
Group user's in your database
Run a foreach loop to send push notifications to the users that belong in one group.
I'm doing this in my own application and there is no much delay in Push notification delivery.
If you are using PHP as your server language you can use the curl_multi_init
This will send all the request at the same time. Hence the time required for your server to send all the Push notifications will be around 300ms.
On the other hand if you are not using PHP, there must be some similar ways you can achieve the same in your preferred language.
Keep in mind that there is no best implementation. It depends on the number of users using your app. It wouldn't be that wise to over-engineer this when you can do it really simple.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am completely new to the whole concept of push notifications. I have written a back-end server and I will send push notifications from it to the Android app, which is also written by me. But my question is:
Do I really need, or why would I need a Push notification service?
Thanks!
If you want to use FCM to send push notifications, at some point in time, someone has to make a request to Google's FCM service, because Google is the only one, who can send a message to a device via FCM. Same applies for APNS, at some point in time, someone has to make a request to Apple's APNS service
Depending on your requirements, you can do this yourself in your own code or you can use some 3rd party provider. Using a 3rd party provider MAY have benefits. For instance they may take care of token management, or provide a single request for sending to Android and iOS devices, and so on and so forth. But in the end of the day, also a 3rd party provider sends out requests to Google or Apple in your behalf.
You can use firebase cloud messaging service or using socket programming for this .
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am developing an Android application in which someone can register as user or as company. If someone registers as user, he will get a list of all the registered companies, from dropdown he can select any company and can send some information to it.
I want that whenever a user selects a company and click the button to submit information to the company, the selected company (has also installed my application and is signed into the app) get a notification.
I am using Firebase for storing user and company details and also to register them.
I don't want to use any third party sever.
Any help will be appreciable. Thanks!!
Did you try Firebase Cloud Messaging? FCM can send notifications to user/s from console and/or API.
Well you should look into push notifications a little more .
As you are using firebase it is advisable to use FCM.
https://firebase.google.com/docs/cloud-messaging/concept-options
This has all the information you will require
There are many good alternatives to FCM too.It won't hurt to look into them either
pushy:https://pushy.me
SNS:https://aws.amazon.com/sns
push Whoosh:http://androidbash.com/android-pushwoosh-integration/
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to develop an Android application which would consist in a forum. I figured I should use the datastore to persist the members. However I was wondering how to implement the sending of posts and private messages to clients?
To be more specific, if A wants to send a message to B, what is the best way to handle this? Must I use Google Cloud Messaging or put A's message to the datastore, and then wait for B to query it?
It depends, both solutions are correct.
If you need instant messaging you should choose Google Cloud Messaging to implement this. Device identifier should be stored in the database, when a new message arrives it should be pushed to the specified device using the identifier. You should use notifications on Android side to notify user about new message.
You can also implement this using pull strategy. Message will be saved in the database and queried once user opens your application or clicks refresh button.
The technologies you've used in tags are the correct tools to implement such "forum" thing. Please read the documentation for Google Cloud Endpoints and Google Cloud Messaging because you'll find useful code snippets or even sample applications which will guide you how to achieve what you want.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have got a client-server android app and i want to integrate a small
messaging tool where users can send messages to other users. It does not
need to be like a real time chat, it would be enough to act asynchronous
like email messaging for example.
I just need to know whats the 'best practice' for such a messaging service
for storing the messages. Is it smart to save all the messages and message
history in the database or should they be stored as files on the harddrive
on server side?
Is it enough to save them at the server and load them into the app everytime
the users opens the messaging activity or would it be better to synchronize
the messages? Or shouldnt i store the messages on the server at all and keep the
history on the device itself?
The answer is 'depends'. Do you expect a lot of messages? If so, synchronizing is probably better than downloading all the messages.
Do you want users to see messages on another device if they switch devices? If so, you have to store the messages on the server.
Also, do you want users to be notified of a message when they're not using the app? Or when another user sends them the message, and not when they start the app? That would require using push notifications.
So - depends.
The best practise would be mainly to use GCM for notifying devices about new messages, which requires a server anyway. Once you have a server, it's better to have database to be sure you won't lose any messages.