Hi there,
I have a String[ ] array that contains full path to image files from the gallery. How can I divide the array to the parts grouping by folders. For example:
I have:
/storage/sdcard/DCIM/FirstFolder/IMG123.jpg
/storage/sdcard/DCIM/SecondFolder/IMG123.jpg
/storage/sdcard/DCIM/FirstFolder/IMG123.jpg
/storage/sdcard/DCIM/SecondFolder/IMG123.jpg
/storage/sdcard/DCIM/SecondFolder/IMG123.jpg
I need:
array1
/storage/sdcard/DCIM/FirstFolder/IMG123.jpg
/storage/sdcard/DCIM/FirstFolder/IMG123.jpg
array2
/storage/sdcard/DCIM/SecondFolder/IMG123.jpg
/storage/sdcard/DCIM/SecondFolder/IMG123.jpg
/storage/sdcard/DCIM/SecondFolder/IMG123.jpg