Skip to content
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

Remove Autodownloader #99

Closed
wants to merge 4 commits into from
Closed

Remove Autodownloader #99

wants to merge 4 commits into from

Conversation

jabawack81
Copy link

Using this plugin I get an error on boot when it tries to download the OBB file and setting the variable XAPK_AUTO_DOWNLOAD to false it was unsuccessful and I noticed that the play store is already download the obb file by default so I went nuke and remove all the code related to the autodownload and now everything is working perfectly and as a byproduct the splashscreen started working again.

@agamemnus
Copy link
Owner

agamemnus commented May 24, 2017 via email

@agamemnus
Copy link
Owner

Your pull request would remove too much from the readme....

Also, the reason for the splash screen working isn't necessarily the removal of the auto-download feature. They must have changed the behavior, or are you using the code I provided? (which would only work with XAPK_AUTO_DOWNLOAD set to "false"?

@continuousjr: Since you added this auto download thing, do you have any ideas as to what's going on here? Is bundle.getBoolean("xapk_auto_download", true); correct? Does "false" map to false and "true" to true?

@jabawack81
Copy link
Author

for the readme is a mistake I intended to delete only the part regarding the splash screen and I'll restore the part I've removed by mistake.

I've tried the code in the readme and with or without that code and with XAPK_AUTO_DOWNLOAD setted to true or false and I hal always the same result no splashscreen and error or a notification for the download with always 0/0kb and 0% and once I've removed thisp plugin the splashscreen was working again so I went fonr the nuke solution.

@continuousjr
Copy link

@agamemnus I pulled down the latest version of the plugin and confirmed that the XAPK_AUTO_DOWNLOAD behavior is working as expected (as is the call to bundle.getBoolean -- "true" maps to true and "false" maps to false). I also confirmed that removing the auto download code or setting XAPK_AUTO_DOWNLOAD to true is still preventing the splash screen from showing up whereas setting XAPK_AUTO_DOWNLOAD to false allows the splash screen to show.

As best I can tell, setting XAPK_AUTO_DOWNLOAD to false has the same effect as this PR. That said, I don't believe it's safe to set XAPK_AUTO_DOWNLOAD to false and NOT also include the code that explicitly calls downloadExpansionIfAvailable. According to Google's documentation (https://developer.android.com/google/play/expansion-files.html), you cannot assume that the OBB file will always be downloaded/installed when the APK is installed and, therefore, need to include code to automatically download it.

@jabawack81 Not sure why you and I are seeing different behavior with regard to the splash page. Can you double check that XAPK_AUTO_DOWNLOAD is set to false in platforms/android/res/values/xapkreader.xml and that your splashscreen is not showing when this is the case? Also, what versions of cordova, cordova-android, and cordova-plugin-splashscreen are you using?

@jabawack81
Copy link
Author

@continuousjr at the moment I'm using
Cordova v 6.5.0
Cordova Android Platform v 6.2.3

To test this problem:

without any of the two plugin: the splash screen is shown
with the basic plugin and XAPK_AUTO_DOWNLOAD is set to true: the splash screen is NOT shown
with the basic plugin and XAPK_AUTO_DOWNLOAD is set to false: the splash screen is NOT shown
with my version: the splash screen is shown

all the test are run on a one plus one with Android 6.0.1 Cyanogen 13.1.2

@continuousjr
Copy link

@jabawack81 I've tried several times now to reproduce the behavior where XAPK_AUTO_DOWNLOAD is set to false and the splash screen is NOT shown. I've been unsuccessful every time. What I've found, though, is that the only way to change the value of that variable and have it "stick" is to uninstall and then reinstall the plugin, using the --variable flag. You can check the actual value being used by looking at platforms/android/res/values/xapkreader.xml (look for false). Editing this file directly or editing android.json or fetch.json does not actually update the value.

Can you please verify that the xapk_auto_download is actually set to false in the xml file as expected?

@jabawack81
Copy link
Author

My mistake.

Apparently the property xapk_auto_download is been setted only on installation of the plugin, making my pull request useless.

Sorry again

@jabawack81 jabawack81 closed this Aug 3, 2017
@agamemnus
Copy link
Owner

That's weird. Maybe we can have this in the readme somewhere. Thank you for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants