Icon

Deep Link Android

Mattia Fortunati

You must be logged in to obtain assets

Description

SETUP

change deeplink URI: go to Extensions>DeepLinkEx>Android and into the Inject into Android Manifest part, change android:scheme="myapp" and android:host="com.myapp.something" with your scheme and host.

OPEN APP THROUGH DEEPLINK

now, if your app is installed, if the user goes to the link you set during SETUP which will be something like this myapp://com.myapp.something your app will open and you will receive a social async event. Note: the callback is called after 5 seconds to be sure that the game is opened and there's an object ready to receive the callback.

BASIC USAGE

Basic usage is all about receiving a deep link callback in a SOCIAL ASYNC EVENT. You will receive "DEEPLINK" marked as "type" and the URI as string within "uri" (in this case "myapp://com.myapp.something")

Within Game Maker, into a social async event put this code:

var type = string(async_load[? "type"])
var uri = string(async_load[? "uri"])
//check for async event type
if type == "DEEPLINK"
{
    //do something
}

NOTE:

The deeplink and the callback will work both if the game is running in background or it is not running at all.

ADVANCED USAGE AND FEATURES

1) Whenever you want, you can use

deepLinkReady()

to "force" the social async call. You may want to do this if the 5 seconds delay is too much for your app's design. You can for example call deepLinkReady() each step, without problems, because if the social async event has already been called, by default or by deepLinkReady() itself, it won't be called again.

2) At any time, you can call

deepLinkGetUri()

to get the uri data as string (in this case "myapp://com.myapp.something"). If the uri is not defined you will get the string "no uri"

More info

End User Licence Agreement (EULA).

Age Rating: None

Version

GMS1 - Version 1.6.0. Published July 14, 2017

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait