Start a new topic

Black screen on resume

Black screen on resume


Hello,

I'm working with latest Wikitude SDK(5.0) for Android.

On my RA I genrate some Html button to redirect to another activity but when I press back I'm back on architectview's Activity but no camera stream :/

I'm supprised because i've set architectview's lifecycle methods:

@Override
protected void onPause() {
super.onPause();
Log.d("action", "onPause");
this.architectView.onPause();
}

@Override
protected void onResume() {
super.onResume();
Log.d("action","resumed");
this.architectView.onResume();
}

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


@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
if(this.architectView == null){
this.architectView = (ArchitectView) findViewById(R.id.architectView);
final StartupConfiguration configuration = new StartupConfiguration(getResources().getString(R.string.api_key_wikitude));
this.architectView.onCreate(configuration);
}
this.getArchitectView().onPostCreate();
try {
this.getArchitectView().load("wikitude/sample/index.html");

} catch (IOException e) {
e.printStackTrace();
} catch (ArchitectView.CamNotAccessibleException camException){
camException.printStackTrace();
}
}

And for the intent is like that:

if (s.contains("architectsdk://webview?url=")){
String url = s.substring(s.indexOf("?url=")+5);
Intent i = new Intent(this, WebViewActivity.class);
i.putExtra(Utils.INTENT_WEB_TAG, url);
startActivity(i);
}

 

Is anyone has an answedr ? :)

 

Thanks by advance!

Hi Thibaud,

I cannot reproduce your problem. Your implementation looks good to me. I created a new blank activity and started it, when I press the device back button the activity continuous as expected.

Could you please try it with a blank acitivity as well?

Thank you and best regards,
Simon
Login or Signup to post a comment