How to know when to update my facebook profile pic from cache? - android

In my app, am caching facebook profile pics in sdcard (for caching) with filenames stored as URL link "http://graph.facebook.com/1146636239/picture" --> Something like this.
Whenever i look for download for the profile image, i check in sdcard and pull up the image.
Suppose if my friend has changed his profile pic, how will i know to download the new updated image ? (rather than picking from sdcard.)
Is there any api to know if profile pic has changed wrt to a time stamp ?
Any insights would be helpful.
Thanks

Related

How to get URL of Images from that are stored in Firebase Storage in specific folder | Androi | Java

I uploaded some pictures manually in firebase storage in the specific folder I want to get the URL of all images that are stored in that specific folder.
Is there any way I can get the URL of all images?
Note: There are many folders in my firebase storage I just wanted to get images from Driver1 as the screenshot is attached you can clearly see the images I uploaded.
ScreenShot:
You can simply click on the image you want to download and on the right-hand side of the page, a new section will appear, which contains the name of the image. If you click on the name, a new tab in your browser will be opened containing that particular image. You can copy the URL right from there or, at the bottom of this new section, you'll see the "File location". If you click on it, you'll see the "Access token" and if you click again on it, the download URL and the corresponding token will be copied. Then you can paste that into your web browser and you'll see the image.
Edit:
To be able to read or download an image from a Cloud Storage URL, please check the official documentation:
https://firebase.google.com/docs/storage/android/download-files
Since you're using Android, I also recommend you a library called Glide for Android.

Google+ share image using URL like Facebook

I'm currently looking for a way to share in Google+ using URL from web and not from local storage. Problem is that I've used UniversalImageLoader to cache my image and I don't have the image file of the images I wanted to post on my share. I wanted it to be as simple the way facebook done their sharing but using the setContentUrl(Uri.parse(IMG_URL)) will give me the way I wanted it minus the image URL below the post.
Other workarounds I'm thinking is to download the image using the URL, store it somewhere on the device then share it using the setStream(Uri.parse(IMG_URI)) but only problem is that I will need to wait more compared to sharing using URL.
Now is there's any way I can achieve a faster image sharing on Google+? Or if ever is there's a way I can convert the cached file back into image so that I can share it using Stream?

Android, Facebook SDK 3.14 share photo on wall

I would like to read image from SD-card and then post in to facebook wall. I use lastest Facebook SDK 3.14. I google about it a lot and I found a lot of code using Facebook SDK Facebook object and AsyncFacebookRunner object but they are depricated now and I dont want to use it. I try to use WebDialog from lastest SDK and it is works great except that it takes link to image already exist in WEB and I dont know how to post image from my SD-card. I google a little bit more and I read that some people do that by uploading image first to user gallery and then use WebDialog to share image uploaded to gallery. This approach not convince me because image is on wall twice. Once after upload image to gallery and second when it is share on wall. My question is:
1) Is there any way to share image from SD-card to facebook wall?
2) If thre isnt any way to share image from SD-card to facebook wall, can I upload photo to facebook users gallery without any posting it on wall so I can share it by myself later?
3) Is there any other trick to perform this task?

Image Type of Profile Picture Downloaded from Facebook

In my android app, I have downloaded profile pictures of Facebook users using the Graph API: "http://graph.facebook.com/" + params[0]+ "/picture?width=150"
I would like to save it to the local storage private to the app but I don't know what image type Facebook uses to send to Graph API users. Does anyone know?
According to this question asked here it is gif for those who have not uploaded picture and jpg for those who have. How to fetch facebook profile picture in png format? and why is it hard to load it to a bitmap data type and decode it to any file type you want?

Adding an Album to the Android Photo Gallery (in code)

I would like to be able to create an Android app that adds additional photo albums to the default android photo gallery. The content of these albums would be remote, similar to how the Picasa albums are handled. I have looked into the media scanner and it seems to not handle remote content and I have not been able to find any reference for the gallery itself or any other means of providing additional photo albums.
I have done some searching on the android developers site, here and general Googling and have come up short... does anyone have any suggestions about how this can be accomplished?
Thanks in advance.
If you are talking about the android stock gallery, this is what ive found out:
The android albums are not actually albums, but folders.
You justo need to create a folder with the name you want the album to show and there must be at least one picture in it.
Hope it helps!

Categories

Resources