Skip to content

Commit

Permalink
Android: reworking camera intents and default queries
Browse files Browse the repository at this point in the history
Fixes #258
  • Loading branch information
scottrules44 authored and Shchvova committed Sep 30, 2021
1 parent 796b56c commit ef49c70
Show file tree
Hide file tree
Showing 4 changed files with 481 additions and 374 deletions.
33 changes: 26 additions & 7 deletions platform/android/sdk/AndroidManifest-New.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,19 @@
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

<provider
android:name="com.ansca.corona.storage.FileContentProvider"
<provider android:name="com.ansca.corona.storage.FileContentProvider"
android:authorities="${applicationId}.files"
android:exported="true" />
android:exported="true">
</provider>
<provider android:name="com.ansca.corona.camera.FileProvider"
android:authorities="${applicationId}.photos"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>

<!-- Corona service used to perform background operations such as managing notifications. -->
<service android:name="com.ansca.corona.CoronaService" />

Expand All @@ -67,8 +76,18 @@
</intent>

<!--Needed for checking for Camera Intent in Android 11 -->
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
<intent>
<action android:name="android.media.action.VIDEO_CAPTURE" />
</intent>
<!-- Needed for checking for Image Picker Intent in Android 11 -->
<intent>
<action android:name="android.intent.action.GET_CONTENT" />
<data android:mimeType="image/*" />
</intent>
</queries>
</manifest>
</manifest>


5 changes: 5 additions & 0 deletions platform/android/sdk/res-new/xml/file_paths.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Only handles cache dir -->
<paths>
<cache-path name="cache_files" path="." />
</paths>
Loading

0 comments on commit ef49c70

Please sign in to comment.