We Recommend

Java How to Program Java How to Program
Takes a new tools-based approach to Web application development that uses Netbeans 5.5 and Java Studio Creator 2 to create and consume Web Services. Features new AJAX-enabled, Web applications built with JavaServer Faces (JSF), Java Studio Creator 2 and the Java Blueprints AJAX Components. Includes new topics throughout, such as JDBC 4, SwingWorker for multithreaded GUIs, GroupLayout, Java Desktop Integration Components (JDIC), and much more.


Posted By

ralph on 12/25/08


Tagged

twitter android twidroid public intent


Versions (?)


Who likes this?

1 person has 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: 4insure on October 13, 2009

great post auto insurance quotes

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.