Android Mobile Development

The Fundamentals

By StudyOwl

 

Agenda

 
  1. The fundamentals
  2. First Android Application
 

What is Android?

Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google

C

D

E

F

G

H

I

J

K

L

Why Android?

  • A simple and powerful SDK

  • No licensing, distribution or development fee 

  • Development in different platforms (Mac, Linux, Windows)

  • Java programming

Will I develop alone?

How to start development?

Tools to use

  • Android SDK

  • Android Virtual Manager

    • The AVD Manager provides a graphical user interface in which you can create and manage Android Virtual Devices (AVDs) that run in the Android Emulator.
  • Android Emulator

    • Device-emulation tool that you can use to debug and test your applications in an actual Android run-time environment.
  • Android Studio

    • IDE for Android application development, based on IntelliJ IDEA
  • Android Debug Bridge (adb)

    •  A versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It also provides access to the device shell for advanced command-line operations.
  • Gradle build system

Developer Workflow

Projects Overview

  • Application Modules

  • Test Modules

  • Library Modules

  • App Engine modules

 

Project Files

Hands on

Website vs Android Application

  • A website consists of multiple pages, so does an Android Application consist of multiple activities.

 

  • Just like a website has a “home page,” an Android app has a “main” activity, usually the one that is shown first when you launch the application.

 

Just like a website has to provide some sort of navigation among various pages, an Android app should do the same

Building & Running Overview

Building & running a project with android studio

Application Fundamentals

  • App Components

  • App Resources

  • App Manifest

  • Intent & Intent Filters

  • Activities

  • Services

  • Content Providers

  • App Widgets

  • Processes & Threads

  • Bitmaps

  • Static Content

  • Layouts

  • UI Strings etc.

  • Java Package

  • Permissions

  • Libraries with metadata (Maps, FB,) etc.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
    package="com.soi.rapidandroidapp" >

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <uses-feature android:glEsVersion="0x00020000" android:required="true"/>

    <application
        android:name=".BaseApplication"
        android:allowBackup="true"
        tools:replace="android:icon"
        android:icon="@drawable/ic_logo_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
        <meta-data android:name="AA_DB_NAME" android:value="RapidAndroidApp.db" />
        <meta-data android:name="AA_DB_VERSION" android:value="1" />
        <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="@string/ga_maps"/>
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/fb_application_id"/>
        <activity
            android:name=".ui.LoginActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.RegisterActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateHidden" />
    </application>

</manifest>

Hands on

Activity Lifecycle

Hands on

User Interface

User Interface (1)

User Interface (2)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >
    <TextView 
        android:id="@+id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello, I am a TextView" />
    <Button 
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello, I am a Button" />
</LinearLayout>

User Interface (3)

 “Before software can be reusable it first has to be usable.”

Ralph Johnson (computer scientist)

 

Thank you!!!

-Prashanth

StudyOwl

 

 

Copy of EESTEC Android App Development - Part 1

By Prashanth Reddy

Copy of EESTEC Android App Development - Part 1

  • 959