How to set profile picture app from Android Gallery - android

I want a simple way where there is an ImageView representing a user profile picture. It is set to a default photo if they have not picked one.
I would like them to simply click on it and it opens up the gallery and they can set (and crop) a profile picture. That picture than is set in the ImageView (and stays there the next time the app is opened -- I am also using an Internet MySQL database to connect to that I may need to store the picture in so other users can see. I just need to see the Android side of things).
I am assuming I may need to use an Intent of some sort? Can I see basic code on how one might do this?

Here's a tutorial on using an intent with the Gallery: http://www.helloandroid.com/tutorials/gallery-intent-tutorial

Related

How to add pictures from the gallery into the component 'Gallery' in ANDROID?

I need a example of how to add a 'X' number of pictures of the gallery into a component 'gallery' in ANDROID develop.
Please show me a simple example (it's for my personal knowledge).
Thanks a lot.
Here: http://www.androidinterview.com/android-gallery-view-example-displaying-a-list-of-images/, you can see an example of show images in a android gallery component using local images, if you want show images from device's gallery, then you can see this:
how to get the images from device in android java application

Android get pictures from gallery and give user the option to launch camera

I know how to launch camera and let user take a picture; I also know how to launch gallery and let user pick one of the pictures on the device; however, on the gallery launching page, the only option to user is "cancel".
I want to give user more options on that page such as, opening camera,crop, delete, etc. just like how native gallery works. Do I need to use putExtra()? If I do, how to find out what I can use with it.
I understand an option is to have a page/dialog to let user choose between two options, but it does not look so stunning.
At that point you will be messing with the receiving intent's activity. Unless it gives you that ability (I don't know of one that does), you can't do it. You have to return the image to your own activity and display a menu there.
Keep in mind that a user can have any number of galleries installed, and the user might not be looking at the image in the stock gallery app depending on their personal settings/preference.
What if you created an activity that displayed the image, then had a simple listview alertdialog show with some options? That might look clean enough.

Change Facebook Cover Picture with preview_cover on Android

I've a php application that allow you to change your Timeline Cover picture posting a photo to an album, and with the retrieved ID, redirects you to:
http://www.facebook.com/profile.php?preview_cover=[photo_id]
Also, if you paste directly that link on your browser with a valid ID, it works perfectly.
But on android it does not. Even if I change to-
http://m.facebook.com/profile.php?preview_cover=[photo_id]
What's the way to do this on android?
In case others come across this -
I haven't found a way yet to change the cover photo image within the m.facebook.com environment.
You can, however, add &ref=pb to the end of the URL to force the Desktop experience in mobile.
This isn't ideal, but does allow the user to set their cover photo:
http://www.facebook.com/profile.php?preview_cover=[photo_id]&ref=pb
If I come across a better implementation, I'll update this post.

Android: how to achieve functionality like in facebook photo

I want to implement functionality same like in Facebook album viz. first it show blur image then clear version of that with swipe effect but I am not getting any idea from where to start from.
EDIT: I will be getting these images from webserver.
Actually what happens is:
Facebook show its thumbnail image(which is already downloaded) if the large image is not loaded. So it is not intentionally blurred.
and downloads the original image in background. and then sets the large image to that ImageView.
Numerous examples are available to show Gallery in Android.
afaik the "blurred photo" displaying in Facebook app is not actually an android feature, but more of how the embedded WebView handles images. Facebook App is basically just an embedded webview that hopes to look and feel like a native android app.
For the swiping gesture to view the next photo, you can use this.
Try making a custom class extending Android Gallery
And then try applying a blur effete on both Left and Right imageviews.

android- How to launch an app from your app in android

Im trying to launch an application from another one. Ive used the fingerpaint api demo and added a save and some different brushes and Id like the user to be prompted on saving the picture to select something like photoshop to do color correction of photomanipulation to the photo and once they are done with the photo and its saved in photoshop have the fingerpaint app reopen with the photo they just manipulated in the screen and ready for them to add more to if they chose to do so.
Will I have to set a background activity to read the photoshops state and when it saves? Thats what Im thinking I will have to do but Im not sure at this point.
Im not asking for some one to code it out for me but if any one has an idea of how or where I can see an example of an app opening another that would be awesome.
( and please do not be so vague as to say look at the android.com dev section as there is WAY to much info to look through on there. I spend half my day on there already :p )
Intents are used to launch other activities. Best way would be to save the image and get the uri for the image.
Intent i = new Intent(Intent.ACTION_EDIT, imageUri);
this.startActivity(i);
That will launch whatever activity that can handle that uri and intent type. You can also use createChooser to give the user the option to pick an Activity. (similar to have the share option works in most apps).
To do the saving recognition I'm not sure if startActivityForResult would do what you want. it depends on how the Photoshop app is setup.

Categories

Resources