
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
react-native-navigationbar-obsever
Advanced tools
Listen to device navigationbar changes in React Native applications on a per screen basis. Works on Android only.
npm install react-native-navigationbar-obsever --save
react-native link react-native-navigationbar-obsever
Android
In android/setting.gradle
...
include ':react-native-navigationbar-obsever', ':app'
project(':react-native-navigationbar-obsever').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigationbar-obsever/android')
In android/app/build.gradle
...
dependencies {
...
compile project(':react-native-navigationbar-obsever')
}
import NavigationbarObsever from 'react-native-navigationbar-obsever';
export default class AppScreen extends Component {
// ...
componentDidMount() {
if (Platform.OS === 'android') {
NavigationbarObsever.isNavigationbarShow((err, isShow) => {
console.log(err, isShow, 'isShow');
});
//if you want to listener,you should bind first.
NavigationbarObsever.bindListener((err,isOK) => {
console.log(err, isOK, 'isOK');
});
//if you want to listener,you should addListener at second.
DeviceEventEmitter.addListener('navigationbarDidShowChange', this._navigationDidShowChange);
}
}
_navigationDidShowChange = (show) => {
console.log(show.navigationbarSize, 'navigationbarSize',show.navigationbarShow, 'navigationbarShow');
}
componentWillUnmount() {
if (Platform.OS === 'android') {
//don't forget unbind and remove
NavigationbarObsever.unbindListener();
DeviceEventEmitter.removeListener(this._navigationDidShowChange);
}
}
render() {
// ...
return (
// ...
)
}
}
FAQs
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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.