Posts tagged with 'iphone'

POPA and Glif: photography accessories for the iPhone 4/4S

I’ve been playing around a bit with Kickstarter recently. One of the projects I offered to fund was originally called Red Pop, a gizmo that attached to your iPhone to (a) give it a better grip like a normal camera, and (b) have a nice physical button on top to take photos. They reached their funding, got asked by Red to rename it to avoid any confusion (which they did, to POPA), and then eventually released it. (The following photo is courtesy Beep Industries.)

The POPA grip and shutter button

I finally got mine a couple of weeks ago. There’s also an app you download to provide the software support for the button grip. You essentially push the grip onto the phone (there’s a standard iPhone connector in the grip). It’s a nice tight fit so it doesn’t fall off. Pushing the grip onto the phone starts the app. After that, you’ve got yourself a phone that looks a bit like like a retro camera. The app takes photos, has its own camera roll, and you can share photos in the usual social networking manner from within the app.

So what do I think? First of all, I find it really easy to take photos with the phone now. Before POPA, I would find it hard to keep the device steady and also touch the shutter release button on the screen. For some reason, the act of pressing the button jogged the phone, which meant I was prone to taking blurry pictures. The app itself works well, although it’s a little annoying to have two camera rolls. You can however save individual photos to the standard roll, which makes it easier to use another photo app to process them in various ways, say with CameraBag.

The grip also has a standard tripod mount of the bottom, so you can use your iPhone on a monopod or tripod if you want.

The main downside is that you have to remember to carry the grip with you at all times. It does come in a little bag so you can stuff it in a pocket. You can’t keep the grip mounted all the time since it blocks off the mic, so you can’t take phone calls without having to whip it off. The other thing is that the grip is very tight. Putting it on for the first few times made me afraid I was going to scratch or damage the phone.

Apart from that the real problem is the price. It’s £50. Yep, fifty quid, not bucks. Which translates to around $85 once you factor in the shipping from England. (I got mine through my Kickstarter funding of $75.) Belkin have their LiveAction Camera Grip which, although not perhaps as good looking, has the same functionality. It’s $50 but can be found cheaper if you look (at the time of writing Best Buy have it for $10 off and free shipping).

I’ll also note that, with iOS 5 you can take pictures using the volume up button on the side of the phone. I’d have to say the “pushing down” rather than the “pushing away” action is the main factor in stabilizing the phone for me to take sharper pictures. So. maybe I just don’t need this external grip any more, although it does feel comfortable to hold. Let’s say 7/10 stars.

As regards my Kickstarter experience, not bad. Beep Industries kept us well informed about the progress (the grip went through a couple of changes as they geared up for manufacture) and there were a couple of videos to keep us wanting more. The only issue I have at the moment (which I’ll admit that I haven’t complained about) is that at the level I and 429 others funded, we were promised “You will also get your name 'in lights' and an image of your choice added to the ‘Thank You -You Rock! gallery’ on our Red Pop website.” Nope. Hasn’t happened. Oh well.

The other iPhone photo accessory I recently purchased was the Glif. (The following photos are courtesy Studio Neat.)

The Glif tripod mount

This is a pretty simple, yet nicely designed, accessory. You can either use it as a tripod mount like this (the iPhone just slides in, both portrait or landscape):

The Glif as tripod mount

Or as a stand like this for watching videos and the like:

The Glif as a stand

As I said, pretty simple and very nifty. Easy to carry around (you just keep it on the phone itself; it doesn’t get in the way). And a mere $20. There’s also the Glif+ which provides an extra perpendicular clip in case you’re worried the phone will fall out of the Glif and a screw-in eye for the tripod mount so you can attach it to a keyring or something. This one is a 9/10 for me.

Album cover for Pocket UniverseNow playing:
Yello - Monolith
(from Pocket Universe)


Rubik’s Cube iPhone app

A couple of months ago I finished an article for PCPlus about algorithms for solving Rubik’s Cube. It’ll appear in issue 298 in September 2010.

As part of my research I came across this article and video on Wired about an iPhone app that helped you solve it and, more than that, solve it in a remarkably small number of moves (usually 20 or fewer) using Kociemba’s algorithm. The free app (called CubeCheater) was written by Eric Faller. Unfortunately it seems he didn’t request permission from Seven Towns (the current owners of the license to market Rubik’s Cube worldwide) and had to remove the app. (Aside: my editor at PCPlus, Alex Cox, obtained permission from them for me to write about Rubik’s Cube for the magazine before I ever put electronic pen to Microsoft Word paper.)

Bummer. I would have liked to try the app and written about it as well. But, no go, so I submitted the article and forgot about it.

Imagine my surprise when this weekend, I was perusing the App Store when I came across the official Rubik’s Cube iPhone app. Further imagine my surprise when I saw that said app had exactly the same solver function as CubeCheater. Not only that, but the same interface.

Rubik's Cube iPhone app Solver interface

(Compare this to the interface shown in the video taken 18 months ago.) Interesting, no?

Anyway, I bought it ($4.99) to try it out. The only part of the app I was interested in was the Solver function where you input the state of a mixed-up cube and it solves it for you in as few moves as it can.

There is a cool feature where you input the faces using the camera rather than painting each cubelet with colors from the palette. You take a snapshot of the cube and the software works out the face’s grid and the colors in each cubelet.

For me and my particular cube this functionality is a complete and utter failure. The edge detection is pretty bad to begin with (hint: don’t try and fill the camera screen with the face like the image below, but make it occupy as much room as the image of the face above), but the color recognition just sucks. Here’s my white face (so called because it’s named after the center cubelet):

Actual white face on physical cube

And here’s what the app thought it was:

Interpretation of physical white face

There’s another problem which the app doesn’t address. For some unknown reason — perhaps because my cube is so old (I purchased it in 1979 before Ideal Toys got the original license to market the puzzle worldwide in 1980) — my cube center cubelets don’t follow the current standard positioning. I have red on the opposite side to white, not yellow. In fact, yellow and red are reversed on my cube, so, even if the camera input method worked, I’d have to fiddle with the colors anyway (wherever the app talks yellow, I have to think red, and vice versa).

OK, so given that for my physical cube I have to remember to switch yellow and red, does it work? Does it calculate a solution with a small number of moves? The answer is yes. It’s quite magical if you look at the cube after each move and see the colors slowly coming together.

I don’t particularly want to rate the app officially (after all, I haven’t tried the other parts of the app: solving a virtual cube on the screen with flicks of the finger, or the tutorial section), but I will admit to being very disappointed in the camera interface. Unlike this Sudoku Grab app, the AI in the Rubik’s Cube iPhone app is not that good at all.

Album cover for I Don't Know What You Want But I Can't Give It Any MoreNow playing:
Pet Shop Boys - I Don't Know What You Want But I Can't Give It Any More [the Morales Remix]
(from I Don't Know What You Want But I Can't Give It Any More)


Viewing divs with “overflow:auto;” on the iPhone

In playing around with my blog’s new iPhone support I came across a doozy of a problem.

I display all of the code quoted in one of my blog posts in a special div that has the overflow style attribute set to auto. On desktop browsers, these divs are rendered in a block with horizontal and vertical scrollbars. If the lines are too wide for the width of the div they’re displayed in, the horizontal scrollbar is activated; similarly if there are too many lines to fit vertically (I set max-height to 400px currently), the vertical scroll bar is activated. Here’s an example of some code from a recent post, so you can see the effect I’m talking about:

  class SafeStackItem<T> {
    public T Value;
    public Int32 Next;
  }

  class SafeStack<T> where T : class {
    private Int32 head;
    private Int32 count;
    private SafeStackItem<T>[] array;

    public SafeStack(SafeStackItem<T>[] array, int pushFrom, int pushCount) {
      this.head = -1;
      this.array = array;

      count = pushCount;

      head = pushFrom;
      for (int i = 0; i < pushCount - 1; i++)
        array[i + pushFrom].Next = pushFrom + i + 1;
      array[pushFrom + pushCount - 1].Next = -1;
    }

    public Int32 Pop() {
      while (count > 1) {
        Int32 oldHead = head;
        Int32 oldHeadNext = Interlocked.Exchange(ref array[oldHead].Next, -1);

        if (oldHeadNext >= 0) {
          if (Interlocked.CompareExchange(ref head, oldHeadNext, oldHead) == oldHead) {
            Interlocked.Decrement(ref count);
            return oldHead;
          }
          else

            Interlocked.Exchange(ref array[oldHead].Next, oldHeadNext);
        }
      }

      return -1;
    }

    public void Push(Int32 index) {
      Int32 oldHead;
      do {
        oldHead = head;
        array[index].Next = oldHead;
      } while (oldHead != Interlocked.CompareExchange(ref head, index, oldHead));

      Interlocked.Increment(ref count);
    }
  }

However on the iPhone there are no scrollbars. How the heck are you supposed to scroll wide lines from left to right or many lines up or down?

It turns out that iPhone’s mobile Safari has a special trick up its sleeve: you use two fingers. Place two fingers in the block and move them simultaneously. You’ll find that you can scroll the text up/down, left/right. Try it and see using the above code block.

Album cover for AffectionNow playing:
Stansfield, Lisa - Affection
(from Affection)


Adding support for iPhone with GraffitiCMS

This blog uses GraffitiCMS as the blogging engine. This software has now been open-sourced by the original developers, Telligent, and is available on CodePlex. Although it’s pretty full-featured and does most of what I want and need from a blogging engine (and has lots of features I don’t use) there is no built-in support as yet for providing a special view for mobile devices.

Consequently, when you view the site on an iPhone, say (since this is what I use as a mobile phone), it displays the wide full look (currently 3 columns across) in a much shrunken form. Better would be to display the site in a single column and — even better — to not display the full text of the usual 10 articles shown on the front page. So, this week, after helping sort out some Medium Trust issues one of the patches had introduced (and that had left my site in a bit of a fragile state), I set out trying to find a way to create a special view of the site for the iPhone.

The first hint was a package called Graffiti Extras. It’s available on CodePlex at version 1.3, but hasn’t been updated for about 18 months. It contains a plug-in called Mobile Theme Selector. Put simply, this plug-in installs itself into GraffitCMS and, when a request is detected and the user agent string passed by the browser indicates a mobile device, the code switches the theme for the request. The theme switched to is one you write in the normal manner — views and CSS files — but that is optimized for a mobile device.

Sounds simple enough, and I set it up, but it didn’t work. I’d connect with my iPhone and still got the usual full view. Meh.

I looked at the code: in essence, in order to identify a mobile device, all that happens is that the user agent string is tested to contain “IEMobile” (presumably for Windows Mobile devices) or that the Browser object’s IsMobileDevice returns true. Well, I knew the first would fail, but the second?

  if ((HttpContext.Current.Request.UserAgent.IndexOf("IEMobile") > -1) ||
      (HttpContext.Current.Request.Browser.IsMobileDevice))
  {
    GraffitiContext.Current.Theme = MOBILETHEMENAME;
    ...
  }

Time to investigate IsMobileDevice; surely it should recognize the iPhone?

It turns out, apart from some default behavior, IsMobileDevice uses an external definitions file in order to decide whether the user agent string identifies a mobile device. And, lo, that definitions file is also on CodePlex (here).

Once you download it, you should extract the mobile.browser file and place it in the /App_Browsers/Devices folder of your web application (if the folder doesn’t exist yet, create it). Restart your application (in my case, that’s GraffitiCMS) and you should find that the iPhone is recognized as a mobile device.

Next time, I’ll talk about what needs to be done in order to display a page optimized for the iPhone.

Now playing:
Lisa Stansfield - All Around the World
(from Affection)


The best Sudoku iPhone app (mostly)

I was chatting with Mehul in the DevExpress offices yesterday about writing iPhone apps with MonoTouch. He wanted to know what iPhone app had most impressed me, now that I'd had the phone for a little while and therefore what I might be trying to emulate in my own programming. My reply was Sudoku Grab.

Yeah, yeah, I can hear you saying. There are a bazillion apps out there already that do Sudoku. What's so special about this one?

Well, it's the grab part that fascinates me and that elevates this app above the run of the mill (I'll admit, the solving part of the app is quite ordinary). What I like is the way it uses other iPhone features rather than just the screen and touch interface. Without embellishing it too much, the grab feature allows you to take a photo using the iPhone camera of a Sudoku puzzle printed in a newspaper or displayed on your screen (say, from Web Sudoku). The program does a bit of image processing and OCR and imports the puzzle into the program's own interface. The program even determines the difficulty of the puzzle. You don't have to transcribe anything to play a puzzle on your phone, the program does it all. It really is quite magic to see it for the first time.

The author of Sudoku Grab has written a very informative blog post about how the image processing and OCR works. It's fascinating to read if you're at all interested in algorithms.

So, in short, it's the programs that make use of the iPhone's hardware features (GPS, compass, accelerometer, camera, etc) that I find the most interesting. It reveals that the author is trying to fit what might be after all a pretty bog-standard program into the universe of the iPhone to make it uniquely recognizable as an iPhone program.

Now playing:
Vangelis - DesolationPath
(from Blade Runner (25th Anniversary Edition, CD2))


Dipping my dev toe in the iPhone water

If you follow me on Twitter, you'll know I've been costing up what it would take to become an iPhone developer (especially given my penchant for Windows PCs and development and hence no Apple hardware). I've got a vague idea for an app, but then realize I'm just not thinking along the right lines...

iPhone fart app pulls in nearly $10,000 a day

Apple’s App Store is currently experiencing a plague of fart applications. Last week, I detailed one day in which at least 14 new fart apps were accepted into the store. And now, just in a quick search, it looks like there are about 50 apps all dedicated to making fart noises on your iPhone or iPod touch. Classy, I know, but why are there so many?

Because apparently there’s big money in fart apps — nearly $10,000 a day for the most popular ones.

NSFW: Boob App on the iPhone is Obviously Called iBoobs, Obviously Not Approved

Sir? Could I interest you in a boobs app for your iPhone? Perhaps one that's motion sensitive, so you can jiggle it at will?

Album cover for Nightlife Extra Now playing:
Pet Shop Boys - Je T'Aime...Moi Non Plus
(from Nightlife Extra)


Search

About Me

I'm Julian M Bucknall, the M because it's my middle initial and because I and the other Julian Bucknall (the movie guy) would like to differentiate ourselves.

I'm a programmer by trade, an actor by ambition, and an algorithms guy by osmosis. I write articles for PCPlus in my spare time, not that there's much of that.

Julian M Bucknall Apart from that, an ex-pat Brit, atheist, microbrew enthusiast, Pet Shop Boys fanboy, slide rule and HP calculator collector, amateur photographer, Altoids muncher.

DevExpress

I'm Chief Technology Officer at Developer Express, a software company that writes some great controls and tools for .NET and Delphi. I'm responsible for the technology oversight and vision of the company.

Validation

Validate markup as HTML5 (beta)     Validate CSS

Bottom swirl

Archives

February 2012 (4)
SMTWTFS
« Jan  
1234
567891011
12131415161718
19202122232425
26272829

Like this Archive Calendar widget? Download it here.

Social networking

Google ads

The OUT Campaign

The OUT Campaign

My Tweets

Bottom swirl