Im trying to get incomingcall number with qpython on android 4.4.3
Already try this:
import androidhelper
w=1
while (w == 1):
droid = androidhelper.Android()
droid.startTrackingPhoneState()
phonest = droid.readPhoneState()
number = phonest[2] # If i try to use ['incomingNumber'] not work
if number != None:
droid.makeToast('Call from '+number)
I Always get NullPointer Exception
I read this: python function call syntax ... result = foo() ['abc'] But is not working at all because: This is not working:
import android
droid = android.Android()
And when i try this:
outerDict = droid.readPhoneState()
innerDict = outerDict['result']
number = innerDict['incomingNumber']
Error because need to be integer or something like that.