Start the application installation service without any action

Is it possible to immediately start the service without any activity. making the service a launcher. I want to start the service again with an interval of 2 minutes. can i use the alarm clock. I currently have an activity that triggers an alarm using this manager.setRepeating (AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime (), duration, loggerIntent); which starts service every 2 minutes. How to delete this operation.

+4
source share
1 answer

There is no easy way to start the service only when you install the application without opening it for the first time. If you read the answers to the above two questions, you get the gist.
1) How to start the service when .apk is installed for the first time

2) How to start the android service during installation

Hope this helps you.

+3
source

Source: https://habr.com/ru/post/1482888/


All Articles