Android Mobile Development

The Fundamentals

Who am I ?

Lead Mobile Engineer @gRateFriends
Founder/Tech Lead @PocketTour
Senior Mobile Engineer @Radiofonic

skype: spirosoik
email: spiros.oikonomakis@gmail.com

Presentations Roadmap

  1. The fundamentals
  2. First Android Application
  3. Optimise first application with 3rd party libs
  4. Effective UI

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

Building & Running Overview

Building & running a project with android studio

Testing

Provided by Android

  • Instrumentation Framework

  • monkeyrunner

  • uiautomatorviewer

  • uiautomator

  • espresso

3rd Party

  • Roboelectric

  • Robotium

Deep into the Android

Android System Architecture

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

Fragment Lifecycle

Handling the Fragment 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)

Hands on

How will I support all the previous OS versions?

Backward Compatible UI

Android Support Libraries

Use Spoon

Native vs. Web vs. Hybrid

How to make money as an Android Developer?

€€€€€€

  1. Create a quality APP

  2. Have a freemium Strategy

  3. Get downloads; increase your user base

  4. Convert free users to paid; Generate revenue (eg. In-app purchases)

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

Ralph Johnson (computer scientist)

 

Thank you!!!


Questions???


EESTEC Android App Development - Part 1

By Spiros Oikonomakis

EESTEC Android App Development - Part 1

  • 1,416