Kotlin Android Exception FLAG_ACTIVITY_NEW_TASK

Overview

Getting the following exception using Kotlin: 

Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?

Applies To

  • Kotlin
  • Android

Solution

Recommended content