Hi,
I'm developing my own ContentProvider
my query method is following
*******
SQLiteQueryBuilder sqlBuilder = new SQLiteQueryBuilder();
sqlBuilder.setTables(DATABASE_TABLE_USER);
if (uriMatcher.match(uri) == USERID){
sqlBuilder.appendWhere(
HelloUser._ID + " = " + uri.getPathSegments().get
(1));
}
else Log.e("HelloProvider", "Aucun paramètre passe");
if (sortOrder==null || sortOrder=="")
sortOrder = HelloUser.NOM + " DESC";
Cursor c = sqlBuilder.query(
db,
projection,
selection,
selectionArgs,
null,
null,
null);
//---register to watch a content URI for changes---
c.setNotificationUri(getContext().getContentResolver(), uri);
return c;
*****
When I try to call it from another application, in debug mode, this
method is called normally, but the count of record in the Cursor is
always -1 and my calling method get a null Cursor.
What is wrong? Thanks for your help
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---