I want to get the current location using wi-fi on my Storm 2 9550. I have implemented LocationProvider and it is working fine on the simulator after sending lat long manually, but it doesn't work on the device.
GPS is already active on the device but to my knowledge BlackBerry GPS cannot get location without a Network Provider. There is no network provider on the device.
Related
If I would have a (custom made) external BT LE gps receiver (receiving NMEA GPS signals) that I would connect with bluetooth to an iOS device, would this automatically work with the CLLocation Manager services in all my Apps?
The BT LE connection is custom made hardware, is there any info of how to configure this to act like a iOS supported (MFi) GPS receiver?
Any tips or pointers much appreciated.
There is no way for your own custom made GPS to get integrated
with CLLocationManager unless you become a MFi vendor.
However, if you are targeting Jailbroken device, it's technically possible.
This is because BTStackGPS is integrated with the system so that we can use Apple's map application with non-MFi external NMEA bluetooth GPS. BTStack is open source and it's said that BTStackGPS runs on the BTStack. It supports BLE, too. Note BTStackGPS is not open source, so you need your own research on how to integrate your SW with the system.
I am new and I hope I am posting in the right section. I am developping an iOS app using indoor advertisement. The app scan fro iBeacons and when it detect one it sends a get request to the server which determine the position of the mobile device and send back a response. I found this text on the internet
Mobile-centric and network-centric technologies are different only in
where the data and/or logic resides for calculating the location of a
mobile device. For example, the American Museum of Natural History’s
original Explorer mobile wayfinding app used Cisco’s Mobility Services
Engine (MSE), which was a device that sat on the network and processed
the raw signal-strength data provided by the mobile device to
triangulate the location based on a map that was managed and stored in
the MSE. The new Explorer still uses triangulation to determine the
phone’s location. However, the map and beacon locations are downloaded
to the phone, and processing is done locally in the app.
Considering this text, in my use case I am using a network-centricsystem bacuase the location logic reside in the server. Is that true ? I thought that device-centric location is when the mobile device scan for beacons and network-centric is when the beacon send it's position to the nodes.
Beacons are devices that send signal all the time. Also mobile device is scanning for beacons all the time. Those things doesn't change based on technology. You are using network-centric technology. So what is the diffrence:
Mobile-centric
location is calculated on your phone
Network-centric
data is send to server which returns your location based on given data
Network-centric is often used when doing task on phone may:
drain too much energy
be not fast enough
I'd say that triangulation doesn't require server for calculations as is quite easy and you may notice, that waiting for server response may be not fast enough for displaying location to user.
In your case you're using a mobile-centric. Your mobile device is determining where it is at by using its physical distance to a an iBeacon. You have to tie a beacon to a location so you phone will say, "Ok, I see beacon 1 which I know is in Room A".
If you were going for network-centric, then the iBeacons would be telling the mobile device where it was. (even though this is not how iBeacons work but as an example) The beacon would be discovering the phone and saying, "Hey mobile device, you're in Room A".
So you see in the latter the network is telling the mobile device where it is, thus "network-centric". Where in the first case the mobile device is determine where it is, thus "mobile-centric". So even though you are pinging a server for the data associated with a location, the device is still telling the server where it is in physical space based on the proximity to a beacon.
When use Significant-Change Location Service it must use Wi-fi ? Without Wi-fi this service will work or not?
Theoretically it should work but location mechanism is a bit complicated in iOS.
iOS devices uses a system called aGPS. Which relies on combination of gps, cellular, wi-fi, geofencing etc. Wi-fi is the fastest location update option for the location manager since you can get your accurate-enough information immediately. GPS is the most accurate one but it takes couple of minutes to lock and determine your location if you changed your location a lot since the last lock on.
So maybe you had an impression that when wi-fi is disabled significant change location service doesn't work but actually it does. At least this is the expected behavior.
My application uses gps location, but the request fails (time out error) every time if I stay inside of the building but location gets refresh well when I refresh the location from device Location Settings option if I stay in building too.
Here is my code
Criteria myCriteria = new Criteria();
myCriteria.setCostAllowed(false);
LocationProvider myLocationProvider = LocationProvider.getInstance(myCriteria);
Location myLocation = myLocationProvider.getLocation(((int)timeOutInMiliseconds/1000));
lastLatitude = myLocation.getQualifiedCoordinates().getLatitude();
lastLongitude = myLocation.getQualifiedCoordinates().getLongitude();
lastAltitude = myLocation.getQualifiedCoordinates().getAltitude();
lastAccuracy = myLocation.getQualifiedCoordinates().getHorizontalAccuracy();
lastSpeed = myLocation.getSpeed();
Please advise.
Ali
When you set the cost setting to false (myCriteria.setCostAllowed(false);), you set the GPS mode to be autonomous (the below table was taken from Location based services development guide - Criteria mapping properties.
Autonomous mode relies on GPS satellites only (see more about GPS modes here).
This mode uses the GPS receiver on the BlackBerry device to retrieve location information. This mode cannot be used indoors or in close proximity to many physical obstructions, and it can take several minutes to fully synchronize with four or more satellites for the first GPS fix.
That's the reason why your request fails. Try using other GPS modes: assisted or cellsite.
Assisted mode
Assisted mode relies on GPS satellites and servers on the wireless network. This mode uses the wireless network to retrieve satellite information. This mode can achieve a fast retrieval of the first GPS fix.
For assisted mode use this snippet (it is worth noting that there are several assisted modes):
Criteria myCriteria = new Criteria();
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_MEDIUM);
myCriteria.setHorizontalAccuracy(100);
myCriteria.setVerticalAccuracy(100);
myCriteria.setCostAllowed(true);
Cellsite mode
Cellsite mode relies on the geolocation service, or the wireless network to provide the location information of the current base station. This mode uses the wireless network to achieve the first GPS fix, and is generally considered the fastest mode. This mode does not provide BlackBerry device tracking information such as the speed and the bearing.
For cellsite mode use this snippet:
Criteria myCriteria = new Criteria();
myCriteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
myCriteria.setHorizontalAccuracy(Criteria.NO_REQUIREMENT);
myCriteria.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
myCriteria.setCostAllowed(true);
Is it possible to get GPS information in a mobile device through APIs without having any GPRS connectivity?
Edited
Yes, for example on the Java ME platform or Apple iPhone
Yes; if you are on a device that has GPS hardware in it and software development on the device gives you access to that hardware from your software.
This can be using a built in API for opening a COM port. You then just need to open the port that has the GPS hardware connected to (internal GPS receivers inside the device are often connected to a fixed COM port number) start interpreting the (often) NMEA strings that the GPS receiver is sending out.
Or perhaps the device has more specific GPS related APIs, like the GPS intermediate driver in Windows Mobile 5+ that lets the OS talk to any GPS receiver (either built in, or connected via cable or bluetooth to a COM port) and lets multiple applications concurrently interact with the GPS data.
P.S.
GPS has nothing to do with GPRS per se. You might have gotten that idea because of A-GPS which uses telecom network information and/or a dataconnection (like GPRS, EDGE, UMTS, WLAN, whatever) to download a small file with information about the location of GPS satellites.
This data will then enable your device shorter GPS aquisition times within the time period that this retrieved data is current - often a couple of days to a week I believe - because it does not just need to see what GPS signals it can receive and make sense of that, but it has a lot of prior knowledge about the GPS constellation that should be in orbit in the part of the sky you can see.
GPRS is a two-way data transmission which enables you to access the iternet while the GPS is just a receiver and as peSHIr already mentioned it has nothing to do with GPRS. GPS receiver receives the signals from multiple satellites and calculates the location from time differences.
Anyway... you need GPRS or any other internet connection only if you want to use any web service for reverse geolocation or you want to use google maps or any other location service. But just for receiving (calculating) the coordinates GPS by itself is enough.