[sclug] OT: Two weeks with the HTC Hero and Android OS
David Given
dg at cowlark.com
Wed Feb 17 12:15:46 UTC 2010
On 17/02/2010 10:57, Alex Butcher wrote:
[...]
> Have you any recommendation for books to take a competent C programmer
> through to developing apps for Android? Presumably something on Java,
> something on Android itself, plus any other topics that you think need
> coverage (OO? Eclipse?)
Learn Java, and learn to like Eclipse.
Developing with Eclipse for Android is very, very smooth. Everything
Just Works. The Java IDE autocompletes beautifully so all those long
Java identifiers aren't a problem, the smart refactoring means it's
trivial to rearrange your program and it'll automatically update
references, there's no configuration needed to deploy to the phone, etc.
If you have a phone with debug enabled it really *is* just a matter of
plugging it in and pressing the run button in the IDE. It all works on
Linux, too.
http://developer.android.com/sdk/index.html
The tutorials are actually good and worth reading --- see the 'Dev
Guide' tab on the above link.
If you don't like Eclipse it is all scriptable with ant, and the IDE
will spit out antfiles for you, but TBH it's more trouble than it's worth.
However, the programming paradigm is a bit strange if you're using to
traditional programming. It's very MVC. You don't write programs that do
stuff, you produce views that provide a view of data which is stored
seperately (usually in an SQL database). While it is possible to write
traditional programs, mostly by putting all your code in custom
controls, you are fighting the system rather than working with it and
stuff like lifecycle events will annoy you. (For example: when you
rotate the device, your view/controller is destroyed and recreated. If
you store your data in the view/controller rather than the model, life
becomes hard.)
I would recommend *not* doing anything in C unless you really, really
need the performance. This is because you will need to learn JNI.
PS. Please don't cc me with replies --- I'm on the list, I don't need an
extra copy!
--
???? ?????????????? ????? http://www.cowlark.com ?????
?
? "They laughed at Newton. They laughed at Einstein. Of course, they
? also laughed at Bozo the Clown." --- Carl Sagan
More information about the Sclug
mailing list