This is sample code related to my presentation about threading that you can find here: https://speakerdeck.com/android10/what-mom-never-told-you-about-multi-threading
Since this is still a WIP, running these examples require a bit of manual setup:
- Clone the repo and import it the project in Android Studio.
- In the files folder, you will find 2 .xml files used for the example: https://github.com/android10/Multi-Threading-Samples/tree/master/files
- Place them somewhere in your local storage inside your device.
- Change the paths to point to your location. You do it in this class: https://github.com/android10/Multi-Threading-Samples/blob/master/android/app/src/main/java/com/fernandocejas/sample/threading/data/Source.kt
- The code where you run the different samples is in this class: https://github.com/android10/Multi-Threading-Samples/blob/master/android/app/src/main/java/com/fernandocejas/sample/threading/threads/ThreadsActivity.kt
Copyright 2018 Fernando Cejas
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.