简体   繁体   English

如何在不检查Android应用程序的情况下了解数据库更改

[英]how to be aware of database changes without checking from android application

I'm Trying to Start an android chat room application , i can check server each 10Sec for new messages , but this is not right as you know. 我正在尝试启动一个Android聊天室应用程序,我可以检查服务器每个10Sec的新消息,但这是不对的,因为你知道。 For example when you receive an email , Automatically a Notification message Display How Can I Do This ?! 例如,当您收到电子邮件时,自动通知消息显示我该怎么做?

this is called Push Notification where you got notified from the server 这称为推送通知,您从服务器收到通知

the most common way to do this is using Google Cloud Messaging GCM 最常见的方法是使用Google Cloud Messaging GCM

http://developer.android.com/google/gcm/index.html http://developer.android.com/google/gcm/index.html

google it for some tutorials, 谷歌它的一些教程,

If you can, you should absolutely stick with GCM because it makes all the applications use the same connection which is battery and user friendly. 如果可以,您应该坚持使用GCM,因为它使所有应用程序使用相同的连接,这是电池和用户友好的。

Alternative is writing your own persistent tcp connection api or you can use MQTT. 另一种方法是编写自己的持久性tcp连接api,或者可以使用MQTT。 You can find a tutorial about it here How to Implement Push Notifications for Android 您可以在此处找到有关它的教程如何为Android实施推送通知

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在android中升级应用程序版本时如何管理数据库更改? - How to manage database changes while upgrading application versions in android? Android位置感知聊天应用程序 - Android location aware chat application 如何在不更改代码而仅更改数据库的情况下在应用程序中执行功能更改? - How to carry out a functionality change in the application without code changes and only database changes? 在Spring Boot应用程序中如何将数据库架构更改从源数据库同步到目标数据库 - How to sync database schema changes from source database to destination database in a spring boot application 位置感知Android,比较Java或数据库中的距离? - location aware Android, comparing distance in java or database? 如何在未安装电子邮件应用程序的情况下从android应用程序发送电子邮件 - How to send Email from android application without installed an email application 如何在多租户(每租户数据库)感知 Spring 引导应用程序中使用固定数据库 - How do you use a fixed database in a multi-tenant (database-per-tenant) aware Spring Boot application 如何回滚 Firebase 实时数据库中的更改 - Android - How to Rollback Changes in Firebase Realitime Database - Android 如何从Firebase数据库到Android地图应用程序检索纬度和经度 - How to retrieve latitude and longitude from firebase database to android map application 如何在不刷新 android 应用程序的情况下从数据库中获取数据? - How to get data from database without refreshing the android app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM