-1

How do I start an activity extending AppCompatActivity with an intent from a class extending Service

Tarek EZZAT
  • 333
  • 1
  • 5
  • 15
  • 1
    Does 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 Answers1

0

Just call this code with your Activity:

startActivity(Intent(this, MainActivity::class.java).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))