bdswiss erfahrung

Welcome, Guest
Username: Password: Remember me

TOPIC: ONYX Enroll Wizard Setup Guide

ONYX Enroll Wizard Setup Guide 04 Dec 2014 18:56 #22

  • cwheatley
  • cwheatley's Avatar
  • Offline
  • Administrator
  • Posts: 9
  • Thank you received: 1
  • Karma: 0
Project Setup

Unzip the file to somewhere other than your existing Eclipse workspace.

First, create an Android Library Project in Eclipse using the onyx-enroll-wizard folder, using the following steps:
  • In Eclipse, select File -> Import.
  • From the Import dialog, select Android -> Existing Android Code Into Workspace. Then click Next.
  • Select the checkbox to “Copy projects into workspace.”
  • Next to Root Directory, type in the path to the onyx-enroll-wizard folder or select Browse and navigate to the folder. (C:\path\to\onyx-enroll-wizard-x.y.z-android-sdk\onyx-enroll-wizard).
  • Confirm the project is a library project.
  • * Right-click on the project, select Properties.
    * Select Android in the navigation window.
    * Under Library, the checkbox for “Is Library” should be selected.

Once added as a library project, add onyx-enroll-wizard to your Android Application Project:
  • Under Properties->Android->Library, hit the Add button.
  • Select the onyx-enroll-wizard project and hit OK.
Using the Enrollment Wizard

Add the following permissions to the manifest tag in your AndroidManifest.xml file:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="" />
<uses-feature android:name=""
    android:required="true" />
<uses-feature android:name="android.hardware.flash" 
    android:required="false" />

Add the following activities to the application tag in your AndroidManifest.xml:
            android:screenOrientation="portrait" >
            android:screenOrientation="portrait" >
            android:label="@string/app_name" >
        <activity android:name="com.dft.onyx.enroll.ui.TipsActivity"
            android:screenOrientation="portrait" >

To start the Enroll Wizard, generate an intent to launch the Self Enroll Wizard, and pass it your application’s context (usually the current activity’s Context), your ONYX license key. This will start the Enroll Wizard with the self enrollment layout. By default it will show the ONYX Guide, but this can be customized using your own EnrollWizardBuilder object, if desired.
private final int REQUEST_CODE = 1; // Your custom request code here
// First generate an intent using the SelfEnrollIntentHelper
Intent onyxSelfEnrollIntent = new SelfEnrollIntentHelper().getSelfEnrollIntent(this, onyxLicenseKey);

// Finally, start the onyxSelfEnrollIntent  using your REQUEST_CODE
startActivityForResult(onyxSelfEnrollIntent, REQUEST_CODE);

This will return back to your activity in the method onActivityResult(), where you can proceed with your application. See below:
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (REQUEST_CODE == requestCode) {
        if (Activity.RESULT_OK == resultCode) {
            // Enrollment was a success
        } else {
            // Enrollment failed
Last Edit: 11 Feb 2015 21:06 by cwheatley.
The administrator has disabled public write access.
Time to create page: 0.059 seconds