MobileVisionAPI icon indicating copy to clipboard operation
MobileVisionAPI copied to clipboard

app crashes on takePicture() imageUri creation

Open IefVandepitte opened this issue 7 years ago • 2 comments

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

IefVandepitte avatar Nov 10 '17 11:11 IefVandepitte

Found the issues, android.manifest and res/xml/provider_paths weren't given in the demonstration

IefVandepitte avatar Nov 12 '17 23:11 IefVandepitte

@IefVandepitte Hey the app crashed the same way,how did you solve the issue can you please tell

roopeshn28 avatar Mar 13 '18 10:03 roopeshn28