cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2123
Views
25
Helpful
7
Replies

External Control for VPN in Android

coolalok123
Level 1
Level 1

Hi ,

I am connecting to VPN on Android externally using URI mechanism. Is there any way to detect whether i am already connected to Cisco VPN or not using some URI. I haven't found any in the documentation. Please help.

Regards,

Alok

7 Replies 7

Dear Alok,

May I know what you mean by connecting using URI mechanism?

Are you using the AnyConnect client?

Thanks.

Portu.

Hi,

Sorry for not being clear. I am using AnyConnect Client Application for Android.

Reference :-

http://www.cisco.com/en/US/docs/security/vpn_client/anyconnect/anyconnect24/release/notes/rn-ac2.4-android.html#wp1114806

How can i come to know whether VPN is connected or not ?

Thanks for the clarification.

To check current VPN sessions:

From CLI:

show vpn-sessiondb anyconnect

From the ASDM:

Keep me posted.

Please rate any post you find helpful.

Thanks for the response Javier, but i am afraid i had not clarified my question . I want to programatically know on Android phone itself whether Anyconnect is connected or not. One way is by pinging a VPN network computer but thats the last resort i will rely on . Like we can connect to VPN programaticaly i wanted to know that status of VPN programatically.

-Regards,

Alok

Hi Alok,

When the AnyConnect client is connected you should see a notification icon.

To know whether the AC client is connected or not using a different method, you may want to look for an application to monitor connectivity across the tunnel, besides that I do not think there is any other way.

Thanks, Portu.

Hi Alok,

​Did you manage to accomplish this, im currently having the same issue, if you have any tips about your work i will be glad to hear from you.

Regards,

Marco

 

Fotheringham1
Level 1
Level 1

Hi,

I know this is a very old post, but I am trying to develop an android app to do what you have done.  I am having difficulty finding any example of which Intent action to use and how to attach the URI to it.  My attempt is shown below,  but when I execute the code, I get and AnyConnect popup saying "This connection is not valid".  I would welcome any tips you can give.

Thanks

Garry.

Intent anyConnectIntent = new Intent(
"com.cisco.anyconnect.vpn.android.PRIMARY_ACTIVITY_ACTION_CONNECT_INTENT");

anyConnectIntent.putExtra(
"com.cisco.anyconnect.vpn.android.CONNECTION_ACTIVITY_CONNECT_KEY",
"anyconnect:connect?name=Angel");

startActivity(anyConnectIntent);