« first day (3508 days earlier)      last day (1439 days later) » 

12:42 AM
Chandan requested access. Rep: 37 - Questions: 9 - Answers: 1 (ratio 4:0.4)
 
 
2 hours later…
2:32 AM
!reject
 
@Chandan you currently do not meet the requirements to chat here. You can find our requirements in the rules.
 
 
2 hours later…
4:20 AM
Hi, I got a quick question. I've got a phone with LineageOS with no Google services. I even block all Google IPs at the network level, but came across an issue. WiFi would not connect and would say "no internet" as the status. Which I knew to be wrong as I could see it was properly connected. After some digging around I discovered Android will disable internet even if it's working if the domain "connectivitycheck.gstatic.com" is not reachable. I don't want my phone connecting out to Google.
Is there any way I could disable this check?
 
If you're lucky, nothing has changed in the last three years and this still works: android.stackexchange.com/a/188344/10038
 
@RaghavSood Thank you very much. I'll try that out in the morning. =o)
 
Good luck, it's Android, so over the last 3 years Google has probably included some obscure requirement like ensuring your phone is in a pentagram drawn with chicken blood on the 5th full moon of the year for those settings to be changeable
 
 
6 hours later…
10:45 AM
This was the most starred message last year on this day:
May 25 '19 at 10:07, by Taseer Ahmad
Nobody:
Literally nobody:
Not even God:
R15-ZUCC: This was the most starred message last year on this day
 
 
1 hour later…
11:59 AM
Is Taseer still a thing?
 
 
1 hour later…
1:11 PM
Good morning everyone. :)
@IvanMilisavljevic, buddy, do you have any idea to test ViewModel and remote API?
using some kind of testing unit/instrument
 
eli
1:39 PM
[ hi ]
 
 
1 hour later…
2:39 PM
@RaghavSood hahaha
 
05nelsonm requested access. Rep: 31 - Questions: 0 - Answers: 5 (ratio 4:Infinity)
 
It's the weekend, and you have a very elaborated answerç
!accept
 
@05nelsonm welcome. Please start by reading the rules and confirm you have read them before saying anything else.
 
@R15-Zucc I have read and understood the rules
 
thank you very much and welcome!
 
2:52 PM
dibs on the new guy's kidneys
 
XD
I swear he's joking, 05nelson
 
only if you know an answer to stackoverflow.com/questions/60889357/…
lol
 
that's a phd thesis, not a question :D
 
haha. yes, it's pretty detailed, but exactly the same problem I am having with a project.
 
You're trying to use @Inject with a dagger, you should be using @stab
Maybe @slice if you're after some kidneys
 
3:01 PM
not even going to numb me up before @slicing? sheet.
 
 
1 hour later…
4:21 PM
posted on May 24, 2020

Android Weekly #415 🤖 #outlook a{ padding:0; } body{ width:100% !important; margin:0; padding:0; } body *{ -ms-text-size-adjust:none!important; -webkit-text-size-adjust:none!important; } body,.wrapper{ background:#ffffff; color:#505050; font-family:Arial, sans-serif; font-size:12px; } table,table td{ border-collaps

 
 
2 hours later…
5:56 PM
@05nelsonm My humble advice: do not use Dagger for tests
If you are using mockito you can use @InjectMocks in your tests
Otherwise you can create a little utility class and manually inject the proper objects using the good old reflection
There's another controversial method, use a configureForTests method annotated with @VisibleForTests and do your preparation in there without needing reflection
 
 
2 hours later…
7:48 PM
@RakeshKumar im not using ViewModels but i guess you have to test them under instrumentation since they are bound to objects with Android Lifecycle
If you are using OkHttpClient with Retrofit you can use Mock Web Server
there is plenty of tutorials on how to do a setup for this
@05nelsonm i would also advise against using dagger in tests, because it not really necessary. But if you really want to do it, create a component that extends the component under test and provide its mock implementation
And for your specific case, ping me tomorrow i can take a brief look at the code
 
8:11 PM
o/
 
Hi Kodama!
 
8:29 PM
Thanks for the advice @RaymondArteaga and @IvanMilisavljevic. As much as I would prefer not to, I sort of built a lot around Dagger2 (I know i know.... never build around some library) to off-load runtime processing. Chopped application startup down by about 75%, so.
 
Are you writing all tests now from scratch or you already have lots of tests written?
 
@RaymondArteaga writing all now. Was a learning experience that I'll never do again. TDD all the way...
It's pretty sweet though still...
 
You don't need to use Dagger on your tests, for your app... Sure, but for your tests not so much
At least I suffered a lot with it
Other people might probably like it tho, but they have right to be wrong
 
8:57 PM
yeah, but the most optimal way to get encapsulation with Dagger (since everything has to be public) is to inject everything into a private companion object, then have inner classes utilize the injected classes such that when the library user instantiates the class containing the APIs, they don't have access to the public methods of the public classes that are being injected.
 
That's that's a major Dagger downside
I personally hate it
But is a near necessary evil
 
coded up an example of how things are laid out: gist.github.com/05nelsonm/4553b38805d70915fe497cdb456abc7e
was a little sloppy, fixed some things, hope it's clearer.
 
 
3 hours later…
11:51 PM
Robert requested access. Rep: 1032 - Questions: 12 - Answers: 20 (ratio 4:6.7)
 

« first day (3508 days earlier)      last day (1439 days later) »