Cursor c = getContentResolver(). works fine until moved!!!

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

Cursor c = getContentResolver(). works fine until moved!!!

Postby franw » Fri Apr 11, 2008 7:26 pm

hi, this code works perfectly in my main launcher activity, but when i moved it to another class, i get a null pointer exception.?????? help!!!!

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");
......
}
franw
Freshman
Freshman
 
Posts: 6
Joined: Mon Mar 24, 2008 6:36 pm
Location: NewYork

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 17 guests