Skip to content

npm package for interacting with native NT app via web interface

Notifications You must be signed in to change notification settings

agensdev/nativebridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nativebridge

Standardises communication between native apps (android and ios) and web applications.

Install

$ npm install git+https://github.com/agensdev/nativebridge.git

// if you need ssh

$ npm install ssh+https://github.com/agensdev/nativebridge.git

Usage

import {nativebridge as nb} from './nativebridge.js'

const exitButton = document.createElement("Button");
const loginButton = document.createElement("Button");

loginButton.onclick= async function(e){
    let token = await nb.requestLogin()
}

exitButton.onclick = function(e){
    nb.leaveWebApp()
}

document.body.appendChild(loginButton)
document.body.appendChild(exitButton)

nb.signalReadyState()

About

npm package for interacting with native NT app via web interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published