my.shareActivity

Activate the system sharing panel to support sharing text or images.

Sample code

copy

my.call('shareActivity', {
  type: 'Text',
  shareText: 'Hello Banco Estado',
  success: (res) => console.log(res),
  fail: (res) => console.error(res),
});

Parameters

Property

Type

Required

Description

type

String

Yes

"Text"

shareText

String

No

Share text content

successFunctionNoCallback function upon call success.
failFunctionNoCallback function upon call failure.
completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure).

Success Callback Function

The incoming parameter is of the Object type with the following attributes:

Property

Type

Required

Description

success

bool

Yes

true: sharing successful;

false: sharing failed