Is it possible to directly start a service without any activity. by making a service a launcher. I want to start service repeatedly at the interval of 2 min. can I use alarm. At present I have an activity that starts an alarm using this manager.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime(), duration, loggerIntent); that starts service at every 2 min. How can I remove this activity.
Asked
Active
Viewed 1.1k times
5
-
You cannot do it after versions 2.3 – Vikram Gupta May 27 '13 at 06:42
1 Answers
4
There is no straightforward way to start a service on just installing the app, without user opening it first time. If you read the answers on the above two questions, you will get the gist.
1) How to start a Service when .apk is Installed for the first time
2) How to start android service on installation
Hope it helps you.

Community
- 1
- 1

Shobhit Puri
- 25,769
- 11
- 95
- 124