Hello everyone,
I have experienced an unexpected behavior while downloading content through Bitmovin Android SDK on some devices. Basically, downloaded content cannot be played and Bitmovin Player throw an error. So far it seems to impact Android 12 only.
How to reproduce this issue?
- Clone the Bitmovin sample code for Android apps (available here)
- Run the OfflinePlayback project
- Download “Art of Motion”
- Play “Art of Motion”
Results
- Expected → Content is successfully played
- Actual → The error below is displayed within the player
A general error occured: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean.java.lang.String.isEmpty() on a null object reference
After investigating the object OfflineSourceConfig
, I’ve figured out two fields were set to null
:
cacheDirectory = "null"
trackStateFile = "null"
Even after enabling all permissions to access device storage, the same issue occurs. However it seems to impact only some devices. Here are a few example:
Can play after download
- Oppo A95 (Android 11)
- Huawei P30 (HarmonyOS 2.0.0)
Cannot play after download
- Samsung Galaxy S10e (Android 12)
- Samsung A51 (Android 12)
Further investigation
After checking logs in the Logcat, I could find this line while downloading content on Samsung devices:
W/System: A resource failed to call release
At this point I have no idea where this issue comes from. It seems to be related to SQLite somehow.
Does anyone faced this issue previously and find a way to solve it?
Any help would be really appreciated.
Thank you in advance for your time,
–
Vivian Chaizemartin