RxJava toList – completes only after onComplete is called

mGetActiveHubUpdatesInteractor.getActiveHubUpdates() .filter(Optional::isPresent) .firstOrError() .map(Optional::get) .flatMap(activeHub -> mGetActiveHubEventsInteractor.getActiveHubEvents(activeHub, startTime, endTime)) .flattenAsObservable(list -> list) .map(mActiveHubEventUiMapper::toUiActiveHubEvent) .toList() .subscribe(this::populateEvents, this::handleError);

May 4, 2020 · 1 min · gmirchev90

Ubuntu/Mint show git branch in terminal (bashrc edit)

I just wanted to share with you how my terminal looks like and how to export the PS1 variable. To achieve it for Ubuntu: sudo gedit ~/.bashrc For Linux Mint: sudo gedit /etc/bash.bashrc And paste the following there at the line before the last one: export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '

May 4, 2020 · 1 min · gmirchev90

Google Play Account Ban – A nice reason to hate Google

Edit: All of this happened in the long forgotten year - 2014 It is time for me to tell you a nice story. It is a long one so you can directly go to the middle of this article, which I expect to be long, so you can get the main point.

May 4, 2020 · 6 min · gmirchev90

Selenium + BrowserMobProxy to gather data from SSL secured websites like Facebook

Recently, Facebook decided to turn off access to public events. So now, if you are not an administrator of the page or if you don’t have an access to the page, you don’t have access to its events, even though they are public. Here is the bug for it.

May 4, 2020 · 6 min · gmirchev90

Thinking about Code Architecture & Object Oriented Programming

The Content I recently got to watch several videos about architecture that got me a bit deeper into the topic and I decided to share my thoughts here. There first two videos are from Realm: MVC vs MVP vs MVVM vs MVI by Marcin Moskala Android Architecture Components Considered Harmful by Vasiliy Zukanov They are mostly Android oriented but there are some general rules which are applicable to code architecture.

May 4, 2020 · 6 min · gmirchev90

Applying Clean Architecture in Android

Short Intro For 4 months now I have been implementing “clean architecture” in my current project. The project is huge, more than 17 Android developers work on it including me, so it is important to apply an architecture that works for all of us. I will not talk about what “clean architecture” is, but I will directly dive into the code and explain step by step the purpose of the layers that we have and what each layer is about.

May 4, 2020 · 11 min · gmirchev90

.blockingGet & AndroidSchedulers.mainThread() make the app stuck

Recently, I had a very strange problem to debug. I had the following interactor:

May 4, 2020 · 1 min · gmirchev90

Failed to start mongod.service: Unit mongod.service not found. – Ubuntu 16.04

Recently, I installed MongoDB following the tutorial on their site on Ubuntu 16.04 64 bit. But when trying to start the mongod service I got the following error: “Failed to start mongod.service: Unit mongod.service not found.”

May 4, 2020 · 1 min · gmirchev90

It’s 21st century – Stop using EVENTBUS!

Do you still use it!? Have you used it? I mean the EventBus. If the answer is NO, then you are either a new developer who started Android recently or you had the wonderful opportunity to not meet this three-headed monster. What I am talking about? Let’s make a brieft visit of the Android development history.

May 4, 2020 · 8 min · gmirchev90

How to mock a dynamic value returned from a method with Mockito?

Probably, most of you already know this, but it is good to keep it in mind when you want to dynamically change the values returned by a mock you have.

May 4, 2020 · 1 min · gmirchev90