I use a ContentObserver in my android application to receive a notification whenever a photo is taken. Obviously iOS doesn't use the intent system, so is there an equivalent or alternative way to do this? I would prefer not to write a full camera application if possible.
This is not quite possible. Even the latest Google+ application on iOS, with its Instant Upload feature does not get notified when photos are taken, it simply checks the asset library while the application is running, and then as long as possible while running in the background before getting timed out by the OS.
The following is from the Google+ help on the matter:
Note: Photos and videos will upload while the Google+ application is
open and for a brief period of time afterwards.
HTH
You cannot run in the background and get notified when a picture is taken and saved to the Camera Roll by another app on iOS.
That said, you don't really need to write a whole camera app to be able to let the user take pictures from within your app, or to access Camera Roll from within your running app.
Take a look at UIImagePickerController. It is really easy to let the user select or take a photo on iOS.
There is no equivalent to ContentObserver in iOS.
Related
I'm looking for solution that will enable my app to get an event from the server while the phone is in lock mode, when the event occurs the app will open the camera and take a picture.
while the phone remains locked and send the picture to the server in the back ground.
is it possible?
will apple store allow this kind of application?
Clarification:: the idea is not to take a picture without the user knowledge, the goal is to have him take a quick picture without having to open the phone & the application in order for that picture to be taken. If there is a solution that allows me to add a button like the camera build in next to the lock that's a great solution too.
Short answers
No,
No.
This is a huge violation of privacy, and has a great potential for abuse, therefore, there is no way to sneak pictures away from the user's device on demand.
You could send a push notification and ask a user to take a photo and upload it to your server on the other hand.
I am trying to load the images received from a contact in iMessage, but I have not found in iOS SDK to do this.
Load the contents of incoming iMessages.
Load the images received by iMessage.
Someone who knows how to help me?
This can not be done with on iOS with the iOS SDK. Due to privacy concerns Apple does not allow access to any messages received via the messages.app.
If you're looking to pull images directly from the Messages app, then no you can't do that. If however, you're okay with only viewing the images that the user has chosen to save to the camera roll, then yes you have a few options.
You can use the UIImagePickerController class to allow the user to select photos from their camera roll, or the AssetsLibrary Framework to get references to these images without the user selecting them. Both solutions do require the user granting you access to the camera roll though.
I'm building an app that is supposed to monitor picture taking even if the app is in the background.
For example:
A user opens the app, insert some settings and then puts the app in the background (locks the device or something). When the user opens the device again and take a photo with the camera, my app needs to catch that event.
I read some tutorials about the ALAssetsLibraryChangedNotification class and didn't exactly understand if this is what am I looking for because it doesn't say if this runs when app is in background.
I was wondering if someone here has some experience with this kind of thing and can give me some input about this kind of thing maybe an observer? Maybe a service? Any ideas?
I'm developing a AIR App that asks the user to take a photo or video and upload it to a server.
Everything was OK with Android, but I found out that MediaPromise.file was null on iOS.
I don't need/want to manipulate the image/video at all, I just need to get this File/FileReference and upload it to the server.
My problem is that, as iOS doesn't give me a File from the MediaPromise, I don't have anything to upload.
Googling around I found out how to, asynchronously, load the the data (with the Loader.loadFilePromise()) from the promise, but I don't know how to encode it as a video when I call camera.launch(MediaType.VIDEO); (where camera is a CameraUI instance).
I'm handling the camera.launch(MediaType.IMAGE); call just fine already, but I really want to get the file directly from the OS, if it is possible, so I don't need to encode it myself.
To sum it up, I need to upload the photo/video the user just took with the CameraUI API on the iOS.
How can I do this?
note: I can provide some code if needed...
This seems to be what you're looking for...AIR for iOS - Taking & Uploading Photos
I am trying to build an iOS application that will display all of the iOS device's photos in a view. The user should then be able to click each photo to select (multiple selections allowed) then after selecting, upload the photos to a webserver.
Is it possible to access the photos that are controlled by the Photos application? Does anyone know of any efficient way to get access to the photos (third party framework) and/or a tutorial?
Thanks
Apple's developer site lists the Assets Library Framework as a way "to access the pictures and videos managed by the Photos application." The documentation there is fairly extensive, and looking around the dev site more should yield several tutorials and example apps.
AFAIK you can't grab all images from camera roll and use them in your app but you can have a UIImagePickerController that lets the user choose the image from their camera roll and a delegate is fired when they select one (or take a picture depending on how you set it up) then you can use that image in your app.