Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 如何检测 Android 中的文件或文件夹更改?
嗨,我的服务器上有一个文本文件,内容包含消息 ID 的消息。现在,当在文本文件中添加消息以显示消息时,我想在我的 android 应用程序中创建一个通知。任何人都可以分享一些示例代码。
要显示通知不是问题,您可以简单地使用Toast或Dialog。
棘手的部分是检查文件是否有更新。你已经有这方面的东西了吗?