feat: add camera intent with file input capture (#1609)

* Allow image file input to be from camera
* Reverting some irrellevant formatting changes
* Removing the openFileChooser functions as they are no longer necessary
* Update templates/project/res/xml/opener_paths.xml
* Code review feedback
* Adding license to provider paths xml file
* Adding a comment describing the proper use of the core cordova file provider
* Adding the ability to query the android.media.action.IMAGE_CAPTURE intent action
* Only including a cache path
* Applying code review feedback

---------

Co-authored-by: Ken Corbett <ken@truepic.com>
Co-authored-by: エリス <erisu@users.noreply.github.com>
This commit is contained in:
Ken Corbett
2024-05-09 00:30:49 -04:00
committed by GitHub
parent ebf0b105a3
commit b773ae48f4
3 changed files with 125 additions and 24 deletions
+9
View File
@@ -46,5 +46,14 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.cdv.core.file.provider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/cdv_core_file_provider_paths" />
</provider>
</application>
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
</manifest>