Kotlin Android Exception FLAG_ACTIVITY_NEW_TASK

Last Updated: Nov 12, 2024

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

The solution to the error is discussed on the following GitHub issue:

Related References

2 Likes