I have an Android tablet with a USB to ethernet adapter. The network interface is configured and the default gateway works and allow internet access.
To fix an issue we are having I would like to change the default gateway to something that is incorrect which will cause the tablet to not be able to access the internet.
Then in our Xamarin application I would like to route the internet traffic through the USB to ethernet NIC like normal but I want to programmatically specify the correct gateway somehow without changing the gateway on the NIC. I can also remove the gateway altogether if that would do the same thing and block traffic. But in that case do I have to do anything special in the traffic to send the traffic to the 192.168.1.1 gateway?
Is this technically possible at all in Xamarin or Java/Android? I am also open to somehow configuring Android itself so that only our application has a valid routing table but I am not sure how to do that.
Thanks ahead of time!
I have not tried anything yet to fix this I'm just brainstorming issues.