ListUtils will sort with AI2 companion but not with APK


Dear all,
I have a problem with the listutils extension which might be very simple to you but is a big headache for me.
Below block works fine as long as I try it out with AI2 companion but once I install the APK it will not sort anymore.



You are supporting in initialize and will happen only one time. Is that what you want to do?

What type of data you have and how is it sorted? Show us the data before and after sorting.


Yes correct, it will happen only one time but every time I open the screen “Lijst”.
What happen is, that in another screen I create a database and fill it with data, one of the tags is “naam”.
When I go to the screen “Lijst” it will show a listview from all the names in the tag “naam”, which will do it perfectly. When I’m trying it out and connect my phone with AI Companion it will sort the list alphabetically but when I make an APK and install it on my phone the list will not be sorted anymore, it will be shown in the way I feeded it.


The companion behavior / initialization may be a little different that when actual .apk is generated.

To see if data gets sorted and you to make sure its not your block logic issue, just create a simple app, add blocks to sort your data and then display it. That way you’ll see if your specific data is getting sorted properly or not. If it sorts properly, then its probably your logic issue