Follow the listed process to add the AWNetworkLibrary to your project.

  1. Set up Gradle.

    Add all the dependency JARS and AARS from libs > AWNetworkLibrary > Dependencies. For each AAR file, add entry as below stating name and ext type.

    dependencies {
                            ... // In addition to AWFramework entries add the below library 
                            compile (name:'AWNetworkLibrary-18.2’, ext:'aar')
  2. Initialize the AWNetworkLibrary.

    1. Follow the steps outlined in Initialize the AWFramework.
    2. In the extended AWApplication class, override getMagCertificateEnable() and return true to fetch the certificate for the AirWatch Tunnel.

                                    * This method should be override if your application supports fetch mag certificate
                                    during login process.
                                    * @return true if app supports fetch mag certificate.
                                    public boolean getMagCertificateEnable() {
                                    return true;
    3. Set GatewaySplashActivity as your main launching activity instead of SDKSplashActivity.

      <activity android:name="com.airwatch.gateway.ui.GatewaySplashActivity" 
                                    	android:label="@string/app_name"  > 
                                    			<action android:name="android.intent.action.MAIN" /> 
                                    			<category android:name="android.intent.category.LAUNCHER" /> 
    4. Extend GatewayBaseActivity at the activity level to support network features like tunneling and integrated authentication in addition to AWFramework features.