Toggling bluetooth on/off - blackberry

Can an app toggle bluetooth on/off without prompting the user? Can an app read the list of the ids of nearby discoverable devices? If so, which function returns such a list? This is in the context of blackberry devices.
Thanks!

No. It is not possable (through the API) for a third party application to turn on BlueTooth. The best that you can do is open a BlueTooth connection is a way that will prompt the user to turn it on if it isn't already.
In general, the BlackBerry OS won't let third party applications do things behind the user's back that could compromise data security.

Related

If my iOS app pairs with a device using Core Bluetooth, will other apps have access to the device?

From Android documentation:
Caution: When a user pairs their device with another device using BLE, the data that's communicated between the two devices is accessible to all apps on the user's device.
For this reason, if your app captures sensitive data, you should implement app-layer security to protect the privacy of that data.
Is this also true for iOS? I haven't found anything on it and I assumed because iOS doesn't show the true MAC addresses of devices this wouldn't be an issue, but just wanted to check. Thanks
Yes, iOS also works in a similar way. And if you want private communication, you also need to maintain app layer security. Thus android wear, galaxy watch, and other similar devices use encrypted communication in the app layer.
If you already know the details. BLE communication works via Gatt Characteristics.
Consider there are two health applications running on an iOS device and the user also using an activity tracker device. In that case if the user wants to connect both of the health apps with that tracker, he certainly can do it. Both apps will be able to communicate with the activity tracker and get sensor data using the CBCentral module. Look at the diagram for Details.
On the other hand, In general, vice versa will not possible. Because if both iOS apps use Peripheral Role they will register two different instances of BLE-Service even if using the same UUID. Thus it will force two apps to communicate with completely different characteristics instances. However, it is also possible to work with two peripheral apps with the same UUID but this is not what the BLE developers ever wanted.
you need to provide app level security based on Service UUID, so that devices having the app with only same service UUID can connect.

IOS Porting from Android

I have a working Android app that I'd like to port to IOS. I've started working through the Apple API references and am hopeful I can get some quick assistance.
Based on a specific time of day, I'd like to ideally toggle airplane mode so that the user cannot send or receive emails or calls. I appreciate that this can only be accomplished using private APIs which I want to avoid. As such, what other options are available to mimic the end result as closely as possible? Could the app turn off all notifications, or turn the screen off, or set brightness to zero, or disable the pop-up keyboard.
Knowing that Apple has locked down system wide settings, is there another creative idea that could I could employ?
No. Apple does not allow 3rd party apps to alter global settings like Airplane mode. Apps operate in a very limited "sandbox" where they have very limited access to system resources.
What you describe is not possible unless your app is running on a jailbroken (rooted, in Android terms) device.

Is it possible to create an app that "picks up" a particular wifi signal as a cue to turn on the app or blue tooth?

You know how when you go into your wifi signal page
you see a list of all the wifi your phone is currently picking up?
If a person were to download this special app where he or she consent to it
is it possible for this app to recognize one of the signals as a cue to turn on bluetooth or launch an app?
No this isn't possible without jailbreaking since it requires a private library (Apple80211). You can only get the SSID of the network your device is currently connected to.

Can you communicate with nearby devices using a website?

Can a website help a user communicate with nearby devices via bluetooth/WLAN without downloading software?
User requests that something be done on their device (which could be, for example a wirelessly connected printer or a bluetooth keyboard).
The site, which contains a repository of relevant actions, sends specific instructions for that device to the user's own machine.
Those instructions are then relayed to the correct device (with the user's permission) via the user's device's WLAN or existing bluetooth connection.
Part 3 is what I'm not sure of - is there a mechanism by which a website can contribute to a wireless/bluetooth connection held locally?
It is not possible. User browser can't interact with hardware for wireless networking.
You should force user to install some custom software to do this.
You would have to submit the "commands" first, then have the device make requests to the website server, i.e., check for any pending "commands" for the device, and then process them locally. A website is not "thing" that can directly interface with a hardware device.

About wifi scanning in iOS

I'm wondering if it's possible to scan wifi networking nearby like what WiFi Map did?
And in this application, it can even provide password of the wifi hotspot. Is it legal and what kind of technology is used?
I do not think this App use IOS technology to scan wifi and offer dynamic password.
In IOS,with public API,you even cannot scan available wifi nearby.
So,I think the Technology of this app is:
At first, they offer some public wifi and passowrd.
Then user use this app,and they choose to share about connected wifi.So,that the database of this app became bigger and bigger.

Resources