android - How does facebook or instagram app retain images or data after entering the app with no internet connection? -


in facebook app, example, login internet connection. close app, turn off internet , close system tabs. though internet connection off, see images , data had been loaded still retained.

how facebook app that? should if wanted implement such feature in android app?

i use 'picasso' library caching, loading... images internet :

http://square.github.io/picasso/

automatic memory , disk caching

picasso.with(context)    .load(url)    .resize(50, 50)    .centercrop()    .into(imageview) 

for data, can store data using shared preferences small stuff or local database sqlite


Comments

Popular posts from this blog

iis - ASP.Net Core CreatedAtAction in HttpPost action returns 201 but entire request ends with 500 -

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -