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"

Read Android intent extra data on Unreal app launch

I am trying to launch an Unreal application from a website with a provided URL.

I cannot figure out how to read the intent extra data in Unreal. I need this, in order to performs different actions based on the data that is provided with the link.

Please help!

Product Version: UE 4.14
more ▼

asked Feb 04 '17 at 07:21 PM in C++ Programming

avatar image

23 6 13 9

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I can try to help. Could you be a little more specefic as to what you want.

more ▼

answered Feb 06 '17 at 05:06 AM

avatar image

650 12 13 27

avatar image panha Feb 06 '17 at 11:02 AM

Hi, to give you an example:

let's say there is a uri in my website in this format:


when the user click on the link it will start the unreal application and based on the params provided here I want to spawn different actors to the level.

This is the similar post from stackoverflow: http://stackoverflow.com/questions/31764916/getting-data-to-app-with-intent-from-browser-link

From unity: http://stackoverflow.com/questions/36098400/read-android-intent-extra-data-on-unity-app-launch

avatar image Chris Babcock STAFF Feb 06 '17 at 07:38 PM

You can use UnrealPluginLangauge (UPL) to add the category to the intent in the AndroidManifest.xml and add Java code to GameActivity.java to read the custom_param1 like in the stackoverflow answer. You will need to add JNI to call the Java routine from C++ to get the value. You can do this like Josh mentioned in the other AnswerHub you posted to: link text

avatar image panha Feb 07 '17 at 01:14 PM

Hi I'm using Mobile Utils[1] plugin to add method the gameActivity.java and be able to add category to the AndroidManifest.xml.

I found this guide of how to add the new intent-filter. https://answers.unrealengine.com/questions/340066/add-category-to-intent-filter-into-androidmanifest.html

This is how I to loop through the activity and add a new intent-filer and fill it up with new category, but it's also get added to the first intent filter.

             <setStringFromAttribute result="activityName" tag="$" name="android:name"/>
             <setBoolIsEqual result="bGameActivity" arg1="$S(activityName)" arg2="com.epicgames.ue4.SplashActivity"/>
             <if condition="bGameActivity">
                             <!-- Add App Tiles to manifest file. -->
                             <addElements tag="$">
                             <category android:name="android.intent.category.DEFAULT" />
                             <category android:name="android.intent.category.BROWSABLE" />
                             <data android:scheme="http" android:host="www.example.com" android:pathPrefix="/gizmos" />
                             <data android:scheme="example" android:host="gizmos" />

[1] https://github.com/gameDNAstudio/MobileUtils

(comments are locked)
10|2000 characters needed characters left
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