What app are you talking about David that 'works' on Android 12 but not Android 7?
Most developers experience issues where lower Androids work but 12 does not. Frequently the new 'fused' Provider is part of the problem and LOCATION permissions.
This discussion might be what you are talking about GPS with Android 12 .
All anyone can do is guess why you see the behavior you get without more information, . There are dozens of reasons why a device only returns a location of 0,0 (the default location when Provider does not return a location). Reasons for failure to return location coordinates may be related to LocationSensor settings, Android System Settings, sensitivity of the gps hardware in the device (not testing outside), wrong Provider settings, trying to update the satellite fix too frequently, not waiting long enough to get a response from the gps receiver etc.