0.0.8 • Published 4 years ago

mini-app-bridge v0.0.8

Weekly downloads
32
License
-
Repository
-
Last release
4 years ago

APIs

getInitialData(): Promise<any>

Get data sent by main app at the time mini app's started

requestPermissions(permission: string[]): Promise<string[] | null>

Prompts the user to enable permissions and returns a promise resolving to an array of string indicating granted permissions or a null value if user denied the request

getGrantedPermissions(): Promise<string[]>

Get all granted permissions

getCurrentAppState(): 'active' | 'background'

Used to check if mini app is running in the foreground or background

onAppStateChanged(callback: OnAppStateChangedCallBack): () => void

type OnAppStateChangedCallback = (nexAppState: 'active' | 'background') => void

Add a listener to AppState change event. This method returns a cleanup function to remove the listener

hide(): void

Run mini app in background

close(): void

Close mini app

0.0.8

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago