Profile

Cover photo
Daniel Lew
2,313 followers|845,095 views
AboutPostsPhotosYouTube

Stream

Daniel Lew

Shared publicly  - 
 
They are some of the more complex operators in RxJava.
repeatWhen and retryWhen are fairly baffling at first glance. For starters, they are serious contenders for "most confusing marble diagrams": They're useful operators: they allow you to conditionally resubscribe to Observables that have terminated. I recently studied how they worked...
20
11
Cristian Garcia's profile photoDraško Sarić's profile photo조남두's profile photoGabor Orosz's profile photo
7 comments
 
Hi, how would you solve generally oauth2 access token refreshing when HTTP status code 401 happens? I've been doing this on OkHttp interceptor level but i want to push it to Rx part of my code that handles all requests.

EDIT: I`ve read your article and here is my solution based on that: http://pastebin.com/JvCnccBa

It looks like its working but i`d like to know if there is some drawback with this solution. Thanks
Add a comment...

Daniel Lew

Shared publicly  - 
 
Some notes on error handling in RxJava.
RxJava makes error handling a snap. Just use onError, right? That's fine and dandy if you're the subscriber, but what about exceptions that occur inside your operators? How do you ensure that an Exception in, say, flatMap() gets passed along...
31
15
Gyuri Grell's profile photoYauheni Bobich's profile photo
Add a comment...

Daniel Lew

Shared publicly  - 
 
PSA: If you're using play-services-measurement 8.3.0, make sure you have applicationId defined in build.gradle.

Otherwise you (and anyone else who doesn't have it) will have to battle it out for ContentProvider namespaces. Only the first installer wins!

(Note that play-services-measurement is a dependency of play-services-gcm, so that increases the likelihood you have it.)
Android Open Source Project - Issue Tracker
29
6
Rakeeb Rajbhandari's profile photoCristian Garcia's profile photoSalvador Gómez's profile photoPaweł Marchewka's profile photo
 
Thanks for spreading the word.
I was "unlucky" enough to find out the problem and report that bug before going live.
I'm afraid that not so many developers will realize they've this issue because you must have another app installed on your device using 8.3. I was lucky enough to have the Norwegian airlines app installed which had it.
Hopefully +Tor Norbye's team can take a look at it soon.
Add a comment...

Daniel Lew

Shared publicly  - 
 
Suppose you've got an Android application with a bunch of tests. Some of them are unit tests (located in src/test). The rest are instrumentation tests (located in src/androidTest). Here's the dilemma: you've got some utility code that you'd...
25
18
Filip Maelbrancke's profile photoTobias Preuss's profile photo
Add a comment...

Daniel Lew

Shared publicly  - 
 
I wrote another thing! I'm on a hot streak!
42
16
Hai Vo's profile photoRodrigo De Paiva Direito's profile photoYair Kukielka's profile photoHéctor Júdez's profile photo
 
This might be fixed as a part of appcompat lib, right? Maybe we can report this as issue?
Add a comment...

Daniel Lew

Shared publicly  - 
 
I've updated the Android RxJava subscriptions sample with a way to use Subjects to terminate streams.

I wouldn't add a Subject just to use this method, but if you are already using one then it's another option.
15
3
george oloo's profile photoHéctor Júdez's profile photo
Add a comment...

Daniel Lew

Shared publicly  - 
 
In Android Studio, you can install/run your app on multiple devices at once by selecting multiple rows.
72
13
Pedro Loureiro's profile photoPatrick Hammond's profile photoVishnu Narayanan (vn)'s profile photoCiprian Grigor's profile photo
13 comments
 
It will play nicely with my STF instance, thanks.
Add a comment...
Have him in circles
2,313 people
Mario Viviani's profile photo
Urko Heras's profile photo
carmen nalin's profile photo
Chad Birch's profile photo
Joshwin Greene's profile photo
Kolade Kehinde's profile photo
Nicolás Jafelle's profile photo
Ryan De Gruyter's profile photo
Hiroshi Kurokawa's profile photo

Daniel Lew

Shared publicly  - 
 
Going back to my blogging roots: obscure corner cases no one else will ever run into.
23
8
Salvador Gómez's profile photoSudeep Jha's profile photoJames Vanaria's profile photoMarty Ballard's profile photo
13 comments
 
That generally goes into the about or privacy notice section. The right way to go about it is to anonymize the data so that it can only ever be "private".
Add a comment...

Daniel Lew

Shared publicly  - 
 
Some throwback Thursday fun: a look back at my first Android app, six years later.
22
1
Wolfram Rittmeyer's profile photoMike Wolfson's profile photoGiampaolo Frello's profile photoRussell Wheeler's profile photo
3 comments
 
Hey, I bought this app!
Add a comment...

Daniel Lew

Shared publicly  - 
 
If you're free tonight and live near Minneapolis I'll be giving my talk about Android styles & themes.
14
2
Michael Lustig's profile photoPatrick Fuentes's profile photoJimmy Leonardo's profile photo
 
I wish I were in the area. You give great presentations +Daniel Lew​
Add a comment...

Daniel Lew

Shared publicly  - 
 
The problem with Google+ is that if I use a link then I bury the lede with whatever I type here.
When someone asks me about poor animation performance, one of the first questions I ask is whether or not they are using hardware layers. During animations your views may be redrawn each frame. If you use view layers, instead of...
39
17
Ngoc-Thuan Tran's profile photoKiran Rao's profile photoCristian Garcia's profile photoSalvador Gómez's profile photo
5 comments
 
And +Udi Cohen just got circled!
Add a comment...

Daniel Lew

Shared publicly  - 
 
I wrote a thing!
There are some growing pains we're going to experience while upgrading to runtime permissions. The most painful one I've run into so far is sharing files. When done correctly, sharing a file involves a sender app creating an accessible URI...
31
16
Brandon Clarke's profile photoSaif Chaouachi's profile photofrank paulsen's profile photoJabin Zhao's profile photo
 
One correction though: even files in external storage are only readable by the user that creates them - normally that's everyone, but it doesn't account for cases like Android for Work where the work profile is a completely separate user. Sharing files across those boundaries requires a FileProvider like approach.
Add a comment...
People
Have him in circles
2,313 people
Mario Viviani's profile photo
Urko Heras's profile photo
carmen nalin's profile photo
Chad Birch's profile photo
Joshwin Greene's profile photo
Kolade Kehinde's profile photo
Nicolás Jafelle's profile photo
Ryan De Gruyter's profile photo
Hiroshi Kurokawa's profile photo
Links
YouTube
Links
Basic Information
Gender
Male
Apps with Google+ Sign-in
  • Fallout Shelter
  • Super QuickHook
  • Downwell
  • You Must Build A Boat
  • Monument Valley