I have an application using NativeActivity. I want to call in Java to do something that requires context (for example, calling TelephonyManager to request an IMEI).
How to get a valid context for my activity?
The ANativeActivity structure contains a lot of useful data for my application, such as JavaVM and JNI, etc. It also contains a job file pointing to my NativeActivity class object. What it does not contain is a work object that points to an instance of NativeActivity. I do not see anything useful in struct android_app.
It should be possible; any ideas how?
source
share