Android的删除短信发送 [英] Android Deleting Sent SMS
问题描述
INT rsRem = cntentRes.delete(Uri.parse(内容://短信/),地址= \\9xxxx9x9xx9x9 \\,NULL);
以上code线不工作
在rsRem行执行后接收0(零)...
我使用三星的核心二测试的应用程序有这个code
我使用以下权限
<使用许可权的android:NAME =android.permission.READ_SMS/>
<使用许可权的android:NAME =android.permission.RECEIVE_SMS/>
<使用许可权的android:NAME =android.permission.SEND_SMS/>
<使用许可权的android:NAME =android.permission.WRITE_SMS/>
<使用许可权的android:NAME =android.permission.INTERNET对/>
<使用许可权的android:NAME =android.permission.ACCESS_NETWORK_STATE/>
<使用许可权的android:NAME =android.permission.READ_EXTERNAL_STORAGE/>
<使用许可权的android:NAME =android.permission.WRITE_EXTERNAL_STORAGE/>
<使用许可权的android:NAME =android.permission.READ_USER_DICTIONARY/>
<使用许可权的android:NAME =android.permission.WRITE_USER_DICTIONARY/>
请考虑您不能与Android 4.4的设备上删除短信。
此外,目前该系统允许多个应用信息数据写入到供应商,虽然其他应用程序可以在任何时间阅读。
块引用>
块引用>http://developer.android.com/about/versions/kitkat.html
如果您尝试没有将引发异常;
源代码>> http://stackoverflow.com/a/19998937/519718
int rsRem = cntentRes.delete(Uri.parse("content://sms/"), "address=\"9xxxx9x9xx9x9\"", null);
Above line of code is not working In rsRem receiving 0 (zero) after line execution...
I am using Samsung core II to testing app having this code I am using following permissions
<uses-permission android:name="android.permission.READ_SMS"/> <uses-permission android:name="android.permission.RECEIVE_SMS"/> <uses-permission android:name="android.permission.SEND_SMS"/> <uses-permission android:name="android.permission.WRITE_SMS" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_USER_DICTIONARY"/> <uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
解决方案Please consider that you can't delete SMS messages on devices with Android 4.4.
Also, the system now allows only the default app to write message data to the provider, although other apps can read at any time.
http://developer.android.com/about/versions/kitkat.html
No exception will be thrown if you try;
Source >> http://stackoverflow.com/a/19998937/519718
这篇关于Android的删除短信发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!