app-web-launcher
v1.0.1
Published
goApp(deepLink) {
Downloads
8
Readme
app-web-launcher
This is a function that could open Native App from HTML page when some events are triggered.
install
npm i app-web-launcher -S
usage
<button onclick="goto"> open by app <button>
const AppLauncher = require('app-web-launcher')
const appLauncher = new AppLauncher()
function goto() {
appLauncher.launch({
deepLink: "****",
url: "****",
pressCb: () => {/*todo*/},
failCb: () => {/*todo*/}
})
}
options
|key|type|value| |-|-|-| |ctx | Object|callback's context, default is window| |deeplink | String|app's deeplink, must| |url | String|download url if no app, must| |pressCb | Function|callback when events were triggered, not must | |failCb | Function|callback when no app, not must|