Closed jabawack81 closed 6 years ago
Thanks. I'll check it out in a bit.
On May 24, 2017 11:16 AM, "Fabbri Paolo" notifications@github.com wrote:
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.
You can view, comment on, or merge this pull request online at:
https://github.com/agamemnus/cordova-plugin-xapkreader/pull/99 Commit Summary
- remove autodownload
- Merge pull request #1 from AmigoPartnership/cordova-6.5. 0-remove-autodownload
File Changes
- M README.md https://github.com/agamemnus/cordova-plugin-xapkreader/pull/99/files#diff-0 (40)
- M plugin.xml https://github.com/agamemnus/cordova-plugin-xapkreader/pull/99/files#diff-1 (22)
- M src/android/XAPKReader.java https://github.com/agamemnus/cordova-plugin-xapkreader/pull/99/files#diff-2 (20)
Patch Links:
- https://github.com/agamemnus/cordova-plugin-xapkreader/pull/99.patch
- https://github.com/agamemnus/cordova-plugin-xapkreader/pull/99.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/agamemnus/cordova-plugin-xapkreader/pull/99, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFJWJjOpiOEW4_hMAWa95rk2Sis1BNxks5r9EnRgaJpZM4NlQxw .
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
?
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.
@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?
@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
@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
Can you please verify that the xapk_auto_download is actually set to false in the xml file as expected?
My mistake.
Apparently the property xapk_auto_download is been setted only on installation of the plugin, making my pull request useless.
Sorry again
That's weird. Maybe we can have this in the readme somewhere. Thank you for the update!
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.