Posted By

ralph on 12/25/08


Tagged

twitter android twidroid public intent


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Krispin


Twidroid Public Intent for Twitter Direct Messages


 / Published in: Java
 

URL: http://www.twidroid.com

  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. <a href="http://www.direct-quotes.com> auto insurance quotes

Posted By: mikewq on November 6, 2009

thanks. very useful.

You need to login to post a comment.