leantechnologies / link-sdk-react-native

LinkSDK for React Native
MIT License
5 stars 6 forks source link

Android device callback is not work but in IOS work fine. #101

Open keyur-rakholiya opened 1 month ago

keyur-rakholiya commented 1 month ago

Here is code =>

import React, {useRef, useEffect} from 'react'; import {View, TouchableOpacity, Text, SafeAreaView} from 'react-native'; import LinkSDK from 'lean-react-native'; import SplashScreen from 'react-native-splash-screen';

const App = () => { const Lean = useRef(null);

useEffect(() => { SplashScreen.hide(); }, []);

return ( <SafeAreaView style={{flex: 1, justifyContent: 'center'}}> <TouchableOpacity onPress={async () => { const abc = await Lean.current.connect({ app_token: 'appToken', permissions: ['accounts', 'transactions', 'balance'], customer_id: 'customer_id', access_token: 'eyJraWQiOiI5NTk4MmMyYi1iOGMxLTQ2YTItOWVhNi1iOTFlZjRiZGQxYzMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIyOGYxMDQzZi04NTlkLTQyMzItOGFhOC0wZDNhYmY1NTI4ZmEiLCJhdWQiOiIyOGYxMDQzZi04NTlkLTQyMzItOGFhOC0wZDNhYmY1NTI4ZmEiLCJuYmYiOjE3MjgxNDMyODcsInNjb3BlIjpbImN1c3RvbWVyLnJlYWQiLCJiZW5lZmljaWFyeS53cml0ZSIsInBheW1lbnQud3JpdGUiLCJwYXltZW50LnJlYWQiLCJkZXN0aW5hdGlvbi5yZWFkIiwiY29ubmVjdC53cml0ZSIsImNvbm5lY3QucmVhZCIsImFwcGxpY2F0aW9uLnJlYWQiLCJiYW5rLnJlYWQiLCJrZXkucmVhZCJdLCJpc3MiOiJodHRwczovL2F1dGguc2FuZGJveC5sZWFudGVjaC5tZSIsImN1c3RvbWVycyI6W3siaWQiOiJhODNhNjk1MS1hYWE1LTRkMzMtOWExNi04NTFlMzQ5MDNlMTYifV0sImV4cCI6MTcyODE0Njg4NywiaWF0IjoxNzI4MTQzMjg3LCJqdGkiOiI3ZWFmMzc2OS03MDFlLTQ5ODItYTUzMS0wYTUxZTA0Mzk3YmUiLCJhcHBsaWNhdGlvbnMiOlt7ImlkIjoiMjhmMTA0M2YtODU5ZC00MjMyLThhYTgtMGQzYWJmNTUyOGZhIn1dfQ.GSrc8sWIRnmGM4bED4I3Ewf35uA24cPWVYlW4y5s_k7777WUSQXb-eqFYJU-AUKeAVBGHkdGW72YAvn_iZPivlTLZRy0vapKB6T0MFgpokQBnmwIKv0w97E5obFLbqUAm-tKIweYnlH_R8BVG5Km88nEpwfDeEKno7dERclQQbwyZjOrmzIhSmgviHTpXvRxFRFHj_LA5GxkR81vg2TcNzLhF5eFKnILxWLgRhzVHpu0viyk9jSBckZKUQGj7ein0930vbBcSmAeeFLkW0jWWPmcycLi5hDd2FtGd9fIPHCSVtxBjs1uvVKj7WSpas_lWxMBS9dDvV7XMmeDzPGIfg', }); console.log('🚀 ~ onPress={async ~ abc:', abc); }}>

Connect Account
  </TouchableOpacity>

  <LinkSDK
    webViewProps={{
      androidHardwareAccelerationDisabled: true,
    }}
    ref={Lean}
    appToken="appToken"
    sandbox={true}
    accessToken={
      'eyJraWQiOiI5NTk4MmMyYi1iOGMxLTQ2YTItOWVhNi1iOTFlZjRiZGQxYzMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIyOGYxMDQzZi04NTlkLTQyMzItOGFhOC0wZDNhYmY1NTI4ZmEiLCJhdWQiOiIyOGYxMDQzZi04NTlkLTQyMzItOGFhOC0wZDNhYmY1NTI4ZmEiLCJuYmYiOjE3MjgxNDMyODcsInNjb3BlIjpbImN1c3RvbWVyLnJlYWQiLCJiZW5lZmljaWFyeS53cml0ZSIsInBheW1lbnQud3JpdGUiLCJwYXltZW50LnJlYWQiLCJkZXN0aW5hdGlvbi5yZWFkIiwiY29ubmVjdC53cml0ZSIsImNvbm5lY3QucmVhZCIsImFwcGxpY2F0aW9uLnJlYWQiLCJiYW5rLnJlYWQiLCJrZXkucmVhZCJdLCJpc3MiOiJodHRwczovL2F1dGguc2FuZGJveC5sZWFudGVjaC5tZSIsImN1c3RvbWVycyI6W3siaWQiOiJhODNhNjk1MS1hYWE1LTRkMzMtOWExNi04NTFlMzQ5MDNlMTYifV0sImV4cCI6MTcyODE0Njg4NywiaWF0IjoxNzI4MTQzMjg3LCJqdGkiOiI3ZWFmMzc2OS03MDFlLTQ5ODItYTUzMS0wYTUxZTA0Mzk3YmUiLCJhcHBsaWNhdGlvbnMiOlt7ImlkIjoiMjhmMTA0M2YtODU5ZC00MjMyLThhYTgtMGQzYWJmNTUyOGZhIn1dfQ.GSrc8sWIRnmGM4bED4I3Ewf35uA24cPWVYlW4y5s_k7777WUSQXb-eqFYJU-AUKeAVBGHkdGW72YAvn_iZPivlTLZRy0vapKB6T0MFgpokQBnmwIKv0w97E5obFLbqUAm-tKIweYnlH_R8BVG5Km88nEpwfDeEKno7dERclQQbwyZjOrmzIhSmgviHTpXvRxFRFHj_LA5GxkR81vg2TcNzLhF5eFKnILxWLgRhzVHpu0viyk9jSBckZKUQGj7ein0930vbBcSmAeeFLkW0jWWPmcycLi5hDd2FtGd9fIPHCSVtxBjs1uvVKj7WSpas_lWxMBS9dDvV7XMmeDzPGIfg'
    }
    callback={data => console.log('DATA SENT TO CALLBACK:', data)}
    showLogs={true}
  />
</SafeAreaView>

); };

export default App;

Here is package =>

"lean-react-native": "^3.0.7-alpha.3", "react": "18.2.0", "react-native": "0.73.1",

Here is Video =>

https://github.com/user-attachments/assets/c99e8990-e1d3-40ce-835d-d032eed86504

keyur-rakholiya commented 1 month ago

@oschvr @manutorr @a-tomlinson @orinamio Any about this?