Free wifi only if my app is installed - android

I would like to simulate the scenario like it is available in some hotels. Basically, if the user connects to free wifi in a hotel he/she needs to either enter a code, or visit to predefined site to accept terms and conditions.
I would like to replicate the same on android phone, user could only connect to free wifi if my custom application is installed else not.
Is it possible?

Your only possibility if you really want to develop this as an app would be to programmatically connect to the Wifi network. This way, the user would never see the password of the hotspot (As long as the device is not rooted).
However, the user had to start the app in order to get connected to the wifi, and he could uninstall the app and still connect to the Wifi, as the system saves the wifi configuration.
If you want to go this way, you'll have to deal with the WifiManager APIs.
You might find this answer to a similar question helpful.

Related

Using both Wifi and mobile network at the same time in flutter app

In my flutter app, I need to get information from a device via wifi as a stream. Also I need to keep my google maps online via Mobile internet. How can I use both wifi and mobile network at the same time in my phone. I made a lot of search but I can't find any solution for this.
I don't think it's possible.
The phone would need two network antennas and possibly two network adapters.
You can surely toggle both wifi and mobile data at the same time and they can probably switch frequently to optimize your connection or send requests to different services.
But you can't really use them both at the same time.
(if it's possible) I don't recommend it, since a majority of phones will not support this feature since you need two network antennas.
From the facts as presented, there are a couple of possible solutions, but they aren't perfect and I'm guessing on one as I haven't tested it yet.
One, Google Maps has an offline mode. You can set it up to download maps for offline use. It will show your position on the maps whether you are connected to the internet or not, but you won't get traffic data or accurate travel times. Not great, but it can work.
Two, it is possible for a phone to have a WiFi network and Cellular network active at the same time, but not in the way everyone seemed to think. Since you are wanting the cellular connection open to have access to the internet, I'm assuming this is because the WiFi network you want to access doesn't have the internet. So, reverse the WiFi network. Setup your phone to be a hotspot network, it runs its own WiFi network while maintaining access to the internet through its cellular network. I'm guessing here, but unless phones have some specific security protocol forbidding it I don't know about (which can be the case), your app should be able to contact anything connected to its phone's WiFi while still having access to the internet.
If this doesn't work for some reason, you can try a trick I used when I set up a car office. Get a mobile hotspot device. It's a device you can put a cellular SIMM in and it creates a WiFi hotspot. You can connect to it, along with other devices in the car. All will being using WiFi and the hotspot will provide the internet access.
If what you are connected to can only create a WiFi network for you to access and it can't be configured to connect to one itself, you could technically still be able to do it by network switching. Much harder to do (probably impossible on some devices) and will likely mess with other apps depending on internet access, so a real break glass in case of emergency type of situation there.

Can an app connect the mobile/smartphone to an Wifi network without going to Wifi Settings?

Does that work on Andoid and also on iOS?
To explain more, in future I would like to do that:
(1) The app would scan a QR code from a cardboard box. The QR code would contain the name of a Wifi network and such network would be really within reach of the phone (consider that).
(2) The app would connect to such Wifi network automatically, without the need to go to the 'Wifi Settings' of the phone and connect to such network manually. Consider here that the password of such Wifi network is always the same, always the same string. That is, the act of connecting the mobile to such network would be all done in app code. The need of a simple 'yes/no' confirmation for the user would be no problem.
Then, will that be possible?
Android Q can let you do that.
No sure about iOS.

Connect to specific network SSID (hotspot) when app active

Before I start this journey in Android I want to know if it is possible to connect to a specific network SSID when an app is active and restore the previous network settings when exit the app or when the device go sleep.
The reason I want to this:
An app for a specific device that can be reachable via adhoc
connection;
No need to hook into an existing network (adhoc device needs no
config), so user friendly;
The app can use the all of the features of WIFI;
Device is isolated from the internet and provides own network
The idea:
The app discovers the available WIFI-networks when no device is
configurated yet;
The device can be found via an SSID prefix, for example 'umix_' and user can select the unique correct name after the prefix, for example: 123456 (= umix_123456);
Once successfully connected, this name will be used to connect;
User can use the device via WIFI;
When exit the app or device go to sleep it reconnects to previous network;
When the app is active on wake up, it reconnects to the device it's network.
Maybe the described behaviour looks like a bluetooth connection, however, it is not because it is WIFI, better bandwidth for example and server facilities. However, the easy of use for it's user is similar to bluetooth, I want to achieve this.
Because I cannot find any info on this on the net, I ask it here. Is what I want possible anyway? Any directions, links, code examples?

Sync between two devices without Internet connection: Is it possible?

My coursework requirement is to build an Android application that lists all available mobile devices within close proximity. None of the devices have access to the internet.
To make things easier, the assumption is that all devices have my application installed.
When user first installs my app, they must define a user name and upload a profile picture.
When they launch my app, it should display the following profile info about other devices nearby:
User Name Profile picture
Now, I know this is an open ended question, but I'm totally stumped and need some guidance.
Specifically, I find these points challenging:
How to establish communication between devices/my app without internet?
How to retrieve other devices' profile picture without having to store everything locally on the device
I did some research and found Wi-Fi Peer to Peer, but not sure if this will be suitable for my use case as I don't have internet access. Bluetooth is another option but I think devices would have to be paired first before exchanging data.
You can starting Wifi hotspot with name like "YourAppName".
And create simple brodcasting this data inside this network.
So:
user opens your app and registering;
your application, checks if there is WIFI "YourAppName".
if NO, your app start hot spot "YourAppName".
if YES, your app promt user to connect to this network.
If connection successfully established, you will need to think how to transmit the list of data to your app, and represent it to user
Hope that this steps will helps you! Good luck

How to automate changing of settings on Android via script or app

Is it possible to push content such as SSID and password of a certain wi-fi network via a script, or an app that can be launched from the Android device?
I was issued to pre-configure approx. 500 tablets with certain Apps and features, one of them being setting a password for a specific SSID.
The purpose of this is that when the users of the Android tablets at the conference turn them on for the first time they would be immediately connected to the internet and have access to the content regarding the conference.
I really wish such possibility exists, so I won't have to manually configure every device.
Thank you for any constructive comments :)

Categories

Resources