« first day (2944 days earlier)      last day (2014 days later) » 
00:00 - 14:0014:00 - 00:00

12:00 AM
lol
 
12:41 AM
@WarrenFaith alright I figured it out, it does chunks the response but the interceptor waits until the whole chunks buffer is full then it displays it, let me know if you wanna discuss it. I decided to go full OkHttp to keep it simple, here is the gist with explanations gist.github.com/MehdiFal/b6fc37350e102e2fd7c75a83da2517eb
TL;DR: Transfer-Encoding: chunked ==> 1 request streaming chunk by chunk, however it seems like OkHttp keeps it simple, since it's a 1 request/response it's gonna wait for all the chunks to arrive to close the communication, so if you wanna catch the chunks, you have to intercept the response yourself and create your own buffer forcing it to serve you 1 chunk at a time (then eventually clone the content to return a full ResponseBody)
it also seems like OkHttp MockWebServer splits 1 specific chunk to 2 smaller chunks, no idea why, hope that helps
now I can finally sleep XD
 
 
1 hour later…
2:12 AM
john smith requested access. Rep: 83 - Questions: 5 - Answers: 7 (ratio 4:5.6)
 
 
2 hours later…
4:28 AM
@TimCastelijns does anyone actually know how runtime permissions work lmao
 
4:48 AM
This might appear to be slightly retarded ... but ... I have formatted and reinstall PC, now I am trying to use old keys in the backup to sign the update to the app, I am getting:
Something went wrong with the encryption tool: Keystore was tampered with, or password was incorrect
What should I do?
 
5:14 AM
Somebody awake?
 
No.
 
I knew bots were always awake -_-
 
What's the relation between debug.keystore and key used for release signing?
 
:thinking: I had never used debug.keystore....
Is that useful in any way?
 
There is no relation, they're two separate keys
 
5:29 AM
:crying: Bitcoin is rising right after I spentmore than .002 BTC :'(
Wow, I had never though about the debug keystore
Now I just read the documentation and found some interesting things
Thanks @TelKitty
The default password for the debug keystore is android :P
such a funny thing for trivia lovers
 
@RaymondArteaga You probably have if you developed any android apps. But the debug.keystore is automatically created so you might not be aware of.
 
6:01 AM
@RaghavSood So I have a bunch of keys, how do I analyse them? Use keytool?
 
Yes, that should work
Your debug keystore should be a completely separate file from your release keystore
 
I was aware that the app was being signed, but never minded about that...
I'm going to sleep folks... so good night!
or good day if you are at the other side of the world
 
nite
@RaghavSood I have something called 'key', but keytool insisted that it could only be used on keystore
 
keytool -list -v -keystore yourkeystore.keystore
What's that sa
 
I have only found key for each app not keystore, lemme C whether they are stored somewhere else.
 
6:17 AM
Vamsi requested access. Rep: 2094 - Questions: 13 - Answers: 30 (ratio 4:9.2)
 
!accept
 
@Vamsi welcome. Please start by reading the rules and confirm you have read them before saying anything else.
 
2 messages moved to Trash
Read the rules
 
I have read and understood the rules
 
eLi
morning
 
6:32 AM
$HOME/.android/debug.keystore
 
7:14 AM
I have my keys but seem to have lost my keystore file
 
Your keys are inside your keystore file
 
7:30 AM
Gooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooood Morning Everyone!!!!!!! :D
 
8:22 AM
@AdamMc331 um yes, it's not hard bro, just know
 
@MehdiB. thanks a lot for this! I found similar things on SO already but it was never within a interceptor. Now thinking about this it kind of totally make sense...
 
8:42 AM
@MehdiB. I modified your interceptor a bit and it works flawless. Now I just need to figure out how I can publish the chunks via callback/rx to deal with each chunk... You should write your code as an answer to get the reputation. Well earned!
 
should not be too complex right? With rx
 
I feel like a bus pattern works best... but I am not really sure
the problem is the abstraction
normally the okhttp client is not visible from where the retrofit call is made, so how to I subscribe to that?
Once the okhttp client is built I can not add/remove interceptors, so I would need to make the interceptor publicly available to subscribe to
 
yeah good point.
let me just remove that. It makes no sense really
what about what mehdi said? "create your own buffer forcing it to serve you 1 chunk at a time"
 
8:58 AM
o/
 
Mehdi went above and beyond to help the old man
 
Not old, wise...
Basically I did exactly that in the interceptor like Mehdi suggested gist.github.com/MehdiFal/…
problem is no publishing that content to a observer instead of just printing it
I need to think about that
 
why do you need it chunked though?
 
because I get a shitload of json objects from our backend that comes from multiple sources and some of them are super slow. I need the fast ones to be delivered asap without being blocked by the slow ones
and shitload means megabytes...
 
sounds like hell
 
9:08 AM
Why are there even megabytes
 
well because I get information of POIs in a viewport of my map... lets say for Berlin, the complete city, it is easily 10k
lets assume each POI as a size of 100 bytes (which is lower end) we are already by 100 * 10k -> 1MB
 
Why not do it like google maps? Show important POI's and the further you scroll in you get the lesser important ones
 
because there is no "lesser" important one. As you know I work for a carsharing aggregator. So each vehicle is of potential interest for the user.
The user can, of course, filter the vehicles to his need so he does not see 10k vehicles, but he can
 
I mean why do you need to see 10k vehicles at once?
 
what if there are 10k benz vehicles? Would you be OK if they left out 1? No, you would want to see them all
 
9:14 AM
No, since all of them are mine anyways
 
the problem is not the "need". The problem is I request a viewport and what ever the hell is in there I get back
just checked: one poi is 1,519 bytes big (just picked one)
so even with just 100 vehicles I exceed the MB
 
uhm
bytes or kbytes?
 
bytes
 
Pretty sure 150 bytes are not even close to a megabyte bro
 
9:18 AM
1519 bytes... I counted 919 POIs and get back 1.4mb (gzipped response 660kb)
 
1mb is large enough to require optimization?
 
my response has, pretty formatted, 43k lines
 
Yeah that one I am wondering too right now
How can 1mb be that much of a trouble
 
it is not about the size alone, the timing as well
 
I am parsing a 19mb xml file in ~3 seconds
on a phone
 
9:20 AM
I get vehicles for providers after 20 seconds... so would you like to wait for all providers on the map 20 seconds?!
 
Oh that's the issue then
and not the size
 
both. the biggest response I got so far was gzipped 2.6mb. On HSDPA/LTE this is no problem, on Edge it is a no go...
but time is the biggest of both
 
But you have one request sent to the backend, right?
or multiple for the different providers?
 
one, just one
 
what if you execute the request in a hyperbolic time chamber? It will take 20 seconds still, but in the real world it will seem instantaneous
 
9:24 AM
Interstellar?! :D
 
So ... if you have a few apps under one play store account, do you have a different keystore for each different app or one keystore for the whole play store account?
 
one keystore with multiple aliases
beside that losing one keystore is enough. Imagine the pain to lose multiple ones
 
You can sign the app with play store signing, but the documentation of how to do so is like written in a foreign language.
:/ I named my keystore with name 'key', then I forgot to use "" around path when using keytool
I do have copies of keystores and I have at least password to one of them..
 
9:45 AM
o/
 
\o
 
btw tim v for vendetta was a nice movie , i liked it
 
cool
what do you remember?
2
 
remember remember the 5th of november~~
 
Bingo ... I found 2/3 of my keystores now.
Why did I name keystore, keys??!!!
 
@WarrenFaith glad to hear that 👍 i'll post an answer in 1h30 or so once i'm in front of my laptop, want me to answer in kotlin or Java? :D
 
That guy created Photoshop as a web application
 
> I learned javascript using some online tutorials in a week
 
A true prodigy
 
Really looks like it, 3.5y of unpaid work and still kept his motivation
 
10:03 AM
So ... do people submit apk or aab nowadays?
 
I actually used Gimp for doing stuff
gonna use his online tool from now on
 
How do you guys declare global views in Java? (eg: private TextView titleTextView;) Using only private?
 
It has always be *.apk, but android default release setting builds *.aab instead :x
@grrigore global + private is like oxymoron
 
I remember I saw something like private final TextView ..
 
10:08 AM
that's actually impossible
because a final var must be initialized either directly or in the constructor, and views cannot be initialized that way
 
make it null
 
I wonder what's the best way
 
why do you wonder? There is only 1 way
 
So just private
 
There is an activity I include in the xml
But that activity never reaches its onCreate()
It is registered in the manifest
 
10:16 AM
is it launched?
 
No
Well, yes I do see the toolbar
 
does the toolbar belong to that activity
 
But the activity class belonging to it never gets launched. I did set the context
@TimCastelijns It belongs to every activity
 
no, each activity has its own toolbar
 
Ah, yes
But the toolbar is an activity on it's own
Because the data set in there is variable
 
10:19 AM
are you sure? An activity normally contains more than just a toolbar
 
This is the toolbar of which I am speaking about
 
ok
<layout> 🤮
 
Without that I can't include <data> tags
 
yea I'm just bashing the databinding as usual
 
And this happens in activity_main.xml
   <include
        android:id="@+id/toolbar"
        layout="@layout/activity_toolbar" />
 
10:22 AM
so you start this activity, and you see the content, but the oncreate is not called?
 
Yeah, that is the weird part
 
Anyone else here check the keystore into VCS?
We just push it to git, but the password is held by only 3 people
And the CI that signs release builds
 
I don't know what voodoo databinding does but in normal ways that is impossible because the UI is set in the onCreate
 
Exactly
 
did you override the correct onCreate?
 
10:23 AM
Hmm
Yes
 
how do you verify that it is not called
 
It can differ, since I extend AppCompactActivuty
Debug
At debug it doesn't cross the breakline
* can't differ
 
it can differ. There are 2 onCreate's
 
Really?
Do they look different? I mean, the onCreate(param) is similar to the one on MainActivity
But I checked, and they both override the same onCreate
 
@MehdiB. preferable in kotlin because the question uses kotlin
 
10:27 AM
"Overrides method in androidx.appcompat.app.AppCompatActivity"
Think I should make it a question?
 
no
one has 1 param the other has 2 params
I don't know. Is your code available somewhere already? Would make it a lot easier
 
I have the right one
@TimCastelijns Just Gist elements
@TimCastelijns why
 
Why wouldn't a bringToFront() method called on a view work?
 
I suspect it's a small mistake somewhere
 
10:42 AM
Me too
But I can't figure where
 
you know where the mistake is, if you know where it's not
 
??
My brain hurts now
 
Tim hit me with a harder one a few days ago :P
 
if you have 3 screens and the mistake is not in the first or the second, it's in the third
 
Mw I have a nice video for you
for everyone actually
 
10:47 AM
i guess that's what Tim is saying
 
But Tim
 
> The missile knows where it is at all times. It knows this because it knows where it isn't. By subtracting where it is from where it isn't, or where it isn't from where it is (whichever is greater), it obtains a difference, or deviation. The guidance subsystem uses deviations to generate corrective commands to drive the missile from a position where it is to a position where it isn't, and arriving at a position where it wasn't, it now is.
 
the missile just hit me
 
Has anyone really been far even as decided to use even go want to do look more like?
 
10:49 AM
🤔🙃🤔
 
Gotta eat
I have turned it into a question, I've been searching the cause for a longer time already
 
11:22 AM
databinding does not require setContentView?
 
eLi
Lunch time
 
indeed
 
Delidragon requested access. Rep: 84 - Questions: 26 - Answers: 10 (ratio 4:1.5)
 
!reject
 
@Delidragon you currently do not meet the requirements to chat here. You can find our requirements in the rules.
 
11:48 AM
\o/
 
lol
 
nice
 
congrats tim
 
Congrats Tim!
 
eLi
11:54 AM
Congrat Tim
 
So Tim = 30,020 goats now? :x
 
@TimCastelijns context is declared in the xml file
stackoverflow.com/questions/53188026/… this is the question I made from it
@tim congrats !
 
Launched ... as in it's launched for the first time and not brought back from stop or paused.
 
Yes
 
> Currently playing with rxjava coroutine
@TimCastelijns bro... bro... where is Flutter??
> Has used google-app-enginepython in the past
No Realm???? :( RIP Realm
 
12:24 PM
congrats tim.
 
tim nearing raghu
damn i am left behind :(
 
i have stopped answering
i figured out why my unit tests was flacky. The test code was fine. I had to use Disptachers.Unconfined which is something similar to trampoline with RxJava.
 
o/
 
@TimCastelijns is this how much is left of student debt?
 
@TimCastelijns Congrats!
 
12:37 PM
Some intelligent human being can help me to download the aidl file for google play billing v3??
It's like when you are trying to download pirate software and all the links are ads
help please
 
@TimCastelijns the 5th of november
maukerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
@ColdFire Happy Diwali. Bursting crackers?
 
How do I pass a variable at a Room query?
@Query("SELECT * from rack_table " +
        "INNER JOIN storage_table " +
        "WHERE storage_table.storage_id == storageID ORDER BY rack_name ASC")
LiveData<List<Rack>> getAllRacks(int storageID);
 
@Raghunandan yes gonna soon
 
use :parameterName
 
12:40 PM
the SC order has hit hard it seems pretty dim diwali
 
:storageID in this case
 
i am not enjoying this :(
 
@RaymondArteaga Thanks!
It works
Is that a Kotlin thing?
 
no.
 
12:41 PM
a room thing
it works in java too
 
mw nope
oops forget to wish you, happy diwali @Raghunandan :D
 
Hellp please!!!! I can't find the aidl file for downloading :cry_out_loud:
 
@MarkO'Sullivan realm is just one lib, but GAE is a huge framework. I made servers with it
 
:find_it_yourself:
 
have mercy of me:(
they are trying to hide it on purpose -_-
 
12:44 PM
lol
 
@RaymondArteaga Just ignore CF these times
 
@Mauker his comment was not for me , you mauker
 
help @Mauker please
 
He's too busy with royal matters to care about our mundane affairs
 
xD
 
12:45 PM
can you please take a look at this developer.android.com/google/play/billing/api
 
brother you have to write the aidl yourself
 
and find the aidl file?
 
Mauker, plz.
 
-_-
I downloaded it for v2 -_-
 
anyway, I don't even need to use the aidl, to interact with the library I need a json... and I can't see it anywhere...
hmmm... Maybe that setting is hidden from me....
 
-_-
 
I have to ask to the account owner :P
 
@TimCastelijns it's more than a lib to me bro, it's a way of life
 
sorry to disturb your peaceful morning :P
 
12:48 PM
@MarkO'Sullivan anyway I did 7 more lessons last night
 
How are you finding it so far?
 
I type the letters and it works when I run it, but it hasn't quite clicked yet
 
lol nice
 
@TimCastelijns do you like it?
 
not really atm, but probably because I don't understand it
also don't like the default settings for dart, like 2 space indentation and every block ends with a comment what that block referred to. I mean it's nice if you're blind but please
 
12:52 PM
I think you can turn that off
 
most likely, but why is it even turned on
 
I don't understand how some people thought 2 spaces indentation was a good idea
 
well you kinda have to with this amount of nesting
 
I've seen html developers using 2 spaces for this reason, but I just can't read a code like that
 
@TimCastelijns you can avoid nesting if you build your own widgets and extract it out into it's own file (or just keep it in the same file)
It's really useful using control + enter whenever you need to wrap another widget around an existing widget
or maybe it's cmd + enter
 
eLi
1:07 PM
what is the reason of passing <data> tag in xml as in MB question above
 
It is meant for 'taking in' a viewModel
ViewModels are meant as engine to the View (the xml) and give impulses to the view that a certain something has changed
The View though is not supposed to know what it's about, just the impulse 'location' like viewModel.someStringName
 
@MarkO'Sullivan github.com/TimCastelijns/udemy-flutter/blob/master/… this kind of stuff is confusing atm. Classes with _ prefix, stateless/stateful etc
 
Stateless / stateful - think of it as static / dynamic, stateless won't be able to change, stateful will. If you think of a button, it can have two states (active / inactive), that's a stateful widget.
Since dart doesn't have private / protected / public the _prefix is used to represent private visability
 
🤮🤮🤮🤮🤮🤮
 
It's the same as python
They use leading underscore to indicate the function / variable is internal
 
1:18 PM
never liked that either
 
eLi
oh thanks for reminding
 
!remindme 3 days pick up meds
 
Ok, I will remind you at 13:20 on 10 November 2018 (UTC)
 
So @tim appearantly if I <include> an activity it is never going through the onCreate()
Someone mentioned in the comments
 
You include an activity? wat
 
1:29 PM
Well yes
The toolbar has two variables set, date and username
I do not want to have the toolbar included and pass String along with the include on every activity
If you know what I mean
 
Relax, there is a valid reason for this approach
Except it is not working out
Now I need to figure an efficient way to have a toolbar, without including this element passing strings at every activity containing the toolbar
 
what's wrong with the normal way of declaring toolbars?
 
What is the normal way?
I thought <include> was the normal way honestly
 
<ConstraintLayout><android.support.v7.widget.Toolbar .... />....</ConstraintLayout>
 
1:34 PM
😨
 
or are you talking about another "toolbar"?
 
He includes an activity with a layout or so
 
in another activitys layout?
 
@MwBakker Not sure what this means. Activity is not an xml thing, you cannot <include> it
 
@MehdiB. yes
@MehdiB. wait, I can customize this one?
 
1:35 PM
yes, it's just a regular view
 
But I must set the variables of this toolbar in every activity, right?
Or are the variables static in that matter
Btw this is the question, to clear things out
 
it's fine to <include> a toolbar, I do this as well
 
0
Q: Activity visible, but debugger not passing set breakpoint onCreate()

MwBakkerI have a toolbar which is present in every activity of my app. The toolbar is an included element in the xml of any other activity. When I launch my app, the toolbar is visible along with its icon except the set text is not. When I debug I can see the ToolbarActivity class is not reaching my ...

@TimCastelijns But how do you set the variables in that toolbar?
At every activity again?
 
yes, that's why they are variable
 
But following situation
Toolbar contains a date
Must every activity, containing that toolbar, set the date?
That sounds very inefficient to me
This is why I tried making the toolbar an activity, and having the activity of toolbar set the date once
 
1:39 PM
You should actually have a BaseActivity with the toolbar and some protected methods to modify it if needed...
 
you can do that in a super activity class if you want
 
Also that guy comment makes no sense btw
 
I need downvotes for comments
 
@MwBakker that's not how to do it in android, but it's fine, this is how you learn that shit.
 
1:40 PM
Super activity class.. but then what will the context of my MainActivity class containing the toolbarClass be?
 
MainActivity is its own context
 
Inheritance mwb
 
But with inheritence the MainActivity still needs to implement setToolbarDate(); just like all other activities?
 
not if you implement it on the Super class
the stuff of the super class is included on the child, so it's like you redeclared it without actually writing it x times on each activity
Remember, a few hours of trial and error can save you several minutes of looking at the README.
😂😂😂😂
 
@MehdiB. Included? Not inherited?
 
1:45 PM
I was trying to vulgarize
 
Ah
 
because activities call super.onCreate, the parent activity can take care of setting the date on the toolbar for all of its children
without the children having to do anything other than inherit from the parent
 
But the super.OnCreate() already comes from AppCompactActivity
So my custom superActivityClass must extend AppCompactActivity
And the MainActivity extends SuperActivityClass?
 
yes (extend not implement), and MainActivity will extend your new parent activity
yes yes you got it now
 
Alright
Thank you guys
I'll go and perform this, if I bump into something I'll let you know
 
1:50 PM
btw, take oop very seriously in your code, you'll realize it makes your life way easier and code cleaner and less redundant
 
also composition over inheritance. But not in this case.
 
@MehdiB. I constantly aim for most efficient OOP, but finding the best way goes with a few corners sometimes
@TimCastelijns It seems
 
Corners are no problem. If they were, all the world's roads would be straight
 
Which would be boring
 
not if we made a huge rectangular straight road crossing our flat planet
 
1:57 PM
..flat planet?
oh boy, here we go
 
yep of course flat

Australia: a mystery unraveled

Aug 1 at 20:25, 59 minutes total – 125 messages, 7 users, 18 stars

Bookmarked Aug 1 at 21:37 by Tim Castelijns

4
read this MW, it's really insightful
 
00:00 - 14:0014:00 - 00:00

« first day (2944 days earlier)      last day (2014 days later) »