开发者

Android: Firing an activity on a call only for international phone numbers

I want to launch an activity only when a user calls specific number (e.g. phone number of a specific country)

From what i read, i understand i can create an intent-filter for android.intent.action.CALL, but i wonder if i can invoke the application just for certain numbers (just for number开发者_运维知识库s that belongs to that country, for example). Ideally i will like the user to be able to define this filter himself. so it will not be hard coded in the manifest file.

Is this possible?


Take a look here You'll need to get the phone number once you receive an incoming call event. However, please note that unless you override the incoming call intent (which means you need yo write your own calling app) your new activity will stay in the background until the phone call app is closed (i.e, until the user reject or end the call).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜