5 ms·
Developing Android Apps: it's really not so bad
- cageface 15y agoI'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.
- wallflower 15y agoWith 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/ http://commonsware.com/Android/ Reto Meier's blog http://blog.radioactiveyak.com/ http://blog.radioactiveyak.com/ Styling Android blog http://blog.stylingandroid.com http://blog.stylingandroid.com Android UI Patterns http://androiduipatterns.com 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.
- cageface 15y agoMaybe eight months of experience isn't enough to judge it fairly, but I think Cocoa's almost mystical reputation is somewhat inflated. If you compare Cocoa Touch to Cocoa on the Mac you can see that Cocoa Touch is a much cleaner, simpler and more consistent version of Cocoa. There is still room for improvement. It's a testament to the skills of the original authors of Objective-C that a 1989 technology is still competitive in 2011, but we've learned a lot about language and UI framework design since then.
- bendmorris 15y ago(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 15y agoI 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/Music.git;a=summary http://android.git.kernel.org/?p=platform/packages/apps/Musi... > 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 15y agoI 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.
- martythemaniak 15y agoSomething 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.
- megablast 15y agoI am not sure your point proves anything. There are a number of reason why that could be so. The problem with android remains, and these have been bought up a number of times. Why are we all of a sudden ignoring these problems?
- wallflower 15y agoWe 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 15y agoPixel-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.
- ian_cyw 15y agoYour 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.
- bendmorris 15y agoWith the amount of competition in the iOS app store, how easy is it to make more than $100 a week from an iOS game anymore? There may be more people doing it there but there are probably also more apps languishing in obscurity. Android is gaining in popularity and it seems like the situation for developers is improving. I think the main challenge is creating a unique, engaging game for any platform.
- cageface 15y agoThere's no doubt that iOS apps are bringing in more money now. However, the Android market shows you actual sales stats for apps and its clear that some people are making money on Android too. I also find it hard to believe that Android's current hardware sales volumes aren't going to eventually pull up market sales too. They may always lag behind Apple's but I'd be very surprised if the ratios stay as skewed as they are now. If you're already established and successful in the iOS store then it makes sense to stay there. If you're starting from scratch then it's not quite so clear-cut, I think.
- enobrev 15y agoI 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 http://www.youtube.com/watch?v=1_SdC8LVODY#t=8m40s
- bnycum 15y agoAs 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 15y agoWhich 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 15y agoYes, 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.
- cageface 15y agoSometimes I think android is a little bit more straight forward. Isn't this a pretty big point though? As a developer, I'm willing to put up with some extra hassle up-front if it makes the bulk of the work easier.
- switch 15y agoIt'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 15y agoI 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.
- tszming 15y agoI am using Markdownlive, it support instant preview (mit-license, need to compile using xcode) https://github.com/rentzsch/markdownlive https://github.com/rentzsch/markdownlive
- bignoggins 15y agoI 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 15y agoGood luck with the Android Market and please use the Licensing System to help against piracy. http://developer.android.com/guide/publishing/licensing.html http://developer.android.com/guide/publishing/licensing.html
- bignoggins 15y agothanks. yes piracy is a bigger deal on android for sure.
- ZoFreX 15y ago> 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.
- spacemanaki 15y agoI'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 15y agoI 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?