Permission to switch off "remove permissions if app is unused"

Id like to have a permission popup to switch this off - does anyone know how?
thanks

Which permission?

in app settings (for all apps), there's a toggle titled "remove permissions if app is unused" - I would like to have a popup I can trigger to disable this(switches slider to off).

probably not a way, but I figured I'd ask.

as a reference, I'm referring to this (I have manually switched it off - its automatically on for any app upon download)

Android version?

android version 14

Possibly this may be as close as you can get. You will need your package name and uri

Android 14 (Pixel 7 Pro) by default:

it's a pain because it does in fact dump tiny DB data.
one of my apps is basically a UI/HMI for adjusting settings and monitoring telemetry of a module over BT. often not used over winter, a user goes a long time without connecting.
the issue comes in where they dont understand that they have to manually reconnect vs the typical auto connection - which is a result of tiny DB losing its data due to this app data wipe mentioned above from inactivity.

there are folks here that said one cannot "auto connect" for BT - they are wrong to some degree. its as easy as capturing the address into tinyDB upon initial manual connection, then next time the app is opened, attempting to connect to that address automatically - works flawless, until tinyDB data is lost due to a couple months of inactivity via this permission being discussed.

I know how to manually do it - Im asking if there is a way for "in-app" permission popup.
for example - like how we can pop a permission to allow the app to see the users position, which allows GPS stuff to work.

these people I'm dealing with arent going to go into their app settings (if they even know how to do that) and change these permissions, I have to pop them in the app.

As I said...

grafik

by default its the wrong way.
location settings by default aren't allowed either, but we can pop a permission request in the app to change that.

I assumed there was a way to do the same with this default setting as we do with location. I even think you are the individual that showed me how to do the location permission inside of my app blocks some time ago.

I made a simple example here -
I was hoping that someone had devised a way to do that setting like this:

Capture

I believe it is a setting, not a permission...

Where is the problem with that?

But you are right, if e.g. Bluetooth or Location have been granted, they have to be disabled manually (at least the latter).

theres nothing wrong with this, just an example of what I was hoping to do with the inactivity setting we were discussing.

either way - is there a way to pop something in the app blocks to disable this? I'm assuming there isn't due to the pushback?

Using ActivityStarter (in companion) opens the app details page where the toggle is:

1 Like

this is indeed more the stuff I am after - I see this "companion" stuff, is there anyway to have this auto routing in the actual compiled app?

(like how I can activityStarter people to a website)

this is indeed more the stuff I am after - I see this "companion" stuff, is there anyway to have this auto routing in the actual compiled app?

(like how I can activityStarter people to a website)