Displaying 4 posts tagged with 'iphone'
Background Apps on the iPhone
The iPhone 2.0 software was recently released, and with it came the ability for users to download native apps (i.e., not web sites) directly to their phones from within the iPhone UI or via iTunes. Developers (anyone who pays Apple 59GBP for the privilege) can then write their own apps and have them available for purchase in the App Store.
One limitation of the Apple-sanctioned SDK is that only one application is allowed to be running at a time. This presents a problem for apps such as IM clients, music players and other programs whose functionality relies on being able to run in the background. Another example (courtesy of James) would be an app that takes advantage of the iPhone 3G's GPS chip to create a log of all the places you visit.
However, there is a neat trick that I discovered: your app will only get terminated if you switch away from it, and hitting the iPhone's power button while your app is in the foreground doesn't count as switching away. The upshot of this is you can create apps which continue to run while the iPhone is in your pocket - perfect for the GPS example.
Achieving this is as simple as implementing two methods in your UIApplication delegate - applicationWillResignActive: and applicationDidBecomeActive:. Here's a simple example to demonstrate the effect.
In your UIApplication delegate header file, add a new ivar: BOOL activeApp. Then, in your implementation, add the following three methods:
- (void)applicationWillResignActive:(UIApplication *)application {
NSLog(@"resigning active status...");
activeApp = NO;
[self performSelector:@selector(sayHello) withObject:nil afterDelay:1.0];
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
NSLog(@"becoming the active app...");
activeApp = YES;
}
- (void)sayHello
{
NSLog(@"Hello!");
if (!activeApp)
[self performSelector:@selector(sayHello) withObject:nil afterDelay:1.0];
}
Then run the app on your iPhone, hit the power button, and watch the log fill with pointless but oh-so-cool messages.
Of course, when the phone is put into standby mode by the user the expectation is that barely any juice will be drained from the battery, so it's a good idea for your app to reflect this. Indeed, you can make a big difference by halting your updating of the UI; the user isn't going to see it when the screen is turned off.
This isn't a perfect method, and won't be helpful in situations where the user wants to do other things with their phone while your app continues to run. However it might come in handy for certain scenarios.
iPhonalicious
Whenever I went out anywhere, I always used to put my iPod in my left pocket and my phone in my right.
Since I got an iPhone, I'm never quite sure which pocket to put it in.
CityWall, Ubuntu and Vegetarian Cafes
Wandering around one of the squares in Helsinki this evening, I stumbled across an interesting installation in the side of a building, called CityWall. It's a large touch screen interface that displays photos taken around the city by inhabitants and visitors. You can interact with the display by 'grabbing' the photos with your hands and manipulating them as if they were real photos on a flat surface.
Shruti playing with the CityWall installation.
The interaction is quite intuitive doesn't present any real difficulty when using it. On occasion it would get a bit confused and stop responding for a second or two, or zoom a photo to fill the entire screen with nothing more than an accidental flick of the wrist, but on the whole it's very easy. The display is kind of tucked away under an awning, and I only noticed it because of the light being emitted from the screen. When we were playing with it, I noticed that lots of other people gathered behind us to watch, and a few stepped forward to have a go too. What's nice is that more than one person can use the system at a time, and the screen is wide enough to accommodate three people stood side-by-side.
From an HCI point of view, the project spans a lot of ground. The interface, while not entirely novel (see the Multi-Touch interface as pimped by Jeff Han for the most recognisable example), isn't something the general public are likely to have come across (yet, at least. The pending release of the iPhone will bring two-fingered touch screens to the masses). The user-generated content is another aspect, although it is curated and moderated by the project organisers as opposed to displaying unfiltered content directly from users. Pictures (and video, apparently) are sent to the screen as email or MMS messages, and certain items are selected to be displayed based on their relevance to current events in the city. I wonder how the system would be different if it allowed instant and unfiltered display of user content? That users can attach captions to photos draws some parallels with digital story projects, such as Story Bank. Currently there appears to be no way to retrieve content from CityWall to take away with you, it has to be experienced in-situ.
On a different note, we discovered a rather cool cafe just around the corner (everything seems to be 'just around the corner' in this town, I love it!). It's a vegetarian place that serves fair trade coffee (the first time I've seen that logo so far), has free WiFi access, a shelf full of books, board games and the like, and, best of all, a stand of Ubuntu Linux CDs! The CDs appear to be placed there by either Linux-tuki or Ubuntu Suomi, which makes sense as this place is the home town of the project we all know and love. There were only a couple of CDs left, so I guess there are some happy Ubuntu converts out there. On the other hand, they deperately need updating, as the CDs were version 5.10 (the "Breezy Badger" version, which was released in October 2005). Better still, they had a laptop sitting on a table which was running Ubuntu and free for all and sundry to use to check their email, surf the web, etc. Although the cafe was nice, I got the impression that it was very 'local', as I didn't see a single word that wasn't Finnish. We felt very welcome, however (although we got there 15 minutes before closing time, so didn't want to hang around too long).
Random observation: Since arriving, my mobile phone signal hasn't (that I've noticed) dropped below 100%. Apparently landlines are few and far between in Helsinki, so it makes sense that mobile coverage is above what Swansea has led me to accept as 'normal'.
Macworld Announcements
So today Steve Jobs took to the stage to deliver one of his customary 'Stevenotes' at the Macworld Expo, and now everyone (myself included, admittedly) is salivating over the Apple TV and the iPhone. While these two announcements certainly are good news, what interested me was the information Apple didn't make available.
Starting with the Apple TV, a couple of questions spring to mind:
- What Intel CPU does it use?
The Tech specs page for the Apple TV claims it uses an Intel processor, but it declines to reveal exactly which model it uses. Arguably, it's not really important, because the device runs a specific set of programs and performs a limited number of tasks, so the speed of the chip isn't relevant as long as it can do these things fast enough. Nevertheless, it's curious that we're left none the wiser. Maybe OS X is now running on a 3rd architecture, one now shared between the Apple TV and the iPhone. - What OS does it run?
After all the emphasis placed on the iPhone running OS X, it's odd that there's no mention of the platform in use on the Apple TV. At a guess I'd say it's a stripped-down OS X similar to that employed by the iPhone. - Can it run 3rd party applications?
Will we see custom programs on the device at some point in the future? Judging by how Apple have handled games on the iPod, it's unlikely, but it could happen. How long until we see Linux on it? :)
The iPhone looks like an amazing piece of kit, but there were a few things missing from the announcement:
- Real system specs
How much RAM does this thing have? What processor does it use? What about the 3D capabilities? Judging by the shiny graphics and the fact that it's got Cover Flow, it's clearly got some kind of 3D acceleration. - What does 'Operating System: OS X' actually mean?
So we've been told that the iPhone runs OS X, but how much OS X functionality does it actually have? Obviously the interface is very different from the familiar face of OS X that we've seen on notebooks and desktops previously, but what about under the hood? Does it still have the BSD subsystem? Are all the applications we've seen built with Cocoa? - Does it run custom applications?
For me, this is the big one. If this thing is anywhere near as capable of running user-developed applications as Macs and Windows Mobile-powered Pocket PCs and smartphones, it's going to cause me to run out into the street and fall to the floor screaming with glee. I've not (yet) used Xcode for any serious development, but my experience with it so far has been extremely pleasant.
Visual Studio, for all its faults, does provide a seamless platform for developing and deploying mobile applications on .NET PDAs. The prospect of being able to develop for the iPhone in Xcode and use Cocoa and all its shiny bits is something that really appeals to me, and I'd make the switch from Visual Studio in a heartbeat. - Why no 3G?
Maybe the 3G revolution really hasn't arrived here or in the USA yet, but considering the emphasis placed on internet access on this phone, I'm surprised that it doesn't have a faster connection. On the other hand, I don't know an awful lot about mobile phone networks, so perhaps this point is irrelevant.
I'm sure I had more points to add to this, but I just started watching the keynote stream and now I'm getting distracted...
Overall, I'm damn excited about the iPhone, and as soon as it's released over here (and I can actually afford the damn thing), I'm going to grab one.
