Skip to main content
Douglas McCarroll
Inspiring
December 8, 2018
Question

SharedObject broken on Android 8?

  • December 8, 2018
  • 2 replies
  • 2662 views

Hi All,

My app uses SharedObject to store data locally without problems on iOS, and on my Android 5 device, but it doesn't work on my Android 8 device.

When I say that it doesn't work what I mean is that it appears to write and read successfully, but when I restart my app the saved SharedObject doesn't contain any data.

Have any of you seen this?

Thanks in advance,

Douglas

This topic has been closed for replies.

2 replies

Flipline
Inspiring
December 20, 2018

Very strange to hear you're having trouble with SharedObject, all of our apps use it and we haven't run into any issues with Android 8 or Android 9, haven't heard from any of our users having trouble with saves either.  We do use the permission for WRITE_EXTERNAL_STORAGE in our apps for saving images, but even if I manually disable that permission in Android 9 the SharedObjects are still working for me.

I'm trying to figure out if we're doing anything special that's letting it work.... are you using anything for your localPath in SharedObject.getLocal ?  We've always used "/" for our localPath instead of the null default, it puts the SharedObject in a different location when you do this.  I haven't really tested if it makes a difference what you use for apps, but might be worth a shot to try "/" for your localPath if you're not using one right now to see if that helps.

natural_criticB837
Legend
December 10, 2018

Hi Douglas,

which version of the Air SDK are you using? I remember there was a bug related to this: When the device was close to being out of disk space, say 100 MB, SharedObject would not save any data. We encountered this bug only on iOS though, but this one was definitely fixed in a later Air SDK, so you might want to update to Air 31 and try it out. I can definitely say that we have no issues saving data in the SharedObject in Android 8 with Air.

Good luck,

Ruben

Douglas McCarroll
Inspiring
December 10, 2018

Hi Ruben -

Thanks for your response. I'm using AIR 31. Also, my app checks regularly to see how much disk space is available, so I'm confident that I have more than 400 MB. But thanks for the thoughts in any case.

All -

I'm wondering if this could be a permissions issue. I have the vague impression that Android is requiring more permissions to do things, just as iOS is.

But I tend to assume that local SharedObjects are saved to the applicationStorageDirectory, and this shouldn't require a special permission ... ?

Douglas

Amrita Gangwani
Adobe Employee
Adobe Employee
December 11, 2018

Hi,

Thank you for reporting the issue!

Please log a bug on Tracker and attach a sample project for the same.