.. | ||
android.app.cpp | ||
android.app.h | ||
android.app.impl.h | ||
android.content.cpp | ||
android.content.h | ||
android.content.impl.h | ||
android.content.pm.cpp | ||
android.content.pm.h | ||
android.content.pm.impl.h | ||
android.database.cpp | ||
android.database.h | ||
android.database.impl.h | ||
android.graphics.cpp | ||
android.graphics.h | ||
android.graphics.impl.h | ||
android.net.cpp | ||
android.net.h | ||
android.net.impl.h | ||
android.os.cpp | ||
android.os.h | ||
android.os.impl.h | ||
android.provider.cpp | ||
android.provider.h | ||
android.provider.impl.h | ||
android.service.vr.cpp | ||
android.service.vr.h | ||
android.service.vr.impl.h | ||
android.util.cpp | ||
android.util.h | ||
android.util.impl.h | ||
android.view.cpp | ||
android.view.h | ||
android.view.impl.h | ||
android.widget.cpp | ||
android.widget.h | ||
android.widget.impl.h | ||
dalvik.system.cpp | ||
dalvik.system.h | ||
dalvik.system.impl.h | ||
java.lang.cpp | ||
java.lang.h | ||
java.lang.impl.h | ||
java.util.cpp | ||
java.util.h | ||
java.util.impl.h | ||
ObjectWrapperBase.h | ||
README.md |
About these JNI Wrappers
These are fairly simple wrappers around Java classes, using JNI and JNIPP to allow relatively-painless use of Java classes from C++. They are populated as-needed: if you need a method/property that's missing, add it!
Conventions
All classes derive from ObjectWrapperBase or one of its subclasses. (Yes, you can directly mirror inheritance in Java with inheritance in these wrappers.)
All should have a public internal struct called Meta
that derives publicly
from either MetaBase
or MetaBaseDroppable
(the more common option, when you
don't often need the class object itself), with a member for each method ID.
Only the Meta()
constructor should be in the .cpp
file for a given wrapper:
the rest lives in the header so it may be inlined and thus optimized away.
Finding signatures
A command like the following can help you get the JNI signatures of methods:
javap -s -classpath ~/Android/Sdk/platforms/android-26/android.jar android.service.vr.VrListenerService
Adjust the location of the SDK and the class under investigation as needed.