1. Try other Android phones.
2. Try a new USB cable. There are so many bad ones that you must use the Samsung cable or in a pinch the AmazonBasics. When I work this issue, I will accept no substitutes.
Though this phone worked well for over a year on the Mazda USB interface in my 2016 MX5, suddenly it is not. Now, when I plug in, the "Allow" "Don't Allow" connection screen flashes on and off repeatedly. It does not stop.
It also slowly drains my battery rather than trickle charging it.
Does anyone else have this problem with any Mazda vehicle?
My iPod charges fine - I use the Bluetooth to play from it and the car reads the iPod's menus just fine. The phone functions well in every other situation.