/** * Sample React Native App * * adapted from App.js generated by the following command: * * react-native init example * * https://github.com/facebook/react-native */ import React, { Component } from 'react'; import { Platform, StyleSheet, Text, View, Button } from 'react-native'; import MopSDK from 'react-native-mopsdk'; const onPressOpenCanvasApplet = () => { MopSDK.openApplet('5e933835b795a5000199d547', '', '', (data) => { }); }; const onPressOpenDemoApplet = () => { MopSDK.openApplet('5e4d123647edd60001055df1', '', '', (data) => { }); }; const onPressOpenProfileApplet = () => { MopSDK.openApplet('5e637a18cbfae4000170fa7a', '', '', (data) => { }); }; export default class App extends Component<{}> { state = { status: 'starting', message: '--' }; componentDidMount() { MopSDK.initialize({ appkey: '22LyZEib0gLTQdU3MUauASlb4KFRNRajt4RmY6UDSucA', secret: '4a915e447bcbd439', apiServer: 'https://mp.finogeeks.com', apiPrefix: '/api/v1/mop' }, (data) => { console.log('message;', data); const s = JSON.stringify(data); this.setState({ status: 'native callback received', message: s }); }); } render() { return ( ☆FINMopsdk example☆ STATUS: {this.state.status} ☆NATIVE CALLBACK MESSAGE☆ {this.state.message}