Redmi Phones Not Asking Sms Permissions And Hence Not Reading Sms
Following is my code:
Solution 1:
After Long Time of trying, Got MI SMS permission(Through SMS Provider). Add this Method (content provider method) with your activity or fragment. you will able to get permission.
privatevoiddisplaySmsLog() {
UriallMessages= Uri.parse("content://sms/");
//Cursor cursor = managedQuery(allMessages, null, null, null, null); Both are sameCursorcursor=this.getContentResolver().query(allMessages, null,
null, null, null);
while (cursor.moveToNext()) {
for (inti=0; i < cursor.getColumnCount(); i++) {
Log.d(cursor.getColumnName(i) + "", cursor.getString(i) + "");
}
Log.d("One row finished",
"**************************************************");
}
}
Give it try , It worked for me.
Post a Comment for "Redmi Phones Not Asking Sms Permissions And Hence Not Reading Sms"