Eddystone + Google Beacon Platform - google-chrome

I am following the video from the google keynote (https://www.youtube.com/watch?v=3nYyApSiSLQ). I also have the same beacon in the demo (iBKS 105) and managed to provision it to serve UID. By using Google's Beacon Tools, I am able to detect and register the beacon in Google Beacon Dashboard and add in my attachments and URLs.
However, the moment I am done with the procedure, I am not able to see any nearby messages/notifications on my device. The guy who presented the demo did it with ease and I am wondering where I went wrong. What a I missing? I have done pretty much what the guy told in his keynote.
I have tried serving for Eddystone URL and successfully broadcasted the URL. I would really like to get the UID to work also.

I'm the guy in the video who did it with ease.
App-free solutions work with -UID, -EID, -TLM, -URL. On Android, you don't need an app to make your beacons useful.
If you do have an app, be sure to use Nearby Messages so that you get the most efficient possible scanning. (Also, no bluetooth permission required -- only location.)
The TLM frame will provide things like low battery alerts on the dashboard. You don't need an app to see these; the battery level is reported to the service with any Nearby request (including for Nearby Notifications).
Choose an interleaving ratio of -UID to -TLM of about 10:1, depending on how much traffic you're expecting your beacon to get. (If it's in a busy place, and you only want updates once/wk, you can go much less frequently than 10:1 with your -TLM frame.)
There was a question about iOS. There's a Nearby Messages Cocoapod that you can use with your iOS app just here. There's currently no equivalent to Nearby Notifications on iOS.
HTH!

Related

Upload from offline HTML5 app when network available

Wow, my problem seems like it must be so common that I must just be missing something really obvious but here goes:
Is there any way to trigger/schedule a dormant offline HTML5 app to run either:
when network comes available,
or regularly.
I want to create an offline HTML5 app that will record details of a delivery (item description, recipient's name, photo, timestamp, etc). The data will be written to local storage (the photo converted to base64). If the app has network then the delivery data will be uploaded to a remote server. If the app does not have network then, even if the user powers the device down, next time the device is up and has network, I need the app to do the upload without any action by the user.
I've searched and found nothing. I'm guessing that offline apps only get run-time when in the foreground? If someone could confirm that then that would at least be good to know, even if it's not what I'd like to hear.
Thanks
Background sync, exactly what I was after (although in 2016 it was Chrome-only):
https://developers.google.com/web/updates/2015/12/background-sync

Getting the location of a user in AS3/Air app for mobile devices

I have an native app that I would like to store the location (just country would be fine) of where a user that logs into my app is from so I can customise some features for them.
I am using PHP as the backend. I have done some searching but nothing definitive found. Not sure how to get the IP of the device to be able to translate that to a location.
Thanks
I had to do this for my previous project. Best bet is not to rely on IP address, especially on mobile devices (my phone's IP currently has me somewhere in northern Utah when I'm actually in Phoenix). Use the GeoLocation API. That will give you the latitude, longitude position of a user which is generally fairly accurate. You can then use a GeoCoding service to determine what country they are in using reverse-geocoding. Google's GeoCoding API is fantastic and their terms were recently (April-ish) relaxed substantially making it much easier to use. I can also recommend Nominatim from OpenStreetMaps (their terms are pretty restrictive, but you can use MapQuest's Nominatim service which is pretty much free to be used however you want)
EDIT: As Pier mentioned, an ANE is required to use NetworkInfo on mobile. If you attempt to use it on mobile without the ANE, it will crash your app.
If you are set on using IPs, however, you can obtain it through the NetworkInfo class. NetworkInfo.networkInfo.findInterfaces() will give you a bunch of NetworkInterface objects. You'll be looking for InterfaceAddress. I do warn you, however, I have had difficulty in the past getting this method to work on mobile, especially iOS. Additionally, I cannot remember if it returns the network IP (i.e. 192.168.1.17) or the actual IP that is connected to the web. The local IP will obviously do you no good.
Did you look on http://www.ip2location.com/
You can use it in you php backend to translate ip to address
I would use geolocation if I were you. if its a mobile device you can use gps or cell tower (less accurate) to get their location, but if thats not an option for you and you dont have the capability of using a server-side technology like php, asp, etc. to get the ip easily, maybe this post will help: How to find the ip address in as3?

geolocation showing wrong location in google map

When I use http://html5demos.com/geo to locate myself, it shows wrong location(wrong city) in FF and chrome. Any reason why this is happening
I had the same problem using Chrome on Windows, but I got it to work, at least some of the time.
I was also using the example http://html5demos.com/geo
The location was not just inaccurate, it was also in the wrong city.
I tried the same example on my iPad (Safari) and there the location was correct. My iPad is using the same WiFi network as my PC, so I then knew it was not a problem with my ISP returning the wrong location, it was to do with the browser on my PC.
I got it to show the correct location in Chrome by going into the Chrome settings and clearing the cache and cookies.
It wasn't sufficient to just select in Chrome "Tools/Clear Browsing Data/Cookies & Cache",
it was only after in Chrome I selected "Settings/Privacy/Content Settings/All Cookies and Site Data" and deleting all cookies, did the example show the correct location.
Update 1: I tried the same geolocation example the next day, and to my annoyance it was again showing the wrong city. I tried to get it to work by clearing the Chrome settings as described above and this time this solution didn't work. However, when I used the application CCleaner and selected Cleaner/Applications and cleared all of the Chrome data (internet cache, internet history, cookies and session) the geo example showed the correct location. I'm using the latest version of Chrome. Hopefully in future versions it will work more consistently.
Update 2: I tried the procedure above at a later date and couldn't get it to produce the correct location at all. It could be that the geolocation is now returning the location of my internet service provider, rather than my location, using my IP and Google Location Services. Of course this location is fairly useless. The reason why my iPad is returning the correct location is probably because it contains an inbuilt GPS. The iPad 3G / 4G have a GPS chip built in to the GSM receiver chip, whereas WiFi only models have no GPS. When 'location services' are switched off in the iPad settings, location via both GPS and IP are switched off. It would be useful just to be able to switch off the GPS on my iPad and just use IP location, but I'm not sure if that is possible.
Update 3. As I mentioned, I'm using a WiFi stick in my PC. I have noticed that when I look at the available WiFi networks (with View Available Wireless Networks) and mine is the only network, the geolocation example returns a location in a different city, but if any of my neighbours have a WiFi network in range of my PC, the geolocation example returns my exact location, to within a few metres. i.e. the geolocation in the browser is clever enough to use this extra information to locate me.
(I think the other answers to this question completely on the wrong track. The questioner states that the location was being shown in the wrong city, so the question is not to do with the location accuracy)
Different devices have different degrees of accuracy and it is important that your application be aware of the difference. A cell phone that has a GPS unit inside of it that is switched on is usually accurate within three meters. A cell phone without a GPS unit, with the GPS unit switched off to maximize battery, or at a location where the GPS can’t contact the GPS satellites will have to use cell tower triangulation to estimate the users location and is typically accurate within 3000 meters which is accurate enough to know what neighborhood the user is in but completely useless to tell them what building they are looking at.
If the user is accessing your site from a computer connected to a land-based broadband connection it can usually pinpoint the precise address by consulting a provider database and pinpointing the exact address from the DSL or cable provider.
To get the accuracy of the location information, you can query the accuracy property on the coords object. The accuracy property isn’t exact by any means but it will give your application a good sense as to whether or not you have a nearly precise position or a neighborhood.
According to the Firefox geolocation FAQ, Firefox uses Google for location services. It sends Google the following information:
Your IP address
Information about nearby Wi-Fi access points
A random Google-assigned identifier (changed weekly)
I assume it will also use GPS data if your computer has a receiver installed, but the FAQ doesn't mention that. Maybe because there's no need to use Google's sever if you have GPS data available.
I assume that Chrome, as a Google product, is using the same geolocation database.
As for why you're getting incorrect answers, that would reside in Google's database. There are most definitely errors in there. For instance, my office computer shows up in Mexico city even though my IP address and the IP address of my employer's proxy server are both in Plano, Texas, and all other IP-to-location databases have this correct (taken from the registered whois data for the address.)
Here are two Google pages that they claim will help, although they haven't done a thing for me yet:
https://support.google.com/websearch/answer/873
https://support.google.com/websearch/contact/ip
The latter (contact/ip) is a form for reporting Google location problems that manifest as Google redirecting you to the wrong country's home page. They say it may take over a month to correct the database. I've been waiting nearly two months with no luck.
There are Firefox add-ons that can be used to force your browser to report a specific location. They're meant for debugging location-aware web services, but they could also be used in a case like this, where the normal method isn't working.
I think if you could user the the method watchPosition() instead of getCurrentPosition() the coordinates will be updated too much which will produce a better result
note : it's better to use another browser other than chrome it doesn't support the watchPosition() method good enough
I figured it out. Every mobile phone has its location mode default to High Accuracy. High Accuracy uses GPS, Wi-Fi, Bluetooth, or mobile Networks to determine location.
This might be a challenge as there are many variables to getting a device's location.
The solution will be to change the location mode from High Accuracy, to Device only or GPS only.
Device only or GPS only is supposed to use just GPS and device sensors to determine location. I have tried it, it works like a charm.
Use link below to change Location mode
https://www.verizon.com/support/knowledge-base-106080/
I depends on which method is used to get your location. If it uses IP then you could show up pretty much anywhere. If it uses Wifi then it might be just be biased data.

Is there an API to maintain business locations in Google Places?

Is there any way to add a business with complete information (with address, geospatial location, categories, trading hours etc) to Google Places in a programmatic fashion?
We want to add new franchises to a listing of stores. Manual changes are too brittle, the bulk upload takes a long time to be confirmed and the standard Places API has only a very limited method on it. Am I missing something or is there no support for managing your own store listings via an API?
I don't think you're missing anything at this time. Support for that sort of thing is currently limited to what's documented at the link you provide, I believe.
The Places stuff is in the odd grey area where Google is kind of pushing it and promoting it, but also saying that it's just in Labs, it's just experimental, etc., so it may not have all the features you need.
There might be other ways to get your businesses into Google Maps, if your concern is Google Maps generally and not the Google Places stuff specifically. If they exist, they may have more fully featured API capabilities for updates. Or this might be a big dead end.
If this issue is closer to a big annoyance instead of a total dealbreaker, then the approach I'd recommend, if you can wait long enough, would be to implement what you can in the existing API, and keep an eye on the API docs to see if they add more capabilities in the coming months. Open a feature request for Places API in the issue tracker and maybe keep an eye on other features requests there, especially issue 2431.

developing location/map based web site

I wanna start developing a map-based web site.
At first I ordered a regulat Gps device just to test the site, later on I would like to use Iphone's gps and other cell devices.
So I need something pretty generic.
I searched the web for map-based development framework and come up with too many of them :
Geo server, Map server, Open layers, Geoext , Google maps's api , and more.
I'm not a seasoned web developr (more of a c++ kind of guy) so I need something pretty straightforward , though robust at the same time.
Moreover, I need one which is free, and won't have licensing problem down the road.
At first I just need basic capabilities as displaying the gps data on my web site in real-time.
Can someone experienced recommend one ?
Thanks
Client
I'd go with OpenLayers - this is an opensource JavaScript client library, similar to the Google Maps API, or Bing API. However OpenLayers will free you of any licensing worries, or changing APIs as the source is available and can be modified - this is not the case with the Google/Bing/Yahoo APIs. You can however use the data from these services as layers in OpenLayers and drop them if they suddenly become filled with adverts or have commercial restrictions.
Have a look at examples to see if there is one you can use to make your first test application - http://openlayers.org/dev/examples/
GeoExtJS is a collection of extra tools and widgets that work with OpenLayers, built on top of another JavaScript framework ExtJS - also open source. ExtJS is mainly used for building user interfaces - data entry forms, grids etc. using JavaScript, to display in the browser.
If you are looking for tree structures to switch layers on and off and other more advanced UI widgets then GeoExtJS is worth looking into.
Server
If you are only displaying points then you can create dynamic KML or GeoJSON on your web server and reference this in OpenLayers. There are libraries in all languages that you can build on. Python has become a key languages in geospatial technologies, and has GeoJSON libraries you could script with.
GeoServer and MapServer are both server-side programs that allow you to serve out spatial data from databases with symbology, labelling etc. If you are having lots of different datasets then its worth spending time setting this up.
MapServer is written in C++ so it is probably easier for you to try this - however you may be able to get away without needing any specialist server side software, especially if your data consists of X,Y / Lon,Lat values that can be easily plotted as points.
For the beginning (you said that you need to show gps position in a real time) I think that Google Maps are good option here. This solution has very simple API and community support is also an advantage here (I've never compared with something else but I have good experince with GMaps and its tutorials/resources). This is for the client side, for server side any web framework should do the work (I use Django and it also have dupport for some geo things - mentioned later in this answer).
You need probably to build application that follows this rules:
Your GPS device sends data to your server(web application) periodically, data is stored in a db.
Users use browser to display data with map (eg. Google Map) which updates position periodicaly on some scheduled interval (eg. ajax calls to the server for the most current position). Each time response is recieved map need to be updated.
I don't know if there are more specialized solutions for this case.
If you need to improve your application and add some features you need to consider some more sophisticated geo frameworks. I have heard some positive opinions on GeoDjango, mainly because it can be easily incorporated with Django(which is very easy web framework to learn and it has a lot of capabilities).
All technologies I mentioned here are free.
I can recommend using the Google Maps API to render your maps in a browser. You can find my reasons in this answer.
The current version of the API has support for getting geo-location information for mobile devices.
I use Bing Maps for mobile. Mainly because its fast, and provides much better looking maps, 3d models, and satellite views for the UK than Google maps does.
I have also had issues with Google changing their service to provide some enhancements and it breaking my app, where at least with the Bing API theres a bit more compatability considered for existing apps. Not that I dont like the Google maps, I do. Its a backup service for me..
I generate maps from both providers, Bing as the primary, Goole secondary... this means that if ones offline of not working, which happens, my users still get to use my app.
Heres a link to Bing Maps Dev on a WIndows Phone for example
I'd take a look at Cloudmade. They have a number of API's, free options, paid options and use OpenStreetMap which for many places is one of the most accurate mapping solutions out there.
free , open source:
www.openstreetmap.org,
u can build ur own server as well using the same technolgogy:
http://weait.com/content/build-your-own-openstreetmap-server
API: http://wiki.openstreetmap.org/wiki/OpenLayers
Although its still in draft form, HTML5 will be supporting Geolocation API. Most major browsers and hand held devices should be supporting it in the near future and should make life a lot easier for developers who want a service independent solution. You would however still need a mapping service like google maps if you need to display locations.
function showMap(position) {
// Show a map centered at (position.coords.latitude, position.coords.longitude)
}
// One-shot position request.
navigator.geolocation.getCurrentPosition(showMap);
EDIT:
Its already supported in several major browsers:
Mozilla Firefox: supported in Firefox
3.5 and later versions.
Chrome: Supports thru Google Gears
Geolocation API
Opera: Supported in
nightly builds
Safari: Support is
coming soon in the IPhone’s Safari
browser.
Internet Explorer:
experimental support available from
IE8.