partners changelog faq download features
pluginstwidroid supports plugins to allow android developers extend the core functionality with features such as sharing with other services or integrating your own url shortener.
you can check out our sample plugin for maps on google code and start building your own right away. if you like to be listed on this site email us at hello [/at/] twidroid.com with your project infos. for future information exchange, we’ll provide a dedicated developer forum shortly.

AVAILABLE PLUGINS

google maps
twidroid_googlemapsfeatures native google maps integration for tweets on devices with firmware 1.6 and above. source code available on google code.
search the android market for "twidroid maps"

voice alerts
twidroid_googlemapsreads out your notifications incl. sender and time — more infos





BUILD YOUR OWN – BASIC API & PLUGIN INSTRUCTIONS

) sending tweets from your own applications

### via twidroid’s ACTION_SEND intent

Intent sendIntent = new Intent(Intent.ACTION_SEND); 
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is a sample message via Public Intent"); 
sendIntent.setType("application/twitter"); 		
startActivity(Intent.createChooser(sendIntent, null)); 


### via web apps for android:

<html>
<h2>send a Message with twitter:// url handler</h2>
<p><a href="twitter://send?Sample+Tweet+from+Twidroid">Send a message via Twidroid</a></p>
</html>


) creating plugins for twidroid

plugins for twidroid need to respond to the mime-type: application/twidroid-plugin.get
sample AndroidManifest.xml snippet from Google Maps 4 twidroid plugin:

<activity  android:icon="@drawable/tweet_geo"  android:name="LocationDialog"
                  android:label="@string/chooser_label" android:theme="@style/SpecialDialog">
	<intent-filter>
		<category android:name="android.intent.category.DEFAULT" />                	
		<action android:name="com.twidroidplugins.maps.LocationDialog"/>
		<!-- respond to mime-type application/twidroid-plugin.get -->
		<data android:mimeType="application/twidroid-plugin.get" />
		<action android:name="android.intent.action.GET_CONTENT" />
	</intent-filter>
</activity>


the plugin can return the following data types back to twidroid:
  • Intent.EXTRA_TEXT use to return text to Twidroid
  • setData to return a URL
  • Extra Strings: “latitude”, “longitude” to return location information

sample code snipped from Google Maps 4 twidroid plugin:
this snipped shows how the plugin returns an URL as well as location information back to twidroid.
	Intent returnData = new Intent();
	returnData.setData(Uri.parse("http://maps.google.com?q="
		+ myLocationOverlay.getLastFix().getLatitude()+ ","
		+ myLocationOverlay.getLastFix().getLongitude() ));
	returnData.putExtra("latitude", myLocationOverlay.getLastFix().getLatitude());
	returnData.putExtra("longitude", myLocationOverlay.getLastFix().getLongitude());
	setResult(RESULT_OK, returnData);
	finish();

full source code for the Google Maps 4 twidroid plugin available at
http://code.google.com/p/android-twitter-googlemaps/

### twidroid content provider

to directly access tweets of twidroid to use in widgets or other applications, you can use the twidroid content provider. the uri for the content provider is content://twidroid.provider.Tweet/tweets.
the following sample code reads all currently cached tweets from twidroid and shows them as toast text:

 Uri allTweets = Uri.parse("content://twidroid.provider.Tweet/tweets");
	Cursor c = managedQuery(allTweets, null, null, null, null);
	if (c.moveToFirst()) {
		do{
		  Toast.makeText(TwidroidTest.this, c.getString(c.getColumnIndex("user_name")) + ": " +
		  c.getString(c.getColumnIndex("message")),Toast.LENGTH_LONG).show();               
		} while (c.moveToNext());
	}