0

I am developing a chatting/messaging app and I want to let the user select an image that they've stored online (i.e. picasa, photobucket, flickr, etc) which will be shown as part of the chat User Interface for anyone that is chatting with the user.

For example:

  • User_A is messaging/chatting with User_B.

  • User_B will see a small thumbnail image of User_A

  • User_A will see a small thumbnail of User_B.

    note: my web server is facilitating the text exchange between the two users.

At first I thought I would implement a photo upload function in my app and store the photo's on my server that each client would download. But then I realized that this is just re-inventing the wheel because there are now a lot of online picture sharing services. So I want my server to simply store the URL of the images that User_A and User_B have selected - my app is notified of the URL's and downloads the pictures.

However, how is this implemented ? (Specifically, the image selection to obtain the URL in a userfriendly manner)

I've visualized the following userfriendly use-case...

  • user opens the options activity in my app and pushes the button to select an image to present in the chat UI.

  • an intent dialog is shown with all of the possible image hosting services installed on the mobile phone (picasa, photobucket, etc) - but local storage shall not be shown.

  • the image picker of the chosen application is shown and the user chooses the image.

  • the image picker closes and returns the URL to my app.

If this can't be implemented, then my only alternative (that I know of) is to have users copy'n'paste the URL of the image they want to use - which is not userfriendly on mobile devices.

Any help is greatly appreciated.

Cristian
  • 198,401
  • 62
  • 356
  • 264
Someone Somewhere
  • 23,475
  • 11
  • 118
  • 166
  • A question is do you know of an intent that refers to image-hosting apps on a device? And also do you have a fall back if none are installed? – chustar Jan 07 '11 at 03:05
  • my absolute last fall-back was going to be copy and paste the URL. I was debating whether to use the built-in Gallery app, found a decent intent example here: http://stackoverflow.com/questions/2169649/open-an-image-in-androids-built-in-gallery-app-programmatically – Someone Somewhere Jan 07 '11 at 20:27

1 Answers1

1

That doesn't seem very difficult to me. You can predefine which Image hosting services you wish to use. Picassa and Flickr have their APIs AFAIK.

  • Present user with an option to choose from your predefined offerings.
  • When they choose, present the album of the user.
  • When the user ends up selecting an image, Image hosting will let you know about their URLs (You can download all images of that album and display them natively in your app, it will fetch information about them, like their URL with them, which will be easy to track)
  • Get the URL, and update the chat webservice about it.
  • Create the Chat activity in a way that it polls your webservice after a particular interval to check whether any one of both the users involved in chat have changed their images. If they have, load the new one.

I can detail you on this if you have any doubts.

Aman Alam
  • 11,231
  • 7
  • 46
  • 81
  • good idea, I didn't think about API's... I found an example app too: https://code.google.com/p/apps-for-android/source/browse/trunk/Photostream/src/com/google/android/photostream/?r=171 – Someone Somewhere Jan 07 '11 at 19:52
  • judging from comments I've been reading online, it does look like using flickr / picasa API's will bump my apps' API level from 4 (1.6) to 8 (2.2) – Someone Somewhere Jan 07 '11 at 20:12