Cannot play downloaded content on some Android devices

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?

  1. Clone the Bitmovin sample code for Android apps (available here)
  2. Run the OfflinePlayback project
  3. Download “Art of Motion”
  4. 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

1 Like

Hi @admin.vodfactory,

your observation is correct. We were seeing the same behaviour unfortunately when trying our offline sample on Android 12 recently. The issue is that in the sample we use Gson to pass the source config from the Main- to the PlayerActivity. Gson seems to have a problem there with serializing both files you mentioned. We are currently investigating and probably updating the affected sample soon.

Offline functionality in the player should work without problems though. So to workaround the problem in the sample you could try parceling the OfflineSourceConfig and pass it to the PlayerActivity instead of the Json.

2 Likes

Hi @jarhoax ,
Thank you very much, getting ride of Gson serialization solved the problem.

Have a nice day!

1 Like