konklone / campyre

RETIRED: A Campfire client for Android.
https://play.google.com/store/apps/details?id=campyre.android
BSD 3-Clause "New" or "Revised" License
68 stars 22 forks source link

Item type: UploadMessage #104

Closed konklone closed 11 years ago

konklone commented 14 years ago

They added support for the full URL of an upload object, and a way to exchange an UploadMessage id for an upload object: http://developer.37signals.com/campfire/rooms

Create an Upload class.

When an UploadMessage appears, have a spinner and message appear and launch an HTTP request to get this upload object.

Keep a HashMap on the RoomContext that relates UploadMessage ids to Upload objects. Have a cachedUpload and loadUpload method (analogous to image loading) defined as part of the RoomContext interface.

When the upload object gets returned, find the Holder by that message ID and call a method to flip its display to a button with the filename on it, and place an OnClick handler on the button that launches an ACTION_VIEW Intent for that URI.