Allow video uploads

This commit is contained in:
Matthieu 2022-02-14 11:41:51 +01:00
parent d8634f4bee
commit 277dd3c66e
2 changed files with 17 additions and 2 deletions

View File

@ -44,6 +44,20 @@
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
</intent-filter>
</activity>
<activity
android:name=".profile.FollowsActivity"

View File

@ -316,8 +316,9 @@ class CameraFragment : Fragment() {
private fun setupUploadImage() {
// Listener for button used to view the most recent photo
binding.photoViewButton.setOnClickListener {
Intent().apply {
type = "image/*"
Intent(Intent.ACTION_GET_CONTENT).apply {
type = "*/*"
putExtra(Intent.EXTRA_MIME_TYPES, arrayOf("image/*", "video/*"))
action = Intent.ACTION_GET_CONTENT
addCategory(Intent.CATEGORY_OPENABLE)
putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true)