O’Reilly, Developing Android Applications

android
Last week, O’Reilly started a free training Android course, I had the chance to attend it, all of it, unlike some of my friends who couldn’t stay up till late night
I also had the chance to take notes, .. I will post the notes of the first lecture at the end of this post (its my notes, do not expect to understand everything from it because you did not write it
)
the lecture started with the basic principles on how Android works, … you know .. the “useless things that is good to know” sort of things, than some tips on installations and some basic “flash light” program, .. and during that whole thing a lot of questions were made by the people watching the course, .. some questions are really irrelevant and useless, while others were interesting.
Before i post my notes i would like to mention my opinion about the course from the first lecture (this opinion is merely my personal opinion). It is my first time coding Android, .. but it is NOTmy first time coding
My opinion on Tony the lecturer
He seems to know somethings on Android, more than most of us obviously, but i am afraid that I expected the lecture to be more professional, I mean during the lecture, Tony was exploring the code and how things work, i did not find him mastering the language, … but in my opinion as long as he is ahead of us at least one step, than praise him
My humble opinion about the Android programming language
Android relies heavily on user-defined XML tags (or that is what i saw from the first lecture). its not a good or bad thing, .. it is just … different i guess.
It is a very interesting course and i would like to encourage anyone who has the slightest interest in developing mobile applications to attend this course
Anyways .. without further dues, … here are my notes
————————-
linux>Native Libraries > Run time + Dalvik VM > andriod framework (activity manager, content Provider, Location manager, Notification manager,..) > System apps (contacts, Phone Dialer, Email, Web Browser)
app: code + R resources (movie, xml, pic)
Activity: single screen. app have many activities
intent: code to accomplish a verb (call number, open contacts)
developer.andriod.com/sdk/eclipse-adt.html
package name > unique
min SDK Version, "API LEVEL", Andriod 1.5 > 3
manifest (Like in J2ME, configuration file)
main.XML have app configuration (like orientation, gravity position of the test")
String.XML
"@String/Hello" > Macros, u can use it for localization
"@String/Red" >> you can set Red= "Red hat" in String.XML
Color.XML
#FFFF0000
android:background="@color/red"
activity > screen > .java
R class generated automatically, each new resource will be added automaticallyin the R class
you can add new elements in main.xml like "button" and you can set its attributes (via XML Tags)
the @+id adds unique ID by default
in JAVA (RefFlashActivity.Java)
Button greenButton = (Button)findViewById(R.id.green_button);
greenButton.setOnClickListener(new View.OnClickListener(){...})
Intent intent = new intent(activ.this, act2.class);
startActivity(intent);
the above will change from one screen to another.
Here is answer to right to left: Google tracks issues and feature requests at Google Code's site. As of January 2010[update], the most requested ("starred") feature is the support for right-to-left languages such as Arabic and Hebrew.[90][91]
http://developer.android.com/reference/java/text/Bidi.html
——————-
JCodeBase 1.1 Beta
JCodeBase [download ]is a personal portable code repository, its simply your personal code bank , where you can save your own codes that are written in any programming language and take it with you to any machine that support java to search within your own codes. The specialty of JCodeBase is that it uses java and derby db (yeah I did code it before java 6 and java DB) so it can work every where. Another specialty is syntax coloring also.
This is one of my very first really usable softwares I have done in collage and just 3 months before now I have put it as open source project on source forge but it had lots of bugs, and there was no explanation on how to use the application.
The bugs I was reported about has been cleared and In this blog I hope I can demonstrate how to use the application.
You can run the application from your flash disk on any computer by running JCodeBase.jar, well if you don’t like to run .jar files and you are on windows you can click on JCodeBase.bat and you will get this screen:
As a first time user there is nothing you can do in this screen other than pressing “Add Code” button.
By pressing this button you will get another screen to add one of your codes that you need to remember.
Here lets add something useful, one of my colleges has a problem dealing with JComboBoxs in java he puts its data source a Vector of strings but he always forget how to update the Jcombobox if the string vector is updated. Well its simple lets add that code.
Now you can see some key words in the code is bold, well it happens depending on what language you are using it support some languages and the syntax colorizing changes from a language to another.
Also not the tags used in this screen (java, combobox, update)
Now lets click on “Add” and close this screen
In the main screen now we can see our tags in the select tags combo box
Well lets say I want to remember a code I have added to the application with a tag java
I just select this tag and click on search , then it will show me the result
For sure it will be usefull if you add all your important codes and when you come back after few months (most probably you have forgetten something ) then this application will come to the rescue. ( and the best thing it is portable , it can be stored easily with in your flash desk with you any where and run on any platform thanks to java and derby).
I really need to know what do you think about this application , is it useful should I continue to work on it, or is it waste of time,
If I should continue working on it what modifications do you really need.
Read More

