What I am looking for is that my android application sends a notification after certain days without interacting with my application, I know how to launch the push notification through firebase (that would be how I would send it) with java, but I have no idea how to know how much It has been unused for a long time and how to check it in the background. Thanks.
I solved it by storing the date in a shared preference in the onCreate method of the main class, and with a periodic work manager I compared the dates between the current date and the one stored in our shared preference, and in my case I added 3 to the stored date days with the add method of the Date class and compare if the stored date plus 3 days is less than the current date with the before() method of the Calendar class (making the respective casts at the time).