don/node-eddystone-beacon

Check for missing protocol in uri

Closed this issue · 2 comments

Thanks for the handy lib. One minor thing. I was unable to see a uri-beacon when the uri passed to advertise() was missing a valid protocol (http://). I used several apps designed to discover uri-beacons. It worked fine when a protocol was included.

uri="http://www.ex.com" //produces a uri-beacon that can be read by several apps
uri="www.ex.com" //fails to produce a uri-beacon that can be read by any apps I found

It seems that some form of beacon was created because I can see it using a ble scanner, but it appears not to be a valid uri-beacon. If a protocol is required in the uri string then maybe advertise() should throw an error if it is missing.

Hi!

I believe that this was fixed in 5c99a20.
Could you give it a try?

Cheers,
Patrick

@pgaubatz try it out looks good!

I've published version 0.3.2 to npm, it includes your changes :-)