I am using HTC device with Android 4.0.3. Wikitude App downloaded from Playstore works well on it and does open ArchitectWorld from my remote server.
I have created a simple app with NavigationDrawer(https://developer.android.com/design/patterns/navigation-drawer.html) and load ArchitectWorld in a Fragment. However I get a black screen with ArchitectWorld URL displayed on it. Camera view does not start. I have also noticed following error message in logcat "E/libEGL? called unimplemented OpenGL ES API". As development environment I use Android Studio.
Please advise me why is it that I am getting this black screen? I do call onCreate and PostCreate and all lifecycle methods. Also device is supported and I get true for: ArchitectView.isDeviceSupported(getActivity().getApplicationContext());
Where could be the problem?
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Please check "ARchitectUrlLauncherCamActivity.java" in the Android SampleProject. Have a look at "SampleCamFragment" which extends "AbstractArchitectCamFragmentV4" handling lifecycle-events for you.
Hope this helps.
Kind regards, Andreas
S
Sergey.kargopolov
said
about 9 years ago
Hi Andreas!
Thank you very much for your reply. In my case the problems was elsewhere. I ran application on a different defice and got a new error messages which helped me traced the problem. Wikitude library could not connect to device camera. I have missplaced the permissions puttings them inside of <application> tag in AndroidManifest file. Onced I have moved permissions to a correct place black screen went away and camera started working.
I have double checked the lifecycle methods. I use all recommended methods and I do get my Architect world loaded and image recognition works. However almost every second time when I close app and then start again it closes withouht a crash message. Then I start it again it starts normally. I take it down and start again it starts and sighlently closes right away without any android dialog message like "Application stopped working"... I tried on couple of other devices and it behaves the same way... Have you experienced anything like this before?
Thank you!
A
Andreas Fötschl
said
about 9 years ago
Hi there, The SDK Sample App's section where you can enter the url to an ARchitect-World uses the Fragment approach. Please double check your implementation against it. If you can't fix the issue, you may send a small sample project where we can check in detail to android(at)wikitude.com, referring to this forum post.
Kind regards, Andreas
PS.: I hope you understand that debugging your whole project is not part of out support, but a simplified sample helps us a lot more ;-)
S
Sergey.kargopolov
said
about 9 years ago
Hi Andreas!
Thank you very much for your response!
I checked the examples folder for an example with architectview and fragment. Maybe there is somethings I do not see but this is what I was making sure I do:
1. Load architectview in a separate activity (extends Fragment)
2. Use Framelayout for com.wikitude.architect.ArchitectView
3. Make sure in my Fragment I override all found lifecycle methods:
onCreate(), onPostCreate(), onPause, onDestroy()
4. Creare and load architectview in public void onActivityCreated(Bundle savedInstanceState).
But every other time application crashes either on start or when I try use it. Sometimes it starts and even recognizes the object and pops up my video overlay and video plays. But if I close it and start again it starts crashing...
03-24 14:44:56.911 7182-7182/com.ourcompany.theprojectv5.app E/Web Console? Uncaught ReferenceError: AR is not defined at null:1
03-24 14:44:56.911 7182-7182/com.ourcompany.theprojectv5.app I/Choreographer? Skipped 42 frames! The application may be doing too much work on its main thread.
final ArchitectConfig config = new ArchitectConfig("");
architectView.onCreate(config);
architectView.onPostCreate();
try {
if (architectView != null) {
architectView.load("index.html");
}
} catch(Exception ex)
{
ex.printStackTrace();
}
}
@Override
public void onResume() {
//Log.e("DEBUG", "onResume of HomeFragment");
super.onResume();
if(architectView !=null)
{
architectView.onResume();
}
}
@Override
public void onPause() {
//Log.e("DEBUG", "OnPause of HomeFragment");
super.onPause();
if(architectView !=null)
{
architectView.onPause();
}
}
@Override
public void onDestroy() {
super.onDestroy();
if(architectView !=null)
{
architectView.onDestroy();
// architectView = null;
}
}
@Override
public void onLowMemory() {
super.onLowMemory();
if ( architectView != null ) {
architectView.onLowMemory();
}
}
@Override
public void onStop() {
super.onStop();
}
}
W
Wolfgang Damm
said
about 9 years ago
thanks for reporting the issue. We had a detailed look at it and believe this is fixed with another VideoDrawable issue we have fixed for the upcoming version. It will be released next week and I kindly ask you to try it out when it becomes available. Please let us know if it resolves all your issues.
Thanks!
S
Sergey.kargopolov
said
about 9 years ago
Wolfgang, thank you so much for taking time and looking into it! This is a very good news! I am so looking forward to downloading and trying the new version of SDK!
Sergey.kargopolov