Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

divyaprasad85

macrumors newbie
Original poster
Aug 31, 2010
10
0
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
 
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?)

My question how to check the which device your running.
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?
 
When you taking picture using iPhone camera.How you know that which device model(2g,3g,4g) your using.Any Idea


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?
 
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.
 
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).
 
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?
 
I'm not sure what the OP is saying either but bravo for everyone who posted trying to help instead of bashing the guy.
 
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
 
Thanks for reply


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).

Yes your correct.

Thanks


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?
 
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.
 
Yes your correct.

Thanks

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.