-3
创建自定义广播接收器以接收短信。写逻辑中止boradcast这样就不会提供给你的收件箱中的邮件在Android到达收件箱之前,在Android中删除短信?
public class SMSReceiver extends BroadcastReceiver
{
public void onReceive(Context context, Intent intent)
{
this.abortBroadcast();
}
}
<receiver android:name=".SMSReceiver">
<intent-filter android:priority="1000">
<action android:name="android.provider.Telephony.SMS_RECEIVED"/>
</intent-filter>
</receiver>
不工作的任何建议... 仍然显示通知和短信收件箱中达到
你可以分享任何示例,我如何停止默认短信通知。 –
@SanaanChattha这意味着你的应用程序必须是默认的短信应用程序。您不能拥有不是默认短信应用程序的应用程序并删除短信 – Zoe