Wednesday, July 28, 2010

Re: [android-developers] Re: What is the URI for the Contacts content provider on Samsung phones? ActivityNotFoundException:

The code appears to be correct - it is supposed to work on any Android phone :-(

However, calling it for result does not really make sense.  It is supposed to launch the activity and that's that - no result will be returned.

If you need to user to pick a contact from the list, do this instead:

new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI)

Cheers,
- Dmitri


On Wed, Jul 28, 2010 at 1:47 PM, Indicator Veritatis <mej1960@yahoo.com> wrote:
My guess is that it is the non-Samsung phones that are doing something
non-standard, something you cannot rely on. For as I read your code,
you are trying to view not just a contact, but an entire contact
database. I don't think Android guarantees that that Action is
supported on the entire database.

Try appending a specific ID to the Uri.

On Jul 28, 7:09 am, pistol <lava.d...@gmail.com> wrote:
> Some of my users with Samsung phones (GT-I9000, SGH-I897 to name at
> least 2) cannot open the Contacts view on their phones - thew way my
> app has this coded is like this:
>
> Uri uri = ContactsContract.Contacts.CONTENT_URI;
> Intent intent = new Intent(Intent.ACTION_VIEW, uri);
> startActivityForResult(intent, Constants.ACTIVITY_CALL_CONTACTS);
>
> This causes an ActivityNotFoundException.
>
> Is the problem that this is not the way to call the Contacts provider
> or that Samsung have not implementeed it?
>
> If it is down to Samsung can some-one give me the correct Uri?  though
> it will be terrible to have to have phone specific code.
>
> thanks,
>            Pete

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment