Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera Code Does not Work #144

Open
HenryTH45 opened this issue Mar 11, 2021 · 4 comments
Open

Camera Code Does not Work #144

HenryTH45 opened this issue Mar 11, 2021 · 4 comments

Comments

@HenryTH45
Copy link

The Document Selection Works Fine however When i Open my Camera and Take a Picture it Sends me back to pick_image_fragment.xml File without the Image i just took.

@akashk2512
Copy link

@HenryTH45 You can solve this by using the below steps.

  • Create your own FileProvider and extends FileProvider
    public class MyFileProvider extends FileProvider{ }

  • Add this provider to your Manifest file inside application tag
    <application> <providerandroid:name=".MyFileProvider" android:authorities="${applicationId}.yourPackagehere.provider" android:exported="false" android:grantUriPermissions="true"><meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/yourFileName_provider_paths"/> </provider>
    </application>

  • Then Create a XML folder in res and create a file yourFileName_provider_paths.xml and then copy-paste the below code
    <?xml version="1.0" encoding="utf-8"?>
    <paths xmlns:android="http://schemas.android.com/apk/res/android"> <external-files-path name="external_files_files" // you can give your app name here path="." /> </paths>

@ashwinjawale24
Copy link

ashwinjawale24 commented May 8, 2021

@HenryTH45 remove your app manifest file provider , then it will work, scan library manifest have its own file provider, mine is working

@dhairyashah1
Copy link

@ashwinjawale24 do u mean to delete the base app's AndroidManifest.xml file? If did so the app runs into errors. Could u specify exactly what to do or send your repo link?

@ashwinjawale24
Copy link

@dhairyashah1 No not the manifest file but, if you have file provider in your manifest remove it. because scanLibrary Module manifest has its own file provider. camera will work then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants