I was wondering if there was a specific method called when we press the 2 buttons of the iPhone (using Home-Button & Power on/off) to take a screenshot. If yes, I would known his name to use her in programming.
There used to be a UIGetScreenImage() function that you could use to capture the screen. Apple no longer allows use of that function in App Store apps, so you have a few other options. CALayer has a -renderInContext: method—Google it—that you can use to copy a view’s contents to a graphics context; this does not, however, work for OpenGL content, video, or live imagery from a device’s camera. I’m not sure about solutions for the first two, but for the latter—getting images from the camera—you’ll need to use the AVFoundation framework.
It is a system level service for which the app never receives any notification or method call.
I believe that would be a native method, not accessible from the IPhone SDK. In what context are you going to be using this? You might be looking for this - Take screenshot from code
Related
I have an app that uses ARKit to detect faces and send over the network the coordinates of interest, which works well. I would like this app to run in background, still sending the data over the network, while I would be using another app (almost) fullscreen.
The option 'Enable multiple windows' is activated in info.plist, but as soon as I launch my other app, the ARKit app stops sending information (the app actually probably stops).
Is there a simple way to do this, and at least is this feasible? Thanks!
This is not possible at this point. Camera and AR stuff is disabled at a system level in apps when they are displayed in Slide Over or Split View.
I'd recommend displaying a warning message when Slide Over/Split Screen is being used saying that you should use the app in full screen mode. See this answer under a different question for details.
I was wondering if there's anyway to modify how the iPhone takes pictures. Specifically, if you can turn off the dimmer focus flash that shows up before the full flash, so when you take a picture it's just the full flashlight that comes on immediately. Thanks!
Unfortunately, no, I think not. From the apple developer site:
Flash Modes
There are three flash modes:
AVCaptureFlashModeOff: The flash will never fire.
AVCaptureFlashModeOn: The flash will always fire.
AVCaptureFlashModeAuto: The flash will fire dependent on the ambient
light conditions. You use hasFlash to determine whether a device has a
flash. If that method returns YES, you then use the
isFlashModeSupported: method, passing the desired mode to determine
whether a device supports a given flash mode, then set the mode using
the flashMode property.
And there is no mention of the dimmer flash.
EDIT: Maybe you can. There are lots of iOS apps that do this
2nd Edit: After looking at this, I have concluded that you cannot do so.
I am working on application (using Swift) which has the function to scan barcodes. For this I am using RSBarcodes.
Issue I am dealing with is that I need to scan barcodes from A4 paper sheet which is full of them. However the capturing is too fast and before I can focus on the right barcode the app captures wrong one.
So basically I need to ensure that the device will not capture some barcode, I don't want, but the one I will be pointing on for a longer time. My only idea is to check if the same barcode was captured for example 10 times and based on this assume that this one is the right one. Is there some more elegant solution?
Thanks for any suggestion!
I'm not an iOS dev, so I don't know the specifics - but is there a way you activate the camera but not the scanner? If so, if you can overlay a button in the camera view which says "Scan" - then your user would provide the trigger to capture the barcode once they have settled on a specific one.
According to the first comment at the end of this article:
http://www.imore.com/keynote-iphone-ipad-review
And here:
http://help.apple.com/keynote/ipad/2.2/#/tand1a4ee7c
It seems that you can configure keynote for iPad, such that you can see speaker notes on the iPad when you're using a dongle to plug into a projector or big screen; but not on the big screen.
Is this functionality only afforded to Keynote through some private API in the OS level? or does anyone know of a way of achieving this programatically? My use case doesn't need to make it into the app store - so a private API hack could work for me.
No need for private API's. You can observe UIScreenDidConnectNotification notifications for when a second screen is connected whether it's airplay or hdmi.
You then provide a View/ViewController for that screen.
Is there any way to access the device camera from Java on a blackberry?
My goal is to be able to take a photo and use it within the application.
With Invoke you have to wait for the user to take a picture. It starts the native camera app and pushes that screen on top of the stack.
Maybe this is fine, but if you want more control, look at the Camera Demo in the RIM samples, this has an example of using J2ME MMAPI classes: Player, VideoControl, etc... you can call the snapshot methods yourself instead of waiting for the user.
Take a look at the Invoke class. You can invoke the camera application as well as capture an image.