

This Native Activity app project is compiled into a shared library.

The implementation of the entry points from the glue code are in main.cpp.

MyAndroidApp.NativeActivity contains the references and glue code for your app to run as a Native Activity on Android. The new Android Native Activity app solution includes two projects: Visual Studio creates the new solution and opens Solution Explorer. In the Configure your new project dialog box, enter a name like MyAndroidApp in Project name, and then choose Create. In the Create a new project dialog box, select the Native-Activity Application (Android) template, and then choose Next. In Visual Studio, choose File > New > Project. In this tutorial, you'll first create a new Android Native Activity project and then build and run the default app in an Android emulator. Make sure that the required third-party tools and SDKs are included in the installation, and that an Android emulator is installed. For more information, see Install cross-platform mobile development with C++. Requirementsīefore you can create an Android Native Activity app, you must make sure you've met all system requirements, and installed the Mobile development with C++ workload in Visual Studio. Additional topics walk through the developer lifecycle of editing, building, debugging and deploying Native Activity code. This topic will guide you through creation of a simple Native Activity app that uses OpenGL. Native Activity code is popular for creating gaming and graphic intensive apps that use Unreal Engine or OpenGL. The Android NDK introduced the ability to create Native Activity apps with Android API Level 9. Some Java JNI code acts as glue to allow your C/C++ code to interact with Android. The Android Native Development Kit (NDK) is a toolset that allows you to implement the majority of your Android app using pure C/C++ code. When you install the cross-platform Mobile development with C++ workload, Visual Studio can be used to create fully functional Android Native Activity apps.
