如何检测android中是否启动了任何本机应用程序
我正在尝试开发一个 Android 应用程序,仅当我们在拨号器上拨打某个特定号码时才会启动该应用程序。
过程如下:
1) 默认情况下该应用程序保持不可见(名称和图标)
2) 当用户拨打该特定号码时,应用程序启动
基本上该应用程序是相关的为了安全。
对于上述两个问题中的任何一个的任何想法或帮助将受到高度赞赏。
谢谢。
I am trying to develop an android app which launches only when we dial some specific number on dialer.
Here is the process:
1) The app remains invisible by default (Both name and icon)
2) When the user dials that specific number the app launches
Basically the app is related to security.
Any idea or help on any of the above two issue will be highly appreciated.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要注册并实现一个BroadcastReceiver来获取去电的Intent。
拦截意图并进行处理。您可能需要 PROCESS_OUTGOING_CALLS 权限。
http://developer.android.com/reference/android/Manifest.permission .html#PROCESS_OUTGOING_CALLS
http://developer.android.com/guide/topics/security/security.html
http://developer.android.com/guide/topics/intents/intents-filters.html
http://developer.android.com/reference/android/content/BroadcastReceiver.html
You need to register and implement a BroadcastReceiver to get the Intent of a outgoing call.
to intercept the intent an do your processing. You might need the PROCESS_OUTGOING_CALLS permission.
http://developer.android.com/reference/android/Manifest.permission.html#PROCESS_OUTGOING_CALLS
http://developer.android.com/guide/topics/security/security.html
http://developer.android.com/guide/topics/intents/intents-filters.html
http://developer.android.com/reference/android/content/BroadcastReceiver.html