Skip to content

Instantly share code, notes, and snippets.

View OrenBochman's full-sized avatar
🏠
Working from home

Oren Bochman OrenBochman

🏠
Working from home
  • WMF
  • 21:02 (UTC +03:00)
View GitHub Profile
@OrenBochman
OrenBochman / !!readme.md
Created September 10, 2018 21:12
ThreadPoolExecutor in Android

ThreadPoolExecutor

ThreadPoolExecutor executes parallelized tasks across multiple different threads of a thread pool. To execute work concurrently and retain control over how the work is executed, this is the tool for the job.

Using ThreadPoolExecutor

  1. constructing a new instance
  2. confgure the many arguments of the thread pool
  3. if initializing ThreadPoolExecutor in a service, ensure to create it within onStartCommand() not onCreate()
@OrenBochman
OrenBochman / !!readme.md
Last active September 12, 2018 04:18
Migrate AsyncTask to AsyncTaskLoader in Android

AsyncTaskLoader in Android

an AsyncTaskLoader based on a Loader

When to use this threading primitive ?

  • They encapsulate the process of data loading.
  • They survive configuration changes, preventing unnecessarily reloading data.

HowTo access the data once loaded

@OrenBochman
OrenBochman / !!readme.md
Last active September 14, 2018 19:03
All about Android Notifications

Notifications

  • depend on: implementation "com.android.support:support-compat:27.1.1"
@OrenBochman
OrenBochman / !!readme.md
Last active September 14, 2018 20:55
android sharepreferencess

SharedPreferences

@OrenBochman
OrenBochman / !!Agile.md
Last active November 18, 2018 07:46
Agile Android - Testing

Agile Android - Testing

Planning

To write agile android - testing is essential otherwise it quickly beocomes impossible to sperate code.

Testing Atoms

  • Rule for launching activity
  • Rule for launching service
@OrenBochman
OrenBochman / !!readme.md
Last active September 15, 2018 08:35
Everything ADB (Android Debug Bridge) - scripts for Android Testing

Android testing ADB scripts

@OrenBochman
OrenBochman / !!readme.md
Last active September 22, 2018 16:52
android analytics

android analytics

tasks

  1. is this an instant app or a regular app
  2. what is the apk size (actually the apk size) Getting Installed App Size
  3. what is the available memory
@OrenBochman
OrenBochman / !!readme.txt
Last active October 5, 2018 19:07
Android Scheduling - JobDispatcher
# Firebase JobDispatcher
### What's a JobScheduler?
The JobScheduler is an Android system service available on API levels 21 (Lollipop)+.
It provides an API for scheduling units of work (represented by `JobService` subclasses) that will be executed in your app's process.

LiveData