# Cannot play downloaded content on some Android devices

**URL:** <https://community.bitmovin.com/t/cannot-play-downloaded-content-on-some-android-devices/873>\
**Category:** Support\
**Tags:** bitmovin-player, android\
**Created:** [June 15, 2022, 4:44am UTC](https://community.bitmovin.com/t/cannot-play-downloaded-content-on-some-android-devices/873 "2022-06-15T04:44:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![admin.vodfactory](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/admin.vodfactory/32/438_2.png) [@admin.vodfactory](https://community.bitmovin.com/u/admin.vodfactory)\
**Post date:** [June 15, 2022, 4:44am UTC](https://community.bitmovin.com/t/cannot-play-downloaded-content-on-some-android-devices/873/1 "2022-06-15T04:44:23Z")

</div>

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](https://github.com/bitmovin/bitmovin-player-android-samples))
2. Run the [OfflinePlayback](https://github.com/bitmovin/bitmovin-player-android-samples/tree/main/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`

 ![2022-06-14 09.25.39](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/372ec02ad8043d4008d30b9082e9e0199cd586f1.jpeg)

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

---

<div class="post-metadata">

**Author:** ![anon63174557](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@anon63174557](https://community.bitmovin.com/u/anon63174557)\
**Post date:** [June 15, 2022, 7:40am UTC](https://community.bitmovin.com/t/cannot-play-downloaded-content-on-some-android-devices/873/2 "2022-06-15T07:40:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![admin.vodfactory](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/admin.vodfactory/32/438_2.png) [@admin.vodfactory](https://community.bitmovin.com/u/admin.vodfactory)\
**Post date:** [June 17, 2022, 6:48am UTC](https://community.bitmovin.com/t/cannot-play-downloaded-content-on-some-android-devices/873/3 "2022-06-17T06:48:00Z")

</div>

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

Have a nice day!
