« first day (1648 days earlier)      last day (3317 days later) » 

12:40 AM
Sure, but targeting Lollipop isn't really an option :P
#minkSdk21
 
12:50 AM
You should. Makes your apps pretty exclusive.
 
mr5
1:04 AM
Hello o/
 
Good morning everyone
 
mr5
I'm trying to make a function with a parameter whose type is of NameOfClass.class, how can I do that?
 
Have you tried something like: Class<?> clss
When I first used a ViewPager their example code used something like that.
 
mr5
@McAdam331 Uhm, basically, I'm trying to connect my project from another project which I need to pass the Activity.class, however, your suggestion works but I get another error which is "<NameOfClass> cannot resolved to a type" ?
 
Class<? extends Activity> clazz
Might work :P
 
1:16 AM
I'm not an expert on the subject, but I figured it'd be a push in the right direction. Looks like AdamS came through with the rebound though.
 
mr5
@AdamS not working :/
I made this variable private Class<? extends Activity> mParent;
Then I pass it in some function

pedometerIntent.setComponent(new ComponentName(this, mParent.class));
It's on another project but I don't want to mess up the code. I could, however, call directly the class name I wanted to pass
 
1:31 AM
Hey guys, I probably won't be on much if at all. Probably 45-60 minutes a day. Sorry. Talk later guys :)
@McAdam331 probably can't talk much, good luck with the app
 
What's the function definition look like?
The class of mParent is Class.
 
mr5
@AdamS The guy in the other room figure it out already. It's mParent.getClass()
:D
 
Righto.
 
Ugh, found my first issue with JodaTime. Still overall better than Java's Date class though.
 
Have you checked out joda-time-android? It solves a few performance problems (that I had no idea about until I listened to Dan talk about it a little on Fragmented podcast).
 
1:41 AM
Not a preformance problem, but it looks like the DatePickerFragment starts at index 0 for months but JodaTime starts at 1? Because When I set it to today and open the dialog it's set to May 20th.
So I just add/subtract 1 to offset it when I create the dialog/get the chosen date.
@AdamS I have a quick question regarding the alarms we talked about earlier.
 
Not sure I can help but shoot!
But the 0/1 index thing sounds familiar. Read the docs closely ;)
 
Well, instead of having an alarm that updates the table for each individual account that I'm working with, I want to make one alarm that goes off every day and checks if it needs to add a new row for any account. Now, I can work out that logic myself no problem, but when do I start that alarm, and how do I make sure it only happens once, so that I don't have multiple alarms killing battery life?
I suppose I could have it in the onCreate() of my main activity, but put it inside an if statement that reads from a SharedPreference whether or not I've created an alarm?
 
Right, so it's a long while since I looked at this but I'm fairly certain you can set an ID on an alarm so you only set it once.
Gimme a sec and I'll see what I can find.
 
Okay. I gotta run, I've been waiting on a show to start for a while and it starts at 10. If you're here in an hour we'll talk about it, if not no worries. I appreciate the help.
An ID seems logical, and in fact I know that Notifications use something similar so you don't alert the user twice, so maybe alarms work the same way.
 
Okay so I set my alarm up here, in startGeonetAlarm.
I was wrong about the IDs, I think. The alarm listener just sets up the time and... that's about it. Most of what this library does is handle wake locks correctly, I think.
 
2:20 AM
@AdamS Glad you are here!
do you agree with this:
they are saying those objects will not be GC'd...
 
Yep.
They have a cyclic reference to each other.
I think that means they'll leak.
I can't remember if this video explains that or not.
 
2:35 AM
can you illustrate why it is cyclic?
 
Activity has a reference to the listener. The listener has a reference to the activity.
Oh. That's normal though.
 
I just do not follow...
they are defining a custom View
that init() is inside a View
 
Yeah, I'm not sure. It's a while since I've read up on... well there's a good blog post or video which explains this.
Explains the MAT tool.
Man I feel like I've finally got a handle on the images in this iOS app. They're displaying in the correct places (lol) and uploading and downloading and things are good.
Is good. But it's taken 4 days and I expected it to take 1.
 
nice!
I think I got it... maybe...
 
I also still have to deal with editing existing images... which we don't have a UI for yet, so bleh!
 
2:47 AM
collector has a reference to this (a View) which in turn has a reference to the Activity via Context
 
3:06 AM
@AdamS So what's your suggestion to avoid multiple alarms being created?
 
Either stop any existing ones when you create a new one (which is what I do in my example), or track whether you've set one already.
There might be a way to find out if one is already set, but I'm not sure about that.
Aaaaaand you can always combine the two methods, actually.
if (!sharedPrefs.alarmStarted()) { startAlarm(); }
Then in startAlarm you just call stop, like here.
Should work, I guess.
Does seem a little unfortunate though!
 
Yeah, I feel like a SharedPreference is simpler. Because I'd be stopping and starting an alarm every time they open the app
and that'd be obnoxious.
well, not that bad
 
3:50 AM
I'm off to bed, night all.
 
Night Adam :D
 
4:12 AM
me too. night.
 
4:30 AM
Hello there
 
"Going to bed" he said.
"Learning Swift" more like it
0
A: How to use appendFormat to format a string in Swift?

Adam SThrough Ken's explanation that a Swift String object is not equivalent to the Objective-C C-style string (a null-terminated array of char) I found this answer which shows how to convert a Swift String object into a Cstring, which the %-12s formatting works correctly on. You can use your existing...

 
haha Adamn do you even sleep bro
you and cm like 100% of the time online
 
Hah, yeah, I'm meant to be asleep now but, y'know, someone on the internet needed my help.
 
haha ^^
 
 
1 hour later…
5:59 AM
...And I am back again.!
 
6:37 AM
0
Q: Detect listener on month scrolling in android times square

maveňI have implemented code for android times square, but I am unable to detect the event when the month change. I have to highlight multiple range of dates from months. This is the way I have done but, I am unable to detect when month got changed while scrolling code: try { JSONArra...

 
close vote ? xD
 
7:11 AM
Hello people
How was your weekend?
 
I spent my weekend in office. :)
 
deadline!
 
Good morning
https://youtu.be/ICnlyNUt_0o
 
heya netpork
 
7:25 AM
I have had on previous job deadline-work :) We had deadlines every week
very stressfull
 
yeah it is stressful :(
@netpork Oye! nice track :)
*Oye == Hey
 
hello from 80's :)
 
Song is from 90s
Music is like wine, older the better
 
7:40 AM
sorry for my ignorance :)
 
7:56 AM
\o
 
HELLO THERE
 
8:09 AM
o/ belt, den
netpork, older the better Yeah! ^
 
Android jacta est ! o/
 
iacta est
\o
 
o/
 
bonjour!, Ocus :)
\o cygery
 
8:26 AM
Namaste TLN
Ave Blackbelt \o
 
@OcuS :D
 
OcuS, :')
 
hi Ocus
 
8:42 AM
\o
 
hi Belt
 
hi pinging friend
 
:D
 
can't wait to get 5.1
there's already an image for nexus4.
 
I can't even install 5.0 :(
because fuck you LG
 
8:58 AM
Don't say that to LG devices!
 
Do we love LG?
I know that we hate samsung
 
Yes, we love LG
 
wow, ok
I saw one with 5.0.2
didn't like it. They completely changed Settings app - and I don't like that
 
TLN, which pill?
http://upload.wikimedia.org/wikipedia/commons/5/52/Red_and_blue_pill.jpg
 
what if I say RED one ?
 
9:08 AM
red wedding ?
 
TLN, "you will see how far the rabbit hole goes"
 
Everybody is like "Would you take the RED or the BLUE pill?". Me, I just want to take both to see what will happen
 
netpork, Eww :3
netpork, what about the blue pill ?
and also what if someone like OcuS goes for both pills ? xD
 
blue pill, you will wake up and forget everything
 
9:33 AM
also, you could have an erection that lasts three days
 
10:35 AM
 
That hurts!
 
damn todd
 
11:01 AM
There should be a possibility to disallow people to code: github.com/Ph1b/RecyclerViewCreash/commit/…
 
11:56 AM
o/
 
Good Morning Sensei ;-)
 
good holiday-at-work morning
 
Hi Gui-Gui
 
> App trying to show that recyclerview has a bug with items inserted and removed.
in reality, the bug is in this guy's approach to concurrency, right?
 
Morning TLN
Is it holiday?
 
12:07 PM
yep
 
What kindof holiday?
The cheese day? :)
National baguette day?
 
Tiradentes day
user image
3
 
hello archimedes (nana)
 
is it possible to have both New Relic and Fabric in the same app?
 
12:33 PM
Hey, netpork.
It is Guil, I had it like that for a year, now I got rid of NewRelic.
But it worked fine.
 
hey everyone
 
o/
 
Kabuto!
setTextAppearance does allow to set style for the TextView programmetically. :-)
 
@Shravankumar request denied. You don't quite meet the criteria for this room yet. Give a few more awesome android answers.
o/ all
 
hey cm
 
12:46 PM
@fge Welcome. Please read the room rules room-15.github.io
 
o/ Magic
 
yo, netpork, TLN
 
orb
 
bor
 
hey cM
 
12:47 PM
@ShubhamGupta you don't have enough rep for this room just yet. request denied room-15.github.io
\o kabuto
 
could anyone take a look at this log, please? gist.github.com/d3c3d19cb1e459af53d9
here's my Application's onCreate: gist.github.com/3e684066f7de99475833
 
@Guilherme proguard?
 
afaik you should initialize newrelic stuff in your application class
 
fge
@codeMagic thanks :)
Well, my question is simple really: when will the Android runtime have a JSR 203 implementation (aka java.nio.file)?
 
ask google
I mean the company, or the OHA
 
12:56 PM
^_^
 
yes, axxiss, only happens with PG enabled
Warre, that IS on the Application class
 
ah, sorry, misread it as activity onCreate :D
 
fge
@WarrenFaith was that in reference to my question? (just to know)
 
have you tried to rebuild after running "gradlew --stop" (which stops the demon and ensures a non cached run/bild)
 
Guil then you are missing some keep on proguard
 
1:00 PM
looks like the new relic method is being called from within Facebook sdk
 
yes fge, that was meant for your question
how do you expect us to know when android will support anything?
 
for those who are using Proguard, great collection of proguard rules for different libraries -> github.com/krschultz/android-proguard-snippets
 
Morning
 
@PranavPatel Welcome. Please read the room rules room-15.github.io
 
fge
1:07 PM
@WarrenFaith well, I was just wondering about this one, really; this, and try-with-resources. Right now, with Android, you just cannot do serious filesystem work in "Java code" because of the lack of support for this particular API
And it's been 4 years since "bona fide Java" had these, so I wonder why it is still absent. Don't tell me that f*ing stupid Oracle vs Google API lawsuit is the cause?
 
it looks like it worked. Not sure if due the PG additions or stopping gradle
Warren, what does that gradlew --stop actually do?
 
I don't know why, but Android supports try-with-resources since api 19
43
A: Does Android support JDK 6 or 7

Muhammad AnnaqeebOriginally Android development tools supported only jdk 6 features. But that was changed, first by Android Studio 0.3.2 in October 2013 see: http://tools.android.com/recent/androidstudio032released Support for language features like the diamond operator, multi-catch, try-with-resources, strin...

and don't forget: Android != Java so just because Java gets a feature it does not mean that android gets it as well
 
Resources are ints, no?
 
and even if: only for the newest API level
there is no reason to expect that any JSR will ever make it to android
resources are streams in that context, nana
20
A: Java7 try-with-resources Statement advantage

morganoIt was introduced because of some resources used in Java (like SQL connections or streams) being difficult to be handled properly; as an example, in java 6 to handle a InputStream properly you had to do somthing like: InputStream stream = new MyInputStream(...); try { // ... use stream } cat...

 
New Relic is not logging my http activity :/
is it possible to filter pidcat by tag?
 
1:31 PM
@Omama denied. You don't yet have enough rep for this room (100) room-15.github.io
 
grep -v ?
 
why -v?
I think you got it wrong, I want to see that only tag, not remove it
 
it shows everything except what matches pattern. Thus you can filter out unwanted tags
 
but pidcat does not rewrite the tag name on every line
 
oh, then no -v
hm. Yes, I remember now. Then no help here (
when has trello become free?
I remember them giving free membership for month or about that earlier
 
1:42 PM
I've always used it for free
 
fge
@WarrenFaith good, so they "only" miss JSR 203 now (but that's quite some miss)
 
trello gold, however, is paid, and give you some extra features
 
fge
To be honest I have googled around a lot and could not obtain any official information about whether this API will be supported, or not, in the future
 
oh
silly me
I could've used it long ago
I wish they've had mac os app for trello.
 
@fge Error 404 - File not found. For the File docs. Hahaha. :D
 
@fge to be sure always assume it will not be supported unless it is announced
I don't know why you require nio.file in the first place but there are quite some libs that do great work on the filesystem
 
fge
@WarrenFaith yep... And I am waiting impatiently for the day when support for this API will be announced
Of course there will be some catchup to do
For instance, having the ability to open archive files (zip primarily) as FileSystems
@WarrenFaith even though this might sound as pollution to this room, here is what I can achieve with this API: youtube.com/watch?v=uTNuCxPJX5g
Now, Android being a mobile platform, well, it could hugely benefit from that
 
no need to ping me that often :D
 
fge
Sorry... I'll stop
(but I do believe this video is worth a watch, only to showcase why Android needs the API)
 
I am in a meeting, so I can't watch right now
 
2:37 PM
Who uses slack?
 
I do
I love it
 
I've used
 
a guy called cM
 
it's nice
 
slackware ?
 
2:37 PM
slack slack
 
what's slack slack
 
Does it have popups when you get a message? I'm not sure if it works how I originally thought or not
oh, orb
 
Yes but you have to enable them
 
I am old bor, forgive me!
 
We just had a meeting about people not being here and communication bla bla. And this is something I thought about us trying to use before.
 
2:39 PM
Click up arrow by your name at the bottom -> Preferences
 
I feel you. The only reason I come to this room is to feel young again
 
Then you can enable/disable/test them
 
I haven't installed it yet. I wanted to see if it did what we need first
 
Ah, ok. Got ya
 
So it does have like an instant messenger feature?
 
2:40 PM
Yes, you can ping other people and it will send them a notification and the room icon will be bold to tell them that they have a message
 
Because that's what I'm getting from this conversation
OK, good enough for me to try out then. Thanks
 
Yea, it is basically IM that is searchable and you can send files and images
Kk, let me know how it goes neighbor
 
I slack all the time
 
It's been quite delightful so far. We just moved from HipChat.
 
2:43 PM
whenever possible
 
Ok, cool. I am going to suggest it here then. Thanks, folks!
 
2:58 PM
your welcome!
hehe
 
3:23 PM
@TheAnimatrix you don't yet have quite enough rep for this room room-15.github.io
@reversiblean Welcome. Please read the room rules room-15.github.io
 
3:50 PM
What is the best way to add external jars to an android studio project without actually copying lib files to the lib/ folder?
 
you can write a custom gradle task that will copy the files when needed
or use local maven repo
or use a real maven repo (this is not very hard if you use bintray.com)
I did the last way, and everything is good for now (but there are some things I don't yet understand — like, why I have to delete the version if I want to upload a newer version)
 
lololol
 
Why do you need to add an example using stringByPaddingToLength if there is an answer already showing it? — Leonardo Savio Dabus 11 mins ago
Was I right to do this?
I wanted to have a more complete answer.
 
4:09 PM
is it possible to use WebView for running some javascript without adding it to the view hierarchy?
because it would be invisible anyway and there's no point in adding it to a ViewGroup
 
I think its doable
hrrmph, perhaps not
2
Q: Can WebView be used inside a service?

AmmarI have an app that checks a specific website every one minute to see if it finds whatever I am looking for, then notifies me (Plays Sound) whenever the item is found. I followed this tut to make my app run in the background, but I noticed it complains about the WebView. http://marakana.com/forum...

5
Q: Android: Using WebView outside an Activity context

PierreI am trying to achieve Web Scraping through a background IntentService that periodically scrape a website without a view displaying on the users phone. Since I have to do call some javascript on the loaded page I cannot use any HttpGet's etc. I therefore have to use a WebView instance which c...

 
it's about contexts, not about view hierarchy
in my case, I use it inside Activity and pass the good Context in c-tor
so these 2 questions are not a problem :)
 
ahh mr anderson
 
4:27 PM
Are we in the matrix, and Carl is the "The One"?
 
what's the matrix?
 
He has been the one!
001101011101 o.o
how you doing eski
 
ugh.. firefox keeps locking up for some reason :-/
 
try a quick restart of the browser
 
yeah I did that
killall firefox
I think it was the ad-laden web page I was trying to read
everything is fine now that I've closed that one
 
4:33 PM
lol
mr fix it
 
ad-laden, the corporate stooge brother of bin laden?
 
^ possibly
 
he terrorizes the internet!
 
fge
Bean Laden?
 
4:51 PM
@reversiblean I've removed your access since you came, asked a question, and left...never to be heard from again. You can request again if you want to do more than ask a question. That's what SO is for
 
fge
OK, another "low level" question but then I am a newbie with Android; try-with-resources is implemetend since XXX 19 (for some "XXX" which I can't identify); now there is the question of Java 8 language support, and as far as lambdas are concerned, it looks to me that the ART can't do it since it doesn't seem to implement JSR 292...
This is as far as my investigation has gone so far so what are the news on both fronts (VM support, language support)?
 
not sure why you would do that instead of just using kotlin though
 
fge
Because invokedynamic exists?
But then again that's defined by the "Java VM"; as far as I know the Android VM has no support for it
And Java 8 lambdas are in fact just the compiler delegating to "indy"
 
I'm not really sure what you're trying to say
 
fge
What I'm trying to say is that the Android runtime environment has no equivalent to JSR 292
 
5:00 PM
ok?
 
fge
Therefore any "Java 8 lambda" implementation will be basically unable to harness the full power of what Java 8's lambdas are all about
UNLESS the underlying VM implements JSR 292 and a suitable translation strategy
Even though it's old, it's still relevant, but here is how "Java proper" does it: youtube.com/watch?v=C_QbkGU_lqY
 
what is the full power?
 
fge
@SargeBorsch JSR292, that is, invokedynamic
 
@eski Does Kotlin support annotation processing yet?
 
fge
It is not to say that JSR 292 is the only mechanism to do lambdas; it is just how Oracle's JVM does it
 
5:04 PM
yeah adam
 
That was the last major thing stopping people from using it yeah?
Coolio. Next project in Kotlin.
 
I think they're gonna change the annotation syntax soon though
 
gahhh what do i do
 
What if I create a View (more specifically, WebView) on another thread? Will it do everything in parallel to The Main Thread™? (I don't need to draw it, so synchronization with the main thread is not needed) Or there's no way to do this?
 
should i buy a new gaming pc or not
would come out to around 1200
which is not bad actually
 
5:14 PM
@reversiblean you've been given write access to the Android chatroom, where we sit back and chat about whatever.
 
i just dont wanna drop a bunch of bucks right now kind of
gonna be buying a new house in the coming months
 
@reversiblean you really didn't need to invite me to 2 private rooms. That's 2 too many
If you would have been patient, Mr. Anderson gave you access fairly quickly
 
posted on April 21, 2015 by Reto Meier

Posted by Leticia Lago, Google Play team For Jelly Button Games, understanding users is the key to creating and maintaining a successful game, particularly when growth relies on moving into overseas markets. The team makes extensive use of Google Analytics and Google BigQuery to analyze more than 3 billion events each month. By using this data, Jelly Button can pinpoint exactly where, when, a

 
@codeMagic no i'm just trying to send you a message
 
@reversiblean Ok, sent you one back
o/\o
 
5:25 PM
lol
 
5:54 PM
is there something similar to SynchronousQueue (docs.oracle.com/javase/7/docs/api/java/util/concurrent/…) in C#?
 
Pretty sure there is, I think I've used it before...
...or not, I actually read the description. I'm not sure, sorry.
 
looks like a quite simple thing
I'll try to use the Java's SynchronousQueue in C# then. Maybe it will work.
 

« first day (1648 days earlier)      last day (3317 days later) »