Camera is not working in the iPhone 4

Hello All,
I have implemented the camera work in my application and this is working perfectly in the iPhone 3 and 3GS but not working in iPhone 4. Its crashed and says "Thread 0 crashed with ARM Thread State". I am sending the code snippet below.
-(IBAction)ClickImage:(id)sender
UIButton *btn=(UIButton *)sender;
ImageTag=btn.tag;
UIImagePickerController *picker=[[UIImagePickerController alloc]init];
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
picker.sourceType=UIImagePickerControllerSourceTypeCamera;
else
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Rubyster Insurance" message:@"Camera is not available" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[alert show];
[alert release];
picker.delegate=self;
[self presentModalViewController:picker animated:YES];
Please let me know what can be the issue and how to resolve it.
Thanks in advance.

Your code works as is on my iPhone 4 at iOS 4.3.3.

Similar Messages

  • My iPhone 5 rear camera was not working, now the rear camera is also not working. I have procured the phone in 2012 from San Fransico. USA Can anyone help me, please?

    My iPhone 5 rear camera was not working, now the rear camera is also not working. I have procured the phone in 2012 from San Fransico. USA Can anyone help me, please?

    No one here can help you. If your phone is no longer under warranty, a third-party repair shop will most likely be your best bet. You can't mail the phone to Apple, in the US, as Apple does not accept international shipments. You could mail it to a friend/relative, in the US, & they could take it to an Apple store for you. Some Apple stores repair iPhones. Otherwise, you're looking at an out of warranty replacement.
    Good luck.

  • My iPhone 5 shows the flashlight icon but in a shadowed way, as if it is disabled. Also the rear camera is not working. The iOS version is 7.1.1

    My iPhone 5 shows the flashlight icon but in a shadowed way, as if it is disabled. Also the rear camera is not working. The iOS version is 7.1.1

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.

  • My iPhone 6 panoramic camera does not work properly: the arrow does not turn when i turn my phone. Furthermore sonetti da my Keyboard does not turn as well. What do you think si the problem?

    My iPhone 6 panoramic camera does not work properly: the arrow does not turn when i turn my phone. Furthermore sonetti da my Keyboard does not turn as well. What do you think si the problem?

    Furthermore my keyboard does not turn sometimes as well

  • I just bought an Iphone4 from straight talk and my camera does not work. The shutter wont open and when it does open there is a black screen. I am very upset. I have wanted this phone for awhile and now that I have it, it does not work properly. Need help

    I just bought an Iphone 4 from straight talk. My camera does not work. The shutter does not open and when it does open there is a black screen. I am very upset. I have wanted this phone for awhile. I want the issue fixed.
                                                                                                                                                     Thanks

    Take the iPhone to an Apple store genius bar for testing, and if it is defective and under warranty they will replace.  Since you say iPhone 4, was this a used or refurbished iPhone? 

  • My camera is not working on the outside of the phone how to fix?

    My camera is not working on the outside of the phone how can I fix it?

    Try a restore.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • My camera is not working on the front

    My camera is not working on the front. When I select the app if I try to switch it freezes.

    Try a restore.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • Hp TrueVision HD web cam does not work. The light will come on but no image appears in the window.

    Hi.
     I have an HP Pavilion dv7 6178us Entertainment PC I just bought it last week. My operating system is Windows 7 Home Premium Service Pack 1 64 bits.
    The problem I have is that yesterday I install Skype in the computer and realized that the HP TrueVision HD web cam does not work. The light right next to the web cam will light up but no image will appear on the screen.
    I have checked the software that  I have in the computer for the webcam and the program is CyberLink YouCam BE version 3.5.
    But the web cam does not work. The light right next to it will turn on when I activate Cyberlink, Skype or Messenger but no actual image will come out in computer screen. The computer is fully updated BIOS, Windows 7 and HP.
    But the web cam is not working. Could you help me fix this problem?
    Best regards:
    JEIO71

    I have a pavilion dv6 notepad. it's about a year old.
    about a month ago internal webcam truevision hd stop working.
    Called hp tech. they sent a box for me to ship the laptop.
    they hp tech attempted to correct the problem via internet
    did not work.
    wanted me to do a restore to factory setting i stopped him there.
    Webcam detected in device manager.
    the webcam light come on but no image.
    I actually see the back drop through the image space.
    running windows 7, fully updated.
    I found many comments on the web about the webcam connector disconnecting.
    But if it was the case with my computer, the webcam would not be detected.
    Many other comments suggests to do a restore to factory setting but \i read also that
    does not work often.
    I read many comments where disappointed clients believe hp should update
    the software but the driver is actually microsoft dating back to june 2006.
    Is it possible it's  a hardware problem, ie webcam is burned out.
    I have received a box to sent it and know they will do a system restore.
    Don't feel to go that way.
    Many comments refers to hp making an effort to get a driver update.
    ps I decided to purchase a logitech webcam, works perfectly.
    What else can I do to fix this problem.
    Can hp send me another internal webcam.

  • Why does the alarm not work when the iphone 4 is turned off

    why does the alarm not work when the iphone 4 for is  turned  off works fine when on most other phones work when off

    The only phone I've ever had that would turn on and sound the alarm is a Blackberry. So, I'd hardly say "most phones" have this function.

  • The auto lock function is not working on the iphone 3gs running ios 6...what should i do?

    the auto lock function is not working on the iphone 3gs running ios 6...what should i do?

    Temporary fix - turn off assistive touch if you happen to have it on.

  • Will the camera connection kit work with the iPhone 4s and iOS 5?

    I haven't been able to find anything in the forum regarding the iphone 4S / iOS 5 and the camera connection kit; did any of the developers work with this piece of hardware when testing iOS 5, if you aren't allow to answer I understand, I'll just find out for myself on Friday.....

    grrr...i love apple products, but that the camera connection kit does not work with an iphone 4(s) make me angry about some apple philosophies. it is a good example of user restrictions from apple which make me feel like i am in a kindergarten.
    that the camera connection kit does not work with my iphone, makes no sense to me.
    hardware quite the same like ipad, nice screen with balanced colors (iphone looks good compared to my calibrated eizos) and screen size more than enough to do some basic edits.
    would be great sometimes to import and post/email photos from my camera, when i am on the road.
    i do not always want to carry the ipad with me.

  • My itouch camera will not work. sometimes the shutter wont even open. other times it opens but the camera doesnt show anything but a black screen. how do i fix this??? please helpp

    My itouch camera will not work. SOmethimes the shutter wont even open. other times it opens but the camera doesnt show anything but a black screen. how do i fix this???

    Basics from the manual are restart, reset, restore.

  • I phone camera is not working after the update

    I have an iPhone 4S 16 GB, It worked perfectly under iOS 7.1.2. . . I upgraded the OS to iOS 8.0.2 about two weeks ago. ( Bad Move )
    I noticed right off that my device was running a little slower, lagging, and worst of all my "Camera"  App does not have an image At All ! ! !
    The Flash options, HDR options, Timer options, will switch back and forth, but that is all that works, none of the bottom selections work at all,
    and when you hit the front/back camera icon, it freezes /locks the options that did work. I have done a deep restore twice on the device,
    restored as New Device, still no change at all on the behavior of the Camera operation. One thing I did find out though, it is a Glitch in the iOS
    software, pertaining to the Cameras Operation, reason being, is that I can go into the preinstalled Game Center App on the iOS 8, click on Add Photo,
    click on Take Photo, and there are my cameras, working perfectly, front & back. I have done a lot of research on this issue over the past two weeks,
    Reading Apple's own Compatibility Devices which start at iPhone 4S and later for the iOS 8.0.2, But, If you go into the iPhone iOS 8.0.2 Operators Manual, go to camera section, you will see that there are several of the New functions of the Camera that are only compatible with iPhone 5 and later. Leaving the iPhone 4S not capable of executing the full capabilities of the New Camera App. I've chatted with Apple Online Chat Support for several hours two days ago, the only resolve they had was to send the device in or take it to an Apple Store and they would correct that issue "Free of Charge", even though ,my iPhone is 3 years out of warranty, because it is a Software related issue.... All I wanted to do is find a way to revert back to iOS 7.1.2, I found out very quickly, that is Impossible to do, because it violates Security Issues and Apples Terms of Agreement," Leaving them Not Responsible for any issues what so ever that occurs to your device downloading the iOS 8.0.2. . Which in my opinion, is pretty messed up. . What is the Big Deal of reverting back to any iOS you want, Apple should support every iOS version they have, not the users fault that a New iOS does not work right on their device, slowing it down, etc...I run Windows 7 on my PC, I can revert back to any OS I want, no problem at all.. . Anyways, back to iPhone issues, The other issues I got with the upgrade is that, My device will not power back on after I power it off now, I have to do a reset to get it to booted back up and running, and when I do so, there is a white halo that appears on my screen for several hours, then it will finally dissipate (no idea what that's all about), , Also, the battery life is much shorter now, had much better battery time on iOS 7.1.2 . . . Apple Support said that my Case was the first they have heard of, which surprised me.

    Is anyone having a solution for this????? don't say that to sell the phone or upgrade it to the next version? I want to use this phone as it was a last gift given by one important person in my life and can't throw it away, please give me a solution.

  • Geolocation not working on the iPhone for CS6 FlashPro

    Firstly.
    The Geolocation app I have works fine on the iPhone 4, and 4s (and 3) when built with CS5, and CS5.5 Flash Pro+ AS3
    Oddly - it also works in the SIMULATOR on the CS6 Flaash Pro + AS3 platform.
    But, transfer it to my iPhone 4 device - and the geolocation information no longerworks. It is just not seeing the Geolocation service on  the iPhone?

    Found the answer.
    If your Geolocation apps are now failing on the new IOS6 release, and failing silently I might add, here's the solution.
    http://quetwo.com/2012/09/21/geolocation-issues-with-air-on-ios-with-a-fix/
    Many thanks to this person.

  • IMessages not working between the iPhones in my account

    I send it, it says delivered, then a red exclamation sign comes out.. it only works if i resend it as txt.. it works with other iphones but not between the two iphones in my account. I already called AT&T but since this problem started happening after the latest iOS 7 upgrade ( 7.0.4) they say is Apple..... I've searched the forums and it looks like there has been several reports but couldnt find any tricks that work.. tried disable and enable imessages but still didnt

    I have this same problem n have not found an answer

Maybe you are looking for

  • Cannot Logout Completely from Facebook on Iphone

    Does anyone know how I can log out of Facebook on my iPhone? I used to be able to just click the red "Log Out" button at the bottom of the menu choices along the left. Now when I do that, I get a screen that says "You are logged on as <my name>, with

  • My front facing camera is not working. How can I get it to work again?

    My back camera works just fine but when I switch it over to the front facing camera it just freezes and never switches then takes awhile to switch back over. It first started in the Snapchat App but now my actual camera App is doing it.

  • Idocs Question!

    HI specialist After run my transaction F110..  I can see my Idocs in transaction WE02. Then I run the BD87.. and it should generate one file with all the Idocs together but it generates one file per Idoc. It increase the cost in our company with the

  • Read_wall_time not found

    i get this when running a client linked istantclient: exec(): 0509-036 Cannot load program ./check_aix_batch_run_status because of the following errors: 0509-130 Symbol resolution failed for /tmp/instantclient_11_1/libclntsh.a(shr.o) because: 0509-13

  • Enforce 'DISTINCT' clause in a db block....(solved)

    Hi , Is it possible to set "distinct" in a db block....either in property palette or programmatically ..in PRE-QUERY , for example in Dev10g...???? Thanks ... Simon