JACKSON LIANG
Posts: 0
Joined: Fri Aug 02, 2013 5:12 am

How to select an image from the image library if i have the app offline?

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 Image but that didnt work either. Do i have to store the image in a local variable first?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to select an image from the image library if i have the app offline?

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?

JACKSON LIANG
Posts: 0
Joined: Fri Aug 02, 2013 5:12 am

How to select an image from the image library if i have the app offline?

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.

JACKSON LIANG
Posts: 0
Joined: Fri Aug 02, 2013 5:12 am

How to select an image from the image library if i have the app offline?

i realised, that i didnt add the image on the application UI.

JACKSON LIANG
Posts: 0
Joined: Fri Aug 02, 2013 5:12 am

How to select an image from the image library if i have the app offline?

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to select an image from the image library if i have the app offline?

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.

JACKSON LIANG
Posts: 0
Joined: Fri Aug 02, 2013 5:12 am

How to select an image from the image library if i have the app offline?

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.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

How to select an image from the image library if i have the app offline?

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.

JACKSON LIANG
Posts: 0
Joined: Fri Aug 02, 2013 5:12 am

How to select an image from the image library if i have the app offline?

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to select an image from the image library if i have the app offline?

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".

Return to “Issues”