ammarahm-ed / react-native-geckoview

GeckoView implementation on android for React Native.
MIT License
11 stars 4 forks source link

User preferences or config settings #2

Open kitTiwari opened 1 year ago

kitTiwari commented 1 year ago

I am trying to disable the background network calls which geckoview Mozilla makes in the background but having issues while setting up the preferences,

I found this article https://winaero.com/disable-firefox-captive-portal-and-connection-to-detectportal-firefox-com/#To_Disable_Firefox_Captive_Portal_and_Connection_to_detectportalfirefoxcom where you can set user preference setup like how you modify about:config for Mozilla browser, but I couldn't find the right implementation of it in geckoview documentation

user_pref("network.captive-portal-service.enabled", false);

ammarahm-ed commented 1 year ago

@kitTiwari I haven't tried setting such stuff before and have no idea where it is. Where are you trying to set this: user_pref("network.captive-portal-service.enabled", false);? the current implementation does not expose such an api

kitTiwari commented 1 year ago

I was trying to use references from here https://www.javatips.net/api/org.mozilla.gecko.prefshelper but they seems to be deprecated

ammarahm-ed commented 1 year ago

I will see if there is an api for it on GeckoView. There's an option to enable about:config. Maybe we can set properties too programmatically.