It looks like you are trying to get results similar to the following SQL:
select sort, grade, count(grade), sum(mass), price from logs where receiptid = forwardedId group by sort, grade;
You show the displayed count computed as logList.size()
. Instead, if you are going to have the database group the records, you will want to get the count from the database as well.
A couple of things may also help.
1. Verify the SQL query directly against the database to verify you are starting with the intended result set. You can use the sqlite3 client to test assuming you are using an SQLite db.
2. Enable ActiveAndroid logging in ActiveAndroid.initialize
Also you might double check the parameter spelling to make sure you are referencing the intended intent parameter.
Once you verify that the query results are correct, you can focus on whether you are rendering it in the list as you wish.
Finally be wary of doing work on the UI thread.