Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: Not Selected
more ▼

asked Nov 10 '14 at 09:14 AM in Using UE4

avatar image

Commander Shepard
812 62 83 220

avatar image Commander Shepard Nov 14 '14 at 06:38 AM

HAAALP! So far from what I found there is a file named AndroidJNI.cpp in the engine source on git which looks like the entry point for the UE4. So to use that for my libraries I'll have to build the engine from source for each project where i want to use a different external library. Is that the recommended way to do this? or there is some better way I've overlooked?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first


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 ;)

more ▼

answered Feb 02 '15 at 05:43 PM

avatar image

755 24 48 145

avatar image Shadowriver Feb 02 '15 at 05:47 PM

Actully theres java portion in laucher version too and copy of it is always placed in project directory Intermediate\Android\APK letting you modify it (i think :p)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question