Last active
December 25, 2015 05:18
-
-
Save sakurabird/6923039 to your computer and use it in GitHub Desktop.
(android)KAKAOにIntentを送る
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new Intent(Intent.ACTION_SEND); | |
intent.setType("text/plain"); | |
intent.putExtra(Intent.EXTRA_SUBJECT, "かかおにおくりたいSubject"); | |
intent.putExtra(Intent.EXTRA_TEXT, "カカオに送りたいText"); | |
intent.setPackage("com.kakao.talk"); | |
try { | |
startActivity(intent); | |
} catch (Exception e) { | |
Toast.makeText(getApplicationContext(), "KAKAOがインストールされていません", Toast.LENGTH_LONG) | |
.show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment