├── embracing_lollipop_-_sonia_kesic.md
├── cover.jpg
├── intro_to_android_auto_-_thomas_kruger.md
├── cool_apps_in_the_car_-_ebrahimandreas_h.md
├── unholy_alliance_cross-plattform_dev_-_jerney_nracs.md
├── is_your_app_hackable_-_kate_marshall.md
├── keystore_-_patrick_dornsarah_will.md
├── how_to_detect_your_app_is_being_uninstalled_-_alek_rudy.md
├── put_your_acitivity_on_a_diet_-_soundcloudgillaume_pedro.md
├── book.json
├── README.md
├── testing_android_apps_and_games_using_image_recognition_-_robert_seege.md
├── feedback.md
├── gdg_never_heard_of_it_-_stefan_hoth.md
├── retro_lambda_-_daniel_bauer.md
├── SUMMARY.md
├── what_was_at_google_io_-_friedger_muffke.md
├── schedule.md
├── efficiency_without_dying_while_trying_-_sergio.md
├── custom-lint-rules.md
├── android_template_project_-_eugen_martynov.md
├── reactive_api_-_marcel_pinto.md
├── bring_your_app_on_every_desk_-_tim.md
└── android_data_binding_-_christopher_schott__florian_fetzer.md
/embracing_lollipop_-_sonia_kesic.md:
--------------------------------------------------------------------------------
1 | # Embracing Lollipop - Sonia Kesic
2 |
3 |
--------------------------------------------------------------------------------
/cover.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/droidcon/gitbook-2015-berlin-barcamp/HEAD/cover.jpg
--------------------------------------------------------------------------------
/intro_to_android_auto_-_thomas_kruger.md:
--------------------------------------------------------------------------------
1 | # Intro to Android Auto - Thomas Krüger
2 |
3 |
--------------------------------------------------------------------------------
/cool_apps_in_the_car_-_ebrahimandreas_h.md:
--------------------------------------------------------------------------------
1 | # Cool Apps In The Car - Ebrahim/Andreas H.
2 |
3 |
--------------------------------------------------------------------------------
/unholy_alliance_cross-plattform_dev_-_jerney_nracs.md:
--------------------------------------------------------------------------------
1 | # Unholy Alliance: Cross-Plattform Dev - Jerney Nracs
2 |
3 |
--------------------------------------------------------------------------------
/is_your_app_hackable_-_kate_marshall.md:
--------------------------------------------------------------------------------
1 | # Is Your App Hackable - Kate Marshall
2 |
3 | Slides from our barcamp speech "Is Your App Hackable?" are available at [Slideshare](http://www.slideshare.net/licelus/is-your-app-hackable).
4 |
5 |
--------------------------------------------------------------------------------
/keystore_-_patrick_dornsarah_will.md:
--------------------------------------------------------------------------------
1 | # Keystore - Patrick Dorn/Sarah Will
2 |
3 | Slides: http://slidr.io/PDorn/keystore
4 |
5 | Additional information about the KeyStore in Android M:
6 | http://nelenkov.blogspot.in/2015/06/keystore-redesign-in-android-m.html
7 |
--------------------------------------------------------------------------------
/how_to_detect_your_app_is_being_uninstalled_-_alek_rudy.md:
--------------------------------------------------------------------------------
1 | # How to detect Your App is being uninstalled - Alek Rudy
2 |
3 | Slides are available at
4 | http://www.slideshare.net/pelotasplus/how-to-recognise-that-the-user-has-just-uninstalled-your-app-droidconde-2015
5 |
--------------------------------------------------------------------------------
/put_your_acitivity_on_a_diet_-_soundcloudgillaume_pedro.md:
--------------------------------------------------------------------------------
1 | # Put Your Acitivity on a Diet - Soundcloud/Gillaume Pedro
2 |
3 | The session is about ensure a strong contract for the activity life cycle.
4 |
5 | Slides: https://www.dropbox.com/s/b565cw1r2o4xzu5/Lightcycle%20-%20DroidCon%20Barcamp.pdf?dl=0
6 |
--------------------------------------------------------------------------------
/book.json:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": [
3 | "edit-link"
4 | ],
5 | "pluginsConfig": {
6 | "edit-link": {
7 | "base": "https://github.com/droidcon/gitbook-2015-berlin-barcamp/edit/master/",
8 | "label": "Edit This Page"
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | 
3 |
4 | The first day of Droidcon Berlin is traditionally a [barcamp](http://barcamp.org).
5 |
6 | To make the barcamp more sustainable, this booklet contains summaries, links, and resources about the sessions.
7 |
8 | Thank you to all contributes! See the list at [Github](https://github.com/droidcon/gitbook-2015-berlin-barcamp/network/members).
9 |
--------------------------------------------------------------------------------
/testing_android_apps_and_games_using_image_recognition_-_robert_seege.md:
--------------------------------------------------------------------------------
1 | # Testing Android Apps and Games Using Image Recognition - Robert Seege
2 |
3 | Most of the content we discussed in the session are available at
4 | http://testdroid.com/news/how-to-use-image-recognition-for-mobile-app-and-game-testing
5 |
6 | You get a free account by signing up at http://testdroid.com/droidcon-berlin.
7 |
8 | Contact me at robert.seege@bitbar.com
9 |
10 |
--------------------------------------------------------------------------------
/feedback.md:
--------------------------------------------------------------------------------
1 | # Feedback
2 |
3 | * Session could have bene better scheduled as some were only 15 Miminutes short and one could have attended more talks.
4 | * Sessions speaker should have better prepared their session - Friedger disagreed as this is what can/should/might happen at barcamps. It is the audience that drives the content
5 | * All speakers should please add some content to j.mp/droidcon.de. Why did it not work with the buddies
6 | * Have a lightning slot were people can present 5 minutes some cool stuff.
7 |
--------------------------------------------------------------------------------
/gdg_never_heard_of_it_-_stefan_hoth.md:
--------------------------------------------------------------------------------
1 | # GDG? Never heard of it - Stefan Hoth
2 |
3 | [Google Developer Groups (GDGs)](https://developers.google.com/groups/) are communities of developers who are interested in Google's developer technology; everything from products like Android, Chrome, Drive, and Google Cloud platforms, over APIs like the Cast API, Maps API, and YouTube API, to programming languages like Go or Dart - there's a topic for everyone! With over 600 chapters worldwide - and counting - there's one close to you for sure!
4 |
5 | In this short talk you'll get a quick overview why YOU should get involved with your local GDG.
6 |
7 | (Not too useful) Slides can be found here: https://docs.google.com/presentation/d/1OjGn7_zwTyINgbvcUIWxIoA6UjGWr-SU1Y_kcbqG4b4/edit?usp=sharing
8 |
9 | Further links:
10 | - Directory of all active GDGs worldwide: https://developers.google.com/groups/directory/
11 | - GDG Berlin Android Meetups: http://www.meetup.com/GDG-Android-in-Berlin/
12 | - GDG[x] open source projects https://github.com/gdg-x
13 |
--------------------------------------------------------------------------------
/retro_lambda_-_daniel_bauer.md:
--------------------------------------------------------------------------------
1 | # Retro Lambda - Daniel Bauer
2 |
3 | Link to slides: http://slidr.io/dbau85/barcamp-talk-about-retrolambda-on-droidcon-berlin-2015#1
4 |
5 | Questions
6 |
7 | 1. Who is standing behind RetroLambda? Who is developing?
8 | *One developer is provides the gradle plugin as an OpenSource Project to GitHub, and a team
9 | OpenSource Project on GitHub. One developer for gradle plugin, another team for retrolambda*
10 |
https://github.com/evant/gradle-retrolambda
11 |
12 | 2. How is the compability with Google work?
13 | *There is not really a good connection between the RetroLambda Team and Google. It's also hard to say what will happen in the future and how RetroLambda will collide with Google's plans.*
14 |
15 | 3. Support with eclipse
16 | *I didn't try it out so far, but it should work with eclipse*
17 |
18 | 4. Some sideeffeects appeared: Performance of Android Studio was really slow. Any ideas why and how can this be prevented?
19 | *Longer build times are necessary because the transformation takes time*
20 |
21 | 5. Is debugging possible? And how does it work?
22 | *Yes debugging your application is possible and it's really simple*
23 |
--------------------------------------------------------------------------------
/SUMMARY.md:
--------------------------------------------------------------------------------
1 | # Summary
2 |
3 | * [Introduction](README.md)
4 | * [Schedule](schedule.md)
5 | * [GDG? Never heard of it - Stefan Hoth](gdg_never_heard_of_it_-_stefan_hoth.md)
6 | * [Retro Lambda - Daniel Bauer](retro_lambda_-_daniel_bauer.md)
7 | * [Reactive API - Marcel Pintó](reactive_api_-_marcel_pinto.md)
8 | * [Android Template Project - Eugen Martynov](android_template_project_-_eugen_martynov.md)
9 | * [Put Your Acitivity on a Diet - Soundcloud/Gillaume Pedro](put_your_acitivity_on_a_diet_-_soundcloudgillaume_pedro.md)
10 | * [Efficiency (without dying while trying) - Sergio](efficiency_without_dying_while_trying_-_sergio.md)
11 | * [Keystore - Patrick Dorn/Sarah Will](keystore_-_patrick_dornsarah_will.md)
12 | * [Is Your App Hackable - Kate Marshall](is_your_app_hackable_-_kate_marshall.md)
13 | * [Android Data Binding - Christopher Schott / Florian Fetzer](android_data_binding_-_christopher_schott__florian_fetzer.md)
14 | * [Bring Your App on Every Desk - Tim](bring_your_app_on_every_desk_-_tim.md)
15 | * [Intro to Android Auto - Thomas Krüger](intro_to_android_auto_-_thomas_kruger.md)
16 | * [Cool Apps In The Car - Ebrahim/Andreas H.](cool_apps_in_the_car_-_ebrahimandreas_h.md)
17 | * [How to detect Your App is being uninstalled - Alek Rudy](how_to_detect_your_app_is_being_uninstalled_-_alek_rudy.md)
18 | * [What was at Google I/O? - Friedger Müffke](what_was_at_google_io_-_friedger_muffke.md)
19 | * [Testing Android Apps and Games Using Image Recognition - Robert Seege](testing_android_apps_and_games_using_image_recognition_-_robert_seege.md)
20 | * [Unholy Alliance: Cross-Plattform Dev - Jerney Nracs](unholy_alliance_cross-plattform_dev_-_jerney_nracs.md)
21 | * [Embracing Lollipop - Sonia Kesic](embracing_lollipop_-_sonia_kesic.md)
22 | * [Feedback](feedback.md)
23 | * [Custom Lint Rules - Workshop](custom-lint-rules.md)
24 |
25 |
--------------------------------------------------------------------------------
/what_was_at_google_io_-_friedger_muffke.md:
--------------------------------------------------------------------------------
1 | # What was at Google I/O? - Friedger Müffke
2 |
3 | Have you been there? What did you take from it?
4 |
5 | Have you not been there? What have you heard about it?
6 |
7 | ## Remote Cast API
8 | Send a presentation to chromecast with the Presentation API
9 |
10 | ## Project Soli
11 | https://www.youtube.com/watch?v=0QNiZfSsPc0
12 |
13 | ## Android Data Binding
14 | Time will tell whether it is useful, how to debug?
15 |
16 | Why not have two way binding?
17 |
18 | ## Now on tap
19 | Long Press on Home button launches assitant (Google Now) with feedback, hints, cars of the current activity.
20 |
21 | This is implemented by VoiceInteractionService
22 |
23 | ## Google Now with 3rd parties
24 | Your app can now provide cards in Google Now.
25 |
26 | ## Leak detection in Android Studio integrated
27 | You will get better feedback.
28 |
29 | There is an API to use the data
30 |
31 |
32 | ## Android Studio 1.3 was released
33 | Visual editor with drag and drop.
34 |
35 | Improved performance of Gradle Build System. (gradle version 2.4)
36 |
37 | C++ integration
38 |
39 | ## Self-driving cars
40 | Technical difficulties are solved. Not tackle the social problems. Lunch in Summer
41 |
42 | ## Is there an update on writing raw videos to the SDCard?
43 | Adoptable Storage in Android M
44 |
45 | ## Revokable Permission in Android M
46 | Runtime requests for permissions will be shown the first time per app.
47 |
48 | SecurityException were there alreay, they are now surefaced
49 |
50 | Most important impact is on the upgrade path for apps.
51 |
52 | The permission dialog is simplified again.
53 |
54 | It is also possible to revoke the permission afterwards.
55 |
56 | There might be a setting to not being asked for the permissions anymore.
57 |
58 | ## What was there about Android TV
59 |
60 | ## Brillo
61 | Weave protocol - why a new protocol?
62 |
63 | Simplified Android - Android for the Doorbell
64 |
65 | ## Support Design library
66 | Floating Action button, Tabs, NavigationPane, ... and a lot more working backwards
67 |
68 |
--------------------------------------------------------------------------------
/schedule.md:
--------------------------------------------------------------------------------
1 | # Schedule
2 |
3 | Time | Stage 1 | Stage 2 | Stage 3 | Workshop
4 | -----|--------|---------|---------|---------|---------
5 | 10:00 | Welcome and Session Planing - [GDG? Never heard of it](gdg_never_heard_of_it_-_stefan_hoth.md) | | |
6 | 11:00 | [Retro Lambda](retro_lambda_-_daniel_bauer.md) | [Reactive API](reactive_api_-_marcel_pinto.md) | [Android Template Project](android_template_project_-_eugen_martynov.md) | UX HACKATHON: PAPER PROTOTYPING (1h)
7 | 11:30 | | | |
8 | 12:00 | [Put your Activity on a Diet](put_your_acitivity_on_a_diet_-_soundcloudgillaume_pedro.md) | [Efficiency (without dying while trying)](efficiency_without_dying_while_trying_-_sergio.md) | [Keystore](keystore_-_patrick_dornsarah_will.md) | BEYOND REALITY - EPSON MOVERIO/UNITY3D (1h)
9 | 12:30 | | | |
10 | 13:00 | LUNCH | | |
11 | 13:30 | | | |
12 | 14:00 | [Is Your App Hackable](is_your_app_hackable_-_kate_marshall.md) | [Android Data Binding](android_data_binding_-_christopher_schott__florian_fetzer.md) | [Bring your App on every Desk](bring_your_app_on_every_desk_-_tim.md) | [CUSTOM LINT RULES - IMPROVE YOUR CODE QUALITY WITH DEDICATED CONVENTIONS (1h)](custom-lint-rules.md)
13 | 14:30 | | | |
14 | 15:00 | [Intro to Android Auto](introy_to_android_auto_-_thomas_kruger.md) | [How to detect your App is being uninstalled](how_to_detect_your_app_is_being_uninstalled_-_alek_rudy.md) | [What was a Google I/O?](what_was_at_google_io_-_friedger_mueffke.md) | [HACKING IN THE MATERIAL WORLD (1h)](https://gist.github.com/nidhi1608/048570f1cb098de2915e)
15 | 15:30 | [Cool Apps in the Car](cool_apps_in_the_car_-_ebrahimandreas_h.md) | | |
16 | 16:00 | [Testing Android apps and games unsing Image Recognition](testing_android_apps_and_games_using_image_recognition_-_robert_seege.md) | [Unholy Alliance: Cross-Plattform Dev](unholy_alliance_cross-plattform_dev_-_jerney_nracs.md) | [Embracing The Lollipop](embracing_lollipop_-_sonia_kesic.md) | GETTING STARTED IN VR (1h)
17 | 16:30 | | | |
18 | 17:00 | Barcamp Closing | | |
19 |
--------------------------------------------------------------------------------
/efficiency_without_dying_while_trying_-_sergio.md:
--------------------------------------------------------------------------------
1 | # How to Improve Efficiency
2 | ##(without dying while trying)
3 | by Sergio Tomás (Badoo)
4 |
5 |
6 | Common problem: You are working on something and the requirements change, forcing you to throw away all your nice code.
7 |
8 | ## Defining the Problem
9 |
10 | When doing a big project, you need to know where to start. Here your preparations are important. The bigger the project, the bigger the risk of requirements changes are.
11 |
12 | The main issue here is the large amount of requirement changes. Things will change every day, until the project is done.
13 |
14 | If you don't work efficiently, this will lead to a lot of wasted effort and work.
15 |
16 | ## How to fight inefficiency
17 |
18 | * Define the big picture (Planning, don't just go straight to coding)
19 | * Create a skelton (Since you;ve akreay planned out what you need you can now create a skeleton for the whole project)
20 | * Defe your views (Rough definition of the designs/layouts but don't do pixel perfect yet! Otherwise you will waste time when you have to change things later)
21 | * Divide & conquer (Choose between a tiger or a lot of kittens! Break down into many simple tasks. Get something working as soon as possible so you can get feedback and iterate)
22 | * Abstract your problems (Keep iterating from the most abstract level down to the fine details (last), start with mocking).
23 | * Final polishing (This takes a lot of time so you only want to do it once! 20% of the work, taking 80% of the time).
24 |
25 | ### Extra tips
26 |
27 | * (Pixel perfect is expensive), only do it once, last thing you do
28 | * YAGNI (You are not going to need it), don't implement stuff you don't need!
29 | * Blockages: Face blockages as soon as possible. These are not productive, just a waste of yir time, fix asap! Try to never be blocked for more than an hour!
30 | * Raise issues as soon as possible. If you think what your are implementing does not make sense then let people know as soon as possible!
31 | * Don't improve unfinished things (e.g don't spend time polishing before the feature is done)
32 |
33 |
34 | ## Slides
35 |
36 | [http://www.slideshare.net/SergioTomas2/how-to-improve-47453280](http://www.slideshare.net/SergioTomas2/how-to-improve-47453280)
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/custom-lint-rules.md:
--------------------------------------------------------------------------------
1 | # Custom Lint rules - Improve your code quality with dedicated conventions
2 |
3 | ## Motivation
4 | Android Lint was introduced back in December 2011 [1]. Since then its IDE integration became better and better. Today Lint is the Android developer’s essential smart companion guaranteeing a good quality of all Android development assets. With the release of the most recent Android Studio version in January 2015 Lint features more than 200 default checks [2]. It checks for potential bugs, bad coding habits, broken conventions and much more.
5 |
6 | However, several circumstances exist where it is necessary to extend the default set with **custom Lint rules**. This counts in particular for large projects with either a huge code base or big, distributed developer teams. Anyways, it is good practice to have additional team-, project- or company-wide conventions. But how to enforce them?
7 |
8 | ## Objective
9 | Although Lint is a fundamental part of the Android Developer Tools, the documentation on how to write custom Lint rules is **rare** [3] and **deprecated** [4]. Therefore, the objective of this workshop is to highlight the creation of custom Lint rules. It will showcase the usage of the most recent Lint API [5] and it will demonstrate how to write different types of rules (e.g. code-, resource-, project-structure-related). It will also present how to build custom rules with Gradle and even how to bundle them with your app project (which improves the integration into CI environments).
10 |
11 | Furthermore, it will provide some insights of useful conventions in real-world scenarios we had to struggle with and where custom Lint rules saved a lot of time and money.
12 |
13 | At the end, participants will be prepared and encouraged to write their own custom Lint rules.
14 |
15 | ## Workshop materials
16 |
17 | - **Slides**: https://github.com/a11n/lint-workshop-slides
18 | - **Sources & examples**: https://github.com/a11n/CustomLintRulesWorkshop
19 |
20 | ## References
21 | 1. http://tools.android.com/tips/lint (visited 2015-05-01)
22 | 2. http://tools.android.com/tips/lint-checks (visited 2015-05-01)
23 | 3. http://tools.android.com/tips/lint/writing-a-lint-check (visited 2015-05-01)
24 | 4. http://tools.android.com/tips/lint-custom-rules (visited 2015-05-01)
25 | 5. https://bintray.com/android/android-tools/com.android.tools.lint.lint-api/view (visited 2015-05-28)
26 |
--------------------------------------------------------------------------------
/android_template_project_-_eugen_martynov.md:
--------------------------------------------------------------------------------
1 | # Android Template Project - Eugen Martynov
2 |
3 | ## Why?
4 |
5 | The idea to have project that is ready to clone and prototype. It is buildable, testable and understandable.
6 | More beyond it is on going documentation where we share stable dependencies, common components (Licences activity), latest findings for automation, etc.
7 |
8 | ## General thought about project
9 |
10 | * The project start should be matter of seconds or minutes - check out, import to studio, run gradle. The first run require internet connection and time to download and install dependencies
11 | * The central point is gradle files. Everything that you're doing should be automated, downloaded, installed and available via gradle tasks
12 | * Project should be self contained - code convection, documentation, acceptance test should be part of project
13 |
14 | ## Current support tasks from gradle
15 | * Assembling (with obfuscation and signing)
16 | * Unit testing with code coverage
17 | * Uploading to hockeyapp
18 | * Localisation
19 | * Jenkins jobs manipulaions
20 | * Dependcies versions check
21 |
22 | ## Additional scripts
23 |
24 | Our branching model is Gitflow. For every feature branch we use `gradle-jenkins-plugin` for creating/ updating and deleting jenkins job.
25 | We use custom way of working with translators (we know about services that make you life easier). So we have own ruby script to generate strings and it is wrapped in gradle with jruby plugin (you don't need to install ruby or gems manually, it will be done by gradle plugin).
26 | We distribute build to our QA and beta community through HockyApp. We use hockeyapp plugin to automate it.
27 | We work in scrum and every iteration start we update our dependencies to have time verify them. We use `gradle versions` plugin to automate report about updates.
28 |
29 | ## Overview
30 |
31 | The minimal setup contains three modules - java library, android library, android application. App module depends on libraries, and android library has only dependency to java library. Java library is core functionality and should not have any notion about environment and implementation details.
32 |
33 | Plugins definition and all depencnies versions are specified in roo project `build.gradle`. There also application of common plugins for projects - dependency checks and code coverage. `gradle.properties` is used only for gradle run parameters - daemon and parallel build for us.
34 |
35 | Code also holds our pattern for our logic separation (Presenter, View, ModelView, wire within Activities and Fragments).
36 |
37 | ### Current setup
38 | * Java 7
39 | * Gradle 2.4
40 | * Android gradle plugin 1.2.3
41 |
42 | ### Dependency Injection
43 | * Dagger 2
44 |
45 | ### Testing
46 | * Robolectric 3
47 | * Mockito
48 | * Android AssertJ
49 |
50 | ### Other
51 | * OrmLite
52 | * EventBus
53 | * Android Annotations (we use them a lot)
54 | * License dialog (we partialy use it)
55 |
56 | ## Future
57 | * Add acceptance tests (calabash, gradle tasks)
58 | * Migration to announced new android tools (android gradle plugin 1.3)
59 | * Speed imporvements over modules pre-dexing
60 | * Java 8 with RetroLambda
61 |
62 | ## Idea in review
63 | * Kotlin
64 | * Groovy
65 |
66 | ## Where can I get it
67 | It is not public right now but should be soon. Please drop me email and I will update you.
68 | (available now at https://github.com/emartynov/android-template-project)
69 |
70 | ###Contact
71 | * @jack_martynov
72 | * https://github.com/emartynov
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/reactive_api_-_marcel_pinto.md:
--------------------------------------------------------------------------------
1 | # Reactive API - Marcel Pintó
2 |
3 | Framework built by Netflix, port of Rx.net from Microsoft. It is based on observables that emit events that can be subcribed by subscribers.
4 | RxAndroid is an extension of RxJava with android specific observables that allows you to observe Android view events like click, visibility change etc.
5 | RxJava allows to compose and transform observables. RxAndroid makes it easy to define on which thread the observing and subscribing should happen.
6 | For example you can observe on a background thread and the subscriber can observe on the ui thread.
7 |
8 | Let's explain some of the usefuls methods that can be aplied to an observable
9 |
10 | ### Cache:
11 | Cached observables allow it to request a cached result of the observable. This comes in handy when you subscribe to an observable in an activity and your user destorys the activity (rotation etc). When the observable finishes it cant pass its value the subscriber cuz it got destroyed. When the user comes back to the Activity the obserable gets triggered again. Now with cache it gets the cached result of the previous call which avoids duplicate calls.
12 |
13 | ### Zip:
14 | Zip creates a new observable from 2 or more orbservables.
15 |
16 | ### Map:
17 | Transforms the result of an observable.
18 |
19 | ### Compose
20 |
21 | Takes the observable an applies a several of transformations (methods)
22 |
23 | ## How to use it to interact with your API?
24 |
25 | Knowing the conecpts and the potential of each method of rxjava you can use them to modify, transform or compose diferent object coming from your API. The next step is to use Observable to provide a "locale" cache and a blocker to avoid duplicated calls. Here you can have a small example.
26 |
27 | ``` Java
28 | @Override
29 | public Subscription getStores() {
30 |
31 | // if observable is null create it, if not means that is already created so just reuse it
32 | // in case that it finish we will get automatically the result once subscribed.
33 | if (observable == null) {
34 | observable = api.getStoresList()
35 | .compose(applySchedulers(api.getStoresList()))
36 | .cache();
37 | }
38 | return observable.subscribe(storesList -> {});
39 | }
40 |
41 | // Using generics to reuse this method.
42 | private Observable.Transformer applySchedulers(Observable toBeResumed) {
43 | return observable -> observable.subscribeOn(Schedulers.io())
44 | .onErrorResumeNext(refreshTokenAndRetry(toBeResumed))
45 | .observeOn(AndroidSchedulers.mainThread())
46 | .map(t -> {
47 | // Modify or transform your object
48 | return t;
49 | });
50 | }
51 | ```
52 |
53 | ### Subject
54 | Thanks to the asistance they sujest a good way to reuse observables using BeheivorSubject. With it we can always get the last item posted to the subscriver and later on clear if we don't want to use it more. Beside this one we have:
55 |
56 | AsyncSubject: only emits the last value of the source Observable
57 |
58 | BehaviorSubject: emits the most recently emitted item and all the subsequent items of the source Observable when a observer subscribe to it
59 |
60 | PublishSubject: emits all the subsequent items of the source Observable at the time of the subscription
61 |
62 | ReplaySubject: emits all the items of the source Observable, regardless of when the subscriber subscribes.
63 |
64 | ### Conclusions:
65 |
66 | RxJava opens a new world to all developers is really extense an may seam dificult at the begging but there is a moment you will get it. Take your time to play with it and you will be able to build awesome apps.
67 |
68 | ### Links:
69 |
70 | I recomend all Dan Lew post about RXjava he explain good tips
71 | http://blog.danlew.net/2015/03/02/dont-break-the-chain/
72 | 4 Parts
73 | http://blog.danlew.net/2014/09/15/grokking-rxjava-part-1/
74 |
75 | https://www.github.com/ReactiveX/RxJava/wiki
76 |
77 | https://www.github.com/square/retrofit
78 |
79 | https://www.github.com/square/okhttp
80 |
--------------------------------------------------------------------------------
/bring_your_app_on_every_desk_-_tim.md:
--------------------------------------------------------------------------------
1 | # Bring Your App on Every Desk - Tim
2 |
3 | Auerswald is a manufacturer of deskphones running Android as operating systems. The devices cover the full range from an entry model (perfect to bring Android really on every desk) which is available for less than 150 euro over a mid-range model to an executive version. In our session we invited the participants to stage for an open discussion.
4 |
5 | The question was, what can you do with an Android deskphone and what is required to be successful. While mobile smartphones address every potential user (from the school kid to the executive) the usage of a deskphone has more of business angle. The discussion had two major discussion points, one was to identify use-case-scenarios and integrated in this discussion was how to do it, which API’s and possibilities does Auerswald offer to get everything working?
6 |
7 | ## Use-cases aka What does it mean to replace your dumb phone on your desk with a smart phone?
8 |
9 | Beside the standard scenarios like synchronized address book (Exchange, Google, etc.) and Calendar there were several other smart scenarios to talk about, which really show the power of smart devices compared to closed boxes normal phones and PBX’s usually are. The power of API enables to integrate EASILY and cost efficient functionality.
10 |
11 | In the group we found following useful scenarios:
12 |
13 | **CRM integration**, have an App to identify incoming callers, is it an important client or just the customer who is not paying his bills. Show up notes about the customer. After the call, the app could write back that there was a conversation with this specific customer.
14 |
15 | **Call Center scenarios**, for inbound call centers the agent could immediately identify for which client the call is. Relevant information can be pushed directly to the display. For outbound calls the dialing can be made really easy. The call plan could be integrated into an app, the physical buttons on the phone could be offered to enter multiple choice (yes/no) answers by the client.
16 |
17 | **Call a cab widget**, would ease the life of secretaries to call a cab, one press and the widget shows the secretary the time until the cab arrives.
18 |
19 | **Nagios monitoring over buttons**, an administrator in the group brought up the scenario in which the multicolor buttons could show server/network status. It’s immediately visible when the status changes from green to yellow or even red. A button press could retrieve exactly the affected system.
20 |
21 | **Fleet control**, another similar scenario to monitor the status of a fleet of trucks, delivery drivers, etc. With one glimpse of an eye the scheduler can see and react to delays or incidents.
22 |
23 |
24 |
25 | ## How to get things going:
26 |
27 | Auerswald uses a standard Android open source package and only extended the stock Android where needed. Auerswalds intention is to document and offer all required API’s and interfaces for developers to access every part of the device. While the SIP-phone app (from Auerswald) uses standard phone API’s, and the keypad (0,1,2,3,4,5,6,7,8,9,*,’) use standard input mechanisms, the phones also have additional function keys with tri-color LED (green, yellow, red) and different states (on, off, blinking) which are not available on other Android devices. To gain access to these keys, Auerswald implemented an API, with which a button could be assigned to a specific app. This API is documented on the website:
28 |
29 | [www.auerswald.de](http://www.auerswald.de/de/service/125-developer-service/1447-developer-mass-provisioning-comfortel-2600ip.html)
30 |
31 | The website also covers additional information about APP provisioning, software updates in closed networks and central manageability.
32 |
33 | ## Housekeeping
34 |
35 | While most interfaces already rely on Android standards and may be used, the formfactor of the phones required some modifications. The largest modification is around audio processing, while the standard audio path through Android is not optimized for low latency, Auerswald implemented its own audio path with echo canceler and different audio optimizations for phone scenarios. Currently the engineers work in enabling apps to gain access to these technologies so that Apps can benefit from this low latency and phone optimized audio.
36 |
37 |
38 |
39 | ## Conclusion:
40 |
41 | We were happy to figure out potential use cases and hope that companies and App developers see the potential our devices have to offer. We are looking forward to see the ideas and possibilities come true. If you require further assistance, please reach out to us at: [developer@auerswald.de](mailto:developer@auerswald.de)
42 |
--------------------------------------------------------------------------------
/android_data_binding_-_christopher_schott__florian_fetzer.md:
--------------------------------------------------------------------------------
1 | # Android Data Binding - Christopher Schott / Florian Fetzer
2 |
3 | slides at http://slidr.io/Plinzen/android-data-binding#1
4 |
5 | - binding between a data model and a view For Android a xml layout resource
6 | - it was presented at Google I/O 2015
7 | - The binding object is a completly automatically generated object which enables the view acces to the data model
8 |
9 | ##What do I need:
10 | - Minimum API-Level 7 (2.1)
11 | - Android Studio 1.3.0-beta1 or higher
12 | - "com.android.databinding:dataBinder:1.0-rc0"
13 | - Apply databinding plugin -> apply plugin: 'com.android.databinding'
14 |
15 | ##Simple Example:
16 | ```xml
17 |
18 |
19 |
20 |
21 |
23 |
24 | ```
25 | Start development with the creation of a new layout-xml-file. The root-tag of a layout-file with Android Data Binding support has to be a -Tag. It is followed by a -Tag and a View-Root-Element, which is in our small sample only a TextView. In the -section we can define variables, which define a property that maybe used within this layout. A variable has a name, to identify it in this layout and a type, which references to a Java-class in this case. Within the layout we can access the variable and its attributes with an @-sign followed by the attirbute in curly brackets.
26 |
27 | ```java
28 | private ActivityDetailBinding binding;
29 | @Overrideprotected void onCreate(Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 | binding = DataBindingUtil.setContentView(this, R.layout.activity_detail);
32 | binding.setMovie(movie);
33 | }
34 | ```
35 |
36 | In the activity, we can now use the method DataBindingUtil.setContentView to set the root-layout of this activity.
37 | The class ActivityDetailBinding is auto-generated by the Android Data Binding library. The name of this Binding-class is generated from the XML-layout filename, by converting it to Pascal-Case and adding „Binding“ to it. Theses auto generated classes are placed in the package .databinding.Currently we were sometimes facing the problem that Android Studio will not find these classes. But the compilation of the Project runs successful and the app works. After changing something in the xml-layout the failures in Android Studio disappear, we observed. As last step we have to set the data model to the binding, to transfer the model data to the ui. As an additional hint: This binding class has also a reference to all UI-Elements with an ID. If you want to access any property of an UI-element, do not use findViewById. Instead use binding. to access the view.
38 |
39 | ##Usage in Lists
40 | ```java
41 | @Override
42 | public void onBindViewHolder(ViewHolder viewHolder, final int i) {
43 | viewHolder.binding.setMovie(movies.get(i));
44 | }
45 |
46 | @Override public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
47 | // inflate view
48 | ListItemBinding binding = DataBindingUtil.inflate(layoutInflater,R.layout.list_item, viewGroup, false);
49 | return new ViewHolder(binding);
50 | }
51 | ```
52 | - In the method onCreateViewHolder the corresponding binding instance has to be created .
53 | - In onBindViewHolder the data model is set to the binding instance.
54 | ```java
55 | public static class ViewHolder extends RecyclerView.ViewHolder {
56 | private final ListItemBinding binding;
57 |
58 | ViewHolder(final ListItemBinding binding) {
59 | super(binding.getRoot());
60 | this.binding = binding;
61 | }
62 | }
63 | ```
64 | ##Imports
65 | ```xml
66 |
67 |
68 |
88 | ```
89 | Another cool features of Android Data Binding is the possibility to provide Custom Setters.
90 | In this sample we use the feature to load pictures via Picasso from the web. With the @BindingAdapter annotation we create a new property. The annotation has to be added to a method with the parameters View which can handle this property
91 | Property data type.
92 | The method handles the setting of this new property in the UI. Custom namespaces - “bind“ - are ignored during matching.
93 |
94 | ##Observables
95 | ```java
96 | public class Movie extends BaseObservable {
97 | private String title;
98 |
99 | @Bindable
100 | public String getTitle() {
101 | return title;
102 | }
103 |
104 | public void setTitle(String title) {
105 | this.title = title;
106 | notifyPropertyChanged(BR.title);
107 | }
108 | }
109 | ```
110 | Android Data Binding also supports Observables. If an object attribute will be changed, it will be propagated to the bound UI elements immediately. There are several possibilities to create Observable classes. One version is to extend your model from BaseObservable, add the @Bindable annotation and call the notifiyPropertyChange-Method, if an attribute has been changed. The Id which has to be provide to this method will be given from the BR-class. All getter methods-annotated with @Bindable will be added to this BR class.
111 |
112 | ##Supporting Ressources
113 | It is supported to format strings and using plurals.
114 | ```xml
115 | android:text="@{@string/nameFormat(firstName, lastName)}"
116 | android:text="@{@plurals/banana(bananaCount)}"
117 | ```
118 |
119 | ##Expression Language
120 | ```xml
121 | android:visibility="@{user.age < 13 ? View.GONE : View.VISIBLE}"
122 | android:text="@{movie.genre ?? movie.title}"
123 | ```
124 | You can also add some expressions to your layout:
125 | - Like the conditional parameter which can be really useful
126 | - Another expression you can add is the Null Coalescing Operator -> android:text="@{user.displayName != null ? user.displayName : user.lastName}"
127 |
128 | ##Problems
129 | - IDE-Support currently poor
130 | - Error indicated, but it compiles and works
131 | - No code completion in layout
132 | - Only one way binding is currently implemented.
133 | - API not stable
134 |
135 | ##References
136 | - Dokumentation: https://developer.android.com/tools/data-binding/guide.html
137 | - Samples from Kupferwerk: https://github.com/kupferwerk/databinding-android-demo
138 | - What‘s new in Android (from 13th min): https://www.youtube.com/watch?v=ndBdf1_oOGA
139 | - This presentation: http://slidr.io/Plinzen/android-data-binding#1
140 |
--------------------------------------------------------------------------------