Access connected devices camera using swift - swift

I'm currently planning on making a desktop application that requires access to a connected phones camera. For example, if I plug in a phone using a usb cable I want to be able to see what the phone's camera is seeing on the desktop application. The program must also support android phones because that is what I'm currently using.
I was planning on creating the application in swift due to me working on a mac. Unfortunately I've never worked with swift before, so I was wondering if this sort of thing is possible in the language? If not, are there any other languages that might be able to achieve this?

Related

How to exchange data and files between two devices by NFC using Flutter?

I am a flutter developer, I want to make an application to exchange messages and files by using NFC technique
I used nfc_in_flutter plugin for reading and writing NFC tags but I don't know how to send and receive data and files between devices by using NFC in flutter.
Could any one help me, please?
Generally you don't try and send data between 2 devices using NFC, there is a standard for it, but most devices don't support it (it has never been supported on iOS and Android has dropped support for it as it was unreliable)
Use Bluetooth or Wifi Direct instead.
Update:
If you have to use NFC then the nfc_in_flutter plugin is no use, you are going to have to call native code for each platform yourself / write your own plugin.
And for 2 iOS devices, then forget it, just not possible because of what the OS supports.
When one device is an Android there is a complicated method that some people have had some success with but it still has it's issue.
The Android device does Host Card Emulation (HCE) and pretends to be a really Type 4 NFC tag, then other devices can read/write to it as if it were a real Tag which both iOS and Android Support. BUT on older Android devices then the deprecated Android Beam might get in the way and you would need to use enableReaderMode to do the read/write on Android.
You will need to put in a lot of error handle in the read/write App as NFC comms is very slow and very prone to loosing the connection, so it would have to handle loosing the connection and restarting where it last successful read from/written to.
All these problems make this extremely difficult to achieve a workable solution and was the main reason Google removed Android Beam for Android to Android sharing (which does use a NFC peer to peer protocol)

Ionic BLE Connection Issues

I'm using the Ionic Native BLE plugin to scan and connect to bluetooth devices. I'm able to get the plugin to list available devices, but I'm unable to get it to show already paired devices. This is the plugin I'm using:
https://ionicframework.com/docs/native/ble/
After searching through the documentation and finding examples, I've come to the conclusion that using this plugin to list already paired devices is just not possible. Is this the correct conclusion?
If so, do you know of any other plugins I could use to facilitate the looking up of paired bluetooth devices? I'm using Ionic 3.
We have been working on a simple BLE button and had the same issues. The only way we found out how to do this was to disconnect the button on app close (which the latest BLE version seems to do). We save the device ID (localStorage) when a user connects a device and then when the app starts up again the user has to wake up the device and the app starts scanning on startup. If the saved device id is the the id as your locally saved id it connects automatically.
If you, or anyone, wants to try other plugin, you can also try this: https://ionicframework.com/docs/v3/native/bluetoothle/
I first started using the same plugin that you use. After I encountered some difficult issues due to the strange operations of some bluetooth devices, I tried the second plugin and I found it to be better. That was three years ago and I can't say how the other plugin has improved in the present. One thing I like with the bluetoothle plugin is that it has many methods available and that gives more control to the bluetooth operations. You can look at these methods in its repo:
https://github.com/randdusing/cordova-plugin-bluetoothle

How to connect to an iphone through Java? Is this even possible?

I am trying to write a program in Java that can connect to an iPhone that is attached to a computer via apple USB cable and view its files. I have not found anything like this online and have been wondering if this is even possible. Any suggestions?
iOS is problematic because of DRM. Android is also moving in that direction making standard file system browsing difficult so I doubt it would be possible to view arbitrary files on the device.
Codename One allows you to build a Java app that will run on the iPhone itself which might allow you to access some data. However, apps running in the device also have restrictions and can't access the full file system only their own.

Testing environment for mobile devices, specifically media queries

I'm trying to 'mobilize' a site I'm working on using media queries in CSS.
I have an Android phone myself so have been testing on that with good results.
I now want to test on the iPhone but don't have a device, having searched the net and downloaded a few recommended simulators it seems they don't recognise the media queries, but without a device to test on I can;t e sure if my queries don't work - or if its the emulator that doesn't recognise them.
Does anyone know of a emulator for iPhone / iPad that runs on Windows and recognises media queries?
Mike
You should try using ProtoFluid - it's a web app that allows you to emulate an array of mobile devices and tablets, fully recognising media queries.
It's free to use (for now at least).

Does the iPhone SDK allow hardware access to the dock connector?

I haven't been able to find any documentation on hardware access via the iPhone SDK so far. I'd like to be able to send signals via the dock connector to an external hardware device but haven't seen any evidence that this is accessible via the SDK (not interested in possibilities on jailbroken iPhones).
Anyone have any pointers to docs for this or some idea of what deep dark corner i should look?
It will with the new SDK (3.0):
iPhone OS Accessories
Using iPhone SDK 3.0 your application can communicate with accessories attached to iPhone or iPod touch through either the 30-pin dock connector or wirelessly using Bluetooth.
Available in iPhone SDK 3.0 as External Accessory framework
http://developer.apple.com/iphone/program/sdk.html
To get the Hardware specs for the Doc connector you need to be part of the made for ipod/iphone program. But if you just want to talk to an already existing piece of hardware that supports it, the 3.0 SDK will let you access it.
I have tried applying to the made for ipod/iphone program as a individual/hobbyist, but have so far not heard anything past the "fill out the company information" stage.
chris.
This falls into the range of capabilities that requires working with Apple to get a special license. At, I presume, a special price.
This has changed to some extent with the 3.0 version of the iPhone firmware. If PyjamaSam is correct there is still some special activity required to get the connector specifications.