I'm developing an application , and want to check every SMS messages content for a specific text , and do some actions the delete the SMS , and not let user notify if the message contained that text , else I will recreate a notification and notify user ,
I am using BroadcatReceiver
, and I can read the message the moment it arrives , but cant stop the notification in notification bar , I've searched but couldn't get satisfactory answer, any help would be appreciated
that is my bradcasrReceiver
class
package com.example.helloworld;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;
public class MyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(context, "Intent Detected.", Toast.LENGTH_LONG).show();
}
}