Unable to initialize Client SDK on Android App API Level 31 Unable to initialize Client SDK on Android App API Level 31

Unable to initialize Client SDK on Android App API Level 31

Vonage API Support

Symptom

When an Android application is targeting API Level 31, the Nexmo Client SDK returns null and fails to initialize.

Applies To

  • Android Client SDK

Resolution

For Android on API Level 31 and above, the READ_PHONE_STATE is required. You need to have the READ_PHONE_STATE permission and you need to directly request the permission from the user. It is tagged as Protection level: dangerous which is similar to the permission requested for RECORD_AUDIO. 
 

Additional Information

Android Reference READ_PHONE_STATE