welcome to linkAR technical documentation

next previous

Initiating Browser

In ARViewActivity we have

private static final String ARBROWSERAPIKEY = "lEVa3uA8NBBKypMeveZ2ajegwnEEEM+BedsGcPnNXQ==";
private ARbrowserView aRbrowserView;

The browser APIKEY is only valid for the sample package: com.arlab.ARPicBrowser

In the OnCreate we have:

public void onCreate(Bundle savedInstanceState) {
  aRbrowserView = new ARbrowserView(this,ARbrowserView.UI_ORIENTATION_ALL,ARBROWSERAPIKEY, 
                                   ARbrowserView.SCREEN_ORIENTATION_LANDSCAPE, true, true);
  setContentView(aRbrowserView.getARviewInstance(), new LayoutParams(
			           LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
  1. Initialize the Browser, accepting landscape mode and with the BrowserAPIKEY. This key is valid only for the package com.arlab.ARPicBrowser.
  2. We set the content view of our activity to be filled with the ARBrowser view.