Integrating the Intel AppUp™ SDK with your application
Introduction
The Intel AppUp™ SDK for MeeGo* provides a high level API interface to advanced authorization functionality like Digital Rights Management (DRM) and crash reporting. Though optional, developers who wish to include such functionality in their applications are recommended to integrate the Intel AppUp™ SDK with their application. This tutorial guides developers through the steps involved in making their application ready for the AppUp(SM) center.
Prerequisites
- Windows XP/Windows 7
- Download and Install MeeGo* SDK 1.2 preview for Windows: http://appdeveloper.intel.com/en-us/meego-sdk-suite
- Download and Install the Intel AppUp Beta SDK for MeeGo: http://appdeveloper.intel.com/en-us/meego-sdk-suite
Create a new application:
From within the Qt Creator IDE, choose File -> New file or project option. You can now create a new template for the type of application you wish to develop. For the sake of simplicity, this shows a Qt* C++ project -> Qt GUI Application. The new project creation wizard takes you through a series of steps which allow you to select the application name and project location. When you are done, click “Finish” and you now have a fresh project workspace to work on.
Integrate with AppUp SDK API:
It is important to ensure that the AppUp SDK is properly initialized before other APIs can be used. Another important feature of the AppUp SDK is the ability to prevent unauthorized use of your application. In order to include this functionality into your application, add the following code snippet into your main.cpp file. Be sure to first include the headers required: #include “adpcppf.h” . In the body of the main() function, add the below code:
As you can see in the code, exceptions are thrown if the AppUp SDK is used without initialization or without authorization. All other run time exceptions are caught with the last catch block. An important aspect to consider here is the use of Debug ID - ADP_DEBUG_APPLICATIONID within the code. While this will allow you to test the AppUp SDK authorization mechanism using the debugger provided with the AppUp SDK, you will have to substitute it with a GUID when you are ready to submit your application to the AppUp developer program. The process for obtaining a GUID is explained in a later section. Now add the following section into the “project.pro” file:
You are now ready to write your code within this project. Here is a simple example of building a "Hello World" application that is integrated with AppUp SDK. To do this, you will need to add code within the main.cpp right after the try{} and catch{} blocks.
You are now ready to debug the application.
Debugging the application:
When you integrate your application with the AppUp SDK, you can use the AppUp SDK debugger to verify the API functionality. The debugger installer is available once you install the Intel AppUp SDK. You can find the installer in “AppUpSDKInstallPath/Intel/IntelAppUpSDKMeego/Tools”. Install the debugger on your test device. More instructions on setting up the target is available at: http://appdeveloper.intel.com/en-us/article/installing-meego-sdk-windows . The SDK Developer Guide for MeeGo for both C and C++ developers can also be found under the path: “AppUpSDKInstallPath/Intel/IntelAppUpSDKMeego/Cpp/doc”. This document explains in detail, the steps required to get the debugger up and running. More information on the API is available in http://appdeveloper.intel.com/sites/files/pages/SDK%20C++%20Framework%20Reference.pdf.
Now that you have the debugger working, you can build and run your application from the Qt Creator IDE project workspace. The output you will see on the debugger will be similar to what you see below. Please note, that the debugger can only be used correctly with the debug ID - ADP_DEBUG_APPLICATIONID - within your code. When you substitute the Debug ID with a GUID, the debugger will indicate that the application is not authorized to run.
Since the application is authorized to run, you will see the “Hello world” displayed on your test target:
Getting a GUID:
To submit applications to the AppUp developer program, you will need to create an account on http://appdeveloper.intel.com . When you use your account credentials to login, you will see “My Dashboard” at the top right of your account page. To submit a new application, click on “My Dashboard -> Start a New Application”, you will be prompted to enter the application name. Upon entering the application name, you will be taken to the “Application Info” page. You will find a unique GUID generated for your application on this page. Copy this GUID and replace the Debug ID with this GUID as below:
When you run this through the debugger, you will see an output similar to the one below:
Since the application is not authorized to run, the application exits immediately without displaying “Hello World”. That’s it. Your application is now ready to be submitted to the AppUp center. You can now beta test your application and submit it to the AppUp Developer Program.