Page 5 of 5

How to download a file using javascript

Posted: Wed Sep 18, 2013 4:10 pm
by Maryna Brodina

Hello! Please share your project with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a


How to download a file using javascript

Posted: Wed Sep 18, 2013 4:32 pm
by Helen

My app GoldBelt is already shared. Test code is on DataSynch page, btn Test File Download.


How to download a file using javascript

Posted: Wed Sep 18, 2013 5:28 pm
by Maryna Brodina

Thank you! We'll take a look.


How to download a file using javascript

Posted: Wed Sep 18, 2013 6:19 pm
by Maryna Brodina

Sorry, there is no GoldBelt app in our list. Is GoldBelt correct name of app?


How to download a file using javascript

Posted: Wed Sep 18, 2013 6:27 pm
by Helen

Name is Gold Belt Tour


How to download a file using javascript

Posted: Wed Sep 18, 2013 6:29 pm
by Maryna Brodina

ok, thanks


How to download a file using javascript

Posted: Wed Sep 18, 2013 6:34 pm
by Maryna Brodina

We tested this app on Android 4.0.4 - it works. There is a CONNECTION_ERR and you would need to check Internet connection on your device.
Another way - on DataSynch page add Image component with the following name imageName and on page Show event run the following code:
preAppery('imageName').attr('src', 'http://www.goldbeltbyway.com/sites/default/files/uploads/shelf1.jpg');/pre
Check is there image shown.


How to download a file using javascript

Posted: Wed Sep 18, 2013 7:01 pm
by Helen

Thanks Marina. I'm thinking it's specific to my Android device. It seems to be working OK on iOS:

Testing with Appery Test App iOS simulator:
-- your above image code works, displays image
-- Gold Belt app file download gives me different error (code 1), saying it can't find target file path... which seems to me it's working and simply cannot find 'sdkcard' path while running simulator

I will test out image on Android shortly and let you know. Thanks for your help!


How to download a file using javascript

Posted: Wed Sep 18, 2013 9:14 pm
by Helen

Ok, so I've tested on another Android device and the download finally worked.
I'm testing on 2 Motorola Droid phones

  1. Model: DROID4, v. 4.1.2

  2. Droid Bionic, v. 4.1.2

    When testing using
    Appery Test App -- neither work (Connection Error Code 3)
    Installed .apk on device -- ONLY device #1 worked

    I haven't tested by installing on iOS device since I can't yet compile Test App nor my own app.


How to download a file using javascript

Posted: Thu Sep 19, 2013 6:28 am
by Kateryna Grynko

Hi Helen,

Appery.io Test App is not a reliable environment for testing the native app functionality (not the standard for browser). It's better to build binary application and install it.

Unfortunately, we can not test this on the Droid Bionic.