Repository navigation
2. Manual Integration
The Android SDK can be integrated in minutes to enable reporting of key application metrics. Setup
##Manual Integration
NOTE: Please include Android v4 Support Library (revision 19.1.0) or greater in your application project. Click here for more information on support libraries.
- Obtain a Pyze App Key for your Application
- Download the latest version of the Android SDK
- Drop the jar file into your app project's lib directory
- Add the jar file to the project’s build path
- In your application’s AndroidManifest.xml, add the Pyze App key as Meta Data
-
Via Android Studio:
-
Via Eclipse: Select AndroidManifest.xml from the Package Explorer. Select the Applications tab. Under Application Nodes, click Add. Select ‘Meta Data’ and press ‘OK’. Select the new ‘Meta Data’ item from the list and change its name to ‘pyzeAppKey’ and set is value to the key you obtained in step 1.
-
Manually: In AndroidManifest.xml, add the following inside the application tag:
<meta-data android:name="pyzeAppKey " android:value=" Key Obtained in STEP 1"/>
- In your application’s AndroidManifest.xml, ensure that Internet permissions are enabled for the application. (If your app already supports internet access, this permission should already be listed). Via Eclipse: Select AndroidManifest.xml from the Package Explorer. Select the Permissions tab, Click Add. Select Uses Permission and hit OK. Under Name, enter android.permission.INTERNET. Manually: In AndroidManifest.xml, add the following after the other uses tags:
<uses-permission android:name="android.permission.INTERNET" />
- In your app project’s Main Activity, make the following additions.
a. Add the following import statement
**import com.pyze.android.library.*;**
b. Add the following initialize statement in the onCreate method
public void onCreate(Bundle savedInstanceState) { Pyze.initialize(getApplication()); }