photo

Listen to photo taken event

人走茶凉 提交于 2019-12-23 04:11:32
问题 Just want to register to video/photo taken events. Hopefully, but not a must, the event will be triggered when the operation have finished, so I won't process half photos or half taken videos. Already tried: fileObserver = new FileObserver(dcimDir, FileObserver.ALL_EVENTS) I see the events when traversing using a file manager app but not when a picture is taken nor when copying. Ideas? 回答1: Found a way by registering to all sub directories of dcim (except the ones that start with a period):

Uploading a photo with Flickr

我怕爱的太早我们不能终老 提交于 2019-12-23 03:51:34
问题 I just started working with the Flickr API today and I have a question: If I allow a person to upload a photo to my website and then in order for me not to store it on my small local server, how can I just upload that photo to Flickr using the PHP Flickr API? That should be a pretty common use case, correct? I use PHP. Thanks, Alex 回答1: Flickr Upload API: http://www.flickr.com/services/api/upload.api.html Simple php script to upload pics on flickr http://www.flickr.com/groups/api/discuss

iPhone Camera access?

允我心安 提交于 2019-12-22 19:31:51
问题 I want to know how to access the iphones camera and work with it in realtime: for example just draw on the camera view. Another related Question: Can I display 4 camera-views at once like in "Photo Booth" on the Mac. 回答1: You can do it by using AVFoundation - (void)initCapture { AVCaptureDeviceInput *captureInput = [AVCaptureDeviceInput deviceInputWithDevice:[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo] error:nil]; AVCaptureVideoDataOutput *captureOutput = [

iPhone Camera access?

允我心安 提交于 2019-12-22 19:31:31
问题 I want to know how to access the iphones camera and work with it in realtime: for example just draw on the camera view. Another related Question: Can I display 4 camera-views at once like in "Photo Booth" on the Mac. 回答1: You can do it by using AVFoundation - (void)initCapture { AVCaptureDeviceInput *captureInput = [AVCaptureDeviceInput deviceInputWithDevice:[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo] error:nil]; AVCaptureVideoDataOutput *captureOutput = [

Android How to get image path of contact photo?

社会主义新天地 提交于 2019-12-22 18:51:51
问题 I need to upload contact image to server but not able to get real path. Please anyone help me. I'm getting below uri. URI: content://com.android.contacts/display_photo/2, 回答1: first get InputStream from Contact.Write the Inpustream in file and save as Image File. Finally upload that image path to server after success simply delete that Image File. See below code. First I get InputStream from Contact by using Contact Id. getContactInputStream("58");//58 is my contact id. public void

Use Graph API Explorer to post a photo

一曲冷凌霜 提交于 2019-12-22 11:11:55
问题 My ultimate goal is to do this programmatically, but as a sanity check I'm trying to just post an uploaded photo (from my computer) to a Facebook page using the Facebook Graph API Explorer. I have the access token and photo_upload and publish_stream permissions. I just don't understand what to do to indicate where the photo is. How can I do it? Thanks. 回答1: I don't think the Graph API explorer tool supports file upload, so you won't be able to use it to check your uploads. Facebook accepts a

Android: Gallery View has been deprecated?

a 夏天 提交于 2019-12-22 08:38:11
问题 I have been using the gallery control to show the photos and having problem when swiping the photo. I need to swipe all the way to change photo otherwise it will bounce back to the previous photo. After checking up on the internet, I heard the gallery has been deprecated. What is the next control which can do the same as gallery control? 回答1: Use a Gridview to show images Combine gridview with View pager to view selected images Here is a Tutorial from androidhive to get you started 来源: https:

Open camera roll on an exact photo

女生的网名这么多〃 提交于 2019-12-22 08:22:58
问题 I'm developing a camera application where I'd like to put some functions that are already present in the stock app. My problem is replicating the little square in the bottom left corner (in portrait mode) where the micro-thumbnail of the photo that the user has just taken is shown; then, when the user tap on it, the photo app should open, on the last photo saved in the camera roll. I can load the thumbnail of the newest photo in camera roll with ALAssetsLibrary - I've access to it with

Android camera fails to take photo from background service

允我心安 提交于 2019-12-22 06:37:57
问题 I've implemented a service to take a picture from a background thread, but the photo never gets taken on any of my devices... here is the code (logging output below): public class PhotoCaptureService extends Service { private static final String TAG = "PhotoCaptureService"; @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); Log.d(TAG, "Starting the PhotoCaptureService"); takePhoto(); } private void takePhoto() { Log.d(TAG, "Preparing to take photo");

Post a photo to a page for iOS

好久不见. 提交于 2019-12-22 01:36:41
问题 I am trying to post a photo to a page that the user does not own. Note that all solutions that I found from other discussion threads require the user to be administrative and get the access_token of a page with *manage_pages* permissions. However, what I want to do is different: Using iOS SDK to upload an image to a page, which has a setting that people can upload images to it. I try several ways, but none of them works. Here is how I get permissions NSArray *permissions = [[NSArray alloc]