Nov

28

iPhone proximity sensing IS in the API

16 years ago, at the end of November | Leave a Comment

There seems to have been a lot of misinformation flying about of late. With Google releasing a new version of their app incorporating proximity sensing, some blogs have claimed this is breaking AppStore rules by using undocumented hidden (non public) API calls. I’m here to tell you that’s just rubbish. All that has happened is the people reporting it haven’t even bothered to check. Want to prove this to yourself?

1. Start Xcode and pick one of the templates.
2. Load up the AppDelegate code and skip to ‘applicationDidFinishLaunching’.
3. Type ‘application.’ (note the full stop after the word application)
4. Hit escape and you’ll get a list, scroll down to items starting with P
5. Oh look there it is…

For those without Xcode here’s a picture.

Oh, that must be the non-public public api...

Oh, that must be the non-public public api...

For those that want to see the what the documentation says


proximitySensingEnabled

A Boolean value that determines whether proximity sensing is enabled.

@property(nonatomic, getter=isProximitySensingEnabled) BOOL proximitySensingEnabled

Discussion
YES if proximity sensing is enabled; otherwise NO. Enabling proximity sensing tells iPhone OS that it may need to blank the screen if the user’s face is near it. Proximity sensing is disabled by default.

Availability

Available in iPhone OS 2.0 and later.

Declared In
UIApplication.h

Unfortuneately once some people grab hold of false information no facts will get in their way. Anyone that knows me will tell you that I’m really not fond of either Google or Apple, but let’s just get stuff right shall we.


Update:
I’ve had some discussion on irc and it was felt that I should point out that proximityStateChanged is used and following some additonal chatter on IRC with UncleBob who pointed out that “It’s not private in the OBjC sense just the Apple documented SDK sense. ” he then went on to say “the whole thing is definately a peanut-gallery cockfest” which sums it all up really.



»crosslinked«

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tagged with:
November 28, 2008 11:43

Nov

11

Concept iPhone Application

16 years ago, mid-November | 3 Comments

I’ve been messing about trying to learn how to write iPhone apps. There’s a lot to take in but at the moment I’ve managed a concept application. A little shop (of horrors ;). At the moment it simply reads data from an sqlite database and then displays information on the product. The buy now button currently just jumps to the product url at Linitx.com.

Update: Added a screenshot when rotated. The iPhone SDK handles the rotation automatically, all you need to do is specify which parts of which objects move or resize. All that can be done from Interface Builder. Easy as pie. Also note the changed title bar colour, in keeping with LinITX, and the title text. The shop title (LinITX) and shop base product URL are read from a plist file. I suppose they could be read from the sqlite db but I am experimenting so learning how to read a plist file is useful too.

Update 2: Spent ages last night trying to work out why some of the text descriptions for products came out of the database as null. Discovered that when importing the data file it wasn’t using UTF8 encoding, which is apparently all sqlite deals with. Loading up the source data file into TextEdit under OSX and saving it as UTF8 then reimporting solved the problem. I also modified how things are displayed. The image and text are inserted into a UIWebView so are now scaleable by the user. The images are also base64 encoded and in the database. This increases the database size but means the application can still be used offline. Before none of the pictures would display if there was no network connectivity.

Update 3: Added the ability to search the list. The search bar appears when the search button is pressed and hides again when the search is complete.

Product ListProduct detailProduct detail rotatedAdditional toolbarSearchSearching for DDR2 memory



[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tagged with:
November 11, 2008 20:35

Nov

1

Meet JO Black

16 years ago, at the start of November | Leave a Comment

Having the IMIV in the car makes driving around much more fun but up until recently I had my iPhone and prior to that my iPod Classic flapping about on the passenger seat. It worked but wasn’t particularly elegant and of course the moment I had a passenger in the
car there was a problem. This week I finally broke and decided to sort out the problem. To be honest I was looking for something cheap and functional. A quick search lead me to the JO BLACK from x castro design. This is a rather simple frame with what I can only describe as a bulldog clip on the back. The JO works rather simply. You squeeze the clip to open it and slip it onto one of your car air vents. Your iPod or iPhone or other device slips into it, gently held by the neoprene arms. The arms can be bent to allow more or less grip, so, although it seems to be an iPhone or iPod holder it isn’t just that, it can safely hold pretty much any handheld device – within reason of course. The fact that it has an open base means I can have the IMIV cable connected with no issues.

The JO is available with the neoprene in one of 7 colours, the base frame is always black but the colour range is varied enough for most tastes.

If you’re looking for a passive holder for your phone or music player then for the money the JO series suit. One thing I did notice when looking at the pricing on their site compared to Amazon was that although the x castro site and Amazon prices matched (after shipping), there seemed to be no way to select the free shipping for the UK. The 3 options in the dropdown box all added more to the price.

Front viewFront viewSide viewAngle sideWith battery



[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tagged with:
November 1, 2008 14:37

Current Electricity Use (15min)


iPhone/Webkit RSS Reader

Links


Tags

1-Wire android api Apple arduino currentcost DDAR development DVD FIC freerunner G1 google Google Phone gphone gprs GPS hardware image image builds inspiration iphone jailbreak kiosk linux Mac monitoring Music neo 1973 Nokia openmoko opensource OSX Pachube personal qtopia rhubarb rikki Rio slimp3 slimserver software tracking Trolltech u-boot


Twitpic


Graphy Stuff






Nasty Spam Monkeys