Best practices for developing bigger applications on Android
I've already written some small Android Applications, most of them in one Activity and nearly no data that should be persistent on the device.
Now I'm writing an application that needs more Activities and I'm a bit puzzled about how to organize all this. My app will download some data parse it show it to the user and then show other activities depending on the data and the user interaction. Some of that data could be cached, some of it has to be downloaded every time. Some of that data should not be downloaded freshly at the moment the orientation changes, but it should on the moment the activity is created...
Another thing 开发者_Go百科I'm confused about are things like a httpClient. I now for example create a new httpclient for every activity, the same thing for locationlisteners.
Are there books, a blogs or documentations with patterns, examples and advice on organizing larger apps build on android? Everything I found until now are get startet tutorials leaving me alone after 60 lines of code...
I would be very happy if some of you could provide some good resources.
Check out the Application Fundamentals if you haven't already. It's got a wealth of in-depth information. Then you can branch out to the more specific guides like Designing for Performance or Supporting Multiple Screens, which a large app would certainly have to deal with.
Also, here are some deeper specifics on Activity Design.
Google actually has a ton of awesome doc on this stuff.
I'd suggest taking a look at existing open-source Android applications and learn from how they solved the problems you are facing.
For instance, I learned quite a few tricks from reading Foursquare Android App source code. I'd highly recommend reading source-code like reading a tutorial/book.
精彩评论