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

So thats my Java code I took from another app i made to send an intent to the user's email. I'm pretty sure the package name for snapchat is

com.snapchat.android

I'm not sure how to send an intent to a social app. Any help is appreciated.

I would like the intent to open the user's snapchat to the main layout where you take a picture.

Thanks in advance

timmyspan
  • 77
  • 1
  • 11

1 Answers1

5

Check out this, it will open the Snapchat App directly if installed, other wise an msg showing no apps can perform this action.

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

Best Wishes..!!

Ragu Swaminathan
  • 3,507
  • 22
  • 28
  • Thanks for the quick response and code! When i tested this out it is still telling me ViewPostImeInputStage ACTION_DOWN. I'm not sure why it isn't executing... wait i might have fixed it – timmyspan Feb 19 '16 at 19:20
  • Ragu you are great!! I forgot my onClick attribute in my XML... duhh lol! Thanks again :) – timmyspan Feb 19 '16 at 19:23
  • Hope you will be calling the above lines under some on click listener, correct ? – Ragu Swaminathan Feb 19 '16 at 19:23
  • I wish there was a way to open a specific user, but it seems that it isn't really possible at this point. I haven't been able to figure it out at least and there is an empty question [here](http://stackoverflow.com/questions/31436060/intent-to-open-a-chat-with-a-specific-user-on-snapchat-app). – Krøllebølle Mar 10 '16 at 19:03
  • i'm not sure at this point. Let me help you in this. give me some time. – Ragu Swaminathan Mar 14 '16 at 13:17
  • Is there any way to share a video with intent? – Chitrang Sep 05 '18 at 17:33
  • Is there a way to request Snapchat to have a recording video session, where the user can record with their effects, and get it back to our app? – android developer Dec 16 '18 at 07:51
  • @androiddeveloper I'm not sure on this. Just give try to snapkit SDK https://docs.snapchat.com/docs/api/android/ – Ragu Swaminathan Dec 18 '18 at 06:59