I’m implement a MetaMask-sdk, and after follow the configuration example in MetaMask-sdk github. Then I can connect wallet in MetaMask and sign message, but there is a problem, after connecting a wallet, MetaMask didn’t automatically redirect to my application but it showed that “Please return to the app to continue using their services” though i configured my scheme in App.tsx and AndroidManifest.xml. Here is the code’s configuration: AndroidManifest.xml: `
`. App.tsx: `const sdkOptions = { enableAnalytics: true, // shouldShimWeb3: true, // timer: BackgroundTimer, useDeeplink: true, dappMetadata: { name: 'plaza', url: 'https://app-plaza.titancorpvn.com', baseUrl: 'https://app-plaza.titancorpvn.com', iconUrl: 'https://plaza.titancorpvn.com/img/logo_black.png', scheme: 'plaza', }, openDeeplink: (link: string, _target?: string) => { console.log(`App::openDeepLink() ${link}`); if (canOpenLink) { Linking.openURL(link); } else { console.log( 'useBlockchainProiver::openDeepLink app is not active - skip link', link, ); } }, storage: { enabled: true, }, i18nOptions: { enabled: true, }, logging: { developerMode: true, plaintext: true, }, };let canOpenLink = true;
const WithSDKConfig = ({ children }: { children: React.ReactNode }) => {
const {
debug,
socketServer,
checkInstallationImmediately
} = useSDKConfig();
return (
<MetaMaskProvider
debug={debug}
sdkOptions={{ …sdkOptions, communicationServerUrl: socketServer, checkInstallationImmediately }}>
{children}
);
};
export default function App() {
return (
<NavigationContainer
ref={navigationRef}
onReady={() => SplashScreen.hide()}
>
);
}`