Intents, browser click and Mime

Put your problem here if it does not fit any of the other categories.

Intents, browser click and Mime

Postby johnsenf » Thu Nov 05, 2009 9:43 pm

Greetings

I have a problem tuning into the right Intent -settings. I'm trying to activate my app when the browsers has a .torrent -link clicked. Right now it's is working on certain sites (like ubuntu download, and the pirates bay), I'm getting the intent fired and my application launches - but it's not working for some other sites (mininova and isohunt).

I've intercepted the network traffic using a proxy (charles), and I am getting mimetype x-bittorrent from all the cases described, so I'm in a loss here.


Here is my code in AndroidManifest.xml:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/x-bittorrent" android:scheme="http"/>
</intent-filter>

And here is what I get in LogCat at a succesful click (i'm obfuscating some unimportant stuff):
11-05 21:28:32.313: INFO/ActivityManager(562): Starting activity: Intent { action=android.intent.action.VIEW categories={android.intent.category.BROWSABLE} data=http://torrents.ubuntu.com/ubuntu-9.10.torrent comp={com.android.browser/com.android.browser.BrowserActivity} }
11-05 21:28:32.653: INFO/ActivityManager(562): Starting activity: Intent { action=android.intent.action.VIEW data=http://torrents.ubuntu.com/ubuntu-9.10.torrent type=application/x-bittorrent comp={com.test.activity/com.finnjohnsen.activity.TorrentFluxPushActivity} }


And here is an unsuccesful click, which does not invoke my app:
11-05 21:35:45.193: INFO/ActivityManager(562): Starting activity: Intent { action=android.intent.action.VIEW categories={android.intent.category.BROWSABLE} data=http://www.mininova.org/get/3107025 comp={com.android.browser/com.android.browser.BrowserActivity} }


Any suggestion on how I proceed on figuring this out? I'de like to be able to react to all links clicked, then trying to narrowing it down if I figure something out from debugging the Intent object. But now I'm getting silence, which gives me little to work with.

Just putting this doesn't work either, guess it's got too few filter conditions:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>



All suggestions and tips are most welcome and appreciated
johnsenf
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Nov 05, 2009 9:17 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot], MSNbot Media and 22 guests