Android Starting App Development
-
Upload
paramvir-singh -
Category
Technology
-
view
270 -
download
4
Transcript of Android Starting App Development
AndroidStarting App Development
Contents
Android Architecture
Creating New Layouts
UI components
Running and Debugging apps
Activity Navigation
Android Architecture
Linux Kernel
Libraries
Android Runtime and Core libraries
Application Framework
Applications
Linux Kernel
Provides Basic System Functionality such as process management, memory
management and device management.
Provides all device drivers to communicate all different hardware in device like
Camera, Sensors, Bluetooth, WiFi, Audio and others.
Basic Libraries
Low level libraries which provide basic features like SQLite Database, web
browser, LibC, library for playing and recording Audio/Video etc.
Mainly written in C/C++.
Interact with device drivers to handle all the basic features of the OS.
Android Core Libraries
Java based libraries that are specific to Android.
Interact with Basic libraries to perform desired functionality such as handling
recording of Audio and Video.
User interface building, Graphics design(2D and 3D) and Database access.
Dalvik Virtual Machine
Each application run in its own instance of Dalvik Virtual machine.
Multiple instances of Dalvik VM’s can run efficiently.
Application Framework
Application Manager
Activity Manager
Notification Manager
Location Manager
..and others
Applications
All built in apps
And the third party apps
***
“Till 29th September, 2015 Android activations were 1.4
billion.”
Let’s Make Layouts - some basics
Height and Width - “match_parent” or “wrap_content” or digital value in “dp”
Unique id - “@+id/xxx”
Naming convention for Id’s - “@+id/tv_login_username”,
“@+id/button_login_submit”
Naming convention for layouts - activity_login.xml, activity_settings.xml
ImageView
<ImageView
android:id="@+id/iv_orders_list_footer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="20dp"
android:src="@drawable/icon"
/>
Drawables
Located in res/drawable/filename.png
Support different size/resolution devices.
hdpi, mdpi, xhdpi, xxhdpi.
Referred in xml as “@drawable/abc” (for abc.png)
Usually prefer PNG images, can also use JPG images.
EditText
<EditText
android:id="@+id/et_login_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/passcode"
android:inputType="textPassword"
android:maxLength="30"
android:textSize="24dp"/>
Button
<Button
android:id="@+id/button_login_submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/primary_dark"
android:text="Login"
android:textColor="@color/primary_text"
android:textSize="24dp"/>
Button
OnClickListener
mButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//Do the required task
}
});
Hands On
Login screen
***
“Android share in Chinese mobile market is 76.5%”
Running and Debugging
Android Studio features - Clean, Build, Run
Android Emulator(Android Virtual Device)
Third Party Simulator - Genymotion
Displaying Logs
***
“Average daily Android subscription is 1.5 million.”
Activities
Every Activity will inherit an “Activity”.
Inheritance
Inheritance
Inheritance
Extending a class.
Accessing inherited methods and member variables.
Overriding methods.
Start Another Activity - Intents
Intent - “A message either to start another Activity or to communicate to another
Activity.”
Intent Actions - What it should do?
Passing Arguments to next Activity
Sending Data To Activity
Intent Parameters
Arrangement of Activities - Backstack
Why Activities are Important
Application performance and behaviour.
Interview Questions!!
Activity Lifecycle
Activity Lifecycle - Callback methods
onCreate
onStart
onResume
onPause
onStop
onDestroy
Activity Lifecycle
onCreate
onStart
onResume
onPause
onStop
onDestroy
ListView
PlayStore
But Not To Worry...
800,0000 apps have < 100 downloads.
Another 700,000 have < 1000 downloads.
Another 400,000 have < 10,000 downloads.
Only 35,000 apps are downloaded more than 500,000.
###
Paramvir Singh, Android Developer and Trainer
https://in.linkedin.com/in/paramvir-singh-android-developer-b45b5321