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
4419d27a
Commit
4419d27a
authored
Jan 28, 2017
by
Yusuke Iwaki
Committed by
GitHub
Jan 28, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/fresco
parents
26302a31
24b696c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
FileUploadingHelper.java
...ain/java/chat/rocket/android/api/FileUploadingHelper.java
+2
-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/api/FileUploadingHelper.java
View file @
4419d27a
...
...
@@ -33,12 +33,12 @@ public class FileUploadingHelper extends MethodCallHelper {
.
onSuccessTask
(
CONVERT_TO_JSON_OBJECT
);
}
public
Task
<
JSONObject
>
sendFileMessage
(
String
roomId
,
String
storageType
,
JSONObject
fileObj
)
{
public
Task
<
Void
>
sendFileMessage
(
String
roomId
,
String
storageType
,
JSONObject
fileObj
)
{
return
call
(
"sendFileMessage"
,
TIMEOUT_MS
,
()
->
new
JSONArray
()
.
put
(
roomId
)
.
put
(
TextUtils
.
isEmpty
(
storageType
)
?
JSONObject
.
NULL
:
storageType
)
.
put
(
fileObj
))
.
onSuccessTask
(
CONVERT_TO_JSON_OBJECT
);
.
onSuccessTask
(
task
->
Task
.
forResult
(
null
)
);
}
public
Task
<
JSONObject
>
ufsCreate
(
String
filename
,
long
filesize
,
String
mimeType
,
String
store
,
...
...
app/src/main/java/chat/rocket/android/layouthelper/extra_action/upload/AudioUploadActionItem.java
View file @
4419d27a
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 @
4419d27a
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