Closed vandit560 closed 3 years ago
@vandit560 could you elaborate a little more on how react native plays into this addition
The "fix" here is dueto the fact that @vandit560 tried to call your lib through a react Native context which is an application context and not an Activity context. In this situation, calling another activity requires the added flag.
IMHO the actual solution would be to change the call in react native application by using something like
AutoStartPermissionHelper.getInstance().getAutoStartPermission(reactContext.getCurrentActivity())
@vandit560 could you make a change to accept a boolean parameter for the startIntent
function. Based on the boolean, you can add an if clause around the FLAG_ACTIVITY_NEW_TASK
so that way the end user can decide if they want to start the intent in the existing activity or a new task depending on their preference and use case.
Thanks for the PR, closing this one since it should be resolved in https://github.com/judemanutd/AutoStarter/pull/69
Intent flag added activity new task