Category: Android

0

/dev/kvm permission denied on Ubuntu 18.04

I got this error when I was trying to create an emulator: /dev/kvm permission denied I did several things to fix it. sudo apt install qemu-kvm sudo chown /dev/kvm <your_username> Logout and Login again The error should...

0

Mockito anyString() vs any() – null handling

Sometimes, when I mock a method in Mockito, I used anyString instead of any and I get into a mess and my test fails. Why? given(mUserRepo.getUser(anyString(). any())).willReturn(new User()); And what will happen if mUserRepo.getUser(null);...

0

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

Recently, I had a very strange problem to debug. I had the following interactor: public class GetUserUpdatesInteractor { private final UserRepository mUserRepository; private final InteractorSchedulers mSchedulers; @Inject public GetUserUpdatesInteractor(UserRepository userRepository, InteractorSchedulers schedulers) { mUserRepository...

0

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...

0

Make Retrofit work for you

Making Retrofit work for you – PRESENTATION Http Client Retrofit is not an HTTP client. It: – Prepares requests – Makes requests – Lets someone else to execute them Building Two API classes Problem...

0

Handling Android crashes

Video This lecture explains the basic concepts behind Android crash handling and different approaches to it. I decided to make a simple list of notes so every person can use this list whenever he...