I'm trying to compile Python code directly on my Android phone via QPython 3L and it's fine for some initial examples. Now I want to read the call log and here is my code.
from androidhelper import sl4a
droid = sl4a.Android()
myconst = droid.getConstants("android.provider.CallLog$Calls").result
print(myconst['CONTENT_URI'])
calls=droid.queryContent(myconst['CONTENT_URI'],["number","duration","date","type"]).result
At the last line above it throws a NullPointerException
and - after many trials&errors and searches on Google - I'm pretty sure that the root cause is a lack of authorization.
Can you confirm if this is the case (or you spot a bug, contrary to what I believe) and please point me to some documentation, for adding the authorization request, if that is appropriate to my specific code context?