6

I am a fairly new Android developer. One thing that I noticed is that when I walk near/inside a Starbucks store, my Android device shows the following:

enter image description here

Question:

  1. How does this UI render automatically onto my mobile device when I am near/inside the store?
  2. Does this UI appear because I have the Starbucks app installed on my phone? Does the app use a Network Broadcast Listener? Ex: If "Google Starbucks" Wi-Fi is detected in the area, does the app then show the UI as an Activity?
  3. Or, does the Starbucks Router broadcast a special Network Packet to Mobile Devices to force the Mobile Device to render this? If so, what is inside this Network Packet? I'd like to do the same.
jww
  • 97,681
  • 90
  • 411
  • 885
code
  • 5,294
  • 16
  • 62
  • 113
  • This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Android Enthusiasts Stack Exchange](http://android.stackexchange.com/) would be a better place to ask. – jww Apr 27 '15 at 02:41
  • *"Or, does the Starbucks Router broadcast a special Network Packet..."* - Its likely keyed on the [SSID](http://www.juniper.net/documentation/en_US/network-director1.5/topics/concept/wireless-ssid-bssid-essid.html), which can be forged. Auto-connecting to them can be risky business: [Security Flaw Lets Attackers Crash Any iPhone or iPad Within Wi-Fi Range](http://gizmodo.com/security-bug-lets-attackers-crash-any-iphone-or-ipad-wi-1699376518) – jww Apr 27 '15 at 03:05

1 Answers1

1

This isn't the Starbucks app, this is just your device detecting that an open network that you have connected to in the past is available, and requires authentication to access the internet. The Android OS automatically opens this window as it is directed by Starbucks' internet service.

WoogieNoogie
  • 1,258
  • 1
  • 11
  • 21
  • Oh ok so this isnt generated by the app. How does the OS know what to display? It seems the UI is an Android Activity. By starbucks internet service, is this a packet broadcasted by the Starbucks router to the mobile device? How can I mimic the same behavior with the router in my home? For ex, if my friend visits my house, can I render a UI on their phone "welcome to my house..." ? – code Apr 27 '15 at 02:03
  • It's a pretty normal protocol for any sort of "gated" access to an open network. Generally, the device pings a set server that it knows, and if it detects any sort of redirection, it will assume that access is blocked without logging in. The UI you are seeing is just a full screen webpage that the router serves anyone who connects to the open network. – WoogieNoogie Apr 27 '15 at 02:15
  • Oh ok. The ui that I saw appears outside of the web browser. And it launched itself without me having to open the browser. Does that mean it launched some kind of app with a webview inside it? How can I mimic this with my home router ? For example, if I have my own store/business, id like to push my custom UI to visitors browsers – code Apr 27 '15 at 02:36
  • @android-user You can monitor a virtual Geofence to give your app notifications when your users enters or exits a specified area of interest. Read more about this at the Android training site https://developer.android.com/training/location/geofencing.html – BrentM Apr 27 '15 at 02:56
  • Thanks Brent. Thats also what I thought as well. However in this case, the UI appears without an app installed and it appears even when the web browser isnt used. Any ideas how this was achieved without an app? – code Apr 27 '15 at 03:03
  • It's the Android OS doing it, not a specific app. All you need to do is set up your guest network to require some sort of authentication (not encryption, the network must be open) and when their device connects, it will act appropriately. Note that not all devices may act the same, but Apple computers do the same thing. – WoogieNoogie Apr 27 '15 at 04:17
  • Thank you WoogieNoogle. Yes I thought it was strange that this appeared even when I didn't have a web browser or app open. How can I trigger my own custom UI to mobile devices for my home router at home? For example, how can I show "Welcome" onto others devices when they see/connect to my network? Is there some special network packet that I need to send to the Android OS? – code Apr 27 '15 at 19:00
  • As long as you have a gated sort of login or "grant access" page before allowing anyone to access the internet, it should pop up on certain devices. Customizing that page is the key. – WoogieNoogie Apr 27 '15 at 22:52