Skip to main content

Declaring Permissions

To use the TextToSpeech SDK API, you must declare the TTS_SERVICE permission in your app's AndroidManifest.xml.

AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="pleos.car.permission.TTS_SERVICE" />

<application>
<!-- ... -->
</application>
</manifest>

This permission is required for accessing APIs related to TextToSpeech services, such as SDK initialization, event listener registration, app registration, and voice synthesis requests.

caution

If you do not declare the permission, SDK initialization or API calls may fail. If PERMISSION_DENIED is returned in the error callback, check whether the permission is allowed in the app's manifest and execution environment.

Once you have declared the permission, initialize the SDK.