Start a new topic

Xamarin Camera only show TRIALS word and no camera view

Xamarin Camera only show TRIALS word and no camera view

Hi Webmixer, do you use PageRenderer or do you simulate onCreate(), onPostCreate(), onPause(), ... with ViewRenderer´s method OnElementChanged()? If you use ViewRenderer how do you simulate the methods of lifecycle?

 


Ok, find the solution.

The reason of this error was that I use a custom rendrer to add ArchitectView on a Xaml page and it didn't follow the page life cycle.

I finaly add event to my custom renderer to fire ArchitextView event (onpostcreate, onresume,...)

 

Thanks

 

Hi Web,

Before doing any further investigation could you please provide the following information:

- Which version of the SDK are you using? 

- Are you using the JS API?

- What device does this happen with (os Version and model)?

 

Thanks

Hi,

 

I know that a post with the same subject has been opened last year, but this post don't give any clue about Xamarin and Wikitude.

I'm searching to add Wikitude on an existing Xamarin.Forms app.
After few days, I finaly find a solution to allow Wikitude to be used from Xamarin Forms.

Displaying the ArchitectView and loading POIs seems to work (I see the Wikitude logo apearing on view startup, and then a info button indicating that x POIs are loaded)

But I only see a black screen with the "Trial" word (I'm still using a trial serial).
No Camera view, No POI's if I move my phone

I'm currently test Wikitude on Android, (iOS will be done when Android works)

Here is a portion of My code:

arView = new Wikitude.Architect.ArchitectView(Forms.Context);
SetNativeControl(arView);  // this is used to set use native control in Xamarin Custom Renderer

int requiredFeatures = StartupConfiguration.Features.Tracking2D | StartupConfiguration.Features.Geo;

string key = ".....";

var config = new Wikitude.Architect.StartupConfiguration(key, requiredFeatures);

arView.OnCreate(config);

 


arView.OnPostCreate();

 

arView.RegisterSensorAccuracyChangeListener(this);

this.locationProvider = new LocationProvider(Forms.Context, this);

arView.Load("samples/3_Point$Of$Interest_3_Multiple$Pois/index.html"); // Load sample world

arView.SetLocation(50.584563, 3.6313585, 1000f);  // Arbitrary locaiotn for testing purpose

 

var poiData = GetPoiInformation(50.584563, 3.6313585, 20);

var js = "World.loadPoisFromJsonData(" + poiData.ToString() + ");";

arView.CallJavascript(js);

 

Did I miss something to activate the camera?

Can anyone help me?

 

Thanks
Login or Signup to post a comment