Get GeoLocation in Xamarin.Forms when not conencted to Internet - xamarin

I am using Xam.Plugin.GeoLocator from here to get the geo location of a user in Xamarin.Forms project. This is working great when the device is connected to Internet. I need to capture the Lat/Long coordinates of the user when the device is not connected to Internet.
How can this be achieved?

As per comments above, The GeoLocator plugin returns what the OS supplies, so yes, if you have no cellular/wifi but the device does have a GPS connection, then that is what is returned. i.e. If you request a high/fine accuracy than the GPS might be used instead of Google's location services using the cellular or wifi connections even if they are available. Same basically for iOS, but using Apple location services.

Related

Web page beacon

I would like to send a BLE Eddystone beacon from a web page. My application requires to send SSID info to a BLE listener. My thought is to have a user load a URL on a smartphone that would run JS to send periodic BLE Eddystone-UID beacons with SSID info embedded. I need the web page to work on both Android and iOS phones. Is there a simple way to do this using Javascript?
I looked into physical web but it did not seem to provide this capability.
thanks,
Ian
The current version of the Web Bluetooth API specification allows websites, running in the Central role, to connect to remote GATT Servers over a BLE connection. What you're looking for is a way to run in the Server role to advertise your data.
In your case, I'd recommend you have a look at https://www.npmjs.com/package/#abandonware/bleno

Does Google nearby message API needs Internet connection to work?

Hi I want to create an app using google nearby message api. I want it to be completely offline.
Is it possible? Does google needs internet connection for using this Nearby api?
I know it uses bluetooth and WIFI things to share the data!
I want to know whether it needs internet connection at its initial stage? since it needs to retrieve some token from the cloud.
Help me in this!
Thanks in advance!
Yes, Nearby Messages requires devices to have internet access. Discovery is accomplished via BLE (Bluetooth Low Energy), WiFi, and audio (using near-ultrasonic frequencies), but the cloud is needed for message delivery after discovery. Nearby doesn't yet provide a pure peer-to-peer solution.

Windows does not answer BLE parameter update request

I have a custom embedded device with a Bluetooth low energy stack. The device is advertising itself until a connection is requested, I pair and connect to it via the Bluetooth menu in Windows 10, I can read/write to my custom GATT services using the following BLE GATT functions from the Win32 API.
For my application I need to receive high frequency data using notifications on a characteristic so I enable it using the same API as stated above and receive the correct data but too slow. The default connection parameters Windows is using is not enough and I want to update them so I can receive notification events at higher frequency, but Windows API does not provide such function. I had the same problem when connection to an Android phone, and I solved it by requesting connection parameters update from the device (the slave in the connection) and the Android phone accepted it and everything worked as expected.
The only problem is when I'm trying to ask for a connection parameter update from the device when connected to a Windows master, I don't receive any response (no accept nor reject), meanwhile I still receive notification events so I know the connection is still active. And the weird thing is that if I hold the device closer to the computer's Bluetooth antenna it does receive a response and update the connection parameters like intended.
Any idea what's going on? Is it a bug in Windows stack?
The fact that holding device closer to antenna helps should be verified. Try it multiple times in a different way.
You mentioned Android, does holding device further from Android also prevent connection parameters update?
If this proves true, I'd say the device is faulty. I would compare the behavior between different devices, better if they are from different manufacturers or at least models.

Determine if connection is on 3G or WIFI network

I would know if there is a way to determine if the application connected using 3G or WIFI network.
You're not going to be able to determine this on the server side only. The only thing you can check is the HTTP user agent, which will help you figure out the device. However a connection is just a connection, there's no way to determine how it is connected without the device telling you. If you are developing a local mobile application then you can either do different logic on the device or send additional information about the device's connection.

disconnect to wifi programmatically

Could I disconnect to wifi programmatically in Cocoa?
For the Mac, see the CoreWLAN Framework. Specifically the disassociate method of CWInterface. On the iPhone (since you tagged this cocoa-touch), I believe this operation is restricted (ie, no supported API exists for applications to configure network connectivity).

Resources