From a1a90a03e042656e69d11c9989830ade5d14827d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 13 May 2014 17:42:23 +0200 Subject: added presence selection --- .../conversations/ui/ConversationActivity.java | 24 +++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'src/eu/siacs/conversations') diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index 23fa14b2..16efdade 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -354,11 +354,25 @@ public class ConversationActivity extends XmppActivity { } private void takePicture() { - Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); - takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, ImageProvider.getIncomingContentUri()); - if (takePictureIntent.resolveActivity(getPackageManager()) != null) { - startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE); - } + selectPresence(getSelectedConversation(), new OnPresenceSelected() { + + @Override + public void onPresenceSelected(boolean success, String presence) { + if (success) { + Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); + takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, ImageProvider.getIncomingContentUri()); + if (takePictureIntent.resolveActivity(getPackageManager()) != null) { + startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE); + } + } + } + + @Override + public void onSendPlainTextInstead() { + // TODO Auto-generated method stub + + } + },"file"); } -- cgit v1.2.3