I created BlueService.java, from which I was able to get the Bluetooth name of the Bluetooth connected device. How can I pass the name to my MainActivity.
Related
During the Account Linking of our app with Google Assistant, we authenticate the user by mapping its WAN IP Address.
Once Webhooks intents are received, they are coming from Google cloud, not the user device, so the WAN IP doesn't match. It's then impossible to know if the user is still at home.
It seems there are ways of obtaining user and device identity, like name or device location. Is there a way of obtaining the device WAN IP address?
(à la x-forwarded-for).
In short - no.
The Assistant platform is meant to allow users to, somewhat transparently, move from device to device. The device ID isn't even standard.
If you need to know their location to make sure they haven't moved, then you can ask for their physical location. For speaker devices, such as the Home, it will use the device location that was set by the user, but for mobile devices it will use the GPS.
I need to find a way to give any id or something for each phone so i can use the database information under this id.
For example:
Device #45875 made a change.
\
Find in db id 45875 and change firstname to Bob.
To get id for a phone you can use UUID from the device plugin which
will give you a Universally Unique Identifier, you can check the
plugin details here. The details of how a UUID is generated are
determined by the device manufacturer and are specific to the
device's platform or model.
Also you can use the Unique Device ID plugin this one will
remain the same even if the user uninstall the app, This plugin
requires sim permissions. The id is generated by a combination of
the following:
Secure.ANDROID_ID: according to the android docs, this is stable over the whole livetime of a device
TelephonyManager.getDeviceId(): should be stable
TelephonyManager.getSimSerialNumber): depends on the SIM currently plugged to the device --> unstable
You can also use the sim plugin to get the deviceId for
example, the IMEI for GSM and the MEID or ESN for CDMA phones, you
will also need to have sim permissions to use it. It won't work on
devices without a sim card.
Just generate a GUID on first install and save it locally (e.g. using Ionic Storage). You can then send this identifier to your backend and create a "device" with this ID. You then use it in all communication between your app and the backend.
If you users log in to any account, like Facebook, Twitter, etc, connect this to the "device id". This way you can also have multiple devices connected to the same accounts etc.
I am developing an application which allow get information from bluetooth device (Smart Watch Heart ). I want to display list device like:
Device Name - Device ID
Device Name - Device ID
Device Name - Device ID
How can i do that ? What is the characteristic or services I should to subscribe ?
We're deploying a Wifi hotspot service in some locations via unifi. You have to sign up with your mobile number and get an sms which includes the activation link.
The Problem is:
The iPhone seems to check the connectivity of a WLAN to the internet. So, after you sent your number, and before you clicked on the actvation Link, theres no Internet Connection (Basically it is, but youre not allowed to get outside of the Internal network until activation Link has been clicked).
The Iphone recognizes this and disables the WiFi, because it can't contact his "Testserver" - so you are on 3g again, and the activation Link isn't reachable anymore.
My Question:
Does anybody know to which IP the Iphone tries to connect before it deactivates WiFI?
So i could Whitelist this IP to be reachable without authentication, so the Iphone wouldnt disable Wifi by itself anymore.
I've tried to catch it up via wireshark, but i didnt see anything. :(
We have an app wherein certain functionality needs to work only when the user is connected to a router associated with his account (we have some information about user accounts and home routers).
However, it is possible for the user to set up a VPN connection to his home router via any public wifi/3g network. We want to block certain functionality if that is the case.
Any ideas as to how it can be detected using any of the existing iphone/ipad apis?
Thanks,
Hetal
There is a flag in the reachability API called kSCNetworkReachabilityFlagsTransientConnection.
It is true when you are connected via a VPN and false if you are not connected via a VPN.
We used this flag value to check for our conditions.
There's no iOS API (public at least) that is going to give you information on whether you're running on a home router or public WiFi connection. You can only determine that you're on a WiFi connection vs. 3G. (for example, see the Reachability sample)
You might be able to do some sort of lookup based on the device's current IP address. You'd have to have each user register their router's IP address and have your application validate it before running, etc. But still, there'd be no guarantee that user's home router is secured. In other words, it could be just as wide open as a public WiFi.