I have a List view in which I am showing received messages from contact numbers. Now the problem was that if i received 5 messages from \"1234567\" and 3 messages from \"56789\"
"select * from " + "smss" + " group by " + "contactnumber" + " = \"" + "\"" ;
This is not a valid SQL-Query This Query would render to
"select * from smss group by contactnumber = "1234567"";
What's missing here is the "where" operator. Your query should include this and thus look like this:
"select * from smss where contactnumber = "1234567" OR contactnumber = "56789" group by contactnumber";
Or to display it like you did:
"select * from " + "smss" + " where " + "contactnumber" + " = \"" + "1234567\"" + " OR " + "contactnumber" + " = \"" + "56789\"" + " group by " + "contactnumber";