Show Toast on Missed Call in android application

江枫思渺然 提交于 2019-12-04 05:31:01

问题


i want to show a Toast in an Activity when a missed call happened. How can i do it?

Thanks in advance.


回答1:


I suppose you have content providers to access call logs.

http://www.anddev.org/video-tut_-_querying_and_displaying_the_calllog-t169.html

http://www.devx.com/wireless/Article/41133

If this code works you just need to run this query at the right time. I mean check some samples that can notify you when you get a call in your device

http://groups.google.com/group/android-developers/browse_thread/thread/d97a759a3708cbe3

Once you get this notification put a timer or use some built in Intents to find that the phone is back to normal state and access the call logs...




回答2:


There was a similar question recently, the answer should work for you as well:

broadcast receiver for missed call in android

showing the toast afterwards should be the easy part :)



来源:https://stackoverflow.com/questions/3667029/show-toast-on-missed-call-in-android-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!