Wednesday, August 26, 2009

Intent filter for "Share link"

I just released reddit is fun v0.6.4.

The main feature was a suggestion by jk3us which was to add the app to the list of destinations for sharing, for instance when you click "Share page" from the Browser menu.

To do it, I had to add an intent filter. It looks like this:

            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="text/plain" />
               </intent-filter>

I also fixed a long-standing possible force close due to a race condition around dismissing the login dialog and reading from the dialog's members. I never experienced the force close until today, but I have a feeling some other phone models experience it more often than the G1. I was moving some stuff around in the code, which caused the force close to happen very, very frequently. Which makes me think that other phone models could easily have had a higher frequency of this happening, if it was really due to a race condition. Oh well, it should be gone now.

No comments:

Post a Comment