Documentation

App Template

The Wikitude App Templates are pre-configured app projects available for Android and iOS developers. Working with App Templates requires knowledge about application development. They are provided as first step to your own app. In combination with Studio the App Templates already contain your packaged Wikitude Studio project.

The App Templates are based on the Wikitude SDK and contain an unlicensed version of the library. For commercial use you require a valid license key - have a look at the Wikitude SDK licensing options for details.

Android App Template

Structure of App Template

The Wikitude App Template is an Android project with the Augmented Camera activity SampleCamActivity.java as a launcher. The pre-configured application name and application icon included in the App Template are placeholders. Also the package name com.wikitude.apptemplate should not be used in a productive environment and must be changed using e.g. ADT Eclipse or Android Studio.

Build & Run the App Template

Using a Wikitude Studio project

Import the App Template as a new project into your IDE. Then right click on your project and select Run as... > Android Application and select your target device (note: emulator is not supported). In case you see compile time errors while building the project you may need to update your project.properties file to fit your installed Android SDK version.

Using your own AR project

Paste the content from your AR project into the assets folder. The index.html must be stored in assets/index.html to be automatically launched on app start. In case you want to load your content from a server, change SampleCamActivity.WORLD_PATH accordingly so that it points to your remote index.html (e.g. http://yourdomain.com/ar-world/index.html).

In your IDE then right click on your project and select Run as... > Android Application and select your target device (note: emulator is not supported). In case you see compile time errors while building the project you may need to update your project.properties file to fit your installed Android SDK version.

From App Template to App

First of all update the application name, icon and package identifier in AndroidManifest.xml. In case you want to implement other screens aside the AR View you need to remove the following line in SampleCamActivity's AndroidManifest.xml entry:

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

and launch the camera e.g. when user clicked a button by calling

        final Intent arIntent = new Intent(this /* launching Activity */, SampleCamActivity.class);
        startActivity(arIntent);

That way you can create any application and define when to launch the augmented reality view. Have a look at the sample application bundled in the Wikitude Android SDK for basic and advanced usage of the SDK. A number of best practice implementation samples are provided and documented.

Important
You are only allowed to have one ARchitectView instance at any time. Have a look at different activity launch modes in case this does not fit your application architecture.
SDK licensing

The App Template is delivered without any Wikitude SDK License, therefore a watermark is embedded which covers the whole camera view. The watermark is shown on top of camera view because WikitudeSDKConstants.WIKITUDE_SDK_KEY does not contain a valid license. Have a look at the Wikitude SDK licensing options for details. The project was created using the latest Eclipse ADT. Proper set-up of Android Development Environment is a prerequisite.

iOS App Template

Requirements

In order to run the application, the following requirements are given:

  • A Mac computer running OS X 10.7 (Lion) or later
  • Xcode

To be able to run the application on an iOS device, you must enroll to the Apple iOS Developer Program and enter your subscription details in the Xcode Account preference panel.

More information how to develop iOS Applications can be found here: Start Developing iOS Apps

App Template Structure

The Wikitude Studio App Template (App Template) is an Xcode project which simply shows a full screen Wikitude SDK View, loading your ARchitect World from Studio. The exported ARchitect World can be found in the WikitudeStudio folder.

If another ARchitect World should be used in the application, it's sufficient to replace the WikitudeStudio folder content with the new files. Make sure that the main .html file, which is used as starting point for the ARchitectWorld, is correctly referenced in the -loadArchitectWorldFromUrl method.

Build & Run the App Template

To run the application on a iOS device, simply select Product -> Run or click on the Play button in the upper left corner of the Xcode window. Please note that the Wikitude SDK is not able to run in the simulator, therefore the application simply shows a black screen if it runs in the simulator.

Preparing the App

The pre-configured application name and application icon included in the App Template are placeholders. Also the bundle identifier com.wikitude.WikitudeStudioiOSAppTemplate must be changed in order to submit the application to the App Store (Make sure the bundle identifier you're using in the final application matches the one you've specified during the Wikitude SDK purchase process).

SDK licensing

The App Template is delivered without any Wikitude SDK License, therefore a watermark is embedded which covers the whole camera view. Have a look at the Wikitude SDK licensing options for details. After you have purchased the License which fits your needs most, enter the license key in the -initializeWithKey:motionManager method (WTViewController line 26).