Android

What is Context on Android?

It’s an abstract class whose implementation is provided by the Android system. Context allows access to application-specific resources and classes, as well as calls for application-level operations such as launching activities, broadcasting and receiving intents, etc. Context is a handle to the system, it provides services like resolving resources, obtaining access to databases and preferences, Read more…

By inkskull, ago
Android

Background operation using RxJava Android

Background operation using RxJava Android What is Background operation? Background processing in Android refers to the execution of tasks in different threads than the Main Thread, also known as UI Thread, where views are inflated and where the user interacts with our app. Why background operation? To avoid UI blockages Read more…

By inkskull, ago
RxJava2

How to create custom operator in RxJava?

How to create custom operator in RxJava?   Adding RxJava 2 library  to a Java project in Android Studio To use RxJava in a Gradle build, add the following as dependency. compile group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.1.1' For Maven, you can add RxJava via the following snippet. io.reactivex.rxjava2 rxjava Read more…

By inkskull, ago
RxJava2

flatMap in RxJava basic introduction for Beginners

flatMap in RxJava basic introduction for Beginners Observable.flatMap() takes the emissions of one Observable and returns the emissions of another Observable to take its place. Here’s how it works:   query("Hello, world!") .flatMap(new Func1() { @Override public Observable call(List urls) { return Observable.from(urls); } }) .subscribe(url -> System.out.println(url)); I’m showing Read more…

By inkskull, ago
RxJava2

Schedulers in Rxjava android tutorial

Schedulers in Rxjava android tutorial   If you want to introduce multithreading into your cascade of Observable operators, you can do so by instructing those operators (or particular Observables) to operate on particular Schedulers. Check Prevoius Posts Rxjava Introduction Reactive Hello world application in android Transformation using RxJava tutorial for beginners Introducing Read more…

By inkskull, ago
RxJava2

Timer using Rxjava in android Interval operator

Timer using Rxjava in android Interval operator Checkout the previous posts Rxjava Introduction Reactive Hello world application in android Transformation using RxJava tutorial for beginners Introducing Operators in RxJava tutorial for beginners   Interval create an Observable that emits a sequence of integers spaced by a given time interval The Interval operator returns an Read more…

By inkskull, ago
RxJava2

Introducing Operators in RxJava tutorial for beginners

Introducing Operators in RxJava tutorial for beginners Checkout the previous post here Here’s how we’re going to solve the item transformation problems: with operators. Operators can be used in between the source Observable and the ultimate Subscriber to manipulate emitted items. RxJava comes with a huge collection of operators, but its best to focus Read more…

By inkskull, ago
RxJava2

Transformation using RxJava tutorial for beginners

Transformation using RxJava tutorial for beginners Checkout the previous post here Suppose I want to append my signature to the “Hello, world!” output. One possibility would be to change the Observable: Observable.just("Hello, world! -Dan") .subscribe(s -> System.out.println(s)); This works if you have control over your Observable, but there’s no guarantee that will Read more…

By inkskull, ago
RxJava2

Avoid Boilerplate code by RxJava Tutorial

Avoid Boilerplate code by RxJava Tutorial Checkout the previous post here  That’s a lot of boilerplate code just to say “Hello, world!” That’s because I took the verbose route so you could see exactly what’s happening. There are lots of shortcuts provided in RxJava to make coding easier. First, let’s Read more…

By inkskull, ago
RxJava2

Network API request Using Rxjava android tutorial Beginner

Network API request Using Rxjava android tutorial Beginner Checkout the previous post http://thoughtnerds.com/reactive-hello-world-application-android/ for structure. Adding RxJava 2 library  to a Java project in Android Studio To use RxJava in a Gradle build, add the following as dependency. compile group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.1.1' For Maven, you can add RxJava Read more…

By inkskull, ago
Social Media Auto Publish Powered By : XYZScripts.com