-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Co-authored-by: エリス <[email protected]>
- Loading branch information
1 parent
ebf0b10
commit b773ae4
Showing
3 changed files
with
125 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
templates/project/res/xml/cdv_core_file_provider_paths.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
<!-- | ||
Note: This File provider should only be used by the Cordova core | ||
itself and should not be used for responding to Intents because | ||
it will expose the app's private data folders. | ||
For more information about FileProviders see: | ||
https://developer.android.com/reference/androidx/core/content/FileProvider | ||
--> | ||
<paths xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<cache-path name="cache" path="." /> | ||
</paths> |