proyecto26 / react-native-inappbrowser

📱InAppBrowser for React Native (Android & iOS) 🤘
https://www.npmjs.com/package/react-native-inappbrowser-reborn
MIT License
1.31k stars 224 forks source link

fix(android): 279 - Fix error cannot find symbol #281

Closed jdnichollsc closed 3 years ago

jdnichollsc commented 3 years ago

Fix Build failed. Error cannot find symbol builder.setNavigationBarColor error for Android Support

PR Checklist

What is the current behavior?

Android Support is not working with the new methods of CustomTabsIntent.Builder for AndroidX.

What is the new behavior?

Detect if the method exists before to invoke the function to avoid build issues by using Reflection.

Fixes/Implements/Closes #279.

reberthkss commented 3 years ago

@jdnichollsc i think it should work, let me try it

jdnichollsc commented 3 years ago

@reberthkss awesome, let me know! <3

jdnichollsc commented 3 years ago

Personally I don't like Reflection, but I can't see any other option 🤔

reberthkss commented 3 years ago

I've tested on my project and the error was gone, but I faced the same problem with create_react_context described in https://github.com/proyecto26/react-native-inappbrowser/issues/279#issuecomment-873325797

I'm trying to test in a bare react-native typescript template project

jdnichollsc commented 3 years ago

Ohh very odd, please let me know! 🙏

reberthkss commented 3 years ago

Worked like a charm :3

https://user-images.githubusercontent.com/54030471/124369100-96bd3f00-dc3e-11eb-98a2-9f7917801af5.mp4

jdnichollsc commented 3 years ago

@reberthkss nice! thanks for your help! 🤩

pramahaditamaputra-ralali commented 3 years ago

The new release version 3.6.2 its works as well right Now in my app built with React Native version 0.61.5 , thanks for the fixing so i can use the lastest version of this library @jdnichollsc @reberthkss <3