react-native-inappbrowser icon indicating copy to clipboard operation
react-native-inappbrowser copied to clipboard

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

Open biu111biu opened this issue 3 years ago • 4 comments

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

biu111biu avatar May 17 '22 01:05 biu111biu

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

jdnichollsc avatar May 20 '22 17:05 jdnichollsc

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 avatar May 24 '22 08:05 biu111biu

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

biu111biu avatar May 24 '22 08:05 biu111biu

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.

rubina-shakhkyan avatar Jun 13 '22 09:06 rubina-shakhkyan