Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

18.5. Native Activities

Android 2.3 (API level 9) and Android NDK revision 5 let you write entire activities and applications as native source by using the NativeActivity class to access the Android application life cycle.

To utilize this method, the android.app.NativeActivity needs to be referenced in the Android manifest file. Note that the application reference has a hasCode attribute. This attribute should be set to false if there is no Java in the application (only the NativeActivity). In this case, however, since we do have Java code, we set the value to true:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial