How do programmatically turn off GPS on a Blackberry - blackberry

Does anyone know how to programmatically turn off the Blackberry internal GPS receiver?

The best you can do is inform the system that your program is no longer interested in positions via the LocationListener interface:
locationProvider.setLocationListener(null, -1, -1, -1);
Access to the GPS is managed through JSR 179 which satisfies all location data requests and manages the GPS hardware to provide service.

Related

Can I detect that an iOS device has external GPS connected?

Is there any way to detect that an external GPS unit is connected to an iOS device (say running iOS 13)?
We're building a special-purpose app that really needs an external GPS to work well, and want to warn the user about accuracy issues if only the internal GPS is available.
(Of course, we could wait until inaccuracies occur, but by that time it's sort of too late.)
the only way I've been able to do it is to compute position updates per second. the internal gps is 1hz. The external gps that I connect to (garmin glo) is 10hz.
If anyone has a better solution I would like to know.

External NMEA GPS to Apple's CLLocation manager

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.

How to read Data form External GPS Accessory, like Dual XGPS 160 External GPS in iOS

How to read Data like Battery status, GPS Location Satellite Position etc, of Dual XGPS 160 External GPS Accessory in iOS just like Dual Status Tool App in Apple Store.
I have used ExternalAccessory.Framework which is used only for its connectivity check.
How can I read its logged data?
Most of GPS devices with BT connectivity can be connected with BT Serial Port profile, what I suppose you have already done. Usually, those devices are sending NMEA protocol messages with some frequency. You just need to parse this strings and extract required data.
https://en.wikipedia.org/wiki/NMEA_0183
For information about extra features like saved tracks etc. you should check device / device chipset documentation.

In ios, is it possible to know if the GPS location is not being updated?

I'm creating an app that allows the user to navigate with a map when offline (no internet connection or wifi available), and I want to let the user know if the gps location not being updated. I know I can get the last updated location timestamp and the accuracy, but is it possible to know if the gps has no reception?
No, there's no public interface for finding out about the state of specific location hardware such as the GPS receiver.
The Location Manager abstracts all that away, so that developers can get location and accuracy information without worrying about whether the device used GPS, Wifi, iBeacons, cell tower locations, Loran-C, celestial navigation, etc. to determine the location. This is generally a very good thing because it means that your apps work on all devices regardless of whether they have GPS, and will continue to work (and maybe even work better) on new devices that might use other technology. But it also means that you don't get to ask the question "is the device receiving a GPS signal right now?"
Is it possible to know if the GPS location is not being updated?
No. It doesn't seem possible given the available API.
There are a few things about GPS to consider, if you haven't already. It is technically possible to receive a location update from CLLocationManager when you're "offline" but it will depend on several things:
If your device actually has GPS hardware. Some don't.
If you have line of sight to GPS satellites. There's a difference between GPS and A-GPS
Those true GPS updates will come much less frequently because of the way GPS works, but it should work.
... but is it possible to know if the gps has no reception
Based on the way GPS works (as best I understand it) you either turn the radio on/off (-startUpdatingLocation/-stopUpdatingLocation) with the Location Services API and you either get locations more frequently with A-GPS or infrequently with pure GPS when you don't have a network signal. I don't think the Location Services API has a way of telling you "I don't have a GPS signal at all."

Is it possible to get GPS information in a mobile device through APIs without having any GPRS connectivity?

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.

Resources