is there any API available to detect state of 3G ie on or off state through codes.
This question is almost a duplicate of the question I have linked to below - which should tell you most of what you need to know:
How to check for an active Internet connection on iOS or OSX?
Related
Let me start by giving some context: I have a Sony a7II camera which I wanted to control remotely. There's an app for that (PlayMemories) but it doesn't have all the features I need. So I decided to write my own app using Camera Remote API.
What I achieved so far: I have established connection between camera and phone, I have a working liveview and I'm displaying current aperture value on screen ('currentFNumber' from getEvent response).
What I'm trying to do: change aperture value. Calling getMethodTypes returns setFNumber as supported for my camera model. And here's the problem. It's on the supported list but not on the currently available list.
ShootMode is set to "still" and camera status is "IDLE" but when I check for 'setFNumber' availability it says 'currently not available'.
Answers for similar questions on stackoverflow suggested changing CameraFunction to 'remote shooting' but for me it's unavailable (error 12 'No such method'). When I check currentCameraFunction it's giving me null.
StartRecMode doesn't seem to be required (there's only 'stopRecMode' in currently available API calls).
So here's my question: am I missing something else or is it possible my camera software is faulty? I'm kinda stuck with this problem for a while now and I'd really appreciate some guidance. Thanks!
There are a couple things to check here:
Check that your camera has the latest firmware. http://esupport.sony.com/US/p/model-home.pl?mdl=ILCE7M2&template_id=1®ion_id=1&tab=download#/downloadTab
Check that you have the latest Smart Remote Control app installed on your camera - https://www.playmemoriescameraapps.com/portal/usbdetail.php?eid=is9104-npia09014_00-f00002
I am working on an application to coommunicate against a BLE device, currently I want to know how to display address of specific one ble device.
Your question is bad in so many ways, but I'll still provide an answer: BluetoothDevice#getAddress().
Is there a way how to get list of all devices connected to the Bluetooth peripheral?
I want to connect to iBeacon and check if another iPhone is connected to it.
No, two reasons why not:
iBeacons are not connected to the iOS device, iBeacons are broadcast only and no back communication exist from the phone to the beacon.
Knowing details of other BT 4.0 Centrals connected to a Peripheral are not in line with the the privacy features of Bluetooth 4.0. iOS and other Centrals are are using resolvable private addresses, in order to avoid situation like you are describing.
#barbazoo is correct that you cannot do exactly what you are asking because iBeacons only transmit data -- they have no idea what devices see them.
You can accomplish something similar, however, if you have an app running on each of the iOS devices you mention, and you have a server where you can build a web service. The web service would expose two methods:
reportIBeaconVisible(iBeaconProximityUUID, iBeaconMajor, iBeaconMinor, myPhoneAdvertisingId)
queryVisiblePhones(iBeaconProximityUUID, iBeaconMajor, iBeaconMinor)
The app would report each iBeacon it sees using the first method, passing the iBeacon's identifiers, along with the phone's advertising identifier to the server.
The app could then use the second method to ask the server what other phones have seen the exact same iBeacon, which would return a list of phone advertising identifiers.
You'd have to have logic on the phone to only report data to the server at a reasonable frequency. You'd also need code on the server to automatically delete phone records in the list if the phones haven't reported seeing a beacon in a certain time interval.
So I don't like how I can connect two iPhones with game kit, because you have to choose the iPhone you want to connect to, the other iPhone has to accept... I think this way sucks. I want to have the Bluetooth ON on my two iDevices and I want them to connect automatically between them. Is there a way to do this, or does Apple not approve of it?
I believe it's Bluetooth that won't let this happen. Check out the options presented here: http://en.wikipedia.org/wiki/Bluetooth#Pairing.2FBonding
You can see that only the first SSP option could possibly allow a non-confirmed pairing, and that's not available for devices with security capabilities.
I have a project where it's highly desired to have some control over network settings in IOS 5 for an iPad device. The ideal scenario would be to have to ability to change the device's wifi connection to a specific SSID. My gut tells me that this is probably functionality that isn't exposed in the SDK but I figured I'd ask.
An alternate goal, if my first assumption about directly changing a connection is correct, would be to allow the app to prompt the user to change network settings and direct the user to the settings screen. I've seen a handful of apps offer this when, for example, the device is in airplane mode and the app requires an internet connection. The major difference in my case is that I'm not necessarily looking to prompt the user just when the device is not on the internet but when whatever connection the device already may (or may not) have isn't the one I'm looking for (in this case, I'm looking for a closed/non-internet-facing Wifi ssid on an aircraft).
I appreciate any pointers that can lead me in the right direction.
It might not fit perfectly what you want but I think CaptiveNetwork is the closest you can get.
The API bindings for CaptiveNetwork are available in recent MonoTouch releases.