简体   繁体   中英

What should I be using for user chat/notifications in my Android app?

Our app will have a mailbox so that users will be able to message each other. A few minutes of research led me to Google Cloud Messaging with appears to be efficient while also making sense since its just another component to enable in our Google Developer Console. We do want push notifications and GCM does that.

I found a good sample and was ready to start working until I started to see troublesome blogs and forum posts about GCM having major problems. This Link is one of the more popular search results when searching for "GCM problems" I noticed that many people recommend alternative solutions that do not have some of the issues that are noted in these forum posts.

Any recommendations for what I should be using to set up a simple chat application for my android app? I would like for it to be a simple as possible while still having low battery usage.

There are a few issues with GCM when it comes to performance but there are lot of advantages that cannot be undermined. Here are some:

  • Free of cost.
  • Supported on all Android Devices and now on iOS too.
  • Sync perfectly with all the Google Services, There is a huge user base that has Google accounts and hence it is easy to update messages for the same user on different devices using instance Id .
  • Have mechanism to support Upstream and Downstream messaging.
  • Well documented API's and free open source code makes development easier.
  • Supports Multicast, Cannonical ID, DRY_RUN for testing and other helpful features.

Take a look at this simple chat app tutorial created using GCM API's.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM