Android learning curve - android

I have experience in Java and good understanding of OOP. 2-3 weeks ago I decided to learn to make applications for Android.
The problem is that all the books I have gotten through aren't looking to me extensive enough. Most of the books are about 300-400 pages long and can't properly cover decent amount of aspects needed to understand all the fundamentals. I'm currently reading "pro Andorid 4" by Reto Meier and it's one of the most detailed resources on the Internet but still not enough.
I find the Android framework pretty complex. There are Activities, Intents, Services and other APIs. The Android dev guide on the official page is really brief and can't make a detailed coverage of the main components. And I find other resources not detailed enough, too. The usage and the properties of Intents aren't explaind well enough especially for the implicit ones with the Intent constants and the Uri object as a second parameter in the Intens constructor, etc. Also I can't find information for other aspects and usage for Context, Cursor and what some actions return after the execution of onActivityResult() method and so on.
For this periond I gained knowledge for some basic and trivial stuff, but I'm very confused when I have to implement some not so common features like taking pictures, using broadcast recievers and services
So my question is - Where can I find more comprehensive and in depth explanations of Android's inner components?
And also how much time did it take for you to fluently make Android applications and fully understand everything involved into the development?

Where can I find more comprehensive and in depth explanations of
Android's inner components?
The official Android documentation is very good. http://developer.android.com/guide/components/index.html
And also how much time did it take for you to fluently make Android
applications...
Depends on what do you understand by "fluently". Let's say that without copying Hello World, looking what was the Activity all about etc. about 2 weeks.
...and fully understand everything involved into the development?
There is no need to fully understand everything now. Don't worry. Later you will understand most of the useful concepts. At the beggining just try to make some app and use Google all the time. Most of the time you know more or less how to do 90% and you just read up these lasting 10% of which you have no idea yet.

Related

Modeling a mobile app: How to go from the idea and design to classes and objects

I'm trying to develop my own application, I'm not too bad with code (Java, Objectif C...) nor design (Photoshop, illustrator... ).
But I always have the same problem, I never know how to go from my app Sketch and Storyboard to defining my objects and classes in code. It just makes a huge mess in my head.
I tried looking around but all the sites I can find describe the processus as Having an idea, creating a design, a storyboard, coding your app, publishing and marketing. But none explain how to go from the said storybord to the code or architectures of your code, thus not solving my problem.
As time passes it gets more annoying, I feel stuck :/.
Can you help me with any leads ?
Pretty please with the sugar on top :)
Much insight and understanding can be gained from Apple Worldwide Developers Conference (WWDC) videos.
Designing Great Apps highlights some videos and guides that may be helpful.
Designing Intuitive User Experiences. Learn about the key concepts and principles that will enable you to make your app more intuitive and approachable.
While one specific video may not cover all the practices you're looking to understand, the principles and recommendations that they present will set you on the right path, and bring you closer to your goal.
If you're not sure what videos to watch, try ASCIIwwdc to search session content.

Starting point for app creating, where to start

I am looking to start writing apps for mobile devices. I know a little about this subjec, and I am proficient in both java and python. However, before jumping into creating apps I wanted to get the community's input on a question I have not yet found the answer to:
How/Where should I begin?
I understand this question is fairly general/basic for a community that focuses on solving/debugging complex programs, but if there is a recommended tutorial (or specific platform) that will help a beginner(such as myself), it would greatly reduce the frustration and amount of monotonous questions asked on this forum and others.
Regards
Coursera is offering 3 courses all using android development which started last week. That would be an excellent starting point for anyone:
https://www.coursera.org/specialization/mobilecloudcomputing/2
How/Where should I begin?
I don't know about you, but I often learn by example more than reading. You mentioned that you're proficient in java so thats a great start. After you understand the Android SDK it's really only the UI good practices you need to learn. So here's my suggestion.
Start off with something super simple. Let's say, create your own version of a calculator. Something that can add, subtract, multiply, and divide. This should be dirty, ugly, but works correctly.
After doing this, take a look at some other android calculators on the play store. Check out Simple Loan Calculator. I use this example because it offers a lot of android UI components. ViewPager, ActionBar, etc. Download this app, take a look at it, and try to mimic it. This should provide an idea on how to work with the android UI components.
What's next? After you have done these two apps you should be relatively ready to tackle your own project.
HTML apps are easy to port across multiple mobile platforms. I have set up an Android HTML template as a starting point. You can just import this project into Eclipse and take a look at that.
https://github.com/jakewp11/HTML5_Android_Template
Here is my experience for ios,
There are three things that I consider as pillars
Objective C
Memory managment
Design patterns
The first one looks obvious but I'd stress on learning concepts like protocols, categories, extensions. As a beginner I thought that learning the syntax was enough, but time and again I had to jump back to the language concepts to understand what's going.
The memory managment , the most talked and confusing subject and now since we have automatic referenc counting to make things simpler and often new Dev skips learning memory concepts (I did it). So I suggest you to have an idea what actually happens under the hood of arc " the manual memory managment"
The design patters,
When I started off , to pass data and control , what I used to do was achieve every thing through the only design patten I knew (target action) . I lack the knowledge of design patters didn't how easily I could achive better results with less code.
Some resources:
Dev.apple.com
http://www.raywenderlich.com (one of my best tutorials are here, you can find one on design patterns)
http://rypress.com/tutorials/objective-c/
And yes , the sample projects at Dev.apple are the best tutors.

Important DONT's for a good android app design(Beginner/Novice Level)?

Can anyone point to a good source or come up with a brief listing of conceptual android programming DONT's when designing an App?
I dont want my question to be vague, so I'll give dummy examples(which might not make any sense or may be completely incorrect) to explain what kind of answers I am looking for are things like :
Eg: Avoiding these help you design/program robust android apps
Dont acquire wake locks when waiting for a server response OR Dont have this logic in OnReceive of a broadcast listener...
Extending IntentService is better than extending Services in blah blah scenario
Dont create threads inside OnDestroy() for activities...
etc
etc
I hope you got the point. I know these could be infinite do's and donts but I am looking for the most important basic ones that a beginner/novice should keep in mind so that they good be better android programmers.
Thanks!
EDIT
By Design I mean both the programming(logic) as well as the UI and not the look and feel alone.
Infact more importantly the ones that comes with experience and are not mentioned in books or tutorials because of the nature of these principles/tricks. They might not be absolutely right or wrong but are better or worse. Because they will not teach you a new concept but will help you get rid of a bad programming/design habit.
The very first most important aspect of mobile app development is the look and feel of you app. Here are Android design principles which give you killer design skills.
This is an excellent resource I've found, it is written and explained by Roto Meier.
What would be a better teaching guide than Android Developers site itself
This is a single resource which is very helpful if you are starting out
Here is a same question which was asked on Stack Overflow
Android 4.0 enforces strict mode so check this out to know what that is
To design a perfect app on any platform the first basic thing you need to know is as of how to divide operations into tasks so that the app runs smoothly, multithreading is an important aspect of Mobile development, this is an excellent link that shows you how to make Multi-threaded Android apps
Ofcourse there is also a need to test you app on different devices just to make sure the UI looks perfect, and the app runs smooth. You should also make sure that your app runs on screens of different sizes.

Should I learn Google App Inventor as a supplement to Java for Android

Just curious. I am already a Java android guy but am interested in the new app inventor beta for android.
I was wondering what "real" developers are thinking. A lot of people want to develop an android app but don't really have programming skills. Seems like a lot of apps could be written with app inventor - not sure since I haven't tried it yet.
Hopefully this clears up some things for people that are still just hearing about App Inventor. (Keep in mind App Inventor is extremely beta right now, so all of this is subject to change.)
If you're interested in playing around with some of the features it offers and haven't had the time or interest to get involved with the full Android SDK, then App Inventor is probably a good fit for you.
The interface of App inventor offers some unique features you won't find in the Android SDK and is pretty easy to get the hang of (make sure to look at the shortcuts for the Blocks editor, or it might start to feel tedious real fast). It has live debugging and live edits to both the interface and the supporting logic. That alone cuts down on time and frustration if you aren't quite sure about the proper way to do something yet and is probably my favorite feature of the whole system. New developers will especially find it rewarding to actually see their changes implemented on their phone without waiting for things to compile and run. It is a huge time saver and much easier to get used to than the traditional compile and wait process you face if you are trying to learn things through the SDK.
It is also quite handy if you have been playing around with the Android SDK and simply want to try something new out that App Inventor supports that you haven't had the time or aren't quite sure how to approach yet. So long as you keep things focused on features that App Inventor supports, this can provide valuable insight into understanding a problem by getting your phone doing something you can see and use in a matter of minutes. That's something even seasoned developers are likely to appreciate.
The real problem is more when you start hitting walls. Walls that you simply can't climb. And you quickly realize that the limits of this tool must be understood or you will probably spend a lot of time trying to do something that just isn't currently possible. Sooner or later your going find yourself in this position if you use App Inventor very much.
All coding is graphical.
Look at some of the demos or screen shots of what's available through the Blocks editor if you don't understand what that means. Setting values in those big colorful blocks is as close to code as you will get with App Inventor, for better or worse.
If you have any previous development experience, you are going to find yourself longing for the ability to do some simple coding to supplement what you are doing. Or at least the ability to export your project and pick up where you left off in Java. Sorry, this isn't that kind of tool.
Your only options when you get to this point are to pick up and start all over in code or forget about it, at least until the desired feature gets added to App Inventor (which may be never). That right there likely to irk a good number of people and turn them off to it.
If you are looking at getting into Android development, I see no problem with starting out with App Inventor. It might even save you hours of effort that might otherwise be spent trying to wrap your head around some concepts that are simple to understand when you do them, but a bit confusing if you are building them for the first time.
If you are a seasoned developer, or looking to make money or gain Android experience beyond just the concepts, this isn't your end destination by a long shot. If you are a student that is new to programming, this is probably a good environment with sufficient challenges and room to play around in to keep your interest for a decent amount of projects.
Despite it's current limits, I still see App Inventor as valuable resource to learning new concepts and as a playground for trying out new ideas. It is proving to be an awesome tool for introducing someone to Android development, and would probably do as good a job as you could ask for when introducing someone to programming in general.
I have been playing with it for a bit and my thoughts are that is is great for:
An introduction to programming. It is not something people can pick up and develop great programs with straight away, it does still require a lot of thought and logical thinking, but it doesn't require people to learn the correct code syntax
Prototyping. As it is relatively quick and easy to develop with (and has live debugging on the Android device), it allows you to prototype and see/interact with it in real time
Quick coding. If you want to develop a program quickly, this might be the simplest tool
As the tool develops, it will allow more feature-rich applications (it already allows integration with other back-end programs, etc.). The screen design right now is very basic, but will be improved soon.
Overall, I think that if you know Java for Android, then you will be able to pick up Google App Inventor within an hour and start making some functional apps. You might find it more suitable for building some apps, or you might prefer to stick with your current tools.
For people looking to start programming, I think it is an excellent introduction. They can concentrate on logic and program design, instead of setting up their IDE, code structure and syntax. Plus they will see results as they code.
To answer your question 'Should I learn it'. I would suggest that you play with it for an evening - that is all it will take you to get a good feel of it.
It probably won't make you a better developer, but all knowledge is good, so it can't hurt :)
I plan to play around with it anyway.
The generic answer to any "Should I learn ..." question is usually "Yes, it can't hurt to know things." From a practical standpoint, I would skip it. These sorts of things are usually nice ideas that never catch on. Sure this might be a neat way for non-programmers to build very simple applications and perhaps a real programmer could build a compelling application with it but it looks like if you are a programmer the benefits to using App Inventor don't seem that compelling.
I haven't checked it out, but I think it might be worth a look to help in UI development. Most software engineers are good at really solving problems with software or coming up with cool ideas for apps, but when it comes to UI design we find a lot of obstacles. At least myself, I've always been used to working with UI Designers.
I honestly don't like tools that generate code, (except WSDL to java or java to WSDL) but pretty much anything else I find myself spending more time trying to trouble shoot an issue when it comes up than the time I would've spent writing the app from scratch...
Appinventor is so easy to learn, I would suggest go for both options.
Concentrate most of your time on your main Dev environment and learn AppInventor, in the background, to give yourself a break.
The advantage of Appinventor is you can put together reasonably complex apps
in a relatively short period of time.
It's also pretty forgiving, for example, if you have a numeric variable, you can treat it either as a string, or a numeric value, meaning you can put together
prototypes pretty easily and quickly.
If you want an app putting together, quickly, Appinventor might be the better
option, if you need something more powerful, more control over you UI etc, then
a more sophisticated Dev environment might be called for.
With Appinventor being so easy to use and learn, you're giving yourself more options.
Considering Eclipse seems to introduce errors I can't find and can't remove--even after using Project-Clean, I'm looking forward to any alternative.

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 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.

Categories

Resources