I am developing an app which is installed in priv-app, so I can get all the system-permissions. I need to create an localOnlyHotspot without user-interaction. After rebooting the device, the "location mode" is off. I have to manually enable it or redirect the user to settings to do this (but the user has no input devices). Just to make clear: The device does not have GPS, only wifi for location determining. I also do not need to determine the devices location but the localOnlyHotspot needs enabled "locationMode" to work.
Thanks
The way I see it you have few options.
Edit: Forgot to mention, this requires your app to be device owner.