Android New Online Batch

New Android Online Batch Starts on Oct 16 2017

Tuesday, September 2, 2014

My Class Day 3 - Structure of Android Project



Android Application :

Code + Data = Application
  |
       (Business Logic + Presentation Logic) + Data

Business Logic - Java - 
Project/src/package/ .java files

Presentation Logic - XML - 
Project/layout/ .xml files

Data - XML 
Project/values/ .xml files

class Activity
{
     // 80% code
}
class MyActivity extends Activity
{
    // you have to execute 80% code present in super class - super.method(data);
    // 20% code
}



Monday, September 1, 2014

My Class Day 2

Objective of Day

1) Architecture of Android
     Applications
Application Framework
DVM(Core Libraries) - C/C++ Libraries
Linux Kernel
Device Drivers
Hardware

2) Comparing the C, Java, Android
C application --> OS
Java application --> JVM --> OS(any)
Android application --> Application Framework --> DVM --> OS(Linux)

3) History of Android - 2003 - Andy Rubin 
    Google purchased Android - 2005
    OHA(Open Handset Alliance) - group of Companies - 2007
   
4) Android - a Gift to Mobile World
     1) Hardware Manufacturers
      2) Application Developers
      3) Mobile Users

5) Versions of Android

Day 2 Notes :

Architecture of Android : 

   Explaination of each Layer from top to bottom   
   
   1) Applications : 
                            This is the top most layer of Android Stack. The application which you developed and installed sits in this layer along with the existing predefined        applications like calculator, dialer, Sms application etc.
                                 Your application is written using Java programming language syntax which is finally translated to .dex(dalvik executable) format. All the dex code with data and manifest file are packed into .apk(application package) file. Hence a .apk file is nothing but an application in Android. Our application then interacts with its neighbouring layer i.e Application Framework layer.

  2) Application Framework : 
                            This layer provides services at runtime to your application. This layer contains a set of Managers which are service providers to your application. The following are the Managers that exist in this layer.
 1) Activity Manager
 2) Window Manager   
 3) View System
 4) Resource Manager
 5) Package Manager
 6) Location Manager
 7) Notification Manager etc.
 For example :  Your application can be displayed on the Screen by getting Service from Window Manager. Similarly your application resources are managed by Resource Manager. your Activity's Lifecycle is managed by Activity Manager etc.
NOTE :  your application can access these Managers directly in your code by using getSystemService() method as follows :
Ex : WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);   

3a) DVM :            
                       DVM stands for Dalvik Virtual Machine. DVM runs the application code which is in dex format and finally translates it into Linux format. DVM provides the Runtime environment for your application along with Java APIs. 
3b) Java APIs :
                          These APIs are essential for the interpretation of our Application by DVM. Here we have Core Java libraries and also Android libraries that are required for proper functioning of DVM.  
NOTE : DVM and Java APIs together is called Runtime. 

 3c) C/C++ libraries :
                                  These Libraries are used by DVM to talk with LINUX kernel as LINUX is designed in C/C++ so we use C/C++ libraries as LINUX can understand only C/C++ code. These libraries are invoked by the Application Framework Managers at runtime implicitly.

4) LINUX Kernel :
                             This is the bottom most layer which does Process management, Memory management, File management etc. Kernel interacts with the Drivers by taking the calls from DVM which inturn communicates with the appropriate Hardware device. Hence Android relies on the modified version of LINUX 2.6 for all OS services.

2) Comparing the C, Java, Android

                                             

My Class Day 1

Objective of Day
1) Why should you learn Android?? 
- to develop Applications for Mobile Devices

2) What is Android - informally 
- Solution given by Computer Technology for the problem faced by Communication Technology.

3) Technical Definition of Android 
- Software Stack for Mobile Devices

4) Java - Platform Independency - Android Application Developement 

5) Market of Android - 8,50,000 devices. 65% shares - on Android.

Day 1 Notes : 

C,C++,Java etc --> to develop Applications --> for Computer

Android --> to develop Applications --> for Mobile Devices (Smart phones, Tablets, notebook PCs, Google TVs) 



What is Android ??

--> IT (Information Technology)
Computer Technology + Communication Technology
    (OS, DS, DBMS, CD, AI etc) (Computer Networks, Mobile Communications etc)

problem - Computer Technology - Transfer of Data
solution - Communication Technology - LAN, MAN, WAN

problem - Communication Technology(Mobile Devices) 
- Meeting the User Requirements - Limitations - 
     - Cost 
     - Adaptation to 
1) Limited Screen
2) Limited Memory
3) Limited Processing power
     - Responsiveness
        solution - Computer Technology - Symbian, BlackBerry, Apple IOS --- ANDROID

Android - final & powerful solution 

--> Cost - Cheaper 
--> Compatible to many companies
--> Limited Screen - Scalable
--> Limited Memory - Android automatically kill background(non-usable) apps
--> Limited Processing Power - DVM (Dalvik Virtual Machine) 
--> very quick - seamlessness


Why Android?? - Mobile Application Development
What Android?? Solution given by Computer Technology --> for problem faced by Communication Technology

--> What is Android??
ans) Software stack for Mobile Devices which include Operating System, Middleware Services, Key Applications

Combination of 4 softwares: Applications + Application Framework + DVM + LINUX Kernel


--> Android is built on LINUX Kernel because LINUX is open-source which means it is free and source code is open to all and you can modify it.
--> Android application is executed by DVM(Dalvik Virtual Machine) similar to JVM(Java Virtual Machine) in Java.
--> Application Framework provides services for your application at run time.
--> Your application sits at top layer along with other built-in applications like Contacts, SMS application, Calculator etc.

--> Market of Android :
 huge scope - Sale -  8,50,000 Android Mobiles are activated per day.
 No Licensing fee (or) no Certification required - Google Play 
 You can start your own company without Software team initially.

Android Application Components

Components of an Android Application :

An Android Application has 4 components :
1)    Activity
2)    Service
3)    Content Provider
4)    Broadcast Receiver

Activity :
                 An Android Application requires a User Interface(Screen) which is used by the user to interact with the Application. This User Interface is provided by a class called ‘Activity’.  
 Activity is nothing but an object that holds the User Interface screen.

Service :
               An Android Application has to perform some long-running operations like playing music, downloading a file which doesn’t require the User Interface (screen) as they work in background. All these tasks are defined by a class called ‘Service’.

Content Provider :
                        If one Android Application requires the data of other Android Application, then Content Provider comes into picture.
This class encapsulates the data of an Android Application which can be accessed by other applications if they have valid permissions.

Broadcast Receiver :
                        Many events may occur in the Mobile such as Battery Low, Camera has taken a picture, an SMS arrived, WiFi has been detected etc. Then your Application has to perform some action for those desired events. Then BroadcastReceiver class is used to handle those events which the Android System broadcasts. 

What is Android??

--> Is it an Operating System alone??
ans) No. If it is an O.S, it has to support 2 or more Programming Languages. But Android supports only Java.

--> Is it a Programming Language??
ans) No. It inturn relies on Java as a programming Language.

--> Then What exactly is Android??
ans) Android is a Single piece(Applications + Framework + Libraries + DVM + LINUX Lernel) all combined together. All the above things constitute a software stack.

--> Why Android??
ans) To Develop Applications for Mobile Devices.

--> Is Android Platform Independent??
ans) Android itself is a platform :-)
       So there is no meaning in discussing about platform independence.

--> Android is for 
1) Mobile Application Developers - who want to develop innovative applications
2) Mobile Companies - who can get Android at almost no cost(Android is open source & free) and encorporate it in there Devices.
3) Mobile Users - who can easily get their requirements to be solved by consulting Mobile Application Developers & also can get the built in apps to be replaced by the other apps.

--> Finally, Android is a gift given by OHA(Open Handset Alliance) led by Google for the above 3 categories of people.

--> This is the introduction of Android. Hope you got atleast some idea about What is Android and Why Android. Good Day :-)

Introduction to Android

Introduction to Android platform :

Computer is used for problem solving.
But in today's advanced world, as technology is at the peak, almost all problems can be solved using the Mobile devices.
Previously you have programmed(written applications) to a computer using C,C++,Java,Dotnet etc
now let us start programming(writing applications) for a Mobile Device.

Limitations for programming(application development) to a Mobile Device :

Mobile Device is a pure hardware.
It requires a System software to function(i.e Operating System)
So previously there are Symbian, BlackBerry, Windows Mobile, Apple IOS for Mobiles.
But All of them are proprietary i.e
1)    Their source code is not available open to all & one has to purchase the SDK of         the above O.S to get into the Application development.
2)    Finally The Application Developers are not given the liberty to stretch their innovation & build the applications with their flying thoughts.
 A community under the roof of Google known as OHA(Open Handset Alliance) thought to come up with a open source platform which encourages the Mobile Application Developers to put all their innovative ideas into practice.
So at last They unveiled the powerful, open source platform – ANDROID
ANDROID gave the solution to all the problems faced by the Mobile Application Developers

In Mobile World, There are 4 communities of people :

1)    Mobile Users :
2)    Mobile Operators :
3)    Mobile Application Developers :
4)    Handset Manufacturers :

Each community has its own problems.
A great solution to the problems faced by these communities is ANDROID.