Why develop for android Android platform overview Android app overview Android app lifecycle Android app fundamentals and building blocks(Activities/Fragments, Intent, Services, Broadcast Receiver, Content Provider/Content Resolver, ) Design What we need to get started with android development
dominant mobile operating system. It is based on Linux kernel 3.4/3.10 (depending on device) and is open-source (with proprietary bits). It runs on a wide variety of hardware, including smartphones, smart watches, cars, televisions, digital cameras and more. It was founded by Andy Rubin and three others in October 2003 and got acquired by Google in August 2005.
activations per day Over 200M smartphones running Android sold annually Over 1.43M apps available Over 76% smartphone operating system market share
Free SDK, IDE and emulator No restrictions; access anything* Faster access to new form factors and hardware Distribute your app anywhere (Playstore, Amazon Appstore, …)
a user can interact with Every app has at least one activity, and an application can have several activities. Activities can be ❖ Full-screen ❖ Floating ❖ Embedded inside another activity
to be reused Adds modularity to your app and makes dynamic UI design easy it has its own layout, behavior and lifecycle callbacks, but it killed/stop if the activity is too
operation to be performed. Think of it as an “intention” to do something Intents can be used to start activities, services or send a broadcast Intents are of two types – Explicit (when you know what exactly you want to do), and Implicit (when you’re not sure what you want to do)
Implicit intent is: take for example you want to open a link in a browser, and you have more than one browser, implicit intent helps you choose what browser you will like to open the defined link. Explicit Intents ❖ The most used case of explicit intent is moving from activity to the other, and it can also be used to transfer data from one activity to the other.
the background There are two types of services in Android – Bounded (which runs as long as components which bind to it run) and Unbounded (which runs indefinitely) but a service can also be both Services run on the main thread of the application by default Faceless components that run in the background E.g. Music Player, Network download.
event that can be “broadcasted” so other apps/services can listen for it Broadcasts are handled by a BroadcastReceiver, which is a component that allows you to listen for broadcasts A BroadcastReceiver can be implemented in AndroidManifest.xml, or dynamically by calling registerReceiver(), or both An app’s/services’s BroadcastReceiver is never called if the app/service hasn’t been explicitly started by the user. Battery level SMS Received Photo Captured System sends a broadcast App/Services
to store data in your app in a structured way, similar to a relational database like SQL, for the purpose of providing it to other apps. Example usage: Contacts app, SMS app, etc A content resolver allows you to get data from a content provider or manipulate its data (modify, delete, update, etc) You cannot request to read data from a content provider at runtime, it has to be declared in AndroidManifest.xml App Database Update Delete Query
user interface, such as the UI for an activity or app widget Layouts can be defined both in XML or programmatically using View and ViewGroup objects Some types of Layouts in Android: LinearLayout RelativeLayout FrameLayout & Constraint layout