Start a new topic

Display in tabbed view (i.e. not fullscreen)

 

I'm having trouble trying to figure out how to display the ARview within my app's tabbed view (i.e. navigation and tab bar still in foreground). The idea is that the AR view is only one tab of my multi-paged app.

Does anyone have any ideas?

I'm on the same page as Michal... My lack of knowledge in Java and Objective-C prevented me from getting this to work.

Some more detailed help would be greatly appreciated.

Hi, any news on this?
I tried to change it myself, but with 0 experience with objective-c I wasn't able to do anything.
https://stackoverflow.com/questions/23575682/ios-how-can-i-insert-a-native-view-behind-the-webview-in-a-phonegap-cordova-pl

Same with android, I tried to use different layouts along with .bringToFront(), but no luck again. Some help from support would be greatly appreciated.

Kind regards,
Michal

 


1 person likes this

Thanks Andreas. I don't know objective-c very well but I'll see if I can figure it out.


Which file / line of code should I target for the android implementation?

Hi Shane,


Let us know if you try to set the AR View behind the Cordova View. I'll be greatly interested by your implementation and I can offer my help to test it and provide feedback.


Have a good week,


Amaury.

Hi Shane,

You could put the Wikitude SDK behind the cordova web view, but this would be something you need to impl. yourself in the Wikitude Cordova plugin code. The Wikitude WTArchitectView is a standard UIView subview with which you can do whatever you want within the possibilities of Apple's iOS SDK. Per default we present the WTArchitectView within a new new view controller that we present modally on top of Cordova's default view controller (which contains the default web view).


WTARViewController.h/.m and WTWikitudePlugin.h/.m are the files you need to change.


Best regards,

Andreas

Hello Shane,

Your request has already been forwarder to a technical member. However, since this is a forum channel, please keep in mind that response times in the forum may vary according to the severity of a possible issue, time needed for investigation and checking.

Thanks
Eva

Somebody from Wikitude please respond... I need this for a project that's due very soon.

?

Launching it behind Cordova would be perfect... I completely forgot that that's how the maps plugin works.


Is there a way to do this Andreas?

Hello. Now when i'm reading this topic I came up with an idea.
Would it be possible to launch the ar view behind the cordova web view? It would be a great way to integrate it with ionic for example after setting the background color to transparent (cordova-plugin-googlemaps works the same)

Best regards,
Michal

 


1 person likes this

Hi Shane,

For iOS you need to modify the 'WTARViewController.m' that is part of the Wikitude Cordova plugin. Within this file we define that the 'WTArchitectView' is displayed fullscreen.

Simply modify line 81 '[self.architectView setFrame:self.view.bounds]' to use an frame that fits your needs e.g. 'CGRectMake(50, 50, 100, 100)'. You also need to set 'self.view.alpha = 1.0' so that you see the Cordova web view in the background.


Best regards,

Andreas


Ah okay thanks, I'll give it a shot!

Will the modifications to the java file affect android only? If so, what would I have to modify for ios?

Hi Shane,


The only way this would be possible for cordova without modifying the WikitudePlugin.java is to add the tab bar to the AR-experience and then use the connection between cordova-wikitude to change the active view on click.


You could also modify the line in WikitudePlugin.java:922 to achieve a non-full-screen ARView. (This is not an ideal solution since you would need to modify it again after an SDK update).


Best Regards,

Alex

Ah okay, good to know that it should work.

Basically what happens is the blank page (that belongs to the tab) will display first, then wikitude will load in a seperate webview on top of the tabbed page.

I tried incorporating the wikitude code into the page directly, rather than in a seperate html file like the docs / examples suggest, but couldn't get it to work.

Hi Shane,


I get what you are trying to do now but still don't see what the issue with displaying the ARView like in the image is.

Is the ARView overlaying your tab/navigation bar?

Is the tab switching the issue?


Best Regards,

Alex

Login or Signup to post a comment