Top Banner
Evernote and Android Ty Smith Sr. Android Engineer @tylersmithnet Wednesday, February 27, 13
85
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Stanford session

Evernote and Android

Ty SmithSr. Android Engineer

@tylersmithnet

Wednesday, February 27, 13

Page 2: Stanford session

Scaling Android development

Wednesday, February 27, 13

Page 3: Stanford session

Why Android?

Wednesday, February 27, 13

Page 4: Stanford session

Daily Usage by Client

Wednesday, February 27, 13

Page 5: Stanford session

Best app

Wednesday, February 27, 13

Page 6: Stanford session

Best app

Wednesday, February 27, 13

Page 7: Stanford session

API Versions

Wednesday, February 27, 13

Page 8: Stanford session

API versions...

Wednesday, February 27, 13

Page 9: Stanford session

API versions...

• Android Compatibility Library

Wednesday, February 27, 13

Page 10: Stanford session

API versions...

• Android Compatibility Library

• Reflection/API check

Wednesday, February 27, 13

Page 11: Stanford session

API versions...

• Android Compatibility Library

• Reflection/API check

• Emulators

Wednesday, February 27, 13

Page 12: Stanford session

API versions...

• Android Compatibility Library

• Reflection/API check

• Emulators

• Third Party Libraries

Wednesday, February 27, 13

Page 13: Stanford session

API versions...

• Android Compatibility Library

• Reflection/API check

• Emulators

• Third Party Libraries

• Actionbar Sherlock, Holo Everywhere, Otto, and Dagger

Wednesday, February 27, 13

Page 14: Stanford session

Device Sizes

Wednesday, February 27, 13

Page 15: Stanford session

Device Sizes

Wednesday, February 27, 13

Page 16: Stanford session

Device Sizes

Wednesday, February 27, 13

Page 17: Stanford session

Device Sizes

Wednesday, February 27, 13

Page 18: Stanford session

Device Sizes

• Scrollview & Linear Layouts

Wednesday, February 27, 13

Page 19: Stanford session

Device Sizes

• Fragments

Wednesday, February 27, 13

Page 20: Stanford session

Reusable Components

Wednesday, February 27, 13

Page 21: Stanford session

Reusable Components

• Notifications

Wednesday, February 27, 13

Page 22: Stanford session

Reusable Components

• Notifications

• Camera

Wednesday, February 27, 13

Page 23: Stanford session

Reusable Components

• Notifications

• Camera

• Custom Views

Wednesday, February 27, 13

Page 24: Stanford session

Reusable Components

• Notifications

• Camera

• Custom Views

• SDK

Wednesday, February 27, 13

Page 25: Stanford session

Reusable Components

• Notifications

• Camera

• Custom Views

• SDK

• Content Providers

Wednesday, February 27, 13

Page 26: Stanford session

Reusable Components

• Notifications

• Camera

• Custom Views

• SDK

• Content Providers

• Intents

Wednesday, February 27, 13

Page 27: Stanford session

Reusable Components

• Notifications

• Camera

• Custom Views

• SDK

• Content Providers

• Intents

• Release Profiles

Wednesday, February 27, 13

Page 28: Stanford session

Build System Difficulties

Wednesday, February 27, 13

Page 29: Stanford session

Build System Difficulties

• Multiple branches of development

Wednesday, February 27, 13

Page 30: Stanford session

Build System Difficulties

• Multiple branches of development

• Dependencies on other teams' libraries

Wednesday, February 27, 13

Page 31: Stanford session

Build System Difficulties

• Multiple branches of development

• Dependencies on other teams' libraries

• Many distribution channels                                                  

Wednesday, February 27, 13

Page 32: Stanford session

Goal

Wednesday, February 27, 13

Page 33: Stanford session

• Security

Goal

Wednesday, February 27, 13

Page 34: Stanford session

• Security

• Build History

Goal

Wednesday, February 27, 13

Page 35: Stanford session

• Security

• Build History

• Easy Distribution

Goal

Wednesday, February 27, 13

Page 36: Stanford session

.properties

.APK

Profiles

QA

Dependencies

Build Process

Market

Wednesday, February 27, 13

Page 37: Stanford session

Support Benefits

Wednesday, February 27, 13

Page 38: Stanford session

The Evernote Platform & Android SDK

Wednesday, February 27, 13

Page 39: Stanford session

The Evernote Platform

Wednesday, February 27, 13

Page 40: Stanford session

The Evernote Platform

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

Wednesday, February 27, 13

Page 41: Stanford session

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.

Wednesday, February 27, 13

Page 42: Stanford session

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, February 27, 13

Page 43: Stanford session

What’s in that cloud?

Wednesday, February 27, 13

Page 44: Stanford session

What’s in that cloud?

• Six billion HTTP requests last month.

Wednesday, February 27, 13

Page 45: Stanford session

What’s in that cloud?

• Six billion HTTP requests last month.

• 20 thousand third party developers

Wednesday, February 27, 13

Page 46: Stanford session

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

Wednesday, February 27, 13

Page 47: Stanford session

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

Wednesday, February 27, 13

Page 48: Stanford session

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, February 27, 13

Page 49: Stanford session

Evernote’s Apps

Wednesday, February 27, 13

Page 50: Stanford session

The Evernote Ecosystem

Wednesday, February 27, 13

Page 51: Stanford session

Remember Everything

Wednesday, February 27, 13

Page 52: Stanford session

Remember Everything

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

Wednesday, February 27, 13

Page 53: Stanford session

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, February 27, 13

Page 54: Stanford session

The Platform Team

Wednesday, February 27, 13

Page 55: Stanford session

The Platform Team

• Develop APIs, SDKs, sample code and docs

Wednesday, February 27, 13

Page 56: Stanford session

The Platform Team

• Develop APIs, SDKs, sample code and docs

• Educate developer communities about the Evernote Platform

Wednesday, February 27, 13

Page 57: Stanford session

The Platform Team

• Develop APIs, SDKs, sample code and docs

• Educate developer communities about the Evernote Platform

• Support developers

Wednesday, February 27, 13

Page 58: Stanford session

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, February 27, 13

Page 59: Stanford session

Hackathons

Wednesday, February 27, 13

Page 60: Stanford session

Android SDK

Wednesday, February 27, 13

Page 61: Stanford session

Android SDK

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

Wednesday, February 27, 13

Page 62: Stanford session

Android SDK

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

• Library Project for easy integration

Wednesday, February 27, 13

Page 63: Stanford session

Android SDK

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

• Library Project for easy integration

• Maven Central for dependency management

Wednesday, February 27, 13

Page 64: Stanford session

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

Wednesday, February 27, 13

Page 65: Stanford session

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, February 27, 13

Page 66: Stanford session

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, February 27, 13

Page 67: Stanford session

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, February 27, 13

Page 68: Stanford session

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, February 27, 13

Page 69: Stanford session

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, February 27, 13

Page 70: Stanford session

Hiring an Android Engineer

Wednesday, February 27, 13

Page 71: Stanford session

Personality Requirements

Wednesday, February 27, 13

Page 72: Stanford session

Personality Requirements

• Great Communication

Wednesday, February 27, 13

Page 73: Stanford session

Personality Requirements

• Great Communication

• Strong Passion

Wednesday, February 27, 13

Page 74: Stanford session

Personality Requirements

• Great Communication

• Strong Passion

• Problem Solver

Wednesday, February 27, 13

Page 75: Stanford session

Technical Requirements

Wednesday, February 27, 13

Page 76: Stanford session

Technical Requirements

• Object Oriented Design

Wednesday, February 27, 13

Page 77: Stanford session

Technical Requirements

• Object Oriented Design

• Algorithms

Wednesday, February 27, 13

Page 78: Stanford session

Technical Requirements

• Object Oriented Design

• Algorithms

• Data Structures

Wednesday, February 27, 13

Page 79: Stanford session

Technical Requirements

• Object Oriented Design

• Algorithms

• Data Structures

• Multithreaded Systems

Wednesday, February 27, 13

Page 80: Stanford session

The Interview

Wednesday, February 27, 13

Page 81: Stanford session

The Interview

• Coding Challenge

Wednesday, February 27, 13

Page 82: Stanford session

The Interview

• Coding Challenge

• Phone Screen

Wednesday, February 27, 13

Page 83: Stanford session

The Interview

• Coding Challenge

• Phone Screen

• 1 on 1 Interview

Wednesday, February 27, 13

Page 84: Stanford session

The Interview

• Coding Challenge

• Phone Screen

• 1 on 1 Interview

• Multiple Engineers

Wednesday, February 27, 13

Page 85: Stanford session

Questions?

http://dev.evernote.com

Ty SmithSr. Android Engineer, Evernote

[email protected]@tylersmithnet

Wednesday, February 27, 13