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?
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)
Yes, you will need to know your package name, and replace the companion app package name with it.
forgive my ignorance, where would I find "package name"? is this the app name in project properties?
thanks for the help, this is absolutely the stuff I am looking for
Download an aia project of your app.
(optional) change the extension from .aia to .zip
Open the file with your preferred zip program
Open the youngandroidproject folder
Open the project.properties file in a notepad type app
Find the package name after main=
and before .Screen1
Somewhere in the community I saw an extension that gives you the name of the package. I made one a while ago, I'll give it to you if you want, but it would be later, at night.
Taifun's Tools extension will provide your package name
all,
thanks so much - this will make a massive difference in mitigating user confusion after they come back from a couple month hiatus.
I do want to make clear for anyone reading this thread that anything you save in your app through TinyDB will be wiped clean if the "remove data after inactivity setting" is enabled - which is enabled by default.
so in my case, saved user settings and BT addresses, all of which I saved through the TinyDB function, would be wiped from inactivity (my users often dont use this app UI for the module over winter).
the above info does in fact work to auto route a user directly to the app settings - this is important as most arbitrary users are not going to know how to get here in my case.
There is another way to prevent your app from pausing and losing those permissions, you could add a notification that is activated every so often, it is a foregroundService, it could be another option.
as far as I know, MIT apps cant run in the background - as soon as you navigate away, they are essentially "all stop" until you return.
My issue is due to inactivity - ie not having the app open for a long period of time.
is there actually a way for a mit app to do something when a user doesnt have the app open?
From my what I have experienced as well as have been told here, there currently isnt due to security reasons.
if there's a better way, I'd love to hear it - I have several 1000 people who use the app I made here as a user interface to change target settings and monitor telemetry on an external automated system.
For example:
You could display a notification every week or month to remind the user... usually you use the alarmmanager for this
Here is an alarmmanager extension
A foreground service requires a persistent notification to be shown while the service is running, this is probably not what most users like
EDIT: starting from SDK 33 this persistent notification can be dismissed by the user
Taifun
Yes, it is persistent and not, that is, you can set a timer so that it dismisses itself or the user can dismiss it, in fact alarm manager so far from what I have researched is a very good option for that.
I got confused, I put foreground service instead of background service.
background service is the good one.
From the documentation Open Source • Background Tasks: Itoo 🚀
Background Service: A non-visible background work that can be scheduled using Itoo.
- Runs silently without user noticing it.
- Vulnerable to being stopped by the system abruptly, can only run upto a few minutes in modern devices depending on the phone brand, OEM, OS installed, etc. (also see dontkillmyapp.com )
Taifun