android meetup

79
Android Meetup Wednesday, January 16, 13

Upload: ty-smith

Post on 12-May-2015

1.136 views

Category:

Technology


0 download

DESCRIPTION

SVAndroid Meetup @Evernote Presentation

TRANSCRIPT

Page 1: Android meetup

Android Meetup

Wednesday, January 16, 13

Page 2: Android meetup

Designing a Useful and Sexy ProductMiki Setlur@mikisetlur

Wednesday, January 16, 13

Page 3: Android meetup

Looking back...

Wednesday, January 16, 13

Page 4: Android meetup

Looking back...

Wednesday, January 16, 13

Page 5: Android meetup

Be Useful & Sexy

Wednesday, January 16, 13

Page 6: Android meetup

Be Useful & Sexy

Wednesday, January 16, 13

Page 7: Android meetup

Useful: Select / create intuitive design patterns

Wednesday, January 16, 13

Page 8: Android meetup

Useful: Select / create intuitive design patternsExample: studying android’s action bar and menu patterns

Wednesday, January 16, 13

Page 9: Android meetup

Sexy: Focus aesthetics in the right places

Wednesday, January 16, 13

Page 10: Android meetup

Sexy: Focus aesthetics in the right placesExample: home screen explorations before v4 launch

Wednesday, January 16, 13

Page 11: Android meetup

Sexy: Focus aesthetics in the right placesExample: home screen explorations before v4 launch

Wednesday, January 16, 13

Page 12: Android meetup

Useful: Go through the flows

Wednesday, January 16, 13

Page 13: Android meetup

Useful: Go through the flowsExample: prototyping tablet navigation

Wednesday, January 16, 13

Page 14: Android meetup

Sexy: Love for Android-only :)

Wednesday, January 16, 13

Page 15: Android meetup

Sexy: Love for Android-only :)Example: designing scalable, customizable widgets

Wednesday, January 16, 13

Page 16: Android meetup

Sexy: Be clean, crisp and clear

Wednesday, January 16, 13

Page 17: Android meetup

Sexy: Be clean, crisp and clearExample: redesigned note composer

Wednesday, January 16, 13

Page 18: Android meetup

Useful: Think all sizes and orientations

Wednesday, January 16, 13

Page 19: Android meetup

Useful: Think all sizes and orientationsExample: layout change

Wednesday, January 16, 13

Page 20: Android meetup

Useful: Think all sizes and orientationsExample: layout change

Wednesday, January 16, 13

Page 21: Android meetup

Useful: Think all sizes and orientations

Wednesday, January 16, 13

Page 22: Android meetup

Useful: Think all sizes and orientationsExample: cues rather than layout change

Wednesday, January 16, 13

Page 23: Android meetup

Useful: Think all sizes and orientationsExample: cues rather than layout change

Wednesday, January 16, 13

Page 24: Android meetup

Useful: Test with real users

Wednesday, January 16, 13

Page 25: Android meetup

Useful: Test with real usersExample: discovering flaws

Wednesday, January 16, 13

Page 26: Android meetup

Useful: Test with real users

Wednesday, January 16, 13

Page 27: Android meetup

Useful: Test with real usersExample: eliminating flaws

Wednesday, January 16, 13

Page 28: Android meetup

Inside EvernoteHemant Garg

[email protected]

Wednesday, January 16, 13

Page 29: Android meetup

Wednesday, January 16, 13

Page 30: Android meetup

Wednesday, January 16, 13

Page 31: Android meetup

Wednesday, January 16, 13

Page 32: Android meetup

Process

Wednesday, January 16, 13

Page 33: Android meetup

• Define the feature objectives and goals

Process

Wednesday, January 16, 13

Page 34: Android meetup

• Define the feature objectives and goals

• Architect the feature

Process

Wednesday, January 16, 13

Page 35: Android meetup

• Define the feature objectives and goals

• Architect the feature

• Break into small features

Process

Wednesday, January 16, 13

Page 36: Android meetup

• Define the feature objectives and goals

• Architect the feature

• Break into small features

• Design, Develop & Test

Process

Wednesday, January 16, 13

Page 37: Android meetup

After development

Wednesday, January 16, 13

Page 38: Android meetup

After development

• User Trials

Wednesday, January 16, 13

Page 39: Android meetup

After development

• User Trials

• Beta Release

Wednesday, January 16, 13

Page 40: Android meetup

After development

• User Trials

• Beta Release

• Crash Reports

Wednesday, January 16, 13

Page 41: Android meetup

After development

• User Trials

• Beta Release

• Crash Reports

• Analytics

Wednesday, January 16, 13

Page 42: Android meetup

• Test version upgrades, don’t leave too many logs, write nice blog post about it and push the LIVE button.

• Monitor crash reports, user reviews & analytics.

• 1st weekend is very crucial.

• Beers and bragging

Launch!

Wednesday, January 16, 13

Page 43: Android meetup

OS version Target the mass

Start Building

Wednesday, January 16, 13

Page 44: Android meetup

OS version..

Wednesday, January 16, 13

Page 45: Android meetup

OS version..

• Android Compatibility Library

Wednesday, January 16, 13

Page 46: Android meetup

OS version..

• Android Compatibility Library

• Reflections

Wednesday, January 16, 13

Page 47: Android meetup

OS version..

• Android Compatibility Library

• Reflections

• Emulators

Wednesday, January 16, 13

Page 48: Android meetup

Phone sizes

Start Building

Wednesday, January 16, 13

Page 49: Android meetup

Phone sizes...

• Scrollview & Linear Layouts

Wednesday, January 16, 13

Page 50: Android meetup

Phone sizes...• Fragments

Wednesday, January 16, 13

Page 51: Android meetup

Phone processing power and memory- There are many fast selling and popular low end devices.

Its a phoneAfter all its a mobile phone so think about how will your app handle interruptions (incoming call) & poor network connectivity.

Make Android work for you- Use Intents to use functionalities from other apps.- Use content providers to get information from OS.

It’s a phone

Wednesday, January 16, 13

Page 52: Android meetup

Give back to Android

Wednesday, January 16, 13

Page 53: Android meetup

Give back to Android

• Open up intents so that other apps can use it. Connect the apps.

Wednesday, January 16, 13

Page 54: Android meetup

Android TipsJess Anders

[email protected]

Wednesday, January 16, 13

Page 55: Android meetup

Fragment Tips

• Fragment.getActivity() (or null)

• FragmentTransactions after onPause()

• Keep track of state of onCreateView and onDestroyView

Wednesday, January 16, 13

Page 56: Android meetup

Caution posting to Handlers

mHandler.post(new Runnable() { public void run() { if (mIsExited) { return; } updateUI(mNote); }});

Wednesday, January 16, 13

Page 57: Android meetup

Expect the user not to save

• Auto-save in Evernote client

• Food auto-save

• Meal Activity

Wednesday, January 16, 13

Page 58: Android meetup

Analyze the problem and worst case scenarios.

◦Calculations Spreadsheet for Food 1.0

• Determine if you can do the work in Java code

• For Food, we came up with a piece-by-piece

approach with BitmapRegionDecoder (2.3+)

• For the multi-shot camera, we reused this, but then had a fallback of a native library to process

the large photos on older devices.

Small Heap & Images

Wednesday, January 16, 13

Page 59: Android meetup

1536 x 1536 ~ 9.2MB3MP - 2046 x 1536 ~ 12.5MB5MP - 2560 x 1920 ~ 19.5MB8MP - 3264 x 2448 ~ 31.8MB

Worst Case all in-memory8MP ~ 41MB

Using this method9.2MB + 1MB*2 = 11.2MB

What we needed for Food 1.0

Wednesday, January 16, 13

Page 60: Android meetup

Resizing in Max Heap...

<activity android:name=".MultiShotCameraActivity" android:process=":photosProcess" android:configChanges="keyboardHidden|screenLayout|orientation|screenSize" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

Wednesday, January 16, 13

Page 61: Android meetup

Building EvernoteAhmed El-Helw

@ahmedre

Wednesday, January 16, 13

Page 62: Android meetup

Difficulties

• Many distribution channels                                                  

• Multiple branches of development

• Dependencies on other teams' libraries

Wednesday, January 16, 13

Page 63: Android meetup

• Security

• Build History

• Easy Distribution

Goal

Wednesday, January 16, 13

Page 64: Android meetup

Property File

apks

property

Lint, testing, ...

Dependencies

Process

Wednesday, January 16, 13

Page 65: Android meetup

Benefits

Wednesday, January 16, 13

Page 66: Android meetup

The Evernote Platform & Android SDKTy Smith

@tylersmithnet

Wednesday, January 16, 13

Page 67: Android meetup

The Evernote Platform

• The platform ties together all of our products - and it’s available to everybody.

• We build great apps that help you capture and recall important information.

• Third party developers add new and different ways to capture and recall information, and put your Evernote data in context with all of the other services you use.

Wednesday, January 16, 13

Page 68: Android meetup

What’s in that cloud?

• Six billion HTTP requests last month.

• 20 thousand third party developers

• 1.5 billion notes have been created to date

• 380TB of user data

• 40 million registered users

Wednesday, January 16, 13

Page 69: Android meetup

Evernote’s Apps

Wednesday, January 16, 13

Page 70: Android meetup

The Evernote Ecosystem

Wednesday, January 16, 13

Page 71: Android meetup

Remember Everything

• All of your notes live together in context. Search for a meal, and you’ll find related meetings, web clips, and more.

• Every app that adds content to your Evernote account makes every other app smarter.

Wednesday, January 16, 13

Page 72: Android meetup

The Platform Team

• Develop APIs, SDKs, sample code and docs

• Educate developer communities about the Evernote Platform

• Support developers

• Promote great apps to our user base

Wednesday, January 16, 13

Page 73: Android meetup

Hackathons

Wednesday, January 16, 13

Page 74: Android meetup

Android SDK

• Open Source and an open roadmaphttps://github.com/evernote/evernote-sdk-android

• Library Project for easy integration

• Maven Central for dependency management

• OAuth2 for secure authentication

• Thrift for server-client communication

Wednesday, January 16, 13

Page 75: Android meetup

Android SDK: Authentication

private static final String CONSUMER_KEY = "Your consumer key";private static final String CONSUMER_SECRET = "Your consumer secret";private static final String EVERNOTE_HOST = EvernoteSession.HOST_SANDBOX;private EvernoteSession mEvernoteSession;

@Overridepublic void onCreate(Bundle savedInstanceState) {  super.onCreate(savedInstanceState);  setContentView(R.layout.main);

  mEvernoteSession = EvernoteSession.init(this, CONSUMER_KEY, CONSUMER_SECRET, EVERNOTE_HOST, null);

  if (!mEvernoteSession.isLoggedIn())    mEvernoteSession.authenticate(this);}

@Overridepublic void onActivityResult(int requestCode, int resultCode, Intent data) {  super.onActivityResult(requestCode, resultCode, data);  if(requestCode == EvernoteSession.REQUEST_CODE_OAUTH && resultCode == Activity.RESULT_OK)    //Success, Update UI when OAuth activity returns result}

Wednesday, January 16, 13

Page 76: Android meetup

Android SDK: Creating a note

/** * This is a network request, call outside of main thread */public void createNote(String title, String content) { Note note = new Note(); note.setTitle(title);

String enmlContent = EvernoteUtil.NOTE_PREFIX +                  content +                  EvernoteUtil.NOTE_SUFFIX;

note.setContent(enmlContent); note = mEvernoteSession.createNoteStore().createNote(mEvernoteSession.getAuthToken(), note);}

Wednesday, January 16, 13

Page 77: Android meetup

Intent: Creating a note

public static final String ACTION_NEW_NOTE = "com.evernote.action.CREATE_NEW_NOTE";

public void newNoteWithContent(View view) {  String text = "This is a sample text file.\nThis is line two.";  String title = "New Note with Content";    Intent intent = new Intent();  intent.setAction(ACTION_NEW_NOTE);   // Set the note's title and plaintext content  intent.putExtra(Intent.EXTRA_TITLE, title);  intent.putExtra(Intent.EXTRA_TEXT, text);

  startActivity(intent); }

Wednesday, January 16, 13

Page 78: Android meetup

Intent: Viewing a note

public static final String ACTION_VIEW_NOTE = "com.evernote.action.VIEW_NOTE";

public void viewNote(View view) {  String noteGuid = "63781605-3c3d-4e56-90a8-8be5e3ae7eee";  boolean hideTitleBar = true;    Intent intent = new Intent();  intent.setAction(ACTION_VIEW_NOTE);  intent.putExtra(EXTRA_NOTE_GUID, noteGuid);  intent.putExtra(EXTRA_FULL_SCREEN, hideTitleBar);   startActivity(intent);}

Wednesday, January 16, 13

Page 79: Android meetup

Thanks!@evernote_dev

http://dev.evernote.com

Wednesday, January 16, 13