1.0.4 • Published 2 years ago
capacitor-plugin-phone-helper v1.0.4
capacitor-plugin-phone-call
a phone call plugin for Capacitor3, apply for IOS/Android
Install
npm install capacitor-plugin-phone-call
npx cap sync
eg:
import { PhoneCall } from "capacitor-plugin-phone-call";
PhoneCall.start({ phone: "10086" });
···
API
start(...)
start(options: PhoneCallOptions) => any
Param | Type |
---|---|
options | PhoneCallOptions |
Returns: any
echo(...)
echo(options: { value: string; }) => any
Param | Type |
---|---|
options | { value: string; } |
Returns: any
detectCallState(...)
detectCallState(options: { action: string; }) => any
To enable / disable detection of calls options: { action: 'ACTIVATE' | 'DEACTIVATE' }
Param | Type |
---|---|
options | { action: string; } |
Returns: any
addListener(...)
addListener(eventName: 'callStateChange', listenerFunc: CallStateChangeListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Param | Type |
---|---|
eventName | "callStateChange" |
listenerFunc | (status: PhoneState) => void |
Returns: any
Interfaces
PhoneCallOptions
Prop | Type |
---|---|
phone | string |
SucessCallBack
Prop | Type |
---|---|
msg | string |
PluginListenerHandle
Prop | Type |
---|---|
remove | () => any |