Socket
Socket
Sign inDemoInstall

react-native-navigation-bar-detector

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-navigation-bar-detector

A React Native module that detects which navigationbar is used on android. This way, it is possible to detect if gestures, two buttons or three buttons are used.


Version published
Weekly downloads
92
increased by104.44%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-native-navigation-bar-detector

A React Native module that detects which navigation-bar is used on android. This way, it is possible to detect if gestures, two buttons or three buttons are used.

At the moment, this module only works on Android. If you want to use this module on iOS (for example to check whether a button or a gesture bar is used), please create an issue.

Installation

Add the package to your npm dependencies

npm install react-native-navigation-bar-detector

Configure for iOS

Run npx pod-install after installing the npm package.

Configure for Android

No additional steps needed

API documentation

The API is very simple to use, as there is only one method to call.

getNavigationBarType()

This is a function to get the type of navigation bar being used. It's currently only compatible with Android devices. iOS compatibility is planned in the near future.

Import
import { getNavigationBarType } from "path/to/ReactNativeNavigationBarDetectorModule"
Usage
const navBarType = getNavigationBarType();
Return Value

Type: NavigationBarType This function will return one of four potential strings:

  • "threeButton": Indicates the navigation bar with three buttons.
  • "twoButton": Indicates the navigation bar with two buttons.
  • "gesture": Indicates that gesture navigation is being used.
  • "ios not yet supported": If the device is not an Android, the function will return .

Contributing

Contributions are very welcome! Please do so by opening an issue or creating a Pull Request.

Keywords

FAQs

Last updated on 05 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc