and*_*per 4 android android-intent vk
为了与特定的 Facebook 好友打开 Facebook 应用程序,您可以使用以下意图:
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("fb://profile/%s", friendId)));
Run Code Online (Sandbox Code Playgroud)
LinkedIn 也有类似的解决方案:
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("linkedin://profile/%s", friendId)));
Run Code Online (Sandbox Code Playgroud)
我认为下一个将适用于 Google Plus(没有测试它,但看起来很有希望):
final Intent intent =new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("https://plus.google.com/%s/posts", friendId)));
Run Code Online (Sandbox Code Playgroud)
我试图找到如何使用此类意图打开 VKontakte (VK) 社交网络应用程序,但找不到它。
有这样的意图吗?如果是的话,那是什么?
开发商的答复如下:
是的,它是用同样的方式完成的:
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format("vkontakte://profile/%d", friendId)));
Run Code Online (Sandbox Code Playgroud)
如果您需要打开社区,请使用相同的 URL,但在社区 ID 中添加减号。
| 归档时间: |
|
| 查看次数: |
3391 次 |
| 最近记录: |