Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.net.Uri; import android.util.Log; public class Main { public static String LOG_TAG = "SmsNoMore"; public static boolean deleteSms(Context context, String msgId) { LOGI("deleteSms " + msgId); try { context.getContentResolver().delete(Uri.parse("content://sms/" + msgId), null, null); return true; } catch (Exception e) { LOGE("deleteSms: " + e.getMessage()); e.printStackTrace(); return false; } } public static void LOGI(final String text) { Log.i(LOG_TAG, text); } public static void LOGE(final String text) { Log.e(LOG_TAG, text); } }