Created
June 4, 2015 17:58
-
-
Save ardiwine/3e0d4458a1396989fe1b to your computer and use it in GitHub Desktop.
Android share intent on Appcelerator
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
var shareIntent = Ti.Android.createIntent({ | |
action : Ti.Android.ACTION_SEND, | |
type : 'text/plain', | |
url : 'your URL here' | |
}); | |
shareIntent.putExtra(Ti.Android.EXTRA_TEXT, args.news.link); | |
shareIntent.addCategory(Ti.Android.CATEGORY_DEFAULT); | |
actionBar.addShareAction({ | |
menu : e.menu, | |
intent : shareIntent, | |
showAsAction : Ti.Android.SHOW_AS_ACTION_IF_ROOM | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment