Skip to content

app crashes on takePicture() imageUri creation #6

Description

@IefVandepitte

imageUri = FileProvider.getUriForFile(MainActivity.this,
BuildConfig.APPLICATION_ID + ".provider", photo);
context = MainActivity@5033
authority = be.avondschool.vi.ocrtestappgooglemobilevisionapi
photo = /storage/emulated/0/picture.jpg

E/AndroidRuntime: FATAL EXCEPTION: main
Process: be.avondschool.vi.ocrtestappgooglemobilevisionapi, PID: 21179
java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=20, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {be.avondschool.vi.ocrtestappgooglemobilevisionapi/be.avondschool.vi.ocrtestappgooglemobilevisionapi.MainActivity}:

java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions