android developer android developer - 2 years ago 256
Android Question

How to open VKontakte app with a specific friend?


In order to open Facebook app with a specific Facebook friend, you can use this intent:

final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("fb://profile/%s", friendId)));

A similar solution is found for LinkedIn:

final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("linkedin://profile/%s", friendId)));

I think the next one will work for Google Plus (didn't test it, but it seems promising) :

final Intent intent =new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("", friendId)));

The question

I've tried to find how to open VKontakte (VK) social network app using such intents, but couldn't find it.

Is there such an intent? If so, what is it?

Answer Source

The answer from developer is next:

Yes, it's done the same way:

final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("vkontakte://profile/%d", friendId)));

If you need to open a community, use the same URL but add the minus sign to the community ID.

Question answered here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download