Start a new topic

Where should I enter the license key_Android Native API

Where should I enter the license key_Android Native API


Hi Sanya,

please post the stacktrace of the exception of when the app crashes.

Best regards,
Simon

the issue is ---my program crashes its not accepting the constructor of wikitude sdk()...

Hi,

What exactly is your issue? I see in your code you've included the license key.

Greetings

Nicola

hello everyone,

i am new here as i followed the given documentation http://www.wikitude.com/developer/documentation/androidnative#_48_INSTANCE_DlwPyDiMoCr0_=triallicense.html

for my app but i am not able to enter liscense key in the code if some one has done how to sepcify liscense key please show me the correct way thanks..  here is the code

 

package com.example.sanya.ar_expeditor;

import android.content.Context;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;

import com.wikitude.WikitudeSDKStartupConfiguration;
import com.wikitude.common.camera.CameraSettings;


public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener {

public WikitudeSDKStartupConfiguration getStartupConfiguration() {
WikitudeSDKStartupConfiguration startupConfiguration = new WikitudeSDKStartupConfiguration("MUIau2kgFyrhHdh//EtiwPF/QIHyAjZ7fLykd/olHUs910cO8LRCBi1J+aWAKazZYU2ETnZ/GYb0aeVIXz3mdXgQPZAK7M7Xy3JLA3hUxdW9wKm1YKGZOqA7OwXQ3Dqwzd+w74YhmMIa9dxsqFi74O5GbhF1d3E6G+o8QySVTYWx0ZWRfX8JR/PZPVhQ9irCQ1QVxvMO1M1MK1C4MOBQIhrDBT9rg+6C+iAf1Bwxk3TQwZHQniZLHsfbloHLBWcasN3kXE/finbNHye3hDQpis8zw1q5S0/CY0bz/L3Gay9YNl1wrlOpidH4xrytF56xfMtezcNHdFPj26bbPqoGJzbdL6ZskRojIJGV2CqkvBqDBE+rYU5rtDfuBqKwCnVTioslo0Sn15jiv4fcINulo2Rqs5k5O+eq3buBSMQn7WN43fEYt8jctt4ESH/305FOBzk5PQ9I6dT7DhRE9VjU7VkG54fCjCRUv/KOeGVM6PlAWENkQDV2D2xuYujviJjEbt+2Bp7zftH79cU0h0NQ7j+fgouDRM5Mq9bKx+ocU8wDRFVq+lvtBOfjTSHrLoz0wmFgi6yCXpx7iIchT+uEsihVz/HJWhdEG139WVgTmwj0nBsc941SPgICxySruycqhTyXJ9jeMjvt1J4kiw/Q4zg0ExRKTaSKsXXCWk4e627U/fdlKHiwVAk2cxu4+", CameraSettings.CameraPosition.BACK, CameraSettings.CameraFocusMode.CONTINUOUS);

return startupConfiguration;
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getStartupConfiguration();
setContentView(R.layout.activity_main);




Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});

DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();

NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);

}



@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();

//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}

return super.onOptionsItemSelected(item);
}

@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();

if (id == R.id.nav_camara) {
// Handle the camera action
} else if (id == R.id.nav_gallery) {

} else if (id == R.id.nav_slideshow) {

} else if (id == R.id.nav_manage) {

} else if (id == R.id.nav_share) {

} else if (id == R.id.nav_send) {

}

DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;

}


}


 
Login or Signup to post a comment