10. Goals of a gradle plugin:
• Create a gradle task that performs a custom task
• Inject this task into the android task graph
• Parametrize this task regarding the needs of the project
• Package it and share it
11. class MyCustomTask extends DefaultTask {
@Input
def String input;
@Output
def String output;
@TaskAction
def trigger() {
// Do your stuff here
}
}
21. • Networking is the main battery consumer
– Less radio time means less data
– Batching to minimize radio transmission
– Prefetching by predicting what the user will do
22. • GC events eats your app framerate
– Reduce images size
– Use primitives instead of objects
– Keep an eye on your memory with management tools
(AllocationTracker, TraceView)
30. • Orchestrates the flow of data with use “cases”
• Offers its services to presentation layer
• Pure Java module
• No Android UI dependencies
• No dependency to external source (db,content
provider, shared preferences…)
31. ▸ public class Artist {
String displayName;
Date onTourUntil;
String uri;
String id;
String url;
String htmlUrl;
String …;
Object…;
Object …;
Object …;
}
public class ArtistViewModel {
String name;
boolean isOnTour;
}
VIEW MODEL PRESENTER VIEW
32. public interface SearchPresenter {
void searchUser(String searchItem);
void clickUser(ArtistViewModel artist);
}
public interface SearchView {
void showProgress();
void hideProgress();
void showUser(List<ArtistViewModel> artistes);
}
VIEW MODEL PRESENTER VIEW
33. public class SearchFragment extends Fragment implements SearchView {
private SearchPresenter searchPresenter;
@Override
public void showProgress() {
//...
}
@Override
public void hideProgress() {
//...
}
@Override
public void showUser(List<UserViewModel> users) {
//...
}
}
41. It’s a tool to :
▸ Enhance modularity
▸ Focus on business logic
▸ Reduce noise in the source code
Occurs at compile time with byte code
modification
42.
43.
44.
45. • To minimize the code necessary to bind your
logic and your view
• Still in Beta
• Support library API 7
47. public class User {
public final String firstName;
public final String lastName;
public User (String firstName, String
lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
}
48. @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MainActivityBinding binding = MainActivityBinding.inflate(getLayoutInflater());
User user = new User("Test", "User");
binding.setUser(user);
}
49. Le Data Binding sur Android - Guillaume Bernard, Koridev
https://youtu.be/fG_93vUfm5s?list=PLn7H9CUCuXAv_kAdS0rxL1_jdxXpFV
b0r
Data Binding -- Write Apps Faster (Android Dev Summit
2015)
https://youtu.be/NBbeQMOcnZ0
50. • Android Emulator
• Gives control on hardware features :
– Control the battery level
– GPS Location
– Network and call management $
53. Java Android Compiler Kit
Jack Intermediate Library Linker
Goal is to improve incremental build
More efficient to compile compared to javac
+ dex, but still experimental
56. Kotlin is compiled to Java bytecode
Possibility to use both java and Kotlin in the same
project
57. Pros
• Compile time detection of NPE with
nullable type
• Lambda
• Type inference
• Class extensions
58. Cons
• Overhead of 924 KB for runtime
• Still in beta
• Will it be adopted by the community ?
59. Beacon
• Autonomous
• Cheap (15-20€)
• Advertise data in a one way communication
Eddystone
Open beacon format
60. 3 possible messages with Eddystone
• UID
– Beacon broadcast its unique identifier
• URL
– Beacon broadcast
– Physical web
– Short range and contactless QRCode
• TLM (Telemetry)
– Maintenance (battery level, …)
61.
62. Evolution inside the android build system
https://drive.google.com/file/d/0B1CCib0JzAOJRXZSY0c1ckZTU0E
Kotlin for Android
https://www.youtube.com/watch?v=50lASllvG3Q
Eddystone
https://www.youtube.com/watch?v=HR3X5h9xdno