How to replace NativeActivity with my own version?

109 views
Skip to first unread message

jonlgre...@gmail.com

unread,
Apr 3, 2024, 12:15:14 PMApr 3
to android-ndk
I want to replace the android.app.NativeActivity with my own version. My main reason for doing this is that I want to implement my own content view, rather than the private NativeContentView used in the NativeActivity class. This will allow me to have more control over the soft input method keyboard. I also note that NativeActivity extends Activity, and the androidx ActivityCompat is better for some things.

I can just create my own java Activity subclass, but NativeActivity calls some private native functions, such as loadNativeLibrary. I would need to call the same functions, but if declared them in my own java class they will have different extended names including my own package name components, instead of android_app.

Is there any way to do this?
Reply all
Reply to author
Forward
0 new messages