Skip to content

Latest commit

 

History

History
156 lines (92 loc) · 5.88 KB

android.md

File metadata and controls

156 lines (92 loc) · 5.88 KB

Android Java and Native Applications

Downloads

Example Source

Forums

Forge TV on Razer Forums

Guide

###Tegra Toolkit###

The Tegra Toolkit is a large toolset which includes the following:

Visual Studio Templates - Adds compiling and debugging Android Java and Android Native Applications

Android NDK - Development kit for compiling "C" native applications

Android SDK - Software development kid for compiling Android applications

NVidia NDK modules - for hardware accelerated development

Eclipse - A common IDE for integrated Java development

NVidia Samples - A large set of hardware accelerated examples in Java and Native Applications

Examples

Examples are included at the base GIT path.

External Storage

  • Note: In the game details, be sure to move to external storage so the app can access the external storage drive.

External Storage - Using external storage example as a Java Activity. https://github.com/ouya/ouya-sdk-examples/tree/master/Android/ExternalStorageExample

External Storage Native - Using external storage example as a C++ Native Activity. External storage is accessed via JNI calls. https://github.com/ouya/ouya-sdk-examples/tree/master/Android/ExternalStorageExampleNative

General

Native In-App-Purchases - https://github.com/ouya/ouya-sdk-examples/tree/master/Android/InAppPurchasesNative

Multiple Activities - Switch between Java activities within the same application - https://github.com/ouya/ouya-sdk-examples/tree/master/Android/MultipleActivities

Multiple Activities Native - Switch between Java activities and a native activity in the same application - https://github.com/ouya/ouya-sdk-examples/tree/master/Android/MultipleActivitiesNative

Multiple Activities WebView - Switch between Java activities with a browser in the same application - https://github.com/ouya/ouya-sdk-examples/tree/master/Android/MultipleActivitiesWebView

Set Resolutions - Switch between view size resolutions - https://github.com/ouya/ouya-sdk-examples/tree/master/Android/SetResolutions

Sound Mixer - Detect volume changes - https://github.com/ouya/ouya-sdk-examples/tree/master/Android/SoundMixer

Safe Area - Adjust the safe area with a slider - https://github.com/ouya/ouya-sdk-examples/tree/master/Android/SafeAreaExample

Resources

Android NDK - http://developer.android.com/tools/sdk/ndk/index.html

Android SDK - http://developer.android.com/sdk/index.html

Java JDK 7 - http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Java JDK 6 - http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html

NVIDIA Nsight Visual Studio Edition - https://developer.nvidia.com/nvidia-nsight-visual-studio-edition

Tegra Developer Pack - https://developer.nvidia.com/tegra-resources

*Be sure to register to get access to the Tegra Developer Pack downloads.
Tegra Registered Developer Program - https://developer.nvidia.com/registered-developer-programs

Note:

There is also an issue with nSight and the default install of the NVIDIA Toolkit, which can be fixed by the following two options. This fixes a compile error for ANT related to Java/NDK projects.

First/easiest option to try:
     1. Edit NVPACK\android-sdk-windows\build-tools\<each version>\dx.bat
     2. Change "set defaultMx=-Xmx1024M" to "set defaultMx=-Xmx512M"
     3. Save and exit
     4. Restart Visual Studio
     5. Rebuild
Second option:
      1. Run NVPACK\android-sdk-windows\SDKManager.exe
      2. Click "deselect all"
      3. If Tools : "Android SDK Build Tools Rev 19.0.1" is installed, check it for deletion
      4. If Tools : "Android SDK Build Tools Rev 19" is installed, check it for deletion
      5. Click "delete packages"
      6. Click Tools : "Android SDK Build Tools Rev 18.1.1"
      7. Click "Install packages"
      8. Follow the steps to take the license and install the package

Android:Drawables - A list of the built-in Android drawables - http://androiddrawableexplorer.appspot.com/

VS-Android - http://code.google.com/p/vs-android/

PVRTexTool - http://community.imgtec.com/developers/powervr/tools/pvrtextool/ - A utility for compressing textures to reduce the texture memory footprint for games.

Docs

FAQ: Why didn't FindClass find my class? - http://developer.android.com/training/articles/perf-jni.html#faq_FindClass

JNI Local Reference Changes in ICS - http://android-developers.blogspot.com/2011/11/jni-local-reference-changes-in-ics.html

Java Programming Tutorial Java Native Interface (JNI) - http://www3.ntu.edu.sg/home/ehchua/programming/java/JavaNativeInterface.html

Visual Studio Project Properties - http://docs.nvidia.com/tegra/index.html#Nsight_Tegra_Projects.html%3FTocPath%3DTegra%20Android%20Documentation%7CHow%20to%20Develop%20Tegra%20Android%20NDK%20Applications%20Using...%7CNsight%20Tegra%2C%20Visual%20Studio%20Edition%7C_____2

Including JARS

Within the Visual Studio project settings you'll find Configuration Properties->Ant Build->Additional Dependencies.

Here you can add:

JAR Directories: libs

and

JAR Dependencies: ouya-sdk.jar

Environment Variables:

####Windows

SdkRootPath=C:\NVPACK\android-sdk-windows

NdkRootPath=C:\NVPACK\android-ndk-r8e

JdkRootPath=C:\NVPACK\jdk1.6.0_24

AntRootPath=C:\NVPACK\apache-ant-1.8.2

NVSamplesPath=C:\NVPACK\TDK_Samples\tegra_android_native_samples_v10p12

####NVidia Samples

The NVidia samples have an additional include directory.

$(NVSamplesPath)/libs/jni

The NVidia samples have an additional library directory.

$(NVSamplesPath)/libs/jni/nv_obj/$(Configuration)