OBB file on extSD
Not sure if this is an issue but I don't seem to be able to manually test my OBB file when it is on the external SD. Works OK when on the internal SD. Should it work on the External SD using these or other settings? I would like to target the extSD ... just because there is more space there!
I am using ... Command line :
cordova platform add [email protected]
config.xml :
<preference name="android-maxSdkVersion" value="24" />
<preference name="android-installLocation" value="preferExternal" />
Not sure. It should work theoretically. Is that the settings for Cordova 6.5? Try it on that version first...
I am using Cordova 6.5.0
Surely someone has experience using the xapkreader plugin and stores the obb files on the extSD.
I tried looking in stack overflow with this search... Cordova expansion file extsd
... but no hits.
Yeah I think someone else wrote about this in the issues pages? It just gets really complex. I completely forgot all the details.
Does xapkreader do anything in the code to support accessing the OBB file if the it is not located on the internal SD but instead located on the extSD? Or does Android OS just handle switching the path so that the app is agnostic as to on which storage the the OBB is stored?
There is indeed code there to figure out the path...
... but is there the switch code between internal and extSD?
Who originally wrote the xapkreader plugin? Are they still around?
Intel. But then I reworked it.
https://github.com/agamemnus/cordova-plugin-xapkreader/blob/cordova-6.5.0/src/android/XAPKExpansionSupport.java
That file has the code for figuring out the path...
OK thanks! I will try to see if this solves the problem of making the cordova app with OBB file movable to the SD card.... https://ourcodeworld.com/articles/read/171/how-to-enable-the-move-to-sd-card-feature-in-a-cordova-app-for-android
The link above had me add the cordova-custom-config plugin which made sure the android:installLocation="preferExternal" is automatically taken from the Config.xml and "properly" added to the manifest so the app can be movable by the user to and from the External/Internal storage.
So now when i look at the app's storage settings [on my S7] I get the option to move the app to the external storage. It dutifully runs a gas gage showing that the app (and data?) are being moved to the external storage. When complete the app storage location indicator changes from Internal to External.
I looked at the external storage with a file manager and no folder was made for the app data being moved to external. When I run the app it [runs!] but appears to still be using the internal obb file. I know this because when I rename the internal obb app folder the links to the obb file no longer work.
Any ideas why the obb folder/file would not have been copied over?
When I try manually copying the obb folder/file over to the correct location on the external SD the app does not try to read it there.
I thought maybe it is a permissions thing... but the manifest shows this line...
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Is there a forum where would be best to ask for help on this?
Android Central, perhaps.
On Thu, Apr 19, 2018, 1:05 AM BobAchgill [email protected] wrote:
The link above had me add the cordova-custom-config plugin which made sure the android:installLocation="preferExternal" is automatically taken from the Config.xml and "properly" added to the manifest so the app can be movable by the user to and from the External/Internal storage.
So now when i look at the app's storage settings [on my S7] I get the option to move the app to the external storage. It dutifully runs a gas gage showing that the app (and data?) are being moved to the external storage. When complete the app storage location indicator changes from Internal to External.
I looked at the external storage with a file manager and no folder was made for the app data being moved to external. When I run the app it [runs!] but appears to still be using the internal obb file. I know this because when I rename the internal obb app folder the links to the obb file no longer work.
Any ideas why the obb folder/file would not have been copied over?
When I try manually copying the obb folder/file over to the correct location on the external SD the app does not try to read it there.
I thought maybe it is a permissions thing... but the manifest shows this line...
Is there a forum where would be best to ask for help on this?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/agamemnus/cordova-plugin-xapkreader/issues/122#issuecomment-382611555, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFJWPiy7jm5VGodUZlPJDVFT5RMOAHmks5tqBsygaJpZM4TXp_3 .
I posted this to Android Central... https://forums.androidcentral.com/android-apps/883693-expansion-file-not-moved-extsd.html#post6226447
Expansion file not moved to extSD
When I try to use the app storage setting menu on my S7 to move my app made with Cordova from internal to external storage the OBB expansion file does not move over though the app storage settings indicator does change from internal to external.
I just don't know the appropriate settings here, and it changes all the time to boot...
Also posted the question on the Android Forums... https://androidforums.com/threads/cordova-obb-expansion-file-not-moved-to-external-storage.1264878/
Looks like, from Android5.0 onwards, cordova-plugin-xapkreader plugin would need to be upgraded to support using the serial number of the extSD in the path in order to support moving the app and OBB to the extSD...
... or is there a way to hack so that cordova-diagnostic-plugin can be used to make cordova-plugin-xapkreader redirect to the correct place to both move/write and read the externally stored OBB?
I posted this feature request to cordova-diagnostic-plugin for some how it to help cordova-plugin-apkreader in storing app and OBB expansion files on external storage. https://github.com/dpa99c/cordova-diagnostic-plugin/issues/299
Dave Alden with cordova-diagnostic-plugin says:
getExternalSdCardDetails() will provide the filepath(s) to external removable storage locations.
These filepaths can be used along with cordova-plugin-file to read/write files to this location. Or you could enhance cordova-plugin-xapkreader to do this.
getExternalSdCardDetails() is a function in his cordova-diagnostic-plugin.
@agamemnus are you able to add external (removable) storage support to cordova-plugin-xapkreader so that apps (Android 5 and beyond) can have their install moved to extSD ?
Maybe you can try updating the code and then submit a PR? I am very busy... if not, maybe the weekend.
I'm not a developer. :(
Most of my users in developing countries will not have enough internal free space to install the free 1.5GB literacy app. Hence, my quest to get the support for ...
<preference name="android-installLocation" value="preferExternal" />
to work.
One other random thought... Can I just compile using something less than android@5 and skirt the issue that way? Or does this issue result because the device's Android level is beyond 5?
The latter, I am pretty sure.
Your donor gittip link does not work in your readme.
Ha. Yeah they shut the system down. How about I will update that when I also update the file system code?
On Tue, Apr 24, 2018, 9:36 PM BobAchgill [email protected] wrote:
Your donor gittip link does not work in your readme.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/agamemnus/cordova-plugin-xapkreader/issues/122#issuecomment-384133408, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFJWNuyslTrdPdzqA2CHlGxB_HRb0eyks5tr9MggaJpZM4TXp_3 .
Yeah same problem here. Pls give a solution for how to move obb on SD.
@agamemnus any chance you can implement this fix soon?
getExternalSdCardDetails is a function on cordova-diagnostic-plugin... so I would have to copy their code.... not an MIT license..... bit of a headache...... might have to do my own.
Maybe this weekend, sorry.
Any progress over the weekend?
I am on a deadline for a thing, so no progress.
Maybe this weekend?
Maybe.
On Fri, May 11, 2018 at 1:28 PM, BobAchgill [email protected] wrote:
Maybe this weekend?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/agamemnus/cordova-plugin-xapkreader/issues/122#issuecomment-388431059, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFJWFLYA7C9kfk60j0wRyitRjL9GEYRks5txcpEgaJpZM4TXp_3 .
Maybe this week?
Maybe...
On Tue, May 29, 2018, 2:14 AM BobAchgill [email protected] wrote:
Maybe this week?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/agamemnus/cordova-plugin-xapkreader/issues/122#issuecomment-392663735, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFJWFBP9Pfa6y-BzEP-SNC-UJzrrzP8ks5t3OdEgaJpZM4TXp_3 .