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!

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

Hi, to give you an example:

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

myapp://open?custom_param1=val1

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:

From unity:

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

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.

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">
					<true>
							<!-- Add App Tiles to manifest file. -->
							<addElements tag="$">
								<intent-filter>
					        <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" />
					      </intent-filter>
							</addElements>
					</true>
			</if>
	</loopElements>

[1] GitHub - gameDNAstudio/MobileUtils: A plugin for Unreal Engine 4 that lets you integrate mobile utilities into your project.

Hi,

I want to do the same thing, could you provide please how do you achieve it? How can you access the custom_param1 value inside unreal?.

I have the APL configured similar to yours, with some addition on gameActivityOnCreateAdditions to get the custom_param1 value, but now, I don’t know how to pass this value to one of my c++ functions or blueprints.

Thanks,
David.