I think the reason this example instructs you to set hasCode to false
is that the libnative-activity.so file is intended to be dropped into
another application as it can be called/started using an Intent just
like any other activity. The AndroidManifest.xml file really shouldn't
be part of the example however unless it was more concisely
documented. As far as I can tell setting hasCode to false on the
application tag in the Manifest essentially causes the APK to do
nothing at all, not sure what the point is but it is certainly
android:hasCode means that the .apk has no dalvik code; it is instructing the framework to not try to add the app's dalvik code to its class path when initializing its process (which would fail if there wasn't any dalvik code to load). The example is using this simply to illustrate that if you are using NativeActivity, you don't need to have any dalvik code in your apk at all, since NativeActivity is implemented in the framework. In practice most applications will not do this, because they will often want to have a subclass of NativeActivity with some customization or other activities or services or such.
Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.