05-02-2014 09:35 AM
I am looking to convert my current AIR apps to either Android/AIR apps or Cascades apps and am wondering how I would go about accessing the existing SharedObject data when using these different development enviroments.
For the Android/AIR app I had at least hoped that identical code could get the same objects, but apparently this does not work.
05-03-2014 07:06 PM
What part is not working? Is the captive AIR runtime in Android not finding the SharedObject due to maybe being in a different BB10 directory in whatever sandbox structure is created for AIR-on-Android apps? I would think that should be abstracted away by AIR filesystem API's, as long as the proper calls are made. Or are you saying that you get a reference to your shared object but can't do CRUD operations because of some problem accessing the keys?
Not snarking you here, but rather a genuine question. I have yet to look into the Android route for converting my AIR apps.
05-07-2014 10:35 AM
I have looked into this a bit more and it can find the SharedObject, but the data always comes back with a value of 0
05-08-2014 05:55 PM
I have just tried to get around this by saving the data in a SQLite table, but this also was not seen by the Android version of the app...
05-08-2014 06:43 PM
It was claimed in the AIR porting office hours webcast that Android AIR apps should have access to existing user persisted data from the app sandbox of existing app installs, at least for sqlite db's.
At this point it would be very, very good to see working demo code demonstrating this assertion from BlackBerry, so that folks in this situation don't have to independently re-invent the wheel.
05-09-2014 12:46 PM
My experience is that SQLite doesn't work any better than SharedObjects.
As you said I would love to see a working demo of an Android app that is able to read user data from an AIR app...
05-09-2014 01:06 PM - edited 05-09-2014 01:11 PM
The sooner we can see such demo code the better.
Because if it turns out that Android AIR apps in fact cannot access existing user persisted data in existing installs of native AIR apps, then devs are going to need to:
1) Create an update to existing native AIR apps that exports user persisted data (if the app does not already have this functionality), and get users to understand that it's important for them to download that update, prior to them ever updating their OS to 10.3.1 when that drops, and prior to them downloading the next, Android AIR version of the app.
2) Make sure users understand that just before they download the next, Android AIR version of the app, they need to export their then-current persisted data.
3) Create the Android AIR version of their app, and add a persisted data import function if it does not already exist.
4) Release the two app updates in sequence and with enough time between the two updates and the release of 10.3.1 that users understand what they need to do to hang on to their persisted data, and do it, without skipping any steps in the sequence.
This is very messy, to put it mildly.
05-09-2014 01:08 PM
And by the way, if the above described sequence turns out to be necessary, it's very likely that some users will not get the memo, will end up losing their persisted data, and will blast developers in app reviews and forums for that.
05-09-2014 10:23 PM