0.0.8 • Published 4 years ago
mini-app-bridge v0.0.8
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