Android. Launch app from Dialer

后端 未结 4 859
借酒劲吻你
借酒劲吻你 2020-12-16 04:32

This is what I have so far but nothing happens when I input this combination in dialer

public class DialReceiver extends BroadcastReceiver
{
    @Override
           


        
4条回答
  •  悲哀的现实
    2020-12-16 05:15

    According to ridoy's 2nd link,

    http://tikuflower.blogspot.com/2011/12/android.html

    It should be

    String phoneNumber = intent.getStringExtra("android.intent.extra.PHONE_NUMBER");
    

    rather than

    String phoneNumber = intent.getExtras.getString("Intent.EXTRA_PHONE_NUMBER");
    

    That change works for me at least...

提交回复
热议问题