gpt4 book ai didi

android - 从 Android 应用程序检测/监听 MySQL 数据库更改的最简单方法?

转载 作者:可可西里 更新时间:2023-11-01 08:36:26 24 4
gpt4 key购买 nike

我的问题已在标题中说明。

更具体些?在我的 MySQL 数据库中,我有一个表“事件”,每次添加/删除事件时,我都想更新我的 Android 应用程序 map 上的点。

如果可能的话,教程或代码示例也会非常有用,因为我仍然是 Android 的新手,正在探索 Android。

感谢。

最佳答案

您可以使用 C2DM 通知您的 Android 应用程序服务器上的数据库更改:

https://developers.google.com/android/c2dm/

更新

Important: C2DM was officially deprecated on June 26, 2012, and has been shut down completely as of October 20, 2015. Existing C2DM developers are encouraged to migrate to Google Cloud Messaging (GCM). See the C2DM-to-GCM Migration document for more information. Developers must use GCM for new development.

现在 C2DM 已弃用,因此您需要使用 Firebase 或 GCM(也已弃用)

FCM link

Firebase Cloud Messaging (FCM) is the new version of GCM. It inherits the reliable and scalable GCM infrastructure, plus new features! See the FAQ to learn more. If you are integrating messaging in a new app, start with FCM. GCM users are strongly recommended to upgrade to FCM, in order to benefit from new FCM features today and in the future.

GCM link

关于android - 从 Android 应用程序检测/监听 MySQL 数据库更改的最简单方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10470284/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com