I have an NDK Android app based on NativeActivity Android sample, and I need to change slightly a behavior of NativeActivity
. I cannot do it by subclassing (inheriting), because the thing that I want to change is not exposed.
Therefore, my idea was to take source code of NativeActivity.java, re-work it a bit and then rename it as say MyNativeActivity.java and use it in manifest instead of NativeActivity
.
So I took source code for from Android\sdk\sources\android-25\android\app\NativeActivity.java, renamed it as MyNativeActivity.java and inserted into my project. But when I tried to compile it, I got errors:
Error:(179, 41) error: cannot find symbol method getLdLibraryPath()
Error:(200, 70) error: cannot find symbol method getNativePtr()
Error:(295, 59) error: cannot find symbol method getNativePtr()
Error:(301, 61) error: cannot find symbol method getNativePtr()
And I cannot find these getLdLibraryPath()
and getNativePtr()
in the source code folder (Android\sdk\sources\android-25)
My question is if it's possible to use Android source code in my project, and how to deal with problems like this?