# Android Java Libraries in UE4 Game (OUYA SDK, Google Play Game Services, etc.)

**URL:** <https://forums.unrealengine.com/t/android-java-libraries-in-ue4-game-ouya-sdk-google-play-game-services-etc/3146>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [April 23, 2014, 9:43pm UTC](https://forums.unrealengine.com/t/android-java-libraries-in-ue4-game-ouya-sdk-google-play-game-services-etc/3146 "2014-04-23T21:43:20Z")\
**Posts on this page:** 1\
**Showing post:** 38

<div class="post-metadata">

**Author:** ![tgraupmann](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tgraupmann](https://forums.unrealengine.com/u/tgraupmann)\
**Post date:** [April 26, 2016, 7:19pm UTC](https://forums.unrealengine.com/t/android-java-libraries-in-ue4-game-ouya-sdk-google-play-game-services-etc/3146/38 "2016-04-26T19:19:24Z")

</div>

I merged both PRs into a new branch while I wait for approval.  
The new branch - [https://github.com/tgraupmann/UnrealEngine/tree/4.11-Cortex](https://github.com/tgraupmann/UnrealEngine/tree/4.11-Cortex)

Now I’ll focus on rewriting the OUYA/Cortex plugin as a UE4 plugin instead of embedding the plugin into the UE4 engine source.  
The old way - [https://github.com/tgraupmann/UnrealEngine/tree/4.10-Cortex](https://github.com/tgraupmann/UnrealEngine/tree/4.10-Cortex)

I’ve created an Example Project that uses a UE4 plugin to load JAR/Java classes.

> **[UE4\_Plugin\_Cortex\_App\_Store/ExampleProject at master ·...](https://github.com/tgraupmann/UE4_Plugin_Cortex_App_Store/tree/master/ExampleProject)**
>
> master/ExampleProject

The example project referenced my plugin “OuyaSDKPlugin” in the build script.

> <https://github.com/tgraupmann/UE4_Plugin_Cortex_App_Store/blob/master/ExampleProject/Source/ExampleProject/ExampleProject.Build.cs>

I’ve created my UE4 plugin here:

> **[UE4\_Plugin\_Cortex\_App\_Store/ExampleProject/Plugins/OuyaSDKPlugin at master ·...](https://github.com/tgraupmann/UE4_Plugin_Cortex_App_Store/tree/master/ExampleProject/Plugins/OuyaSDKPlugin)**
>
> master/ExampleProject/Plugins/OuyaSDKPlugin

I placed the JAR for the plugin here:

> <https://github.com/tgraupmann/UE4_Plugin_Cortex_App_Store/blob/master/ExampleProject/Plugins/OuyaSDKPlugin/Build/Android/libs/ouya-sdk.jar>

I placed the Java source for the plugin here:

> <https://github.com/tgraupmann/UE4_Plugin_Cortex_App_Store/blob/master/ExampleProject/Plugins/OuyaSDKPlugin/Build/Android/src/tv/ouya/sdk/PluginTestGameActivity.java>

I can build successfully, so that’s good. Now I just have to figure out how to get the plugin to initialize.

I need to figure out how to get the StartupModule() method in the UE4 plugin loading which should put something in the logcat.

> <https://github.com/tgraupmann/UE4_Plugin_Cortex_App_Store/blob/master/ExampleProject/Plugins/OuyaSDKPlugin/Source/OuyaSDKPlugin/Private/OuyaSDKPlugin.cpp#L48>

I can see that the plugin is enabled using the menu item Edit-\>Plugins and slicking on Project I see the plugin has enabled checked.

The type of plugin that I’m creating is referred to as an “Installed Plugin” in the docs.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

_[View the full topic](https://forums.unrealengine.com/t/android-java-libraries-in-ue4-game-ouya-sdk-google-play-game-services-etc/3146)._
