-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OBB file on extSD #122
Comments
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... ... 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. That file has the code for figuring out the path... |
OK thanks! |
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? |
Android Central, perhaps.
…On Thu, Apr 19, 2018, 1:05 AM BobAchgill ***@***.***> 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
<#122 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADFJWPiy7jm5VGodUZlPJDVFT5RMOAHmks5tqBsygaJpZM4TXp_3>
.
|
I posted this to Android Central...
|
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... |
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. |
Dave Alden with cordova-diagnostic-plugin says:
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 ...
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 ***@***.***> 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
<#122 (comment)>,
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? |
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 ***@***.***> wrote:
Maybe this weekend?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADFJWFLYA7C9kfk60j0wRyitRjL9GEYRks5txcpEgaJpZM4TXp_3>
.
|
Maybe this week? |
Correction on my testing... The adding code to move the OBB directory and expansion file to the extSD and back sounds good. So the Android OS doesn't do that?? I say "move " because that frees up the space on the internal memory... the whole reason for moving an app to the extSD. And being able to move back... because the user sees a button that allows that round trip. |
Maybe not: http://www.tomshardware.com/answers/id-2798563/move-obb-data-files-andriod-card.html Perhaps one way is to check the obb folder on startup... if it doesn't have the files, check the other location, see if they are there, and then (if they're there) ask the user if they want to move the files. If they aren't, then re-download the files... But at this point, isn't the primary problem solved? |
Original Question... I don't know the stats for Android 4 devices in developing countries. That's my target. It would be nice if "they" were included in the "fix" if it's easy to determine why the code on Android 4 devices is still looking for the OBB expansion file on the internal storage when the app has been moved to extSD. The cheaper phones have less internal storage hence the reason I'm trying to give the user the extSD app/data store option. If you want me to open a separate issue for the remaining questions ... I can. Remaining parts...
Though these two issues seem to be integral to the subject issue. I see that your idea for moving the data will work but why not use the app move button to trigger the move process? Does the move button force a shutdown of the app as its moved? If so then yes... that solution will be good. Otherwise, wouldn't the user be left wondering why the data did not get moved when the app was moved? And one more |
"I see that your idea for moving the data will work but why not use the app move button to trigger the move process?" Well, that would only work if there was some instant way for the app to know that happened. There might or might not be a way. I couldn't find a way yet. But definitely on startup it would know if the files were missing... I am still lost on how this process that you want should happen and what happens now... I think you mentioned it before, but I forgot. So the user downloads it from the app store and then you tell them to move it? Or... |
This will be added to the config so that the install will default prefer installing the apk and OBB externally if the extSD exists. The plugin will find this install setting in the manifest. If the app developer chooses not to set this I think it defaults to "auto" or "internal". <manifest xmlns:android="http://schemas.android.com/apk/res/android" Later the user can opt to move the app/OBB expansion data to internal using the application storage option button. Reference: |
But does the user even know this option exists though? What % of the time are they trying to do it? If this is something a lot of users want, maybe it would be better to ask directly in the app (on launch) where the user wants it stored. |
It seems to be pretty much a standard that apps that are extSD storage enabled give the control button in the app storage setting window. It was hard for me to find that button but that is where it is... typically. As far as offering the choice of where to store the expansion file (internal or extSD) at initial launch... If you can't give the user storage footprint comparison stats then I'm fine with going with using the Storage preferred location setting in the config. 95 percent of my users will never have enough internal room to store the 1.5GB expansion file... so asking them at launch with stats will just be a good reminder that they will soon need larger extSD. :) |
Normally, the obb download happens immediately after clicking to download the file from Google Play (at the same time as the apk) ...... I'm not sure what's going on anymore. I forgot if you were even getting the file from Google Play... presumably, you are... |
Correct. "The obb download happens immediately after clicking to download the file from Google Play (at the same time as the apk)." What I am recommending is that the plugin support the preferred storage location attribute that the developer sets in the config. Maybe it does already do this?? I don't know because I have been doing manual tests (without Google play). |
Remaining issues...
|
I'm just saying, if there is no space it I think will tell you and won't
download it, I think. Maybe it will ask if you want to install it in the
external drive space. Unclear, memory foggy. You should really just publish
it in some way (maybe as a beta test) to test it out.
…On Thu, Jun 21, 2018, 11:56 AM BobAchgill ***@***.***> wrote:
Remaining issues...
1. support storage location move button
2. Android 4.x
3. *support preferred storage location attribute in manifest on
initial download.
- maybe it already does this
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADFJWNaFCZ65HbODm1BU-BeH0U4Ojcq1ks5t-8IrgaJpZM4TXp_3>
.
|
Ok! |
Ok, can try but it just doesn't seem too important if the users will use Google Play as they probably won't be able to download it without sufficient space anyway... So it wasn't working on 4.x before? Or was? (Are you only testing with 4.x?) |
(Although you can change settings on Google Play to set preferred install location... and it just might go to the area with the available space, so seems like a non-issue except for the 4.x problem...) |
I did not test with 4.x before. |
Looks like the method for setting Google Play to download to ExtSD is a hack. It takes over the ExtSD and wipes all other data. Does not appear to be a Google recommended method. And may not work on all devices. |
I'll do a full system test with downloading from Google play. My guess is that the plugin code handles the download of the OBB file and writes to storage. .... if so then you would make the same changes you made to get Android 5+ to work for reads of ExtSD data.... to the downloader for writes to the extsd. |
So far I have tested download from Google play using a Android 4.2.2... here is what happened... Next, Next, So Next, I move the OBB/file over with file manager to the expected location in internal storage... And when I try to run the app again it still fails trying to download assets. It appears that either way the app can not read the obb/file on either internal or extSD storage so it trys to download the file?? I will try the Android 7.0 test tomorrow. |
Test on Android 7 fails same way... |
Something isn't right .... should be working since the latest patch came from a user for whom it works. Can you make a link to the file? |
https://play.google.com/apps/internaltest/4699174589605622933 I may need to approve your email address? Give it a try. |
Ok [redacted].
|
Added |
OK. Doesn't work for me either. Will investigate tomorrow.
…On Fri, Jun 29, 2018, 11:15 PM BobAchgill ***@***.***> wrote:
Added
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADFJWNRmC-Z8SuGfye7Pi_NwSyEUXI8lks5uBu1hgaJpZM4TXp_3>
.
|
I have seen people mention this kind of thing before... any way you could send me the uncompiled file to look at so I could check the settings? |
It appears to work with Android 7 now. The download of the app does not appear to honor the storage location pointer to have the app prefer to install on external storage. This makes it very difficult if not impossible for the user who does not have enough internal storage to download the app. |
second part is expected behavior...... does it download to external storage?
…On Sun, Jul 1, 2018 at 5:53 PM, BobAchgill ***@***.***> wrote:
It appears to work with Android 7 now.
With one caveat...
When I move the app to external storage ... the app moves and the obb copy
over to ext storage but it still looks for the OBB on the internal
storage... and if I delete the OBB from ext storage it starts downloading
the expansion file again from Google play.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADFJWBW2JyGag0J6W5ba_uv08hHUK7YDks5uCUTegaJpZM4TXp_3>
.
|
Testing with Android 7.x... It will not install the app to the external storage using this... Once it is installed it is possible to move the app to external storage but not the obb. So there is no scenario where the obb can be stored/accessed on the ext storage. My guess is that it did not initially install the app to the preffered ext storage because it knew that it could not also write to the obb file to ext storage?? |
Huh. Ok, I'll do some more tests tomorrow.
…On Sun, Jul 1, 2018, 10:43 PM BobAchgill ***@***.***> wrote:
Testing with Android 7.x...
It will not install the app to the external storage using this...
Once it is installed it is possible to move the app to external storage
but not the obb.
So there is no scenario where the obb can be stored/accessed on the ext
storage.
My guess is that it did not initially install the app to the preffered ext
storage because it knew that it could not also write to the obb file to ext
storage??
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADFJWO_pmIxDd44oC5St-aNC2cSaEYSoks5uCYjFgaJpZM4TXp_3>
.
|
With preferred install storage location set to extSD... Test case 1: Android 7.x Test case 2: Android 4.4.2 What is hoped for is that some how the OBB can be stored and accessed on the extSD on initial install to save space on the User's internal storage. |
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 :
config.xml :
The text was updated successfully, but these errors were encountered: