androidpython-2.7android-6.0-marshmallowsl4aqpython

I'm writing a SL4A script in QPython to mark unread SMS of inbox as read. and this is not working in Marshmallow


I want to write an SL4A script to mark Unread SMS of inbox as Read. I want to run this script in QPython android application.

​import androidhelper as android
droid = android.Android()
ids = droid.smsGetMessageIds(True).result
print type(ids)
print ids
number = droid.smsMarkMessageRead(ids, True).result
print number

Code This is same as above.

Output


Solution

  • Google maybe has disabled general application being granted WRITE_SMS permission in newer android system (maybe >= M) , so the smsMarkMessageRead may not work.

    I answered on https://www.facebook.com/groups/qpython/permalink/1410128472397009/

    Just read the post's comments.