Skip to content

Open Native App from HTML page when some events are triggered

Notifications You must be signed in to change notification settings

silentport/app-web-launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

app-web-launcher

Build Status undefined

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

About

Open Native App from HTML page when some events are triggered

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published