Pango Platform
HomeConsole
  • What is Pango Developer Platform
  • Getting started
    • Sign up on the Management Console
    • Create a new project
    • Switch projects
    • Change console settings
    • Edit your profile
    • Try out the demo app
    • Keep exploring
    • Deprecation and Sunset
  • Console details
    • Dashboard
      • General
      • Location loading
    • Users
      • User page
    • Active sessions
    • Network
      • Countries
      • Locations
      • Pools
        • Optimal location
        • Location rules
    • Settings
      • General
        • Project config description (JSON format)
          • Server selector (JSON format)
          • Request selector (JSON format)
      • Authentication methods
        • Auth Plugin requirements
      • VPN
        • General
        • VPN Bypass list
        • Client Networks
      • Member
    • Export Data
    • Log
  • SDK
    • Unified VPN SDK for Android
      • Setup
        • Application Setup
        • Proguard Rules, Notification, and Analytics Configurations
        • Backend URL Configuration
      • Usage
        • Initialization
        • VPN Interface
        • Backend interface
      • Features
        • Hydra Protocol
          • Location profile (Hydra only)
        • Custom sdk dependencies
        • Deferred VPN Service Initialization
        • Authentication
        • Client Network List (CNL)
        • OpenVPN transport
        • Wireguard Transport
        • Reconnection strategy
        • Single Protocol SDK
        • Killswitch
        • Domain route via VPN
        • Process route via VPN
        • Process Bypass
        • Domain Bypass
        • Traffic rules
        • VPN Node DNS Configuration
        • Multihop
          • Optimal Location
      • Exceptions
      • Version migration
      • Changelog
    • Unified VPN SDK for Apple
      • Setup
        • Application Setup
        • Network Extension Setup
          • Network Extension Setup for tvOS
        • Backend URL Configuration
      • Usage
        • Single Protocol SDK
        • Unified SDK
        • Logging
        • Decoding Encoded VPN SDK Logs
      • Features
        • Deferred VPN Service Initialization
        • Authentication
        • Wireguard Transport
        • Reconnection strategy
        • Killswitch
        • Domain Bypass
        • Multihop
          • Optimal Location
        • Client Network List (CNL)
        • Domain route via VPN
      • Changelog
      • API Reference
    • IPSEC VPN SDK for Apple
    • Unified VPN SDK for Windows
      • Setup
        • Backend URL Configuration
        • Service command line arguments
        • ARM Platform Support
      • Usage
        • CoreAPI
        • Events
        • Generating a Unique Device Identifier
        • Error processing
        • Pipe Messaging
      • Features
        • Traffic protection
          • Killswitch
          • Prevent IP Leaks
          • Block Local Networks
        • Other
          • Firewall
            • DNS Monitor
            • Process Bypass
            • Domain Bypass
            • Process route via VPN
            • Domain route via VPN
          • Throttling
          • Optimal Location
          • Common issues
        • Hydra Protocol
          • CustomDNS, UserDNS, MultiHop, VpnProfiles
        • OpenVPN Protocol
        • Wireguard Protocol
        • IPSec Protocol
      • Collecting Debug Logs
      • Changelog
    • Unified VPN SDK for Routers
      • SDK. Shared library.
      • Configuration Interface (CI)
        • Unix Domain Sockets CI
        • REST API CI
    • Unified VPN SDK Feature Comparison By Platform
    • Unified VPN SDK
      • Features
        • Personal Bridge
    • Tunnel Vision and Tunnel Crack Prevention
  • REST API
    • Partner API
  • Sample applications
    • Unified VPN SDK demo for Windows
    • Hydra VPN SDK demo for iOS
    • IPSEC VPN SDK demo for iOS
    • Unified VPN SDK demo for Android
    • Hydra VPN SDK demo for OpenWRT
    • OpenVPN configuration file
  • Resources
    • Use cases
      • Public VPN
      • Business VPN
        • Creating a Business VPN Project
        • Wi-Fi Security for Business
      • Application anti-blocking
    • How-to
      • Create a Firebase project for User Authentication
      • AWS CloudFront Distribution of the Platform URL
      • How can I get Shared Secret key from iTunes Connect for In-App Purchase
  • FAQ
    • General
      • VPN Platform Flow
      • What data is collected by the Platform?
      • What analytic data is collected by your SDK?
      • How the Platform restricts access to our data?
      • Why DNS Leak tests often indicate positive result?
      • Do we need to perform endpoint health checks?
      • How is the VPN exit node found?
      • How are streams re-marked if VPN is enabled/disabled on an active flow?
      • Is there a maximum number of supported devices?
      • Are both IPv4 and IPv6 supported?
      • What is the MTU of the tunnel?
      • Are any redundancy measures in terms of reliability provided?
      • Is there any load balancing?
      • Do you block broadcast and multicast to/from the VPN?
    • List of Open Source libs
Powered by GitBook
On this page
  • General
  • Prerequisites
  • Supported Protocols
  • Supported Features
  • Setting up a project in Android Studio
  • Configuring Android Studio
  • Configuring the SDK Dependency
  • Sample App
  • Version Migration
  • Versioning convention
  • Changelog
  • Support

Was this helpful?

  1. SDK

Unified VPN SDK for Android

Supports Hydra, OpenVPN, Wireguard protocols

PreviousLogNextSetup

Last updated 25 days ago

Was this helpful?

Current version: 5.1.1

General

The Android SDK is part of the Pango Partner SDK, providing client-side libraries and server-side applications for implementing custom VPN infrastructure.

The SDK software is not available to be downloaded as an executable directly here. Rather, in a later step, the SDK will be added as a dependency. When you build your app, the SDK will be downloaded as a set of libraries and modules, the same way as other dependencies.

Prerequisites

The following prerequisites are required to use the SDK:

  • Android 5.0 (API Level 21) and higher (API Level 29 or higher for OpenVPN)

  • An IDE for development. The pictures in the rest of the API documentation will be showing Android Studio which can be downloaded .

Additionally, in order to be able to use the SDK, the following steps have to be done:

  • Sign in at .

  • Create a project and use a name for your project as a Public key. Private key is optional.

  • Use SDK where carrierId equals given Public Key and backend url equals default SDK url or url provided by Pango team.

Note that at this time, it is not possible for users to create their own accounts directly if they do not already have an account established with us. Please contact your sales representative to initiate account creation as part of the project and client onboarding process or . We apologize for any inconvenience.

Supported Protocols

The Android SDK supports the following VPN protocols:

  • Hydra

Supported Features

Feature
Description

The SDK supports overriding default backend API URLs by adding a new raw resource file named pango_default_urls.json to your project.

Allows you to override and customize parts of the VPN SDK's internal logic, such as the logger, OkHttp client, backend URL rotator, and notification builder.

Ability to defer VPN service initialization and enable it later using PackageManager API.

Supports OAuth authentication with a partner's OAuth server as the primary authentication method.

Allows configuring, starting, stopping, updating, and monitoring VPN sessions, and supports useful features like transport fallback, DNS/proxy rules, and permission handling.

Supports listing available VPN locations and countries, handling purchases and deletions, and retrieving information about the current user's remaining traffic and account details.

Supports automatically starting and stopping VPN sessions based on a configurable client network list (CNL).

Provides the ability to categorize domains, route traffic through a VPN, and perform specified actions like allowing, blocking or redirecting requests based on the category.

Configure domain-based and IP-based traffic rules to control DNS resolution and routing of traffic through Hydra VPN using the addDnsRule and addProxyRule methods.

Supports changing the DNS server used on the VPN node to resolve DNS requests.

Supports custom location profiles for VPN sessions.

Provides the ability to connect to a desired location through another location as a proxy.

Automatically select the best VPN server for your connection.

Supports adding OpenVPN transport to enable VPN connections over TCP.

Allows apps to enable fast and secure VPN connections on Android devices using the Wireguard protocol.

Automatically handles network reconnection when switching between networks.

Setting up a project in Android Studio

Configuring Android Studio

Step 1. After downloading Android Studio, select ‘New Project’

Step 2. Choose the template that is most appropriate for your application. This guide will follow the ‘Empty Activity’ template as seen in the corresponding picture.

Step 3. Create a name for your project

Step 4. Select the minimum SDK requirements for your project. Our SDK is compatible with API 21 (Lollipop”; Android 5.0) and newer. For the sake of this walkthrough, we will be selecting API 21.

Click ‘Finish’ after all your selections have been made

Step 5. The following screen will be a install screen. The installation is relatively quick. The associated picture to this step shows the screen after the install is complete.

Click ‘Finish’

Step 6. You will be taken to a page in Android Studio that looks like this

Step 7. You will be taken to a page within Android Studio that looks like this

Configuring the SDK Dependency

Add dependencies in build.gradle of your app module. Version name is available at the top of this document.

dependencies {
    implementation 'co.pango:sdk:{VERSION_NAME}'
}

Step 1. In the left hand menu select the tab build.gradle.kts (Module :app) which is nested under the Gradle Scripts folder.

Step 2. Once in the build.gradle.kts (Module :app) file, scroll down until you see the dependencies list at the bottom

implementation("co.pango:sdk:x.y.z")

Step 4. Click on the Light Bulb icon that appears after entering the line of code. Then click ‘Sync Now’.

It will take a minute or longer to sync. There will be a status bar at the top letting you know that it is syncing and it will also let you know when the sync is successful.

After the Sync is complete, you will receive this message at the bottom of the Android Studio screen:

Sample App

Version Migration

Versioning convention

The Android SDK provides API containing:

  • Classes and methods to authorize client users

  • Ability to connect to backend VPN service

Changelog

Support

Step 3. Insert the code snippet below into the dependency list. Be sure to include the most recent version of the SDK within that snippet which can be found at the .

You can find source code of sample app with integrated sdk on .

For migration between versions, check

Android SDK versioning is in format MAJOR.MINOR.PATCH and should be associated with version in Jira. .

The SDK version history and changes are documented .

If you encounter any issues or have questions regarding integrating the SDK, please visit our .

here
pango-cloud.com
contact us
OpenVPN
WireGuard
GitHub
this
See conventioning rules
here
Github
top of this document
Backend URL configuration
Custom SDK dependencies
Deferred VPN service initialization
Authentication
VPN interface
Backend interface
Client Network List (CNL)
Fireshield (Hydra transport)
Traffic rules
VPN node DNS
Location profile (Hydra only)
Proxy connection (Hydra only)
Optimal Location
OpenVPN transport
WireGuard transport
Reconnection strategy