Giter Club home page Giter Club logo

proyecto26 / react-native-inappbrowser Goto Github PK

View Code? Open in Web Editor NEW
1.3K 12.0 215.0 2.74 MB

πŸ“±InAppBrowser for React Native (Android & iOS) 🀘

Home Page: https://www.npmjs.com/package/react-native-inappbrowser-reborn

License: MIT License

Java 42.53% JavaScript 13.39% Objective-C 18.90% Ruby 2.26% Starlark 0.69% TypeScript 7.50% Makefile 1.72% C++ 7.94% Objective-C++ 5.07%
react-native android ios inappbrowser chrome safari deep-linking deep-links xcode react-native-plugin

react-native-inappbrowser's Introduction

MIT license Current npm package version Maintenance Tidelift Subscription Downloads Total downloads Follow @jdnichollsc

InAppBrowser for React Native

Provides access to the system's web browser and supports handling redirects

Who is using InAppBrowser?

Do you want to see this package in action? Check these awesome projects, yay! πŸŽ‰

  • MyApp - A template to create awesome Apps easily ⚑️
  • OLIO - Share more. Waste less.
  • Alpe Audio - Courses On The Go.
  • VibePay - A simple, smarter, better way to get paid.
  • Opinio - Allows the population to be surveyed on social issues.
  • medpex: Online Apotheke - Online pharmacy for medicines & cosmetics with over 5 million customers.
  • CONTACT Software - Energizing your digital business.

Share your awesome project here! ❀️

Getting started

$ npm install react-native-inappbrowser-reborn --save

Mostly automatic installation

Using React Native >= 0.60

Linking the package manually is not required anymore with Autolinking.

  • iOS Platform:

    $ cd ios && pod install && cd .. # CocoaPods on iOS needs this extra step

  • Android Platform with Android Support:

    Using Jetifier tool for backward-compatibility.

    Modify your android/build.gradle configuration:

    buildscript {
      ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        // Only using Android Support libraries
        supportLibVersion = "28.0.0"
      }
    
  • Android Platform with AndroidX:

    Modify your android/build.gradle configuration:

    buildscript {
      ext {
        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
        ndkVersion = "21.4.7075529"
        // Remove 'supportLibVersion' property and put specific versions for AndroidX libraries
        androidXAnnotation = "1.2.0"
        androidXBrowser = "1.3.0"
        // Put here other AndroidX dependencies
      }
    

Using React Native < 0.60

$ react-native link react-native-inappbrowser-reborn

Manual installation

iOS

  1. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]
  2. Go to node_modules ➜ react-native-inappbrowser-reborn and add RNInAppBrowser.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNInAppBrowser.a to your project's Build Phases ➜ Link Binary With Libraries
  4. Run your project (Cmd+R)<

iOS with Podfile

  1. Open up ios/Podfile
  • Add pod 'RNInAppBrowser', :path => '../node_modules/react-native-inappbrowser-reborn'
  1. Run pod install

Android

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.proyecto26.inappbrowser.RNInAppBrowserPackage; to the imports at the top of the file
  • Add new RNInAppBrowserPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-inappbrowser-reborn'
    project(':react-native-inappbrowser-reborn').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-inappbrowser-reborn/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(':react-native-inappbrowser-reborn')
    
  3. Update ProGuard config (Optional)
  • Append the following lines to your ProGuard config (proguard-rules.pro)
    -keepattributes *Annotation*
    -keepclassmembers class ** {
      @org.greenrobot.eventbus.Subscribe <methods>;
    }
    -keep enum org.greenrobot.eventbus.ThreadMode { *; }
    

Usage

Methods Action
open Opens the url with Safari in a modal on iOS using SFSafariViewController, and Chrome in a new custom tab on Android. On iOS, the modal Safari will not share cookies with the system Safari.
close Dismisses the system's presented web browser.
openAuth Opens the url with Safari in a modal on iOS using SFAuthenticationSession/ASWebAuthenticationSession, and Chrome in a new custom tab on Android. On iOS, the user will be asked whether to allow the app to authenticate using the given url (OAuth flow with deep linking redirection).
closeAuth Dismisses the current authentication session.
isAvailable Detect if the device supports this plugin.
onStart Initialize a bound background service so the application can communicate its intention to the browser. After the service is connected, the client can be used to Warms up the browser to make navigation faster and indicates that a given URL may be loaded in the future. - Android Only.
warmup Warm up the browser process - Android Only.
mayLaunchUrl Tells the browser of a likely future navigation to a URL. The most likely URL has to be specified first. Optionally, a list of other likely URLs can be provided. They are treated as less likely than the first one, and have to be sorted in decreasing priority order. These additional URLs may be ignored. All previous calls to this method will be deprioritized - Android Only.

iOS Options

Property Description
dismissButtonStyle (String) The style of the dismiss button. [done/close/cancel]
preferredBarTintColor (String) The color to tint the background of the navigation bar and the toolbar. [white/#FFFFFF]
preferredControlTintColor (String) The color to tint the control buttons on the navigation bar and the toolbar. [gray/#808080]
readerMode (Boolean) A value that specifies whether Safari should enter Reader mode, if it is available. [true/false]
animated (Boolean) Animate the presentation. [true/false]
modalPresentationStyle (String) The presentation style for modally presented view controllers. [automatic/none/fullScreen/pageSheet/formSheet/currentContext/custom/overFullScreen/overCurrentContext/popover]
modalTransitionStyle (String) The transition style to use when presenting the view controller. [coverVertical/flipHorizontal/crossDissolve/partialCurl]
modalEnabled (Boolean) Present the SafariViewController modally or as push instead. [true/false]
enableBarCollapsing (Boolean) Determines whether the browser's tool bars will collapse or not. [true/false]
ephemeralWebSession (Boolean) Prevent re-use cookies of previous session (openAuth only) [true/false]
formSheetPreferredContentSize (Object) Custom size for iPad formSheet modals [{width: 400, height: 500}]

Android Options

Property Description
showTitle (Boolean) Sets whether the title should be shown in the custom tab. [true/false]
toolbarColor (String) Sets the toolbar color. [gray/#808080]
secondaryToolbarColor (String) Sets the color of the secondary toolbar. [white/#FFFFFF]
navigationBarColor (String) Sets the navigation bar color. [gray/#808080]
navigationBarDividerColor (String) Sets the navigation bar divider color. [white/#FFFFFF]
enableUrlBarHiding (Boolean) Enables the url bar to hide as the user scrolls down on the page. [true/false]
enableDefaultShare (Boolean) Adds a default share item to the menu. [true/false]
animations (Object) Sets the start and exit animations. [{ startEnter, startExit, endEnter, endExit }]
headers (Object) The data are key/value pairs, they will be sent in the HTTP request headers for the provided url. [{ 'Authorization': 'Bearer ...' }]
forceCloseOnRedirection (Boolean) Open Custom Tab in a new task to avoid issues redirecting back to app scheme. [true/false]
hasBackButton (Boolean) Sets a back arrow instead of the default X icon to close the custom tab. [true/false]
browserPackage (String) Package name of a browser to be used to handle Custom Tabs.
showInRecents (Boolean) Determining whether browsed website should be shown as separate entry in Android recents/multitasking view. [true/false]
includeReferrer (Boolean) Determining whether to include your package name as referrer for the website to track. [true/false]

Demo

import { Linking, Alert } from 'react-native'
import { InAppBrowser } from 'react-native-inappbrowser-reborn'

...
  async sleep(timeout) {
    return new Promise(resolve => setTimeout(resolve, timeout))
  }
  async openLink() {
    try {
      const url = 'https://github.com/proyecto26'
      if (await InAppBrowser.isAvailable()) {
        const result = await InAppBrowser.open(url, {
          // iOS Properties
          dismissButtonStyle: 'cancel',
          preferredBarTintColor: '#453AA4',
          preferredControlTintColor: 'white',
          readerMode: false,
          animated: true,
          modalPresentationStyle: 'fullScreen',
          modalTransitionStyle: 'coverVertical',
          modalEnabled: true,
          enableBarCollapsing: false,
          // Android Properties
          showTitle: true,
          toolbarColor: '#6200EE',
          secondaryToolbarColor: 'black',
          navigationBarColor: 'black',
          navigationBarDividerColor: 'white',
          enableUrlBarHiding: true,
          enableDefaultShare: true,
          forceCloseOnRedirection: false,
          // Specify full animation resource identifier(package:anim/name)
          // or only resource name(in case of animation bundled with app).
          animations: {
            startEnter: 'slide_in_right',
            startExit: 'slide_out_left',
            endEnter: 'slide_in_left',
            endExit: 'slide_out_right'
          },
          headers: {
            'my-custom-header': 'my custom header value'
          }
        })
        await this.sleep(800);
        Alert.alert(JSON.stringify(result))
      }
      else Linking.openURL(url)
    } catch (error) {
      Alert.alert(error.message)
    }
  }
...

Android Optimizations

On Android, you can warmup the in app browser client to make it launch siginificantly faster. To do so, add the following to your MainActivity

import com.proyecto26.inappbrowser.RNInAppBrowserModule;

public class MainActivity extends ReactActivity {

  @Override
  protected void onStart() {
    super.onStart();
    RNInAppBrowserModule.onStart(this);
  }

}

You can further optimize performance and pre-render pages by providing the urls that the user is likely to open.

// Do not call this every time the component render
useEffect(() => {
  InAppBrowser.mayLaunchUrl("Url user has high chance to open", ["Other urls that user might open ordered by priority"]);
}, []);

Authentication Flow using Deep Linking

In order to redirect back to your application from a web browser, you must specify a unique URI to your app. To do this, define your app scheme and replace my-scheme and my-host with your info.

<activity
  ...
  android:launchMode="singleTask">
  <intent-filter>
      <action android:name="android.intent.action.VIEW" />
      <category android:name="android.intent.category.DEFAULT" />
      <category android:name="android.intent.category.BROWSABLE" />
      <data android:scheme="my-scheme" android:host="my-host" android:pathPrefix="" />
  </intent-filter>
</activity>
<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLName</key>
    <string>my-scheme</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>my-scheme</string>
    </array>
  </dict>
</array>
  • utilities.js
import { Platform } from 'react-native'
export const getDeepLink = (path = '') => {
  const scheme = 'my-scheme'
  const prefix = Platform.OS == 'android' ? `${scheme}://my-host/` : `${scheme}://`
  return prefix + path
}
import { Root } from 'native-base'
import { createStackNavigator } from 'react-navigation'
import { getDeepLink } from './utilities'

const Main = createStackNavigator(
  {
    SplashComponent: { screen: SplashComponent },
    LoginComponent: { screen: LoginComponent },
    HomeComponent: { screen: HomeComponent },
    CallbackComponent: { //Redirect users to the Home page if they are authenticated, otherwise to Login page...
      screen: CallbackComponent,
      path: 'callback/' //Enable Deep linking redirection to get the auth_token
    }
  },
  {
    index: 0,
    initialRouteName: 'SplashComponent',
    headerMode: 'none'
  }
)
...
  render() {
    return (
      <Root>
        <Main uriPrefix={getDeepLink()} />
      </Root>
    )
  }
...
  • LoginComponent
import { Linking } from 'react-native'
import { InAppBrowser } from 'react-native-inappbrowser-reborn'
import { getDeepLink } from './utilities'
...
  async onLogin() {
    const deepLink = getDeepLink('callback')
    const url = `https://my-auth-login-page.com?redirect_uri=${deepLink}`
    try {
      if (await InAppBrowser.isAvailable()) {
        InAppBrowser.openAuth(url, deepLink, {
          // iOS Properties
          ephemeralWebSession: false,
          // Android Properties
          showTitle: false,
          enableUrlBarHiding: true,
          enableDefaultShare: false
        }).then((response) => {
          if (
            response.type === 'success' &&
            response.url
          ) {
            Linking.openURL(response.url)
          }
        })
      } else Linking.openURL(url)
    } catch (error) {
      Linking.openURL(url)
    }
  }
...
  • SplashComponent
...
  async componentDidMount() {
    // Play Lottie Animation :)

    // Validate the stored access token (Maybe with a request)
    // Redirect the user to the Home page if the token is still valid
    // Otherwise redirect to the Login page
  }
...
  • CallbackComponent
...
  async componentDidMount() {
    // Play Lottie Animation :)
    try {
      await this.loadUserInfo()
      // Redirect to the Home page
    } catch (error) {
      // Show error and redirect the user to the Login page
    }
  }

  async loadUserInfo() {
    const { navigation } = this.props
    const { state: { params } } = navigation
    const { code, error } = params || {}

    if (code) {
      // Get and Save the access token request, user info...
    }
    else {
      return Promise.reject(new Error(error))
    }
  }
...

StatusBar

The StatusBar will keep the last one provided in your app. So if the StatusBar is dark-content before you open the browser this will keep it.

Starting with React Native 0.59 onwards, there is a simpler way of handling this update, without the need of patching StatusBar.

  async openInBrowser(url) {
    try {
      const oldStyle = StatusBar.pushStackEntry({ barStyle: 'dark-content', animated: false });
      await InAppBrowser.open(url)
      StatusBar.popStackEntry(oldStyle);
    } catch (error) {
      Alert.alert(error.message)
    }
  })

For previous versions, you can still apply the method described below.

If you want to change before opening you can do something like

  async openInBrowser(url) {
    try {
      StatusBar.setBarStyle('dark-content')
      await InAppBrowser.open(url)
    } catch (error) {
      Alert.alert(error.message)
    }
  })

If you need to restore the old bar style, after the browser is dismissed, you can try and patch the StatusBar.setBarStyle function to store the old value like so:

// patch StatusBar.setBarStyle to make style accessible
const _setBarStyle = StatusBar.setBarStyle
StatusBar.setBarStyle = (style) => {
  StatusBar.currentStyle = style
  _setBarStyle(style)
}

You can than restore the old bar style after the browser has been dismissed like this:

  async openInBrowser(url) {
    try {
      const oldStyle = StatusBar.currentStyle
      StatusBar.setBarStyle('dark-content')
      await InAppBrowser.open(url)
      if(oldStyle) StatusBar.setBarStyle(oldStyle)
    } catch (error) {
      Alert.alert(error.message)
    }
  })

Authentication

Using in-app browser tabs (like SFAuthenticationSession/ASWebAuthenticationSession and Android Custom Tabs) where available. Embedded user-agents, known as web-views (like UIWebView and WKWebView), are explicitly not supported due to the usability and security reasons documented in Section 8.12 of RFC 8252.

Credits πŸ‘

Contributing ✨

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated ❀️. You can learn more about how you can contribute to this project in the contribution guide.

Contributors ✨

Please do contribute! Issues and pull requests are welcome.

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Supporting 🍻

I believe in Unicorns πŸ¦„ Support me, if you do too.

Donate Ethereum, ADA, BNB, SHIBA, USDT, DOGE:

Wallet address

Wallet address: 0x3F9fA8021B43ACe578C2352861Cf335449F33427

Please let us know your contributions! πŸ™

Enterprise πŸ’Ό

Available as part of the Tidelift Subscription.

The maintainers of InAppBrowser for React Native and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

Security contact information 🚨

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

License βš–οΈ

This repository is available under the MIT License.

Happy coding πŸ’―

Made with ❀️

react-native-inappbrowser's People

Contributors

almouro avatar androideveloper avatar avenner avatar bonesyblue avatar dependabot[bot] avatar equimper avatar friederbluemle avatar hikouki avatar igorvanian avatar jdnichollsc avatar logangouget avatar maestor avatar monkeywithacupcake avatar mrloh avatar orcuntuna avatar petekp avatar plamworapot avatar rbscott avatar ronal2do avatar rrebase avatar saeedzhiany avatar shanemckenna23 avatar sharifhh avatar simonit avatar ssuchanowski avatar stianjensen avatar tcodes0 avatar thuongtv-vn avatar vincent-paing avatar yilinjuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-inappbrowser's Issues

Slide in animations not working

The following code does not slide in from the right.

				await InAppBrowser.open(url, {
					animations: {
						startEnter: "slide_in_right",
						startExit: "slide_out_left",
						endEnter: "slide_in_right",
						endExit: "slide_out_left",
					},
				})

Access denied on android

I'm using cookie to save my session login, but seem InAppBrowser doesn't have Cookie permission so browser show Access denied message instead of redirect url callback.

InAppBrowser.openAuth(url, this.conf.appsiteUri, { // iOS Properties dismissButtonStyle: 'back', readerMode: false, // Android Properties showTitle: false, enableUrlBarHiding: true, enableDefaultShare: true, forceCloseOnRedirection: true, animations: { startEnter: 'slide_in_right', startExit: 'slide_out_left', endEnter: 'slide_in_right', endExit: 'slide_out_left' } })

Any ideas?

img_2089
img_2090

Notch support

Hi,

When inappbrowser is opened in a phone with notch, the content in the webview is visible in the space between the inappbrowser title bar and the notch

artboard

Help with closing the InAppBrowser when registration flow is done (RNN)

Hi, i know that this is not the place for asking help implementing stuff. But i have app with React Native Navigation https://wix.github.io/react-native-navigation/#/.

I need InAppBrowser to open registration form on the web, check for success of the registration flow and then close the InAppBrowser.

Everything is good on both platform regarding showing the browser. But right now i don't really know how to detect when registration flow on the web is done so i can close the browser and let the user login with the app.

I have looked into the Linking https://facebook.github.io/react-native/docs/linking.html but still not really sure how i can add functionality to my website to tell my app just to close the the InAppBrowser.

Thanks for any help.

React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
      Memory: 66.01 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.10.0 - /usr/local/bin/node
      Yarn: 1.13.0 - ~/.yarn/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.6.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 26, 27, 28
        Build Tools: 26.0.2, 28.0.3
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5264788
      Xcode: 10.2/10E125 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.1 => 0.59.1 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

undefined is not an object

Hello
I am use example

async openLink() { try { const url = 'https://www.google.com' if (await InAppBrowser.isAvailable()) { const result = await InAppBrowser.open(url, { // iOS Properties dismissButtonStyle: 'cancel', preferredBarTintColor: 'gray', preferredControlTintColor: 'white', readerMode: false, // Android Properties showTitle: true, toolbarColor: '#6200EE', secondaryToolbarColor: 'black', enableUrlBarHiding: true, enableDefaultShare: true, forceCloseOnRedirection: false, // Specify full animation resource identifier(package:anim/name) // or only resource name(in case of animation bundled with app). animations: { startEnter: 'slide_in_right', startExit: 'slide_out_left', endEnter: 'slide_in_left', endExit: 'slide_out_right' }, headers: { 'my-custom-header': 'my custom header value' }, }) Alert.alert(JSON.stringify(result)) } else Linking.openURL(url) } catch (error) { console.log(error.message) } }
This show error
undefined is not an object (evaluating 'RNInAppBrowser.isAvailable')

Android: Set orientation to Landscape

Hello,

The plugin works great in portrait mode, which is set to default.
In my app there is a requirement to play HTML5 games in landscape mode, but this plugin does not provide this option.
In iOS setting the default app orientation to landscape allows the inappbrowser to open in landscape mode, but same is not in the case of android.

Note: I have already added screenOrientation in AndroidManifest.xml

            android:screenOrientation="sensorLandscape"

Flow errors

I'm getting flow errors from this library

Error β”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆ node_modules/react-native-inappbrowser-reborn/index.js:33:13
                                                                                                           
Cannot resolve name object.                                                                                                            
                                                                   
     30β”‚     endEnter: string,                                                                                          
     31β”‚     endExit: string                                                                                                           
     32β”‚   },                                                                       
     33β”‚   headers?: object                                         
     34β”‚ }                                                         
     35β”‚                                                           
     36β”‚ async function open(url: string, options: InAppBrowserOptions = {}): Promise<BrowserResult.type> {                            
                                                                   
          n      .                                                  
Error β”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆ node_modules/react-native-inappbrowser-reborn/index.js:36:92
                                        
Cannot get BrowserResult.type because property type is missing in BrowserResult [1].
                 
 [1] 12β”‚ type BrowserResult = {
       :
     33β”‚   headers?: object                                                                                             
     34β”‚ }
     35β”‚
     36β”‚ async function open(url: string, options: InAppBrowserOptions = {}): Promise<BrowserResult.type> {
     37β”‚   const inAppBrowseroptions = {
     38β”‚     ...options,
     39β”‚     url,


Error β”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆ node_modules/react-native-inappbrowser-reborn/index.js:123:31

Cannot use Promise [1] without 1 type argument.

     node_modules/react-native-inappbrowser-reborn/index.js
     120β”‚   });
     121β”‚ }
     122β”‚
     123β”‚ async function isAvailable(): Promise {
     124β”‚   if (Platform.OS === 'android') {
     125β”‚     return Promise.resolve();
     126β”‚   }

     node_modules/react-native/flow/Promise.js
 [1]  13β”‚ declare class Promise<+R> {

Library version: 1.3.8
Flow version: 2.3.0

mailto link returns error

Hi there,

I am using your plugin for my app, but in content we sometimes use a mailto link. This somehow is returning an error:

Exception 'The specified URL has an unsupported scheme. Only HTTP and HTTPS URLs are supported.' was thrown while invoking open on target RNInAppBrowser with params

No issues with http or https, but the mailto gives an issue.

Any idea how to fix this?

Cheers,
Stephan

option headers not working for ios

Option headers not working for ios, at leat:

Env:

  • RN 0.57
  • iOS 12, simulator

Simple from the example:

        headers: {
          'my-custom-header': 'my custom header value'
        },

Back-end ExpressJS, simple too:

...
const accessToken = _.get(req, 'headers.access-token'); // undefined
...

Android app getting crashed in release mode

First of all thanks for your precious time.
Have installed latest plugin from npm repo but when building app it was giving below error:

/Users/kuljeetkakkar/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/95e09f6dccd9f5c14aba58f25aca898b/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.

/Users/kuljeetkakkar/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/95e09f6dccd9f5c14aba58f25aca898b/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found.

error: failed linking references.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processReleaseResources'.

Failed to process resources, see aapt output above for details.

My Android Configurations is as follows:
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.1.1"

Tried google the issue and found this https://stackoverflow.com/a/51474321.

So I changed my android configuration to
buildToolsVersion = "27.0.3"
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"

The build was successful with this. InAppBrowser worked perfectly when app is launched in debug mode.

But when tried the same in release mode the app crashed. Tested it on android 6 and android 7.

I have MI phone with android 7 which gave me the below error logs when the app crashed.

org.a.a.e: Subscriber class com.proyecto26.inappbrowser.b and its super classes have no public methods with the @subscribe annotation
at org.a.a.m.a(Unknown Source)
at org.a.a.c.a(Unknown Source)
at com.proyecto26.inappbrowser.b.a(Unknown Source)
at com.proyecto26.inappbrowser.RNInAppBrowserModule.open(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(Unknown Source)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(Unknown Source)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source)
at android.os.Looper.loop(Looper.java:163)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(Unknown Source)
at java.lang.Thread.run(Thread.java:760)

Originally posted by @kuljeetsingh31 in https://github.com/proyecto26/react-native-inappbrowser/issue_comments#issuecomment-437585642

RuntimeException on Android

I'm getting a runtime exception for some users on android:

image

java.lang.RuntimeException: 
  at com.facebook.react.bridge.CallbackImpl.invoke (CallbackImpl.java:28)
  at com.facebook.react.bridge.PromiseImpl.resolve (PromiseImpl.java:30)
  at com.proyecto26.inappbrowser.RNInAppBrowser.open (RNInAppBrowser.java:50)
  at com.proyecto26.inappbrowser.RNInAppBrowserModule.open (RNInAppBrowserModule.java:28)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
  at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:160)
  at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
  at android.os.Handler.handleCallback (Handler.java:790)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:29)
  at android.os.Looper.loop (Looper.java:164)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run (MessageQueueThreadImpl.java:192)
  at java.lang.Thread.run (Thread.java:764)

The stack trace points here which is pretty odd:

Any ideas?

Return `true` for Android

[feature]
Currently when I run isAvailable() for Android it doesn't return, it simply doesn't throw an exception.
I was thinking perhaps this function could return a boolean value instead of possibly just throwing exceptions.

if(await InAppBrowser.isAvailable()) {
  await InAppBrowser.open(....

Instead of using a try catch to see if it's available. I didn't get a chance to look at the iOS detection but I would think a general try/catch could handle it and resolve with false instead of throwing exceptions.

Open safari instead on iPhone 6s / Plus

I've tested on iPhone 6s , 6s+ then it open safari instead of in-app. But it working on iPhone XR
Any ideas?

ios: 12.1.2 (same as all devices)
react-native: 0.55.4
inappbrowser: 1.3.11

Android animations support

Hi and first thanks for awesome library, I have search one replacement for two quite inactive projects I used separately for that purpose with iOS and Android. Luckily found this.

In react-native-custom-tabs, there is nice animation props for polish look and feel. Wouldn't that be doable polishment for this too?

I don't have much time and/or skills yet, but I'm interested to give support if somebody could be main contributor if this isn't bad idea at all.

When you call openAuth the styling options are not applied

Example of my code:

const result = await InAppBrowser.openAuth(url +&redirect_uri=${deepLink}, deepLink, { dismissButtonStyle: "close", preferredBarTintColor: "white", preferredControlTintColor: colors.primaryOrange, showTitle: true, toolbarColor: "white", secondaryToolbarColor: "white", enableUrlBarHiding: true, enableDefaultShare: true, forceCloseOnRedirection: false });

When you call just open, it works and the styles are there.

Cannot run due to missing file

Hey there,

I can't seem to run with IOS. The emulator is telling me that Metro Bundler has encountered an internal error. Here is the log:

error: bundling failed: Error: While trying to resolve module `react-native-inappbrowser-reborn` from file `/Users/OtanerAnton/Desktop/ReactProjects/baseProject/screens/SignUpScreen.js`, the package `/Users/OtanerAnton/Desktop/ReactProjects/baseProject/node_modules/react-native-inappbrowser-reborn/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/Users/OtanerAnton/Desktop/ReactProjects/baseProject/node_modules/react-native-inappbrowser-reborn/index.js`. Indeed, none of these files exist:

  * `/Users/OtanerAnton/Desktop/ReactProjects/baseProject/node_modules/react-native-inappbrowser-reborn/index.js(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
  * `/Users/OtanerAnton/Desktop/ReactProjects/baseProject/node_modules/react-native-inappbrowser-reborn/index.js/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
    at ResolutionRequest.resolveDependency (/Users/OtanerAnton/Desktop/ReactProjects/baseProject/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:61:15)

Can't seem to find a solution to this. I may be missing something obvious though.
Thanks!

Give the option of opening as push instead of modal

I see you are forcing it to open as a modal (iOS and Android). Ideally this should be a user's decision, like the fromBottom option of https://github.com/naoufal/react-native-safari-view.

// By setting the modal presentation style to OverFullScreen, we disable the "Swipe to dismiss"
// gesture that is causing a bug where sometimes `safariViewControllerDidFinish` is not called.
// There are bugs filed already about it on OpenRadar.
[safariVC setModalPresentationStyle: UIModalPresentationOverFullScreen];

// This is a hack to present the SafariViewController modally
UINavigationController *safariHackVC = [[UINavigationController alloc] initWithRootViewController:safariVC];
[safariHackVC setNavigationBarHidden:true animated:false];
UIViewController *presentingViewController = RCTPresentedViewController();
[presentingViewController presentViewController:safariHackVC animated:true completion:nil];

android build error with different compile and runtime customtabs versions

This package is really awesome, much nicer api than the separate previous packages for in-app-browsers.

However I am getting an error on my android build that I do not understand, since everything seems to be configured correctly in this packages build.gradle

Android dependency 'com.android.support:customtabs' has different version for the compile (27.0.2) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution

Do you have any idea what is causing this?

Start animation doesn't work

Unlike #24, I am testing on Android, and simply using the example project from this repo. The dismiss animations always do work, but I've tried multiple devices & Android versions and showing the custom tab always uses the default animation (which itself varies by device).

(P.S. I had to modify the build.gradle of the example project in order to get it to build... I'm not sure why...

    implementation(project(':react-native-inappbrowser-reborn')) {
        exclude group: 'com.facebook.infer.annotation', module: 'infer-annotation'
    }

)

Add method to clear cookies

There's an issue using this view with many oauth providers because the cookies are all encapsulated in this instance of the browser. The user can't simply log out in their regular browser.

With enterprise SSO providers this gets worse since they sometimes provide oauth logins through their website and even if one were to use their logout url, it doesn't log out the oauth provider.

The best solution here would be to clear the cookies. If the user tries to log in again, they're forced to actually enter credentials. Otherwise oauth just logs them right back in and it's as if they never logged out.

Can this be done here?

illegal callback invocation from native module. This callback type only permits a single invocation from native code.

Hi, I got this issue "illegal callback invocation from native module. This callback type only permits a single invocation from native code" from when I tried to open InAppBrowser twice.

{
"name": "xxxx",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"query-string": "^6.2.0",
"react": "16.6.1",
"react-native": "0.57.7",
"react-native-inappbrowser-reborn": "^1.3.9"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.50.0",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}

2018-12-13 11 42 08

Android build failing (Multiple Dex Files)

Hello,
I am trying to implement your module, but it's failing. See the error bellow.

:app:transformClassesWithDexForDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/content/res/TypedArrayUtils;

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

See also my build.gradle

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.tymuj"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 82
        versionName "3.0.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    compile project(':react-native-inappbrowser-reborn')
    compile project(':react-native-google-analytics-bridge')
    compile project(':react-native-vector-icons')
    compile project(':react-native-fbsdk')
    compile project(':react-native-i18n')
    compile project(':react-native-mixpanel')
    compile project(':react-native-sentry')
    compile project(':react-native-image-picker')
    compile project(':react-native-device-info')
    compile project(':react-native-calendar-events')
    compile project(':react-native-fcm')
    compile "com.google.firebase:firebase-core:10.2.1"
    compile "com.google.firebase:firebase-messaging:10.2.1"
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:+"  // From node_modules
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

apply plugin: 'com.google.gms.google-services'

Unable to get proper response post authentication on auth server


async loginButton() {
 const deepLink = getDeepLink("home");
    const uniqueId = DeviceInfo.getUniqueID();
    const url = "https://backend.com/?redirect_uri=${deepLink}";
    console.log(url);
    console.log(uniqueId);
    try {
      await InAppBrowser.isAvailable();
      InAppBrowser.openAuth(url, deepLink, {
        // iOS Properties
        dismissButtonStyle: "cancel",
        preferredBarTintColor: "gray",
        preferredControlTintColor: "white",
        readerMode: false,
        // Android Properties
        showTitle: true,
        toolbarColor: "#E73139",
        secondaryToolbarColor: "black",
        enableUrlBarHiding: true,
        enableDefaultShare: true,
        forceCloseOnRedirection: false,
        // Specify full animation resource identifier(package:anim/name)
        // or only resource name(in case of animation bundled with app).
        animations: {
          startEnter: "slide_in_right",
          startExit: "slide_out_left",
          endEnter: "slide_in_right",
          endExit: "slide_out_left"
        },
        headers: {
          "my-custom-header": "backend"
        }
      }).then(result => {
        console.log(result);
        
      });
    } catch (error) {
      Alert.alert(error.message);
    }
  }

I am using the deep linking auth flow example mentioned in the description of the repo. I was able to successfully open the authentication flow in the browser. I am using a Laravel based server to authenticate the user. Once the user is autheticated the server responds with
return redirect('mobileapp://home?token='.$token);

when this happens the browser closes off but then console.log(result); shows me type:dismiss as a result from the browser, I would also like to know if there is a possibility to handle the URL change in the browser component how we do with for WebView onNavigationStateChange with that way also I will have a possibility to see what is the current state of the browser and act accordingly.

Open in reader mode

Hey first thank you for this package, work like a charm. I would like to know if this is possible to open in reader mode right away. I don't see any opts for it.

RN 0.57 android build not working

Does this package support RN 0.57? I looked at the example in the source code and it is using v 0.56.

Steps:

  • create fresh RN app
  • npm install react-native-inappbrowser-reborn --save
  • react-native link react-native-inappbrowser-reborn
  • react-native run-android

This is the console error:

spikeWebview _16:47:54]^_^ react-native run-android
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :react-native-inappbrowser-reborn
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

/Users/leonardo/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/5690bd9c1f61e95eba9cbf11cedc9324/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.

/Users/leonardo/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/5690bd9c1f61e95eba9cbf11cedc9324/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found.

error: failed linking references.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to process resources, see aapt output above for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 18s
35 actionable tasks: 17 executed, 18 up-to-date

InAppBrowser does not close on android 5.1.1

Hi there,

I am using your plugin, but suddenly faced with problem on android 5.1.1. InAppBrowser opens link correctly with type - dismiss, but every time u want to close it it opens again. If i want to make a force close - it does nothing.

React Native Environment Info:
System:
OS: macOS 10.14.4
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 39.18 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.7.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.3, 26.0.0, 26.0.2, 26.0.3, 27.0.3, 28.0.3
System Images: android-19 | ARM EABI v7a, android-19 | Google APIs ARM EABI v7a, android-25 | Google APIs Intel x86 Atom, android-25 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.1 AI-173.4670197
Xcode: 10.2/10E125 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.2 => 0.59.2
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7

Android - how to know when the browser was closed by user?

I have an intent filter like this in my Android app:

<activity
        android:name=".MainActivity"
        ...
>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="myapp" android:host="test" />
        </intent-filter>
        ...
</activity>

If I open the browser a page that redirects to myapp://test the browser is dismissed and the result type is "cancel", which makes impossible to distinguish this situation from the situation when the user closed the browser manually.

props.openOAuthUrl(urlThatRedirectsToApp).then((result) => {
  console.log(result); // { type: 'cancel' }, but probably it should be { type: 'dismiss' } so I can know that the user did not close the browser manually
});

The promise is resolved with { type: 'cancel' } here when the browser activity is destroyed:

On iOS when the browser redirects to myapp://test the browser is not dismissed automatically. Instead I detect with Linking that the app was opened with that url, and close the browser from there, which I think is fine:

Linking.addEventListener('url', (url) => {
  InAppBrowser.close();
  console.log('URL: ', url);
});

Not able to add event listener on url change

I am not able add event listerner on url change.
I want to close inappbrowser on specific url like success or failure url.

I am new in React Native so can you please give steps to get url value on url changes.

Please let me know if any required from my side.

Thank you!!!

Flow error on index.js

Hello, thanks for the great job in maintaining this project.

A recent commit (c3a95da) seems to have introduced a flow error on index.js.

See:

Error β”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆ node_modules/react-native-inappbrowser-reborn/index.js:125:12

Cannot return Promise.resolve(...) because boolean [1] is incompatible with undefined [2] in type
argument R [3].

     node_modules/react-native-inappbrowser-reborn/index.js
     122β”‚
 [2] 123β”‚ async function isAvailable(): Promise<void> {
     124β”‚   if (Platform.OS === 'android') {
 [1] 125β”‚     return Promise.resolve(true);
     126β”‚   }
     127β”‚   else {
     128β”‚     return RNInAppBrowser.isAvailable();

     node_modules/react-native/flow/Promise.js
 [3]  13β”‚ declare class Promise<+R> {

Thanks!

Request for Android: statusbarColor and navigationBarColor

Hi,
thank you very much for this module, it works like a charm! πŸ₯‡

But what is the
secondaryToolbarColor: 'black' for?

Anyways i really would like to have a chance to set the statusbarColor and navigationBarColor on my own for android, any suggestions?

forceCloseOnRedirection don't work as expected

I had mystery problem than Custom Tabs closing automatically if I go to other app. Notice that I had forceCloseOnRedirection value set to true. Actually there is two issues:

  1. I found explanations about this setting in https://github.com/droibit/react-native-custom-tabs:
    forceCloseOnRedirection boolean undefined Workaround that Custom Tabs doesn't close on redirecting back to app scheme.

That said, force close should happen only if coming back to app from for example oauth registeration flow, not all the time if you go somewhere else from active browser window. Also if you have open link and open active app listing, it shows that inAppBrowser as weird new screen (Honor 9, Android 8) which you can't choose because it disappears. So setting is currently useless (didn't test yet what happens after some redirection if this is set to false, could be that there is no need for keep that at all?).

  1. There is no explanations about settings in this repo README, so had to guess, find from code or try to find comparison setting in libraries mentioned in credits what things should do. This is not nice.

EDIT: Tested one flow with redirection back to app, and for me application opened (and custom tabs closed) succesfully also with forceCloseOnRedirection false, maybe that's unrelevant and confusing setting?

How to hide the address bar?

I wan't my app to go full screen mode right after it's on. I didn't find any option to hide the address bar! How can i do that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.