How to prevent SMS going to inbox in Android?

前端 未结 5 1010
长发绾君心
长发绾君心 2020-12-23 12:58

I\'m developing a business SMS application. In this app, if an incoming message is from a particular number, say 999999999, it should go to the application\'s inbox and not

5条回答
  •  感动是毒
    2020-12-23 13:16

    Yes it can be DOne

    public void onReceive(Context context, Intent intent)
    {
        Bundle bundle=intent.getExtras();
        Object[] messages=(Object[])bundle.get("pdus");
        SmsMessage[] sms=new SmsMessage[messages.length];
    
        Toast.makeText(context, "Hello", 1).show();
    
        for(int n=0;n

    just use abortbroadcast() after receiving in app

提交回复
热议问题