Share via


Cross-Platform Mobile Development Examples

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Several of the templates installed by Visual C++ for Cross-Platform Mobile Development generate complete examples that you can use to learn from. Additionally, the Windows Dev Center has several example applications that you can download and try out in Visual Studio.

  • hello-jni Android Application Sample

    This sample is a port of the Android NDK hello-jni application. The sample demonstrates an end-to-end Java Native Interface "Hello World" app. It loads a string from a native method implemented in a shared library, and then displays it in the app.

  • hello-gl2 Android Application Sample

    This sample is a port of the Android NDK hello-gl2 application. The sample demonstrates an end-to-end Java Native Interface Android OpenGL app. It renders a triangle using the OpenGL ES 2.0 shader APIs.

  • Bitmap Plasma Android Application Sample

    This sample is a port of the Android NDK Bitmap Plasma application. The sample demonstrates an end-to-end Java Native Interface Android OpenGL ES 2.0 application. It demonstrates direct manipulation of Android bitmap pixel buffers to generate a plasma effect.

  • TwoLibs Android Library Sample

    This sample is a port of the Android NDK TwoLibs sample. It uses both a dynamically loaded shared library, and a static C++ Android native library, that implements a method called from a Java Native Interface app. This sample is a good starting point for developers to understand how to use static/dynamic shared libraries to build an end-to-end JNI Android application with Visual Studio 2015.

  • Tea Pot Android Application Sample

    This sample is a port of the Android NDK TeaPot application. The sample demonstrates an end-to-end Java Native Interface Android OpenGL ES 2.0 application.

  • MoreTeaPots Android Application Sample

    This sample is a port of the Android NDK MoreTeaPots application. The sample demonstrates an end-to-end Java Native Interface Android OpenGL application.

  • test-libstdcpp Android Library Sample

    This sample is a port of the Android NDK test-libstdc++ sample, specifically for use with Visual Studio 2015. This sample is a good starting point for developers to understand how to use the Standard Library.

    To open one of the examples in Visual Studio, download the zip file and open the Properties page of the downloaded file in Explorer. Choose the Unblock button then choose OK. Extract the contents of the zip file to a convenient location, then open the C++ folder in the extracted sample and open the solution file.

    To build the sample, press F7, or on the menu bar, choose Build, Build Solution.