Your code is mostly okay, but the color is not changing.
Figuring out what could be wrong:
<color name="color_occupied">#FF0000</color> <!-- Red -->
<color name="color_available">#00FF00</color> <!-- Green -->
Check if you added these colors in your colors.xml file.
Maybe the data sent by the Arduino has extra spaces or weird characters. Fix this by adding data.trim() to clean the data before using it.
Integer.parseInt(data.trim()) > 0
Make sure parkingLeftText is the correct view. Check your XML layout file and confirm you connected it properly in your code:
parkingLeftText = findViewById(R.id.parkingLeftText);
These could be the possible issues. Kindly check and let me know.