6.6.10 • Published 4 months ago

capacitor-speaker-phone-toggle v6.6.10

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@capacitor-speaker-phone-toggle

Capacitor plugin to audio toggle

Install

npm install capacitor-speaker-phone-toggle
npx cap sync

Import the plugin: In your code, import the plugin:

import { AudioToggle } from 'capacitor-speaker-phone-toggle';

In Android, If you face sound is not toggling, please check permission in your AndroidManifest.xml file

    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>

API

setSpeakerOn(...)

setSpeakerOn(data: { speakerOn: boolean; }) => Promise<void>
ParamType
data{ speakerOn: boolean; }

reset()

reset() => Promise<void>

addListener('speakerOn', ...)

addListener(eventName: 'speakerOn', listenerFunc: (data: { status: boolean; }) => void) => Promise<PluginListenerHandle>
ParamType
eventName'speakerOn'
listenerFunc(data: { status: boolean; }) => void

Returns: Promise<PluginListenerHandle>


removeAllListeners()

removeAllListeners() => Promise<void>

Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>
6.6.10

4 months ago

6.6.9

4 months ago

6.6.8

4 months ago

6.6.7

4 months ago

6.6.6

4 months ago

6.6.5

4 months ago

6.6.4

4 months ago

6.6.3

4 months ago

6.6.2

4 months ago

6.6.1

4 months ago

6.6.0

4 months ago

6.5.2

4 months ago

6.4.2

4 months ago

6.3.2

4 months ago

6.3.1

4 months ago

6.3.0

4 months ago

6.1.0

4 months ago

6.2.0

4 months ago

3.1.0

4 months ago