向Snapchat发送意图

时间:2016-02-19 18:48:14

标签: android android-intent

 public void postStory (View view) {
        Intent intent = new Intent(Intent.ACTION_SENDTO);
        intent.setData(Uri.parse("mailto:"));
        startActivity(intent);

这就是我从另一个应用程序中获取的Java代码,用于向用户的电子邮件发送意图。我非常确定Snapchat的包名是

com.snapchat.android

我不确定如何向社交应用发送意图。任何帮助表示赞赏。

我希望将用户的兴趣打开到您拍照的主要布局。

提前致谢

1 个答案:

答案 0 :(得分:5)

看看这个,它会在安装时直接打开Snapchat应用程序,其他明智的消息显示没有应用程序可以执行此操作。

    Intent intent = new Intent(Intent.ACTION_SEND);
    intent.setType("*/*");
    intent.setPackage("com.snapchat.android");
    startActivity(Intent.createChooser(intent, "Open Snapchat"));

祝福...... !!

相关问题