elastos-essentials-plugin-intent

Elastos Essentials Intent Plugin

Usage no npm install needed!

<script type="module">
  import elastosEssentialsPluginIntent from 'https://cdn.skypack.dev/elastos-essentials-plugin-intent';
</script>

README

Classes

Intent

Typedefs

Intent

Kind: global class

new Intent()

The class representing dapp manager for launcher.

appManager.sendIntent(action, params, onSuccess, [onError])

Send a intent by action.

Kind: instance method of Intent

Param Type Description
action string The intent action.
params Object The intent params.
onSuccess function The function to call when success.
[onError] function The function to call when error, the param is a String. Or set to null.

appManager.addIntentListener(callback)

Set intent listener for message callback.

Kind: instance method of Intent

Param Type Description
callback onReceiveIntent The function receive the intent.

appManager.sendIntentResponse(action, result, intentId, onSuccess, [onError])

Send a intent respone by id.

Kind: instance method of Intent

Param Type Description
action string The intent action.
result Object The intent respone result.
intentId long The intent id.
onSuccess function The function to call when success.
[onError] function The function to call when error, the param is a String. Or set to null.