How do I start an activity extending AppCompatActivity with an intent from a class extending Service
Asked
Active
Viewed 60 times
-1
-
1Does this answer your question? [Start a Service from activity](https://stackoverflow.com/questions/2334955/start-a-service-from-activity) – kelvin Sep 10 '20 at 11:51
1 Answers
0
Just call this code with your Activity:
startActivity(Intent(this, MainActivity::class.java).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))

Andrii Hridin
- 177
- 7