Need Advice (Initiating camera)

Discussion in 'iOS Programming' started by divyaprasad85, Oct 21, 2010.

  1. divyaprasad85 macrumors newbie

    Joined:
    Aug 31, 2010
    #1
    Hi,
    How to check the device iPhone 4 or iPhone 2G when initiate camera.
    Because when it is iPhone 4 device it should it should initiate front camera or if it is 2G it should initiate back camera.My question how to check the which device your running.


    Thank you
     
  2. Lotso macrumors 6502

    Lotso

    Joined:
    Jul 21, 2010
    Location:
    OC, California
    #2
    Please rephrase your question. I haven't a clue what your trying to say.:confused:
     
  3. vastoholic macrumors 68000

    vastoholic

    Joined:
    Jan 28, 2009
    Location:
    Tulsa, OK
    #3
    What he said. I was completely lost on that question.
     
  4. divyaprasad85 thread starter macrumors newbie

    Joined:
    Aug 31, 2010
    #4
    Need advice

    hi,
    How to check the device models if it 3g,2g or 4g

    Thank you
     
  5. saving107 macrumors 603

    saving107

    Joined:
    Oct 14, 2007
    Location:
    San Jose, Ca
    #5
    I think I have a vague idea. I know their is an app in Cybia that allows iPhone, iPhone 3G and iPhone 3GS owners to use the back camera to video chat with iPhone 4 owners over FaceTime.

    Am I close? (hot/cold/warm?)

    Now this part needs to be rephrased. What do you mean by check the device? when you call that phone? when you are holding it?
     
  6. divyaprasad85 thread starter macrumors newbie

    Joined:
    Aug 31, 2010
    #6
    When you taking picture using iPhone camera.How you know that which device model(2g,3g,4g) your using.Any Idea


     
  7. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #7
    How would you not know the model you are using when taking a picture?
     
  8. der-kaiser macrumors 6502

    Joined:
    Jun 24, 2010
    Location:
    Brisbane
    #8
    Do you meant from the pictures taken? Lets all chip in here.
     
  9. Givmeabrek macrumors 68030

    Givmeabrek

    Joined:
    Apr 20, 2009
    Location:
    NY
  10. ozzyman500 macrumors 65816

    Joined:
    Feb 4, 2009
    #10
    Wow, I'm lost. You should know which device/model/iOS version you have already.
     
  11. ubestbsteppin macrumors regular

    Joined:
    May 23, 2008
    #11
    I think the OP is asking that if all you have is the picture, how do you tell which iPhone model took the picture. I assume that's in the metadata? I've never looked.
     
  12. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #12
    I assume this is meant to be a programming question (posted in totally the wrong place hence the confusion).

    Anyways... you can use the low-level AVFoundation framework to get an array of camera devices using devicesWithMediaType:. If the returned array has only one element (assuming you used media type AVMediaTypeVideo) then there is only one camera and you don't have a choice. If the array has two elements then there are two cameras and you can use your code for the front-facing camera (if you want to get the front-facing camera from the returned array then the constant AVCaptureDevicePositionFront will give you the position in the array of the front facing cameera).
     
  13. dalee18 macrumors newbie

    Joined:
    Jun 18, 2010
    #13
    I think he's trying to develop an app, and wants the app to check if the device is iphone 4 (= use front camera) or iphone 3gs or earlier (= use back camera).

    Am I close?
     
  14. ScootPatoot macrumors regular

    Joined:
    May 16, 2008
    #14
    I'm not sure what the OP is saying either but bravo for everyone who posted trying to help instead of bashing the guy.
     
  15. FamiliaPhoto macrumors 6502a

    FamiliaPhoto

    Joined:
    Jul 24, 2009
    Location:
    Chicago, IL
    #15
    I'm not sure what the OP is after, but if you look at the Metadata of the picture it will tell you the phone and firmware installed.

    Looking at pics from my 3G it is flagged as iPhone 3G and looking at pics from my iPhone 4 it is flagged as iPhone.

    I also get the impression he is looking for information on the default camera used for an IP4 but I'm not sure.

    Hope this helps
     
  16. divyaprasad85 thread starter macrumors newbie

    Joined:
    Aug 31, 2010
    #16
    Thanks for reply


    Yes your correct.

    Thanks


     
  17. Lotso macrumors 6502

    Lotso

    Joined:
    Jul 21, 2010
    Location:
    OC, California
    #17
    Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7)

    Mission accomplished. Almost.
     
  18. vastoholic macrumors 68000

    vastoholic

    Joined:
    Jan 28, 2009
    Location:
    Tulsa, OK
    #18
    Well then I am out of my league on this one. Still trying to learn the basics of the SDK. I was blown away by the "Hello World" tutorial so everyone else enjoy. I have no idea how to figure this one out. Good luck OP and I hope you post your app later on in the forums.
     

Share This Page