Component for communicate with MB app
npm install --save mb-native-action
import { sendMessage, getMessage } from "mb-native-action";
() => (
sendMessage(type, data);
getMessage((data)=> {
window.alert(`data from app: ${JSON.stringify(data)}`)
})
);
Type | Description |
---|---|
GO_BACK |
Go back |
GET_CONTACT |
Get contact |
OPEN_BROWSER |
Open browser |
PAYMENT_HUB_TRANSACTION |
Payment hub transaction |
TEL |
Call |
EMAIL |
Send email |
GET_LOCATION |
Get location |
CLOSE_WEBVIEW |
Close webview |