kadiraydinli / react-native-system-navigation-bar

React Native lets you customize the navigation bar for Android.
https://www.npmjs.com/package/react-native-system-navigation-bar
MIT License
270 stars 19 forks source link

Question on API Level checks. #16

Closed nornewman closed 2 years ago

nornewman commented 2 years ago

Thank you for the library, it works great, exactly what we need!

Just a quick question. Are the functions that are only supported by higher level of Android APIs causing an app to crash? To rephrase, do I need to check the API Level before the call, or are you checking it manually inside the code?

Example of the feature is here: setNavigationBarDividerColor() Only API Level 28 (Android 9) and higher is supported.

Thanks!

kadiraydinli commented 2 years ago

Hi @nornewman no, it won't crash the app. I check this in code. https://github.com/kadiraydinli/react-native-system-navigation-bar/blob/master/android/src/main/java/com/reactnativesystemnavigationbar/SystemNavigationBarModule.java#L196

kadiraydinli commented 2 years ago

I think the problem is solved. That's why I'm closing this issue.