how to run application in background in android?

前端 未结 2 1842
没有蜡笔的小新
没有蜡笔的小新 2020-12-15 00:41

Hi, I want to make an Android application that continues to run in background and when user accesses any folder, picture, or any other file it notifies using toasts that he

相关标签:
2条回答
  • 2020-12-15 00:59

    Use FileObserver to detect file access or change.

    0 讨论(0)
  • 2020-12-15 01:17

    The other people answering your question are focused on the "background" part, and a Service would indeed accomplish this. Users have fairly loudly stated that they despise constantly-running services like the one you are proposing.

    when user access any folder or picture or any file it notify using tosts that he acess this file(filename).

    For files that you can access yourself (e.g., those on external storage), you can use FileObserver class.

    0 讨论(0)
提交回复
热议问题