Broadcast Receiver (10)



BroadcastReceiver အသံုးျပဳ ျခင္း (10)
===============
SMS delete လုပ္ျခင္း
===============
တခါတရံ SMS ပို႔ၿပီး အလုပ္ေတြ လုပ္ၿပီးတာနဲ႔ အဲဒီ SMS ကို အစေဖ်ာက္ delete
လုပ္ခ်င္ရင္ onReceive method ရဲ့ ေအာက္ဆံုးမွာ ဒီလို ေရးပါ။
============
Uri uriSms = Uri.parse("content://sms/inbox");
Cursor c = context.getContentResolver().query(uriSms, null, null, null,
null);
//int id = c.getInt(0);
int thread_id = c.getInt(1);
context
.getContentResolver().delete(Uri.parse("content://sms/conversations/" +
thread_id), null, null);
============


AIDE Android Lessons And Project Group
ဆရာ Nyi Nyi Lwin Post မွ ကူးယူတင္ထားပါသည္

#Credit ဆရာ Nyi Nyi Lwin


Comments

Popular posts from this blog

♡ မဂၤလာခြန္းဆက္ ♡

《《 ဝမ္းနည္းပါေၾကာင္း 》》