android minnebar

45
What is that robot up to? Justin Grammens Recursive Awesome http://recursiveawesome.com

Upload: justin-grammens

Post on 20-Aug-2015

3.798 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Android Minnebar

What is that robot up to?

Justin GrammensRecursive Awesome http://recursiveawesome.com

Page 2: Android Minnebar

About MeName: Justin Grammens

Owner Localtone InteractiveCo-Founder Recursive Awesome Focus on web & mobile software development

Android, Blackberry, iPhone, Palm Background in Java & Ruby/Rails/Grails Spoken at many local meetings on Android Started Mobile Twin Cities User's Group

http://mobiletwincities.com

Page 3: Android Minnebar

!=

Android is NOT the G1!

Page 4: Android Minnebar

!=

Android is NOT the Droid!

Page 5: Android Minnebar

SummaryWhat Is AndroidWho Is Android Building BlocksAndroid MarketDeploy MobileTC App To Market

Page 6: Android Minnebar

What is Android?Definition:

Android is a software platform and operating system for mobile devices, based on the Linux kernel, developed by Google and later the Open Handset Alliance.

Source: Wikipedia

Would argue that it's not just for mobile devices. Has the potential to be used in all sorts of other areas where memory, cpu and disk is limited.

Page 7: Android Minnebar

Yawn, We've Seen This

Page 8: Android Minnebar

Devices!

Dell Mini 3

Page 9: Android Minnebar

Devices!

Acer Liquid

Page 10: Android Minnebar

Devices!

SonyXperia X10

Page 11: Android Minnebar

Devices!

HTC - Tattoo

Page 12: Android Minnebar

Devices!

MotorolaCliq

Page 13: Android Minnebar

Devices!

HTCMagic

Page 14: Android Minnebar

Devices!

Samsungi7500

Page 15: Android Minnebar

Devices!

LGGW620

Page 16: Android Minnebar

Devices!

SamsungBehold 2

Page 17: Android Minnebar

Devices!

HTCDroid Eris- Droid is more than 1 phone

Page 18: Android Minnebar

Devices!

Motorola Droid

Skins - http://teavuihuang.com/android/

Page 19: Android Minnebar

Who Is Android

A Project of the Open Handset Alliance (OHA) - More than 30 technology companies

Source: Presentation by Sean Sullivan - http://mobileportland.com/content/introduction-google-android

Page 20: Android Minnebar

Nuts and BoltsBuilt on the Linux kernelUses the Dalvik virtual machine

Register Based VM written by Dan BornsteinVery low memory footprint

Core and 3rd party applications have equal accessMultiple applications able to run at the same timeBackground services 100% fully customizable - from startup to shutdownTouch (or physical keyboard) interface

Page 21: Android Minnebar

What's the big deal?Truly open and FREE development platform

No "pay to play" developer agreementFreely available tools (Eclipse) and no restrictions on OS you need to be on to developNo "blessing" required from a company (i.e. Apple)

Component based architecture that can be extendedBuilt in services out of the box

Location basedMultimedia - supports open audio formats - OGG!SQLite Database

Automatic management of application lifecyclePortability across current and future hardware

Supports and plans for input from either trackball, keyboard or touch

Page 22: Android Minnebar

Exponential SalesFirst advertised based Android Phone HTC Dream (G1)

Takes roughly 6 months to reach 1MM sales.Second advertised phone HTC Magic (myTouch)

Takes roughly 3 months to reach 1 MM sales.Third advertised Android Phone ( Motorola Droid )

250,000 units first week “Android adoption is about to explode,” declared CEO Eric Schmidt, explaining that all the “necessary conditions” are set for growth. source: Techcrunch

Page 23: Android Minnebar

Exponential Growth

Gartner: Android to grab No. 2 spot by 2012 (Symbian will remain#1, iPhone will remain #3, Windows Mobile will remain #4 and Blackberry willdrop to #5)

Multiple device ( including in this building ) manufactures looking to use Android.

Don't believe everything you read

Not about being an "iPhone killer"

Page 24: Android Minnebar

Building Blocks

Basic foundation of an Android application

Activity IntentServiceContent Provider

Your applications will not use all of these, but they will use atleast one.

Page 25: Android Minnebar

Building BlocksActivity

Describes a single screen of the applicationImplemented as a class that extends ActivityActivities are pushed on the history stack using an IntentUses callbacks to trigger events during state changes.

public class LocaltoneAndroid extends ListActivity { @Override public void onCreate(Bundle init) { } }

Page 26: Android Minnebar

Activity Life Cycle

source: http://developer.android.com/reference/android/app/Activity.html

Page 27: Android Minnebar

Building Blocks

Intent An Intent describes what you would like to have done. Create new screen using activity and intents Intent i = new Intent(this, MyNewActivity.class); startActivity(i); or open a web page new Intent(android.content.Intent.VIEW_ACTION, ContentURI.create("http://localtone.com"));

Page 28: Android Minnebar

Building BlocksService

Code that is long runningRuns without a UIMedia Player is an good example

Activity used to choose songPlayback handled in a service

public class MyService extends Service { public void onCreate() { } }

Page 29: Android Minnebar

Building BlocksContent Provider

Set of data wrapped in a custom APIAllow sharing of data between applicationsProcesses register themselves as a Content Provider. Anyone can share data. Google shares contacts, address, phone, etc. can be accessed by applications.

private String[] cols={android.provider.Contacts.PeopleColumns.NAME}; private Cursor cur = managedQuery(android.provider.Contacts.People.CONTENT_URI, cols, null, null);http://developer.android.com/reference/android/provider/package-summary.html

Page 30: Android Minnebar

Face of AndroidVarious types of Layouts - Similar to Swing

Linear LayoutArranges children in a single row/column. The most common type of layout you'll use.

FrameLayoutArranges children so they start at the top left. Used mainly for tabbed views.

Relative LayoutArranged in relation to eachother ( element X is above/below element Y for example ).

TableLayoutArranged in a cells, like HTML table.

Page 31: Android Minnebar

Face of AndroidAbout.xml <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="@android:id/hello" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>

Page 32: Android Minnebar

Face of AndroidDeclarative - In XML Task: Define text in an "About" screenFile: res/layout/about.xml <TextView android:id="@+id/about_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/about_text" /> File: About.java protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.about); }

Page 33: Android Minnebar

Face of Android

Procedural - In Code

Create a TextView object, set the text and behavior

TextView pressMe = new TextView(context); pressMe.setText("Press Me"); addView(mDialogue, new LinearLayout.LayoutParams( FILL_PARENT, WRAP_CONTENT));

Page 34: Android Minnebar

Face of AndroidAndroid Manifest.xml

What is any good Java program without a manifest file? =) Defines the version and package informationDefines the permissions required by the application

<uses-permission android:name="android.permission.INTERNET" />

<activity android:name=".Result" android:label="@string/result" android:layout_width="fill_parent"> </activity>

Class name of the Activity

Page 35: Android Minnebar

Mobile Twin Cities

WebsiteLatest Tweets

@mobiletc Discussion ListNo splash screen

Will add in coding session

Page 36: Android Minnebar

Mobile Twin Cities

Page 37: Android Minnebar

Developing Apps For AndroidDevelop using Windows, Linux or Mac.Free to develop and deploy to your device.Send anyone your .APK file and they can run it. Recommend using to Eclipse IDE and Android Plugin.Download IDE and from

IDE - http://eclipse.orgInstall Android plugin through the Eclipse Plug-in Manager

SDKhttp://code.google.com/android/intro/installing.html

No restriction on distribution. Free to charge what you wish

Page 38: Android Minnebar

Pimping Android For ProfitListing apps in the Android Market

Must be digitally signed Your Manifext.xml tells the story:<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.package.name" android:versionCode="2" android:versionName="1.1" android:minSdkVersion = "3">

Version code - The version relative to other versionsVersion name - The version that people will see MinSDKVersoin - Requirement of end user's version

Page 39: Android Minnebar

Pimping Android For ProfitNOTE: You can distribute your .apk file and charge any way you wish! However, if you wish to use the MarketURL: http://www.android.com/market

Signup on the markethttp://market.android.com/publish/signup

Pay $25 registration fee.Uses Google Checkout for payment processing.70% for you, 30% for the carrier (T-Mobile)Google offers an unlocked Google/Ion for $399.T-Mobile adding app purchase to your bill.

Page 40: Android Minnebar

Pimping Android For Profit

Page 41: Android Minnebar

Pimping Android For Profit

Page 42: Android Minnebar

Final ThoughtsIt's not just phones or mobile devices!

Archos - MID

Nook - EBook Reader

Page 43: Android Minnebar

Deploy Application To Market

Lets Do It!

Page 44: Android Minnebar

ResourcesBooks

Mark Murphy - http://commonsware.com/Android/Hello, Android by Pragmatic Programmers

Sites AndDev.org - Good online forumGoogle Samples - http://is.gd/knVZ

IRC#Android-Dev

Google GroupsAndroid Developers

http://is.gd/knWK Local Groups!

Android Dev MN - http://is.gd/knVOMobile Twin Cities - http://mobiletwincities.com

Page 45: Android Minnebar

Add a splash page in our Adhoc coding

session!

Justin GrammensRecursive Awesome http://recursiveawesome.com