This app was mentioned in 3 comments, with an average of 1.00 upvote
Looks like this might do what you want.
https://play.google.com/store/apps/details?id=com.hogdex.WifiRuler&hl=en
> Description
> A Wi-Fi manager that can do all the regular stuff plus:
> * Automatically connect to open access points as you walk by * Skip "open" access points that are actually paywalls * You can set connect priorities * Differentiate between multiple access points all called "linksys" or "dlink", etc * When connected will automatically check your connection (or say OK to click wall if that rule is set) * Option to exit with or without Wi-Fi enabled * Plays nice with access points you already have setup
I'm pretty sure Tasker can't handle this for you. Someone please correct me if that's not the case.
He said public WiFi, if it is not secure, it doesn't have an password and therefore you cannot forget it.
I have no idea why it is connecting anyway.
Try Wifi Ruler and set your university WiFi closed/dead so it will never be used.
Why write something when you can use something that already exists?
https://play.google.com/store/apps/details?id=com.hogdex.WifiRuler&feature=search_result
Keep the $5 and get yourself a decent android next time (Nexus > All)