Comments (3)
Fixed it, so removing activity listener manually by calling reactApplicationContext.removeActivityEventListener(this) on PlaidLink component unmount solved the issue.
Added these methods to to PlaidModule.kt:
@ReactMethod @Suppress("unused") fun addActivityEventListener(){ reactApplicationContext.addActivityEventListener(this) }
@ReactMethod @Suppress("unused") fun removeActivityEventListener(){
reactApplicationContext.removeActivityEventListener(this)}
Updated PLaidLink.js:
export class PlaidLink extends Component{
componentDidMount(){
if (Platform.OS === 'android') {
NativeModules.PlaidAndroid.addActivityEventListener();
}
}
componentWillUnmount(){
if (Platform.OS === 'android') {
NativeModules.PlaidAndroid.removeActivityEventListener();
}
}
render(){
const{
component,
componentProps,
children,
...linkProps
}= this.props;
const Component = component;
return (
<Component
{...componentProps}
onPress={() => handlePress(linkProps, componentProps)}
>
{children}
</Component>
);
}
}
from react-native-plaid-link-sdk.
Hi @Mande3p would you mind opening a PR with the changes so we can review them?
from react-native-plaid-link-sdk.
Hi @Mande3p since we've updated how the PlaidLink component is built, this code will now live in your app.js file.
from react-native-plaid-link-sdk.
Related Issues (20)
- verificationStatus type on android is wrong HOT 2
- 'StartLinkActivityForResult' of null HOT 2
- 11.0 crashes on Android upon opening Plaid Link HOT 2
- Android Task :app:checkDebugDuplicateClasses FAILED HOT 3
- Following the quickstart doesn't work HOT 3
- PlaidLink React Native Not Working HOT 3
- PlaidLink is closed right away after the loading circle appears HOT 15
- PlaidLink is closed right away after the loading circle appears in Expo HOT 2
- ./gradlew app:bundleRelease Build failed HOT 1
- PlaidLink crash on exit: Cannot read property 'some' of undefined HOT 4
- Compiler warning in AGP 8: Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported
- Timing issues resulting in PlaidLink not opening on Android after updating to 11.6 HOT 3
- Failure To Create Link [Cannot read property 'create' of null] HOT 3
- R8/Proguard on RN 0.73 Java 17 AGP 8 causing Android Plaid link opens to crash HOT 5
- "PLKEmbeddedView" Component Initialization Error HOT 1
- Milehigh.world
- HANDOFF is not being passed to usePlaidEmitter on iOS HOT 4
- Crasher HOT 1
- work-runtime-ktx-2.7.1-runtime causing build error with latest Datadog sdk on android
- Plaid link not loading on Android 9 and below HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-plaid-link-sdk.