Start a new topic

Marshmallow Exception while getting Camera Parameters

Marshmallow Exception while getting Camera Parameters


Hi Dinesh,
Thx for writing the blog post and sharing the link here!

Best regards

Andreas

Hi,

I am also getting the same error for Marshmallow.

Any solution for this?

Hi,
When using Marshmallow (Android 6), the hosting application needs to query for the camera runtime permission before creating the ArchitectView.
You can have a look at our example application (SDK version 5.1.2) on how to do this.

Best regards

Andreas

Hello,

I'm trying to develop an app using Wikitude for Marshmallow and lower, for lower versions it works good but for marshmallow it doesn't.

The error is "Exception while getting Camera Parameters" on the ArchitectView.onCreate() function.

I read a lot about this error to avoid some reccursive question:

- no there isn't any other app using camera

- the test is processed just after boot

-i've set : 

  <uses-permission android:name="android.permission.CAMERA" />

  <uses-feature android:name="android.hardware.camera" android:required="true" />

and for the activity :

<activity
android:name=".custom.CustomActivity"
android:label="@string/title_activity_main"
android:configChanges="screenSize|orientation"
>
</activity>

 

and in the Java's application code :

onCreate(....){
......
try{
this.architectView.onCreate(configuration);
creationPassed = true;
}catch (Exception e){
e.printStackTrace();
creationPassed = false;
}
}



@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
if(creationPassed){
this.architectView.onPostCreate();
try {
this.architectView.load("wikitude/sample/index.html");
} catch (IOException e) {
e.printStackTrace();
}
}

}

@Override
protected void onPause() {
super.onPause();
this.architectView.onPause();
}

@Override
protected void onResume() {
super.onResume();
this.architectView.onResume();
}

@Override
protected void onDestroy() {
super.onDestroy();
this.architectView.onDestroy();
}

 
Login or Signup to post a comment