Posts Tagged ‘ipad’

Web technology makes cross platform mobile development easy, right?

July 6th, 2010
, , ,

A few days ago AppStoreHQ released stats to say that from all the iOS and Android developers, only 1,412 developer have released apps on both platforms. On individual platforms AppStoreHQ claims there are 43,185 iOS developers and 10,199 Android developers.

Only 1,412 developers writing apps for both Apple and Android platforms. That seems very low.

To date I’ve used web technologies to build my apps – HTML, CSS, Javascript, Jquery, and sometimes Jqtouch. I made that choice for two reasons: firstly, they are technologies that I’m very familiar wit, and secondly, web technologies had the lure of “write once, run anywhere”.

But I soon discovered it wasn’t that simple – even using web technologies, cross platform development is a female dog.

Take I Can Has Cheezburger Pro Clock as an example. I started to port it to Android from iOS. Having ported before, I already knew there were some differences I’d need to handle – very basic things such as preventing the web view from scrolling, both from touch and arrow keys (which don’t exist on Apple platforms) – so I handled them and expected the app to work. It didn’t.

Every time I port an app, I come across yet another “implementation difference”. I thought I’d got them all, but no. This time the “difference” is just maddening – click events on blank areas of the screen are being executed on other areas of the screen.

Arrrrrghhhhh.

Such issues are not limited to Android either. In June I wrote about the iPad’s localStorage bug. Darn, I wasted some time on that one.

The promise of web tech may be “write once run anywhere”, but as yet, it doesn’t achieve it. Just look at the bug list in Jquery and you’ll see some of the challenges. Search for Android in the list and you’ll see it doesn’t appear once, and I don’t think that’s because Jquery has a perfect record on Android – it’s more likely there are bugs there that have not yet been reported because of the comparatively few Android apps out there (Apple only has a handful of mentions but significantly more apps).

I’m not picking on Jquery here – I think it’s fantastic – I’m just highlighting the challenges web developers face. It’s incredibly difficult to “write once, run anywhere”. The challenges don’t just stop at bugs and implementation differences either – there are emulator bugs on Android, and Apple and Android users interact with applications differently. I’ve written about some of those other challenges in this post: The top five things I learnt as an Apple developer moving to Android development

I was rather shocked when I saw how low the number of cross platform Apple Android developers there are – but thinking about it, and going through the experience of yet another porting, maybe it isn’t so surprising. I’d love to see stats on how many developers have started porting apps and given up. I’ve certainly considered giving up on Android development in the past myself because of the effort v sales ratio compared to Apple, but so far I’ve stayed with the platform because, fundamentally, I believe it’s important to support Android and help it grow. It has stopped me from porting all my Apple titles though.

I Can Has Cheezburger Pro Clock is available on AppStore now, and it will be available on Android once I can track down the 2.1 bug. Beer in Japan and Beer in Korea are both available on Android Market.

Why the iPad is an unfinished product

June 24th, 2010

Yes, the iPad doesn’t have iOS 4 – but that’s not the only thing that makes it feel like an unfinished product. iPad OS 3.2 definitely feels rushed out the door. Here’s why:

1. Lack of international keyboards

I’m British, but as well as English, I speak, read, and write Korean and, to a lesser extent, Japanese. One of the reasons I bought an iPhone was for Korean and Japanese support. I was flabbergasted to discover the lack of Korean on the iPad – and not just Korean, there’s no Thai, Hebrew, Polish… the list goes on.

No Korean on the iPad

No Korean on the iPad

With Mac OS X and iPhone both having full international support, I never even contemplated that the iPad wouldn’t have them.

2. An unfinished App Store

You know that swipe thing – part of Apple’s lovely touch interface? Here’s a list of my iPhone apps displayed in AppStore on the iPad:

Breaking Art's iPhone Apps

Breaking Art's iPhone Apps

How do you get to page 2? Do you swipe? No, you have to touch the arrow buttons – and then the animation swipes the page. Way to break your own interface conventions, Apple.

Now look at this page:

App updates on iPad

App updates on iPad

I’m in the Updates section. Now if I want to go out of this and search for an app – say, Beer in Korea – how do I do it?

To search for an app, I have to click “Featured”, “Top Charts”, or “Categories” to get a search box – and the search box doesn’t actually search the category I’m in, it searches everything. There’s ample room at the bottom of the screen for a search box or even a search button – why is finding search so unintuitive (but then if I want to redownload something, I have to “buy” it again – possibly the most unintuitive piece of interface design ever.)

And as for apps, Apple’s own Remote, Texas Hold ‘Em, and even the new iTunes Connect application don’t run as native apps on iPad. Would it really have taken that long to convert Remote?

3. The built in jobs are a hatchet job

Ok, so I knew it was not iOS 4 – but the given that the mail interface had to be completely redesigned, I at least expected a unified mailbox. I hoped for more than one exchange account. And I was longing for the ability to get a pop-up (like a push notification) when mail arrived (that’s not in iOS 4 either, sadly).

Genre display on iPad - who the heck designed this?

Genre display on iPad - who the heck designed this?

The iPod app? It feels like something you’d expect on a chiPad. Click on Songs or Artists or Albums and it kind of behaves as you expect – but click on Genres and you’re faced with a pop-up showing all the songs of that genre, with no way to filter further.

All I can say is that it’s a good job I didn’t get the 64GB version of the iPad. I have my music split into British, Korean, Japanese, Thai, etc – the popup for each would have hundreds or thousands of entries. Even on the iPhone, clicking on a genre brings up a list of artists in the genre.

And where is the visualiser? How much fun is it to be presented with this when I’m listening to an album?

Possibly the best use of 1024x768 pixels ever

Possibly the best use of 1024x768 pixels ever

4. It only has 256MB

Back when OS X came out, I bought the first redesigned iBook with OS X. I supported Apple with the OS X launch. A year or so later they upgraded OS X to take advantage of video ram, making the OS more responsive. My iBook didn’t support it and started to run like a dog.

I bought the iPhone 3G before the “Cut and Paste” OS 3 upgrade. It was beautiful to get cut and paste, but it came at a huge price – random 10 second delays when you least expect it. Yes, the Apple dog had come back, and this time it was definitely a bitch. Thankfully iOS 4 goes some way to putting down that animal.

Being bitten again was my biggest fear when buying the iPad – and lo-and-behold, a week or so after I bought it, news leaked out that the iPhone has 512MB of memory.

I expect that there will be a new iPad at some point with a camera – that doesn’t really bother me. It the screen is updated to a retina screen – something that I don’t think will happen in the near future – that doesn’t really bother me either. But if iOS 4 runs like a dog on the iPad because it only as 256MB, I will be seriously annoyed.

My only hope is that enough people have the iPad and are holding onto the iOS 4 “autumn promise”, that if it doesn’t run well on the existing iPad, it will be a publicity nightmare for Apple and people will abandon the platform.

That aside, to use Safari and for it still to be refreshing pages when you return to them – seriously Apple, what were you thinking putting just 256MB in the iPad?

As for the screen – will it come to the iPad? 1024 x 2 x 768 x 2 would be higher resolution than most computer monitors, and expensive. If Apple has to update the iPad to the retina screen because the iPhone has been updated, does it follow that it needs to update its MacBooks too? I’m not convinced we’ll see a retina iPad any time soon – I suspect a camera will be first.

5. It only has 11,000 apps

Were you sold on the “it can run your iPhone apps” line? I was. And then I tried running my iPhone apps. After less than a minute, I started deleting every iPhone-only app off the iPad.

An iPhone app on the iPad

An iPhone app on the iPad

The iPhone emulator just sucks. If you could run two iPhone apps side my side, then I could see the use – but unless it’s something which I would die without, I can’t see anyone seriously using an iPhone app on the iPad, especially since most people already probably have iPhones. I’d rather run the app in my iPhone.

And from the 11,000 iPad apps that are available, so many of them have human interface crimes to humanity, it sometimes makes me cringe.

The iPad AppStore actually reminds me a lot of Android Market. On the iPhone, if I want something then, yes, there will be an app for it. On Android and iPad, there are still glaring holes. There’s still not a Twitter client as good as Twitbird on iPhone (Twitterrific is the only one that comes close).

6. WIFI

Come on Apple – it’s months after the iPad was first released, and it still has WIFI issues? In my case, if I leave WIFI on, the iPad will eventually start popping up “Password please” boxes and fail to accept the correct password. The only solution is to reboot the iPad.

What’s the good news?

Don’t get me wrong – I do like the iPad. It just feels unfinished.

The good news is that with the exception of #4, all of the above is software related – at least, I hope #6 is software related – and as long as software upgrades dont screw the performance of the machine – see #4 – they can all be fixed. The iPad could, some day, become a finished product.

There are a lot of things right about the iPad. Battery life is phenomenal – I can leave the iPad in standby all night and it wont even consume 1% of battery. Using Mocha VNC to access my home PC is a joy. And when I’m at home, for quickly picking up and checking mail or a website, I now grab the iPad instead of my laptop. It doesn’t replace my PC, but it’s useful – and, of course, as a developer it’s essential to me.

I even find myself reading books on the iPad more than I read them on my Kindle. In fact, with the iPad for coffee shops and at home, and the iPhone for reading on the subway, the only use for my Kindle is when reading in bright sunlight. It’s not all bad news for Amazon though – I am using the Kindle software, because it doesn’t lock me into the Apple platform.

Diet Cakes is #4 for the search term "lose weight"

Diet Cakes is #4 for the search term "lose weight"

So there are good things about the iPad, and as a developer, the lack of applications is actually a bonus – because it makes your applications stand out. Search for “lose weight” and my application Diet Cakes is in the top 6 for iPad apps – it’s on page 9 on the iPhone apps list (but I have just made it iPhone compatible – originally it was iPad only.) When someone buys an iPad – as 3,000,000 people have done – they want apps, so this isn’t a bad thing.

Beer in Japan for iPad, iPhone, and iPod Touch

Beer in Japan for iPad, iPhone, and iPod Touch

And as well as exposure – the iPad offers exciting new opportunities. While I’ve still to fully take advantage of the iPad’s features, I already love using my app Beer in Japan on the iPad more than on the iPhone.

The iPad definitely has to mature. Apple has not yet got the OS right, and developers – like me – are still learning how to write for the iPad. I just hope that Apple doesn’t cripple the iPad’s performance before it becomes a finished product.

My iPad apps: Diet Cakes, Start The Day With POWER, Flickr Clock Photoframe, FailClock (with Engrish too!), and Cat Fun and Dog Fun – lolcats and loldogs. The universal Beer in Japan app is currently awaiting Apple approval. iPad versions of my other iPhone apps will follow soon.

iPad localStorage bug – test your apps!

June 21st, 2010
,

Updating Flickr Clock Photoframe for iPad, I discovered a bug in the way iPad handles localStorage. Searching around on the internet, it seems others have found the bug too.

On the iPad, sometimes – but not always – setting an item will fail:

var teststring = 'abc';
localStorage.setItem('testing', teststring);

or

var teststring = 'abc';
localStorage.testing = teststring;

What’s most annoying is that sometimes setting an item fails and sometimes it succeeds, and when it does fail, it just fails silently, stopping the current function. It can’t even be detected in a try/catch – so it isn’t throwing an error like QUOTA_EXCEEDED_ERR.

The solution is to clear the item first:

var teststring = 'abc';
localStorage.removeItem('testing');
localStorage.setItem('testing', teststring);

or

var teststring = 'abc';
localStorage.removeItem('testing');
localStorage.testing = teststring;

If you have an iPad application that uses Javascript and local storage, you’d better test out your app. It may affect sessionStorage too.

The top five things I learnt as an Apple developer moving to Android development

June 15th, 2010
, , , , , ,

1. Android users use apps differently

On the iPhone and iPad, everything is touch. You navigate from A to B and want to go back to A, you expect that there’s a “back button” on the screen. You want to take an action, you expect there’s an on-screen thing to press to do it.

Android devices are not the same. Android devices have buttons, and people expect them to work. When I first wrote Beer in Japan for Android

Beer in Japan for AndroidBeer in Korea QR Code…my test users immediately raised the issue that the back button didn’t work. Replies of “just press the back button on screen, damn you!” were met with “it’s unintuitive” and “that’s so iPhone!”

When I installed Opera Mini on my $99 Android tablet, it confused me – because after entering a URL, there was no GO button on-screen. I thought it was a bug! But no, Opera Mini requires you to use the MENU key to do certain functions.

Android and iPhone apps are different. I suspect a lot of people who want to write web-apps once and roll them out across multiple platforms are going to get a nasty surprise.

2. You can’t trust the emulator

When I got my hands on my Android tablet, I was shocked to discover two things. Firstly, my apps which were supposed to “scale up” automatically to tablet size didn’t (despite me having the correct flags in the manifest set). Secondly, my apps which were detecting an internet connection were not working properly – they were reporting that there was no internet even when there was a working WIFI connection. Apologies to anyone who bought FailClock, lolcats!, or Engrish Crock – the issue is fixed now so please update!

I consistently get inconsistent behaviour when it comes to screen sizes and rotation on the emulator; the network on/off toggle is 3G only – it doesn’t simulate having a WIFI only connection; launching the mail app cannot be done on the emulator; market links cause apps to crash;…

Fact is, you need a device. And even if you have one, you better test across different screen sizes and devices. For any Android developer, a device like this is essential. It’s worth its weight in gold.

3. Android users buy apps differently, and the Android Market situation is a mess

On an iPhone, you buy an app and it’s bought (unless it’s a $1000 app that your kid buys by accident!)

On Android, users can refund apps within 24 hours. That really keeps you on your toes, because if you see an app being refunded often, it means it’s either buggy or it’s crap. In my case, some one of my apps were being refunded due to the WIFI issue – it took until I bought an Android tablet to know that.

In addition to refunds, there are Android Market issues. On Android Market, you can only price your app in one currency, and it’s determined by the country in the seller’s profile. If you are based in the UK, your apps will be priced in UKP, and that’s what buyers in the USA will see – a UKP price. That refund thing I mentioned earlier? Not uncommon for a US purchaser to see an app at 69p, buy it, then realise it’s 69p and not 69c and refund the app. And if you’re selling from outside the US, get prepared to see “Payment declined” quite frequently also – not all US credit cards allow purchases in other currencies.

It’s not all rosy for US sellers either – many UK buyers get slapped with an unexpected bank charge for dollar transactions if they use debit cards. Ouch.

And the issues don’t end there. People in countries such as Ireland and Belgium can’t even buy applications. Maybe Google worries that the Irish and Belgians will always be drunk on Guinness and Leffe? Want to sell to those users? (I love drunk users!) You have to deal with alternative market sites such as SlideMe.org – and those sites insist you fill out US tax forms if you are an overseas resident. I tried reasoning with SlideMe – neither Google nor Apple requires tax forms, and they don’t withhold tax either – but the replies I got back just reinforced the impression that SlideMe is run by a teenage kid out of his bedroom.

The issues don’t end there either. Some devices – such as the one I bought and those from Archos – don’t have Android Market at all, not even for free apps.

Oh, and the issues don’t end there either. How do you direct link to an app you’ve written for Android? Unlike Apple, there are no nice http links for Android apps. market:// links only work on devices with Android Market (and they crash apps in the emulator!) The only solution I’ve found – codes like this one:

FailClock QR CodeAt least Google are fixing this issue.

Fact is, selling on Android ain’t easy.

There isn’t a day goes by when I’m not approached by another new alternative Android Market opening, often because a device maker is locked out of Google’s market. Google really needs to sort this out. It’s barely worth my time uploading for Android Market as it is without every device maker having their own market. Am I really going to spend my time uploading to Archos market when sales are likely to be less than pitiful?

If any device maker does want my apps on their market, at least send me a test device. I need to make sure my apps work!

4. You have to go native, at least partially

My first thought for transferring my apps to Android was to use PhoneGap. That should work, right? Hmm, the PhoneGap “instructions” page wasn’t encouraging – as well as looking horrendous to set up, too many people said that it just didn’t work as it should. Unanswered from Sept 2009:

Having the same issues as Tavis and Ed Turner … Also, still wondering about all the missing images on this page. Tried with the standard download and github build, no dice. Keep in mind I am able to create and run standard projects with the same eclipse install, AVD and all, but if I wanted to write Java, I won’t be here.

It seems like I’m missing a step in the project setup.

Anyone?

My next thought was to use Titanium. What a mistake-a-to-make-a. From installation, Titanium was bugged – it didn’t allow apps to be run in the Android emulator. Once I hacked that to work by searching Google, I found that 80% of the time my builds were not being installed in the emulator – I had to delete and rebuild the emulator all the time.

When I did get something running, I discovered the iPhone tricks I used to prevent page scrolling (essential for displaying maps on the Beer in Japan application), detecting internet connection (for FailClock and lolcats!), etc simply didn’t work. JQtouch had blinking issues when animating. Items rendered differently.

Cross platform web apps with Titanium and PhoneGap? I wish! In the end, it was simpler to build my own webview wrapper and hook my own calls into it from Java. At least then when I had an issue – such as with rotation – I could solve it easily by looking in Google’s official documentation, rather than trying to hunt around for hacks in PhoneGap and Titanium due to lack of documentation.

(As an aside, I’ve also working on moving away from PhoneGap for my iPhone apps – web apps are a good idea, but performance with JQtouch and JQuery on an iPhone 3G isn’t optimal.)

5. Apps uploads are immediate in Market

With Apple, app submissions take around a week. Once an app gets approved, it then appears across the world over the next 24 hours. You get used to that as an iPhone developer. I’ve got in the habit of uploading my apps and the next day going back and spending time changing the descriptions later.

You can’t do that with Android. As soon as you upload an app, it’s there instantly. Immediately. Everywhere. Not only that, it’s sucked into a million and one websites that attempt to provide a web based front end to the Android Market (since Google doesn’t). You better make sure your words are perfect.

(Of course the fact that you can update apps instantly has advantages, especially when you discover bugs – sometimes I hate the week long Apple wait.)

A final note…

This post isn’t anti-Android and I’m not some Apple lover – heck, I’ve had enough insane rejections and review issues to make me think twice about Apple. This post is simply the lessons I learnt as an iPhone / iPod Touch / WebApp developer moving to Android – a post that I hope will be useful for others Apple developers thinking of writing for Android.

I plan to write a similar post for iPad development in the near future.

My Android Apps

lolcats for Android
lolcats QR Codelolcats!

failclock for AndroidFailClock QR CodeFailClock

Beer in Japan for Android
Beer in Japan QR codeBeer in Japan

Beer in Korea - new for AndroidBeer in Korea QR CodeBeer in Korea

World Cup Factoids and HistoryWorld Cup Factoids & History QR CodeWorld Cup Factoids & History

My iPhone apps include: FailClock, Beer in Japan, Flickr Clock Photoframe, and World Cup Factoids & History.

My iPad apps include: Diet Cakes, Cat Fun and Dog Fun, and Start The Day With Power.

The iPad comes to Docomo!

June 1st, 2010
, , , ,

Apple and Softbank thought they were being clever in Sim-locking the iPad to Softbank but Docomo has hit back with a WIFI router:

TOKYO, JAPAN, May 18, 2010 — NTT DOCOMO, INC. announced today that beginning June 1 it will offer a special discount on two data-service billing plans, targeting users of a soon-to-be-launched mobile Wi-Fi® mini-router, which will allow Wi-Fi-enabled devices to work on the DOCOMO 3G mobile network (see diagram below), as well as the existing FOMA™ data card.

Co-developed by NTT Broadband Platform, Inc. and BUFFALO INC., the mini-router fits easily into a pocket or purse. It is scheduled to be sold at a number of DOCOMO outlets beginning in late June.

The mini-router will allow tablet computers, notebook PCs, handheld gaming consoles and other devices with wireless local area network (WLAN) capability to connect easily and quickly to the Internet anywhere in DOCOMO’s nationwide FOMA 3G network.

As a special discount, DOCOMO will reduce the maximum monthly charges for the Flat-rate Data Standard and Flat-rate Data Standard Value billing plans by 1,575 yen including tax in each of the first 13 months for new subscribers who sign up anytime between June 1 and September 30, 2010 under a two-year contract. As a result, the maximum monthly charge will be 4,410 yen under the Flat-rate Data Standard Value option (see graph below).

Both plans start with a basic monthly charge for minimum usage and then graduate to a two-tier pricing structure for additional packets, comprising pay-as-you-go charges (0.042 yen/packet) up to a fixed ceiling or a flat-rate charge for unlimited packets beyond the ceiling.

Specifications of Mobile Wi-Fi Mini-Router (subject to change)

  • Communication protocols: 3G, wireless LAN and optical fiber
  • Device connectivity: Up to six Wi-Fi-enabled digital devices
  • Battery duration (continuous communication): 6 hours
  • Battery duration (continuous stand-by): 30 hours
  • Weight: Approx. 105 grams

Note: For the Flat-rate Data Standard plan, add 735 yen (incl. tax) to all charges above. As with the Flat-rate Data Standard Value plan, a two-year contract is required to receive the special discount.

Graph: Monthly Charges for Flat-rate Data Standard Value (tax incl.)

Graph: Monthly Charges for Flat-rate Data Standard Value (tax incl.)

This is very tempting. Instead of paying 4500 yen a month for iPhone data and 3000 yen a month for iPad data, I could get this one data plan. Not only would it be cheaper but Docomo has a far superior signal to Softbank, and I would be able to use my laptops with it too. Nice! But then the small print…

From what I can work out from the Japanese (I may be wrong about these points so check with Docomo!):

  • There seems to be two plans: Standard and Standard Value. Standard is 735 yen more expensive. Which plan you can sign up for depends on the device/phone you have (not sure which plan the WIFI router applies to).
  • Cancellation charge decreases from 26,880 yen (if you cancel during the first month) to 9,975 yen (if you cancel in the last month). Outrageous. (In contrast, Softbank’s iPad cancellation charge is a constant 9,975 yen if you buy the device upfront.)
  • Contract automatically renewal after 24 months. Cancellation after renewal is 9,975 yen. Ie, you always pay a minimum of 9,975 yen to say “Bye bye Docomo”.

I don’t know why phone companies have to make things so bloody complicated. I love that in the US, you can just buy a month of unlimited data from AT&T with the iPad. In Japan, nope. Docomo’s pricing is nice, but I can’t help feeling cheated by the cancellation charges.

Update

I’ve just discovered b-mobile. They offer a contract free Docomo unlimited data SIM for 2,980 yen per month (14,900 yen for six months), and they have a WIFI router for 19,800 yen. There’s no signup fee and, because it’s prepay, no cancellation fee. It’s only standard 3G speeds of 300kbps rather than “high speed” 3.6/7.2Mbps, but I’d rather have a network that I can get a 300kbs connection consistently than a supposed high speed network which has terrible coverage (such as emobile).

Interestingly it works in an unlocked iPhone 3GS. Softbank wont sell SIM cards to people who bring an iPhone from overseas so this card could be a good option. Note that the b-mobile English website doesn’t mention the unlimited data SIMs.