The result in the following always return true even if the telphone number listed in contact isn't starred, why?
public static boolean IsStarred(Context myContext,String address){
boolean result=false;
if (address.trim().length() >= 1) {
Uri uri = Uri.parse("content://com.android.contacts/phone_lookup");
String[] projection = new String[] { "display_name" };
uri = Uri.withAppendedPath(uri, Uri.encode(address));
Cursor cursor = myContext.getContentResolver().query(uri,
projection, "starred=?", new String[] {"1"}, null);
if (cursor.moveToFirst()) {
result = true;
Toast.makeText(myContext,cursor.getString(0)+ "True",Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(myContext, "False",Toast.LENGTH_SHORT).show();
}
cursor.close();
}
return result;
}