proyecto26 / react-native-inappbrowser

📱InAppBrowser for React Native (Android & iOS) 🤘
https://www.npmjs.com/package/react-native-inappbrowser-reborn
MIT License
1.32k stars 224 forks source link

Why InAppBrowser.isAvailable() keeps returning 'false', no matter if it's android emulator or expo go(ios) #348

Open biu111biu opened 2 years ago

biu111biu commented 2 years ago

The version I use is ' "@types/react-native": "0.62.13",', "react-native-inappbrowser-reborn": "^3.6.3", in android's android/build.gradle as required Modified the configuration, buildscript { ext { buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 // Only using Android Support libraries supportLibVersion = "28.0.0" } ... } I tested the isAvailable method in the android emulator and it still returns false, so I want to know why isAvailable returns 'false', and what is the principle of isAvailable method verification; I hope to get help

jdnichollsc commented 2 years ago

Can you debug from a physical device instead? please let me know 👍

biu111biu commented 2 years ago

Can you debug from a physical device instead? please let me know 👍

The physical device can return true, but after the login is successful, the webview can be automatically closed on the android emulator and returned to the app, packaged into an apk to run on the physical device, and the webview will not be automatically closed and return to the app after the login is successful. A prompt will pop up on the webview page to jump to the app. After clicking confirm, it will jump to the app, but the app does not display the status of successful login. The physical devices I use for testing are Honor and Oppo.

biu111biu commented 2 years ago

I have one more question, does the react-native-inappbrowser component provide something similar to the injectJavaScript method in the react-native-webview component? I want to pass my device id to the webview page and get the passed value on the webview. Can react-native-inappbrowser implement this function? thanks

rubina-shakhkyan commented 2 years ago

The problem is related to the ChromeCustomTabs, for some reason it's not found in the manifest. Even in the example app of the project, you cannot navigate to the package declared in the manifest.