SlideShare a Scribd company logo
1 of 75
SDK best practices
Rebecca Hamelsdorf
13/9/2017
Hi!!
What is SDK
What is SDK?
what is SDK?
• SDK is a software development kit
• It’s a programing package that helps developers
to builds application for a specific platform.
• Typically it includes one or more API
Why?
Why do we need to develop an SDK?
Business need
Why do we need to develop an SDK?
But not for business reasons..
Why do we need to develop an SDK?
Business need
Internal use
Internal use..
Code reuse
Abstraction/black box
Why do we care about code reuse
● Saves time & money
Why do we care about code reuse
● Saves time & money
● Easier to maintain and change
Why do we care about code reuse
● Saves time & money
● Easier to maintain and change
● Solving bugs in a single place instead of bugs
all over the place
Developing SDK check list
1. Define the service for your SDK users
2. Plan your public API
3. Plan your internal code architecture
4. Code:)
5. Sample app + docs
6. Packaging
7. Ship!
Developing SDK check list
❏ Define the service for your SDK users
❏ Plan your public API
❏ Plan your internal code architecture
❏ Code:)
❏ Sample app + docs
❏ Packaging
❏ Ship!
Developing SDK check list
1. Define the service for your SDK users
2. Plan your public API
3. Plan your internal code architecture
4. Code:)
5. Sample app + docs
6. Packaging
7. Ship!
Plan your public API…
Public API is the contract between the app developer and
SDK developer.
you’re officially an API designer!
Plan your public API…
Put in your mind that the developer that integrate your sdk is
not sitting next to you..
Plan your public API…
Keep it:
Easy to learn- design for “stupid” developers
Plan your public API…
Keep it:
Easy to learn
Easy to use (even without docs!!), easy to integrate.
Someone did it really easy..
Plan your public API…
Keep it:
Easy to learn
Easy to use (even without docs!!), easy to integrate.
Hard to misused!
Plan your public API…
Keep it:
Easy to learn
Easy to use (even without docs!!), easy to integrate.
Hard to misused!
Custom exceptions
Custom Exception
class ServerURLException extends RuntimeException {
public ServerURLException(String message) {
super(message);
}
}
Custom Exception
class ServerURLException extends RuntimeException {
public ServerURLException(String message) {
super(message);
}
}
static void isUrlValid(String serverURL) {
if( isNullOrEmpty(serverURL) || !isValidUrl(serverURL))
{
throw new ServerURLException(“Server URL is invalid or empty");
}
}
Plan your public API…
Keep it:
Easy to learn
Easy to use (even without docs!!), easy to integrate.
Hard to misused!
Custom exceptions
No confusing constructors - use builder pattern, static
factory pattern etc.
Builder pattern
public class User {
private final String firstName; //required
private final String lastName; //required
private final int age; //optional
private final String phone; //optional
private final String address; //optional
...
}
Builder pattern
public User(String firstName, String lastName) {this(firstName, lastName, 0);}
public User(String firstName, String lastName, int age) {this(firstName, lastName, age, "");}
public User(String firstName, String lastName, int age, String phone) {
this(firstName, lastName, age, phone, "");}
public User(String firstName, String lastName, int age, String phone, String address) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
this.phone = phone;
this.address = address;
}
Builder pattern
public class User {
private final String firstName; // required
private final String lastName; // required
private final int age; // optional
private final String phone; // optional
private final String address; // optional
private User(UserBuilder builder) {
this.firstName = builder.firstName;
this.lastName = builder.lastName;
this.age = builder.age;
this.phone = builder.phone;
this.address = builder.address;
}
public String getFirstName() {
return firstName;}
public String getLastName() {
return lastName;}
public int getAge() {
return age;}
public String getPhone() {
return phone; }
public String getAddress() {
return address; }
Builder pattern
public class User {
private final String firstName; // required
private final String lastName; // required
private final int age; // optional
private final String phone; // optional
private final String address; // optional
private User(UserBuilder builder) {
this.firstName = builder.firstName;
this.lastName = builder.lastName;
this.age = builder.age;
this.phone = builder.phone;
this.address = builder.address;
}
public String getFirstName() {
return firstName;}
public String getLastName() {
return lastName;}
public int getAge() {
return age;}
public String getPhone() {
return phone; }
public String getAddress() {
return address; }
Builder pattern
public static class UserBuilder {
private final String firstName;
private final String lastName;
private int age;
private String phone;
private String address;
public UserBuilder(String firstName,
String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
public UserBuilder age(int age) {
this.age = age;
return this;}
public UserBuilder phone(String phone) {
this.phone = phone;
return this;}
public UserBuilder address(String address) {
this.address = address;
return this; }
public User build() {
return new User(this);
}}}
Builder pattern
User.UserBuilder("Jhon", "Doe")
.age(30)
.phone("1234567")
.address("Fake address 1234")
.build();
Plan your public API…
● Keep it:
Easy to learn
Easy to use (even without docs!!), easy to integrate.
Hard to misused!
Custom exceptions
No confusing constructors - use builder pattern, static
factory pattern etc.
Use enums, public static variables when you can.
Plan your public API…
● We don’t choose the min sdk!
we want maximum compatibility
Plan your public API…
● We don’t choose the min sdk!
we want maximum compatibility
● Try to use minimum permissions - it’s hard for the developer
to explain to THEIR users the need for permissions.
Merged Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.academy.myapp">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Merged Manifest
https://developer.android.com/studio/build/manifest-merge.html
Plan your public API…
● We don’t choose the min sdk!
we want maximum compatibility
● Try to use minimum permissions - it’s hard for the developer
to explain to THEIR users the need for permissions.
● Think carefully - we REALLY don’t want to change it very
often (if at all!) *adding is OK
Developing SDK check list
❏ Define the service for your SDK users
❏ Plan your public API
❏ Plan your internal code architecture
❏ Code:)
❏ Sample app + docs
❏ Packaging
❏ Ship!
Developing SDK check list
1. Define the service for your SDK users
2. Plan your public API
3. Plan your internal code architecture
4. Code:)
5. Sample app + docs
6. Packaging
7. Ship!
Plan your internal code architecture
● Exception handling - the more the merrier :)
Plan your internal code architecture
● Exception handling - the more the merrier :)
● Use the minimum needed third-party libraries
a. we want to keep our SDK light
b. we avoid depending on others
Plan your internal code architecture
● Exception handling - the more the merrier :)
● Use the minimum needed third-party libraries
a. we want to keep our SDK light
b. we avoid depending on others
● Handle missing permission cases, you are not promised
to have them
Plan your internal code architecture
● Be very mindful to data consumption and battery usage!
Plan your internal code architecture
● Be very mindful to data consumption and battery usage!
● Remember your support phase during development:
○ Deprecate - don’t kill!
○ Write logs but don’t spam, use 2 log levels (debug/production)
Developing SDK check list
❏ Define the service for your SDK users
❏ Plan your public API
❏ Plan your internal code architecture
❏ Code:)
❏ Sample app + docs
❏ Packaging
❏ Ship!
Developing SDK check list
1. Define the service for your SDK users
2. Plan your public API
3. Plan your internal code architecture
4. Code:)
5. Sample app + docs
6. Packaging
7. Ship!
Code..
● Remember resource are public by default - hide what
you need hidden.
public.xml
<resources>
<public name="mylib_app_name" type="string"/>
<public name="mylib_public_string" type="string"/>
</resources>
Code..
● Add unique prefix to resources - the developers may
have their own resources that can conflict with yours!
Code..
● Add unique prefix to resources - the developers may
have their own resources that can conflict with yours!
● Test it on different Kind of apps..
Code..
● Add unique prefix to resources - the developers may
have their own resources that can conflict with yours!
● Test it on different Kind of apps..
● you must take the life cycle of the app in consideration!
Developing SDK check list
❏ Define the service for your SDK users
❏ Plan your public API
❏ Plan your internal code architecture
❏ Code:)
❏ Sample app + docs
❏ Packaging
❏ Ship!
Developing SDK check list
1. Define the service for your SDK users
2. Plan your public API
3. Plan your internal code architecture
4. Code:)
5. Sample app + docs
6. Packaging
7. Ship!
Sample app +docs
Provide 2 kinds of docs:
Simple integration instructions + sample app
Api Overview
Sample app +docs
● Provide 2 kinds of docs:
Simple integration instructions + sample app
Api Overview
• Remember Proguard docs
proguard.config
-keep class javax.** { *; }
-keep class org.** { *; }
-keep class twitter4j.** { *; }
Developing SDK check list
❏ Define the service for your SDK users
❏ Plan your public API
❏ Plan your internal code architecture
❏ Code:)
❏ Sample app + docs
❏ Packaging
❏ Ship!
Developing SDK check list
1. Define the service for your SDK users
2. Plan your public API
3. Plan your internal code architecture
4. Code:)
5. Sample app + docs
6. Packaging
7. Ship!
Packaging
Once we had a jar..
What can we do?
We have AAR!
What does aar contain?
The file extension for an AAR file is .aar, actually the file itself is
a zip file containing the following mandatory entries:
/AndroidManifest.xml
/classes.jar
/res/
/R.txt
/public.txt
There are also optional entries :
/assets/
/libs/name.jar
/proguard.txt
/lint.jar
Migrate from AAR to JAR ..
The file extension for an AAR file is .aar, actually the file itself is
a zip file containing the following mandatory entries:
/AndroidManifest.xml
/classes.jar
/res/
/R.txt
/public.txt
step by step..
https://developer.android.com/studio/projects/android-library.html
Developing SDK check list
❏ Define the service for your SDK users
❏ Plan your public API
❏ Plan your internal code architecture
❏ Code:)
❏ Sample app + docs
❏ Packaging
❏ Ship!
Developing SDK check list
❏ Define the service for your SDK users
❏ Plan your public API
❏ Plan your internal code architecture
❏ Code:)
❏ Sample app + docs
❏ Packaging
❏ Ship!
Battery Historian
• Battery Historian is a tool to analyze battery consumers
and events(DOZE mode).
Battery Historian
• Battery Historian is a tool to analyze battery consumers
and events(DOZE mode).
• It uses Android "bugreport" files
Battery Historian
• Battery Historian is a tool to analyze battery consumers
and events(DOZE mode).
• It uses Android "bugreport" files
• Supports Lollipop (API level 21) and later.
Battery Historian
• Battery Historian is a tool to analyze battery consumers
and events(DOZE mode).
• It uses Android "bugreport" files
• Supports Lollipop (API level 21) and later.
• Shows you where and how processes are drawing current
from the battery.
Battery Historian
• https://developer.android.com/studio/profile/battery-historian.html
• https://github.com/google/battery-historian
Stetho
• Stetho is a very powerful tool for debugging.
• It enables developers have access to the Chrome
Developer Tools feature
http://facebook.github.io/stetho/
Stetho
Questions?

More Related Content

What's hot

AppDynamics VS New Relic – The Complete Guide
AppDynamics VS New Relic – The Complete GuideAppDynamics VS New Relic – The Complete Guide
AppDynamics VS New Relic – The Complete GuideTakipi
 
「多要素認証」と言っても色々あるんです
「多要素認証」と言っても色々あるんです「多要素認証」と言っても色々あるんです
「多要素認証」と言っても色々あるんですIIJ
 
Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker composeLalatendu Mohanty
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesQAware GmbH
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
 
Slide DevSecOps Microservices
Slide DevSecOps Microservices Slide DevSecOps Microservices
Slide DevSecOps Microservices Hendri Karisma
 
Kubernetes Deployment Strategies
Kubernetes Deployment StrategiesKubernetes Deployment Strategies
Kubernetes Deployment StrategiesAbdennour TM
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference ArchitecturesSonatype
 
Extending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitionsExtending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitionsStefan Schimanski
 
The Observability Pipeline
The Observability PipelineThe Observability Pipeline
The Observability PipelineTyler Treat
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Megan O'Keefe
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to AnsibleKnoldus Inc.
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overviewGabriel Carro
 
Kubernetes
KubernetesKubernetes
Kuberneteserialc_w
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 

What's hot (20)

AppDynamics VS New Relic – The Complete Guide
AppDynamics VS New Relic – The Complete GuideAppDynamics VS New Relic – The Complete Guide
AppDynamics VS New Relic – The Complete Guide
 
「多要素認証」と言っても色々あるんです
「多要素認証」と言っても色々あるんです「多要素認証」と言っても色々あるんです
「多要素認証」と言っても色々あるんです
 
Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker compose
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards Kubernetes
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Slide DevSecOps Microservices
Slide DevSecOps Microservices Slide DevSecOps Microservices
Slide DevSecOps Microservices
 
Kubernetes Deployment Strategies
Kubernetes Deployment StrategiesKubernetes Deployment Strategies
Kubernetes Deployment Strategies
 
Observability
Observability Observability
Observability
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures
 
Extending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitionsExtending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitions
 
The Observability Pipeline
The Observability PipelineThe Observability Pipeline
The Observability Pipeline
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
DevOps and Cloud
DevOps and CloudDevOps and Cloud
DevOps and Cloud
 
Docker
DockerDocker
Docker
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overview
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 

Similar to How to build Sdk? Best practices

API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)Tom Johnson
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCTim Burks
 
Getting started with the NDK
Getting started with the NDKGetting started with the NDK
Getting started with the NDKKirill Kounik
 
Practices and tools for building better APIs
Practices and tools for building better APIsPractices and tools for building better APIs
Practices and tools for building better APIsNLJUG
 
Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)Peter Hendriks
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Tom Johnson
 
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator Alessio Ricco
 
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...Whymca
 
Android Scripting
Android ScriptingAndroid Scripting
Android ScriptingJuan Gomez
 
Android Auto instrumentation
Android Auto instrumentationAndroid Auto instrumentation
Android Auto instrumentationPrzemek Jakubczyk
 
Kubernetes and Local Dvelopment
Kubernetes and Local DvelopmentKubernetes and Local Dvelopment
Kubernetes and Local DvelopmentJeffrey Sica
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code維佋 唐
 
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabVoxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabRon Munitz
 
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Bram Adams
 
Code Documentation. That ugly thing...
Code Documentation. That ugly thing...Code Documentation. That ugly thing...
Code Documentation. That ugly thing...Christos Manios
 
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfAstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfFarHanWasif1
 
Development workflow
Development workflowDevelopment workflow
Development workflowSigsiu.NET
 

Similar to How to build Sdk? Best practices (20)

API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
 
Getting started with the NDK
Getting started with the NDKGetting started with the NDK
Getting started with the NDK
 
Practices and tools for building better APIs
Practices and tools for building better APIsPractices and tools for building better APIs
Practices and tools for building better APIs
 
Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)
 
Programming
ProgrammingProgramming
Programming
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator Best Practices in apps development with Titanium Appcelerator
Best Practices in apps development with Titanium Appcelerator
 
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
BEST PRACTICES PER LA SCRITTURA DI APPLICAZIONI TITANIUM APPCELERATOR - Aless...
 
Android Scripting
Android ScriptingAndroid Scripting
Android Scripting
 
Android Auto instrumentation
Android Auto instrumentationAndroid Auto instrumentation
Android Auto instrumentation
 
Kubernetes and Local Dvelopment
Kubernetes and Local DvelopmentKubernetes and Local Dvelopment
Kubernetes and Local Dvelopment
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
 
Android develop guideline
Android develop guidelineAndroid develop guideline
Android develop guideline
 
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabVoxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
 
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!
 
Code Documentation. That ugly thing...
Code Documentation. That ugly thing...Code Documentation. That ugly thing...
Code Documentation. That ugly thing...
 
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfAstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
 
Development workflow
Development workflowDevelopment workflow
Development workflow
 
Javascript mynotes
Javascript mynotesJavascript mynotes
Javascript mynotes
 

More from Vitali Pekelis

Droidkaigi2019thagikura 190208135940
Droidkaigi2019thagikura 190208135940Droidkaigi2019thagikura 190208135940
Droidkaigi2019thagikura 190208135940Vitali Pekelis
 
Google i o &amp; android q changes 2019
Google i o &amp; android q changes 2019Google i o &amp; android q changes 2019
Google i o &amp; android q changes 2019Vitali Pekelis
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architectureVitali Pekelis
 
Advanced #4 GPU & Animations
Advanced #4   GPU & AnimationsAdvanced #4   GPU & Animations
Advanced #4 GPU & AnimationsVitali Pekelis
 
Advanced #2 networking
Advanced #2   networkingAdvanced #2   networking
Advanced #2 networkingVitali Pekelis
 
Advanced #1 cpu, memory
Advanced #1   cpu, memoryAdvanced #1   cpu, memory
Advanced #1 cpu, memoryVitali Pekelis
 
All the support you need. Support libs in Android
All the support you need. Support libs in AndroidAll the support you need. Support libs in Android
All the support you need. Support libs in AndroidVitali Pekelis
 
Android design patterns
Android design patternsAndroid design patterns
Android design patternsVitali Pekelis
 
Advanced #3 threading
Advanced #3  threading Advanced #3  threading
Advanced #3 threading Vitali Pekelis
 
Mobile ui fruit or delicious sweets
Mobile ui  fruit or delicious sweetsMobile ui  fruit or delicious sweets
Mobile ui fruit or delicious sweetsVitali Pekelis
 
Lecture #4 c loaders and co.
Lecture #4 c   loaders and co.Lecture #4 c   loaders and co.
Lecture #4 c loaders and co.Vitali Pekelis
 
Session #4 b content providers
Session #4 b  content providersSession #4 b  content providers
Session #4 b content providersVitali Pekelis
 
Advanced #2 - ui perf
 Advanced #2 - ui perf Advanced #2 - ui perf
Advanced #2 - ui perfVitali Pekelis
 
Android design lecture #3
Android design   lecture #3Android design   lecture #3
Android design lecture #3Vitali Pekelis
 

More from Vitali Pekelis (20)

Droidkaigi2019thagikura 190208135940
Droidkaigi2019thagikura 190208135940Droidkaigi2019thagikura 190208135940
Droidkaigi2019thagikura 190208135940
 
Droidkaigi 2019
Droidkaigi 2019Droidkaigi 2019
Droidkaigi 2019
 
Google i o &amp; android q changes 2019
Google i o &amp; android q changes 2019Google i o &amp; android q changes 2019
Google i o &amp; android q changes 2019
 
Android Q 2019
Android Q 2019Android Q 2019
Android Q 2019
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architecture
 
Advanced #4 GPU & Animations
Advanced #4   GPU & AnimationsAdvanced #4   GPU & Animations
Advanced #4 GPU & Animations
 
Advanced #2 networking
Advanced #2   networkingAdvanced #2   networking
Advanced #2 networking
 
Advanced #2 threading
Advanced #2   threadingAdvanced #2   threading
Advanced #2 threading
 
Advanced #1 cpu, memory
Advanced #1   cpu, memoryAdvanced #1   cpu, memory
Advanced #1 cpu, memory
 
All the support you need. Support libs in Android
All the support you need. Support libs in AndroidAll the support you need. Support libs in Android
All the support you need. Support libs in Android
 
Di &amp; dagger
Di &amp; daggerDi &amp; dagger
Di &amp; dagger
 
Android design patterns
Android design patternsAndroid design patterns
Android design patterns
 
Advanced #3 threading
Advanced #3  threading Advanced #3  threading
Advanced #3 threading
 
Mobile ui fruit or delicious sweets
Mobile ui  fruit or delicious sweetsMobile ui  fruit or delicious sweets
Mobile ui fruit or delicious sweets
 
Lecture #4 c loaders and co.
Lecture #4 c   loaders and co.Lecture #4 c   loaders and co.
Lecture #4 c loaders and co.
 
Session #4 b content providers
Session #4 b  content providersSession #4 b  content providers
Session #4 b content providers
 
Advanced #2 - ui perf
 Advanced #2 - ui perf Advanced #2 - ui perf
Advanced #2 - ui perf
 
Android meetup
Android meetupAndroid meetup
Android meetup
 
Android design lecture #3
Android design   lecture #3Android design   lecture #3
Android design lecture #3
 
From newbie to ...
From newbie to ...From newbie to ...
From newbie to ...
 

Recently uploaded

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 

Recently uploaded (20)

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 

How to build Sdk? Best practices

  • 1. SDK best practices Rebecca Hamelsdorf 13/9/2017
  • 5. what is SDK? • SDK is a software development kit • It’s a programing package that helps developers to builds application for a specific platform. • Typically it includes one or more API
  • 7. Why do we need to develop an SDK? Business need
  • 8. Why do we need to develop an SDK? But not for business reasons..
  • 9. Why do we need to develop an SDK? Business need Internal use
  • 11. Why do we care about code reuse ● Saves time & money
  • 12. Why do we care about code reuse ● Saves time & money ● Easier to maintain and change
  • 13. Why do we care about code reuse ● Saves time & money ● Easier to maintain and change ● Solving bugs in a single place instead of bugs all over the place
  • 14. Developing SDK check list 1. Define the service for your SDK users 2. Plan your public API 3. Plan your internal code architecture 4. Code:) 5. Sample app + docs 6. Packaging 7. Ship!
  • 15. Developing SDK check list ❏ Define the service for your SDK users ❏ Plan your public API ❏ Plan your internal code architecture ❏ Code:) ❏ Sample app + docs ❏ Packaging ❏ Ship!
  • 16. Developing SDK check list 1. Define the service for your SDK users 2. Plan your public API 3. Plan your internal code architecture 4. Code:) 5. Sample app + docs 6. Packaging 7. Ship!
  • 17. Plan your public API… Public API is the contract between the app developer and SDK developer. you’re officially an API designer!
  • 18. Plan your public API… Put in your mind that the developer that integrate your sdk is not sitting next to you..
  • 19. Plan your public API… Keep it: Easy to learn- design for “stupid” developers
  • 20. Plan your public API… Keep it: Easy to learn Easy to use (even without docs!!), easy to integrate.
  • 21. Someone did it really easy..
  • 22. Plan your public API… Keep it: Easy to learn Easy to use (even without docs!!), easy to integrate. Hard to misused!
  • 23. Plan your public API… Keep it: Easy to learn Easy to use (even without docs!!), easy to integrate. Hard to misused! Custom exceptions
  • 24. Custom Exception class ServerURLException extends RuntimeException { public ServerURLException(String message) { super(message); } }
  • 25. Custom Exception class ServerURLException extends RuntimeException { public ServerURLException(String message) { super(message); } } static void isUrlValid(String serverURL) { if( isNullOrEmpty(serverURL) || !isValidUrl(serverURL)) { throw new ServerURLException(“Server URL is invalid or empty"); } }
  • 26. Plan your public API… Keep it: Easy to learn Easy to use (even without docs!!), easy to integrate. Hard to misused! Custom exceptions No confusing constructors - use builder pattern, static factory pattern etc.
  • 27. Builder pattern public class User { private final String firstName; //required private final String lastName; //required private final int age; //optional private final String phone; //optional private final String address; //optional ... }
  • 28. Builder pattern public User(String firstName, String lastName) {this(firstName, lastName, 0);} public User(String firstName, String lastName, int age) {this(firstName, lastName, age, "");} public User(String firstName, String lastName, int age, String phone) { this(firstName, lastName, age, phone, "");} public User(String firstName, String lastName, int age, String phone, String address) { this.firstName = firstName; this.lastName = lastName; this.age = age; this.phone = phone; this.address = address; }
  • 29. Builder pattern public class User { private final String firstName; // required private final String lastName; // required private final int age; // optional private final String phone; // optional private final String address; // optional private User(UserBuilder builder) { this.firstName = builder.firstName; this.lastName = builder.lastName; this.age = builder.age; this.phone = builder.phone; this.address = builder.address; } public String getFirstName() { return firstName;} public String getLastName() { return lastName;} public int getAge() { return age;} public String getPhone() { return phone; } public String getAddress() { return address; }
  • 30. Builder pattern public class User { private final String firstName; // required private final String lastName; // required private final int age; // optional private final String phone; // optional private final String address; // optional private User(UserBuilder builder) { this.firstName = builder.firstName; this.lastName = builder.lastName; this.age = builder.age; this.phone = builder.phone; this.address = builder.address; } public String getFirstName() { return firstName;} public String getLastName() { return lastName;} public int getAge() { return age;} public String getPhone() { return phone; } public String getAddress() { return address; }
  • 31. Builder pattern public static class UserBuilder { private final String firstName; private final String lastName; private int age; private String phone; private String address; public UserBuilder(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } public UserBuilder age(int age) { this.age = age; return this;} public UserBuilder phone(String phone) { this.phone = phone; return this;} public UserBuilder address(String address) { this.address = address; return this; } public User build() { return new User(this); }}}
  • 33. Plan your public API… ● Keep it: Easy to learn Easy to use (even without docs!!), easy to integrate. Hard to misused! Custom exceptions No confusing constructors - use builder pattern, static factory pattern etc. Use enums, public static variables when you can.
  • 34. Plan your public API… ● We don’t choose the min sdk! we want maximum compatibility
  • 35. Plan your public API… ● We don’t choose the min sdk! we want maximum compatibility ● Try to use minimum permissions - it’s hard for the developer to explain to THEIR users the need for permissions.
  • 36. Merged Manifest <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.academy.myapp"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
  • 38. Plan your public API… ● We don’t choose the min sdk! we want maximum compatibility ● Try to use minimum permissions - it’s hard for the developer to explain to THEIR users the need for permissions. ● Think carefully - we REALLY don’t want to change it very often (if at all!) *adding is OK
  • 39. Developing SDK check list ❏ Define the service for your SDK users ❏ Plan your public API ❏ Plan your internal code architecture ❏ Code:) ❏ Sample app + docs ❏ Packaging ❏ Ship!
  • 40. Developing SDK check list 1. Define the service for your SDK users 2. Plan your public API 3. Plan your internal code architecture 4. Code:) 5. Sample app + docs 6. Packaging 7. Ship!
  • 41. Plan your internal code architecture ● Exception handling - the more the merrier :)
  • 42. Plan your internal code architecture ● Exception handling - the more the merrier :) ● Use the minimum needed third-party libraries a. we want to keep our SDK light b. we avoid depending on others
  • 43. Plan your internal code architecture ● Exception handling - the more the merrier :) ● Use the minimum needed third-party libraries a. we want to keep our SDK light b. we avoid depending on others ● Handle missing permission cases, you are not promised to have them
  • 44. Plan your internal code architecture ● Be very mindful to data consumption and battery usage!
  • 45. Plan your internal code architecture ● Be very mindful to data consumption and battery usage! ● Remember your support phase during development: ○ Deprecate - don’t kill! ○ Write logs but don’t spam, use 2 log levels (debug/production)
  • 46. Developing SDK check list ❏ Define the service for your SDK users ❏ Plan your public API ❏ Plan your internal code architecture ❏ Code:) ❏ Sample app + docs ❏ Packaging ❏ Ship!
  • 47. Developing SDK check list 1. Define the service for your SDK users 2. Plan your public API 3. Plan your internal code architecture 4. Code:) 5. Sample app + docs 6. Packaging 7. Ship!
  • 48. Code.. ● Remember resource are public by default - hide what you need hidden.
  • 49. public.xml <resources> <public name="mylib_app_name" type="string"/> <public name="mylib_public_string" type="string"/> </resources>
  • 50. Code.. ● Add unique prefix to resources - the developers may have their own resources that can conflict with yours!
  • 51. Code.. ● Add unique prefix to resources - the developers may have their own resources that can conflict with yours! ● Test it on different Kind of apps..
  • 52. Code.. ● Add unique prefix to resources - the developers may have their own resources that can conflict with yours! ● Test it on different Kind of apps.. ● you must take the life cycle of the app in consideration!
  • 53. Developing SDK check list ❏ Define the service for your SDK users ❏ Plan your public API ❏ Plan your internal code architecture ❏ Code:) ❏ Sample app + docs ❏ Packaging ❏ Ship!
  • 54. Developing SDK check list 1. Define the service for your SDK users 2. Plan your public API 3. Plan your internal code architecture 4. Code:) 5. Sample app + docs 6. Packaging 7. Ship!
  • 55. Sample app +docs Provide 2 kinds of docs: Simple integration instructions + sample app Api Overview
  • 56. Sample app +docs ● Provide 2 kinds of docs: Simple integration instructions + sample app Api Overview • Remember Proguard docs
  • 57. proguard.config -keep class javax.** { *; } -keep class org.** { *; } -keep class twitter4j.** { *; }
  • 58. Developing SDK check list ❏ Define the service for your SDK users ❏ Plan your public API ❏ Plan your internal code architecture ❏ Code:) ❏ Sample app + docs ❏ Packaging ❏ Ship!
  • 59. Developing SDK check list 1. Define the service for your SDK users 2. Plan your public API 3. Plan your internal code architecture 4. Code:) 5. Sample app + docs 6. Packaging 7. Ship!
  • 61. What can we do? We have AAR!
  • 62. What does aar contain? The file extension for an AAR file is .aar, actually the file itself is a zip file containing the following mandatory entries: /AndroidManifest.xml /classes.jar /res/ /R.txt /public.txt There are also optional entries : /assets/ /libs/name.jar /proguard.txt /lint.jar
  • 63. Migrate from AAR to JAR .. The file extension for an AAR file is .aar, actually the file itself is a zip file containing the following mandatory entries: /AndroidManifest.xml /classes.jar /res/ /R.txt /public.txt
  • 65. Developing SDK check list ❏ Define the service for your SDK users ❏ Plan your public API ❏ Plan your internal code architecture ❏ Code:) ❏ Sample app + docs ❏ Packaging ❏ Ship!
  • 66. Developing SDK check list ❏ Define the service for your SDK users ❏ Plan your public API ❏ Plan your internal code architecture ❏ Code:) ❏ Sample app + docs ❏ Packaging ❏ Ship!
  • 67. Battery Historian • Battery Historian is a tool to analyze battery consumers and events(DOZE mode).
  • 68. Battery Historian • Battery Historian is a tool to analyze battery consumers and events(DOZE mode). • It uses Android "bugreport" files
  • 69. Battery Historian • Battery Historian is a tool to analyze battery consumers and events(DOZE mode). • It uses Android "bugreport" files • Supports Lollipop (API level 21) and later.
  • 70. Battery Historian • Battery Historian is a tool to analyze battery consumers and events(DOZE mode). • It uses Android "bugreport" files • Supports Lollipop (API level 21) and later. • Shows you where and how processes are drawing current from the battery.
  • 71.
  • 73. Stetho • Stetho is a very powerful tool for debugging. • It enables developers have access to the Chrome Developer Tools feature http://facebook.github.io/stetho/