Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
33785624
Commit
33785624
authored
Jan 28, 2017
by
Yusuke Iwaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add "record audio", "record video"
parent
9445f491
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
AudioUploadActionItem.java
...youthelper/extra_action/upload/AudioUploadActionItem.java
+8
-1
VideoUploadActionItem.java
...youthelper/extra_action/upload/VideoUploadActionItem.java
+9
-1
No files found.
app/src/main/java/chat/rocket/android/layouthelper/extra_action/upload/AudioUploadActionItem.java
View file @
33785624
package
chat
.
rocket
.
android
.
layouthelper
.
extra_action
.
upload
;
import
android.content.Intent
;
import
android.provider.MediaStore
;
import
chat.rocket.android.R
;
...
...
@@ -16,7 +17,13 @@ public class AudioUploadActionItem extends AbstractUploadActionItem {
Intent
intent
=
new
Intent
();
intent
.
setType
(
"audio/*"
);
intent
.
setAction
(
Intent
.
ACTION_GET_CONTENT
);
return
Intent
.
createChooser
(
intent
,
"Select Audio to Upload"
);
Intent
recordSoundIntent
=
new
Intent
(
MediaStore
.
Audio
.
Media
.
RECORD_SOUND_ACTION
);
Intent
chooserIntent
=
Intent
.
createChooser
(
intent
,
"Select Audio to Upload"
);
chooserIntent
.
putExtra
(
Intent
.
EXTRA_INITIAL_INTENTS
,
new
Intent
[]
{
recordSoundIntent
});
return
chooserIntent
;
}
@Override
...
...
app/src/main/java/chat/rocket/android/layouthelper/extra_action/upload/VideoUploadActionItem.java
View file @
33785624
package
chat
.
rocket
.
android
.
layouthelper
.
extra_action
.
upload
;
import
android.content.Intent
;
import
android.provider.MediaStore
;
import
chat.rocket.android.R
;
...
...
@@ -16,7 +17,14 @@ public class VideoUploadActionItem extends AbstractUploadActionItem {
Intent
intent
=
new
Intent
();
intent
.
setType
(
"video/*"
);
intent
.
setAction
(
Intent
.
ACTION_GET_CONTENT
);
return
Intent
.
createChooser
(
intent
,
"Select Video to Upload"
);
Intent
recordVideoIntent
=
new
Intent
(
MediaStore
.
ACTION_VIDEO_CAPTURE
);
recordVideoIntent
.
putExtra
(
MediaStore
.
EXTRA_VIDEO_QUALITY
,
0
);
//low quality.
Intent
chooserIntent
=
Intent
.
createChooser
(
intent
,
"Select Video to Upload"
);
chooserIntent
.
putExtra
(
Intent
.
EXTRA_INITIAL_INTENTS
,
new
Intent
[]
{
recordVideoIntent
});
return
chooserIntent
;
}
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment