We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
componentDidMount() { Alipay.setAlipayScheme('uiwjspay'); AppState.addEventListener('change', this._handleAppStateChange); } componentWillUnmount(){ AppState.removeEventListener('change', this._handleAppStateChange) } // [info][tid:com.facebook.react.JavaScript] 'nextAppState:', 'inactive' // [info][tid:com.facebook.react.JavaScript] 'nextAppState:', 'background' // [info][tid:com.facebook.react.JavaScript] 'nextAppState:', 'active' // [info][tid:com.facebook.react.JavaScript] 'nextAppState:res:', null _handleAppStateChange = (nextAppState) => { console.log('nextAppState:', nextAppState) if(nextAppState==='active'){ Linking.getInitialURL().then(res => { console.log('nextAppState:res:', res) }) } } aliPay = () => { // return_url= const payInfo = `...`; Alipay.alipay(payInfo, (resule) => { console.log('resule-->>>', resule) }); }
代码逻辑与这个一致,但是Android端在调起支付宝支付时,我的应用首先会进入background,在弹出支付宝支付界面时,会触发一次active状态(正常情况下不应该有),然后再次进入background,这会导致触发在_handleAppStateChange中的逻辑。我在接入微信支付时调起微信支付不存在这样的问题。另外此插件在iOS端也是正常的
background
active
_handleAppStateChange
The text was updated successfully, but these errors were encountered:
No branches or pull requests
代码逻辑与这个一致,但是Android端在调起支付宝支付时,我的应用首先会进入
background
,在弹出支付宝支付界面时,会触发一次active
状态(正常情况下不应该有),然后再次进入background
,这会导致触发在_handleAppStateChange
中的逻辑。我在接入微信支付时调起微信支付不存在这样的问题。另外此插件在iOS端也是正常的The text was updated successfully, but these errors were encountered: