- Revenera Community
- :
- Usage Intelligence
- :
- Usage Intelligence Knowledge Base
- :
- SDK Integration - Getting Started With Usage Intelligence - Part 1
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
SDK Integration - Getting Started With Usage Intelligence - Part 1
SDK Integration - Getting Started With Usage Intelligence - Part 1
In the first article of this 3 part series, we will be looking at how you can integrate your application with Revenera Usage Intelligence in 4 easy steps from registering your product to viewing the first call-home data in your Dashboard. We will be using a simple calculator application and the .NET SDK with C# code examples to demonstrate these steps.
NOTE: We also offer SDKs and API documentation for C/C++, Objective-C, and Java, which can be found on Usage Intelligence SDK Download Links and API Documentation.
- SDK Integration - Getting Started with Usage Intelligence - Part 1
- Event Tracking - Getting Started with Usage Intelligence - Part 2
- Software License Usage Tracking - Getting Started with Usage Intelligence - Part 3
Prerequisite
A Revenera Usage Intelligence account is required. If you don’t have one yet you may sign up for free on the Revenera website.
Registering Your Product
The first step is to register your product and retrieve the Callhome URL and Product ID. These will be unique to your product, and will be used to later integrate the SDK into your application.
To register your product:
- Log in to your Usage Intelligence account.
- On the Usage Intelligence Home page, click on the Register Product button.
- Enter the name of your product and then click OK. Your product will now be listed in the Product selection menu at the top of the page, with its Product ID listed in parentheses after it.
- With your product selected in the Product selection menu, select Developer Zone from the Administration menu. On the Developer Zone page, you can obtain your product's Call Home URL and AES Key. You will need this information as well as the Product ID to integrate your application with Usage Intelligence.
Downloading and Importing the SDK Files
The next step is to download the SDK files and import them into your solution to start making use of the available functionality provided by Flexera.
To download and import the SDK files:
- On the Usage Intelligence SDK Download Links and API Documentation page, click to download the appropriate platform/language.
- Unzip the downloaded file and you should find 3 DLL files
- Copy the following files in the <Application Path>\Bin\Debug folder of your application.
- ruiSDK_<x.x.x>.x86.dll
- ruiSDK_<x.x.x>.x64.dll
- Open your application in Visual Studio, and in the Solution Explorer right click on References > Add Reference…
- Browse to the location where you unzipped the Usage Intelligence SDK and choose ruiSDKDotNet_<x.x.x>. dll.
Integrating with Usage Intelligence
You are now ready to integrate your application with Usage Intelligence. All you need to do is to tell Revenera when to start and stop tracking to be able to see your first data.
To integrate with Usage Intelligence:
- Open the class which contains the entry code for your application. In this example, we will use the Load event of our calculator
- At the top of the file, add the directive using RUISDK_<x_x_x>; where x_x_x is the SDK version you downloaded, such as 5_0_0.
- Initialize the SDK by using the following code:
RUISDK rui; private void frmCalculator_Load(object sender, EventArgs e) { rui = new RUISDK(true, "path to Revenera Usage Intelligence SDK .NET library"); string filePath = “<path where SDK files will be saved>”; string productID = “<my product ID>”; string appName = “MyCalculator”; string productUrl = “<my product URL>”; int protocol = 1; string aesHexKey = “<my AES key>”; bool multiSessionEnabled = false; bool reachOutOnAutoSync = true; //Create config rui.CreateConfig(filePath, productID, appName, productUrl, protocol, aesKey, multiSessionEnabled, reachOutOnAutoSync); //Start app rui.StartSDK(); //The rest of your code… }
Note the following regarding the code:
- File Path: The path where the Usage Intelligence SDK config and log files will be saved.
- Product ID: The ID we retrieved when registering the product.
- App Name: A name for the app, cannot contain spaces
- Product URL: The callhome URL we retrieved when registering the product.
- Protocol: The protocol to use to connect to the Usage Intelligence server (1 = HTTP with AES encryption, 2 = HTTPS with fallback to HTTP + AES, 3 = HTTPS only).
- AES Key: The AES Key we retrieved when registering the product.
- Multi-Session: True or False, whether session start and stop are managed by the application
- ReachOut on Auto Sync: True or False, whether the SDK should check for automatic ReachOut campaigns when it performs auto sync
- Add the following code where you would like the tracking session to stop. In this example we are using the FormClosing event of the calculator:
private void frmCalculator_FormClosing(object sender, FormClosingEventArgs e) { rui.StopSDK(0); }
- Build your solution, and the next time you run the application Usage Intelligence will start logging data for you. You might need to run and close the application before you see the data in your Dashboard
Viewing Reports
Just by following these easy steps, Usage Intelligence provides you with several reports on the usage of your application. To access these reports, go to your Usage Intelligence Home page, select your product from the drop-down at the top left, and select from the various options in the menu on the left. Below is a quick overview of the available reports at this stage.
Runtime Intelligence
- Activity Overview: View how many users used your application over a period of time.
- Runtime Session Tracking: View the average running time of your application and the average number of sessions per user.
Distribution Reports
- Geographical Distribution: View the location of your users by region, country, and state.
- Version / Build Distribution: Reports on the number of users per version or build.
- OS Distribution: View the number of users per operating systems.
Architecture Reports
- CPU & Memory: Reports on the CPU Cores, Types, and RAM where your application is running.
- Operation System: View operating systems, architecture, and language.
- Display: Reports on the screen resolution, number of displays and top resolutions in use.
- PC Type: View the type of devices where your application is running, e.g. Desktop or Laptop.
You are now ready to start tracking events in your application and report on custom data. Check the next article to see how!