Any Android phone without an SMS content provider?

I am writing an application that should read user text messages for its basic operation. Google says the SMS content provider is not supported and may not be available on some phones or may not work in future versions of Android. I would like to know if anyone knows about any particular phones without an SMS content provider? I know the question has already been asked -

Is there any phone on which there is no content provider for incoming sms? but no one provided an answer. Alternatively, if someone can suggest a way to read incoming and outgoing messages using the standard API, this would be even better.

+3
source share
2 answers

I could not find the phone without an SMS content provider (at least from Google searches). I don’t think that manufacturers risk compromising compatibility with numerous SMS applications (which all use this private API). In addition, at the moment, there seems to be no standard way to access incoming and outgoing messages.

Update: it was an open API with 4.4 - https://developer.android.com/reference/android/provider/Telephony.html

+3
source
Uri mSmsinboxQueryUri = Uri.parse("content://sms");
Cursor cursor1 = getContentResolver().query(
        mSmsinboxQueryUri,
        new String[] { "_id", "thread_id", "address", "person", "date",
                "body", "type" }, null, null, null);
startManagingCursor(cursor1);
String[] columns = new String[] { "address", "person", "date", "body",
        "type" };
if (cursor1.getCount() > 0) {
    String count = Integer.toString(cursor1.getCount());
    Log.e("Count",count);
    while (cursor1.moveToNext()) {
        out.write("<message>");
        String address = cursor1.getString(cursor1
                .getColumnIndex(columns[0]));
        String name = cursor1.getString(cursor1
                .getColumnIndex(columns[1]));
        String date = cursor1.getString(cursor1
                .getColumnIndex(columns[2]));
        String msg = cursor1.getString(cursor1
                .getColumnIndex(columns[3]));
        String type = cursor1.getString(cursor1
                .getColumnIndex(columns[4]));
}
}

and

Uri mSmsinboxQueryUri = Uri.parse("content://sms/inbox");
Uri mSmsinboxQueryUri = Uri.parse("content://sms/sent");

Use this uri u to read incoming as well as sent items.

And user permission in the manifest file

<uses-permission android:name="android.permission.READ_SMS" />
+2
source

All Articles