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

Problem when starting the application #108

Closed
DenisVedin opened this issue Aug 9, 2017 · 11 comments
Closed

Problem when starting the application #108

DenisVedin opened this issue Aug 9, 2017 · 11 comments

Comments

@DenisVedin
Copy link

DenisVedin commented Aug 9, 2017

Good afternoon.
There are problems when working with the plugin. During the testing of the application, there is an infinite download of the add-on file, i.e. When you launch it, application is trying to download the file, an error message appears immediately, and in the notification pane there is a message about downloading of the file with the size of -0.00MB / -0.00MB (Screenshots are attached).
screenshot_2017-08-09-11-49-46
screenshot_2017-08-09-11-49-30

@DenisVedin
Copy link
Author

Thanks, the question is solved. It was necessary to add XAPK_PUBLIC_KEY in config.xml and XAPK_PATCH_VERSION: -1 in android.json.

@stihl-sicher
Copy link

Hi,
I run into the same issue. I tried the suggested changes (public key was already there but patch-version was set to 0. So I changed this to -1.
App still tries to download asset which fails and infinite download remains.
@DanteShade: could you share your other settings in config.xml
And which URL do you use to load content from the expansion file?

Best regards,

@stihl-sicher
Copy link

Well, I have to change my error description: I changed the XAPK_PATCH_VERSION to -1
but when I run the build process, the value is set to 0 automatically.
Is there another place to set these options?
Do I have to set "XAPK_MAIN_VERSION"?

@agamemnus
Copy link
Owner

agamemnus commented Feb 5, 2018 via email

@stihl-sicher
Copy link

Hi,
thanks for your fast reply @agamemnus
I have changed values in android.json but config.xml ist still "corrected" to 0. :(

This is my part from config.xml:

    <plugin name="com.flyingsoftgames.xapkreader" spec="https://github.com/agamemnus/cordova-plugin-xapkreader.git#cordova-6.5.0">
        <variable name="XAPK_EXPANSION_AUTHORITY" value="eu.mapone.badreichenhall.expansion" />
        <variable name="XAPK_PUBLIC_KEY" value=".....my Base64 String from Store....." />
        <variable name="XAPK_TEXT_DL_ASSETS" value="Downloading assets…" />
        <variable name="XAPK_TEXT_PR_ASSETS" value="Preparing assets…" />
        <variable name="XAPK_TEXT_DL_FAILED" value="Download failed." />
        <variable name="XAPK_TEXT_ERROR" value="Error." />
        <variable name="XAPK_TEXT_CLOSE" value="Close." />
        <variable name="XAPK_MAIN_VERSION" value="0" />
        <variable name="XAPK_PATCH_VERSION" value="0" />
        <variable name="XAPK_MAIN_FILESIZE" value="0" />
        <variable name="XAPK_PATCH_FILESIZE" value="0" />
        <variable name="XAPK_AUTO_DOWNLOAD" value="true" />
        <variable name="XAPK_PROGRESS_FORMAT" value="percent" />
    </plugin>

How do I reference an image in the expansion file?
I have found:
content://eu.mapone.badreichenhalltest.expansion/main_expansion/
as a preline to the image path where eu.map.....est.expansion is related to the value "XAPK_EXPANSION_AUTHORITY".

Best regards!

@agamemnus
Copy link
Owner

No, just <img src="content://eu.mapone.badreichenhalltest.expansion/myfile.png">.

@agamemnus
Copy link
Owner

agamemnus commented Feb 5, 2018

You might need to remove the build files to get that -1 to stick. Not sure.

@stihl-sicher
Copy link

I had already removed and added android as platform. Without success.
Changing the values in package.json in apps main folder did the change.

Thanks for your reply, @agamemnus!

@stihl-sicher
Copy link

I have tried several combinations of settings now... My last configuration:

    <plugin name="com.flyingsoftgames.xapkreader" spec="https://github.com/agamemnus/cordova-plugin-xapkreader.git#cordova-6.5.0">
        <variable name="XAPK_EXPANSION_AUTHORITY" value="eu.mapone.badreichenhalltest.expansion" />
        <variable name="XAPK_PUBLIC_KEY" value=".....my Base64 String from Store....." />
        <variable name="XAPK_TEXT_DL_ASSETS" value="Downloading assets…" />
        <variable name="XAPK_TEXT_PR_ASSETS" value="Preparing assets…" />
        <variable name="XAPK_TEXT_DL_FAILED" value="Download failed." />
        <variable name="XAPK_TEXT_ERROR" value="Error." />
        <variable name="XAPK_TEXT_CLOSE" value="Close." />
        <variable name="XAPK_MAIN_VERSION" value="2" />
        <variable name="XAPK_PATCH_VERSION" value="-1" />
        <variable name="XAPK_MAIN_FILESIZE" value="144" />
        <variable name="XAPK_PATCH_FILESIZE" value="0" />
        <variable name="XAPK_AUTO_DOWNLOAD" value="false" />
        <variable name="XAPK_PROGRESS_FORMAT" value="percent" />
    </plugin>

This prevented the download problem but I can not open the images contained in the expansion file.
All configurations before with AUTO_DOWNLOAD=TRUE resulted in an download error.
Do I have to input a number in MAIN_VERSION? And in which format (if?) do I have to place the filesize?

I suppose/hope the file should be present since the app size from store has about 160 MB which is the size of APK and expansion file combined...

Best regards,
stihl-sicher

@agamemnus
Copy link
Owner

agamemnus commented Feb 6, 2018 via email

@stihl-sicher
Copy link

Thanks for your answer. I have disabled automatic download now.
Since I created an folder "main_expansion" to collect all data for expansion file and compressed this folder, I have to note this foldername in my file url.
No I can see my pictures and maptiles.

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

No branches or pull requests

3 participants