Uses-permission

Name Permission Type Feature
android.permission.INTERNET * Normal  
android.permission.ACCESS_NETWORK_STATE * Normal  
android.permission.CAMERA Runtime Voice and Video
Photo and File Sharing
android.permission.RECORD_AUDIO Runtime Voice and Video
Audio Message
android.webkit.resource.AUDIO_CAPTURE Runtime Voice and Video
android.webkit.resource.VIDEO_CAPTURE Runtime Voice and Video
android.permission.MODIFY_AUDIO_SETTINGS Normal Voice and Video
android.permission.FOREGROUND_SERVICE Normal Photo and File Sharing
android.permission.VIBRATE Normal Vibrate on new incoming message
android.permission.FOREGROUND_SERVICE_DATA_SYNC
Android 14 and above
Normal Voice and Video
Audio Message
Photo and File Sharing
android.permission.READ_EXTERNAL_STORAGE
For SDKs previous to 5.20.1
Runtime Voice and Video
Audio Message
Photo and File Sharing
android.permission.WRITE_EXTERNAL_STORAGE
For SDKs previous to 5.20.1
Runtime Voice and Video
Audio Message
Photo and File Sharing
android.permission.READ_MEDIA_IMAGES
For SDKs previous to 5.20.1
and Android 13 and above
Runtime Voice and Video
Audio Message
Photo and File Sharing

* Required permission

When a project has LivePerson Android SDK (lp_messaging_sdk) as one of dependencies, all of the other permissions will be merged into the final AndroidManifest.xml. Any of these permissions can be removed if the application does not use it.
Example: If an application does not implement Voice and Video yet, then it can remove corresponding permissions:

  • Declare tools namespace in the element, to use merge rule maker, as shown here:
          <manifest xmlns:android="http://schemas.android.com/apk/res/android"
            package="com.example.myapp"
            xmlns:tools="http://schemas.android.com/tools">
    
  • Remove permissions from the merged manifest by using tools:node="remove"
          <uses-permission android:name="android.webkit.resource.AUDIO_CAPTURE" tools:node="remove"/>
          <uses-permission android:name="android.webkit.resource.VIDEO_CAPTURE" tools:node="remove"/>
          <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" tools:node="remove"/>
    

Use merge rule makers carefully when the application has multiple dependencies.

SDK Foreground services

SDK is using foreground service to upload/download files like DOC, PPTX, XLSX, uploading/downloading images, and uploading voice messages if upload_photo_using_service is set to true.

According to the documentation, foregroundServiceType is set to dataSync which matches the Use Case.

Android 14 Support and Google play review

Starting from Android 14, components that use foreground service should use an appropriate permission to make it work correctly. LivePerson Android SDK uses this permission to start foreground service for Photo and File Sharing and to upload Audio Messages recorded by consumer.

Google Play requires a description to mention the reason why this type of permission. Otherwise your app will fail the review. There are some options to complete review successfully:

  1. Once your app doesn't support file sharing from both agent and consumer side, you can do these steps:
    • Set upload_photo_using_service to false, so LivePerson SDK will not even try to upload/download files or media using service. SDK will use executors(threads) instead.
    • Set [enable_file_sharing] to false so consumer will not be able to share a file.
    • Disable file and photo sharing in Account Settings.
    • Remove mentioned permissions from your manifest explicitly once your app components don't use foreground service at all:
            <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" tools:node="remove"/>
            <uses-permission android:name="android.permission.FOREGROUND_SERVICE" tools:node="remove"/>
      

    Note: if your app uses this type of permissions, then in Google Play console specify the reason of usage only related to application's flow.

  2. Once your app supports file sharing from both agent and consumer side, but you don't want to be blocked by foreground service permission, you can do these steps:
    • Set upload_photo_using_service to false, so LivePerson SDK will not even try to upload/download files or media using service. SDK will use executors(threads) instead.
    • Remove mentioned permissions from your manifest explicitly once your app components don't use foreground service at all:
            <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" tools:node="remove"/>
            <uses-permission android:name="android.permission.FOREGROUND_SERVICE" tools:node="remove"/>
      

    Note: if your app uses this type of permissions, then in Google Play console specify the reason of usage only related to application's flow.

  3. Once your app supports file sharing from both agent and consumer side, and you want to use foreground service to perform uploading or downloading:
    • Set upload_photo_using_service to true, so LivePerson SDK will use services for this type of operation strictly.
    • In Google Play Console specify the reason to use FOREGROUND_SERVICE_DATA_SYNC permission. According to the documentation, foregroundServiceType is set to dataSync which matches the Use Case "Network transfer: Upload or download". The description of the use case is "Uploading/downloading files and media using foreground service". You can also leave links to Photo and File Sharing or Audio Messages. These are types that are supported to share between agent and consumer in LivePerson SDK.

Uses-feature

Name Feature
android.hardware.audio.pro Voice and Video
android.hardware.microphone Voice and Video

Declare these features enables Google Play filter your application from devices that do not meet its hardware requirements. You can disable the filter by using merge rule makers. Check more in Voice and Video.