Skip to content

Conversation

@dki1110
Copy link

@dki1110 dki1110 commented Mar 2, 2022

Description

A below error is occurred when running callNumber function on Android 10.

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

Cause

The error is caused by the issue below.

https://developer.android.com/about/versions/pie/android-9.0-changes-all#fant-required

Solution

A below code was added.

          if (android.os.Build.VERSION.SDK_INT >= 28) {
              intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          }

Test

I confirmed that callNumber function is success on Android 10.
I could check only Android 10.

Related Issues

#80 #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant