Deeplink
Whenever an ad is clicked, it will open the URL that was set in the ad URL parameter at the campaign creation time. If you wish to open a specific screen inside your app after the click action, you must enable your application to react for this action.

Creating an Ad with a deeplink

While creating an ad, you can set the URL that will be opened when the user clicks on it. For example:
1
inlocomedia://home?id=product_id&name=product_name
Copied!
You can use the whole URI Scheme to customize this url. For example:
1
<url_scheme>://<host>?<first_param_key>=<first_param_value>&<second_param_key>=<second_param_value>
Copied!

Reacting to the Deeplink

Include the following lines in your AndroidManifest.xml file inside the <activity> you wish to open when the ad is clicked.
1
<application>
2
[...]
3
<activity android:name="<Your_Activity>" >
4
<intent-filter>
5
<category android:name="android.intent.category.DEFAULT" />
6
<action android:name="android.intent.action.VIEW"/>
7
<data android:scheme="<url_scheme>"/>
8
</intent-filter>
9
</activity>
10
</application>
Copied!
The <data> property can contain other properties such as host, path and others. This example includes only the scheme which in the previous example was inlocomedia.
(Optional) To retrieve any parameter inside the ad url, you can do as shown below. The Activity must be the same you used in the intent-filter.
Java
1
public class <Your_Activity> extends Activity {
2
​
3
@Override
4
protected void onCreate(Bundle savedInstanceState) {
5
super.onCreate(savedInstanceState);
6
​
7
if (this.getIntent().getAction().equals(Intent.ACTION_VIEW)) {
8
Uri uri = this.getIntent().getData();
9
String param = uri.getQueryParameter("your_parameter_key");
10
}
11
}
12
}
Copied!
Last modified 1yr ago