zebview-bridge
v0.5.3
Published
Javascript bridge for Zebview which is a Android webview library
Downloads
19
Readme
ZebView
Bridge between javascript and java on Android WebView
Get Start
There are two parts for getting start
Android Part
See ZebView for more information
Frontend Part
Add dependency
npm install zebview-bridge
//or
yarn add zebview-bridge
Call service
//Import
//If not in a ZebView's environmnet, api will be null
import {api} from 'zebview-bridge'
//Call native api
const res=api.TestService.test(789,"string",false)
//Support promise
api.TestService.manyWork().then(()=>{
//promise resolve
}).catch(()=>{
//promise reject
})
//Support return in callback
api.TestService.notifyJs((name)=>{
return "my name is "+name
})