NetGuard | A simple way to block access to the internet per app
kandi X-RAY | NetGuard Summary
kandi X-RAY | NetGuard Summary
NetGuard provides simple and advanced ways to block access to the internet - no root required. Applications and addresses can individually be allowed or denied access to your Wi-Fi and/or mobile connection.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Restore the preferences
- Creates the intent to create the export directory
- Show a help dialog
- This method initializes the intent to open the document
- Override handleBindViewHolder to bind to the itemHolder
- Update rule
- Make menu item
- Overridden to set the content view
- Send logcat
- Unregisters listener
- Handle the service intent
- Read data from the view
- Called when a menu item is selected
- Handles an option selection select
- Show an access notification for the user
- Get allowed rules
- Start native storage
- Override this to set the status of the intent
- Initializes the context
- Called when a shared preference is changed
- Initialize the activity
- Initializes the view
- Reads values from the view
- Creates a builder based on the configured rules
- On upgrade
- Called when the menu item is selected
NetGuard Key Features
NetGuard Examples and Code Snippets
Community Discussions
Trending Discussions on NetGuard
QUESTION
I'm facing a problem with an http request done in HTTP.java
.
On desktop all works fine (that request is not performed because it's necessary only on Android).
In Android all works without that http request.
After that that http request is made, all others fail after timeout with UnknownHostException error, as if they no longer have access to the internet connection, even if it is active. Also after minutes and after the onResume all http requests fail. Although the app cannot get an http response, the AdMob ad appears in my App, so I think that probably the connection works (or does the AdMob library cache some ads and show them when needed?).
Often, in these cases sometimes it works again:
- uninstalling and reinstalling the App from Android Studio
- closing the App, waiting some minutes and reopening it
- clearing App data from the device
- waiting an undefined amount of time
❗ After several attempts I discovered that as soon as the problem occurs, almost every time, if I activate the airplane mode and then disable it, the data connection is deactivated and then reactivated, and the App can immediately execute all subsequent http requests without having to do anything else on your device and without even having to reopen the application.
- tested with wifi on a 1GB fibra network: same error
- I checked the connection: it is stable, in wifi and also with SIM
- in the manifest there is the permission for using internet (otherwise it would never have worked)
- at the same time, the same App on desktop works perfectly and at the best speed, receiving http responses in less than 1 second, so the server isn't the problem
- I tested also with the url https://www.google.it: same error, the same url is reachable in the device via browser in less than 1 second
- as in the line
.timeout(10000)
I'm using a timeout of 10 seconds, the server has timeout set to 60 seconds - checked the server SSL "quality" at https://www.ssllabs.com/ssltest: got "A" in "Overall Rating"
- done the SIM "reboot" directly with a Vodafone operator
I'm testing on a real device with a flat 4G connection and with wifi, with "NetGuard - no-root firewall" VPN App installed.
This VPN works very well with all the other apps and probably mine too, but I can't rule out that it's the problem, although I hardly think it is (I use it since years without problems).
There is something wrong in my code? Or at least, how can I know the exact cause of this error?
Thanks.
AndroidLauncher.java:
...ANSWER
Answered 2021-Mar-02 at 03:51That error maybe relate to VPN connect, please close the application, off VNP if it was connected, re-connect to VPN and restart you application.
In all case, you must be connect the VPN before open the application.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install NetGuard
You can use NetGuard like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the NetGuard component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page