Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not to work callNumber function #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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