android: support camera review intent

This commit is contained in:
Thibault Deckers 2021-04-02 21:49:11 +09:00
parent d28e5d1357
commit 8abc38554e
3 changed files with 14 additions and 12 deletions

View file

@ -39,9 +39,9 @@
<application
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true">
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round">
<!-- TODO TLAD Android 12 https://developer.android.com/about/versions/12/behavior-changes-12#exported -->
<activity
android:name=".MainActivity"
@ -56,8 +56,7 @@
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -71,6 +70,15 @@
<data android:mimeType="video/*" />
<data android:mimeType="vnd.android.cursor.dir/image" />
</intent-filter>
<intent-filter>
<action android:name="com.android.camera.action.REVIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<data android:mimeType="vnd.android.cursor.dir/image" />
<data android:mimeType="vnd.android.cursor.dir/video" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
@ -100,6 +108,7 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="${googleApiKey}" />

View file

@ -111,7 +111,7 @@ class MainActivity : FlutterActivity() {
)
}
}
Intent.ACTION_VIEW -> {
Intent.ACTION_VIEW, "com.android.camera.action.REVIEW" -> {
intent.data?.let { uri ->
return hashMapOf(
"action" to "view",

View file

@ -1,7 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="deckers.thibault.aves">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>