Search code examples
c#xamluwpbackground-processwindows-10-universal

Run my app when connected to a particular wifi


Many Wi-Fi hotspots these days have a "web login", especially free ones. You know, the ones that redirect any HTTP request to their login form. Windows 10 first connect to network then opens up the login page of the network where we fill our credentials and then it let us access the internet. Now I am creating a UWP app that runs when connected to a particular network and instead of opening my browser the app takes user credentials once and automatically login for user and user can access the internet . Now how do I open my app whenever the user connects to the network and instead of opening up the app I would like it to show my app toast notification just like alarm app giving the option of snooze or dismiss but instead I would like to give the option of Login or Logout.

The alarm app

If possible where should I get started and is there a sample available? Thanks in advance


Solution

  • This question is actually a duplicate to Event Triggered Toast Notification UWP. Short answer - you can't launch an app without user interaction. You need the user to click on your toast notification.