Since the latest update (I think some time in December 2022), the built-in camera app on my Samsung Galaxy S21 asks for "Nearby devices" permission, and refuses to run if I don't grant it. By "Nearby devices" it means "Bluetooth". I don't know why it calls the permission
"Nearby devices": all other references to Bluetooth call it "Bluetooth",
and you can also access a nearby device using Wi-Fi or even NFC if the device
is close enough.
It doesn't actually need Bluetooth to take photographs, or even to record movies,
but you might have a Bluetooth microphone (I don't) and you might want to use
it to get better sound quality when recording a movie.
Of course the Android best practice advice at
https://developer.android.com/guide/topics/permissions/overview
is not to ask for runtime permissions unless and until you need them,
but Samsung aren't doing that.
I don't want the camera app to announce my presence by probing the Bluetooth headset of
anyone who happens to be near me, and they might regard such an action as intrusive.
So I don't want to give the camera app its nearby devices permission, but it won't
run at all without it.
So how do I get the camera app to run without accessing Bluetooth?
I found some workarounds for this. If your device supports it, you can download Expert Raw from the Galaxy Store. This will take still photos without requiring "Nearby devices" permission. However it doesn't seem to be able to do selfies because there seems to be no way to switch cameras, and it can't do movies or many of the extra tricks that the full camera app can do.
Another option is to run the camera app with Bluetooth disabled. Then it can have its "Nearby devices" permission, but it can't use it. The problem with this is that if you use Bluetooth at other times you have to remember to disable it and enable it.
So I wrote a tiny app which disables Bluetooth, runs the camera app, and restores the previous enabled or disabled state of Bluetooth when the camera app exits. I put this on my home screen instead of the camera app: it has the same icon. You have to remember to exit properly from the camera app using the Back button: the Home or Recents buttons leave my app and the camera app sitting on the task's back stack, so my app doesn't get to run and restore the Bluetooth state.
The app is available on github here in case anyone else wants to use this solution.
Related
When configuring my baby camera, I just needed to press a button on the camera, and then my Android phone detected the camera, after which I could configure the camera with my Wifi settings.
I want to do something simular with a hobby project, but I have no idea how this works. How does the camera communicate with my phone? I wasn't asked to enable my Bluetooth, but it was enabled, so maybe it's using Bluetooth, but I don't think so.
Is there any other way, besides Bluetooth, to do this?
I bought a cheap bluetooth smartwatch that costed like $20.
When I plug it into my computer, I cannot see the device listed. I cannot think of any other way to access the source code.
The reason I am trying to get at the source code is to add a few of my own watch faces and try to create my own features.
Any help?
I guess under "plug in" you meant you've plugged it in the USB charging port. Most probably communications are disabled there by a default and the port is in charging only mode.
Try to pair it with your laptop via Bluetooth first, then try to access your watches as a bluetooth device (there is an option for the file transfer, for example, for windows see here: https://support.microsoft.com/en-us/help/4026874/windows-10-share-files-over-bluetooth).
I have built a home surveillance and alarm system with raspberry pi's.
What I need now is an easy and safe remote control to arm the system and disarm it.
The most workable solution is to have a wireless router in the middle.
Before stepping out in the door, take out my phone, connect to my home network and via a custom built web page arm my system. (Web page would run the arming scripts)
But for this I need to have a wireless router (currently I have a non wireless Ubiquiti Router Station Pro, no radio card on it) and need to enable wireless on my phone (it is not enable-d, battery reasons) before leave, connect and so on. It is not one click unfortunately...
Other solution is to have just a wireless dongle in the Raspberry PI and do an Ad Hoc WiFi connection with my phone. My phone is Sony Ericson Xperia. Over here my technical knowledge hits the limit. It is possible to broadcast an Ad Hoc network over Raspberry PI I do not know if I can reach it from my Sony Ericson Xperia phone.
Third option is Bluetooth. I know very little about Bluetooth. I do not know how safe it is, and how to program it, to have on and off switch on my phone. However this might be the most promising.
Fourth option is to use the Pi Face. Link one or two switches to some type of receiver device. Have a sender device on my key chain and control it from there.
However I do not know from where I can buy such a safe remote control and if it is compatible with Pi Face.
Fifth option. To get home alarm system components and link those with the Pi Face. But I do not know what component might fit.
The best user scenario is the following.
User takes out out a device (phone or remote control) and presses arm/disarm.
User has appropriate time (30 sec) to get out or shut down.
If the remote device had run out from battery still have something to shut it down.
So my question does any body knows a fast, easy, cheap solution how to do this?
Though Bluetooth's security is questionable, it seems like the best option for your goal. Next to an adhoc
Bluetooth is not complicated.
On your mobile phone, if you don't want to make your own app you can look for some sort of Bluetooth Terminal or Bluetooth Chat. On your raspberry pi you'll have to setup a bluetooth rfcomm server with bluez.
How to configure Linux to act as a Bluetooth RFCOMM SPP server?
RFCOMM without pairing using PyBluez on Debian?
Modify these servers which do nothing by default, to listen for commends "arm" and "disarm". Make sure the ID of the device is the ID of your phone.
Ad-Hoc is even less complicated (assuming you know how to make a webserver and are going to make it secure enough, and have a dongle which supports adhoc):
Here is a post about ad-hoc networking with a raspberry pi.
In terms of distance, you'll have to see the specifications on your dongle(s) but I would say they're relatively the same.. your bluetooth dongle will have a class see Bluetooth Basics: Range. This will require more research but if you have either one of the dongles I would use that method.
I hope this helps, good luck setting up your alarm.
In the mean time I realized that a fast arming could be done via the Pi Face and pressing a button.
Disarming could go by other ways.
However the fastest solution would be a fingerprint button linked safely to Pi Face.
Updates. Finally went with the Ad-Hoc method:
This is the tutorial for it:
http://elinux.org/RPI-Wireless-Hotspot
I am trying to find a clever way to keep a BLE app active in the background on iOS 6, without breaking any of Apple's rules. I plan to use the phone as a peripheral device and another BLE circuit as the central. My app will automatically be opened when a user arrives to a building using geofencing. After that the iPhone will connect to the first BLE central device it sees (the device will be in its white list). The user will then be able to move throughout the building switching to different BLE "nodes".
My question is: What do I need to do in the background when a user is stationary at their desk so that the app does not get suspended due to memory resources?
My idea is based on this solution for a separate problem: There could potentially (not regularly) be 10-50 users in an area with only a few BLE "nodes" and I read at bluetooth.org that I could setup a dynamic connection system, basically rotating connections through all the users.
My idea is to setup a similar dynamic system where the central device (not the iPhone) disconnects the device on regular intervals (30-40 minutes) and then the iPhone will reconnect.
Is this something that some feasible? Is this against the iOS development guidelines? I was unable to find anything explicit about this. I have also asked on the iOS developer forum, but unfortunately it is not as popular as this site.
Thanks in advance!
Xcode -> Project target -> Capabilities -> Enable background mode
Check Uses Bluetooth LE Accessories
Capabilities
Also enable the following key in .plist file
Required background modes
App communicates using CoreBluetooth
Plist
I want to be able to pair Microsoft PixelSense hardware with multiple mobile devices via bluetooth and I want PixelSense to know which device is which. So if I place two phones on a table, PixelSense should be able to label them by device name. My initial thought was to have the phone display an Identity Tag that has encoded its Bluetooth MAC address so that it could associate them but PixelSense sees in infrared and can't read the phone screen so that idea is out. Can anyone think of another way to do this?
Microsoft has demonstrated a way to do this in their Mobile Connect sample application. They've ingeniously used the fact that almost all phones have a camera that faces down when the phone is placed on a flat surface. So they created an app that will read incoming color data from Surface while the phone is sitting on it.
So it goes like this:
The Surface app starts and makes the Surface computer itself visible on bluetooth (although you may have to do this manually in admin mode, can't remember)
you run the mobile app on your phone, click connect, and place it on the Surface at a designated spot
the Surface flashes a serious of colors into the phone's camera
the phone decodes those colors into a pin and scans through all the open bluetooth devices it can see until it finds one that is a desktop running the appropriate service and accepts the decoded pin.
Now the two are connected with no need for manual input and the Surface knows which physical device it's talking to because it knows which pin it displayed to each device.
*Note - They don't actually allow multiple simultaneous connections in this sample app, but I see no reason why it wouldn't work.
One issue with this approach (other than being pretty complicated to code), is the need for the app on the phone. One way to make it easier for people to get the app is to display a Microsoft Tag or qrcode on the Surface for people to scan (they're much more likely to have a scanning app already). I don't think there's any getting around the need to have something installed on the phone if you're using bluetooth anyway.