Joke Collection Website - Public benefit messages - How to delete SMS in Android development
How to delete SMS in Android development
2.set uri:uri uri = uri . parse(" content://SMS ")。
3. Execute the deletion method: contentresolver.delete (uri, null, null);
It seems that you don't want to delete them all. Do you want to delete one?
Your two methods:
MRE solver . delete(uri . parse(" content://SMS/" " _ id = "+id,null));
MRE solver . delete(uri . parse(" content://SMS/" " thread _ id = "+threadId,null));
The first parameter uri, the second parameter: condition, and the third parameter: the value of condition:
MRE solver . delete(uri . parse(" content://SMS/" " _ id =?" , the new string [] {"XXX"});
MRE solver . delete(uri . parse(" content://SMS/"," thread_id=?" ,new String[]{ " XXX " }));
Do you need to use it here? : Placeholder.
Be familiar with the parameters of sql statements and methods.
- Previous article:What is the prospect of network security?
- Next article:Is the twelfth lunar month of the Year of the Tiger an auspicious day?
- Related articles
- Can the Mianyang property management community be decorated? (Can the property management manage the decoration?)
- How about Shenzhen Mi Dan Technology Co., Ltd.
- Will Jinan epidemic prevention and control headquarters send text messages to individuals?
- Will Taobao goods receiving SMS be displayed?
- How to calculate the fixed number of years of rural endowment insurance and how to inquire about the fixed number of years of payment?
- Is it true that China Telecom SMS 10 and 1 are mixed?
- I am a disabled employee. I was hospitalized once because of illness. Representatives of the company's trade union committee visited the hospital and provided help funds. How to write a thank-you lett
- Will Jilin still be the national nucleic acid tomorrow?
- Tenpay can't receive SMS after downtime.
- Every time I send a text message to a girl, I am so nervous when I reply. It's the same as watching a horror movie. How can I overcome this kind of psychology?