On Fri, Nov 26, 2010 at 8:26 AM, Pink <[email protected]> wrote: > > If i have an activity which has one intent-filter as > > android:mimeType="vnd.android.cursor.item/contact" > ...... > > And in the activity if i call getData() on the intent of the activity. > > What will i get?
You will get a Uri or null. This is clearly documented. > How does android execute this request? It pulls the Uri out of the Intent, if there is one, and returns it to you. > When ever android needs to match MIME type to URI. > It goes through all content provider's getType and compare the > strings. No. You cannot convert a MIME type to a Uri. You can, however, find the MIME type *for* a Uri. That is why the method is named getType(), takes a Uri as a parameter, and returns a MIME type. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 2.2 Programming Books: http://commonsware.com/books -- 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

