Using Intent in Java code to share text via twitter app on Android is easy to implement, so here is a snippet code.
See you in the next code snippet for Android development. So we made the development easier.
String twUrl = "http://www.twitter.com/intent/tweet?text=" + "text to share via twitter app or twitter for web";If twitter app is installed, the share will be via twitter app. And if not installed, the text will be shared via twitter for web.
Intent twi = new Intent(Intent.ACTION_VIEW);
twi.setData(Uri.parse(twUrl));
startActivity(twi);
See you in the next code snippet for Android development. So we made the development easier.