with
Cursor c = getContentResolver().query(Data.CONTENT_URI,
new String[] {Data._ID, Phone.NUMBER, Phone.TYPE,
Phone.LABEL},
Data.RAW_CONTACT_ID + "=?" + " AND "
+ Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE +
"'",
new String[] {String.valueOf(rawContactId)}, null);
i have an issue with "rawContactID" and the code is from the website
http://developer.android.com/reference/android/provider/ContactsContract.Data.html
rawContactId cannot be resolved to a variable and in the website isn't
defined as nothing..
thanks
On Jun 15, 1:49 pm, Mark Murphy <[email protected]> wrote:
> On Wed, Jun 15, 2011 at 5:44 AM, Abalufaske <[email protected]> wrote:
> > Hello my problem is that I wanna get de db of contacts stored at "data/
> > data/com.android.providers.contacts/databases/contacts2.db" with code
> > but I got an error, I want to get that DB and save it in another place
> > with code.
>
> > I use:
> > String path="data/data/com.android.providers.contacts/databases/
> > contacts2.db";
> > SQLiteDatabase db= SQLiteDatabase.openOrCreateDatabase(path,
> > null);
> > and when the db is in /mnt/sdcard/blablabla.db i can open it so I
> > don't realize the problem. Anyone can help me? is it a problem of
> > permissions? in that case wich one have I to use?
>
> You cannot access that database directly except via custom firmware.
> Please use the ContactsContract content provider for accessing contact
> data through the Android SDK.
>
> --
> Mark Murphy (a Commons
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer 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