Automatically switching from Unrestricted to Optimized

mustang7757

Super Moderator
Moderator
Feb 6, 2017
91,590
6,174
113
Visit site
I have all of my battery saving and optimization options switched off. I used that don't kill my app site to aid with this in the past. Is there nothing more we can do? This is the only app that automatically changes its settings without my input. It seems I will have to manually put this app to Unrestricted every afternoon before going to work.
You can try don't kill my apps site , never tried it before
 
  • Like
Reactions: Laura Knotek

kikbxr1969

Well-known member
Dec 31, 2011
278
38
23
Visit site
You can try don't kill my apps site , never tried it before
I got a bit of information from that site to put together those settings in my post just above yours. I have been using for a few years now. I did a bit of research trying to keep my home automation app up and running in the background as the ability to keep apps open has been drastically reduced by Samsung over the past few years (Since about the S9+ era). In any case, following all those steps has gotten the apps I want on that list to stay available in the background fairly reliably. I still verify after every update because they do occaisionally revert to default after updates.
 

mustang7757

Super Moderator
Moderator
Feb 6, 2017
91,590
6,174
113
Visit site
I got a bit of information from that site to put together those settings in my post just above yours. I have been using for a few years now. I did a bit of research trying to keep my home automation app up and running in the background as the ability to keep apps open has been drastically reduced by Samsung over the past few years (Since about the S9+ era). In any case, following all those steps has gotten the apps I want on that list to stay available in the background fairly reliably. I still verify after every update because they do occaisionally revert to default after updates.
Good to know, thanks !
 

NJMike

Well-known member
Jul 21, 2023
116
35
28
Visit site
If you set it to unrestricted under battery settings on the app, that removes it from availability in the "never sleeping" app.

I always put apps in the "never sleeping" section on management before I change it to unrestricted in the app's battery settings. Not sure if that leaves it in the never sleeping table. But, it does seem to automatically be there when I turn off unrestricted.

Here is the process I follow for critical apps
1- For battery optimization,
Go to Settings -> Battery and Device Care -> Battery - Background Usage Limits
Once there, ensure that "Put unused apps to sleep" is toggled off. Then tap on "Never Sleeping Apps". Hit the "+" in the upper right, then scroll down to find the app. Select it and then "Add" at the bottom.

2-For memory optimization, Go to Settings -> Battery and Device Care -> Memory and tap that section. Go down to Excluded Apps, and select that. If your app isn't listed, click the "+", scroll down and select it.

3- Unrestricted Usage
Finally, go to Settings -> Apps-> Scroll down to your app and click it. Go down to the Battery section and click that. Select Unrestricted and then back all the way out.
NOTE: If you did this first, you will NOT be able to add it to Never sleeping apps in the previous steps. This step will hide it from that menu for some reason.

4- (Apps other than Android Auto)- You can Pin to recents to keep them open in the background.
Open the app, then go to your home screen (WITHOUT CLOSING THE APP). Click Recents. Scroll Through till you see the app you want to keep running. in the top of that app, you will see the icon for the app. Tap THE ICON once to get a drop down menu and select "keep open". This usually survives reboots. However, you should check after reboots (ESPECIALLY AFTER UPDATES) and redo this as necessary. I only do this with one app that I use for home automation and is critical to stay open.
Thank you, I will give this a try if it acts up again.
 

NJMike

Well-known member
Jul 21, 2023
116
35
28
Visit site
If you set it to unrestricted under battery settings on the app, that removes it from availability in the "never sleeping" app.

I always put apps in the "never sleeping" section on management before I change it to unrestricted in the app's battery settings. Not sure if that leaves it in the never sleeping table. But, it does seem to automatically be there when I turn off unrestricted.

Here is the process I follow for critical apps
1- For battery optimization,
Go to Settings -> Battery and Device Care -> Battery - Background Usage Limits
Once there, ensure that "Put unused apps to sleep" is toggled off. Then tap on "Never Sleeping Apps". Hit the "+" in the upper right, then scroll down to find the app. Select it and then "Add" at the bottom.

2-For memory optimization, Go to Settings -> Battery and Device Care -> Memory and tap that section. Go down to Excluded Apps, and select that. If your app isn't listed, click the "+", scroll down and select it.

3- Unrestricted Usage
Finally, go to Settings -> Apps-> Scroll down to your app and click it. Go down to the Battery section and click that. Select Unrestricted and then back all the way out.
NOTE: If you did this first, you will NOT be able to add it to Never sleeping apps in the previous steps. This step will hide it from that menu for some reason.

4- (Apps other than Android Auto)- You can Pin to recents to keep them open in the background.
Open the app, then go to your home screen (WITHOUT CLOSING THE APP). Click Recents. Scroll Through till you see the app you want to keep running. in the top of that app, you will see the icon for the app. Tap THE ICON once to get a drop down menu and select "keep open". This usually survives reboots. However, you should check after reboots (ESPECIALLY AFTER UPDATES) and redo this as necessary. I only do this with one app that I use for home automation and is critical to stay open.
I followed your steps, but it did not work; AA still disappears from the never sleeping table despite doing your steps in order.
 

mustang7757

Super Moderator
Moderator
Feb 6, 2017
91,590
6,174
113
Visit site
So with aftermarket head unit when plugged in and says unsupported device try couple things

1. A known good quality cable
2. Developer's settings turn on USB debugging
3. When you plug the device to head unit with cable pull your notifications panel down and tap USB settings what's it on?
4.wireless AA dongle works flawless on my car just uses Bluetooth

5. Android Auto app u selected pair with device? Try forget all cars and pairing again
 

NJMike

Well-known member
Jul 21, 2023
116
35
28
Visit site
So with aftermarket head unit when plugged in and says unsupported device try couple things

1. A known good quality cable
2. Developer's settings turn on USB debugging
3. When you plug the device to head unit with cable pull your notifications panel down and tap USB settings what's it on?
4.wireless AA dongle works flawless on my car just uses Bluetooth

5. Android Auto app u selected pair with device? Try forget all cars and pairing again
I've tried many cables and I've also tried #2 before as well, as for #3 I believe I recall it saying it's connected via USB; I have it set for file transfer via the developer settings.

I have not tried unpairing and repairing, actually read that somewhere else but forgot to try that.
 

mustang7757

Super Moderator
Moderator
Feb 6, 2017
91,590
6,174
113
Visit site
I've tried many cables and I've also tried #2 before as well, as for #3 I believe I recall it saying it's connected via USB; I have it set for file transfer via the developer settings.

I have not tried unpairing and repairing, actually read that somewhere else but forgot to try that.
Let's see delete and repairing to AA will help
 

NJMike

Well-known member
Jul 21, 2023
116
35
28
Visit site
Let's see delete and repairing to AA will help
I am going to try leaving it on Optimized but also leave it in the never sleeping apps section and see what happens. If that doesn't rid the Unsupported Device error, then I will try adding it to the exclusions for memory. If that doesn't work, I will try your suggestion with unpairing the Bluetooth.
 
  • Like
Reactions: mustang7757

mustang7757

Super Moderator
Moderator
Feb 6, 2017
91,590
6,174
113
Visit site
I am going to try leaving it on Optimized but also leave it in the never sleeping apps section and see what happens. If that doesn't rid the Unsupported Device error, then I will try adding it to the exclusions for memory. If that doesn't work, I will try your suggestion with unpairing the Bluetooth.
Ok sounds good.
Also look into that Motorola dongle for wireless AA , best thing I installed on my car
 

NJMike

Well-known member
Jul 21, 2023
116
35
28
Visit site
It seems adding Android Auto to the Never Auto Sleeping Apps table has fixed the issue; I have had a full 14 day streak with no Unsupported Device errors, and AA connecting relatively quickly and not being tempermental.

I do have to ask, though -- if I never have the option to put unused apps to sleep enabled to begin with, what is different about the never auto-sleeping option?
 

kikbxr1969

Well-known member
Dec 31, 2011
278
38
23
Visit site
I do have to ask, though -- if I never have the option to put unused apps to sleep enabled to begin with, what is different about the never auto-sleeping option?

I've had the same question for several years. I noticed several years ago with geofencing apps that you had to add it to never sleeping to get them to work even with the option turned off. Don't know why, but it works.

I suspect that Samsung is just overly aggressive with that stuff, to keep battery complaints down.
 
Last edited by a moderator:
  • Like
Reactions: NJMike

NJMike

Well-known member
Jul 21, 2023
116
35
28
Visit site
The problem is back again. I have exhausted pretty much every troubleshooting method and Google results over the past year or so and while many people seem to have this issue, it doesn't seem like anyone has a true resolution. Very frustrating.
 

NJMike

Well-known member
Jul 21, 2023
116
35
28
Visit site
As of yesterday I have decided to just hail mary it and clear the data and remove my car and and start anew. If this doesn't fix it then I'm at an absolute loss.
 

NJMike

Well-known member
Jul 21, 2023
116
35
28
Visit site
Let's see
Nope. Unsupported Device as I got in my car to go to work earlier.

I read elsewhere that something else in the phone may be forcing the app to switch back to Optimized mode from Unrestricted. If only we can somehow figure out what is causing it to do this. I am almost certain that the Optimized mode is what's causing AA to not connect.
 

NJMike

Well-known member
Jul 21, 2023
116
35
28
Visit site
I have some more groundbreaking news: It turns out that even having AA on Unrestricted does not actually solve anything as I got Unsupported Device when I got in my car to drive home from work earlier (it only usually ever does it when getting in the car to go to work).

What this reports to me is that it probably isn't even the fault of the app at all, and more on the hardware side of things. Perhaps a voltage issue, or USB issue, since this error only happens after I plug my phone in and it loses its connection briefly before re-establishing it, and then displaying "Unsupported Device". I was able to reproduce this message also by disabling AA to ensure it wasn't the fault of the app causing it.

My next move is going to be returning to trying different USB cables (I've already gone through many in the past when trying to troubleshoot this on my old Galaxy A11). I have tried the cable that is meant for the phone, and I have also tried the COMDEX cables (one of the ones this site recommends)

Does anyone have any more suggestions or advice for me now that we pretty much know it is probably not AA and just something to do with how the phone connects to the headunit?
 
Last edited:

kikbxr1969

Well-known member
Dec 31, 2011
278
38
23
Visit site
In addition to Mustang's comments above about using a known good cable, Google has a list of known good cables here: https://support.google.com/androida...atible-usb-cable-for-using-android-auto?hl=en

Also, make sure your cable port on your phone is clean and clear. I use the Anker Cables from Amazon (I believe they are on the list). *** Edited Correction, I use the cable matters ones linked in the Google post*** With those, if I have any trouble, it is almost always that there is lint or dirt in the port. They also do tend to get worn out after a year or two of use. So, I originally bought a two pack so I have a spare in the glove box. If I start getting repeated issues, and the port is clear, I swap to the reserve cable and order another back up for the glove box.
 
  • Like
Reactions: mustang7757

mustang7757

Super Moderator
Moderator
Feb 6, 2017
91,590
6,174
113
Visit site
In addition to Mustang's comments above about using a known good cable, Google has a list of known good cables here: https://support.google.com/androida...atible-usb-cable-for-using-android-auto?hl=en

Also, make sure your cable port on your phone is clean and clear. I use the Anker Cables from Amazon (I believe they are on the list). *** Edited Correction, I use the cable matters ones linked in the Google post*** With those, if I have any trouble, it is almost always that there is lint or dirt in the port. They also do tend to get worn out after a year or two of use. So, I originally bought a two pack so I have a spare in the glove box. If I start getting repeated issues, and the port is clear, I swap to the reserve cable and order another back up for the glove box.
I mentioned earlier in the thread Motorola m1 wireless dongle which I use and works flawlessly is a better option in my opinion.
 

NJMike

Well-known member
Jul 21, 2023
116
35
28
Visit site
In addition to Mustang's comments above about using a known good cable, Google has a list of known good cables here: https://support.google.com/androida...atible-usb-cable-for-using-android-auto?hl=en

Also, make sure your cable port on your phone is clean and clear. I use the Anker Cables from Amazon (I believe they are on the list). *** Edited Correction, I use the cable matters ones linked in the Google post*** With those, if I have any trouble, it is almost always that there is lint or dirt in the port. They also do tend to get worn out after a year or two of use. So, I originally bought a two pack so I have a spare in the glove box. If I start getting repeated issues, and the port is clear, I swap to the reserve cable and order another back up for the glove box.
I have ensured this, I also even used compressed air this afternoon on my phone's USB port just to ensure all is clear. Once again, however, both my factory cable and both COMDEX cables do not resolve the issue. I have tried other cables too, it even happened with brand new ones. I have so many cables at this point because of this. Could it be a problem with how the USB extension is connected at the back of the headunit? Also I had Geek Squad install it and they have the cable come out through my glove box and I close it on the cable which pinches it...don't know if that has been damaging the cable?

Also, I realized I neglected to include another detail that may be important: This only happens after I start my car. I never have issue with the connection or working of the app during being in use, can't reproduce the issue while the car is on. Another thing I notice is that I don't get the "Android Auto is available" notification when this happens.