"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Sorting frame markers based on id ascending

I need to detect if the frame markers are positioned in ascending order of ID from left to right, e.g. [0] [1] [2] [4] [6]

The endgoal is to change the 3D model for any marker that is in the incorrect order, e.g. [0] [3] [2] [4].

Does anybody know of a simple solution or can provide hints? I'm fairly new to this - so far I have edited the FrameMarkers sample to pass the trackable ID to java, and to dynamically change the 3D object on screen touch. 

Thanks for any help.