Wednesday, August 31, 2011

Tidbits of info

DDMS (Dalvik Debug Monitor Service)
    Used for task management, file management, emulator interaction, logging  and screen capture.

    You can use DDMS file explorer to browse files on the emulator and a device ( phone). As well as copy files               
     to and from them.

    DDMS can simulate calls , text messages and location to the emulator but not to an actual phone.

Emulator controls 
   control F11 and control F12 for portrait and landscape orientation of the emulator.
   Alt-Enter for full screen view.

Source code ( which I assume they mean Java code) goes in to the /src folder. I am not sure if it is only allowed there or can be placed in other folders as well. If it can be placed in other folders, when should you?

Tools can be found in the /tools folder ( makes sense). You can fine such tools as draw 9-patch which is used for making buttons that are stretchable . 

Android documentation is in the /doc folder. The documentation is not up to date but a good place to start if you don't have access to the internet at that moment. You have to go to the website  for updated documentation. 

Thursday, August 25, 2011

Where to start

  There are many websites already explaining how to install the programs and plugins  you are going to need  to build Android apps so I won't go in to detail about that.
   I decided to read up a bit on XML. For a general overview I looked at http://en.wikipedia.org/wiki/XML  and for a more detailed look I went to  http://www.w3.org/TR/REC-xml/. The last one is more of a "what's not allowed " listing of XML. It gets complicated towards the end.
 

Sunday, August 21, 2011

Progress

     My Progress in learning how to write Android apps  is going a lot slower than I anticipated. I am having to jump from area to area . Learn a bit about Android, jump to Eclipse, try to figure out Java and then getting it to work on the emulator. It is hard to keep it all straight. I am wondering how I should proceed now. Do I keep jumping  around like I am now or learn one thing at a time? If one thing at a time, which do I start with?  I am thinking  I should learn in this order [Java, XML, Eclipse, Emulator, Android ]
     At this point I am not totally sure where to put  all the Java code and XML code in the package and how to reference them from other parts.  It was not very hard to understand where resources such as PNG, text strings, and sounds go , they have folders dedicated to them ( put your icons and other graphics in the Drawable folders) but looking at the example apps  it seems like XML files can go in just about any folder. I am sure there is a reason for why a XML goes in one folder and not another but I haven't figured it out yet.
     I am use to thinking of programs as following a list of things to do . Step one  do this, step two jump to  this , and so on . So as I look over examples of Android,  I am finding it hard to follow what happens when.
     One new thing I learned  was that Android is based on the Linux kernel ( hopefully I don't have to also learn Linux any time soon)

     It's all rather frustrating  and discouraging at times but I trudge on. Absorbing what knowledge I can and trying to apply it...

Friday, August 19, 2011

An outline of what I think I know so far.

What is Android?
The Android system is built upon the Java language. It is an extension of the language  with packages specifically made for Android. For the user it means a look and feel, a standard way of functioning. For the developer it is features already built in so they don't have to write all the code for things like buttons, sliders, showing video and images or how the different parts of the code interact.

What is Java?
 Java is a object oriented programming  language ( OOPs) . Which basically means you think in terms of classes and objects  to combined data and the subroutines that operate on the data in to bundles. A real world example is Rex is an object of the dog class which is subclass of the animal class which is a subclass of the  life class which is a subclass of the super-class physical. You could get even more specific about the classes  such as Rex is an object of the German Shepard class which is a subclass of the  dog class. You can have many levels of classes. The object itself does not exist until you create an instance of it.

What is XML?
 XML is a markup scripting language which is basically a shorthand way of  writing code . Instead of writing all the Java code to create a selection button you would write.
<Button
     android:id="@+id/button1"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:text="button one"
/>
You can add many other properties  such as size and location on the screen.

What is Eclipse?
  Eclipse is a program that helps you write java code and debug it. An Integrated Development Environment ( IDE). You also need to add a plug-in for a Android phone emulator for testing the apps you create.




Day one

Why I started this blog about learning Android. 
  I think one of the best ways to learn , confirm what you know and understand is to try to explain it to others ( not that anyone will read this but I will treat it as if it will be seen by others).  By letting you know which areas you are lacking in your understanding of the subject it helps you study and  organize your thoughts about it. 


First a little about me. 
  I have gone from teletype terminals to modern computers and devices. I have learned a bit of this and that  but could never claim a mastery of any of it. My first introduction to computers was in high school. We used BASIC programming language in computer class on a teletype. Feeding in programs  from a paper tape ( ahhh the good old days). It was a time when one person could write a small  program and share with friends. The class got it's first taste of the future with the purchase of a Pet computer which had  a tape drive for storage. I finished high school  soon after that computer. Looking back on it, I wish we had been taught assembly language. I have heard it said that BASIC ruined a lot of potential programmers.
  After schooling  I could not afford a computer so I pretty much forgot about it. Then one day I came across the now famous Commodore 64 home computer and I was enthralled. I saved my money and bought one. I have had at least one computer ever since, sometimes more than one at a time.
  Most of the time I used the computers for games, internet , and writing. Basically just using applications. On occasions I would attempt  to get back in to programming  by dabbling in languages ( C, C++, BASIC , Python, even some assembly)  but it felt like things were changing so fast and programs were getting so big  that I could never learn enough to keep up. Then along came Android, where one person could make an application. It seemed to me that learning it was a  reachable goal. So I researched android online , looked at a few books  and bought one "Android Apps for Absolute Beginners" by Wallace Jackson. Absolute Beginners that sounded like me and a good place to start.
  Now you might be asking right about now "Why a book and not just learn online?". Good question and the answer is I like the feel of a book. I like being able to write and highlight in it. I like not having to power it up to read. I like that if I spill anything on it I haven't lost a few hundred dollars worth of equipment.
  My review of the book: First it tries to teach more than Android, it goes in to Java and Eclipse, all the while failing to reasonably explain any of the three. I think they should have advised in the beginning to study  Java and get an overall view before venturing in to this book and stuck to just Android and a bit of Eclipse. It tries to teach all three which muddies the water and ends up being confusing. Also there are a number of errors and out of date information. Which a friend warned me about when buying a book on programming.
  So on to book two. "Sams teach yourself Android Application development" by Lauren Darcey and Shane Conder. A little more technical and presented slightly different  which helped fill in gaps from the first book. This book I think assumes you know Java and seems to skip over important steps in the exercises. So I have been reading up on Java, this time online.