Launching a Webpage

Hello all,

I’m working on developing an app for my company that will take a user to a beacon specific website upon entering the range of that beacon while the app is active.

I feel like this is something that should be relatively simple to achieve, however I’m having trouble figuring it out.

For reference, I’ve downloaded the “Proximity Content for Multiple Beacons” template and am using that with three beacons. The three beacons that I’m using are all going to be within 20m of each other, so the app will have to work only in immediate proximity.

Any help is appreciated!

You’ll surely need a UIWebView to show the web page, and then you can steer it either:

(a) using the ProximityContentManager. You’ll likely need to create your own BeaconContentFactory, instead of relying on the default EstimoteCloudBeaconDetails. The latter just downloads beacon data from Estimote Cloud, and you will instead need to fetch the URL associated with the beacon. This could be either your own backend, or you can just hardcode the values into the factory—e.g., “if minor == 1 then url = ‘https://github.com’ else if minor == 2 then url = ‘https://parse.com’” etc.

(b) using the NearestBeaconManager. This one just tells you when you move from one beacon to another, and then you can react accordingly, e.g., by change the web page shown in the web view. Basically, it’s the ProximityContentManager, but stripped down from automatic content-fetching (via the factory) mechanism.

All in all, it’s probably best to start with learning more about the UIWebView (: There’s a ton of guides for that on the Internet already, so I’ll just defer to that.


If all of this sounds a bit overwhelming, you can try using some ready-made beacon content management system, although I’m not sure which of them support entire web pages. Here’s a short list, you might want to go through this and check if any one would come in handy:

Rover
Pushmote
Bleesk
PencilCase


And finally, I’ll just mention Eddystone-URL. It’s a beacon protocol which uses short URLs instead of identifiers in the advertising packet. Chrome on iOS already supports it, in form of a “Today view” widget, so you might want to evaluate that too. Read more on our blog:

Thanks for your response! I’ll definitely take a look at some of the ready-mades that you mentioned, as they’re trying to get an app out ASAP for testing purposes, and then we’ll decide where to go from there.

I’ll also check into the UIWebView that you mentioned, as I think it will do what I want. Just have to make it work now.

Cheers!

1 Like