Beginning Android development: Android SDK or something else?

Started by
7 comments, last by HNikolas 12 years ago
Ive just recently bought an Android tablet and thought it would be cool to program few games. I did a few google searches and found out that Android SDK uses Java and is the main development kit for the platform and also that there is a mono for android and it seems to be free it I do not publish my apps on the market.

Was wondering what are the pros and cons of the two(besides the obvious language and library differences), mainly from performance and dependency viewpoint?

Is there anything else that is viable?
[size=2]Ruby on Rails, ASP.NET MVC, jQuery and everything else web.. now also trying my hand on games.
Advertisement
I can't speak for mono, but I found the SDK perfectly acceptable in performance. I also doubt that you can get any more dependable than the SDK seeing as how it is the official development environment for Android. There is also the ndk which supports native (C++) activities as of 2.3 (Gingerbread). The ndk is almost certainly best for performance intensive tasks, but it also puts limits on portability (Android on ARM vs Android on x86 or MIPS).
The Android SDK is the recommended way to make Android apps, i wouldn't bother with mono for android due to the license restrictions.

Performancewise the Java SDK is good enough, its main drawback is that it makes porting to iOS fairly difficult so if you want to support iOS aswell you should either use a third party engine(Unity is a good choice if you can afford it, ($400 for Unity Free + Android support and $3000 for Unity Pro + Android support) or write most of your code using the NDK (which allows you to write most of the game in C++ instead which you can then reuse quite easily on iOS)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
It is far easier to learn to program on a PC.

I recommend against developing on a device as your first foray into programming.

Developing code for the device is harder; it is harder to debug, it is harder to test, it is harder to deploy, etc.

Once you know how to develop programs, then add the extra complexity of the mobile device.


Java is just one of many fine programming language to start with.
Thank you for the replies guys. It is good to hear that I have C++ access if the need arises, also, I've ordered a book from Amazon and will start refining my Java skills, last time I used it was in highschool. I have done some game development for PC(C# with SlimDX and XNA, PyGame and Unity) so the progress is not entirely new to me.
[size=2]Ruby on Rails, ASP.NET MVC, jQuery and everything else web.. now also trying my hand on games.

Thank you for the replies guys. It is good to hear that I have C++ access if the need arises, also, I've ordered a book from Amazon and will start refining my Java skills, last time I used it was in highschool. I have done some game development for PC(C# with SlimDX and XNA, PyGame and Unity) so the progress is not entirely new to me.


It should perhaps be noted that google recommends against using C++ on android, performance is often worse than you'd get with Java (primarily due to the JNI overhead making the transition from managed to native code expensive thus requiring you to write pretty much all your code as native code to get any benefit from it) and you'll have to deal with ARM/x86 not running the same code, I would only use the NDK if i had to port a project from iOS to Android (or if i was developing for both platforms).

If you had asked a few weeks ago i would have told you to get Unity as it is by far one of the easiest way to make mobile apps, it was free for Android and iOS then, (Now it costs $400 per platform or $1500 per platform if you want the pro version)

and as others have said, mobile development is quite a bit harder than PC development even though Android is one of the easiest mobile platforms to develop for so make sure you have a solid grasp on programming in general before you start.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
In what ways is it harder?

I understand since its new platform, it does not have as many cool toys as PC has and I also understand the memory can be an issue considering its size to PCs but for testing and debuging, aren't there any emulators to ease it? Am I missing something important?
[size=2]Ruby on Rails, ASP.NET MVC, jQuery and everything else web.. now also trying my hand on games.

In what ways is it harder?

I understand since its new platform, it does not have as many cool toys as PC has and I also understand the memory can be an issue considering its size to PCs but for testing and debuging, aren't there any emulators to ease it? Am I missing something important?


For android specifically:

1) The entire activity thing is quite different from how a normal PC application works. (Make sure you understand and implement all 7 activity methods properly)
2) Memory limitations, This is a big one, Android java apps have a fairly low memory limit on older versions of the OS (16MB IIRC) and memory allocations can very frequently fail, simply dropping the references doesn't mean that memory will be freed immediatly (you can and must force garbage collection if you are using alot of memory and as much data as possible should be sent to the GPU (as memory used by the GPU won't count towards the 16MB limit)).
3) Battery life, Writing a well performing game that doesn't eat up the battery isn't trivial and for mobiles it is essential, my first android test app drained my S2s battery in no time at all, and whats worse, because i failed to deal with the activity properly it kept draining my battery even after i "closed" the app (You definitly don't want to do this with an app you distribute to others)

4) The emulator isn't all that good,most testing has to be done on an actual device which complicates debugging (Remote debugging is supported by most phones though).

If you allready have programming experience it shouldn't be all that difficult though.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Thanks, that cleared it all a bit!

From what I gather, I've missed the Unity-Android bandwagon for now. Is there any other nice engine/framework around that handles all the basics? Does not have to be other OS's compatible and does not have to have any 3D features either: just the basics.

Did a quick google, found AndEngine and LibGdx. Can anyone with more experience compare the two?
[size=2]Ruby on Rails, ASP.NET MVC, jQuery and everything else web.. now also trying my hand on games.

This topic is closed to new replies.

Advertisement