We are using a nexus 7 in a very limited way and want some features removed/locked.
One problem we are having is the the device needs to be on a wifi network we set up. Thsi works fine as we save the details for it but if somone accesses the wifi menu and changes the network it will stop the device from working as intended.
Is there a way to set the nexus 7 so that it will not connect to any other wifi network ?
maybe some kind of banned network list ?
This is not an issue of it auto connecting to another network when our network is off but of a user changing the network because they want internet access on the device which we do not want them to have.
The only way to do what you're talking about would be to make your own, custom build of Android that would lock down the features that you don't want.
Related
I'm developing an app that uses the server in the wifi network (A), which has no internet connection. I use another wifi connection (B) with the internet for normal use. When I debug my app, I switch my android phone to the wifi connection A.
but the wifi network automatically changes to B, while I'm still debugging my app which has no programmatic functionality to change the wifi connection. If I change it back to A, after a few seconds or about in one-two minutes it automatically changes back to B. This is not an expected behavior to me since I can't properly debug my app.
I tried to change the network & internet settings, but no option was found to prevent automatic wifi network switching. What I can guess is my wifi B is selected by android O/S because it has an internet connection. I can forget that connection, but it's not practical because I use both connections in short time periods.
I wonder if any other developer solved this kind of problem in any programmatic or manual way while debugging. I really do not want to include any wifi switching functionality in my app, just need to keep my wifi connection A connected while debugging with Android Studio.
My Android O/S version is 10, Nokia 3.1
Any help would be highly appreciated.
I have an app that needs to connect to a hardware via Wi-Fi. For this purpose, the hardware offers an offline Wi-Fi Hotspot. The hotspot's DHCP doesn't give us a gateway or DNS so we know right away, that it's for offline use only.
The end user will be at work and have to stay connected to the Wi-Fi the whole time in order to receive sensor data and alerts if something is wrong with the data. But at the same time, we don't want to force the end user to be offline with his mobile device. He should be able to use his mobile data for our and all other apps he has.
I though I can control this by calling android.net.ConnectivityManager.requestNetwork. But it doesn't seem to work reliably. Will calling requestNetwork in my app influence if all the other apps have access to mobile data?
Is this even something that we can control? I tested this on multiple devices with different manufacturers and android versions and they all behave differently.
E.g. Pixel 3a works fine. After some time I get a notification regarding the offline Wi-Fi. If I ignore it, it keeps working. If I press "yes" on it, I am offline and connected to the Wi-Fi.
Huawei P20 Lite seems to fire a OnLost event for my mobile data NetworkCallback every time I request it. Like its trying to cancel the mobile connection every time I reconnect because I'm in the wifi. Some devices offer a "Smart Switch" (Samsung) or "Wi-Fi+" (Huawei) mode which isn't on per default. And it seems like a hassle to ask the user to turn it on, since they might not want to use it in different scenarios.
Here are some examples for the different devices:
When using requestNetwork() to stick to an offline wifi network, you need an instance of ConnectivityManager. You can get it as follows:
final ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
This method returns the OS's connectivity manager. Therefore other apps will also be impacted by the "sticky" mode you've put the ConnectivityManager in.
Unfortunately I don't think it's possible for an app to force OS to stay connected to an offline Wifi network, and at the same time keep using mobile data.
After trying this out on various devices, I can say, that it is not possible to achive the desired behaviour consinstently on all devices.
Pretty much all the devices, behave differently. The OS-version is not really a factor. It depends more on how the vendors handle the case, that a user is connected to an offline wifi.
Based on the device, it might be possible to stay connected to offline wifi and use mobile data at the same time for all apps. But the OS can automatically disconnect you or lock you into the offline-wifi and disable mobile data. Maybe it does it because the user selected an option in the system dialogs as shown above.
In the latter case, it is possible to force a mobile data connection with the ConnectivityManager for the own app. But it is not possible to make all the other apps use this mobile connection as well.
At my company we develop a application that take control of wifi tethering, creating a hotspot with a custom ssid and passkey, allowing a IP Camera to connect and transfer data.
It works well until Android 7.1, but now in 8 apparently we can't tethering with custom ssid.
One solution that I thought was to only disable the update to 8, but how to do it?
My app locks the tablet (no buttons, no access to settings or home launcher, etc), but the update comes in a popup, allowing my client to click the update button.
Some ideas:
Lie the battery percentage
Block the address of the update server
Close the popup programatically
-Any other? I tried all the ideas, but without root I cant't find any solution.
ps: Sadly the tablets can't have root
I'm running Android Things on a Raspberry Pi 3 with a touch screen attached.
I would like to be able to access and update wifi settings in my app. I.e. be able to show a list of scanned wifi networks and let the user pick one and type in a password.
This would be useful when bringing the device to another building with a different wifi network, for example.
Is this possible? Or is the only way to change the wifi connection to do one of the actions described here: https://developer.android.com/things/hardware/raspberrypi.html#connecting_wi-fi
Thanks!
There are APIs which can be used to setup Wi-Fi networks programmatically. This means you can do all the scanning and connecting inside of your app.
I want to make application which gives me the list of all the devices that are connected to my current network connection.
For eg. When i press on search button in bluetooth application gives me the list of bluetooth device that are in range , Similarly i need to develop application in when when i click on search button then it should able to give the list of all the devices that are connected to my network.
I am familiar with the Networkmanager and the NetworkInfo Api.
If u have any idea how can i do this,please guide me.
Thank you
If you mean you want to see all the devices connected to your current WiFi connection (and you are not trying to do Ad Hoc networking), then you are essentially wanting to run a network scanner.
There are a bunch of these around. This one has the source available on github
http://rorist.github.com/android-network-discovery/
This is possible now to get the network devices using NSD Android new feature and for this required minimum version 16 level Jellybean
Here is the link for NSD
http://developer.android.com/training/connect-devices-wirelessly/nsd.html