开发者

stop android emulator call

I am working on an Android application, having functionality like voicemail.

I am using BroadcastReceiver to get dialing events. I have to get the event "WHEN CALL IS UNANSWERED (not picked after few rings) FROM RECEIVER". I will do some actions on caller end against this event.

I am using AVD emulator, and

I do call from one instance to another instance and it calls perfectly, but the problem is: It continuously calls until I reject or accept the call. This way I cannot detect that "CALL IS 开发者_如何学GoUNANSWERED AFTER A NUMBER OF RINGS".

So I want the Caller emulator to drop the call after a number of rings (if unanswered) like a normal phone.

I can do it (drop the call after some time) by writing some code, but I need the natural functionality of phone in the emulator.

Can anyone please guide me? Is there any settings in the emulator? Or something else?

The code is shown below in case it helps:

public class MyPhoneReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) 
    {
        Bundle extras = intent.getExtras();
        if (extras != null) 
        {
            String state = "my call state = " + extras.getString(TelephonyManager.EXTRA_STATE);
            Log.w("DEBUG", state);
        }

    }


Hi i think this is impossible with reference to the link:

http://android.bigresource.com/Track/android-sr1t1eagx/

Regards

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜