airbnb.io - RxGroups Easily group RxJava Observables together and tie them to your Android Activity lifecycle668









Search Preview

Airbnb Engineering & Data Science

airbnb.io
Airbnb.io Open SourceEventsBlogGithubCareersAirbnb.io RxGroupsEasily group RxJava Observables together and tie them to your Android Activity lifecycle668B
.io > airbnb.io

SEO audit: Content analysis

Language Error! No language localisation is found.
Title Airbnb Engineering & Data Science
Text / HTML ratio 43 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud public Override void = RxGroups private Observer protected Activity automatically AutoResubscribe resubscriptionTag final CareersDesign Observable onResume method onDestroy return tag
Keywords consistency
Keyword Content Title Description Headings
public 14
Override 12
void 11
= 10
RxGroups 6
private 6
Headings
H1 H2 H3 H4 H5 H6
1 1 2 0 0 0
Images We found 1 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
public 14 0.70 %
Override 12 0.60 %
void 11 0.55 %
= 10 0.50 %
RxGroups 6 0.30 %
private 6 0.30 %
Observer 6 0.30 %
protected 5 0.25 %
Activity 5 0.25 %
automatically 4 0.20 %
AutoResubscribe 4 0.20 %
resubscriptionTag 4 0.20 %
final 3 0.15 %
CareersDesign 3 0.15 %
Observable 3 0.15 %
onResume 3 0.15 %
method 3 0.15 %
onDestroy 3 0.15 %
return 3 0.15 %
tag 3 0.15 %

SEO Keywords (Two Word)

Keyword Occurrence Density
to your 7 0.35 %
Override public 7 0.35 %
public void 6 0.30 %
Override protected 5 0.25 %
protected void 5 0.25 %
onErrorThrowable e 2 0.10 %
public final 2 0.10 %
public Object 2 0.10 %
Observer with 2 0.10 %
tag for 2 0.10 %
the same 2 0.10 %
AutoResubscribe public 2 0.10 %
= new 2 0.10 %
observer = 2 0.10 %
resubscriptionTag return 2 0.10 %
onNextLong l 2 0.10 %
void onNextLong 2 0.10 %
void onCompleted 2 0.10 %
e Override 2 0.10 %
you can 2 0.10 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
Override public void 6 0.30 % No
Override protected void 5 0.25 % No
public void onCompleted 2 0.10 % No
them to your 2 0.10 % No
onCompleted Override public 2 0.10 % No
e Override public 2 0.10 % No
public void onNextLong 2 0.10 % No
void onNextLong l 2 0.10 % No
observer = new 2 0.10 % No
AutoResubscribe public final 2 0.10 % No
public Object resubscriptionTag 2 0.10 % No
Object resubscriptionTag return 2 0.10 % No
void onErrorThrowable e 2 0.10 % No
to your Android 2 0.10 % No
public void onErrorThrowable 2 0.10 % No
RxJava Observables together 2 0.10 % No
tie them to 2 0.10 % No
group RxJava Observables 2 0.10 % No
to your Activity 2 0.10 % No
and tie them 2 0.10 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
public void onErrorThrowable e 2 0.10 % No
Override public void onNextLong 2 0.10 % No
them to your Android 2 0.10 % No
tie them to your 2 0.10 % No
and tie them to 2 0.10 % No
public void onNextLong l 2 0.10 % No
public Object resubscriptionTag return 2 0.10 % No
group RxJava Observables together 2 0.10 % No
Override public void onCompleted 2 0.10 % No
e Override public void 2 0.10 % No
onCompleted Override public void 2 0.10 % No
Override public void onErrorThrowable 2 0.10 % No
subscribeobserver Override protected void 1 0.05 % No
Override protected void onSaveInstanceStateBundle 1 0.05 % No
observeOnAndroidSchedulersmainThread subscribeobserver Override protected 1 0.05 % No
composeobservableGrouptransformOBSERVABLE_TAG observeOnAndroidSchedulersmainThread subscribeobserver Override 1 0.05 % No
protected void onSaveInstanceStateBundle outState 1 0.05 % No
observable composeobservableGrouptransformOBSERVABLE_TAG observeOnAndroidSchedulersmainThread subscribeobserver 1 0.05 % No
> observable composeobservableGrouptransformOBSERVABLE_TAG observeOnAndroidSchedulersmainThread 1 0.05 % No
buttonsetOnClickListenerv > observable composeobservableGrouptransformOBSERVABLE_TAG 1 0.05 % No

Internal links in - airbnb.io

Open Source
Airbnb Engineering & Data Science
Events
Airbnb Engineering & Data Science
Airflow Use Apache Airflow (incubating) to author workflows as directed acyclic graphs (DAGs) of tasks8,613
Airbnb Engineering & Data Science
Aerosolve A machine learning package built for humans4,385
Airbnb Engineering & Data Science
BinaryAlert Serverless real-time and retroactive malware detection705
Airbnb Engineering & Data Science
AirMapView A view abstraction to provide a map user interface with various underlying map providers1,583
Airbnb Engineering & Data Science
Airpal Web UI for PrestoDB2,345
Airbnb Engineering & Data Science
DeepLinkDispatch Easy declaration and routing of your deep links2,990
Airbnb Engineering & Data Science
Enzyme JavaScript Testing utilities for React14,372
Airbnb Engineering & Data Science
Hammerspace Hash-like interface to persistent, concurrent, off-heap storage302
Airbnb Engineering & Data Science
Hypernova A service for server-side rendering your JavaScript views4,266
Airbnb Engineering & Data Science
Epoxy An Android library for building complex screens in a RecyclerView4,301
Airbnb Engineering & Data Science
Interferon Signaling you about infrastructure or application issues178
Airbnb Engineering & Data Science
JavaScript Style Guide A mostly reasonable approach to JavaScript73,101
Airbnb Engineering & Data Science
The Knowledge Repo A next-generation curated knowledge sharing platform for data scientists and other technical professions2,992
Airbnb Engineering & Data Science
Polyglot Give your JavaScript the ability to speak many languages2,734
Airbnb Engineering & Data Science
Nerve A service registration daemon that performs health checks; companion to airbnb/synapse837
Airbnb Engineering & Data Science
mocha-wrap Fluent pluggable interface for easily wrapping `describe` and `it` blocks in Mocha tests39
Airbnb Engineering & Data Science
Rheostat Rheostat is a www, mobile, and accessible slider component built with React1,248
Airbnb Engineering & Data Science
ReAir A collection of easy-to-use tools for replicating tables and partitions between Hive data warehouses206
Airbnb Engineering & Data Science
react-dates An accessible, easily internationalizable, mobile-friendly datepicker library for the web7,757
Airbnb Engineering & Data Science
Ruby Style Guide Airbnb's Ruby Style Guide2,366
Airbnb Engineering & Data Science
react-with-styles Use CSS-in-JavaScript with themes for React without being tightly coupled to one implementation1,242
Airbnb Engineering & Data Science
Superset Apache Superset (incubating) is a modern, enterprise-ready business intelligence web application19,842
Airbnb Engineering & Data Science
RxGroups Easily group RxJava Observables together and tie them to your Android Activity lifecycle668
Airbnb Engineering & Data Science
StreamAlert A serverless framework for real-time data analysis and alerting1,406
Airbnb Engineering & Data Science
Stemcell Airbnb's EC2 instance creation and bootstrapping tool157
Airbnb Engineering & Data Science
Synapse A transparent service discovery framework for connecting an SOA1,830
Airbnb Engineering & Data Science

Airbnb.io Spined HTML


Airbnb Engineering & Data Science Airbnb.io Open SourceEventsBlogGithubCareersAirbnb.io RxGroupsEasily group RxJava Observables together and tie them to your Android Activity lifecycle668By Felipe LimaRxGroups lets you group RxJava Observables together in groups and tie them to your Android lifecycle. This is expressly useful when used with Retrofit. For simple scenarios you can probably just let the original request be cancelled and fire a new one. However it's easy to see how this becomes a problem in increasingly ramified situations. Let's say your user is submitting a payment. You'll probably want to to guarantee that you can reattach to the same in-flight or completed request without rotating the screen or leaving the Activity and returning later. RxGroups will moreover automatically prevent events from stuff delivered to your Activity or Fragment surpassing onResume() and without onPause(). If that happens, they will be automatically cached in memory and delivered once the user returns to your screen. If they never return, the memory is then reclaimed automatically without onDestroy(). Usage Add a GroupLifecycleManager field to your Activity, Fragment, Dialog, etc. and undeniability its respective lifecycle methods equal to your own (eg.: onPause, onResume, onDestroy, etc.); Annotate your ResubscriptionObserver with @AutoResubscribe and use method resubscriptionTag() to tell RxGroups what tag it should use for reattaching your Observer to it Observable automatically.Surpassingsubscribing to your Observable, etch it with observableGroup.transform() to pinpoint a tag for that Observable; Example public matriculation MyActivity extends Activity { private static final String OBSERVABLE_TAG = "arbitrary_tag"; private TextView output; private FloatingActionButton button; private GroupLifecycleManager groupLifecycleManager; private ObservableGroup observableGroup; private Observable<Long> observable = Observable.interval(1, 1, TimeUnit.SECONDS); // The Observer field must be public, otherwise RxGroups can't wangle it @AutoResubscribe public final ResubscriptionObserver<Long> observer = new ResubscriptionObserver<Long>() { @Override public void onCompleted() { Log.d(TAG, "onCompleted()"); } @Override public void onError(Throwable e) { Log.e(TAG, "onError()", e); } @Override public void onNext(Long l) { output.setText(output.getText() + " " + l); } @Override public Object resubscriptionTag() { return OBSERVABLE_TAG; } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); output = (TextView) findViewById(R.id.txt_output); sawed-off = (FloatingActionButton) findViewById(R.id.fab); SampleApplication using = (SampleApplication) getApplication(); ObservableManager manager = application.observableManager(); groupLifecycleManager = GroupLifecycleManager.onCreate(manager, savedInstanceState, this); observableGroup = groupLifecycleManager.group(); button.setOnClickListener(v -> observable .compose(observableGroup.<Long>transform(OBSERVABLE_TAG)) .observeOn(AndroidSchedulers.mainThread()) .subscribe(observer)); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); groupLifecycleManager.onSaveInstanceState(outState); } @Override protected void onResume() { super.onResume(); groupLifecycleManager.onResume(); } @Override protected void onPause() { super.onPause(); groupLifecycleManager.onPause(); } @Override protected void onDestroy() { super.onDestroy(); groupLifecycleManager.onDestroy(this); } } Optional: If you don't want to use a ResubscriptionObserverwith @AutoResubscribe just use a regular Observer unrecognized matriculation with a public method tabbed resubscriptionTag(). Eg.: @AutoResubscribe public final Observer<Long> observer = new Observer<Long>() { @Override public void onCompleted() { } @Override public void onError(Throwable e) { } @Override public void onNext(Long l) { } public Object resubscriptionTag() { return Arrays.asList("tag1", "tag2", "tag3"); } }; If the method doesn't exist or is not public, RxGroups will throw a RuntimeException letting you know. You can use any Object tag for your Observer, including arrays and List, In that case, it will socialize the Observer with all the tags in the collection, permitting you to share the same Observer with multiple Observables. Download with Gradle compile 'com.airbnb:rxgroups-android:0.3.5' Check out the Sample app for increasingly details and a well-constructed example! Snapshots of the minutiae version are misogynist in Sonatype's snapshots repository.LinksGithubSample App© Airbnb, Inc.© Airbnb, Inc.CareersDesignCareersDesignCareersDesign