Intent URI
suggest changeThis example shows how to start an intent from the browser:
<a href="intent://host.com/path#Intent;package=com.sample.test;scheme=yourscheme;end">Start intent</a>
This intent starts the app with package com.sample.test, or opens its Google Play listing when that package is not installed.
Also this intent can be started with javascript:
var intent = "intent://host.com/path#Intent;package=com.sample.test;scheme=yourscheme;end";
window.location.replace(intent)
In activity this host and path can be obtained from intent data:
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
Uri data = getIntent().getData(); // scheme yourscheme, host host.com, path /path
}
Intent URI syntax:
HOST/URI-path // Optional host
#Intent;
package=[string];
action=[string];
category=[string];
component=[string];
scheme=[string];
end;
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents