Page 1 of 8
How to select an image from the image library if i have the app offline?
Posted: Mon Oct 28, 2013 2:21 am
by JACKSON LIANG
Hi, im trying to use the photoswipe component to zoom into the image, however i noticed that when i use photoswipe using :
img src="files/views/assets/image/weathermap.png
It downloads the map from the server which becomes really slow since its in png format. Is there anyway to change the image source so i could select the image source locally so that i could still zoom into the image when the app offline. I tried changing it to
but that didnt work either. Do i have to store the image in a local variable first?
How to select an image from the image library if i have the app offline?
Posted: Mon Oct 28, 2013 9:10 am
by Kateryna Grynko
Hi Jackson,
If you specify image source as как files/views/assets/image/weathermap.png it means the image is stored locally on your device. You added it to your application via Appery.io UI, right?
How to select an image from the image library if i have the app offline?
Posted: Mon Oct 28, 2013 11:12 am
by JACKSON LIANG
Oh okay, so it is specifying the image locally. However for some reason it loads really slow for the images and when i try to load the page without mobile internet connection it doesnt load the page at all. Is there something wrong when i use it offline? Cause its definitely downloading something from the server when i connect my phone to wifi or mobile internet connection.
Its important its offline cause my images must be accessed locally in case theres no internet connection.
How to select an image from the image library if i have the app offline?
Posted: Mon Oct 28, 2013 12:21 pm
by JACKSON LIANG
i realised, that i didnt add the image on the application UI.
How to select an image from the image library if i have the app offline?
Posted: Mon Oct 28, 2013 12:22 pm
by JACKSON LIANG
Does that mean it would fetch the image automatically from the server if i dont add it on the application UI cause its stored on the media manager?
How to select an image from the image library if i have the app offline?
Posted: Mon Oct 28, 2013 2:29 pm
by Kateryna Grynko
Hi Jackson,
If there is no Internet connection, and the image is not set on the Image component, then by default no-image.jpg is displayed, which is stored locally in the project directory. Please share the application with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and clarify where you call this service.
How to select an image from the image library if i have the app offline?
Posted: Tue Oct 29, 2013 11:19 pm
by JACKSON LIANG
Hi, Katya. Do i just share the application by exporting the app to .apk file and then sending via that email. I just want to check before i do.
I tried again using the files files/views/assets/image/weather.png using an image component named "weather", however still doesnt work or too slow to work.
How to select an image from the image library if i have the app offline?
Posted: Tue Oct 29, 2013 11:38 pm
by Illya Stepanov
Hi Jackson, just share your app as shown here :: http://docs.appery.io/documentation/s...
And tell us what device your using and OS version.
How to select an image from the image library if i have the app offline?
Posted: Wed Oct 30, 2013 1:23 am
by JACKSON LIANG
Hi illya, im testing using an android device at the moment using Android 4.2.2 OS. I am using a htc one x. However i would like to export this app as a iOS later.
The pages i am having trouble with is the "Trail Maps" page where it is downloading something from the pages even when the app is offline ( with no internet connection)
I am testing using the "Weather" page where i named an image component called "weather" however when specifying the html image source for the photoswipe component it doesnt work. So i like to know what im doing wrong so that i can make the images appear using the photoswipe component even when the app is offline.
How to select an image from the image library if i have the app offline?
Posted: Wed Oct 30, 2013 10:47 am
by Kateryna Grynko
Hi Jackson,
You specify file path as "weather.png". If the image is loaded as an asset you should use the following path: "files/views/assets/image/weathermap.png".