Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open VKontakte app with a specific friend?

Background

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("https://plus.google.com/%s/posts", 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?

like image 923
android developer Avatar asked Jan 10 '23 09:01

android developer


1 Answers

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

like image 95
Roman Truba Avatar answered Jan 20 '23 14:01

Roman Truba