SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
Android
Looking beyond the obvious

            10/20/11

      Cocoaheads Siegen

   Dipl. Inform. Simon Meurer
Agenda
 ●   General
 ●   Android „Desktop“
 ●   Developer's View
 ●   Publishing




10/20/11                         2
What is Android?
 ●   OS and Software-platform for different Mobile
     Devices
 ●   Developed by Open Handset Alliance
 ●   Based on Linux-Kernel 2.6
 ●   Biggest rival of iOS on Smartphone OS-Market




10/20/11                                             3
Market share
    50


    45      43,4


    40


    35


    30


    25
                      22,1

    20
                                       18,2


    15
                                                        11,7

    10


     5
                                                                         1,9           1,6         1
     0
           Android   Symbian           iOS              RIM             Bada         Microsoft   Others


                               2nd quartal 2011 Market share (%) - source: Gartner
10/20/11                                                                                                  4
Sample Devices




10/20/11                    5
Android Versions
 ●   2.x – for mobile phones (act. 2.3.6)
 ●   3.x – for tablets (act. 3.2)
 ●   4.x – gets 2.x and 3.x together




10/20/11                                    6
Android „Desktop“
 ●   Apps in Menu
      ●Can be moved to „Desktop“
 ●   Themes and Live-Background
 ●   Shortcuts
 ●   No. of Desktops set by Theme




10/20/11                             7
Widgets




10/20/11             8
Notifications and Preferences




10/20/11                                   9
Developer's View
 ●   Architecture
 ●   Language
 ●   Key Concepts
 ●   Menues
 ●   Environment




10/20/11                           10
Architecture




10/20/11                  11
Language
 ●   Android is Java, right?
     Yes, but:
      ●    No Constructors (for GUI-Classes)
      ●    No Swing or SWT
      ●    No System.out.println(...)
      ●    Limited memory
      ●    ...


10/20/11                                       12
Key Concepts
 ●   Activities
 ●   Layouting with XML
 ●   Intents
 ●   Services
 ●   Content Providers
 ●   Resources



10/20/11                         13
Activities
 ●   UI-Screen (better: logic)
 ●   An app has usually more than one
 ●   Activity Stack
      ●    New Activities pushed on stack
      ●    Back pops them of




10/20/11                                    14
Example (HelloWorldActivity.java)
package com.test.helloworld;
import android.app.Activity;
import android.os.Bundle;
public class HelloWorldActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}


10/20/11                                                15
Layouting with XML
 ●   GUI is build in XML
 ●   Tags = Elements, Attributes = Properties
 ●   Different Resolutions possible
     → No Absolute Layout, instead:
      ●LinearLayout, RelativeLayout, TableLayout,
       …
 ●   Place in XML = Place in Layout


10/20/11                                            16
Example (main.xml)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:layout_width="fill_parent"
  android:layout_height="fill_parent">
  <TextView android:id="@+id/textview" android:layout_width="fill_parent"
     android:layout_height="wrap_content" android:text="Hello World!" />
  <Button android:id="@+id/button" android:layout_height="wrap_content"
     android:layout_width="match_parent" android:text="Hello" />
</LinearLayout>




10/20/11                                                                    17
HelloWorld




10/20/11                18
Clicking the button
public class HelloWorldActivity extends Activity {

    public void onCreate(Bundle savedInstanceState) {

        ...

        Button b = (Button) findViewById(R.id.button);

        b.setOnClickListener(new OnClickListener() {

          @Override

          public void onClick(View arg0) {

              Toast.makeText(HelloWorldActivity.this, "Hello World!",Toast.LENGTH_SHORT).show();

              Log.v("HelloWorldActivity", "Hello clicked");

          }

        });

    }

}

10/20/11                                                                                           19
Toasting and Logging
 ●   Toast
      ●displaying short Text for a short while
     ● NOT for debugging


 ●   Log
      ●    is for logging on console
      ●    Different levels:
            – d, e, i, v, w



10/20/11                                         20
So, what about other Activities?
 ●   Problem: No Constructors for GUI-Classes
     → Intent:
      ●    Describes a spec. Action
      ●    e.g. „pick a photo“, „take a picture“, „create
           person“
      ●    Standards: „send an email“, …
      ●    Can be registered as standard
      ●    Intents extras = Values of Constructors
10/20/11                                                    21
Example (Intents)
onClick of Hello-Button:
Intent i = new Intent(HelloWorldActivity.this, HelloWorldActivity2.class);
i.putExtra("Hello", "World");
startActivity(i);
HelloWorldActivity2:
public class HelloWorldActivity2 extends Activity{
    protected void onCreate(Bundle savedInstanceState) {
        ...
        TextView t = (TextView) findViewById(R.id.textview2);
        t.setText(getIntent().getStringExtra("Hello"));
    }
}
10/20/11                                                                     22
How do I get results?
 1.startActivityForResult(Intent, requestCode)
 2.Generate result and put it in the intent
 3.set resultCode and finish() the activity
 4.in onActivityResult(requestCode, resultCode,
   Intent data) is your result




10/20/11                                          23
Services
 ●   Task that runs in background
 ●   e.g. Music Player
      ● Can be started by Activity1
      ● Changed by Activity2


         – e.g. Activity2 says „stop“ or „nextTrack“
 ●   „Live Wallpaper“



10/20/11                                               24
Resources
 ●   Manage data with xml
 ●   Resource-Class is generated automatically
      ●holds ids for the elements
 ●   Contains:
      ●    Layouts, Strings, Images, Values, Menus,
           Settings



10/20/11                                              25
Menu, Contextmenu and Search




10/20/11                             26
Development environment
 ●   Recommended: Eclipse
 ●   Fully integrated:
      ●    GUI-Builder
      ●    XML-“Helper“
      ●    Console
      ●    Debugging-Tools



10/20/11                               27
GUI-Builder




10/20/11                 28
XML-“Helper“




10/20/11                  29
Console and Debugging-Tools




10/20/11                                 30
Where do I publish my App?
 ●   Android Market:
      ●510,000 Apps in Sept. 2011
     ● uses Google Checkout for billing


     ● takes 30% of the app-price


 ●   Until now:
      ●    No controlles!



10/20/11                                  31
Publishing on Android Market
Requirements:
 ●   Google Account
 ●   register as developer on developer.android.com
      ●pay 25$
     ● only Creditcards


 ●   For charged apps:
      ●    register at Google Checkout

10/20/11                                          32
Publishing on Android Market
Requirements for the App:
 ●   App must be signed
      ●expires after 22.10.2033
 ●   AndroidManifest.xml:
      ●    android:versionCode and
           android:versionName must be defined
      ●    android:Icon and android:label must be
           defined

10/20/11                                            33
Publishing without Android Market
 ●   Complete free:
      ●Generate .apk
     ● Put .apk on your website


     ● .apk must be copied to device and installed

       (e.g. with APK-Manager)
 ●   Problems:
      ●    No (normal) User will do that!
      ●    Billing, integration, updates
10/20/11                                             34
Publishing without Android Market
 ●   Alternative Markets:
      ●Amazon App Store (about 18,000 Apps)
     ● SlideME (about 10,000 Apps)


     ● AndAppStore (about 2,000 Apps)


     ● OnlyAndroid


 ●   But:
      ●    Google can delete your app at any time!
      ●    Not so many customers
10/20/11                                             35
Lessons learned
 ●   Android is NOT Java
 ●   XML-Layouting is not allways fun
 ●   Complicated solutions for simple problems
 ●   Intents are sometimes mysterious
 ●   Looks half-baked sometimes
 ●   Docu is not as good as iOS-Docu



10/20/11                                         36
But...
 ●   Costs:
      ●Development for free
     ● Publishing 25$ once


 ●   Market share
 ●   Mainly Java
 ●   Freedom of choice
     ...

10/20/11                          37

Más contenido relacionado

Destacado

Pel dret a l'avortament
Pel dret a l'avortamentPel dret a l'avortament
Pel dret a l'avortamentEnsenyament
 
What is a_view_in_android
What is a_view_in_androidWhat is a_view_in_android
What is a_view_in_androidFred Grott
 
Holland9 Android Workshop Hogeschool Rotterdam
Holland9 Android Workshop Hogeschool RotterdamHolland9 Android Workshop Hogeschool Rotterdam
Holland9 Android Workshop Hogeschool RotterdamJ B
 
Android History & Importance
Android History & ImportanceAndroid History & Importance
Android History & ImportanceLope Emano
 
Вода растворитель. Значение воды
Вода   растворитель. Значение водыВода   растворитель. Значение воды
Вода растворитель. Значение водыМКОУ СОШ № 1 г. Сим
 
Il manuale degli standard professionali per la promozione della salute - Comp...
Il manuale degli standard professionali per la promozione della salute - Comp...Il manuale degli standard professionali per la promozione della salute - Comp...
Il manuale degli standard professionali per la promozione della salute - Comp...Giuseppe Fattori
 
Taller de descripcions!
Taller de descripcions!Taller de descripcions!
Taller de descripcions!silviaprofe56
 
Bellingham Real Estate - Buying, Selling or Questions?
Bellingham Real Estate - Buying, Selling or Questions?Bellingham Real Estate - Buying, Selling or Questions?
Bellingham Real Estate - Buying, Selling or Questions?Rich Johnson
 
Windows XP concepts
Windows XP conceptsWindows XP concepts
Windows XP conceptsQsrealm
 
Согласные звуки м, мь. Буквы мм. Урок 1
Согласные звуки м, мь. Буквы мм. Урок 1Согласные звуки м, мь. Буквы мм. Урок 1
Согласные звуки м, мь. Буквы мм. Урок 1МКОУ СОШ № 1 г. Сим
 
Matikka kertausta, osa 1
Matikka kertausta, osa 1Matikka kertausta, osa 1
Matikka kertausta, osa 1sunnycesilia
 
As media course work- evaluation
As media course work-  evaluationAs media course work-  evaluation
As media course work- evaluationBillysmedia
 

Destacado (20)

Pel dret a l'avortament
Pel dret a l'avortamentPel dret a l'avortament
Pel dret a l'avortament
 
What is a_view_in_android
What is a_view_in_androidWhat is a_view_in_android
What is a_view_in_android
 
Holland9 Android Workshop Hogeschool Rotterdam
Holland9 Android Workshop Hogeschool RotterdamHolland9 Android Workshop Hogeschool Rotterdam
Holland9 Android Workshop Hogeschool Rotterdam
 
Android History & Importance
Android History & ImportanceAndroid History & Importance
Android History & Importance
 
Cristian
CristianCristian
Cristian
 
Вода растворитель. Значение воды
Вода   растворитель. Значение водыВода   растворитель. Значение воды
Вода растворитель. Значение воды
 
Il manuale degli standard professionali per la promozione della salute - Comp...
Il manuale degli standard professionali per la promozione della salute - Comp...Il manuale degli standard professionali per la promozione della salute - Comp...
Il manuale degli standard professionali per la promozione della salute - Comp...
 
Taller de descripcions!
Taller de descripcions!Taller de descripcions!
Taller de descripcions!
 
Письмо букв по Илюхиной
Письмо букв по ИлюхинойПисьмо букв по Илюхиной
Письмо букв по Илюхиной
 
Bellingham Real Estate - Buying, Selling or Questions?
Bellingham Real Estate - Buying, Selling or Questions?Bellingham Real Estate - Buying, Selling or Questions?
Bellingham Real Estate - Buying, Selling or Questions?
 
Windows XP concepts
Windows XP conceptsWindows XP concepts
Windows XP concepts
 
Согласные звуки м, мь. Буквы мм. Урок 1
Согласные звуки м, мь. Буквы мм. Урок 1Согласные звуки м, мь. Буквы мм. Урок 1
Согласные звуки м, мь. Буквы мм. Урок 1
 
Что у нас над головой
Что у нас над головойЧто у нас над головой
Что у нас над головой
 
Rumah
RumahRumah
Rumah
 
Matikka kertausta, osa 1
Matikka kertausta, osa 1Matikka kertausta, osa 1
Matikka kertausta, osa 1
 
Гласный звук о, буквы Оо
Гласный звук о, буквы ОоГласный звук о, буквы Оо
Гласный звук о, буквы Оо
 
Столько же больше меньше
Столько же больше меньшеСтолько же больше меньше
Столько же больше меньше
 
4. program integer
4. program integer4. program integer
4. program integer
 
As media course work- evaluation
As media course work-  evaluationAs media course work-  evaluation
As media course work- evaluation
 
Где живут слоны
Где живут слоныГде живут слоны
Где живут слоны
 

Similar a Android: Looking beyond the obvious

Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game developmentWomen In Digital
 
Android Jumpstart ESC SV 2012 Part I
Android Jumpstart ESC SV 2012 Part IAndroid Jumpstart ESC SV 2012 Part I
Android Jumpstart ESC SV 2012 Part IOpersys inc.
 
ios-mobile-app-development-intro
ios-mobile-app-development-introios-mobile-app-development-intro
ios-mobile-app-development-introRemesh Govind M
 
Embedded Android Workshop at ELC Europe
Embedded Android Workshop at ELC EuropeEmbedded Android Workshop at ELC Europe
Embedded Android Workshop at ELC EuropeOpersys inc.
 
Android jumpstart at ESC Boston 2011
Android jumpstart at ESC Boston 2011Android jumpstart at ESC Boston 2011
Android jumpstart at ESC Boston 2011Opersys inc.
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Tomáš Kypta
 
Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveSebastian Vieira
 
Is Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVIs Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVOpersys inc.
 
Embedded Android Workshop at Embedded Linux Conference Europe 2011
Embedded Android Workshop at Embedded Linux Conference Europe 2011Embedded Android Workshop at Embedded Linux Conference Europe 2011
Embedded Android Workshop at Embedded Linux Conference Europe 2011Opersys inc.
 
Android App Development 01 : Getting Start
Android App Development 01 : Getting StartAndroid App Development 01 : Getting Start
Android App Development 01 : Getting StartAnuchit Chalothorn
 
Mobile & android apps presentation
Mobile & android apps  presentationMobile & android apps  presentation
Mobile & android apps presentationAya Taleb
 
EclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris WorkshopEclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris WorkshopHolger Staudacher
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginnerAjailal Parackal
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009sullis
 
Virtual Reality in Android
Virtual Reality in AndroidVirtual Reality in Android
Virtual Reality in AndroidMario Bodemann
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 

Similar a Android: Looking beyond the obvious (20)

Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game development
 
Android Jumpstart ESC SV 2012 Part I
Android Jumpstart ESC SV 2012 Part IAndroid Jumpstart ESC SV 2012 Part I
Android Jumpstart ESC SV 2012 Part I
 
ios-mobile-app-development-intro
ios-mobile-app-development-introios-mobile-app-development-intro
ios-mobile-app-development-intro
 
Embedded Android Workshop at ELC Europe
Embedded Android Workshop at ELC EuropeEmbedded Android Workshop at ELC Europe
Embedded Android Workshop at ELC Europe
 
Android jumpstart at ESC Boston 2011
Android jumpstart at ESC Boston 2011Android jumpstart at ESC Boston 2011
Android jumpstart at ESC Boston 2011
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012
 
Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspective
 
Is Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVIs Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IV
 
Embedded Android Workshop at Embedded Linux Conference Europe 2011
Embedded Android Workshop at Embedded Linux Conference Europe 2011Embedded Android Workshop at Embedded Linux Conference Europe 2011
Embedded Android Workshop at Embedded Linux Conference Europe 2011
 
Android App Development 01 : Getting Start
Android App Development 01 : Getting StartAndroid App Development 01 : Getting Start
Android App Development 01 : Getting Start
 
Mobile & android apps presentation
Mobile & android apps  presentationMobile & android apps  presentation
Mobile & android apps presentation
 
EclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris WorkshopEclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris Workshop
 
Getting started with android studio
Getting started with android studioGetting started with android studio
Getting started with android studio
 
Android Made Simple
Android Made SimpleAndroid Made Simple
Android Made Simple
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Android development beginners faq
Android development  beginners faqAndroid development  beginners faq
Android development beginners faq
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
 
Virtual Reality in Android
Virtual Reality in AndroidVirtual Reality in Android
Virtual Reality in Android
 
Android studio
Android studioAndroid studio
Android studio
 

Último

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Android: Looking beyond the obvious

  • 1. Android Looking beyond the obvious 10/20/11 Cocoaheads Siegen Dipl. Inform. Simon Meurer
  • 2. Agenda ● General ● Android „Desktop“ ● Developer's View ● Publishing 10/20/11 2
  • 3. What is Android? ● OS and Software-platform for different Mobile Devices ● Developed by Open Handset Alliance ● Based on Linux-Kernel 2.6 ● Biggest rival of iOS on Smartphone OS-Market 10/20/11 3
  • 4. Market share 50 45 43,4 40 35 30 25 22,1 20 18,2 15 11,7 10 5 1,9 1,6 1 0 Android Symbian iOS RIM Bada Microsoft Others 2nd quartal 2011 Market share (%) - source: Gartner 10/20/11 4
  • 6. Android Versions ● 2.x – for mobile phones (act. 2.3.6) ● 3.x – for tablets (act. 3.2) ● 4.x – gets 2.x and 3.x together 10/20/11 6
  • 7. Android „Desktop“ ● Apps in Menu ●Can be moved to „Desktop“ ● Themes and Live-Background ● Shortcuts ● No. of Desktops set by Theme 10/20/11 7
  • 10. Developer's View ● Architecture ● Language ● Key Concepts ● Menues ● Environment 10/20/11 10
  • 12. Language ● Android is Java, right? Yes, but: ● No Constructors (for GUI-Classes) ● No Swing or SWT ● No System.out.println(...) ● Limited memory ● ... 10/20/11 12
  • 13. Key Concepts ● Activities ● Layouting with XML ● Intents ● Services ● Content Providers ● Resources 10/20/11 13
  • 14. Activities ● UI-Screen (better: logic) ● An app has usually more than one ● Activity Stack ● New Activities pushed on stack ● Back pops them of 10/20/11 14
  • 15. Example (HelloWorldActivity.java) package com.test.helloworld; import android.app.Activity; import android.os.Bundle; public class HelloWorldActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } 10/20/11 15
  • 16. Layouting with XML ● GUI is build in XML ● Tags = Elements, Attributes = Properties ● Different Resolutions possible → No Absolute Layout, instead: ●LinearLayout, RelativeLayout, TableLayout, … ● Place in XML = Place in Layout 10/20/11 16
  • 17. Example (main.xml) <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/textview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Hello World!" /> <Button android:id="@+id/button" android:layout_height="wrap_content" android:layout_width="match_parent" android:text="Hello" /> </LinearLayout> 10/20/11 17
  • 19. Clicking the button public class HelloWorldActivity extends Activity { public void onCreate(Bundle savedInstanceState) { ... Button b = (Button) findViewById(R.id.button); b.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Toast.makeText(HelloWorldActivity.this, "Hello World!",Toast.LENGTH_SHORT).show(); Log.v("HelloWorldActivity", "Hello clicked"); } }); } } 10/20/11 19
  • 20. Toasting and Logging ● Toast ●displaying short Text for a short while ● NOT for debugging ● Log ● is for logging on console ● Different levels: – d, e, i, v, w 10/20/11 20
  • 21. So, what about other Activities? ● Problem: No Constructors for GUI-Classes → Intent: ● Describes a spec. Action ● e.g. „pick a photo“, „take a picture“, „create person“ ● Standards: „send an email“, … ● Can be registered as standard ● Intents extras = Values of Constructors 10/20/11 21
  • 22. Example (Intents) onClick of Hello-Button: Intent i = new Intent(HelloWorldActivity.this, HelloWorldActivity2.class); i.putExtra("Hello", "World"); startActivity(i); HelloWorldActivity2: public class HelloWorldActivity2 extends Activity{ protected void onCreate(Bundle savedInstanceState) { ... TextView t = (TextView) findViewById(R.id.textview2); t.setText(getIntent().getStringExtra("Hello")); } } 10/20/11 22
  • 23. How do I get results? 1.startActivityForResult(Intent, requestCode) 2.Generate result and put it in the intent 3.set resultCode and finish() the activity 4.in onActivityResult(requestCode, resultCode, Intent data) is your result 10/20/11 23
  • 24. Services ● Task that runs in background ● e.g. Music Player ● Can be started by Activity1 ● Changed by Activity2 – e.g. Activity2 says „stop“ or „nextTrack“ ● „Live Wallpaper“ 10/20/11 24
  • 25. Resources ● Manage data with xml ● Resource-Class is generated automatically ●holds ids for the elements ● Contains: ● Layouts, Strings, Images, Values, Menus, Settings 10/20/11 25
  • 26. Menu, Contextmenu and Search 10/20/11 26
  • 27. Development environment ● Recommended: Eclipse ● Fully integrated: ● GUI-Builder ● XML-“Helper“ ● Console ● Debugging-Tools 10/20/11 27
  • 31. Where do I publish my App? ● Android Market: ●510,000 Apps in Sept. 2011 ● uses Google Checkout for billing ● takes 30% of the app-price ● Until now: ● No controlles! 10/20/11 31
  • 32. Publishing on Android Market Requirements: ● Google Account ● register as developer on developer.android.com ●pay 25$ ● only Creditcards ● For charged apps: ● register at Google Checkout 10/20/11 32
  • 33. Publishing on Android Market Requirements for the App: ● App must be signed ●expires after 22.10.2033 ● AndroidManifest.xml: ● android:versionCode and android:versionName must be defined ● android:Icon and android:label must be defined 10/20/11 33
  • 34. Publishing without Android Market ● Complete free: ●Generate .apk ● Put .apk on your website ● .apk must be copied to device and installed (e.g. with APK-Manager) ● Problems: ● No (normal) User will do that! ● Billing, integration, updates 10/20/11 34
  • 35. Publishing without Android Market ● Alternative Markets: ●Amazon App Store (about 18,000 Apps) ● SlideME (about 10,000 Apps) ● AndAppStore (about 2,000 Apps) ● OnlyAndroid ● But: ● Google can delete your app at any time! ● Not so many customers 10/20/11 35
  • 36. Lessons learned ● Android is NOT Java ● XML-Layouting is not allways fun ● Complicated solutions for simple problems ● Intents are sometimes mysterious ● Looks half-baked sometimes ● Docu is not as good as iOS-Docu 10/20/11 36
  • 37. But... ● Costs: ●Development for free ● Publishing 25$ once ● Market share ● Mainly Java ● Freedom of choice ... 10/20/11 37