Alec wrote: > I have attempted to read about intent filters and whatnot and cant > figure out why this doesnt work > > <?xml version="1.0" encoding="utf-8"?> > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > package="zerofate.torrentDroid" > android:versionCode="1" > android:versionName="1.0.0"> > <application android:icon="@drawable/icon" android:label="@string/ > app_name"> > <activity android:name=".TorrentDroid" > android:label="@string/app_name"> > <intent-filter> > <action android:name="android.intent.action.MAIN" /> > <category > android:name="android.intent.category.LAUNCHER" /> > </intent-filter> > > <intent-filter> > <action android:name="android.intent.action.VIEW" /> > <category android:name="android.intent.category." /> > <type value="application/x-bittorrent" /> > </intent-filter> > </activity> > </application> > </manifest> > > I've got the intent included, surely the browser should be able to > download the .torrent file now? Or do i need to create a separate > activity to accept the intent, and what special requirements does this > activity require (ie extends etc).
Your intent filter probably is not properly set up. See below. > Im pretty much at my witts end with this as i cant find any examples > or guides online targeted towards intent-filters and mime types. The NotePad tutorial is installed with your SDK, is often mentioned in these lists, and is documented on the Web site: http://developer.android.com/guide/tutorials/notepad/index.html It uses intent filters to handle alternative MIME types. Using it as a basis, you might try the following: <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="application/x-bittorrent"/> </intent-filter> -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

