
Developing Android Apps: it's really not so bad - bendmorris
http://www.bendmorris.com/2011/08/developing-android-apps-its-really-not.html
======
martythemaniak
Something interesting happens when you ignore hype and prejudice and start
paying attention to results: reality manifests itself, sometimes with
surprising results.

So let me give you some results: A bit over a year ago I became 1/4 of our new
mobile team (2 android guys, 2 iOS guys) at work. We set out to write our
apps, which have the same design, use the same visual elements, the same API,
and have the same features etc. A year later, with thousands of lines of code
and man hours behind them, both apps are still at the same level as each
other, with neither being ahead of the other.

In short, anyone that tells you Android development is harder than iOS is
lying, incompetent or has an agenda. Or simply mistakes his opinion for
reality.

~~~
wallflower
We can agree to disagree. I have done both iOS development and Android
development on a fair number of high-profile projects.

To clarify, I am saying Android development is harder in the big picture (not
just coding, but styling/graphic design/layout). Part of the reason why I
believe this (my opinion) is harder is because the tools (Xcode, IB) are so
much better for working in a team. Especially, when you have an on-site
designer. You can give the designer a XIB file to style and modify to pixel
precision. Android's layout editor still has a long way to catch up.

> same design... same visual elements

If you are using the same UX for both apps, you're doing your Android users a
disservice. Android is different enough to command its own tweaks.

~~~
cageface
Pixel-perfect layouts in Android are harder, but declarative layout makes a
lot of things easier. For example, if I need to add one button to a row of
buttons in iOS, I have a lot of fiddly tweaking in IB to do. In Android I add
one more line to an XML file and I'm done. Need to change the background color
and text of all the buttons in your app in iOS? I hope you created them all
programmatically. In Android I change a few lines in my style file and I'm
done.

iOS's UI stack is clearly pre-web. Android is post-web.

~~~
wallflower
> I hope you created them all programmatically

Oh yes, we have a hand-maintained (pre-iOS5) very complicated UINib manager
that loads Nibs and lets us "style" based on a system of plists and resource
bundles.

+1 Android

------
wallflower
With all due respect to the developer who wrote this post, standalone apps are
relatively easy - you start jumping into the rabbit hole when you start
getting into server API integration and doing processing off the main thread
(AsyncTask, IntentService, Service, unit tests lions tigers oh my), layouts
that don't suck, and custom animations... Making an Android app look sexy/good
is an art in itself that I am still trying to learn.

At a certain point of app complexity, writing an Android app becomes less
about writing an Android app and more about writing a well-structured,
async/decoupled and performant app in Java.

Why is iPhone development relatively easy? Well, for one thing, the territory
is well trodden. And it is based on the beautiful foundational framework of
Cocoa, which has its roots in NeXTSTEP. Cocoa masters have been able to switch
to iOS and tell people/show people how to code properly. Cocoa has been around
for a while; the Android SDK is a WIP (but it has come a long, long way since
Cupcake). Also, Java lacks compiler-level support for/doesn't have blocks and
categories (two of the things that make Objective-C a joy). And, love it or
hate it, you will start to miss CoreData when you don't have anything near
equivalent on Android.

Some of my favorite resources for learning Android:

The best book for the money (frequently updated, author has huge SO
reputation)

<http://commonsware.com/Android/>

Reto Meier's blog

<http://blog.radioactiveyak.com/>

Styling Android blog

<http://blog.stylingandroid.com>

Android UI Patterns

<http://androiduipatterns.com>

The Google source (note, not all code is pretty but it shows one way of
getting things done).

Android is known for its flexibility, power, and customization. There are many
ways to setup/do things, some good, some bad. That just doesn't apply to the
end user's experience but to developing apps for it.

~~~
bendmorris
(OP here.) I agree with you on most points, but I don't know how you'd write a
graphical game without dealing with asynchronous operations. For example, this
app uses an extended SurfaceView (uses its own thread to draw), timers to
handle move animation, and AsyncTasks to perform computer AI turns and
implement a hack that makes Toasts last longer. Otherwise the UI would be
clunky and give a "not responding" message whenever it wasn't your turn.

I would say that graphical games are a step above the simple "standalone app"
you mention.

~~~
wallflower
I apologize. I may have rushed to judgement. I didn't get a chance to check
out your game, will do. Games are definitely not a simple standalone app.

I stand by my assertion that non-trivial app development on Android can be
harder than on iOS. For example, take a look at the Google Music app source
(an example of a complex app) and see if you can understand how it was
designed and why it was implemented in such a way. I can't claim to fully
understand it.

[http://android.git.kernel.org/?p=platform/packages/apps/Musi...](http://android.git.kernel.org/?p=platform/packages/apps/Music.git;a=summary)

> AsyncTasks to perform computer AI turns and implement a hack that makes
> Toasts last longer

I'm curious why you did not use a FrameLayout to overlay a Toast-like message
on top of your SurfaceView game board.

~~~
bendmorris
I certainly could've done that. I liked Toasts, found that you couldn't extend
their duration beyond 3.5 seconds, Google'd the problem and found a hack to
extend them. Either approach would've worked fine.

------
bnycum
As a note I've been developing in Cocoa since 2005, and Android on and off
since it come out. Also taught both iOS and Android at the local university. I
still prefer iOS and it's tools a whole lot better. Developing for Android
isn't bad, it's the development tools.

* installing Xcode is simple, minus the large download. For android I've got to get an IDE, android sdk, plugin for my ide, download platforms needed, create virtual machines (making sure to enable snapshot mode or wait forever on each reboot).

* the iOS simulator is nice and quick, though it gives you false hopes of how fast your app runs sometimes. The Android emulator is slow, almost unbearable at times. I've also gotta make sure I'm on power or my battery drains quick.

* programming for either is about the same in terms of ease or difficulty. Concepts are easy to get. Sometimes I think android is a little bit more straight forward.

* setting up a device to accept a dev build is a few clicks on iOS. On android I've got to enable the device for non market apps, etc on the device itself.

* I still have no clue which market is the best to put Android apps, the fact there is a choice makes everything even more confusing.

* fragmentation, though I've never had any major issues.

I really don't have much against Android as a platform, it's the development
tools that drive me away. Apple has everything so it just works.

~~~
bendmorris
Which market is the best to put Android apps? How about all of them? I love
the fact that you have choices. There's only one iOS app store, so you're
putting all your eggs in that basket.

~~~
bnycum
Yes, but everyone knows that one app store. It's too much of a pain to manage
multiple markets on Android. Especially when some do reviews and others do
not.

------
spacemanaki
I've spent over a year maintaining a BlackBerry app, and while I've only been
dabbling in Android, what I find in the docs and tools from Google is several
steps above the BlackBerry equivalent. Anyone complaining about how Android
development is painful should spend a month or two working on BlackBerry apps.

Have fun fighting a terrible, custom Swing IDE that RIM wrote, because
debugging via their buggy Eclipse plugin (which is downloadable as an entire
Eclipse install, so you have to reinstall all your customizations and other
plugins) doesn't always work (forget the actual step debugger, which doesn't
work at all, I'm talking about getting the output from System.out.println).
Cross-platform development is pretty weak: there's no official support for
Linux, and there are no simulators and no support for older devices on OS X
(50% or more of the BB subscriber base).

Enjoy the need for a round-trip to a RIM server which has a habit of being
down (it's been better recently, I admit) just to put your app on a device
during development. Users can change the permissions on a per-application
basis, and can install and run apps without the required permissions enabled,
so you need to manually check the permissions you need every time the app
starts. API calls that need this care aren't documented, so you have to do
basic science on the device to figure it out.

Want to make an HTTP connection? Great, here's a giant ball of accumulated
wisdom on how to tiptoe around APNs and other transport-level bullshit. Or you
can pay $2000/yr for access to an undocumented BIS string that might work a
bit better.

Programming is hard. Some tools are shitty, but there's often someone on the
other side of the fence who has it worse or better. There are a few senior
devs here who have horrifying war stories about J2ME and Brew. It seems that
even Blackberry development is a bit smoother than other mobile platforms. And
I'm sure embedded programmers have even scarier tales of low-level Heisenbugs.

Edited to add: Oh yeah, BB is also all based on J2ME, which means Java 1.3. No
collections, no generics, no auto-boxing, no for-each loop, no reflection.
Yes, even on the new BlackBerry 7 devices, Java 1.3.

~~~
aberkowitz
I have spent a short period of time dealing with Blackberry, and I can do
nothing but echo your sentiments. Would you mind sending me an email (in
profile), so I could pick your brain about Blackberry?

------
ZoFreX
> I ran into problems putting up a free and paid version of the same app on
> the Android market

This is one of the most aggravating issues I have with the Android market at
the moment. Every app that has a free version handles it differently: Some you
buy a key and enter it (which means purchasing out of band), some use the
Android Market micropayment system (so it often isn't clear you have to pay
for the app at all), some use a free version and full version of the app (so
if I play the first 15 levels in the demo, I have to play them all through
again when I buy the game). C'mon, Google. Pretty common use-case here.

------
cageface
I've been writing iOS apps for about 8 months now and recently started writing
some simple Android apps to get a feel for it. Maybe things get worse with
more complicated apps, but I'm actually finding so far that Android makes the
easier things easier than iOS.

------
bignoggins
I think the question for most indie iPhone developers is not necessarily: is
android hard? But: is android worth the time investment. For indie developers,
time = money.

The range of sales for android paid apps are publicly available on the android
market. Based on my own sales figures (I've been as high as #66 overall on the
Top Paid iphone list) as well as knowing the sales figures of other highly
ranked apps like Angry Birds and Doodle Jump, it is apparent that paid apps on
android do an order of magnitude less in sales than their iOS counterparts of
the same rank.

That said, I'm release my best performing iPhone app (currently makes about
1K/day) on android in a few days. So we'll see how it goes.

~~~
wallflower
Good luck with the Android Market and please use the Licensing System to help
against piracy.

<http://developer.android.com/guide/publishing/licensing.html>

~~~
bignoggins
thanks. yes piracy is a bigger deal on android for sure.

------
switch
It's a bit strange to compare -

Time Required and Difficulty (or Ease) of developing on one platform vs
another ...

... without factoring in the amount of money you can make (or if you don't
want to make money, the amount of people you can reach).

It's also very, very strange to not talk about the huge number of devices that
run on Android and the complexity of supporting some/a few/most of them.

 __*

What's the point of - It took exactly just as much effort and time and pain to
make a great app on Android as on iPhone

without elaborating on

\- how much profit there was \- how many people it reached \- various other
factors like how much of the Android time was spent on supporting various
devices \- what the level of quality on each platform was.

 __ __ __ __ __ __ __ __ __ __ __

Finally, don't mean to be a dick about this but -

Who cares if someone makes an app in 4-5 days worth of work and releases it.

Where are the people who have made amazingly good Android Apps?

What's their story?

Do we really want to focus on how easy it is to make an app that takes just 5
days and is nothing out of the ordinary?

------
alenlpeacock
I can corroborate. Developing Android apps is easy.

I got "hello world" to work in about 15 minutes, and was doing asynchronous
HTTP Posts of images from the gallery to a remote server the next day, with
hooks into the Android sharing system and progress bars and the whole thing.
All this while riding in a truck, without Internet, from Salt Lake City to San
Francisco to demo to some investors (Android app was a small part of a larger
demo).

I hadn't touched java in 8 years. Never done Android development previously.
It was brain-dead simple.

------
ian_cyw
Your post is missing the main gripe of many developers so far. Which is that
there's far more money in iOS land than there is in Android. It's hard for an
average game to make more than $100 a week.

~~~
enobrev
I take some issue with this argument. Not necessarily to say that it's false,
just to say that it's not a strong argument or at the very least holds little
foresight.

As an example I recently downloaded Words With Friends on the Android, became
immediately annoyed with the ads and was at a loss when I tried to find a pay
version. I emailed them and although they replied within hours (fantastic!)
they said they don't have a paid version at the moment (it's in the works).

I'm reminded of John Carmack's ad-hock survey of iOS and Android users to find
how many people would have spent at least $20 for apps[1], and then he
explains in more detail why we won't be working with Android at that time. His
reasoning is solid, but that survey puts an exclamation on the same point
you're making, which is unfortunate.

It's easy to claim nobody pays for things on Android if there's nothing there
worth paying for. It seems to me this would make Android a prime market rather
than a poor one.

I've personally spent at least $40 on Android apps in the last year or so
(mostly games) and will spend plenty more as developers come and give me
reason (or at least a chance) to give them money.

1: <http://www.youtube.com/watch?v=1_SdC8LVODY#t=8m40s>

~~~
bad_user
This is exactly my experience with Android.

For instance I wanted an app that would block calls and SMSs and do a better
job than the built-in functionality.

I found an ad-supported app that did the job, but the UI was awful.

So I tried to buy a non-free app that had good reviews -- problem was that the
developer wouldn't allow purchases from my country, so I couldn't purchase it.

Also, as a developer Android is a poor choice for me, not because there's
anything wrong with the platform, but because Google doesn't allow me to be a
merchant that receives money from them (I'm not in one of the approved
countries).

So the only option available to me as a developer is to release ad-supported
apps. And with ads the UI experience suffers, so this automatically puts me in
a don-t-give-a-shit state of mind where I don't care about experience as much
as I care about volume.

This goes round and round, but on the whole I think that the quality of
Android's marketplace represents an opportunity precisely because the
competition is doing a poor job.

------
tszming
I am using Markdownlive, it support instant preview (mit-license, need to
compile using xcode)

<https://github.com/rentzsch/markdownlive>

