Hi,
I am working on a project where I need to take input from an Android smartwatch (simple scrolling and clicking) and get that input into an unreal engine vr project.
The smartwatch to phone part works fine (I have quite a lot of experience with android development).
So to continue I thought I could get the input data off of an android .jar library into my ue project kinda like a plugin in unity.
Now my two questions are:
- Is that a possible idea and if it is, could somebody point me to a good tutorial or some source code of a .jar plugin in ue?
- If there is another way of getting data directly from my smartwatch into my ue project via something I dont know yet; information would be much appreciated!
thanks!
Hi ,
You can write a plugin to do this. You can copy your jar file using AndroidPluginLanguage and use AndroidJNI.h to call your Java wrappers. Take a look at the GearVR plugin for an example.
Thank you for your reply.
What exactly is the AndroidPluginLanguage?
“AndroidPluginLanguage.cs documents the commands available.” <– Where exactly can I find this?
Could you link me to the GearVR plugin? Because I do not really find anything that could point me into a direction for how to use custom .jar plugins.
AndroidPluginLanguage.cs is in Engine\Source\Programs\UnrealBuildTool\Android. Modules can register an XML file for Android to be processed during the packaging process to copy files, modify the manifest and proguard files, and insert code into various sections of GameActivity.java. The GearVR plugin is in Engine\Plugins\Runtime\GearVR. Take a look at GearVR.Build.cs and GearVR_APL.xml in Engine\Plugins\Runtime\GearVR\Source\GearVR.