Hi,
I have a small android app which sends and receives a JSON message to a specific host. To be sure its connected to a right SSID name on wifi, I have implemented a scheduled runnable() which calls the connectToWifi() function (Implemented by wifiManager) every 2 seconds.
I want this background task to stay alive and shows a notification icon expressing the task is running in the background (icon and style are not important). The task must stay active until the user manually closes the application OR activate the option in notification icon to stop the connection. After the app is closed by the user either by notification option or manually closing the app, The particular wifi profile the app created at the start of the task must be removed so the system does not reconnect to the same WiFi anymore while the app is closed.
This task is urgent and needs to be done in less than 2 hours. We only look for java code, no the APK, I will send the current java file to the chosen freelancers.
PS: All of these are to keep the device connected to the particular WiFi. we have connectivity issue from Access Point side and need to force the android app to reconnect, otherwise due to the instability of current access point, android disconnects the wifi after few seconds which we do not want.