aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-17 19:21:16 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-17 19:21:16 +0200
commit736e09fbb56fbdc4aca4e9bdc9875a5df60cb562 (patch)
tree8b2f26187a2dd6d311618864eb03c7db718eb7c9 /src/eu/siacs/conversations/ui
parent27060e303ca8b56da2e3d1ac7a8e18c82b0915e3 (diff)
added record audio button
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index ac9328ca..59c47fcf 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -66,11 +66,13 @@ public class ConversationActivity extends XmppActivity {
public static final int REQUEST_DECRYPT_PGP = 0x76783;
private static final int REQUEST_ATTACH_FILE_DIALOG = 0x48502;
private static final int REQUEST_IMAGE_CAPTURE = 0x33788;
+ private static final int REQUEST_RECORD_AUDIO = 0x46189;
private static final int REQUEST_SEND_PGP_IMAGE = 0x53883;
public static final int REQUEST_ENCRYPT_MESSAGE = 0x378018;
private static final int ATTACHMENT_CHOICE_CHOOSE_IMAGE = 0x92734;
private static final int ATTACHMENT_CHOICE_TAKE_PHOTO = 0x84123;
+ private static final int ATTACHMENT_CHOICE_RECORD_VOICE = 0x75291;
protected SlidingPaneLayout spl;
@@ -352,6 +354,9 @@ public class ConversationActivity extends XmppActivity {
attachFileIntent.setAction(Intent.ACTION_GET_CONTENT);
Intent chooser = Intent.createChooser(attachFileIntent, getString(R.string.attach_file));
startActivityForResult(chooser, REQUEST_ATTACH_FILE_DIALOG);
+ } else if (attachmentChoice==ATTACHMENT_CHOICE_RECORD_VOICE) {
+ Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
+ startActivityForResult(intent, REQUEST_RECORD_AUDIO);
}
}
}
@@ -452,6 +457,9 @@ public class ConversationActivity extends XmppActivity {
case R.id.attach_take_picture:
attachFile(ATTACHMENT_CHOICE_TAKE_PHOTO);
break;
+ case R.id.attach_record_voice:
+ attachFile(ATTACHMENT_CHOICE_RECORD_VOICE);
+ break;
}
return false;
}