0
J'ai un code pour supprimer les messages SMS dans la boîte d'envoi avec Android, mais pourquoi les messages SMS ne sont pas supprimés ..SMS pas supprimé
delete.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Dialogs.showConfirmation(LookSms.this,"Are you sure?",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int which) {
Intent i = getIntent();
String id_delete_sms = i.getStringExtra("protocol");
String id_delete_thread = i.getStringExtra("address");
// hapus pesan
Uri deleteUri = Uri.parse("content://sms");
getContentResolver().delete(deleteUri,"thread_id=? and protocol=?",
new String[] {String.valueOf(id_delete_thread),String.valueOf(id_delete_sms) });
finish();
Toast.makeText(LookSms.this,"SMS deleted", Toast.LENGTH_SHORT).show();
}
});