Thursday, December 30, 2010

Synchronized Android and iPhone development

I have been working on both the Android and iPhone. We plan on releasing a new version of our app on the iPhone and the first version ever on the Android. My goal was to get the Android side to match the feature set of the iPhone side. Of course I ended up making some improvements on the Android side while I was at it. That meant I had to move those changes over to the iPhone.

At first I was pretty worried it was going to take a long time to move the changes over. Turns out I know just enough on the Xcode side that I was able to move almost all the changes over in less than one day. I am still not a big fan of Xcode / Objective C but I am getting faster at using it.

Since I had them both running it was time for some side by side comparisons. First thing I found out was our appointment recurrence code was not correct on the iPhone. The original author is no longer with the company so I needed to just figure it out. I had written that code from scratch on the Android earlier in the week. Lots of bitmask operations and all sorts of fun date manipulations. I thought porting it would be a big pain but it was not bad. I just looked up "day of week NSDate" and a few other things to be able to get to the source code snippets I needed. The one big difference is pulling time in Java is in milliseconds and in seconds in Objective C so I changed my math by a factor of 1,000 to fix that. Everything else ported very cleanly.

Below are my thoughts on differences I found. I am not saying either one is better than the other, just listing differences and annoyances I found with each platform. I have not used either platform for an extensive period of time.

Differences:
(iPhone is really a version 2 iTouch, Android is my Samsung Galaxy S)

iPhone - Top of screen is used to show where you are and have a button to get back to previous screen. Gives you a bit of an odd look as the "Title" of the screen is not centered due to the button to its left.

Android - Title is over data and centered. There is a back button on every phone to take you back to the previous screen. Of course you don't always know where back happens to be.

iPhone - Layouts we are using take longer to generate and paint. Most likely due to slower hardware and I don't believe the layout code being used is very optimized. It is using WebUI for some things and I am sure that part of the issue.

iPhone - rotating phone forces you to watch the rotate animation. Look, animations are cool and all but I really just want to get work done. Maybe they should allow you to turn that off.

Both - the standard date picker stinks. They are both very similar with iPhone doing a fancier pinball wheel display but they both suck when you want to get to a specific date quickly. On the Android side phones are not consistent in what they show, some show the day of week which I think is very useful and others don't.  Pressing a [+] button 10 times to get to a date in the past is crappy. Trying to stop a spinning wheel with any sort of accuracy is no fun either. At least on the Android you can click on a field (month, day, year) and just type what you want. On the iPhone all you get is the spinner.

Both - Each platform has a perfectly fine date chooser in their base calendar applications. Oddly only the one on the Android allows you to rotate the screen. What logic Apple used to decide which base apps supported screen rotation and which ones don't truly escapes me. I need to find or write a date selection control similar to the base calendar controls that shows an entire month at a time with simple arrow keys to change month or year. Obviously people can accurately finger pick a date this way.

Android - I wish you could just plug-in any phone and dump the APK to it. Instead I end up hunting down USB drivers to make things work. Some phones have the USB drivers on them and will transfer them to the computer when you plug them in and others require a web search. We need to set up a mini-market on a server so I can just put the app there to let QA get to it. Once the driver is installed the copy to device is very easy, just the initial setup that stinks.

iPhone - You must provision each device with Apple to install anything on it. All devices use same USB driver. Every time you plug in a device is fires up iTunes and wants to sync which I find annoying. I run / debug in the simulator and only plug in the device for final testing. I have only ever used one iPhone device on my Mac so I don't know what will happen when I attempt to plug-in another one.

iPhone - I hate typing my password, which has numbers and uppercase letters. Too many presses to navigate to numbers etc. Android is easier with the long press to get to the one number I have in my password. Of course I have to type this a ton of times a day during testing. This is where the Simulator comes in handy, just type on the keyboard.

Android - Fonts look better. Bold looks more bold. I am using bold to help the data stand out from the labels. It just looks better on my Android device than on my iTouch device. I know it is a much better screen. I really want to see what it looks like on an iPhone 4.

iPhone - Touch input seems a bit more accurate. We have images next to certain lines of text that you press to invoke a mini-text editor. Seems to work easier on the iPhone. Could be a bigger touch target, could be screen differences.

iPhone - If you have a table with sections headers and you scroll the table the section header gets stuck at top of screen until the next section header hits it, the first section header then scrolls off and the second section header sticks. This is actually a pretty cool effect that you get for free.

iPhone - I still don't like Interface Builder and Xcode being separate applications. I did set up Spaces on the Mac and I plan on running each on their own virtual screen. I wish I had a dual monitor setup on my Mac like I do on my PC. I find it too easy to click off the UI element I am working on to get the focus rectangle to disappear so I can see what the layout looks like and accidentally click on some part of Xcode meaning the whole focus shifts and I have to meta+tab back to Xcode. This should be fixed with Xcode 4 when that gets released.

Totally random side note that still applies to this as it affects my programming

I asked for and got a set of Sennheiser wireless headphones for Christmas. The wired headphones I used at work had a pretty short wire and if moved to my right to use the Mac I would get a tug. Wireless seemed the way to go. I checked with some buddies and most said wireless sucks in general unless you get Sennheiser. The RS-120 seems like the way to go, decent price and rechargeable.

The verdict? I am very happy with the headphones. They were shutting off on me at first then I found a web post that you need to crank up the volume out of the computer and use the volume adjustment on the headphones to tweak the sound. Once I did that no more issues in that area.

Sound quality is very nice. They do a good job covering my ears. I can still hear people around me if needed. Could be a little more bass but that could be my sound source too. I did some tweaking in my sound card settings panel to help them out.

They are lighter than I figured they would be. I have Sony wired headphones that weigh more. Nice to not have much weight on your head. Good padding on the top of the adjustable over the head band.

The one thing I don't care for involves pausing sound. If the headphones are not getting a sound signal they output static, not super loud in my case as I don't run them loud at work but if your sound feed stops you get an earful of static. I generally hit the off switch on the headphones and pause button at same time. I also start the music before I put the headphones back on. User training but I wish it just went silent instead of static.

7 comments:

  1. Thanks, what interesting issues have you run into? Do you also code for both platforms?

    ReplyDelete
  2. I fell in love with the Jabra Halo wireless headset a while back: http://www.jabra.com/Sites/Mobile/na-us/Products/Pages/JabraHALO.aspx

    For their appearance they have very decent sound. I also have a problem with sound fallout - I will try to crank up the phone volume, and turn it down on the headset. If the bluetooth signal fails, the headset just disconnects and goes to standby. So apart from the falling out (this only happens, when I have the phone ON me, while listening to music. If it's on a table, I can move around freely, as long as I stay in the same room), I only have a single problem: When the headset decides it's running out of battery, it makes an intermittent short beep. This could be OK, but sometimes it does this for about five hours until finally turning off. It's not even a regular beep!

    But the sound is pretty good, they look amazing, and it's actually pretty decent for phone calls too. :)

    ReplyDelete
  3. Exactly, you're very kind of us about comment!. This Link

    ReplyDelete
  4. Very useful post ! Thanks for giving something meaningful information and Please keep update with your blog.
    Blinds for windows near me | Artificial grass for balcony near me

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete