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

CardIOModule.scanCard() does not resolve on Android detached from Expo #96

Closed
miraan opened this issue Jun 23, 2018 · 4 comments
Closed

Comments

@miraan
Copy link

miraan commented Jun 23, 2018

Same as #67.

CardIOModule.scanCard() does not resolve on Android detached from Expo.

The issue seems to be that MainActivity extends DetachActivity rather than MainActivity extends ReactActivity.

Is there a fix?

@miraan
Copy link
Author

miraan commented Jun 25, 2018

A solution mentioned at expo/expo#651 looks promising. Will give it a go and report back here.

@miraan
Copy link
Author

miraan commented Jun 26, 2018

Can confirm that solution mentioned in expo/expo#651 works. Specifically for this issue:

In the react-native-awesome-card-io build.gradle, add a dependency on the exponent module:

implementation('host.exp.exponent:expoview:28.0.0@aar') {
    exclude module: 'CreditCardEntry'
}

Make RNCardIOModule implement ActivityResultListener (host.exp.exponent.ActivityResultListener).

In the constructor use Exponent.getInstance().addActivityResultListener(this); instead of reactContext.addActivityEventListener(this);.

Remove the first parameter Activity activity from the onActivityResult result.

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {

@yvasiuk-sphere
Copy link

@miraan what about issue status? maybe better to close this issue?

@Kerumen
Copy link
Owner

Kerumen commented Oct 14, 2018

@miraan proposed a solution, closing this issue.

@Kerumen Kerumen closed this as completed Oct 14, 2018
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

No branches or pull requests

3 participants