Hi,

The code here is incomplete, and does not suggest any reason for an error, I
am not sure what the issue might be, could you post the code for your class
and its declaration in AndroidManifest.xml? Do you have the permission to
read contacts set in AndroidManifest.xml?

Thanks,
Megha

On Fri, Apr 11, 2008 at 11:19 AM, franw <[EMAIL PROTECTED]> wrote:

>
> hi - this code worked perfectly when it was in my main launcher, but
> when i moved it to another class in my project, i get a null pointer
> exception.  ????
>
>    public String getContactStr()
>    {
>        String pList = "";
>        String st = "";
>
>    Cursor c = this.getContentResolver().query(
>                android.provider.Contacts.Phones.CONTENT_URI,
>                null, null, null,
>                android.provider.Contacts.Phones.PERSON_ID+ " ASC");
>
>         .........
>    }
> >
>

--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to