Posted By

ralph on 12/25/08


Tagged

twitter android twidroid public intent


Versions (?)


Advertising

Submit Site


Who likes this?

1 person has marked this snippet as a favorite

Krispin


Twidroid Public Intent for Twitter Direct Messages


Published in: Java 



Website Promotion
DIRECTORY
is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


URL: http://www.twidroid.com

Expand | Embed | Plain Text
  1. final Button button2 = (Button) findViewById(R.id.senddirect);
  2. button2.setOnClickListener(new View.OnClickListener() {
  3. public void onClick(View v) {
  4. Intent intent = new Intent("com.twidroid.SendDirect");
  5.  
  6. /* set recipient of direct message */
  7. intent.putExtra("com.twidroid.extra.TO",
  8. "androidev");
  9.  
  10. /* set direct message content */
  11. intent.putExtra("com.twidroid.extra.MESSAGE",
  12. "This is a test from Twidroid public intent.");
  13.  
  14. try {
  15. startActivityForResult(intent, 1);
  16. } catch (ActivityNotFoundException e) {
  17. /* Handle Exception if Twidroid is not installed */
  18. TextView text = (TextView) findViewById(R.id.message);
  19. text.setText("Twidroid Application not found.");
  20. button2.setVisibility(View.GONE);
  21. }
  22. }
  23. });

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: ralph on December 27, 2008

See here how to send simple tweets

Posted By: ralph on December 27, 2008

See here how to send direct messages

Posted By: mikewq on November 6, 2009

thanks. very useful. Posted By: mikewq on November 6, 2009

thanks. very useful.

You need to login to post a comment.

Download royalty free graphics