Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 20, 2011, 08:07 PM   #1
primedime
macrumors member
 
Join Date: Mar 2011
Location: Ft. Lauderdale, FL
Using Proximity Sensor in app

I want to make a push up application where you would place the phone underneath yourself and as you completed a push up it will count for you.... I used a few from the app store that did this and it works nicely... I tried looking this function up in the library but I must not be searching the correct keywords, anyone want to point me in the right direction?

Thanks!!
primedime is offline   0 Reply With Quote
Old May 21, 2011, 03:03 PM   #2
jnoxx
macrumors 65816
 
jnoxx's Avatar
 
Join Date: Dec 2010
Location: Aartselaar // Antwerp // Belgium
I just googled your title, and found several stuff for this..

Code:
 Just observe the notification: UIDeviceProximityStateDidChangeNotification
so, i guess u know what to do now.
jnoxx is offline   0 Reply With Quote
Old May 21, 2011, 03:21 PM   #3
primedime
Thread Starter
macrumors member
 
Join Date: Mar 2011
Location: Ft. Lauderdale, FL
Thanks, I was getting a lot of articles in regards to Apple fixing the proximity sensor issues and nothing about xcode. I will do some research on this now, doesn't seem to be that difficult to implement in my app. But then again, only time will tell!
primedime is offline   0 Reply With Quote
Old May 25, 2011, 08:53 PM   #4
timbojill
macrumors member
 
Join Date: May 2011
Quote:
Originally Posted by jnoxx View Post
I just googled your title, and found several stuff for this..

Code:
 Just observe the notification: UIDeviceProximityStateDidChangeNotification
so, i guess u know what to do now.
What are the properties ? I want to create an apps that does A if there is no movement and B if there is movement. So in theory someone will hit a button I will tie to UIDeviceProximityStateDidChangeNotification.
timbojill is offline   0 Reply With Quote
Old May 26, 2011, 02:48 AM   #5
jnoxx
macrumors 65816
 
jnoxx's Avatar
 
Join Date: Dec 2010
Location: Aartselaar // Antwerp // Belgium
it's not if (movement) else blah. because it's only when u put your finger on the proximity sensor it will be triggered.
If u want to check for movement, I think it's best u look at some camera apps which can figure out of something is moving. or Accelerometer or something similar.
jnoxx is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone 4 iOS 5 Proximity Sensor g00degg iOS 5 and earlier 2 Nov 2, 2011 08:16 PM
In App purchases and ways to do it phillydogg28 iPhone/iPad Programming 3 Jul 13, 2011 08:29 PM
Iphone 4 proximity sensor Fix? Howdr iPhone Tips, Help and Troubleshooting 8 Mar 18, 2011 06:18 AM
iPhone 4 proximity sensor... shriksworld iPhone 11 Nov 19, 2010 08:08 PM
Proximity Sensor for Apps? Briview iPhone 0 Jun 25, 2010 04:55 AM


All times are GMT -5. The time now is 11:10 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC