Is it possible prevent camera or microphone of iPhone/Android from working based on the location of the device?
I want to make the functionality of camera or microphone disable in the certain area.
Is it possible in iOS or Android?
Are there SDKs, solutions or libraries?
Thank you.
For Android you can use the Device Administration API to lock all cameres of the device. The camera (and flash) will be disabled for the user and for all the apps. Regarding the geo location you should retrieve the device location (Network/GPS) and switch between lock/unlock according to it.
For ios it is possible to disable the camera app via a Mobile Device Management (MDM) for Enterprise deployment.
I don't know if it is possible to do it dynamically based on the device location. I will appreciate if someone will response to this qestion too.
As #rmaddy says, you can't do this for iOS, unless you are targeting jailbroken devices. And on a jailbroken device all bets are off, since the user has root access to bypass your restrictions.
As a matter of policy Apple does not allow third party apps to alter the base functions of the device. Apps run in "user space" in a restrictive "app sandbox" and can only modify themselves.
Related
How to integrate screen time/ Parental control API in iOS app. Is screen time api available?
I tried with MDM(Mobile device management) but I am unable to create the MDM CSR. As there is no option for this certificate on developer account.
Please guide me if you have any solution. Basically I want to create an app having restrictions like screen time in iPhone or parental control app.
You can use apple ScreenTime api (Managed Settings, Family Controls, Device Activity) to block and shields iOS application on iOS Devices.
I think it should be done through settings. I use parental control app - FindMyKids to track my kids' location and what they are doing during the day. I have an iPhone as well and no problems.
I'm trying to set up a hobby project and I'm wondering - if my device uses Bluetooth Low Energy module, will this device show under the list of Bluetooth Devices under Settings for iOS? Or will my app have to search for this device specifically before connecting? If it doesn't show in the Settings, what type of Bluetooth module would I need for that?
No, you will not see your LE devices under Settings for iOS.
See LE best practices - your app should search for the LE device.
You only see the BT classic devices in that settings. However, only few protocols could be used without a required MFi chip, which is out of your scope for your Hobby project.
Use The CoreBluetooth on the iOS side for your app.
UPDATE per #Brejuro request in the comment below:
MFi coprocessor is required to be in your custom HW, which wants to communicate using the majority of profiles/protocols defined for Bluetooth Classic (not LE), e.g the pure RFCOMM. Coprocessor is used for the initial authentication - then, iOS knows that your custom HW is certified and allows to use it.
However, Apple will ask you for big money and your device needs to pass through Apple certification - that's why I told that this is out of the scope for any hobby project. You will also need to sign very restrictive NDA. However, you will get very very good documentation describing many details.
Built-in Bluetooth panel in iOS Settings app is actually a merge of two different things:
a list of known (paired) devices whatever the profile they use (so that you have a central place to unpair them),
a tool for discovering nearby devices to pair to.
Unpaired devices will only show in discovery list if they actually implement at least one profile that is recognized by core bluetooth services of iOS. Other devices are masked (user would not be able to do anything useful with them anyway).
If you hobby project is to do something related to built-in supported devices, like HID (keyboard, mouse, remote control, etc.), you will actually see them during discovery from Settings app.
If you create a device with a custom service, with your own Service Type UUID, it will not show in built-in panel, and your app will have to look for it for pairing. Once paired, device will show in settings.
Out of core services, you can also make compatible devices without being MFi. For instance, MIDI over BLE profile is such thing that gets recognized transparently by garageband and other music apps.
Using BLE and not BR/EDR, Authentication chip is only required for very specific profiles, like HomeKit.
I have a simple question.
I know that when you pair bluetooth headphones to a phone it automatically takes over the sound and it starts playing on your headphones.
Is it possible to program a device so that, as soon as it pairs with a phone, it turns on the phone's flashlight for example?
I know that you can probably program anything to do anything, but I'm curious to know if there are any limitations? Does Apple restrict developers and engineers from creating devices that tamper with their iPhone (like the flashlight thing)? Or is it pretty much an open market?
Yes, this is very restricted to protect users.
Bluetooth works by communicating over defined profiles. Pairing does not have a side effect (like turning on the flashlight), it just bonds the two devices. To control each other, the devices have to use profiles. For example, when you connect your headphones to a phone, they probably connect both AVRCP (Audio/Video Remote Control Profile) and A2DP (Advanced Audio Distribution Profile). These profiles have very fixed scope so that developers and engineers cannot tamper with users devices in unexpected ways.
Apple is especially careful with their devices. For any Bluetooth classic device that wants to implement a profile outside of the default ones, a MFi chip is required. Bluetooth LE devices are much more open, and users can connect them to their phone either through an app or the OS itself. Apps are able to turn on the flashlight, like you describe, but it requires camera permissions and is not allowed to run in the background.
Assuming you could be talking about software as well (the question is vague enough that it doesn't point to hardware only)...
I worked extensively with CoreBluetooth, the framework allows you to create both sides of the connection (transmitter, receiver or client, server; depending on how you want to look at it). Should you wish to create an app on the phone as one of them, and another app an a phone or a mac (or iBeacons) as the other, you'd be able to create that connection and control stuff on the "client" from the "server" and vice versa. You could control as much as the Apple API allows you to control.
My question regards a possible remote Parental Control system for iOS devices.
I understand how to apply web filtering options that would allow parents to whitelist and/or blacklist specific URLs and domains remotely on their children's devices via managed profiles and MDM server but is it possible to whitelist/blacklist certain apps from the iTunes store - i.e if the parents want to remotely block the installation of say Snapchat and Viber for example? It appears that filtering right now is only possible based on the iTunes "appropriate age" tag - i.e 4+
Thanks!
You can always blacklist apps using an Mobile Device Management software. When an app which is blacklisted is installed on the user's device, the device will show as not compliant. You can also find which all blacklisted apps are installed on the device. Then the admin can prompt the user to uninstall the app. If they are not complying the admin can lock the device until they agree to comply.By using an MDM you can enforce additional restrictions like block camera etc. For a more strict management you can put the Apple device on supervisory mode, which have more options for device restriction. iOS 9.3 goes a bit further in this area by preventing the blacklisted apps from being shown or installed.
No, that level of control is unavailable in iOS. The closest you can get today is to either set the appropriate app age or to use the app installation restriction to block the entire App Store (keeping in mind that on iOS 8, this restriction will also prevent app installation by MDM as well).
I was wondering, if there is a way to use IPhone as an HID device, with some other device like PS3. I checked out the Bluetooth specification and IOS Devices do support HID Profile. So I thought it would be easy to pair my iPhone using passkey mechanism and should be able to start using my iPhone as keyboard or mouse without much hassle. But I found very soon that this assumption is naive and I need to develop custom solution.
I was initially thinking about using GameKit framework, but I think it only works between two compatible IOS Devices. If I want to extend this capability, then I have to use iPhone External Accessory API .In my analysis, I also found that iPhone will only communicate and pair with devices that are licensed by Apple. (Made for iPhone\iPod program). Does it mean that, if I want to use iPhone with another device, I need to get that device approved by Apple. ( Which will not surprise me one bit). Also if someone could point me to more detailed documentation on this, that will also be helpful.( What is an MFI developer board ??)
I do not want a solution that needs me to jailbreak an iPhone. (or any solution that will disqualify my app by Apple).
So to summarize:
1- Please validate my findings, correct them if they are wrong?
2a- How does External Accessory API Work?
b- Can I use this to connect to third party accessories ? (or is this only for accessory developers).
3- Or is there a better solution without using External Accessory API?
Please provide supportive documentation or link if you can. Thank You.
You are unlikely to get on the External accessory program from apple unless you are a big company ( you can try, but I have read this a number of places) . iPhones use a proprietary Bluetooth interface that and hardware must also implement this interface, so not much chance of getting it to connect to any other hardware directly.
Most apps like this (Remote Mouse) for example, connect to your wifi network, and have another application installed on your computer. The iphone can then talk to this application over the wi-fi network, but not bluetooth. I would suggest that the only way I can see this would be possible to to create the server app that you install on a computer on the wi-fi network that then in turn controls the 3rd party device if there is an API that you can use from the desktop app to control the 3rd party device.
This is just what I have found when I researched about this for making an app for iPhone to control a bluetooth watch. I had to jailbreak in the end to replace the bluetooth stack on the iPhone with one that could connect to any hardware device. Not limited by apple.