imToken.callAPI('navigator.closeDapp')
imToken.callAPI('navigator.goBack')
imToken.callAPI('navigator.toggleNavbar')
imToken.callAPI('navigator.getOrientation', function(err, result) { alert(result) })
imToken.callAPI('navigator.setOrientation', 'landscape')
imToken.callAPI('navigator.setOrientation', 'portrait')
imToken.callAPI('navigator.configure', {orientation: 'portrait', navigationStyle: 'default'})
imToken.callAPI('navigator.configure', {orientation: 'portrait', navigationStyle: 'default', navigatorColor: '#008cd5'})
imToken.callAPI('navigator.configure', {orientation: 'portrait', navigationStyle: 'transparent'})
imToken.callAPI('navigator.configure', {orientation: 'landscape', navigationStyle: 'default'})
imToken.callAPI('navigator.configure', {orientation: 'landscape', navigationStyle: 'default', navigatorColor: '#008cd5'})
imToken.callAPI('navigator.configure', {orientation: 'landscape', navigationStyle: 'transparent'})
imToken.callAPI('native.alert', 'winner winner, chicken dinner!')
imToken.callAPI('native.selectPicture',{maxWidth: 400, maxHeight: 200}, function (err, ret) { if(err) { alert(err.message) } else { document.getElementById('imgContainer').src = ret.data } })
imToken.callAPI('native.setClipboard', 'are you ok?')
imToken.callAPI('native.share', { title: 'dapp example', message: 'this is example of dapp sdk', url: location.href, }, function (err, ret) { if(err) { alert('user not share') } else { alert('shared') } })
imToken.callAPI('native.scanQRCode', function (err, ret) { if(err) { alert(err) } else { alert(ret) } })
imToken.callAPI('user.showAccountSwitch', { }, function(err, address) { if(err) { alert(err) } else { alert(address) } })
imToken.callAPI('device.getCurrentLanguage', function(err, language) { if(err) { alert(err) } else { alert(language) } })
imToken.callAPI('device.getCurrentCurrency', function(err, currency) { if(err) { alert(err) } else { alert(currency) } })