Results 1 to 7 of 7

Thread: Direct sdk access to camera in an iPhone

  1. #1
    Join Date
    Apr 2010
    Posts
    75

    Direct sdk access to camera in an iPhone

    I have bought a new iPhone 3g recently and i want to ask a simple question about using the camera of this phone. Does anybody know how to use an iPhone camera directly to use it with an embedded application. But make sure that i am not asking a solution about an UIKit.
    Last edited by Doumbia; 24-05-2010 at 03:29 PM.

  2. #2
    Join Date
    Oct 2008
    Posts
    1,066

    Re: direct access to camera in an iPhone

    Actually if you want to use the camera of your iPhone without using the apple's sdk then you need to install some native API's on your phone which helps you to do the task as per your expectations. There are many kind of API's available on the world wide web which you may use on your iPhone instead of using an Apple's SDK.

  3. #3
    Join Date
    Oct 2008
    Posts
    421

    Re: Direct sdk access to camera in an iPhone

    I do not have much ideas about making any changes in an application programming interface if an iPhone's sdk. But i am sure that you need to do some changes in the code which will definitely solve your problem. I have tired searching for the code and have found some useless solutions which might make you confusing. Just for the same reason i have not provided the code. But you should try searching it with the code which must be helping you. As i do not have any idea about the coding, I just cannot decide that is it wright one or a wrong.

  4. #4
    Join Date
    Oct 2008
    Posts
    267

    Re: Direct sdk access to camera in an iPhone

    I have provided the code by which you can change the preview of your camera of your iPhone. Though i am not a expert in an Image Picker Camera interface but i just hate that it is so slow and it does not even help you to make changes in the camera preview. First of all you need to build camera controller and make sure that the camera type source is available.
    Code:
    #define SOURCETYPE UIImagePickerControllerSourceTypeCamera
    if ([UIImagePickerController isSourceTypeAvailable:SOURCETYPE])	self.sourceType = SOURCETYPE;

  5. #5
    Join Date
    Jan 2006
    Posts
    6,878

    Re: Direct sdk access to camera in an iPhone

    You have to make an image picker to update itself automatically which will be allowing it to load before you start messing with its views. I have used Navigation Controller which gives me a "Snap" button.
    Code:
    CameraController *cam = [[CameraController alloc] init];
    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:cam];
    [cam performSelector:@selector(updateView) withObject:NULL afterDelay:2.0f];

  6. #6
    Join Date
    Dec 2008
    Posts
    950

    Re: Direct sdk access to camera in an iPhone

    Here i have given the code which adds up the bar button item to the navigation bar.
    (void) updateView
    Code:
    {
    	self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]
    	   initWithTitle:@"Snap" 
    	   style:UIBarButtonItemStylePlain 
    	   target:self 
    	   action:@selector(snapIt:)] autorelease];
    		// Remove the overlay
    	UIView *plView = [[[[[[self.view subviews] lastObject] subviews] lastObject] subviews] lastObject];
    	[[[plView subviews] objectAtIndex:3] removeFromSuperview];
    }
    You may use the following one to have full screen image.
    Code:
     (void) snapIt: (UIBarButtonItem *) button
    {	
        [self writeImage:[UIImage imageWithCGImage:UIGetScreenImage()]];
    }

  7. #7
    Join Date
    Oct 2008
    Posts
    346

    Re: Direct sdk access to camera in an iPhone

    I have found one google page where they have given provided the whole lot of code which you may use in order to access your iPhone's camera directly. As i do not understand the coding languages, I have given you the LINK which redirects you to the web page where this code has been provided.

Similar Threads

  1. Chkdsk problem: Cannot open volume for direct access
    By Kuprin in forum Windows Software
    Replies: 5
    Last Post: 21-11-2011, 09:58 PM
  2. block direct access to router
    By X-Man in forum Networking & Security
    Replies: 3
    Last Post: 07-07-2009, 08:09 PM
  3. Access iPhone "Camera Roll"
    By kenny11 in forum Portable Devices
    Replies: 3
    Last Post: 26-06-2009, 07:35 PM
  4. Disable Direct Memory Access(DMA)
    By Orlando in forum Tips & Tweaks
    Replies: 3
    Last Post: 25-03-2009, 08:29 PM
  5. Direct Link from MS Project to MS Access
    By rowanld in forum Microsoft Project
    Replies: 2
    Last Post: 13-03-2007, 12:02 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,719,779.58773 seconds with 16 queries