How to cache profile picture from Google plus in android -


I am trying to set up a Google Plus profile image. I am able to get the URL and use the image:

  The Private Class Expands LoadProfileImage AsyncTask; String, Zero, Bitmap & gt; {ImageView bmImage; Public LoadProfileImage (ImageView bmImage) {this.bmImage = bmImage; } Protected bitmap doInBackground (string ... url) {string urldisplay = urls [0]; Bitmap mIcon11 = faucet; {Try InputStream = New java.net.URL (urldisplay) .openstream (); MIcon11 = BitmapfitterNetExecutestream (in); } Hold (exception e) {Log.e ("error", E. megas ()); E.printStackTrace (); } Return Mean 11; } Zero (bitmap result) on secure expression {bmImage.setImageBitmap (results); }}   

But this does not work when there is no internet profile image always getting it from the specified URL

The question is: Can I profile image cache How do i Or will I store it in shared favorites?

Thank you!

Div class = "post-text" itemprop = "text">

If there is no internet connection Depending on whether you can get profile image or not.

What can you do in this case?

1: Just get an image when the internet connection is alive and cache that image in the cache directory or elsewhere and use it when there is no internet connection.

2: If that person is present in your contact directory and the device owner has synced with Google+, can you try to get that profile picture using that person's email id? You can. Content Provider allows you to get contact details

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -