0.1.21 • Published 4 years ago

@momo-platform/max-api v0.1.21

Weekly downloads
194
License
ISC
Repository
gitlab
Last release
4 years ago

Functions

copyToClipboard(text, toastMsg)

copy text to Clipboard and show toast.

Kind: global function

ParamTypeDescription
texttexttext to save to Clipboard
toastMsgtexttext to show on Toast

openDialer(phone)

open Dialer to call.

Kind: global function

ParamTypeDescription
phonetextphone number

getBase64FromUrl(url, callback)

convert image from url to base64 string.

Kind: global function

ParamTypeDescription
urlurlimage url
callbackcallbackcallback base64 image

setBrightnessLevel(brightnessLevel, callback)

set Brightness level.

Kind: global function

ParamTypeDescription
brightnessLevelnumberbrightnessLevel 0 to 1
callbackcallbackcallback success or not

getBrightnessLevel(callback)

get Brightness level.

Kind: global function

ParamTypeDescription
callbackcallbackcallback current brightness level

getSystemBrightnessLevel(callback)

get system Brightness level (Android only).

Kind: global function

ParamTypeDescription
callbackcallbackcallback current system brightness level

sendSMS(phone, content, callback)

show SMS activity.

Kind: global function

ParamTypeDescription
phonenumberphone number
contenttextsms content
callbackcallbackcallback empty

getScreenShot(callback)

capture screenshot

Kind: global function

ParamTypeDescription
callbackcallbackcallback base64 of screenshot

enableScreenshots(enable)

enable screenshot (Android only).

Kind: global function

ParamTypeDescription
enablebooleanenable screenshot

getIpAddress(callback)

get Ip Address

Kind: global function

ParamTypeDescription
callbackcallbackcallback ip-adress

getImage(options, callback)

Get image from gallery or capture new image

Kind: global function

ParamTypeDescription
optionsObjectoptions: {type: "camera""album", editable: true/false}
callbackcallback

saveImage(base64Image, callback)

save image to gallery

Kind: global function

ParamType
base64Imagestring
callbackcallback

getImageSize(uri, callback)

get size image

Kind: global function

ParamType
uristring
callbackcallback

getImageRotateFromUri(uri, callback)

get rotated image from uri, return back uri

Kind: global function

ParamType
uristring
callbackcallback

openURLWithPackageId(callbackDeepLink, packageId)

Open url with package id

Kind: global function

ParamType
callbackDeepLinkcallback
packageIdstring

openURL(callbackDeepLink)

open url

Kind: global function

ParamType
callbackDeepLinkcallback

playYouTube(video:, callbackDeepLink)

playYouTube

Kind: global function

ParamTypeDescription
video:Object{videoId: VideoId, videoURL: videoUrl}
callbackDeepLinkcallback

trackEvent(event, parameters)

tracking event

Kind: global function

ParamTypeDescription
eventStringtracking event name
parametersObjecttracking parameters

trackPurchase(value)

tracking purchase

Kind: global function

ParamTypeDescription
valueStringstring of double value

shareFacebook(params)

share Facebook

Kind: global function

ParamTypeDescription
paramsObject{link: link to share, image: share image, stories: {}}

throwJSException(exception, callback)

throwException throw Exception from miniApp at version 1.0

Kind: global function

ParamType
exception*
callback*

uploadImage(imageData, callback)

Get image from gallery or capture new image

Kind: global function

ParamTypeDescription
imageDataObjectimageData: {data: "base64 string", ext: "png", folder: "chat_images"}
callbackcallback

share(data, callback)

share text content to other apps

Kind: global function

ParamType
data*
callback*

setBadgeFeature(params, callback)

Get image from gallery or capture new image

Kind: global function

ParamTypeDescription
paramsObjectparams: {badge: "string or number", featureCode: ""}
callbackcallback

getDeviceInfo(callback)

Get device information

Kind: global function

ParamType
callbackcallback

openDeviceSetting(callback)

Open Device Setting

Kind: global function

ParamType
callbackcallback

isHighPerformanceDevice(callback)

Check device is high performance

Kind: global function

ParamType
callbackcallback

registerShakeSensitivity()

register device shaking listener.

Kind: global function

unregisterShakeSensitivity()

unregister device shaking listener.

Kind: global function

saveCalendarEvent(title, details, options) ⇒

Creates or updates a calendar event. To update an event, the event id must be defined.

Kind: global function Returns: - Promise resolving to saved event's ID.

ParamDescription
titleThe title of the event
detailsEvent details
optionsOptions specific to the saved event.

sendExtraMessage(data, callback)

Handle API need to use base64 , must handle on Platform to avoid performance issue

Kind: global function

ParamTypeDescription
datadatadata for request
callbackcallbackcallback

activeKeepAwake(isActive)

activeKeepAwake

Kind: global function

ParamDescription
isActiveThe title of the event

requestLogout(callback)

Request logout

Kind: global function

ParamType
callback*

getConfig(config, callback)

get Config.

Kind: global function

ParamTypeDescription
configtextconfig
callbackcallbackreturn config

getContacts(options, callback)

get contacts.

Kind: global function

ParamTypeDescription
optionsObjectoptions
callbackcallbackreturn array contacts

getContactInfo(phone, callback)

get contact info from phoneNumber.

Kind: global function

ParamTypeDescription
phonetextphone
callbackcallbackreturn phone info

getContact(options, callback)

get contact from realm

Kind: global function

ParamTypeDescription
optionsObjectoptions : {phone, name}
callbackcallback

queryContact(options, callback)

query contacts by options

Kind: global function

ParamType
optionsobject
callbackcallback

saveContact(contact, callback)

Save contact

Kind: global function

ParamTypeDescription
contactobject{phone, name}
callbackcallbackreturn {isSaveSuccess, contact}

mapContacts(contacts, callback)

get list contact from realm from list contact

Kind: global function

ParamTypeDescription
contactsArray
callbackcallbackreturn array contacts

pickSingleDocument(options, callback)

Pick single document (PDF, ...)

Kind: global function

ParamTypeDescription
optionsoptionsDocumentPickerOptions (please check react-native-document-picker documentation)
callbackcallback{data: DocumentPickerResponse, error: Error} if err.description === 'cancelled', request has been cancelled by user

uploadDocuments(options, callback)

Upload documents

Kind: global function

ParamTypeDescription
optionsoptionsUploadFileOptions (please check react-native-fs documentation and do not use begin & progress in the options).
callbackcallback{data: UploadResult, error: Error} if err.description === 'cancelled', request has been cancelled by user

startCaptureSideDocument(config, callback)

Start camera to capture front/back of document

Kind: global function

ParamTypeDescription
configconfigconfig apply for UI
callbackcallbackcallback

startCaptureFace(config, callback)

Start camera to capture face

Kind: global function

ParamTypeDescription
configconfigconfig apply for UI
callbackcallbackcallback

faceMatching(config, callback)

Compare face between document picture and selfie picture

Kind: global function

ParamTypeDescription
configconfigapi parammeter
callbackcallbackcallback

getAvatarEndPoint(callback)

get endpoint url of contact.

Kind: global function

ParamTypeDescription
callbackcallbackreturn endpoint url of contact

getResourceEndpoint(callback)

get resource endpoint .

Kind: global function

ParamTypeDescription
callbackcallbackreturn resource endpoint

getSteps(params, startDate, endDate)

get steps of user.

Kind: global function

ParamTypeDescription
paramsobjectparams
startDate
endDate
callbackreturn data when it be triggered

listen(eventName, callback)

listen all events

Kind: global function

ParamType
eventNamestring
callbackcallback

requestLocation(params, callback)

request location of device.

Kind: global function

ParamTypeDescription
paramsobjectparams {permission: Location Type}
callbackcallbackreturn location of device

requestLocationWithOptions(params, options, callback)

request location of device.

Kind: global function

ParamTypeDescription
paramsobjectparams {permission: Location Type}
optionsoptionsoptions {option: Location Options}
callbackcallbackreturn location of device

getLocation(callback)

get location of device.

Kind: global function

ParamTypeDescription
callbackcallbackreturn location of device

connectMqttBroker(options, callback)

connect client to MQTT Broker over websocket

Kind: global function

ParamTypeDescription
optionsobjectconnect options : { timeout: "number", userName: "string", password: "string", willMessage: "object", keepAliveInterval: "number", cleanSession: "boolean", useSSL: "boolean", invocationContext: "object", hosts: "object", ports: "object", reconnect: "boolean", mqttVersion: "number", mqttVersionExplicit: "boolean", uris: "object" }
callbackcallbackcallback when connection status change

disconnectMqttBroker()

Disconnect client to MQTT Broker

Kind: global function

subscribeMqttTopic(topic, subscribeOptions, callback)

subscribe a topic

Kind: global function

ParamTypeDescription
topicstringtopic of publisher
subscribeOptionsobjectsubscribe options : { qos: "number", invocationContext: "object", timeout: "number" }
callbackcallbackcallback subscribe status

unsubscribeMqttTopic(topic, unsubscribeOptions, callback)

unsubscribe a topic

Kind: global function

ParamTypeDescription
topicstringreturn connection status
unsubscribeOptionsobjectunsubscribe options: { invocationContext: "object", timeout: "number" }
callbackcallbackreturn connection status

fetchNetworkInfo(requestedInterface, requestedInterface)

fetch newest net info of device.

Kind: global function

ParamTypeDescription
requestedInterfacerequestedInterface
requestedInterfacecallbackreturn net info of device

useNetInfo(callback)

get user net info of device.

Kind: global function

ParamTypeDescription
callbackcallbackreturn net info of device

sendMessage(props, callback)

send message to Backend.

Kind: global function

ParamTypeDescription
propsobjectrequest
callbackcallbackreturn response

sendConfirmMessage(props, callback)

send message with confirmation pass to Backend.

Kind: global function

ParamTypeDescription
propsobjectrequest
callbackcallbackreturn response

sendProxyMessage(props, callback)

send message to Proxy Backend (BE redirect message to others).

Kind: global function

ParamTypeDescription
propsobjectrequest
callbackcallbackreturn response

sendCloudMessage(props, callback)

send message to Cloud.

Kind: global function

ParamTypeDescription
propsobjectrequest
callbackcallbackreturn response

getCloudMessage(props, callback)

get data from Cloud.

Kind: global function

ParamTypeDescription
propsobjectrequest
callbackcallbackreturn response

clickNotification(notification)

handle refId from notification

Kind: global function

ParamType
notificationobject

showPopupNotification(notification)

show popup

Kind: global function

ParamType
notificationobject

observer(schema, callback)

register observer.

Kind: global function

ParamTypeDescription
schematextschema
callbackcallbackcallback when meesage of schema be triggered

getDataObserver(schema, callback)

get data from observer storage

Kind: global function

ParamTypeDescription
schematextschema
callbackcallbackreturn data

setDataObserver(schema, data)

set data to observer storage

Kind: global function

ParamTypeDescription
schematextschema
dataObjectdata

getPassengerInfo(callback)

get profile.

Kind: global function

ParamTypeDescription
callbackcallbackreturn data

setPassengerInfo(profile)

set profile.

Kind: global function

ParamTypeDescription
profilearray{email:"", name:"", firstName:"", lastName:"",phone:"", personalId:"": address:"", birthDate:"", city= "", district= "", ward= "", gender: 1}

requestPayment(params, callback)

request payment

Kind: global function

ParamType
paramsobject
callbackcallback

requestPaymentSdk(params, callback)

request payment sdk

Kind: global function

ParamType
paramsobject
callbackcallback

countTrace(parameters, callback)

trace count event.

Kind: global function

ParamTypeDescription
parametersObjectparameters
parameters.flowStringflow
parameters.stepStringstep
callbackcallback({success: truefalse, msg: null"string"}})

startTrace(parameters, callback)

start trace event.

Kind: global function

ParamTypeDescription
parametersObjectparameters
parameters.flowStringflow
parameters.stepStringstep
callbackcallback({success: truefalse, msg: null"string"}})

stopTrace(traceId, parameters, callback)

stop trace event.

Kind: global function

ParamTypeDescription
traceIdStringtraceId: traceId when call startTrace
parametersObjectparameters
parameters.flowStringflow
parameters.stepStringstep
callbackcallback({success: truefalse, msg: null"string"}})

errorTrace(parameters, callback)

trace error event.

Kind: global function

ParamTypeDescription
parametersObjectparameters
parameters.flowStringflow
parameters.stepStringstep
parameters.errorMessageStringerror message
parameters.errorCodeNumbererror code
callbackcallback({success: truefalse, msg: null"string"}})

requestPermission(permission, callback)

request permission

Kind: global function

ParamType
permissionstring
callbackcallback

checkPermission(permission, callback)

check permission has granted

Kind: global function

ParamType
permissionstring
callbackcallback

scanQRCode(data, callback)

get data from qr code

Kind: global function

ParamType
dataobject
callbackcallback

realmQuery(schema, query, sort, limit, callback)

query data from realm.

Kind: global function

ParamTypeDescription
schematextschema
querytextquery
sortarraysort
limitnumberlimit number of object return
callbackcallbackreturn value

realmSave(schema, object)

save data to realm.

Kind: global function

ParamTypeDescription
schematextschema
objectobjectobject

realmDelete(schema, query)

delete data of realm.

Kind: global function

ParamTypeDescription
schematextschema
querytextquery

navigate(routeName, params, callback)

navigate to other screen

Kind: global function

ParamType
routeNametext
paramsobject
callbackcallback

startApp(application, params, callback)

start other screen.

Kind: global function

ParamTypeDescription
applicationtextapplication
paramsobjectparams
callbackcallbackcallback

startMiniApp(miniApp, params, callback)

start mini app.

Kind: global function

ParamTypeDescription
miniApptextminiApp
paramsobjectparams
callbackcallbackcallback

startService(service, params, callback)

start screen by service.

Kind: global function

ParamTypeDescription
serviceobjectservice
paramsobjectparams
callbackcallbackcallback

startServiceId(serviceId, params, callback)

start screen by service id.

Kind: global function

ParamTypeDescription
serviceIdobjectserviceId
paramsobjectparams
callbackcallbackcallback

startFeature(feature, params, callback)

start screen by feature.

Kind: global function

ParamTypeDescription
featureobjectfeature
paramsobjectparams
callbackcallbackcallback function

startFeatureCode(featureCode, params, callback)

start screen by feature code.

Kind: global function

ParamTypeDescription
featureCodeobjectfeatureId
paramsobjectparams
callbackcallbackcallback

openWeb(params, callback)

start web screen by url or html.

Kind: global function

ParamTypeDescription
paramsobject{url, html, title}
callbackcallbackcallback

dismiss(result, callback)

dismiss current screen and return result for previous route

Kind: global function

ParamTypeDescription
resultobjectresult
callbackcallbackcallback

dismissAll(callback)

dismiss all screen.

Kind: global function

ParamTypeDescription
callbackcallbackcallback

goBack(callback)

go back.

Kind: global function

ParamTypeDescription
callbackcallbackcallback

goHome(callback)

go home screen.

Kind: global function

ParamTypeDescription
callbackcallbackcallback

navigateTab(params, callback)

navigate to Tab index.

Kind: global function

ParamTypeDescription
paramsobject{index}
callbackcallbackcallback

getListFriendMoMo(contact, callback)

get List Friend MoMo

Kind: global function

ParamTypeDescription
contactobject{loading}
callbackcallbackreturn response

getRelationShipStatus(contact, callback)

get RelationShip Status

Kind: global function

ParamTypeDescription
contactobject{loading,friendId}
callbackcallbackreturn response

acceptFriendRequest(contact, callback)

accept Friend Request

Kind: global function

ParamTypeDescription
contactobject{loading,friendId}
callbackcallbackreturn response

sendFriendRequest(contact, callback)

send Friend Request

Kind: global function

ParamTypeDescription
contactobject{loading,friendId}
callbackcallbackreturn response

blockUser(contact, callback)

block User

Kind: global function

ParamTypeDescription
contactobject{loading,friendId}
callbackcallbackreturn response

unBlockUser(contact, callback)

unBlock User

Kind: global function

ParamTypeDescription
contactobject{loading,friendId}
callbackcallbackreturn response

getItem(key, callback)

get data from Storage.

Kind: global function

ParamTypeDescription
keytextkey
callbackcallbackreturn value

setItem(key, value)

set data to Storage.

Kind: global function

ParamTypeDescription
keytextkey
valuetextvalue

removeItem(key)

remove data from Storage.

Kind: global function

ParamTypeDescription
keytextkey

requestSync(type, callback)

request to sync

Kind: global function

ParamTypeDescription
typetextSERVICE, CARD, PROVIDER, POINT, BILL, CONTACT
callbackcallback

getTransactionWithServiceIds(callback)

get transaction information.

Kind: global function

ParamTypeDescription
arrayarray of service ids
callbackcallbackreturn array of transaction history of serviceids

getTransactionInfo(tranHisList, callback)

get transaction information.

Kind: global function

ParamTypeDescription
tranHisListarrayarray tranHis
callbackcallbackarray of transaction history

getTransactionStatusCode(params, callback)

get transaction status code.

Kind: global function

ParamTypeDescription
paramstexttranType
callbacknumbererrorCode
numberstatus
callbackstatus code of transaction

getStatusInfo(statusCode, callback)

get transaction status information.

Kind: global function

ParamTypeDescription
statusCodetextstatusCode
callbackcallbackstatus information

getAllTransactionStatusInfo(callback)

get all transaction status information.

Kind: global function

ParamTypeDescription
callbackcallbackall status information

getAllTransactionStatusCode(callback)

get all transaction status code.

Kind: global function

ParamTypeDescription
callbackcallbackall status code

getMoneySourceName(tranHis, callback)

get money source name.

Kind: global function

ParamTypeDescription
tranHistranHistranHis object
callbackcallbackreturn name of money source

getFeatureById(featureId, callback)

Get feature by feature id

Kind: global function

ParamType
featureId*
callback*

startTranHisDetail(params, onResult)

Start transaction history detail feature

Kind: global function

ParamTypeDescription
params*S
onResult*

showToast(...args)

show Toast.

Kind: global function

ParamTypeDescription
...argsarrayargs

hideToast(...args)

hide Toast.

Kind: global function

ParamTypeDescription
...argsarrayargs

showLoading(...args)

show Loading.

Kind: global function

ParamTypeDescription
...argsarrayargs

hideLoading(...args)

hide Loading.

Kind: global function

ParamTypeDescription
...argsarrayargs

showAlert(title, message, buttonTitles, callback)

show dialog alert.

Kind: global function

ParamTypeDescription
titletexttitle
messagetextmessage
buttonTitlesarraybuttonTitles
callbackcallbackreturn index of CTAs of dialog which be clicked

showAction(title, buttonTitles, callback)

show bottomsheet to choose action.

Kind: global function

ParamTypeDescription
titletexttitle
buttonTitlesarraybuttonTitles
callbackcallbackreturn index of CTAs of bottomSheet which be clicked

showPicker(args, callback)

show bottomsheet to choose action.

Kind: global function

ParamTypeDescription
argsobjectargs
callbackcallbackcallback

getProfile(callback)

get user profile.

Kind: global function

ParamTypeDescription
callbackcallbackreturn data

requestUserInfo(options, callback)

request user info.

Kind: global function

ParamTypeDescription
optionsobjectoptions
callbackcallbackreturn user info

setProfile(profile, callback)

set user profile.

Kind: global function

ParamTypeDescription
profileobjectprofile
callbackcallbackreturn data

observerProfile(callback)

register observer profile.

Kind: global function

ParamTypeDescription
callbackcallbackreturn data when it be triggered

setUserProfileExtraOnServer(callback)

set profile extra.

Kind: global function

ParamTypeDescription
textkey
callbackobjectval
callbackreturn data when it be triggered

updateItemServer(data, data)

update item to backend

Kind: global function

ParamTypeDescription
dataarray{type:'abc', key: key1, value: value1}, {type:'abc2', key: key2, value: value2}
dataobject

updateItemLocal(data, data)

update item to realm

Kind: global function

ParamType
dataarray
dataobject

getItemsServer(types)

get item from BE

Kind: global function

ParamType
typesarray

getItemsLocal(param)

get local item from realm

Kind: global function

ParamTypeDescription
paramobject{type, keys: []}

getItemLocal(param)

get local item - user settings

Kind: global function

ParamTypeDescription
paramobject{type, key}

observerUploadDocuments(param)

Upload documents with progress monitoring

Kind: global function

ParamTypeDescription
paramobject{type, key}

cancelUpload(param)

Cancel uploading progress

Kind: global function

ParamTypeDescription
paramobject{type, key}

setBackgroundTimeout(param)

Kind: global function

ParamTypeDescription
paramobject{type, key}

getFullListFriendMoMo(param)

Kind: global function

ParamTypeDescription
paramobject{type, key}

friendQuery(param)

Kind: global function

ParamTypeDescription
paramobject{type, key}

syncContacts(param)

Kind: global function

ParamTypeDescription
paramobject{type, key}

syncContactAfter1Day(param)

Kind: global function

ParamTypeDescription
paramobject{type, key}

syncContactAfter1Minute(param)

Kind: global function

ParamTypeDescription
paramobject{type, key}

getUserUUID(partnerCode, callback)

get userId by partnerCode

Kind: global function

ParamType
partnerCodestring
callbackcallback(userId: string)

setFastLogin(params, callback)

Enable fast login

Kind: global function

ParamType
paramsobject{value, loading}
callbackcallbackreturn {status, response}

showToolkit(params)

Show tool kit

Kind: global function

ParamTypeDescription
paramobject{type, key}

sendUploadMessage(props, callback)

Request upload files message.

Kind: global function

ParamTypeDescription
propsobject{ path: "String", options: "Object", body: { is_avatar: "Boolean", is_private: "Boolean", files: "Array" or "Object" }}
callbackcallbackreturn { status: "Boolean", response: "Object"}
0.1.21

4 years ago

0.1.20

4 years ago

0.1.19

4 years ago

0.1.18

4 years ago

0.1.17

4 years ago

0.1.14

4 years ago

0.1.15

4 years ago

0.1.16

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.2

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.66

4 years ago

0.0.65

4 years ago

0.0.64

4 years ago

0.0.63

4 years ago

0.0.62

4 years ago

0.0.61

4 years ago

0.0.60

4 years ago

0.0.59

4 years ago

0.0.58

4 years ago

0.0.57

4 years ago

0.0.56

4 years ago

0.0.55

4 years ago

0.0.53

4 years ago

0.0.52

4 years ago

0.0.51

4 years ago

0.0.50

4 years ago

0.0.47

4 years ago

0.0.48

4 years ago

0.0.49

4 years ago

0.0.46

4 years ago

0.0.44

4 years ago

0.0.45

4 years ago

0.0.43

4 years ago

0.0.42

4 years ago

0.0.41

4 years ago

0.0.40

4 years ago

0.0.39

4 years ago

0.0.38

4 years ago

0.0.37

4 years ago

0.0.36

4 years ago

0.0.35

4 years ago

0.0.34

4 years ago

0.0.33

4 years ago

0.0.32

4 years ago

0.0.31

4 years ago

0.0.30

4 years ago

0.0.28

4 years ago

0.0.29

4 years ago

0.0.27

4 years ago

0.0.26

4 years ago

0.0.25

4 years ago

0.0.24

4 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.20

4 years ago

0.0.21

4 years ago

0.0.18

4 years ago

0.0.19

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.15

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago