Unified VPN SDK demo for Android

This is a demo application for Android with basic usage of Unified VPN SDK.

For the latest quickstart guide, see Quickstart.

JitPackarrow-up-right

Prerequisites

The following prerequisites are required to use the SDK:

  • Android 21+

  • Latest version of Android Studio (recommended)

  • Java Development Kit (JDK) 17

Setup

  1. Clone app source code locally from this Githubarrow-up-right.

  2. Launch Android Studioarrow-up-right and navigate to the folder containing the recently downloaded project from Github. Once the project is open, you need to sync the project with the Gradle files. To do this, follow these steps:

    1. Click on the File menu in the top menu bar. From the dropdown menu, select Sync Project with Gradle Files. Wait for the syncing process to complete. Android Studio will download any missing dependencies and build the project.

    2. Click on the Run menu in the top menu bar. From the dropdown menu, select Run 'app'. Wait for the process to complete. It should launch Android emulator and open the demo app.

  3. Sign in at pango-cloud.comarrow-up-right .

    circle-info

    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 example.com. Please contact your sales representative to initiate account creation as part of the project and client onboarding process or contact usarrow-up-right. We apologize for any inconvenience.

  4. In Pango dashboard, create a project and use a name for your project as a Public key. Private key is optional.

  5. Navigate to the Network tab from the navigation bar. Then, click on the Add location button.

  6. In Pango dashboard, navigate to the dashboard and locate your project_id. Open the demo app in Android Studio and enter the project_id in the Carrier field.

    circle-info

    Please note that while the application is titled "Hydra SDK Demo", it actually demonstrates the functionality of the Unified SDK.

  7. You are ready to connect to the VPN. To initiate the VPN connection process in the demo app:

    • Click the "init" button. No visible change will occur, which is expected behavior.

    • Click the "LOGIN" button. The app should now display a "Logged in" message, indicating successful authentication.

    • Click the "Connect" button. The app will establish the VPN connection, and display a "Connected" message upon success.

  8. Your device is now connected to the VPN. To verify the connection:

    • Open the Chrome browser on your Android device.

    • Navigate to whatsmyip.com.

    • Observe that the IP address displayed is different from your device's actual IP address, confirming that traffic is being routed through the VPN.

  9. To terminate the VPN connection when finished, click the "DISCONNECT" button in the demo app. This will sever the connection and restore direct network access.

More Information

See SDK documentation

See Troubleshooting

Last updated

Was this helpful?