How do I add android sdk functionality to UE4 game
I am currently developing a game in UE4 for andorid. I am extremely familiar with making android application using the android SDK and ecilipse in java. I also have a good idea of what NDK is and why it is used but I don't know where it hooks up with UE4
However I want my game to use some of the functionality that is present in the android SDK ! For example when player does a certain action the vibrator must turn on or for another action the LED lights must glow or say I want to get readings from phone sensors or I want the game to download some custom data from a server ! all these were extremely easy to do with SDK and java but I am using UE4 because I want its powerful game architecture and renderer so I can't leave UE4.
In short I want a UE4 game that can also use the android API functionality.
Also I noticed there was a eclipse release build downloaded along with other things in TADP tools! what is that for?
asked Nov 10 '14 at 09:14 AM in Using UE4
Basically, without sources You won't be able to do this. But if you have sources you can add Java functionality pretty simple.
The JNI file is under **Engine\Source\Runtime\Launch\Private\Android* path, the java file under Engine\Build\Android\Java\src\com\epicgames\ue4*
You can check how AndroidThunkCpp_IsMusicActive is made, or if you need native callback from java, the Java_com_epicgames_ue4_GameActivity_nativeSetGlobalActivity method.
The only difficulty is that all JNI is in Launch module, that has no access to other modules than Core, Engine, etc (you can check the Launch.Build.cs for details). So if you want to add another module that needs Java native callback to work you should use FCoreDelegates class to communicate with them.
The Eclipse in TADP is only for people who haven't had Eclipse already. It's pretty bundle with all you need to work with UE4 on Android ;)
Follow this question
Once you sign in you will be able to subscribe for any updates here