---
title: startConnection(String profileName)
slug: isac/admin-guide/android/startconnectionstring-profilename
docTags: 
createdAt: 2026-07-23T05:01:25.259Z
---

Starts a VPN session using the specified VPN profile.

### Syntax:

int startConnection(String profileName)

### Parameters:

The profileName is the name of the VPN profile.

### Returns:

This method returns 0 on success, 1 if the profile does not exist, and -1 on other errors.

When startConnection() returns 0, it means that a VPN session is getting started. It is possible that a VPN session may not be established after startConnection() returns 0. The caller can call getState() to obtain the VPN state. When the VPN fails to start, the caller can call getErrorString() to obtain a description for the error.
