I may be missing something obvious, but I am still a novice and trying to figure out how values are reflected between Java and b4a. I had a need for an intent with a return, so I copied this code (almost) except I substituted ACCOUNT_PICKER instead of RINGTONE_PICKER.
My first attempt to read the return value failed, using the code:
Code:
account = jo.RunMethod("getStringExtra", Array As Object("android.accounts.AccountManager.KEY_ACCOUNT_NAME"))
The result came back null. Strange, as eventually I figured out how to stop in the debugger and analyze the variables which clearly showed the data in jo.mExtras.mMap.mArray
I then changed the code to:
Code:
account = jo.RunMethod("getStringExtra", Array As Object("authAccount"))
And everything worked.
I am very puzzled why this is, since android.accounts.AccountManager.KEY_ACCOUNT_NAME is defined with constant value "authAccount". Is this because:
A) There is something wrong with my code
B) Because of a bug in b4a
C) Because there is a library missing and b4a can't evaluate the variable
D) Something else that I am not considering
If someone can answer this and explain to me what I should have done to save myself several hours of struggling it would be helpful for my education.
If the answer is C, how can I know which android.* libraries are included by default and which ones are not? There certainly were not any warning messages displayed.
Thank you for any assistance.