1. Create a new app in Android Studio.
  2. To integrate the library(QuixxiLibrary.aar) with the application using Android Studio Goto File -> New Module -> Choose Import .JAR/.AAR package and click Next.
  3. Choose the extracted Licensing Framework SDK(QuixxiLibrary.aar), change subproject name if necessary and click Finish.
  4. Once Licensing Framework SDK imported, Goto File -> Project Structure. Select Licensing Framework SDK to add.
  5. Goto Dependencies option in Project structure Add Licensing Framework SDK as Module dependency.


Add the below permissions in your Manifest.xml

<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;"><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.android.vending.CHECK_LICENSE" /></span></span>


Add these below permissions if you need to track the Location of the user

<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;"><uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /></span></span>



Initializing the library

        Once the library is added to your build system, your application can make use of the features of Licensing framework. To instantiate Licensing, you need to call the below instance of licensing class in each of your activity’s onCreate method.


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;"> A lu = new A(_context)
 //instance of
 lu.a(MainActivity.this); 
 // Mainactivity context.</span></span>


        in onResume() method call the following


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">A a = A.ad(_activity_context);
a.yu(_activity_context);</span></span>


        in onPause() method call the following


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">A a = A.ad(_activity_context);
a.p(_activity_context);</span></span>


Now your app is secured and ready for validating against google licensing.