does display.loadRemoteImage always need to be saved locally in the device?

Hi all,

Going thru doc for display.loadRemoteImage, I noticed that in order to view a remote image you need to store it locally…

display.loadRemoteImage( url, method, listener [, params], destFilename [, baseDir] [, x, y] )

what about if I am using tableview that loads remoate images in 200 rows ? will that destroy the device storage due to saving them locally… I wonder if there is a way to show them without saving them locally?

Regards

Abdulaziz

Hello @alzaabi98,

You may experiment with saving them in the temporary directory:

http://docs.coronalabs.com/api/library/system/TemporaryDirectory.html

This is a local directory, but the files saved there will be automatically removed by the OS at some point, so it’s ideal for files which you may not need to persist.

Brent

Brent,

Assuming this is Tableview with 200 rows. each with image and some information… if we store them in the temporary directory as you advised. 

at some point the OS will delete them and the user is still viewing the app… what will happen ? will the app crashes or it will retrieve them again… 

also this does not really reasonable since the rows in some app will be more than 200 … so it is not practical to store them locally, i think i am missing something here… may be some basic knowledge in loading remote images… i think this should be viewed like simple in google images site… the system does not store them locally as per my knowledge… unless i am wrong here. 

regards

Abdul

all,

please share your experience in this topic , :slight_smile:

thanks

Abdul

Hello @alzaabi98,

You may experiment with saving them in the temporary directory:

http://docs.coronalabs.com/api/library/system/TemporaryDirectory.html

This is a local directory, but the files saved there will be automatically removed by the OS at some point, so it’s ideal for files which you may not need to persist.

Brent

Brent,

Assuming this is Tableview with 200 rows. each with image and some information… if we store them in the temporary directory as you advised. 

at some point the OS will delete them and the user is still viewing the app… what will happen ? will the app crashes or it will retrieve them again… 

also this does not really reasonable since the rows in some app will be more than 200 … so it is not practical to store them locally, i think i am missing something here… may be some basic knowledge in loading remote images… i think this should be viewed like simple in google images site… the system does not store them locally as per my knowledge… unless i am wrong here. 

regards

Abdul

all,

please share your experience in this topic , :slight_smile:

thanks

Abdul

I am having the same concerns.  We shouldn’t have to save images locally if were never going to refer to them again.

I am having the same concerns.  We shouldn’t have to save images locally if were never going to refer to them again.