Which class are you expecting to have implemented the getContentResolver
method?

On Mon, Jan 4, 2010 at 4:01 PM, James <[email protected]> wrote:

> OK, I know this must be really simple but I must be continually
> overlooking the obvious.  I'm trying to compile the code below and
> javac keeps saying:
>
>  [javac] Compiling 3 source files to /usr/home/jim/src/2android/
> ExcuseMe/bin/classes
>    [javac] /usr/home/jim/src/2android/ExcuseMe/src/com/jw/ExcuseMe/
> NamePhones34.java:66: cannot find symbol
>    [javac] symbol  : method getContentResolver()
> <<<<<------------- wha ??
>    [javac] location: class com.jw.ExcuseMe.NamePhones34
>    [javac]     Cursor curse = getContentResolver().query
>    [javac]                    ^
>    [javac] /usr/home/jim/src/2android/ExcuseMe/src/com/jw/ExcuseMe/
> NamePhones34.java:74: cannot find symbol
>    [javac] symbol  : method startManagingCursor
> (android.database.Cursor)
>    [javac] location: class com.jw.ExcuseMe.NamePhones34
>    [javac]     startManagingCursor(curse);
>    [javac]     ^
>
> I've tried importing everything that seems like it would be relevant
> but the problem persists.  Help!  This seems like a DUH! problem and
> I'm will to admit I have a bit of Homer in me :-(
>
> Thanks in advance !!!
>
> ---------------- here's the start of the problem source file:
>
> import static android.provider.BaseColumns._ID;
>
> import android.app.*;
> import android.content.*;
> import android.database.*;
> import android.media.*;
> import android.net.*;
> import android.os.*;
> import android.provider.ContactsContract.*;
> import android.provider.*;
> import android.view.*;
> import android.preference.*;
> import android.preference.PreferenceActivity;
>
> import android.provider.Contacts.People;
> import android.provider.Contacts.People.Phones;
>
> @SuppressWarnings("deprecation")
>
> public class NamePhones34 extends NamePhones
>    implements ExcuseMeConstants {
>
>    private final String TAG = "NamePhones34";
>
>    private     int     ii, jj;
>
>    // The Contact info temporarily will be collected in these arrays:
>    private     String  cNames[];       // Contact names
>    private     String  cPhones[];      // Contact phone numbers
>
>    public NamePhones34() {}
>
>    /**
>     * Return all the Contacts; returns the number of Contacts found.
>     */
>    public int getNamePhones() {
>
>        // From
> http://developer.android.com/reference/android/provider/ContactsContract.RawContacts.html
>
>        final long contactId = SUMMARY_ID_COLUMN_INDEX;
>
>        Cursor curse = getContentResolver().query
>            (RawContacts.CONTENT_URI,           // Uri
>             new String[]{RawContacts._ID},     // Projection (which
> columns?)
>             RawContacts.CONTACT_ID + "=?",     // Selection (which tuples?)
>             new String[]{String.valueOf(contactId)},   // Selection Args
> (vals)
>             null);                             // sortOrder=
>
>        // Let the activity manage the cursor lifecycle
>        startManagingCursor(curse);
>
> --
> 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]<android-developers%[email protected]>
> 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 [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

Reply via email to