Any way to access the sdcard?

I’m working on an app that is currently in the apple app store and has over 100MB in resources. Due to the Google Play app size limit, we are getting around this issue by having the app download the necessary resources from out server after installing the app from Google Play. However, even when the app is installed to the sdcard, the system.DocumentsDirectory (ie “User Data” on Android) uses the phone’s internal memory. I’m using an HTC Desire with Android 2.2. This phone has only 140MB of usable internal memory, so it’s impossible for me to test the app on my device. In fact, a large number of Android devices will have problems installing our app.

Is there or will there be any way to read/write files on removable storage? Alternatively, is there or will there be ANY way to run very large Corona apps on Android? [import]uid: 112085 topic_id: 26976 reply_id: 326976[/import]

Hey there - following on from the other thread, you were asking about accessing the SD card - I don’t work with Android but I believe this thread discusses the solution for that; http://developer.anscamobile.com/forum/2011/04/21/android-move-sd-card-support

I see this thread talks more about how to save downloaded files on the SD card, I’m unsure of that off hand but will ask Josh (Android guru) if he has any insight on this first thing Monday morning. [import]uid: 52491 topic_id: 26976 reply_id: 113784[/import]

Hello. Did you mean to link a 2nd thread? I don’t see any information in that first thread about saving downloaded files. The first thread is about saving the app itself to sd, which is what we are doing. However, even when the app is installed to the sdcard, the system.DocumentsDirectory (ie “User Data” on Android) uses the phone’s internal memory, so downloaded files cannot be saved to the sd card. [import]uid: 112085 topic_id: 26976 reply_id: 113785[/import]

The link to that thread above was in relation to the other thread you posted in, in which the OP mentioned saving to SD card (it’s sometimes hard to keep track of multiple threads;)) - I understand you want a way to save downloaded files on the SD card which is what I hope to get information from Josh about on Monday morning, he’s the Android expert and will hopefully be able to shed some light on this.

Hope that clarifies!

Peach :slight_smile: [import]uid: 52491 topic_id: 26976 reply_id: 113881[/import]

Currently, Corona does not provide access to external storage on Android. So, there currently isn’t a good solution for you at the moment other than to inform the end-user that they are out of storage space and they need to free up additional space to make room for more of your app’s content.

In your particular case, I think the best solution is for us to add Expansion Files support, which allows your app to exceed the 50 MB barrier on Google Play. That’s on our to-do list and there is plenty of demand for it. You can find more details about this feature via the link below.

http://developer.android.com/guide/google/play/expansion-files.html
[import]uid: 32256 topic_id: 26976 reply_id: 113974[/import]

Ok. Thank you for the explanation. The Expansion Files support certainly would be a good solution. [import]uid: 112085 topic_id: 26976 reply_id: 113991[/import]

Isn’t there any way to save files using network.download to Android SD Card? Something like 

system.ExternalDirectory

that would point to 

Environment.getExternalStorageDirectory().toString();

on Android.

I ask this because I have an App that downloads files between 50Mb and 100Mb to a tablet.

We have not added any support for SD cards.

Isn’t there any way to save files using network.download to Android SD Card? Something like 

system.ExternalDirectory

that would point to 

Environment.getExternalStorageDirectory().toString();

on Android.

I ask this because I have an App that downloads files between 50Mb and 100Mb to a tablet.

We have not added any support for SD cards.

@ Rob 

Is this something that is being considered or worked on at Corona? We are also really hurting for SD Card access. Our main app downloads up to 150MB of new content to the device (and growing). We have also found that many lower-end Android devices can have as low as 1GB on internal disk memory only! The rest are supplemented by “internal” SD Cards that aren’t supported by Corona. The result is that our app keeps getting deleted by the user. 

Here is an example of a device that fits this category:

http://www.walmart.com/ip/Nextbook-7-Tablet-8GB-Memory/22127002

Even though it advertises at 8GB of memory, roughly 7 of it are actually on an internal SD Card, which Corona can’t access. Our experience is that any budget Android tablet (eg. any <$100 7inch tablet) has this issue.

We aren’t keen on using the expasion files either, since we have no control on when the assets gets downloaded. For us, it’s important to keep the APK download small, then as the user purchase/use additional assets, we download those…

Thanks,

Andrew

We are making a utilities plugin soon which will probably include this functionality

Please keep me posted!

@gremlin @Rob,

I was doing some more research into this, and I have another question. If we were to somehow get SDCard to work either through a Gremlin plugin or an upgrade to Corona Enterprise, would that enable the existing display.newImageRect(), audio.load(), etc to work for visual and audio assets? Or would the SDCard only work for data files that we manually read/write ther? 

Thanks!
Andrew

@ Rob 

Is this something that is being considered or worked on at Corona? We are also really hurting for SD Card access. Our main app downloads up to 150MB of new content to the device (and growing). We have also found that many lower-end Android devices can have as low as 1GB on internal disk memory only! The rest are supplemented by “internal” SD Cards that aren’t supported by Corona. The result is that our app keeps getting deleted by the user. 

Here is an example of a device that fits this category:

http://www.walmart.com/ip/Nextbook-7-Tablet-8GB-Memory/22127002

Even though it advertises at 8GB of memory, roughly 7 of it are actually on an internal SD Card, which Corona can’t access. Our experience is that any budget Android tablet (eg. any <$100 7inch tablet) has this issue.

We aren’t keen on using the expasion files either, since we have no control on when the assets gets downloaded. For us, it’s important to keep the APK download small, then as the user purchase/use additional assets, we download those…

Thanks,

Andrew

We are making a utilities plugin soon which will probably include this functionality

Please keep me posted!

@gremlin @Rob,

I was doing some more research into this, and I have another question. If we were to somehow get SDCard to work either through a Gremlin plugin or an upgrade to Corona Enterprise, would that enable the existing display.newImageRect(), audio.load(), etc to work for visual and audio assets? Or would the SDCard only work for data files that we manually read/write ther? 

Thanks!
Andrew

Any news about this matter?

We ended up upgrading to Enterprise edition.