**** BEGIN LOGGING AT Thu Feb 05 02:59:59 2015 Feb 05 03:00:41 One totally different question. I have a web api where image URLs are provided in a "/item/details" end point. But, I load a list view with data from "/items" end point. I need to show image thumbnails on each list item. Basically, I need to query "/item/detail"s endpoint for every items in the list to get image URLs to use. How should I go forward for achieving something like that? Feb 05 03:02:03 each image file is two requests deep in the API Feb 05 03:10:49 That moment when I finally start using Objects correctly in my app... it's like clearing in the storm lol Feb 05 03:20:55 if I create a typeface from an asset, is that cached? Feb 05 03:21:06 or should I risk memory leak fun? Feb 05 03:22:06 SO says no. Memory chomp it is Feb 05 03:30:15 If I have a POJO, is there a best practice on binding it with a Layout? Feb 05 03:32:35 napster: heh. I've dealt with an API like that. personally: wrap the whole thing in a high level "get thumbnail" API, collapse errors as much as possible, deal with it at the list-level as if it were a single request. Feb 05 03:33:21 groxx ok :) Feb 05 03:34:24 t0astt, are you also binding those objects to views? I'm starting a new app and I wanna see if there's a better way to go about doing that now Feb 05 03:38:12 knapper_tech: most people cash them in a static hashmap.. like.. https://github.com/chrisjenx/Calligraphy/blob/master/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/TypefaceUtils.java Feb 05 03:40:43 Napalm, docs on that gist say pre-ICS Feb 05 03:40:46 does ICS cache? Feb 05 03:41:04 we're kind of getting into the golden sunset years of 2.3 stuff Feb 05 03:41:27 read the linked bug ticket https://code.google.com/p/android/issues/detail?id=9904 Feb 05 03:41:54 Afzal, not exactly. More like when my user logs in, I pull down their information from my database through my RESTful API, and then create a user object from that. That way I'm not passing around lots of strings, etc. Feb 05 03:42:22 ah okay, that makes sense Feb 05 03:42:36 Yeah. I COULD NOT believe I wasn't thinking of that before Feb 05 03:42:37 What do you do when you have to put that user object info into text views? Feb 05 03:42:41 lol Feb 05 03:42:52 t0astt: you were passing around lots of strings, sigh >_> at least you fixed that now Feb 05 03:43:05 Then I'll do something like textView.setText(user.getName); Feb 05 03:43:16 t0astt: i hope your using parcelables Feb 05 03:43:21 you write getters and setters for your class Feb 05 03:43:35 Erm, not sure Napalm. Link to jog my memory? Feb 05 03:43:40 lol Feb 05 03:43:45 your not using them if you dont know them Feb 05 03:44:05 So why would I want to use one? Feb 05 03:45:08 Ohhh Feb 05 03:45:19 Ok, so for passing an object back and forth between activities etc Feb 05 03:45:32 or anything like that Feb 05 03:45:37 No, I haven't used that yet. BUT I thank you for telling me about that, because I'll need it soon Feb 05 03:45:45 if its not totally internal in your app... then you should use them Feb 05 03:46:17 What's the difference between Serializable and Parcelable? Feb 05 03:46:34 everything Feb 05 03:46:37 mainly speed Feb 05 03:46:38 lol Feb 05 03:46:40 Ok Feb 05 03:46:43 So definitely use parcelable Feb 05 03:46:50 yus Feb 05 03:46:55 Awesome Feb 05 03:48:02 t0astt: http://www.developerphil.com/parcelable-vs-serializable/ Feb 05 03:48:06 holy crap, quite significant Feb 05 03:48:10 that should put you in the right direction Feb 05 03:48:10 just found that same link Feb 05 03:48:56 t0astt: you might find this helpful https://github.com/johncarl81/parceler Feb 05 03:49:39 just add: compile "org.parceler:parceler-api:0.2+" Feb 05 03:49:54 or exact version Feb 05 03:50:47 Should I use that though? I feel like it would be a better learning experience to write it manually Feb 05 03:50:56 Or am I just being a twat by thinking that lol Feb 05 03:51:08 t0astt: yes, i think you should do it yourself Feb 05 03:51:21 ok Feb 05 03:51:32 t0astt: when you get fed of up of lots of boiler-plate code you can use parceler Feb 05 03:51:41 t0astt: also, no idea the performance impact of parceler Feb 05 03:51:50 Yeah, I imagine there would be some hit Feb 05 03:52:01 i dont believe its much Feb 05 03:52:05 it uses code-generation Feb 05 03:54:26 lol Feb 05 03:57:25 wtf, why is Flow.get not working :s Feb 05 04:02:27 is it possible to use flow without Dagger? Feb 05 04:03:30 I'm building a login screen, how to do the session management ? Feb 05 04:22:23 Napalm, I might my hate myself for this later, but I'm just going to use parceler for now :P Feb 05 04:22:42 want a hand understanding things? Feb 05 04:24:20 Eh... I THINK I get it? Feb 05 04:24:53 ok, so whats the prob.. why go straight to Parceler Feb 05 04:25:01 I'm not sure :P Feb 05 04:25:06 Fine I'll try it without it first Feb 05 04:26:38 anyone in here done freelance app dev? Feb 05 04:27:46 weird. GoogleAnalytics.getInstance() freezes when you have a global-config metadata entry. Feb 05 04:28:09 Tricknology: once or twice Feb 05 04:28:31 Tricknology: I might do soon :) Feb 05 04:32:01 Napalm, what is the point of the "int describeContents" since it always returns 0? Or is it interpreted as a boolean and false? Feb 05 04:32:21 Do you use the app estimators or your hourly + flex room? Feb 05 04:34:26 t0astt: you probably always want to return zero. its so you can have overloaded models. Feb 05 04:35:04 t0astt: ie) a one parcelable model inherits from another Feb 05 04:37:30 I still haven't adopted my favorite scheme for long-lived objects that are tied to the application. App static instances? Non-UI frags via fragment manager? Feb 05 04:41:56 I need advice for displaying a date Feb 05 04:42:26 So right now I display it as, for example, Mon 18:30. However, what I'm doing is displaying a range, like Mon 18:30 TO Tue 18:30 Feb 05 04:42:53 I'd like to include the number of the day in the month, but I'm not sure what the best way to display that would be. Something like Mon 01, 18:30? Feb 05 04:45:43 anyone mind guiding my with this httpPost issue im having? Im porting a webpage that submits a POST through jquery with a JSON object as Data. In my android app, the same page is being used, but I need the POST to be within the app. Using a JS interface, I can pass the json object back to my app. My question is, do I need to translate each entry into a name:value pair? Or is there a way I... Feb 05 04:45:45 ...can point just at the Json object? Feb 05 04:50:22 cool i figured it out, thanks guys xD Feb 05 04:53:55 does anyone have a working example of a list using both ViewHolder and shared element transitions? Feb 05 05:01:29 Whoa, Jake doesn't like flow? Daaaamn Feb 05 05:01:38 Assigned and triaged now. Wonder how long till it's fixed: https://code.google.com/p/android/issues/detail?id=131080 Feb 05 05:02:20 I'm just gonna go the Jake way for my next app, see what I end up with Feb 05 05:02:59 What is "the Jake way"? Feb 05 05:04:04 drinfernoo: is this for your Cuber? Feb 05 05:05:22 TacticalJoke did you see the 1.1.0-rc release notes are up ? Feb 05 05:06:18 Yeah. Feb 05 05:06:37 and another AS update, pretty quick Feb 05 05:07:11 Afzal that might mean using kotlin too :D Feb 05 05:07:53 Nice. Updating AS now. Feb 05 05:08:54 g00s: Do you find it annoying that Kotlin doesn't require semicolons after statements? Feb 05 05:09:20 with a basic camera preview like this one: https://bpaste.net/show/a4a26e90e481 (found online), how much different should the resolution (px dimensions) be for the camera preview vs captured file? Would they theoretically be the exact same? Feb 05 05:09:27 <_genuser_> anyone know how to allow both landscapes but not any portraits? Like youtube full screen, where it will landscape and reverse-landscape.... Feb 05 05:09:31 TacticalJoke: I find it liberating, it’s only confusing when you go back to java Feb 05 05:09:44 TacticalJoke it will take me a while to get used too Feb 05 05:09:53 Yeah, I'm hoping I get used to it. Feb 05 05:09:58 To apparently not use fragments and apparently not flow either Feb 05 05:10:13 hello deuteros Feb 05 05:11:20 g00s: hi Feb 05 05:11:38 Afzal: My understand is that the Fragment topic is controversial. Feb 05 05:12:17 understanding* (I can't English today) Feb 05 05:12:42 i dont find them so bad heh Feb 05 05:12:52 A lot of people dislike fragments, nobody has found a better solution so far Feb 05 05:12:54 TacticalJoke yup but I think there are some merits there. I don't find them so bad myself Feb 05 05:13:04 I'm in the static singletons vs application subclass topic. Using RxJava. Not sure where I want to go here. Feb 05 05:13:34 Whatever you use, static is never the right answer Feb 05 05:13:39 haha Feb 05 05:13:44 deuteros: That's plain wrong. Feb 05 05:13:59 the discussion I was hoping for Feb 05 05:14:06 deuteros try that with regex patterns Feb 05 05:14:15 Non static patterns Feb 05 05:14:17 Show me a solution with a static, I’ll show you a superior solution not using static with clearly delineated life cycles using dependency injection Feb 05 05:14:31 And then compile them over and over Feb 05 05:15:04 Dependency injection, another controversial topic Feb 05 05:15:19 Compile time i hope Feb 05 05:15:24 Okay Feb 05 05:15:36 I don't even understand dependency injection Feb 05 05:15:45 which go-to solution for global things introduces less time investment overhead up front and has proponents not considered PHP noobs? Feb 05 05:15:49 DI is not really controversial on Android nor in Java Feb 05 05:15:55 DI is Feb 05 05:15:59 In Scala, a little bit, but it’s because most Scala devs don’t understand DI :) Feb 05 05:16:29 I wonder what's new in AS 1.1 Beta 4. Feb 05 05:16:33 Yeah, those FP programmers just don't grock it.. Feb 05 05:16:45 Application subclass? Feb 05 05:17:02 Am I safe from investing myself in a long hard road back from hell? Feb 05 05:18:14 Anyway, application subclass? How's that any better than singleton? Feb 05 05:18:28 lifecycle at least is defined somewhere Feb 05 05:18:32 You still keep one object for the life of the application Feb 05 05:18:53 hrmmmm... in the case of an HttpClient I guess this is good? Feb 05 05:20:26 I might just use some Rx magic to ensure that if -nobody- is using the global resource anymore (all fragments and views unsubscribed from result) then cleanup happens Feb 05 05:20:51 kind of default in how subscription creates references but I'm not clear on subtleties that will develop Feb 05 05:20:53 yet Feb 05 05:20:57 knapper_tech just use retrofit and don't worry about it 😀 Feb 05 05:21:22 what if I'm just hitting crappy URL's that don't have good RESTful endpoints? Feb 05 05:22:17 You can use the Response object Feb 05 05:24:22 Has anyone seen the latest Google Hangouts app? How/what do you call the interface where they extend the actionbar/toolbar to have two/three tabs built into it so that you can swipe between different screens? Feb 05 05:24:29 So say there's a list of objects. Should I use a custom view to avoid looping though the list and calling setText or whatever in my adapter? Feb 05 05:24:54 t0astt view pager indicator Feb 05 05:26:12 Perfect, thanks Afzal! Feb 05 05:26:29 t0astt extended height toolbar ? Feb 05 05:26:52 g00s: I think it would be a combination of the view pager indicator and the extended height toolbar Feb 05 05:28:00 But ViewPagerIndicator library hasn't been updated in 2 years so maybe there's a better alternative library, i think it's relatively easy to churn out your own implementation though Feb 05 05:28:53 Fragment communication where fragments lifecycles don't match... Here comes my Application subclass.. Feb 05 05:30:26 May you learn more from each experiment Feb 05 05:33:13 This is awesome: http://www.reddit.com/r/shittyideas/top/ Feb 05 05:33:16 That's a given Feb 05 05:38:34 I'm building a login screen, how to do the session management ? Feb 05 05:39:31 shmoon_ do you mean like cookies or a token? Feb 05 05:39:56 sort of like cookies, I think cookies contain token right? Feb 05 05:40:15 basically what happens in any app, you login once and you're logged in Feb 05 05:42:05 g00s, Afzal: This is what I'm trying to do (with the tabs): http://www.google.com/design/spec/components/tabs.html#tabs-usage I've extended my toolbar height and now I'm going to put the view pager indicator on here using Jake Wharton's library Feb 05 05:42:49 shmoon_: You're asking a question whose answer depends entirely on specific details, and you're giving no details. Come on now. Feb 05 05:43:07 shmoon_ there's a lot that goes on in that login screen. If the servers use oauth, you store the token somewhere and use that for all future requests Feb 05 05:44:12 its basically like, i have a login screen which accepts name and phone number. phone number is verified through sms (that is done) and then the user logs in. now the next time he comes to the app he shouldn't have to go through the same login porocess again, so this will require session management and I'l need to store a unique token somewhere like in shared preferences. Feb 05 05:44:36 now its a lengthy process, what is recommended is my first uestion, like how to do it ? and the second questin is are there libraries making this task super simple both on android and server side? Feb 05 05:45:39 Going to use this library, actually. It's updated for material design. https://github.com/jpardogo/PagerSlidingTabStrip Feb 05 05:47:05 shmoon_ I recommend either Android async http library or ion Feb 05 05:47:32 with a basic camera preview like this one: https://bpaste.net/show/a4a26e90e481 (found online), how much different should the resolution (px dimensions) be for the camera preview vs captured file? Would they theoretically be the exact same? Feb 05 05:47:48 i keep getting this in chrome on my N7 : Too many processes: waiting 10 seconds to try again Feb 05 05:47:54 But that's if you're using cookies Feb 05 05:48:37 If it's your own server implementation, it would be ideal to use oauth but you'll have to read up a fair bit on how it works Feb 05 05:49:12 You can store the token encrypted in shared preferences or use authenticator Feb 05 05:49:19 hm yah reading up on oatuh could take quite a bit of time Feb 05 05:49:24 I don't like authenticator that much Feb 05 05:49:47 what is authenticator? Feb 05 05:50:21 <_genuser_> somethign that .... authenticates. Feb 05 05:50:42 oh yeah, I was wondering if its some class/lib Feb 05 05:51:01 <_genuser_> sorry, I only had a wisecrack because I don't really know authenticator. :) Feb 05 05:51:15 shmoon_ this https://udinic.wordpress.com/2013/04/24/write-your-own-android-authenticator/ Feb 05 05:52:02 ok that settings screen thing Feb 05 05:52:10 no thats also too much imho Feb 05 05:52:45 If I want to make an app that will allow users to send messages to each other for already present social network, what should I learn? Feb 05 05:53:38 demahum that social network's api first of all Feb 05 05:53:49 <_genuser_> demahum: if that network has APIs, look into what they allow you to do. Feb 05 05:54:02 Afzal: They don't have API. Feb 05 05:54:08 Which network is it? Feb 05 05:54:19 <_genuser_> next, just basic UI design, activity lifecycle, activity to activity communication via intents. and you should be close to done. Feb 05 05:54:36 TacticalJoke: http://www.ummaland.com/ Feb 05 05:54:53 _genuser_ ain't that a shower thought lol Feb 05 05:55:28 <_genuser_> Afzal: hmmm, now what's a "shower thought"...? Feb 05 05:55:38 It's an amateur social network. I know everything about design, that's clear to me. Only thing I'm interested in is what should I learn to be able to allow user to communicate through this app. Feb 05 05:55:50 I mean, only feature I'm interested in is sending messages. Feb 05 05:55:56 _genuser_: you probably don't read reddit :) Feb 05 05:56:16 It's not even a chat, not instant messages, they have messages like e-mail. Feb 05 05:56:22 <_genuser_> deuteros__: no, I don't. but don't worry, I waste enough time on youtube, etc. Feb 05 05:56:38 _genuser_ usually, in the shower, the brain simplifies problems so much that they seem super easy until you actually sit down to implement it :) Feb 05 05:56:40 reddit makes you dumb more slowly than youtube, I recommend it Feb 05 05:56:51 So I want to, when user sends message through the app, to be able to see it on website at the same time. Feb 05 05:56:57 So what should I learn for that? Feb 05 05:57:02 Anyhoo: http://www.reddit.com/r/showerthoughts Feb 05 05:57:06 As I said, they don't have API. Feb 05 05:57:19 <_genuser_> Afzal: ah, I see it. I figure if I mention the overview, the actual digging will either make him identify things he has to learn or make him lose him mind, lol. Feb 05 05:57:29 demahum see what requests the website posts when you send a message through the web Feb 05 05:57:34 Mimic that in your app Feb 05 05:58:06 <_genuser_> deuteros__: I see, might read up on these. :) Feb 05 05:58:16 Hopefully the website uses Ajax and hence has some undocumented API Feb 05 05:58:41 Afzal: You suppose, or you say it's fact? :D Feb 05 05:58:42 Personally, I have done some of my best work in the shower Feb 05 05:59:00 demahum which part? Feb 05 05:59:12 Afzal: That they use Ajax... Feb 05 05:59:25 That's for you to discover. Feb 05 05:59:42 Afzal: Good. Thanks for help. :) Feb 05 06:00:25 God, it's refreshing when stuff is actually documented. Feb 05 06:00:36 deuteros sometime it works really well, especially for high level stuff Feb 05 06:00:53 TacticalJoke where? Where? Feb 05 06:01:40 This is in the reddit API. When downloading the subscribed subreddits for a user, the most you can ask for at a time is 100. To my surprise, they actually documented this. Feb 05 06:02:09 subscribing to 100+ subreddits sounds crazy Feb 05 06:03:53 nice, github's api on the other hand is a convoluted mess Feb 05 06:04:24 That is, when you see the response json for almost every request Feb 05 06:04:28 I'm subscribed to 79. Feb 05 06:04:52 Afzal: Is the JSON huge? With reddit it is. Feb 05 06:04:54 I have 30-40. I guess 100 isn't that crazy Feb 05 06:05:20 TacticalJoke humongous. I guess that's just how they're doing it nowadays? Feb 05 06:05:54 they call that paging in API parlance. most of the ones I've seen do that in some form Feb 05 06:06:05 This https://developer.github.com/v3/pulls/#get-a-single-pull-request Feb 05 06:06:43 This is the front page of reddit right now (25 posts): http://pastebin.com/mUECafae Feb 05 06:07:10 does "distinguished" mean moderator? Feb 05 06:07:45 actually I'd guess that means promoted Feb 05 06:07:45 Yeah. (I had to google.) Feb 05 06:07:50 http://www.reddit.com/r/redditdev/comments/19ak1b/api_change_distinguished_is_now_available_in_the/ Feb 05 06:08:26 ah Feb 05 06:08:29 Man, we need a way to tell the server which fields to send Feb 05 06:08:42 To minimize data transmission Feb 05 06:08:45 Afzal: Are you working on a GitHub client? Feb 05 06:10:01 So I'm following this tutorial right now (http://developer.android.com/training/animation/screen-slide.html) for implementing a ViewPager. Right now in my app I have a sliding drawer that allows a user to pick sections of the app to go to, and each section is a fragment. From what I'm reading in this tutorial, I'm going to need to convert the fragment I want to implement the viewpager on to an activity, is that correct? Feb 05 06:10:04 TacticalJoke I am in my spare time Feb 05 06:10:32 I'm streaming the reddit JSON with Jackson. Really fast and memory-light. Feb 05 06:11:01 (Only jackson-core is needed.) Feb 05 06:11:18 t0astt clarify "convert the fragment I want to implement the viewpager on to an activity" Feb 05 06:11:32 Levite: Basically just use an activity instead of a fragment. Feb 05 06:11:36 Does Android always use the same classloader for an application's lifecycle? Feb 05 06:11:37 Not actually "converting" it Feb 05 06:12:04 From my understanding, I'll have an activity that uses a ViewPager. That ViewPager will allow me to swipe between different fragments. Feb 05 06:12:08 I mean, an activity should be hosting the viewpager, but the fragments should be self contained Feb 05 06:12:15 right Feb 05 06:12:18 OK Feb 05 06:12:21 Thanks Feb 05 06:12:24 TacticalJoke I'm using retrofit for now. Not gonna worry about speed until the API implementation is nearly done. Or can you use it with retrofit? Feb 05 06:12:26 Just wanted to make sure I was on the right track Feb 05 06:12:31 for the most part ViewPager takes care of all the details, just tell it what fragments to instantiate Feb 05 06:12:37 sweet Feb 05 06:13:03 Oh. Not sure. Feb 05 06:13:22 And using an Activity instead of a fragment won't mess up my navigation drawer, either? Feb 05 06:13:35 Because the navigation drawer has to persist across every part of the app Feb 05 06:13:52 shared preferences saving/retrieving is on main thread right ? Feb 05 06:13:58 or does it happen asynchronously behind the scenes Feb 05 06:13:59 I'm afraid I'm not familiar with navigation drawers, for philosophical reasons Feb 05 06:14:29 but generally fragments are just mini activities Feb 05 06:14:36 Haha alright. I'll figure it out tomorrow then. I'm going to bed (damn 8:30AM math classes >.>) Feb 05 06:15:22 TacticalJoke I'm separating the API stuff into a library so hopefully I won't have to deal with Android if I refactor later Feb 05 06:16:45 t0astt does your navigation drawer need to persist throughout the app, or does it just need to be present in each activity? Feb 05 06:17:27 Cause you can define a base activity for the later and extend all activities from it Feb 05 06:18:35 Latter* Feb 05 06:20:03 Afzal it needs to be present in each activity Feb 05 06:20:08 So right now I have a MainActivity Feb 05 06:20:08 Anyway I'm heading to bed too, have fun people Feb 05 06:20:20 and those navigation drawer items swap fragments into the main container Feb 05 06:21:07 Oh okay, then you've pretty much figured it out Feb 05 06:21:12 Yeah Feb 05 06:21:25 But for that one instance where I need the viewpager, that'll have to be an activity instead of a fragment Feb 05 06:21:26 but yeah Feb 05 06:22:37 Right so you want to put the navigation drawer initialization in a base class and change it's behavior in child classes if you want Feb 05 06:22:43 yep Feb 05 06:23:01 I'll let you get to bed lol. Feb 05 06:23:07 I'm sure I'll see you around tomorrow or some other time Feb 05 06:23:34 let him go to sleep, he needs to learn calculus or whatever Feb 05 06:23:38 Lol probably, not much work going on these days Feb 05 06:23:46 discrete mathematics Feb 05 06:23:55 learning djikstras algorithm right now :P Feb 05 06:23:57 integramals Feb 05 06:23:59 transport networks and shtuff Feb 05 06:24:03 ah :) Feb 05 06:24:15 Lol I haven't had the need to learn calculus since 1st year Feb 05 06:24:22 you don't want to tell me you know this stuff otherwise I might be coming to you guys for help haha Feb 05 06:24:48 .... forgot right after the 3rd year exam Feb 05 06:24:56 :) Feb 05 06:27:26 That's a mistake, calculus (and a lot of other math topics) are extremely useful on a daily basis in the life of a developer Feb 05 06:28:03 I agree, as abstract as it may seem, calculus is really helpful in daily life Feb 05 06:28:04 hm, if i use the kotlin gradle plugin i think i'm forced to separate the kotlin and java files Feb 05 06:28:20 maybe intellij lets you mix them Feb 05 06:28:42 Integrating numbers helps one integrate other things Feb 05 06:35:58 i was sad to read Stewart died a few months ago Feb 05 06:36:42 James Stewart, who wrote that popular calc text Feb 05 06:37:52 For a second, I was worried about the Daily Show Feb 05 06:38:14 heh, i love that too :) Feb 05 06:39:22 man the rx call stack ... is deep Feb 05 06:39:35 hope some crappy phone doesn't blow up because of it Feb 05 06:40:43 i keep wanting to use the .cache() operator but with only the last item emitted. i wonder if i'm just doing things wrong Feb 05 06:56:33 I hate when I can't decide on naming. Feb 05 06:56:38 Naming is such a big deal. Feb 05 06:58:27 it sucks when you are in the kingdom of the nouns, but your concepts are verbs :) Feb 05 06:59:29 TacticalJoke just use single letter names, starting at a. if you run out doube up aa, ab. then you don't even need to use proguard, #yolo Feb 05 07:00:51 yes names are very important Feb 05 07:01:49 using the mot juste means you're thinking clearly Feb 05 07:02:43 being able to name things is one of the greatest gift of the developer. like the biblical adam Feb 05 07:02:49 Yeah. Struggling with naming usually means I don't understand what's going on well enough. Feb 05 07:03:34 * g00s gives TacticalJoke a few mots Feb 05 07:05:12 I'd love to see an app like this: http://www.reddit.com/r/shittyideas/comments/2buy55/a_russian_roulette_app_for_your_phone_that_when/ Feb 05 07:06:13 thepoosh: Do you know about /r/shittyideas? Feb 05 07:06:27 no but I know about r/shittyProgramming Feb 05 07:06:34 I just linked this: http://www.reddit.com/r/shittyideas/comments/2buy55/a_russian_roulette_app_for_your_phone_that_when/ Feb 05 07:06:38 I think that'd be awesome. Feb 05 07:06:51 do you know about this: http://codereddit.com/ Feb 05 07:07:23 TacticalJoke: LOLLL Feb 05 07:07:27 I'll program that!! Feb 05 07:07:54 haha Feb 05 07:08:09 That site is kinda clever. Should support collapsing, though. Feb 05 07:08:19 (For comments.) Feb 05 07:08:30 Then again, that'd break the metaphor. Feb 05 07:08:37 yes Feb 05 07:08:39 i liked it Feb 05 07:09:13 if you click on the value of the "language" variable, it switches the programming language Feb 05 07:09:31 Oh, nice. Feb 05 07:09:37 it's cute Feb 05 07:09:42 but no java Feb 05 07:10:55 "Cute" and "no Java" go well together. Feb 05 07:18:12 lemonxah convert all your scala to kotlin yet ? :P Feb 05 07:18:48 XML is not a language! Feb 05 07:19:22 yes Feb 05 07:19:24 and Java is not OO Feb 05 07:19:25 also good morning Feb 05 07:19:38 hey lemonxah Napalm Feb 05 07:19:39 lol xml is not a langauge? Feb 05 07:19:45 its markup Feb 05 07:19:50 markup language Feb 05 07:19:51 It's a markup language. :D Feb 05 07:20:03 denied Feb 05 07:20:14 what is the deffinition of language? Feb 05 07:20:55 "a system of communication" fromt he interwebs Feb 05 07:21:12 http://en.wikipedia.org/wiki/Programming_language Feb 05 07:21:22 Napalm: XML IS a language Feb 05 07:21:23 They’re all languages. There are just a lot of different languages, programming, markul, natural, etc... Feb 05 07:21:25 HTML is not Feb 05 07:21:31 i know Feb 05 07:21:33 markup languages cant, on their own, do anything special but they are a way of communicating some sort of information Feb 05 07:21:35 xml is a programming language Feb 05 07:21:52 same goes for HTML its a language just not used for programming Feb 05 07:21:59 in soviet russian programming language xmls you! Feb 05 07:22:01 well i guess you can call it programming a browser Feb 05 07:22:13 "Markup languages like XML, HTML or troff, which define structured data, are not usually considered programming languages." Feb 05 07:22:14 hahah Feb 05 07:22:19 from Wikipedia Feb 05 07:22:22 it must be true Feb 05 07:22:22 yes Feb 05 07:22:22 :D Feb 05 07:22:23 lol Feb 05 07:22:36 but you never said it wasn't a PROGRAMMING language :) just that its not a language Feb 05 07:22:44 lemonxah you know scala fairly well, if i recall - you are happy with the expressiveness of kotlin ? Feb 05 07:22:45 so i took the challenge Feb 05 07:22:54 is CSS a language? Feb 05 07:22:59 thepoosh: you mean XSLT is a programming language.. i'll give you that Feb 05 07:23:00 It's a style-sheet language. Feb 05 07:23:12 g00s, i dont yet know how kotlin will do monads but other than that it looks good Feb 05 07:23:32 Maybe we should make a pact: we all switch to Kotlin. Feb 05 07:23:34 its got a smaller footprint in both method count and size Feb 05 07:23:38 Then we either fail together or succeed together. Feb 05 07:23:55 TacticalJoke: f you and die. Feb 05 07:23:56 :D Feb 05 07:23:59 If we fail together, at least we have company. Feb 05 07:24:02 i am switching to kotlin and i refuse to fail Feb 05 07:24:04 :) Feb 05 07:24:05 lemonxah aren't rx Observables monads ? Feb 05 07:24:39 g00s: you really getting into this Kotlin thing?.. ive still not even read up about it Feb 05 07:24:41 it is a type of monad Feb 05 07:25:01 ah k Feb 05 07:25:01 like int is a data type Feb 05 07:25:04 if that makes sense Feb 05 07:25:07 yup Feb 05 07:25:26 Napalm yeah sure, i want my tools to make me badass. i can't be badass with the shit i have now Feb 05 07:25:51 lemonxah: does Kotlin differentiate between Scalar and non-Scalar types? Feb 05 07:25:54 g00s then yes do kotlin its better than java and compile time is way faster than scala Feb 05 07:25:59 g00s: Exactly. I want the best of the best. Feb 05 07:26:04 lol Feb 05 07:26:14 Napalm, not sure i have only started doing kotlin 2 days ago Feb 05 07:26:28 switching from scala/java to kotlin Feb 05 07:26:51 For example, I love Mercurial, but I'd switch in a heartbeat if something better came alone. Feb 05 07:26:52 along* Feb 05 07:27:00 I'd be a terrible religious person. Feb 05 07:27:07 TacticalJoke: something already did, it’s called git. Look it up Feb 05 07:27:14 Git is a less-good Mercurial. Feb 05 07:27:23 there are 3 kinds of people in life, true believers, skeptics, and true believers ;) Feb 05 07:27:23 idk Feb 05 07:27:28 oops Feb 05 07:27:29 i like my terminal git Feb 05 07:27:37 true believers, skeptics, and pragmatists Feb 05 07:27:55 i lolled :P, "Git is MacGyver and Mercurial is James Bond" Feb 05 07:28:14 Mercurial lost the war a while ago, not sure why so many people still stick with it Feb 05 07:28:14 MacGyver was way cooler Feb 05 07:28:21 heh Feb 05 07:28:22 then again… COBOL is still around Feb 05 07:28:34 my first job was COBOL :/ Feb 05 07:28:38 * lemonxah shivers Feb 05 07:28:40 deuteros don Feb 05 07:28:44 Git is more popular than Mercurial by accident. Feb 05 07:28:45 don't get TacticalJoke started on hg Feb 05 07:28:52 nooooooo lol Feb 05 07:28:54 * Napalm jumps under the desk and hides from the thought of COBOL Feb 05 07:29:01 The fact that something is more popular says little or nothing about its quality. Feb 05 07:29:17 True. Git is both more popular and better than Mercurial. There Feb 05 07:29:28 Napalm RxCOBOL ! Feb 05 07:29:33 I bet you don't know much about Mercurial. Feb 05 07:29:38 anyway i am stuck in java for this project .. and for the life of me i cant figure out how to get the type of List Feb 05 07:29:41 omg noah! Feb 05 07:29:41 the class type Feb 05 07:29:51 Around 100% of the people who've told me how much Git is better than Mercurial can't answer basic questions about Mercurial. Feb 05 07:30:02 TacticalJoke: you lose the bet. What’s your next move? Feb 05 07:30:04 lemonxah i think its because generics are a compile time construct Feb 05 07:30:16 who here actually likes Lisp? Feb 05 07:30:22 i did Feb 05 07:30:34 Used to write a lot of lisp, back when I didn’t know better. I was young, I was experimenting. Feb 05 07:30:41 * Napalm loads his shotgun Feb 05 07:30:46 g00s, yeah but you can say SomePType.Class Feb 05 07:30:47 :) Feb 05 07:30:53 haven't used it in a while, for practical reasons. the lisp compilers were either expensive or buggs - and to get something useable you needed nonstandard extensions Feb 05 07:30:54 g00s: Did you see that Jon Skeet uses Eclipse? Feb 05 07:30:58 i want to be able to do List.class too Feb 05 07:31:05 TacticalJoke yeah Feb 05 07:31:13 also about cobol .. There actually is COBOL in .NET Feb 05 07:31:19 deuteros: i forgive you :D Feb 05 07:31:34 anyone have any ideas on getting shared element transitions working on a grid view? Feb 05 07:31:39 g00s: man you have just gone down a notch Feb 05 07:32:01 lemonxah: Chances are very good that you don’t really need to know the type of List. Explain your problem Feb 05 07:32:03 Napalm why lisp ? Feb 05 07:32:09 im kidding Feb 05 07:32:19 its awesome language for genetic programming Feb 05 07:32:24 gson type adapter Feb 05 07:32:36 i think sleep deprivation has me in its evil clutches Feb 05 07:32:37 deuteros: Can you summarise changeset evolution in a sentence? Feb 05 07:32:52 Hoping you're not googling. Feb 05 07:32:54 lemonxah: You have the list, you can inspect its elements if you want to find out their types Feb 05 07:32:59 <-- still early in the morning here Feb 05 07:33:10 TacticalJoke: Doesn’t matter, whatever I answer, you will say I googled Feb 05 07:33:13 2:30am, early in the morning here too :D Feb 05 07:33:14 i wanted to make something stupid Feb 05 07:33:16 Go ahead. Feb 05 07:33:23 Summarise it. Feb 05 07:33:25 second look cleared me up and i am a bit more away Feb 05 07:33:27 awake even Feb 05 07:33:33 its 7:30am here Feb 05 07:33:44 Napalm but ... just getting up or going to sleep ? Feb 05 07:33:56 not quite sure Feb 05 07:33:58 :S Feb 05 07:33:59 heh Feb 05 07:34:28 oh .. hmm Feb 05 07:34:37 “Explain to me why you need reifiication and I’ll show you how you can do without" Feb 05 07:34:39 so i want to register a type on the GsonBuilder Feb 05 07:34:48 the Gson TypeAdapter i made is Feb 05 07:34:56 List Feb 05 07:35:01 deuteros: If you can't summarise it, you don't know much about Mercurial. Feb 05 07:35:03 passing in my type in there is easy Feb 05 07:35:17 man, sometimes i just want duck typing. just ... a few places ;) Feb 05 07:35:21 When it's released, it'll be perhaps the most important Mercurial feature. Feb 05 07:35:22 but registering the type adapter is not cause it will return a list of T Feb 05 07:35:30 so how do i register that type? Feb 05 07:35:32 lemonxah: did you even read the docs? Feb 05 07:35:51 Or at least the biggest difference between Mercurial and whatever else. Feb 05 07:36:00 i dont wanna :/ cant make me .. heh Feb 05 07:36:03 lemonxah: https://sites.google.com/site/gson/gson-user-guide#TOC-Serializing-and-Deserializing-Generic-Types new TypeToken>() {}.getType() Feb 05 07:36:12 lemonxah: new TypeToken>() {}.getType() Feb 05 07:36:15 LoL : http://developer.android.com/reference/android/content/Intent.html#ACTION_DREAMING_STARTED Feb 05 07:36:17 thnx :) Feb 05 07:36:25 what's changeset evolution? Feb 05 07:36:28 It tells you when it "started dreaming" and when it stopped too :P Feb 05 07:36:33 i will go read them now just didn't know how to get that type in java Feb 05 07:36:33 TacticalJoke: you realize this line of reasoning is nonsensical, right? “If you can’t explain how this inferior technology works, then it means it’s superior" Feb 05 07:36:41 deuteros: Straw man. Feb 05 07:37:42 Hi, first time app publisher here, what do i need to do when i release an app? Feb 05 07:37:55 there is a checklist Feb 05 07:38:24 i have to say i dont like java generics Feb 05 07:38:29 http://developer.android.com/distribute/tools/launch-checklist.html this one? Feb 05 07:38:32 the syntax Feb 05 07:38:43 jutsi: yes Feb 05 07:38:48 cause if you need the type of the generic you still have to pass that in even though you have allready specified it? Feb 05 07:38:58 jutsi: I assume you have a play developer account? Feb 05 07:39:07 new ListTypeAdapter(TenderType.class, "elements") Feb 05 07:39:11 blegh :/ Feb 05 07:39:12 Napalm, yes bought it yesterday Feb 05 07:39:47 jutsi don't use your personal google account for apps Feb 05 07:39:58 just so you know ;) Feb 05 07:40:04 oh why not g00s :( Feb 05 07:40:09 lol Feb 05 07:40:16 google doesn't recommend it Feb 05 07:40:19 g00s how come ? Feb 05 07:40:22 * Napalm watches lemeonxah's account get axed Feb 05 07:40:24 or rather how come not? Feb 05 07:40:36 jutsi: your account might be closed Feb 05 07:40:42 read the terms Feb 05 07:40:43 yeah in case the account gets shut down, you don't lose all your personal stuff Feb 05 07:40:49 jutsi: you probably want to read this http://developer.android.com/tools/publishing/publishing_overview.html Feb 05 07:41:00 Napalm reading it atm :) Feb 05 07:41:08 But yeah we made a company account Feb 05 07:41:10 jutsi: the entire section, like prep, version, sign Feb 05 07:41:27 sign = the keystore thingie, right? Feb 05 07:41:33 oh dear Feb 05 07:41:34 yes Feb 05 07:41:40 thingie Feb 05 07:41:40 lol Feb 05 07:41:56 jutsi http://android-developers.blogspot.com/2013/06/google-play-developer-8-step-checkup.html Feb 05 07:41:56 jutsi: never forget your keystore password or loose it Feb 05 07:42:08 loose the keystore file that is Feb 05 07:42:09 #1, second bullet Feb 05 07:42:09 Well i have co-published an app before and i made the keystore for it, but i wasn't involved any further in the publishing process Feb 05 07:42:11 back that shit up Feb 05 07:42:34 Napalm how so? Feb 05 07:42:42 how so what? Feb 05 07:43:23 The keystore pw Feb 05 07:43:41 because you wont be able to release another version of your app without it. Feb 05 07:43:41 "2. Protect your keystore" Feb 05 07:43:45 :D Feb 05 07:44:18 ah right, still reading the other one :) Feb 05 07:44:30 Also, don’t check it in git, obviously Feb 05 07:44:36 you have some reading to do ... toodles ! Feb 05 07:45:38 Seems so.. May i ask how long does it take for the app to actually become published after i upload & publish it? Feb 05 07:45:59 ah, nice .. import bar.Bar as bBar // bBar stands for 'bar.Bar' Feb 05 07:46:59 "Since packages really nest in Kotlin" .. hmm. would have bee nice for more info Feb 05 07:47:09 the website is kinda sketchy Feb 05 07:48:55 Chat Haase always makes me laugh and my sides split.. http://www.devoxx.com/display/DV12/The+Future+of+Software+Development+Process+Methodology+Effectiveness+%28Part+1+2%29 Feb 05 07:54:09 "Twitter Reaches Deal to Show Tweets in Google Search Results" ugh, noooo Feb 05 07:55:39 that would be an awful lot of tweets per result Feb 05 07:56:04 Surely it would only be for news queries or moneymaking queries Feb 05 07:57:12 or celeb queries Feb 05 07:57:25 hi Feb 05 07:58:03 Could be handy for news stuff, I guess. Feb 05 07:58:22 oh well, duckduckgo works for me but sometimes i forget and type into chrome's url bar Feb 05 07:58:33 i am in android studio and it keeps telling me an error Make file error Feb 05 07:58:50 no rule to make target Feb 05 08:02:15 linuxuz3r: Need more info to help. Feb 05 08:05:18 mmmmmm recursively writing mistakes in ever nested lambas while the compile keeps telling me I need to just keep writing more functions until the return type gets correct Feb 05 08:05:50 flatmap your way to glory ! Feb 05 08:07:34 when using flatmap to wrap async, I'm just giong to return a new observable that I've called subscribeOn(Schedulers.newThread()) on correct? Feb 05 08:08:23 And..the body of Observable.create does not seem to be lambda-izeable or I'm missing something about potential behavior Feb 05 08:09:23 eg can't just write (Observer o) -> {o.onNext()} and expect it to match the expected onSubscribe method.. Feb 05 08:10:39 knapper_tech the new observable doesn't have to be decorared with a new scheduler Feb 05 08:10:58 Observable.create ( subscriber -> { } ) Feb 05 08:11:33 g00s, because the subscriber can choose to schedule before subscribing? Feb 05 08:15:59 Found and I feel it's usage is pretty interesting Feb 05 08:16:22 Mainly in cases where I would want to make the actual activity that gets launched from the launcher, transparent Feb 05 08:21:43 Damn. I got it to compile. Very mind-bending syntax even though it is shorter. Feb 05 08:22:09 What does specifying Foo anything that extends Bar Feb 05 08:23:30 hello everyone. Feb 05 08:23:39 hi Feb 05 08:23:47 ...wtf does Subscriber mean? Feb 05 08:24:06 How does this type....type? Feb 05 08:24:08 first time used this irc thing Feb 05 08:24:31 spiderman__, you should believe that it's not butter, because it's not. Feb 05 08:24:49 Napalm: that's not correct, Foo is anything that is a supertype of Bar, Foo is anything that extends Bar Feb 05 08:25:05 nice that kotlin seems to get around the whole wildcards in generics thing Feb 05 08:25:12 i hated that shit Feb 05 08:25:17 So my subscriber extends ....String? what? Feb 05 08:25:22 hi ! Feb 05 08:26:00 f2prateek: correcto mundo. my bad Feb 05 08:26:18 im having an argument with my boss, he wants (forces) me to use xamarin to develop for android in c# because with xamarin you can make cross platform apps so one code for both ios and android. But i want to use java Feb 05 08:26:22 +1 f2prateek , thanks! Feb 05 08:26:24 knapper_tech: where can I find the irc howto manual, or any help? Feb 05 08:26:33 how do i get him to listen and change to java ? annyone got good ideas ? Feb 05 08:26:34 delano, use java Feb 05 08:26:45 and get filed Feb 05 08:26:48 *fired Feb 05 08:26:50 or anything which is not cross compiled and support native Feb 05 08:26:51 lol Feb 05 08:26:51 spiderman__, looks good. just use /help and then internet Feb 05 08:26:59 thanks Feb 05 08:27:16 knapper_tech: your subscriber can receive events that are a supertype of String Feb 05 08:27:31 delano writing cross platform apps has economic considerations. he might be right Feb 05 08:27:31 haha its my internship if i fail this my degree goes out the window Feb 05 08:27:40 delano, when the app becomes large and wants to go deeper to support many other feature etc, you may find java more suitable Feb 05 08:28:23 f2prateek, I kind of want to vomit at what this means. the things my observer is allowed to emit are some super type of string and the subscriber can consume them. ..I might have to write out the long versions a few times until I get the type signatures Feb 05 08:29:09 I think I get it, but it's so implicit as to vanish into inferences Feb 05 08:29:27 knapper_tech from effective java 2e "“For maximum flexibility, use wildcard types on input parameters that represent producers or consumers”" Feb 05 08:29:38 knapper_tech: you don't strictly need it, but can't say much without seeing it in context Feb 05 08:30:19 where is the make file for android ndk sample Feb 05 08:30:20 g00s: that's for APIs, doesn't matter as much for your own code Feb 05 08:30:23 I need a cigarette Feb 05 08:30:43 knapper_tech is using rxjava so that may explain why they did that Feb 05 08:30:47 I've just never seen that sig in Java. Might be new to me. Feb 05 08:31:32 right, and if you're interested in super types of String, then Subscriber is perfectly fine Feb 05 08:32:10 I built an hello world c program with static link option —static, and it can run well on my android phone. but if I remove the —static option, and it can not run. why? Feb 05 08:34:01 I googled it online, someone said it was caused by wrong linker, and I change the linker via —dynamic-linker=/system/bin/linker, still not work. Feb 05 08:36:28 I just compiled and ran. Behaved exactly as I expected. Still need a cigarette. Feb 05 08:36:41 That is very f*#&ing cool Feb 05 08:39:40 spiderman__, stacic might also be building in libs no available on Android Feb 05 08:40:12 spiderman__ are you using the NDK, or normal gcc? which android version are you building for, and which android version are you testing on? Feb 05 08:41:22 not using NDK, I used the linaro-gcc-4.8, testing on android4.4.4 Feb 05 08:42:24 spiderman__ not using the NDK is not supported :) Feb 05 08:43:34 I don’t have NDK environment for my phone. Feb 05 08:46:07 I downloaded the android source code from google, can I use the NDK in it? Feb 05 08:46:49 huh Feb 05 08:48:03 spiderman__: you dont need the android source code to use the NDK Feb 05 08:48:27 spiderman__: https://developer.android.com/tools/sdk/ndk/ Feb 05 08:48:39 thanks, Feb 05 08:51:56 Yello, does anyone know what could be causing push notifications not to appear on my device? My code to send the push notification returns a positive result, I can register my device on my app to get the registrationID Feb 05 08:52:03 but the push notifications I send never appera on my device Feb 05 08:58:31 https://www.youtube.com/watch?v=8IzRmoMJ5jQ "Best Practices for Software Development w/ Chet Haase from Big Android BBQ 5 (2014)" Feb 05 08:58:35 :) Feb 05 08:59:07 anyone who knows where my problem could lie? Feb 05 08:59:10 i watched a few minutes but didn't find it too funny, i think he was trying too hard Feb 05 08:59:15 can't seem to find ANYTHINGG that's wrong with my setup atm :/ Feb 05 08:59:23 even worse, some dipshit in the back was laughing at every word Feb 05 08:59:38 my app properly detects the device and gets the regID, my code returns no errors, I'm using all the correct keys according to every guide I can find Feb 05 08:59:41 maybe its some setting I'm missing? Feb 05 09:00:02 do I perhaps need to escape the keys in the push code? Feb 05 09:11:51 no one who knows where the fault my most likely be? :/ Feb 05 09:16:36 yodaym ! Feb 05 09:24:08 yodaym Feb 05 09:35:42 Is there any way to verify that a push notiifcation has reached GCM? Feb 05 09:35:49 from my server to GCM? Feb 05 09:36:18 Bantalon, GCM returns a status message Feb 05 09:36:35 telling you if everything was ok. Feb 05 09:37:01 i'm using cURL to fire a request to 'https://android.googleapis.com/gcm/send' Feb 05 09:37:08 all I can retrieve atm is if the request was successful or not on the server Feb 05 09:37:19 is it possible to check perhaps in the console or somewhere that a notification reached gcm though? Feb 05 09:37:59 Hey folks Feb 05 09:39:09 Bantalon, the gcm server returns a json on every request that tells exactly whats going on. i.e it tells you if the request was successful, or what error occured Feb 05 09:39:28 danijoo: i see Feb 05 09:40:14 ohhhhh neat Feb 05 09:40:22 I was only checking if a result was returned in my code Feb 05 09:40:26 I did not check what the actual result was! Feb 05 09:40:27 jesus Feb 05 09:40:39 thats why you should read the docs before doing something ;) Feb 05 09:40:48 I just notice this is what GCM returns me after I try push from the server: Unauthorized --- Error 401 Feb 05 09:40:58 danijoo: I am trying to set a cross platform solution up Feb 05 09:41:12 and trying to use the same code for Apple and android - missed the part where gcm returns status messages and whatnot Feb 05 09:41:21 should read more thoroughly next time Feb 05 09:41:29 what does that error message stand for though most likely? Feb 05 09:41:46 that you are not authorizing correctly. Feb 05 09:43:38 Bantalon, its in the docs Feb 05 09:43:54 there is a seperate section only for troubleshooting response code 401 Feb 05 09:44:03 danijoo: alright awesome, thanks! Feb 05 09:44:18 my gawd if I can manage toget this fixed NOW Feb 05 09:44:19 ids guess wrong api key or sth like that Feb 05 09:44:22 I can finally send my app up to my second store Feb 05 09:44:24 this will be intense Feb 05 09:44:27 4 years of hunting now Feb 05 09:44:53 the only thing I haven't verified so far to maek sure it's 110% correct si the allowed IP Feb 05 09:45:01 will check that now hopefully that's the culrpit Feb 05 09:45:02 in Arabic, Bantalon means pants Feb 05 09:45:11 Odaym: you god damn know it Feb 05 09:45:17 :) Feb 05 09:45:25 :D:D Feb 05 09:45:28 :) Feb 05 09:48:07 The IP adress I put under Allowed IPs is the server's IP right, the one that does the request? Feb 05 09:48:16 the one that sends the curl*, not the clients IP? because that wouldnt make too muchs ense Feb 05 09:49:29 actually nevermind, just clearing it allows all IPs which is what's needed Feb 05 09:52:41 How is to accepting certificate in the WebView, anyone know? Feb 05 09:53:22 YEAAAahhhhhhhhhhhhhh Feb 05 09:53:24 thanks danijoo Feb 05 09:53:36 yw Feb 05 09:53:38 works - took a few minutes for the IP change to kick in, but erasing the static IP in there fixed it Feb 05 09:54:25 sometimes I get unauthorized now and sometimes not Feb 05 09:54:28 is this normal? maybe takes a while? Feb 05 09:54:39 never worked with gcm Feb 05 09:54:41 sry Feb 05 09:54:54 I only read the docs once Feb 05 09:56:15 Odaym have you seen onServiceDiscovered getting a 133 error code, (GATT_ERROR) ? Feb 05 10:00:58 How many devices can you push to at the same time? Feb 05 10:02:51 Hi there. Feb 05 10:02:55 Bantalon, you really hate the documentation, dont you ? ^^' Feb 05 10:04:05 I'm searching a abit the interwebs and I can't find any simple solution or what tools should I use in order to send 6seconds audio to a server. Server will then process audio and send back info immediatelly. Any suggestions on how can I send audi file? Can I use json for that and somehow encode audio file into something? Or what should I use? Feb 05 10:05:44 danijoo: i kinda like it Feb 05 10:05:45 its cute Feb 05 10:05:53 but intense Feb 05 10:06:06 the limits are in it ;) Feb 05 10:10:58 danijoo: what about a question that is not in the docs -- since I'm trying to use as much of the same code I have as possible with minimum rewrites for multiple platforms Feb 05 10:11:16 what does Google think about doing 1 cURL request per push notification? like how Apple does one socket stream per push? Feb 05 10:11:41 if you perhaps know? or if someone else knows please throw some knowledge :) Feb 05 10:14:23 Bantalon, "Maximum API requests per day: 10,000" Feb 05 10:14:48 is there a way to restore a canceled subscription? Feb 05 10:15:02 o darn Feb 05 10:15:11 oh wow that is absolutely nothing Feb 05 10:15:50 Bantalon, nvm Feb 05 10:15:53 this was outdated Feb 05 10:16:34 seems like they took all limits off Feb 05 10:17:03 have to go. bye Feb 05 10:17:14 What could cause setVisibility(View.VISIBLE) not to show? i have check with a Log. and the log even do happen . but the view is still not shown. Feb 05 10:17:32 its very shy Feb 05 10:17:50 is it visible normally? Feb 05 10:17:54 danijoo: puh, awesome, thanks a lot for your help mate, see you! Feb 05 10:20:36 Can a single google play account be subscribed to the same subscription twice? Our app uses their own account structure without actually relying too much on google play. Feb 05 10:20:51 Ashiren: well that depends on what you mean .. it show up when i press the "play" button (the view is a costum view that is a "media player interface) Feb 05 10:21:01 Syzygy_ no it will return an error Feb 05 10:21:50 alright. Feb 05 10:21:56 IIRC. I know it doesn't actually let them be charged twice Feb 05 10:22:17 I had a little trouble with the getPurchaseState call returning a stale response Feb 05 10:23:18 Ashiren: so pressing for it to show works... but then when i switch fragment, and then switch back it "updates" the view status .and this is when it is not showing Feb 05 10:24:05 Ashiren: but it should. it is showing the log event Feb 05 10:24:47 the email we see in gmail app in a particular mail, is it webview or all native android textviews, etc. ? Feb 05 10:26:21 fanno: can you show the part of code Feb 05 10:26:31 Ashiren: http://pastebin.com/TALS7DQR just a snip Feb 05 10:27:01 Ashiren: and i do see "VISIBLE: ...." Feb 05 10:27:15 whats this? Feb 05 10:27:42 Ashiren: comes from Log.e(TAG, "VISIBLE: " + mMuChannel.getTitle()); Feb 05 10:28:08 i meant this.setVisibility(View.VISIBLE); Feb 05 10:28:11 are you extending view? Feb 05 10:28:36 yes sc i'll put the whole thing up, just wanted to keep it simple Feb 05 10:29:34 Ashiren: whole view http://pastebin.com/QLuyzYfU Feb 05 10:31:18 Ashiren: works as i intended, but the error happens when i switch fragment and then switch back Feb 05 10:31:54 can you switch and switch back several times Feb 05 10:32:18 is there a way such that a service can touch the screen and the foreground app captures the event Feb 05 10:35:33 Yes no error/crash happens only issue is the view do not show =( very confusing. Feb 05 10:38:43 Would this work? I record a 6 seconds audio file and save it to sdcard. I then encode that audio file into Base64 String and send it via json to server? Or is this completely off? Feb 05 10:45:53 hello. I want to make a trip planner app using google maps. any library that I can use for this Feb 05 10:47:11 what about https://github.com/googlemaps/android-maps-utils ? Feb 05 10:47:33 yes I have seen that :) Feb 05 10:48:28 Our app uses it's own account system that is independant from google play. When a user buys a subscription, cancels it, switches account and rebuys it with the second account, the second account gets the old subscription continued without having to pay (theoretically enabling one user to buy our pro subscription for every other user). Is there a way to prevent that from happening? Feb 05 10:52:56 Syzygy_: store the play subscription id in your own system Feb 05 10:53:06 and ensure it is unique Feb 05 10:54:12 BoD`, the subscriptionID is the one defined by me in the google play developer consule, right? Feb 05 10:54:54 no I mean a unique id returned by the store when you make a purchase Feb 05 10:55:06 the purchase token? Feb 05 10:55:08 or the order id Feb 05 10:55:23 not sure :) both sound good Feb 05 10:56:07 the token is definitely different, and my college next to me claims the orderID is different as well Feb 05 10:58:55 the orderID is also different Feb 05 11:07:03 So when both the order ID and the token are different (besides I still don't know how to confirm order id via the google servers by my backend Feb 05 11:07:43 and that means I have no idea what to do. Feb 05 11:09:19 so my college just ran of wispering "fucking android" under his breath. I guess he didn't make any progress either. Feb 05 11:10:13 thats my everyday Feb 05 11:11:49 Syzygy, which account is the user switching? Google? Feb 05 11:12:03 Mavrik, no, my app specific account Feb 05 11:13:20 hrmf Feb 05 11:13:26 users have to create a new account when using our app(so they can use it crossplatform), accept TOS and all that jazz Feb 05 11:13:27 anyone who has experience with codecoverage and android? Feb 05 11:13:36 That sounds like it's working as expected then - Google bills subscription according to google account Feb 05 11:13:47 and if that google account paid, of course they won't bill it again Feb 05 11:14:16 Troffel, jacoco works fine with instrumentation tests Feb 05 11:14:24 Mavrik, yes, but this in theory enables users to enable the subscription for free on an unlimited number of accounts Feb 05 11:14:52 yes, the way you did it does Feb 05 11:15:01 thinking about how to prevent it Feb 05 11:15:08 bind the subscription to a certain google account? Feb 05 11:15:28 Mavrik, I played around with http://raptordigital.blogspot.dk/2014/08/code-coverage-reports-using-robolectric.html but never got it to run propperly as the 'restreport'-task didn't work. Hence why I'm looking to alternatives :) Feb 05 11:16:00 Troffel, you probably just wanna wait for Gradle plugin 1.1 which will support your kind of testing Feb 05 11:16:29 well, google already binds it to it's own account. We would like to limit the subscriptions the users can have on android to one account as well. Feb 05 11:16:58 Mavrik, I'm looking into TDD and codecoverage would really help in cleaning up dead code. Just haven't found any alternatives to codecoverage for tracking what code is actually run. Feb 05 11:17:14 but the problem is that I can not identify a reestablished subscription (as in start, cancel, start with a different account) as the same subscription with my current knowledge Feb 05 11:17:24 since both the purchase token and the orderId is different Feb 05 11:17:36 Syzygy, when it comes to Google billing, Google account IS the only valid reference Feb 05 11:17:38 for them Feb 05 11:17:52 You're essentially fighting against their whole system when you want to separate that Feb 05 11:18:05 I don't necessarily want to seperate that. Feb 05 11:18:47 I just want to differentiate between a new subscription purchase and a reestablished subscription purchase. Feb 05 11:22:00 I would also like to check the orderId, but I can't figure out how to get it via the android publisher API Feb 05 11:22:38 https://developers.google.com/android-publisher/api-ref/purchases/subscriptions this is all the data I receive. Feb 05 11:26:41 Mavrik, can I ask what exactly is coming in Gradle 1.1? http://tools.android.com/recent doesn't seem to mention anything test-related Feb 05 11:27:26 Because Gradle plugin 1.1 isn't out yet. Feb 05 11:27:37 You're looking at Android Studio changelog ;P Feb 05 11:27:52 Is there a way to get some kind of identification on the playstore account used? Feb 05 11:30:05 Troffel: http://tools.android.com/tech-docs/new-build-system Feb 05 11:30:20 Unit testing on the JVM. Feb 05 11:32:28 sweet Feb 05 11:32:29 Troffel: It doesn't work in Android Studio yet, though. Feb 05 11:32:30 thanks :) Feb 05 11:32:35 https://code.google.com/p/android/issues/detail?id=131080 Feb 05 11:32:43 But it should work soon (I think). Feb 05 11:33:00 Yeah, I've been waiting for months for this. Huge feature. Feb 05 11:33:55 damn, nice. Good means I can wait with that. No reason to hassle with that if they are coming with something that works a bit more 'out of the box' . thanks for hte heads up Feb 05 11:34:35 Are you using JaCoCo? Feb 05 11:36:07 I saw this today: . Seems there is support built in for JaCoCo (at some point). Not sure how to use it, though; never tried. Feb 05 11:36:26 tried it, but from I can tell it requires a ton of fiddling custom code into the gradle file, e.g. defining your own gradle task for it Feb 05 11:36:49 best example I could find was http://raptordigital.blogspot.dk/2014/08/code-coverage-reports-using-robolectric.html Feb 05 11:37:06 Ah, okay. Feb 05 11:37:53 all I was really looking for was a quick way to find dead code, but ill put it on hold til 1.1 it seems Feb 05 11:38:59 was hoping for a codecoverage tool like the one Visual Studio has. Maybe one day Feb 05 11:39:32 Yeah, that would be nice. Feb 05 11:40:04 Ooh, my bug got fixed: https://code.google.com/p/android/issues/detail?id=131080 Feb 05 11:40:58 Hope that makes its way into AS 1.1 and Gradle plugin 1.1. Feb 05 11:41:20 well, seems to be a pretty huge oversight if it doesn't Feb 05 11:41:51 is there a way to 'subscribe' to updates about upcoming gradle builds and such? Feb 05 11:41:52 JakeWharton: Pinging you for the above. ^ Feb 05 11:42:17 Troffel: Not as far as I can see. I just watch the changes here: https://android-review.googlesource.com/#/q/project:platform/tools/adt/idea+OR+project:platform/tools/base Feb 05 11:42:39 I guess you could remove the first query there (just keeping the 'base' one) if you care only about Gradle. Feb 05 11:43:10 neat, taking note. Ill fiddle with it after work :) Feb 05 11:43:50 I don't get how some people prefer intelliJ over Eclipse Feb 05 11:44:06 I prefer IntelliJ for some things; Eclipse for others. Feb 05 11:44:13 The Gradle integration in IntelliJ is really nice. Feb 05 11:44:31 I mostly just happy to be rid of crashing eclipse ide Feb 05 11:44:50 I've found that recent versions of Eclipse aren't bad with regard to crashing. Feb 05 11:45:12 jutsi: Did you see that Jon Skeet uses Eclipse? Feb 05 11:45:26 TacticalJoke who? Feb 05 11:45:32 I had numerous times where eclipse would just turn gray, or take ages to compile and push apk to device, throwing random 'gray screens' Feb 05 11:45:51 Which version of eclipse? Luna is usually pretty good Feb 05 11:45:51 He's that big name from StackOverflow. (I used to be on the C# newsgroups with him, so he's kinda familiar to me.) Feb 05 11:46:09 Ah right, cool Feb 05 11:46:29 Troffel: Were you using the ADT bundle? Feb 05 11:46:36 The bundle uses a two-year-old version of Eclipse. It's really bad. Feb 05 11:46:37 TacticalJoke, yep Feb 05 11:46:42 Luna is much, much better. Feb 05 11:46:48 ah, I never knew Feb 05 11:46:54 IntelliJ feels slow and clunky to me, compared to eclipse, but i guess every IDE has its quirks Feb 05 11:47:12 IntelliJ is really weird in some ways (e.g., close buttons on tool windows appear in different places). Feb 05 11:47:29 They should always (where avaiable) appear in one place, and that place should probably be at the top right. Feb 05 11:47:33 available* Feb 05 11:47:38 Yes! IntellJ feels ... wrong Feb 05 11:47:46 Also, the TODO tool window is horrible. Feb 05 11:48:06 I prefer Android Studio over Eclipse for Android development, though. Gradle is a big win. Feb 05 11:48:21 How hard is it to learn objective C if i wanna also make apps to iphone (I can make apps to android via java and to windows phone via C#) Feb 05 11:48:40 depends on you Feb 05 11:48:42 jutsi: it's a bit weird but has its charm Feb 05 11:48:46 don't have a ton of experience with android studio yet, but gradle is a big step up yep Feb 05 11:48:54 Isn't Swift a feasible option (I'm clueless -- just wondering). Feb 05 11:48:56 TacticalJoke I'm developing using IntelliJ atm, but im quite new to it so i dont really know what gradle is Feb 05 11:49:04 Yeah, Gradle is rather nice Feb 05 11:49:11 I actually prefer it to Maven now Feb 05 11:49:15 What is gradle? Feb 05 11:49:17 Even though I hated it before. Feb 05 11:49:18 It's a build system, and it's nicely integrated with Android development. Feb 05 11:49:26 Dependencies are generally one-liners. Feb 05 11:49:42 jutsi, that's the piece of software that actually compiles and packages your app Feb 05 11:49:48 jutsi, and it's configured by build.gradle file. Feb 05 11:49:52 Ah right, cool thanks Feb 05 11:49:54 you can still add maven as dependancy for projects tho Feb 05 11:49:57 e.g., JUnit is this: testCompile 'junit:junit:4.12' Feb 05 11:49:58 Android Studio doesn't compile anything, it just calls out to gradle Feb 05 11:50:53 hi, i’ve made a java library with some JUnit tests. does anyone know how I can run those on an android device (I’ve had some issues with exact JRE implementation so I cant to check on an android environment) ? Feb 05 11:51:10 Is there an easy way to add onclicklisteners to buttons? I have around 40 buttons i needa make listeners for Feb 05 11:51:19 samskiter, did you make JUnit or instrumented tests? Feb 05 11:51:25 samskiter, because JUnit tests don't run on a device. Feb 05 11:51:36 Mavrik: JUnit, i.e. nothing to do with android Feb 05 11:51:53 yes, but i understand that android’s tests are all based off junit. it there any simple way i could maybe wrap the tests? Feb 05 11:51:53 jutsi, probably having 40 buttons that have to be manucally configured is your issue :) Feb 05 11:52:14 jutsi: you can add an onClick tag to the xml… but in general, what Mavrik said! Feb 05 11:52:19 samskiter, you could probably try to just run them with instrumented test runner, but remember that Android uses JUnit3 Feb 05 11:52:28 It seems that full unit-testing support should be in AS 1.1, since the two changes that fix the relevant bug are in the studio-1.1-dev branch. Feb 05 11:52:41 The bug where all unit tests pass. Feb 05 11:52:53 jutsi, you can always iterate through the ui-elements and apply listeners :P Feb 05 11:53:04 TacticalJoke, mhm, plus IDEA supports them Feb 05 11:53:11 Mavrik: yea i got in an absolute nightmare with a project where i couldn’t get my library to run junit tests anymore (the android junit lib was being found or something) Feb 05 11:53:11 so it shouldn't be all that ahrd Feb 05 11:53:58 Yeah. The problem (causing ) seemed to be related to android.jar. Feb 05 11:55:04 TacticalJoke: interesting. its wweird that i couldn’t seem to revert back to a state where my library was run with junit 4. no matter how much i removed android stuff from the project Feb 05 11:56:37 samskiter: Note that this ability to use JUnit 4 to (JVM-)unit-test stuff in an Android module is brand new. Feb 05 11:56:49 It's gonna be in Gradle plugin 1.1. Feb 05 11:56:57 TacticalJoke: ahhh. ok. i might have just hit this at the wrong time Feb 05 11:57:31 my ideal would be to run this stuff locally and on an emulator. locally is always faster, so better iteration Feb 05 12:00:09 with gradle, how do you handle git and shared libraries? We have a lib that is shared across apps but with Android Studio it copies the library-app inside the directory of the given project. Feb 05 12:00:31 As my question was closed on stackoverflow because it's too broad ( more conceptional ), maybe someone here can help me: What is best-practice to invite external users to private resources? ( http://stackoverflow.com/questions/28322066/what-is-best-practice-for-inviting-external-users-to-private-resources ) Feb 05 12:01:23 currently we simply including by relative path: project(':lib').projectDir = new File('../lib/app') Feb 05 12:01:24 Troffel: we use submodules extensively. Feb 05 12:02:03 Troffel: we have some internal libraries we use on many projects. we add that as a submodule. it contains a bunch of android “modules” and we just add the ones we want to settings.gradle and build.gradle. Feb 05 12:02:27 we don’t bother issuing internal ‘builds’ of the modules (into jars etc) as they tend to evolve quite alot Feb 05 12:02:48 we are in the exact same situation Feb 05 12:03:07 but we dont have to do any relative pathing Feb 05 12:03:18 how do you import it then? Feb 05 12:03:21 just submodule right into the android project, it appears in android studio and you just turn on the modules you want Feb 05 12:03:58 seems I've missed something. ill have to do an extra readup on sub-modules Feb 05 12:04:52 samskiter: When Gradle plugin 1.1 is released, you'll be able to test on the JVM by placing tests (which can be JUnit 4 tests) in src/test/java. You can create instrumentation tests in src/androidTest/java, but these have to (I think) use JUnit 3. Feb 05 12:05:08 Troffel: yea, from the root of for your android project (which is checked into git) run git submodule app URL_TO_YOUR_LIBS PATH_YOU_WANT. thats it Feb 05 12:05:17 As far as I know, that is (or, I guess, will be) the only way to achieve this. Feb 05 12:05:25 TacticalJoke: that’s great :0 Feb 05 12:05:32 that’s like exactly what i want Feb 05 12:05:45 i might even just symlink em :) Feb 05 12:06:56 TacticalJoke: so will the library need to be configured as an “android library” in order for that to work? will i end up with two build.gradles? Feb 05 12:07:54 Sorry, which library? I might've missed some of what you said before. Feb 05 12:08:40 hi, I cannot see icons from a menu added to the ActionBar with AppCompat v7-20, even if from Android Studio I see the preview. I followed google documentation and here the snippet and screenshots: http://pastebin.com/CFaUxHPd I wonder what I'm missing Feb 05 12:11:52 TacticalJoke: my library Feb 05 12:12:44 TacticalJoke: my java library. it’s currently pure java. no android. Feb 05 12:12:50 hence plain junit Feb 05 12:14:18 Oh. Yeah, as far as I know the module would need to be an Android one for instrumentation tests work. Feb 05 12:15:22 TacticalJoke: ok, that’s not so bad. I suppose I convert it to an “android library” but I can still run the junit4 tests locally Feb 05 12:15:49 hi, i tried every thing one by one in to send parameters with google volley,i can send a phone number and token to webservice its ok, but when i try to send a json object that contains name surname phone number contact image etc server always results me null Feb 05 12:16:11 what could be the problem ? Feb 05 12:16:40 i did every example on the stackoverflow etc. Feb 05 12:16:42 sci-fi: have you sniffed the connection? (charles is good) Feb 05 12:16:51 to check your data is going out right Feb 05 12:17:08 i was about to download fiddler Feb 05 12:17:50 samskiter: Yeah, you'd need only one build.gradle for that. Feb 05 12:17:56 Once Gradle plugin 1.1 is out. Feb 05 12:18:33 blues-man: Just to check -- your Activity is extending ActionBarActivity, right? Feb 05 12:18:50 I presume so, but I saw a question similar to this on SO where they weren't. Feb 05 12:19:03 samskiter: here is how i created my json and how server wants it http://paste.ubuntu.com/10072202/ Feb 05 12:20:33 and this is the result {"Result":{"Message":"contactList is null","Status":1},"Entity":null,"Entities":null} Feb 05 12:20:37 TacticalJoke, d'oh, I forgot and I extended an Activity. Many thanks Feb 05 12:21:35 i have a profile section in my app where the user should be able to select his city and country. Is there some plugin that can help me do this ? Or the standard way is to build a database myself (get from somewhere) then let him select a country from a dropdown based on that you can auto suggest relevant cities in the city box ? Feb 05 12:36:18 samskiter, with submodules, how does it handle version dependancy? if project A depends on lib1.2 while project B depends on lib1.4. Do you know how it manages versioning? Feb 05 12:38:44 sci-fi: sounds like a server bug? Feb 05 12:38:54 Troffel: its done by the commit hash Feb 05 12:39:27 so you say “i want my submodule A to be chcked out at 12876as86v876a96" Feb 05 12:39:36 samskiter, yep, I meant can it figure out which commit hash (of a lib) that belongs to a certain version of the project? Feb 05 12:39:45 samskiter:i dont know i really fed up,dealing with 3 days. Feb 05 12:39:57 sci-fi: you need to go and debug the serve Feb 05 12:39:58 r Feb 05 12:40:03 or do you have to figure out yourself, which commit hash it needs? Feb 05 12:40:17 Troffel: no it just remember commit hash. it doesn’t remember tags or branch names Feb 05 12:40:35 it’s a completely static dependency Feb 05 12:40:59 that's what I mean, it remembers what commit hash of the sub-module that belong to the project :) Feb 05 12:41:21 yes it does Feb 05 12:41:26 just wanted to ensure I had understood it correctly Feb 05 12:42:56 Troffel: worth noting - there are two elements to a submodule being checked in. one is an entry in .gitmodules that stores the location and default remote of a submodule. the other is an entry at the location of your submodule that stores the commit hash you want Feb 05 12:43:11 you must check in both after making a submodule Feb 05 12:43:16 hello guys Feb 05 12:43:18 and after you update a submodule you must check in the latter Feb 05 12:43:50 hm ok, thanks Feb 05 12:45:33 Troffel: finally, when you change to another branch, sometimes your submodules don’t get updated. so be very careful about committing a submodule version you dont intent after doing this. Feb 05 12:45:52 do you guys know how the phone dilaer is aple to display the name of user is calling (from your contacts) and also is it possible to have another applications with its own set of contacts which can be queried by the phone dialer during an incoming call? Feb 05 12:46:08 and submodules will often be in a detached head state, so if you are comitting into them directly, watch out Feb 05 12:46:46 alexi5: no. itll be querying the main contacts db Feb 05 12:46:50 but you can make entries into that Feb 05 12:48:00 ok Feb 05 12:48:02 samskiter, thanks again. There will be some trial and error. But worst case scenario we can always manually checkout the sub-module at a certain hash and then set it up again Feb 05 12:48:20 (I assume) Feb 05 12:48:58 Troffel: yes, i guarantee you’ll get in some messes with submodules. if when you do a git statusin the parent repo you can see the *contents* of a submodule then you’ve done it wrong. Feb 05 12:49:11 JakeWharton: Are you online? Feb 05 12:49:31 clearing out a submodule can also be a bitch. it involves digging into the .git folder. also, this is now very offtopic. #git Feb 05 12:50:41 samskiter, I realise we moved a bit off track. I was just looking for a good way to handle gradle-submodules. Thanks for all the good points. Ill stay off of git ;) Feb 05 12:51:03 Troffel: no worries, just conscious of other users :S Feb 05 12:51:11 alexi5: it also queries other databases. Feb 05 12:51:19 samskiter, true :) Feb 05 12:51:33 If the person isn't in your contact list, it queries Google's own database. Feb 05 12:51:37 justinmrkva: i stand corrected Feb 05 12:51:44 very good point! Feb 05 12:51:56 You could do that as well, but I won't tell you how to access a private Google API in an official channel xD Feb 05 12:52:10 Instead you can use OpenStreetMap's API. Feb 05 12:52:26 private != secret Feb 05 12:52:37 (Also, sending every phone number to Google is a bad idea in general. NSA and stuff) Feb 05 12:52:45 justJanne: i think he’s trying to get the dialer to hit his DB not make his dialier hit the google DB Feb 05 12:52:55 Hmm. Feb 05 12:53:16 Yeah, that's only possible by adding a new contact provider. Feb 05 12:53:28 Like what WhatsApp or Skype do. Feb 05 13:07:51 anyone worked with google places api on android? Feb 05 13:21:36 how crazy is it to use a YYYYMMddHHmm date format of the build as an app's versionCode? Feb 05 13:24:45 a bit less crazy than using YYYYMMddHHmmss Feb 05 13:25:19 Is there a reason you don't want to simply increment the normal number? Feb 05 13:25:30 more seriously, with this granularity, that would mean you plan to build/push several version per minute Feb 05 13:25:35 oops per hour Feb 05 13:25:55 if you just want to always have a greater version code, just increment Feb 05 13:37:20 Hey, does anyone know of any good tool or method for editing multiple language files? ie, have four strings.xml open at the sametime and not have to find the correct row manually in all of them to edit a string Feb 05 13:37:43 hey, can someone help me with this http://pastebin.com/UZu2MB3j ? the problem is in the comments why the variables cannot be found? Feb 05 13:40:17 joroci: What is the exact error message? Feb 05 13:42:04 if we look at the Get function i add a breakpoint in the first line of the function Feb 05 13:42:26 request = Cannot find local variable "rqequest" Feb 05 13:42:44 You're saying that it's not visible to the debugger? Feb 05 13:43:11 it's like it doesn't exist in the function when i add a watch to the wathchers list Feb 05 13:43:26 the value of request is cannot find local variable "request" Feb 05 13:44:12 if i add any piece of code to the first line of the function in the 2nd line all the parameters are visible Feb 05 13:46:30 is that understandable? Feb 05 14:00:27 Cuteness overload: http://gfycat.com/EsteemedGoodDrake Feb 05 14:06:21 Hey, what should I do when two gradle dependencies has a dependency on same jar? Feb 05 14:07:33 ? Feb 05 14:08:22 Hey, what should I do when two gradle dependencies has a dependency on same jar? Feb 05 14:25:07 Scala.js: Because everything has to compile down to JavaScript: http://www.reddit.com/r/programming/comments/2uux21/scalajs_no_longer_experimental/ Feb 05 14:26:55 TacticalJoke i found this issue https://code.google.com/p/android/issues/detail?id=82031 Feb 05 14:27:05 this is the problem i haev Feb 05 14:27:07 have Feb 05 14:27:26 Hello, any Google employee in here? cloud.google.com is down (error 500) in India since more than 7 hours. Feb 05 14:27:31 Ah. Weird. Feb 05 14:27:43 adq: The point is for the apk to be generated by a build system and for me to not have to increment the version code manually in order to be able to release a CI build. Feb 05 14:27:58 TacticalJoke: ^ answers you as well, I guess. Feb 05 14:28:03 joroci: FWIW, I often find that using Log.i (or whichever) is better. Feb 05 14:28:50 The android overview for KITKAT reads: "The Scrypt key derivation function is implemented to protect the cryptographic keys used for full-disk encryption." - how would I employ this native support for scrypt? Feb 05 14:28:52 guys here is my problem : i can access to a method (it adds phoneNumber to database),with same codes i send datas to another method and its datas always null Feb 05 14:29:06 i'm not sure how log.i will help here? just add a dummy line? Feb 05 14:29:09 lhunath: Can't you do that with Gradle or something? Feb 05 14:29:12 until it is fixed? Feb 05 14:29:17 joroci: To print the values with Log.i. Feb 05 14:29:27 It's often way less tedious than using a debugger. Feb 05 14:29:35 oh Feb 05 14:29:46 now i got you Feb 05 14:29:55 thanks Feb 05 14:30:10 is there some reason why WebView does not work in a dialogfragment? Feb 05 14:30:10 use a unique tag for the log though, makes it a lot easier to filter it Feb 05 14:30:29 lhunath: http://stackoverflow.com/questions/17448565/how-to-autoincrement-versioncode-in-android-gradle Feb 05 14:30:48 Not sure whether it works, but it looks promising. Feb 05 14:31:22 MartialLaw: A WebView in a DialogFragment. ;o Feb 05 14:33:10 popbackstack run async... and that fine.. except when i have to call the same fragment again... the OnStart of the new fargment is called before the OnDestroy of the new on, causing problems, it there a way to avoid this? Feb 05 14:33:36 like a say to freeze the main ui on calling popback until it completes Feb 05 14:34:06 you could overwrite onPause and call it manually? Feb 05 14:34:15 or something like that Feb 05 14:34:32 TacticalJoke: I fail to see the advantage, but welcome any arguments to bring me to my senses if you feel I'm not. Feb 05 14:35:08 True, there might be no real advantage there. Feb 05 14:35:14 I was primarily looking for reasons I had missed for why a timestamp in versionCode is a bad idea Feb 05 14:35:29 Troffel: umm maybe i should have said I'm calling commit after popback Feb 05 14:35:49 I like the idea that versionCode has a significance in itself. Feb 05 14:36:07 If I am making simple quiz app, what is the best practice, to store questions in database or somewhere else? Feb 05 14:36:12 I'd put the GIT hash in there, but it's not linear. Feb 05 14:36:30 demahum: Where are the questions coming from? Feb 05 14:36:42 TacticalJoke: They are preloaded. Feb 05 14:36:49 TacticalJoke: When the app is made. Feb 05 14:37:33 TacticalJoke: The app is offline and there will be no change of questions within the app. Feb 05 14:37:35 I wonder whether you could get away with a string-array resource. Feb 05 14:37:50 http://developer.android.com/guide/topics/resources/string-resource.html#StringArray Feb 05 14:38:07 Though maybe that'd be too simple. Feb 05 14:38:15 TacticalJoke: Yeah yeah, I know what are you talking about. I am just asking what is the best practice. Feb 05 14:38:38 You should be asking whether there is a best practice. Feb 05 14:39:26 TacticalJoke: haha... so is there? :D Feb 05 14:41:45 for that, a string resource would do fine I imagine Feb 05 14:42:53 Troffel: Thanks. Feb 05 14:43:02 TacticalJoke: Also thanks. :) Feb 05 14:44:06 TacticalJoke: you in the UK? Feb 05 14:44:24 Yeah. Not far from London. Feb 05 14:46:56 i imported an android project on android studio and i get this message “This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system.” Feb 05 14:47:10 then do what it says Feb 05 14:47:35 pfn this is a git repository where the .gitignore file ignores gradle files. due to incompatibility of gradle versions Feb 05 14:47:36 in android studio you can import 'eclipse project' specifically, then it will handle all that for you Feb 05 14:47:48 this is an android studio project, too Feb 05 14:47:51 then fix the incompatibility Feb 05 14:47:51 oh, nvm then Feb 05 14:48:00 Napalm: Are you near London? Feb 05 14:48:01 and don't ignore gradle build files Feb 05 14:48:06 pfn Troffel : how can i fix this? Feb 05 14:48:14 What is the best way to debug apps using Google Play LocationServices? Neither Genymotion nor AVD handles this well / or at all. Feb 05 14:48:22 bloody weather here is crazy, just rained, hailed, and now sun all within an 2 hours Feb 05 14:48:43 TacticalJoke: yes Feb 05 14:48:51 it's raining blood here by now Feb 05 14:50:17 that day of month eh Feb 05 14:50:44 At least it's not raining men. Feb 05 14:50:51 lol Feb 05 14:51:35 someone should build an app that predicts those types of weather ;-) Feb 05 14:53:23 ok maybe im going about this all wrong.... is there a way to check the currently loaded fragment or the layout of the fragment atleast? Feb 05 14:55:21 nvm that... would using ((ViewGroup)getView().getParent()).getId() be a solid way to check if changing UI is still possible when the fragment has been changed Feb 05 14:57:58 why is it impossible to have a webview in a dialog or dialogfragment? meaning one that actually is able to load a page... insanity here Feb 05 14:58:19 can somebody please have a look at this(Google Volley + Rest Api) ? I really really need help, ive been dealing with this for 3 days,http://paste.ubuntu.com/10074364/ Feb 05 14:58:29 http://paste.ubuntu.com/10074364/ Feb 05 14:59:47 Hey, does anyone know of any good tool or method for editing multiple language files? ie, have four strings.xml open at the sametime and not have to find the correct row manually in all of them to edit a string Feb 05 15:04:15 mihalybak, use findinpath maybe Feb 05 15:04:18 okay now my WebView is just opening up the Chrome app on my device.. wtf? Feb 05 15:04:42 jesus never underestimate how funky Android can be Feb 05 15:06:04 ahh i need a client i see Feb 05 15:06:10 i dont use webview much ever actually Feb 05 15:06:25 strange how it doesnt do that in my other activity tho Feb 05 15:06:32 where the client is not set Feb 05 15:06:35 android == funky Feb 05 15:08:20 adq: findinpath? Feb 05 15:08:20 https://twitter.com/simonpang/status/562095677975441408/photo/1 Feb 05 15:08:22 ;) Feb 05 15:08:24 guys anyone ? can somebody please have a look at this(Google Volley + Rest Api) ? I really really need help, ive been dealing with this for 3 days,http://paste.ubuntu.com/10074364/ Feb 05 15:08:24 http://paste.ubuntu.com/10074364/ Feb 05 15:09:42 mihalybak, find in path, sorry. (Edit > Find > Find in Path...) you restrict the scope to the directory you want Feb 05 15:09:56 and you search for the string you want Feb 05 15:10:58 adq: in which application do you have this? Feb 05 15:11:08 android studio Feb 05 15:11:15 I am on eclipse now and it does not look like that... ooo Feb 05 15:11:44 there should be something similar, note that you did not say you were using eclipse which is not recommended anymore Feb 05 15:11:59 I can search out all the string without problems, but can you in android studio actually edit them directly in the search result? Feb 05 15:12:30 not that i am aware of Feb 05 15:13:14 sci-fi: What do you mean by "the parameters are null"? Feb 05 15:13:33 adq: yea, that is what I was looking for :/ perhaps I'll just throw together something myself, should not be too difficult Feb 05 15:13:40 'contacts' cannot be null if 'contacts.toString()' doesn't throw a NulPointerExceptoin. Feb 05 15:13:42 Exception* Feb 05 15:14:13 TacticalJoke: it prints what i want but on the server side it is always null, and my web developer sends a request with ajax Feb 05 15:14:15 it works Feb 05 15:18:15 sci-fi: What is null on the server side? Feb 05 15:18:54 whole thing that i sent in json object (contact) Feb 05 15:20:09 I have a string in string resource in res/values/Questions.xml called Question1. I can access it from Java class with getString(R.string.Question1). If I have 100 strings in the Questions.xml and all of them are in form of QuestionXXX (XXX - some number from 1 to 100), how can I randomize accessing of these question from Java class, so that every time I get other string (question)? Feb 05 15:20:41 demahum: Why not use a string array? Feb 05 15:21:54 sci-fi: I would try sending the simplest JSON object (with minimal code) and seeing what happens. Feb 05 15:22:11 TacticalJoke: In the documentation, String is at the first place. I haven't read string array yet. :D So there is no way to this (what I wrote) with String? I have to use String array in such situation? Feb 05 15:23:13 you can, but it's stupid Feb 05 15:23:21 use a string array Feb 05 15:23:33 TacticalJoke:i tried alot of things :( idk maybe its bug but why works register user then Feb 05 15:23:59 sci-fi: Have you tried the simplest possible test? Feb 05 15:24:24 pfn: Thanks. I will use a string array. :) But could you give me an idea on how to do this (what I intended), just for purpose of learning. :) Feb 05 15:24:32 demahum: I linked you earlier. Feb 05 15:24:34 yes i just sent a name Feb 05 15:24:36 And you replied "yeah yeah". Feb 05 15:25:14 TacticalJoke: I am reading your link at the moment. :) Feb 05 15:25:20 demahum, basic programming Feb 05 15:25:24 arrays are a basic datastructure Feb 05 15:25:38 generate a random index, retrieve item at array index Feb 05 15:25:45 pfn: I know that method. :D Feb 05 15:25:59 pfn: I asked about when not using an array. Feb 05 15:26:16 pfn: You said it's possible but it's stupid... Feb 05 15:26:18 generate your resource name by string, and retrieve it by name Feb 05 15:26:33 read Resources apidoc Feb 05 15:26:58 pfn: Ok, thanks. :) Feb 05 15:28:06 god, I hate the maven plugin... Feb 05 15:36:24 pfn y such hate Feb 05 15:36:38 because it keeps munging my manifest xml Feb 05 15:45:54 Is it possible that if pictures are used in Android Studio project, that they can be somewhere else except in drawable? Feb 05 15:46:07 depends, assets or drawable Feb 05 15:48:03 pfn: Anywhere else except for these two? Feb 05 15:50:00 no Feb 05 15:53:55 not even in raw? Feb 05 15:54:49 pfn: Thanks. :) Feb 05 15:55:15 well, why would you put them in raw Feb 05 15:55:19 that's dumb Feb 05 15:58:13 anywhere else except assets or drawable ... raw would qualify ;-) Feb 05 15:58:34 yeah it would, but don't put them there if you don't want them in drawable Feb 05 15:58:44 I know Feb 05 16:00:54 I am just asking about theory. Feb 05 16:01:04 Can they be anywhere? Feb 05 16:01:54 no Feb 05 16:02:06 project structure is project structure Feb 05 16:15:56 Hello, whats best collection class for implementing a media player list Feb 05 16:16:34 what are peoples opinions on roboelectric? Feb 05 16:16:43 or is there a better channel to ask that question in? Feb 05 16:17:02 the way I can iterate over them and make the index return the easiest Feb 05 16:17:12 wordToDaBird: You should ask JakeWharton. He has strong opinions there. :D Feb 05 16:17:39 ^^' Feb 05 16:17:43 JakeWharton what are you opinions? Feb 05 16:17:56 im installing android studio on linux, any of you use this? this is mean when i write my app it will only work for android mobile phones? anyone who downloads its from google play for their iphone wont work? Feb 05 16:18:09 wordToDaBird: As far as I know, it won't really be needed once Android Gradle plugin 1.1 hits (which will be soon). Feb 05 16:18:30 TacticalJoke what will the plugin do? Feb 05 16:18:31 cnnx, are you kidding? Feb 05 16:18:50 The new version of the plugin allows running unit tests on the JVM. Feb 05 16:18:53 its my first time Feb 05 16:19:13 danijoo: sorry for my ignorance Feb 05 16:19:20 if you find an iphone with google play on it, make a photo please :p Feb 05 16:19:31 danijoo: ok cool.. i never own an iphone really Feb 05 16:19:41 danijoo: i didnt think they were compatible just confirming Feb 05 16:20:05 they are different systems. one app for android cant run on iOS and vice versa Feb 05 16:20:22 danijoo: so how do people deploy apps for multiple platforms Feb 05 16:20:29 TacticalJoke so when doing unit tests just run with JUnit? Feb 05 16:20:32 danijoo: this way im limited to only android users Feb 05 16:20:39 they write them from scratch for multiple platforms Feb 05 16:20:45 danijoo: ok Feb 05 16:21:01 TacticalJoke any clue on when that release might be? Feb 05 16:21:17 I would guess at less than two weeks. Feb 05 16:21:42 You could use Robolectric, or you could just run JVM tests that use Mockito. Feb 05 16:23:31 diegoaguilar: are you trying to get it to scan the device for media files ? Feb 05 16:24:07 wordToDaBird: What are you wanting to test using Robolectric? Feb 05 16:25:22 writing a new app and want to add unit tests, it seems at the moment the only advantage to roboelectric is the usage of running on jvm instead of emulator or device. Feb 05 16:26:24 TacticalJoke where are you reading to know that gradle 1.1 comes out soon? Feb 05 16:27:50 It's mentioned here: http://tools.android.com/tech-docs/new-build-system Feb 05 16:28:01 But I'm basing my "less than two weeks prediction" mainly on this activity: https://android-review.googlesource.com/#/q/project:platform/tools/adt/idea+OR+project:platform/tools/base Feb 05 16:28:08 "less than two weeks" prediction * Feb 05 16:28:14 cnnx: Yes, if you want to also write apps for iOS, you need to write a completely different app, unless you use something like Phonegap Feb 05 16:28:49 justJanne: okay Feb 05 16:29:20 Also, if you want to write an app for iOS, you need to pay 99$/year fee Feb 05 16:33:46 I think that it's $99/year just to keep existing apps in the store. Feb 05 16:33:55 per developer, not app, though Feb 05 16:34:11 how can I set as datasource to an Android MediaPlayer multiple files placed in raw Feb 05 16:40:52 why am i getting this from volley ? D/Volley﹕ [1] 6.onErrorResponse: AppController Feb 05 16:44:56 anyone managed to implement dialogs with variable length/entries? Feb 05 16:45:03 I am struggling a bit to write clean code, since you need to pass a String[] array with the labels and then do a switch (which) over the integer choice.. which is not flexible at all Feb 05 16:46:19 hi Feb 05 16:46:29 what is the best way to communicate sap with android? Feb 05 16:47:00 whats sap Feb 05 16:48:23 you mean SAP business software? Feb 05 16:49:15 shoot him! Feb 05 16:50:39 ^ Feb 05 16:50:46 sap doesnt communicate with android Feb 05 16:50:48 Everyone who dares to use SAP needs to be shot Feb 05 16:51:24 t0th_-_: sorry dude Feb 05 16:52:19 t0th_-_: I think you may need to ask a more specific question Feb 05 16:54:23 Anyone have any experience with subtitles in HLS video? Feb 05 17:00:17 is it safe to call notifyDataSetChanged() on a thread other than the UI thread? Feb 05 17:00:57 no Feb 05 17:01:06 thats my bug :P Feb 05 17:01:06 youll get an error Feb 05 17:01:19 no actually i simply lose my entire UI but nothing else lol Feb 05 17:01:36 youll get a CalledFromWrongThreadException Feb 05 17:01:49 you just cant see it because its in a thread that just dies Feb 05 17:07:12 Can one cursor be used for 2 lists or do I have to create a new one for every? They are on the same activity and contain the same data Feb 05 17:09:16 nvm. I have a better solution for thsi Feb 05 17:09:42 https://www.youtube.com/watch?v=iHoEyYcCBW4 - Reverse Engineering a Mass Transit Ticketing System - TrainHack Feb 05 17:12:33 I want to loop through the string array. In each loop I want to wait 1 sec and then to change the text of Large Text. How to do it? Feb 05 17:14:25 huh Feb 05 17:14:45 probably you would need some handler Feb 05 17:14:53 as you can update only in ui thread Feb 05 17:15:08 demahum: probably nicest way is to simply create a Handler and give it a Handler.Callback instance in its constructor. Then use mHandler.sendEmptyMessage(0) to start it off and inside your Callback put mHandler.sendEmptyMessageDelayed(0, 1000); Feb 05 17:15:57 Napalm: Thanks. :) Feb 05 17:15:58 demahum: now in your callback you can increment your counter and update your TextView.. when your counter reaches the length of the array dont call the last sendEmptyMessageDelayed and it will stop Feb 05 17:16:12 use the counter as a index into your array Feb 05 17:16:27 Napalm: Of course. Thanks. :) Feb 05 17:34:10 Hello. Feb 05 17:35:44 I wanna try making a "rad" android program with a framework for starters (probably phonegap+cordova+choudb lite or puchdb). But I want to have the SDK, and I need to do a very stupid question, if you want to work with let's say api 16 onwards, for targeting from 4.1 to 4.4, do I need the api 16 sdk? or can I compile with api 21 sdk in "compatibility" mode? Feb 05 17:37:51 you just compile with api 21 Feb 05 17:38:19 and somewhere in phonegap/cordova.. you make sure it sets the minSdkVersion in the AndroidManifest.xml file to 16 Feb 05 17:38:49 Thanks. if I do not depend on any api 21 specific call/change I can just compile with 21 for 16 onwards. Feb 05 17:38:55 in cordova I know you can add build steps that will run after it generates the basic project and you could modify the file yourself Feb 05 17:39:01 I guess then that there have not been big deprecations between apis... Feb 05 17:39:26 Or, in good Java fashion, anything deprecated is still left in the API for 20 years to come Feb 05 17:40:01 ^exactly Feb 05 17:40:40 I got an simple action bar on my activity with the app icon on the upper left corner (basic actionbar), it it possible to detect a click on the icon ? (it's for an easter egg) Feb 05 17:40:46 But remember that 21 added some security restrictions, so you might want to test stuff like file access etc. Feb 05 17:41:08 blusky: ActionBar.setOnNavigationClickListener Feb 05 17:41:33 or use onOptionsItemSelectedListener with item.getItemId()==android.R.id.home Feb 05 17:41:50 justJanne: Ah, right. thanks Feb 05 17:42:06 justJanne: gonna try that :) Feb 05 17:42:42 well android is a bit less strict about deprecation than java. some deprecated things might work differently in the future Feb 05 17:43:51 http://stackoverflow.com/questions/28350149/how-to-properly-change-current-track-for-an-android-mediaplayer-instance Feb 05 17:46:13 diegoaguilar: how are you using your updateTime Runnable? Feb 05 17:46:44 when I do play Feb 05 17:46:52 how Feb 05 17:46:55 not when Feb 05 17:47:00 I start a new thread Feb 05 17:47:02 executing it Feb 05 17:47:16 I also tried to stop that thread when changing sone Feb 05 17:47:17 song* Feb 05 17:47:22 but got not results Feb 05 17:47:26 ugh Feb 05 17:48:21 Napalm, this is my main activity java file Feb 05 17:48:21 http://www.hastebin.com/joyexumiki.avrasm Feb 05 17:48:35 ok, first of all, why are you calling selectTrack? Feb 05 17:48:52 I really thought it was possible too Feb 05 17:49:04 as I saw the create method actually passes in an integer Feb 05 17:49:27 as second argument Feb 05 17:49:38 diegoaguilar: but what is R.raw.conrnfield Feb 05 17:49:49 does it have multiple media tracks? Feb 05 17:50:16 R.raw.cornfield is a single mp3 song Feb 05 17:50:19 in raw folder Feb 05 17:50:24 so, no tracks Feb 05 17:50:29 named cornfield.mp3 Feb 05 17:50:30 other than 0 Feb 05 17:50:32 I have determined that I can't access variables in an Asynctask on the PostExecute method that are for the class. How come this is the case? Feb 05 17:50:33 no, not tracks Feb 05 17:50:36 so what are you doing? Feb 05 17:50:58 where Feb 05 17:51:02 :| Feb 05 17:51:26 you are calling selectTrack(2); when it doesnt have a track 2.. and the code error's Feb 05 17:51:41 There isn't some Constant to access with the android xml namespace is there? To access http://schemas.android.com/apk/res/android programatically Feb 05 17:51:41 http://www.hastebin.com/vasijorido.avrasm Feb 05 17:51:44 Ok, so how can I load another file existing in the same folder Feb 05 17:51:48 look at your stack trace Feb 05 17:51:54 AndreYonadam: what do you mean? Feb 05 17:52:23 diegoaguilar: this should put you in the right direction https://github.com/slightfoot/android-media-player-example/tree/master/app/src/main/java/com/dd/mediaplayerexample Feb 05 17:53:03 lasserix: So I have a class that implements an ASyncTask that I pass my activity's context through. That context gets stored in a global variable. But when the AsyncTask runs I can't access that global variable. Feb 05 17:53:10 AndreYonadam: if your like AsyncTask mAsyncTask, you should be able to access public members ie mAsyncTask.mPublicField or package protected (if in same package). Otherwise, the idea is to pass a reference to your async task that you call on in post exectue eg onPostExecte(Result T) { mActivityReference.handleResult(t); } Feb 05 17:53:28 AndreYonadam: post your code Feb 05 17:54:26 JakeWharton: I noticed the inPurgeable issue is closed, don't suppose there has been any changes since that would allow me to set inPurgeable and inInputShareable? https://github.com/square/picasso/issues/11 Feb 05 17:54:52 AndreYonadam: https://github.com/slightfoot/android-asynctask-correctly/blob/master/AsyncTaskCorrectly/src/com/demondevelopers/asynctaskcorrectly/MainActivity.java Feb 05 17:55:06 AndreYonadam: but of a hack, but was just an example for someone else here in the channel a long ass time ago Feb 05 17:55:11 groxx: no Feb 05 17:55:47 JakeWharton: square should add cert pinning to OkHttp Feb 05 17:56:01 lasserix: http://pastebin.com/JVMMiKNV Feb 05 17:56:19 alas. on tiny Gingerbread devices, it has an enormous benefit for displaying a bunch of bitmaps. I can show ~one large image without those set before I can't allocate any new ones (probably fragmentation, I have plenty of heap space). Feb 05 17:56:29 _with_ both of those set, I can do a couple hundred on average Feb 05 17:56:31 Napalm: that method to save the async task is not supposed to be used these days... Feb 05 17:57:09 I can use a thread instead Feb 05 17:57:23 Napalm: why? you pin the cert to an SSLSocketFactory and then just give that to OkHttp Feb 05 17:57:23 lasserix: i know, i said its old.. just you getLastCustomNonConfigurationInstance instead with FragmentActivity/ActionBarActivity Feb 05 17:58:04 AndreYonadam: what's your problem here? and really you should try using retrofit, makes all of this entire class into ~ 3 lines of code Feb 05 17:58:07 JakeWharton: just ends up being a lot of boiler plate, that sounds like a neat feature that OkHttp should have Feb 05 17:58:22 JakeWharton: if I were to experiment a bit with which flag (or both) is helping, and how much (e.g. fork picasso and add it myself), is there a chance it would get pulled in? they unfortunately seem a bit like voodoo to me, but they've been working without crashes on a few hundred devices, so I think they're at least _safe_... Feb 05 17:58:34 lasserix: What is retrofit? Feb 05 17:58:53 groxx: inPurgable is deprecated Feb 05 17:58:54 lasserix: http://square.github.io/retrofit/? Feb 05 17:59:00 y Feb 05 17:59:07 JakeWharton: yes. in lollipop. it works fine in gingerbread. Feb 05 17:59:08 Thanks I'll take a look Feb 05 17:59:19 it works fine in lollipop too Feb 05 17:59:53 having files in a raw folder Feb 05 17:59:56 JakeWharton you don't like flow? Feb 05 17:59:57 raw named folder Feb 05 17:59:58 should I read that as a "no" because it's deprecated then? Feb 05 18:00:06 Afzal: no Feb 05 18:00:09 how can I get URI for any file located there Feb 05 18:00:10 ? Feb 05 18:00:12 Why? Feb 05 18:00:39 because it was written by an idiot (aka me 18 months ago) Feb 05 18:00:39 it's a bit of an edge case, and mostly for old small devices, so I'd be fine with that. just trying to avoid a bunch of work when I could just fork it for my own use. Feb 05 18:00:45 Loool Feb 05 18:01:09 Do you absolutely recommend against fragments? Feb 05 18:01:51 diegoaguilar, thats a secret Feb 05 18:02:19 want me to share it? Feb 05 18:03:41 JakeWharton: ^ in case the messages were missed Feb 05 18:04:01 fragments are fine if you have only like three screens Feb 05 18:05:18 Lol well that settles it. Feb 05 18:05:53 thanks to JakeWharton I have managed to never learn fragments , I'll try it in my next app maybe Feb 05 18:06:12 they're annoying Feb 05 18:06:15 they should be so much more useful Feb 05 18:06:20 ^^^^^ THSI Feb 05 18:06:22 *THIS Feb 05 18:06:29 they're not that bad Feb 05 18:06:29 Learning them is kinda unavoidable since there’s no real alternative at the moment Feb 05 18:06:39 jaana http://corner.squareup.com/2014/10/advocating-against-android-fragments.html Feb 05 18:06:41 it's just an annoying lifecycle Feb 05 18:06:47 jaana, just use views ;) Feb 05 18:06:50 it’s really annoying to deal with all the overhead of an annoying API Feb 05 18:06:58 and sometime unexpected behaviour Feb 05 18:07:00 Afzal: I’m aware of this, it’s just not clearly better than fragments IMO Feb 05 18:08:11 I usually avoid convenience API's Feb 05 18:08:36 the whole java language a convenience api over the bytecode ;) Feb 05 18:08:37 What convenience APIs? Feb 05 18:08:43 Lol Feb 05 18:08:47 is a* Feb 05 18:08:53 like fragments and asynctask and actionbar Feb 05 18:09:00 I don't use those Feb 05 18:09:06 huh? Feb 05 18:09:19 hmm. I wouldn't really consider those "convenience" apis. Feb 05 18:09:21 they can all be done without those API's easily Feb 05 18:09:42 shmooz so you use executors and threads directly? Feb 05 18:09:44 Yes, they shouldn’t be part of the system, but of libraries, that provide them. Feb 05 18:09:52 Afzal: I prefer to yes Feb 05 18:10:11 Depending on the use case, that's not bad but sometimes you just want to do one thing Feb 05 18:10:17 JakeWharton: would a setPurgeableAndShareable(true) thing likely be rejected then, since they're deprecated? this is a bit of an edge case for old devices, so I'd be fine, just hoping to avoid wasting some time if there's a clear 'no' in there. Feb 05 18:10:18 But they should be properly implemented. Libs should allow you to write easy code, without having to deal with the fragment lifecycle or such stuff Feb 05 18:10:41 groxx: it's unlikely to play nicely with other features of the library Feb 05 18:11:04 diegoaguilar: i answered your question on StackOverflow Feb 05 18:11:26 ActionBar is as much of a convenience API as EditText though Feb 05 18:11:49 JakeWharton: gotcha. I haven't figured out the internals yet anyway. thanks :) Feb 05 18:12:03 groxx: do you also write in assembly to avoid convenience programming languages? Feb 05 18:12:21 thepoosh: actually yes I'm going back in that direction for fun :) Feb 05 18:12:27 Hey guys one quick question, i still dont know when to use fragments and when activites ^.^ . Is it some kind of a normal if i have StartupActivity and then two fragments one is for Login screen and other for Registration screen or should i have both this activites :)? Feb 05 18:12:29 oh god Feb 05 18:12:35 I love ASM Feb 05 18:12:43 you're are terrible person Feb 05 18:12:47 ASM sucks Feb 05 18:12:54 thepoosh: only when nobody pays me :) I haven't kept up though - that seemed a bit random? Feb 05 18:12:55 i hope you feel bad Feb 05 18:13:19 well at least when the machines take over the world they will let me live Feb 05 18:13:28 what's wrong with convenience api? Feb 05 18:13:34 shmooz: lol Feb 05 18:13:46 shmooz so you don't use retrofit then? Feb 05 18:14:03 no, httpURLConnection Feb 05 18:14:05 do you use BuffereReader? Feb 05 18:14:18 Probably one of the most convenient libraries out there Feb 05 18:14:22 but I will try OkHttp next time Feb 05 18:14:33 x86 ASM sucks, but DLX ASM is amazing Feb 05 18:14:35 because I hear it's so fast Feb 05 18:14:40 Anyone :)? Feb 05 18:14:41 Do you use byte[] for everything? Feb 05 18:14:44 i only learned MIPS ASM Feb 05 18:14:47 DLX? Feb 05 18:14:47 LOLLL Feb 05 18:15:13 huh. hadn't heard of that one (just looked it up on wikipedia :p) Feb 05 18:15:14 ARM extends MIPS extends DLX Feb 05 18:15:26 hmmm Feb 05 18:15:28 LOL? Is that Logical shift left? Feb 05 18:15:42 No, that would be SLL or SLLI Feb 05 18:15:51 ArcaneWater: there's no clear answer there :) if you want to have complex transitions between the two screens (or want the actionbar to stay still while other things move), you probably want fragments / do it by hand. Feb 05 18:16:16 groxx okay thanks :) Feb 05 18:16:17 ArcaneWater: otherwise activities are a little bit simpler, as long as they fit your needs Feb 05 18:16:30 ArcaneWater, the traditional way would be to just have separate activities for the two. Or what groxx said Feb 05 18:16:54 Groxx i have no problems with fragments but i dont realy have feel when activity or fragment ^^ Feb 05 18:17:36 Typically, very light activities, put your stuff in fragments Feb 05 18:18:18 ArcaneWater according to Dianne Hackborn at Google i/o last year, always have fragments inside activities. To allow moving things around later Feb 05 18:18:44 ....but you could also substitute fragments for views in that statement I guess Feb 05 18:19:34 Fuuuuu, it's all so confusing when going against fragments Feb 05 18:21:36 thanks Napalm Feb 05 18:21:57 diegoaguilar: read your PMs Feb 05 18:24:23 Anyone here have experience with publisheradview? Feb 05 18:24:38 I'm getting complete device lockups when calling loadAd a lot Feb 05 18:25:27 my problem ist that Android Studio causes Bluescreen every time Feb 05 18:25:46 I'm using Windows 8.1 Pro and migrated from Eclipse to Android Studio. But if i start Android Studio, "indexing" is going on and then thousand terminal windows pop up(from the aapt.exe). Then the bluescreen appears.(SYSTEM_SERVICE_EXCEPTION, event viewer mentions "Microsoft-Windows-Kernel-Power") I set JAVA_HOME to my jdk path and reinstalled Android Studio. It didn't help. Feb 05 18:26:43 How about ANDROID_HOME? Feb 05 18:27:51 One more question how is now with these ActionBars should we just use new XML file and load custom or just like normal and use style file to color it for lolipop? Feb 05 18:29:31 ArcaneWater: "how is now with these ActionBars should we just use the new XML file"? Feb 05 18:29:37 don't quite get what you are asking Feb 05 18:30:02 yiati yea i saw thath some of them uses layout file where they declare toolbar and then they include it in main activity layout Feb 05 18:30:37 yep Feb 05 18:31:08 ArcaneWater: Toolbar is a "normal" view version of ActionBar. it's a different thing entirely. Feb 05 18:31:18 ArcaneWater: https://chris.banes.me/2014/10/17/appcompat-v21/ Feb 05 18:31:25 ^ That's a good read Feb 05 18:33:31 yiati so something like that api < 11 then actionbar Feb 05 18:34:05 ArcaneWater, no, android.support.v7.widget.Toolbar Feb 05 18:34:13 v7 Feb 05 18:38:24 Napalm, should change nick to facepalm, it's more appropriate of what goes on ;-) Feb 05 18:38:42 yea ;) Feb 05 18:38:55 Napalm get any sleep yet :D Feb 05 18:39:27 nope Feb 05 18:39:32 android home? Feb 05 18:39:41 java_home is right Feb 05 18:39:48 im going for a mega day Feb 05 18:39:50 lol Feb 05 18:39:57 Hello Feb 05 18:40:48 Napalm resetting the clock ? Feb 05 18:41:02 I have programming experience at an beginner-medium level for most languages but diving into the android studio for the first time I am lost, which book do you recommend for someone to build an application that accesses mysql databases? Feb 05 18:41:19 g00s: something like that Feb 05 18:44:27 My location: Toronto, Canada Feb 05 18:44:44 Oh lol Feb 05 18:45:17 Why would an irc client have this option to share location Feb 05 18:45:31 dunno. Feb 05 19:01:18 Afzal: for inverse-stalking Feb 05 19:02:07 Afzal: for inverse-stalking Feb 05 19:06:51 Yello, can the same sender id be used for two different google play apps? Feb 05 19:06:58 eg the same console project? Feb 05 19:13:12 Bantalon: I think so? apps can receive gcm from multiple senders. unless you're referring to something else. Feb 05 19:15:00 i mean the same sender sending to multiple apps? Feb 05 19:19:12 Bantalon: yeah. but I would think the reverse applies too, so each sender to an app doesn't have to make another sender ID. I could easily be wrong though. Feb 05 19:19:59 groxx: I can't seem to link the same sender id Feb 05 19:20:44 ¯\_(ツ)_/¯ Feb 05 19:21:17 are they signed with the same key? that may be a requirement Feb 05 19:22:24 keystore? Feb 05 19:22:26 no two different ones Feb 05 19:22:30 heh np though Feb 05 19:22:32 i'll just setup two apps Feb 05 19:29:56 is it advisable to have all my functions in a separate .java file? Feb 05 19:31:11 I'm gonna say "yes". one function, one file. Feb 05 19:31:33 1F^2 Feb 05 19:31:48 one function per file? that seems a bit excessive Feb 05 19:32:49 I was thinking just have all of my functions in one file, separate from the mainActivity Feb 05 19:33:49 does picasso automatically use okHTTP? or do I have to set it in the dependencies { in the build.gradle file? Feb 05 19:33:58 you have to add the dependency Feb 05 19:34:06 it will use it if it is present Feb 05 19:34:09 but it's not a strict requirement Feb 05 19:34:50 is one function per file more efficient than having it scan one big file for a particular function? Feb 05 19:34:58 thanks JakeWharton . Just out of curiosity, what does it use if this isn’t specified? It has to use some HTTP client when loading images from urls right? Feb 05 19:35:07 java.net.HttpURLConnection Feb 05 19:35:49 does java.net.HttpURLconnection implement caching? like looking at the headers and etags of the files and cache them as such? Or is it only okHTTP? Feb 05 19:36:01 it has caching as of 4.0 and up Feb 05 19:36:20 but I should use okHTTP anyways? I don’t know why, but everyone seems to recommend it Feb 05 19:36:30 it's massively superior Feb 05 19:36:34 ok Feb 05 19:38:08 Is there no way of publishing your game with Gmae Services WITHOUT including achievements? :/ Feb 05 19:38:12 my game pretty much has no achievements Feb 05 19:38:16 and it doesn't make sense to have any Feb 05 19:38:31 not sure if i can jstu add place holders or something or do i actually have to add achievements in? Feb 05 19:40:08 Achievement unlocked: opened game Feb 05 19:40:15 :/ Feb 05 19:40:19 wel this be a hassle Feb 05 19:40:22 i need 5 at laest Feb 05 19:44:02 Is it ok to use placeholders? Feb 05 19:44:11 or can the app get rejected for achievements that aren't in the game? Feb 05 19:44:20 maybe i just add some confusing ones that seem very hard to unlock Feb 05 19:44:31 "Finish last boss" in tetris Feb 05 19:47:24 lol i have no idea what im doing Feb 05 19:47:37 Just giving users points and whatnot Feb 05 19:47:42 "Save and add another achievement" Feb 05 19:48:09 Love the arbitrary amount of 5 achievements points having to get distributed Feb 05 19:51:13 JakeWharton there maybe? At travis what you do when your build fail because of app:connectedAndroidTest ? You need to start emulator? Feb 05 19:51:23 yes Feb 05 19:51:28 or not run connected check on Travis Feb 05 19:51:46 for some libs we just run 'check' https://github.com/square/assertj-android/blob/3ed0c109b3e495af85ba03ad8c2c2c4496a3ce88/.travis.yml#L19-L20 Feb 05 19:54:26 JakeWharton thanks Feb 05 20:05:12 Is it possible to animate a view to expand to fill the entire screen, even if it is nested inside two linear layouts Feb 05 20:05:50 make another view that spans the entire screen and animate one into the other Feb 05 20:06:57 should setIndicatorsEnabled(true) show the little debugging triangles when using java.net.HttpUrlConnection? or do I have to use okHttp for some reaon? Feb 05 20:07:02 how would i animate one into the other? Feb 05 20:07:04 picasso Feb 05 20:07:10 yes, it works for both Feb 05 20:07:51 the_fog, with animations Feb 05 20:08:39 was expecting that :) thanks Feb 05 20:10:18 I am having the exact same problem as at this SO: http://stackoverflow.com/questions/27633749/can-shared-element-transitions-work-for-fragments-in-different-containers Feb 05 20:10:50 does anyone have a solution? Mount says it can be done with "regular Transitions" rather than "fragment transitions", but what does he mean? Feb 05 20:18:33 brb Feb 05 20:19:20 Can somebody give me some pointers as to how to get started with 2d game development on Android? Feb 05 20:20:45 and were back lol Feb 05 20:21:52 I'm looking for a tutorial on something along the lines of a 2D no-reverse sidescroller. Feb 05 20:23:46 Xenoth: its the same as most platforms Feb 05 20:24:01 hello, does something like a lightweight layout editor/viewer exists somewhere? Feb 05 20:24:25 You have your game objects with their x,y properties and other attributes. You use Canvas to draw these to a Bitmap. This Bitmap is displated Feb 05 20:24:27 displayed Feb 05 20:25:34 pakcjo: you mean outside android studio? Feb 05 20:25:49 any ideas on that transition problem? Feb 05 20:26:12 Napalm: Then I'm assuming your normal FPS limiter and run/update functions, background images, etc? Feb 05 20:26:35 jpiche: yes, it seems that my pc doesn't have enough ram to even start android studio... it just suffers from a slow and painful death Feb 05 20:26:50 Xenoth: to get 2D hardware acceleration you'll need to use a SurfaceView in your Android layout. you call yourSurfaceView.getHolder().addCallback() and the OS will call your callback when the surface is created and destoryed. you can lock the Canvas in the SurfaceHolder given to you at a fixed rate.. by issuing your drawing operations on that Canvas you'll get 2D Accel Feb 05 20:27:21 Xenoth: lots of third party projects exist to help with game development, but android core libraries don't have any of that stuff built in Feb 05 20:27:33 pakcjo: You don't have 650MB free? :\ Feb 05 20:27:39 jpiche: I have an ImageView and TextView, layout is ok but layout-lang isn't, there's a huge space between image and text (should be right next to each other) Feb 05 20:27:42 Xenoth: yea, just spin up a Thread and run your code to lock and draw the canvas. pay attention to Activity lifecycle events to shut down your thread and clean up Feb 05 20:28:01 Xenoth: I have 2GB on this pc Feb 05 20:28:06 pakcjo: I'm sorry... android studio's layout editor works pretty well so I've never looked for an alternative Feb 05 20:28:16 jpiche: thanks Feb 05 20:28:33 Xenoth: it's a laptop... Feb 05 20:29:15 yeah, 2gb would be pretty hard for Studio :\ Feb 05 20:29:17 pakcjo: Ahh. Feb 05 20:29:24 Xenoth: if you build game modular enough.. you can later swap out your SurfaceView with a TextureView or GLSurfaceView to get even more Accel Feb 05 20:29:37 don't suppose you can buy more ram? it's probably dirt cheap as long as it can make use of it. Feb 05 20:30:05 Xenoth: also remember you can use the NDK to run com;iled C/C++ directly on the CPU to get the most perf Feb 05 20:30:50 groxx: maybe, I don't know, anyway I don't think I could get much more ram, chances are studio would still kill my box :( Feb 05 20:31:18 I don't think my game will need that much performance. Just a few objects drawn at a time. Thanks for the tips, Napalm Feb 05 20:31:52 Napalm, Xenoth: careful with canvas & hw accel, you won't get it if you're using lockCanvas/unlockCanvasAndPost Feb 05 20:32:02 Xenoth: You might want to start with a TextureView on use its lockCanvas/unlockCanvasAndPost to do your rendering Feb 05 20:32:17 bpe: oh no? Feb 05 20:32:22 yup Feb 05 20:33:08 Also drawing a complex scene will drive you crazy in terms of performance with a canvas, even with a surfaceview Feb 05 20:34:14 the solution is OpenGL, but it's not straigth-forward and if you've never played with it, you can count months of learning Feb 05 20:35:22 adq: I think thats just the operations you are using. and any Java overhead Feb 05 20:35:40 for sure it depends on the op Feb 05 20:35:51 drawArc is slower than drawLine per example Feb 05 20:35:52 adq: i just checked lockCanvas on TextureView is HW Accel.. SurfaceView maybe not so Feb 05 20:36:07 it's the canvas returned by lockCanvas which is _never_ hw accel Feb 05 20:36:13 this IS Feb 05 20:36:14 the view can still be accelerated Feb 05 20:36:23 but not the drawing inside the canvas returned by lockCanvas Feb 05 20:36:39 the drawing operations go through the Android HW pipeline Feb 05 20:37:07 if you draw into the canvas returned by lockcanvas, there is no hw pipeline Feb 05 20:37:17 same thing, said differently Feb 05 20:38:03 but the canvas you draw into, might benefit of hw accel when it will be displayed on your screen Feb 05 20:38:14 (to avoid ambiguity) Feb 05 20:38:25 there are some method to know if a canvas, a view, etc.. is hw accel Feb 05 20:39:30 Canvas has isHardwareAccelerated API Feb 05 20:40:27 <_Auron_> with more than 5-10 objects you're going to want to use OpenGL Feb 05 20:40:46 yeah, few circles, few rect, few arcs and you can say goodbye to your FPS Feb 05 20:40:54 not even counting interactions and other computations Feb 05 20:41:10 <_Auron_> and if you have a live action 2D sidescroller with a tilemap and collision detection? openGL if you want it to be playable in realtime :) Feb 05 20:41:12 and you can be sure vsync miss-rate will dramatically increase too lol Feb 05 20:41:19 <_Auron_> haha yeah Feb 05 20:41:20 adq: if your using the drawing ops ofc Feb 05 20:41:33 even if you're drawing bitmaps, especially if they are huge Feb 05 20:41:38 and change often Feb 05 20:41:51 "been there, done that" Feb 05 20:42:08 hmm Feb 05 20:42:49 I dont disagree, i've been there, something doesnt smell right though Feb 05 20:43:17 he ( Xenoth ) could use a 3D engine, like andengine or libgdx, as a compromise, i'm not familiar with engines but it helps Feb 05 20:43:45 as I was saying NDK Feb 05 20:43:49 Napalm, feel free to point what does not smell right Feb 05 20:44:03 we're here to discuss, be helped, help, learn, etc Feb 05 20:44:03 i mean blitting itself isnt that painful Feb 05 20:44:04 :) Feb 05 20:44:24 Yeah, while googling I came across a lot of people swearing by AndEngine Feb 05 20:44:33 i might port my 2d platformer to Android Feb 05 20:44:34 using the ndk would certainly help for fast computation Feb 05 20:44:37 for sure Feb 05 20:44:38 i did my own rendering engine Feb 05 20:45:07 adq: https://www.youtube.com/watch?v=xcfcb-mAYXs Feb 05 20:45:21 nice Feb 05 20:45:35 this was 2 years ago Feb 05 20:45:46 <3 the parallax Feb 05 20:45:48 was working on collision detection at the time Feb 05 20:46:16 collision detection from easy to hard: rectangle, circle, pixel, etc.. Feb 05 20:46:17 :) Feb 05 20:46:33 yup i find pixel easier Feb 05 20:46:37 i was using bit masks Feb 05 20:46:42 <_Auron_> I still haven't finished the last project I was dabbling in with my game engine Feb 05 20:46:43 xor is your friend Feb 05 20:47:01 <_Auron_> https://www.youtube.com/watch?v=FCTMP435UCQ Feb 05 20:47:16 nice name _Auron_, stroids ^^ Feb 05 20:47:39 <_Auron_> hehe yeah Feb 05 20:47:48 _Auron_: for some reason that reminds me of Roboton or Llamatron Feb 05 20:48:03 you used some particles for the shoots lol Feb 05 20:48:06 <_Auron_> Stroids was my first OpenGL game and I made it as a finalist in Google's Android Developer Challenge 2 (in 2009) Feb 05 20:48:14 _Auron_: https://www.youtube.com/watch?v=SM2TZTGc5F8 Feb 05 20:48:26 How to change TextView inside ViewPager element -> i should implement method in Fragment or in activity that contains ViewPager ? Feb 05 20:48:41 _Auron_: skip past the loading http://youtu.be/SM2TZTGc5F8?t=1m25s Feb 05 20:48:42 <_Auron_> Napalm: yeah that looks just like Robotron Feb 05 20:48:55 <_Auron_> with the epilectic flashing Feb 05 20:48:56 i use to play this all the time Feb 05 20:49:03 i always wanted to make a shoot'em'up Feb 05 20:49:07 i suppised i dont have brain damage from it Feb 05 20:49:10 but ... lot of but :) Feb 05 20:49:40 Narzew: just set the text? you dont need fragments Feb 05 20:49:47 <_Auron_> I also made a basic limb animation editor with my game engine: https://www.youtube.com/watch?v=yiSx_LabCtA (skip toward the end to see it, I'm mostly talking and putting a character together) Feb 05 20:50:05 I would love to port LLamatron to Android Feb 05 20:50:09 <_Auron_> but alas I haven't done any game dev for a while, only just recently got my first actual programming job Feb 05 20:50:17 Anybody used AndEngine successfully with Android Studio? Feb 05 20:52:06 Xenoth: be hard core.. write it yourself :) librarys are for wusses :D Feb 05 20:52:11 j/k Feb 05 20:53:01 :P Feb 05 20:53:32 ive really got the programming urge to write a 2d game for android Feb 05 20:53:38 <_Auron_> I wrote my own over the years so I know exactly how everything works, and to improve myself as a developer Feb 05 20:54:30 I think I'll pass on the engine for now, and try rolling my own Feb 05 20:55:24 how do you rename a package on android studio? Feb 05 20:55:50 <_Auron_> Xenoth: it's a fun learning experience Feb 05 20:56:10 <_Auron_> nehe.gamedev.net is a decent start although it's a bit dated now Feb 05 20:56:26 <_Auron_> at least with OpenGL Feb 05 20:56:40 nehe is clearly a reference Feb 05 20:57:55 <_Auron_> yeah I suppose you're right :P Feb 05 20:59:14 http://minotaurproject.co.uk/Minotaur/minotron.php llamasoft have done a remake for iOS but not for Android! :'(((( Feb 05 21:00:13 <_Auron_> Napalm: all I need are assets and I could make it :D if I had the time, anyways :| Feb 05 21:01:38 Hey guys, I want to create an app. But I don't have any programming experience, what is the best way to do it? Feb 05 21:01:44 anybody with experience on gradle here? Feb 05 21:01:45 I was looking at somehting like appiory. Feb 05 21:02:07 I would like to know if it's possible to control the name of the "values.xml" file produced when the values-*/*.xml files are merged ? Feb 05 21:02:55 LiohAu: huh? when they are merged they no longer exist Feb 05 21:03:25 LiohAu: they become a binary file in your APK called resources.arsc Feb 05 21:03:31 SupaYoshi: maybe try here:http://www.reddit.com/r/androiddev/comments/2utw1z/how_did_you_teach_yourself_android/ Feb 05 21:08:48 thanks Feb 05 21:08:56 Does anyone know how to rename a package on android studio? Feb 05 21:09:25 In an ImageView, how do I align? I can't see any xml attribute for that... http://developer.android.com/reference/android/widget/ImageView.html Feb 05 21:10:27 <_Auron_> jutsui: http://lmgtfy.com/?q=how+to+rename+a+package+on+android+studio Feb 05 21:12:10 Does anyone know what could be causing this error message? Invalid GCM API Key or C2DM Client Login Token (Bad Key). when trying to link a sender id? Feb 05 21:12:21 i'm using the correct one I got from my dev console, a 12 digit number Feb 05 21:12:29 11* Feb 05 21:13:27 do I need to upload an APK before I can link the sender id? Feb 05 21:13:44 Napalm hey man. How's the BBC app coming along? Feb 05 21:22:25 theblang: all done with that now, UK app is out.. on to bigger better things Feb 05 21:23:19 Napalm: i'm working on .aar no apk :( Feb 05 21:24:50 I have two .aar, and having res/values/values.xml in each makes problem when using them in Xamarin. Feb 05 21:25:57 Napalm: BBC news right? Feb 05 21:25:59 LiohAu: same diff once compiled. Feb 05 21:26:03 theblang: yus Feb 05 21:26:15 hm? no Feb 05 21:26:52 JakeWharton: using @Streaming in retrofit, can I clode the inputstream early to effectively cancel a long running request? Feb 05 21:26:56 close* Feb 05 21:27:01 yes Feb 05 21:27:05 LiohAu: hm, yes.. once your aar is compiled into an apk Feb 05 21:27:06 Napalm: sweetness. I'll be sure to leave a one star review with no comment :P Feb 05 21:27:12 perfection - thankyou Feb 05 21:27:28 thanks theblang >_> Feb 05 21:27:30 samskiter: Retrofit is streaming by default, FYI. The only time it buffers is when you enable logging. Feb 05 21:27:51 the @Streaming annotation forces streaming (thus disabling body logging, when enabled) Feb 05 21:27:54 Yes, but the .aar files are being used by Xamarin developers, so the apk generation differs a little bit from the classical one. Feb 05 21:27:59 JakeWharton: that should be in the docs Feb 05 21:28:03 as it is Feb 05 21:28:18 1% of people read the docs closely Feb 05 21:28:23 If I could rename the values.xml file when I produce one of the .aar it would prevent their issue in xamarin Feb 05 21:28:24 LiohAu: if you say so, it still has to be compiled into a resources.arsc Feb 05 21:29:06 JakeWharton: interesting. apparently i dint read the docs properly :) Feb 05 21:29:09 LiohAu: go file a Xamarin bug :P :D Feb 05 21:29:15 I assume, that in the end it becomes a resources.arsc, yes. But at the moment Xamarin is not able to merge two values.xml Feb 05 21:29:20 samskiter: it's fine. you're not hurting anything by specifying it Feb 05 21:29:24 (two values.xml coming from two .aar) Feb 05 21:29:33 LiohAu: bug in Xamarin then Feb 05 21:29:41 JakeWharton: “Treat the response body on methods returning Response as is, i.e. without converting getBody() to byte[].” that’s the docs on streaming. maybe it could say there too that its just the default Feb 05 21:29:49 I can, but it won't solve my issue right now Feb 05 21:29:56 ah, uyeah Feb 05 21:29:58 that too Feb 05 21:30:03 i forgot it buffers if you return Response Feb 05 21:30:14 maybe an ugly fix would be to find a way to tell gradle "hey don't use values.xml but values2.xml" ? Feb 05 21:30:23 alright, i am still fairly new to gradle/groovy, but I have a library project that has .xml files (non android related) under src/main/resources. I want these available to my tests without having to duplicate them. What do i need to do to get this to work? Feb 05 21:30:28 it's streaming by default to the Converter Feb 05 21:30:48 How does gradle know that it should merge resources in a file named "values.xml" and not "foo.xml" ? Feb 05 21:31:41 JakeWharton: so it’s streaming if you use callbacks? Feb 05 21:31:42 when i duplicate the resource folder from main/resources, to test/resources they are added to build/test-classes which is where i need them, but I don't want duplicate files. Feb 05 21:32:13 samskiter: if you use Java types (like through Gson) it will stream the body directly to the converter Feb 05 21:33:04 JakeWharton: ill go read the docs some more.... Feb 05 21:33:05 :P Feb 05 21:34:32 I'm trying to use a Toolbar instead of an ActionBar, I'm wondering why isn't setTitle() not working? Feb 05 21:34:47 because setTitle goes to the window decor Feb 05 21:34:52 the Toolbar is not part of the window decor Feb 05 21:35:05 you can call Toolbar.setTitle instead Feb 05 21:36:07 KaylieG: you need to call setSupportActionBar(yourToolbar); Feb 05 21:36:53 oh sorry yes that's what i meant. I called setSupportActionBar(toolbar) and then set getSupportActionBar.setTitle("sdfsdf"); Feb 05 21:41:40 I'm so happy to have learned this about streaming and retrofit just now Feb 05 21:44:07 Hey guys, im failing hard at changing package name with android studio, any tips? Feb 05 21:45:08 a tip: formulate a specific question Feb 05 21:45:27 How to change package name in android studio? Feb 05 21:47:07 jutsi: there are a bunch of ways. I suggest reading some of the answers here http://stackoverflow.com/questions/16804093/android-studio-rename-package Feb 05 21:47:48 jutsi: in short, right click & select refactor Feb 05 21:47:48 guys any help on the toolbar settitle? i've googled a lot and apparently it should work Feb 05 21:49:36 jpiche i read, and in short the refactor doesn't do anything Feb 05 21:51:33 did you try making the new folder structure and just moving all the files? even if you had thousands of files, `mv` and `sed` would work Feb 05 21:52:15 jpiche i think i get it now, its the gradle that keeps forcing the old name.. gonna try renaming there Feb 05 21:52:57 so the refactor worked but the build failed? that's a different problem than the refactoring not working Feb 05 21:53:03 KaylieG, http://hastebin.com/ucalimusij.xml Feb 05 21:53:27 Extend all your activities from BaseActivity, and use the mToolbar object to interact with the toolbar Feb 05 21:53:39 don't worry about that setSupportActionBar stuff Feb 05 21:54:19 jpiche no i made a new package, moved everything in there, but it still kept somehow forcing the old package name, though it did install and run Feb 05 21:54:29 oh and you can call setContentFragment() if you don't like using onCreate like I do but that part's optional Feb 05 21:54:36 Does anyone know what could be causing this error message? Invalid GCM API Key or C2DM Client Login Token (Bad Key). when trying to link a sender id? Feb 05 21:54:39 pardon me for being an idiot, but im an eclipse user normally... just thought i'd learn android studio Feb 05 21:54:52 I'm usign the correct Project number as the sender id i'm trying to link Feb 05 21:54:54 but alas Feb 05 21:54:57 i get this error Feb 05 21:55:01 Afzal: yes that would work, but in my experience, if you're not doing anything crazy with the toolbar, setsupportactionbar helps keep code sane in larger projects Feb 05 21:55:53 With toolbar.xml: http://hastebin.com/ehucabunoc.xml Feb 05 21:56:32 jpiche, isn't Toolbar a much more flexible API than ActionBar because it's just another View? Feb 05 21:56:48 you can put anything in there and make it as complicated as you like Feb 05 21:58:08 yes it is. but if you're just trying to make a toolbar work like the actionbar and have a bunch of existing code calling getActionBar Feb 05 21:59:31 I do understand that defeats the purpose though Feb 05 21:59:34 shouldn't setTitle work though? I'm just using this toolbar for a single activity, and I'm adding edittexts into it and stuff Feb 05 21:59:53 for the remaining activities I'm currently still using the standard ActionBar Feb 05 22:00:23 jpiche yes it was the damn gradle, now it works like a whistle Feb 05 22:00:35 on one activity I decided to try out the new stuff and changed everything into recyclerviews, cardviews, floating action buttons and now the Toolbar Feb 05 22:01:58 KaylieG, is the toolbar you set in setSupportActionBar() present in the layout? Feb 05 22:02:00 jutsi: glad you got it working Feb 05 22:02:10 yeah Feb 05 22:02:28 does it need to be a separate layout file? Feb 05 22:02:34 jpiche and im glad you helped :) Feb 05 22:02:45 No it doesn't Feb 05 22:06:00 okay, after calling setTitle, see if getTitle gets you what you set. Feb 05 22:06:33 Could be that two ActionBars are being drawn on top of each other. Happened to me when I tried migrating one of my apps last year Feb 05 22:06:43 (well I mean, one actionBar on top of the other) Feb 05 22:07:30 Isn't it the project number you set as your Sender ID when you link one in your dev console? Feb 05 22:07:42 Or am I supposed to link some other value? Feb 05 22:08:09 supportActionbar.getTitle() is returning the correct title Feb 05 22:09:47 Then yes, you probably have another actionBar being drawn of top of another Feb 05 22:09:57 i tried making my theme for the whole application as notitlebar Feb 05 22:10:08 nevermind got it, it was in fact not the project number you link Feb 05 22:10:17 so that if there was an actionbar it should go away this time Feb 05 22:10:20 still no dice Feb 05 22:18:00 apart from that, i was wondering if I could go from a single line toolbar to a multiline toolbar with edittexts when i tap the floating action button? Feb 05 22:18:07 perhaps with some animation? Feb 05 22:21:48 i've been waiting a while for this UI book , hope its worth the wait :) http://www.peachpit.com/store/best-interface-is-no-interface-the-simple-path-to-brilliant-9780133890396 Feb 05 22:22:30 theoretically, caching should work the same for okHTTP and for httpURLConnection with picasso image loading right? Simply using one vs the other shouldn’t change caching behavior? or no? Feb 05 22:30:35 I figured out the problem, one of the child views was using match parent and that was overtaking the title space Feb 05 22:30:44 in_deep_thought: OkHttp's caching is smarter and more modern Feb 05 22:30:53 anyway to avoid preserve the title without losing match_parent? Feb 05 22:32:22 does String.format truncate or round? Feb 05 22:32:54 oops. asked in the wrong place. my bad Feb 05 22:33:34 KaylieG, you can use weight Feb 05 22:37:56 What makes OkHttp's caching smarter? I thought but just did it based on cache headera Feb 05 22:38:03 *headers Feb 05 22:38:06 it's three years newer Feb 05 22:38:24 supports more options, status codes, etc. Feb 05 22:38:40 fixes bugs in the AOSP implementation Feb 05 22:39:02 Nice, didn't realize that was another upside of using OkHttp Feb 05 22:39:03 <_Auron_> What's a way to modify the Actionbar title text size? Just themes/styles? Feb 05 22:44:00 _Auron_, customviews or even better: switch to toolbar Feb 05 22:44:32 Hello, I want to run adb commands in linux Feb 05 22:44:35 however I cant find its location Feb 05 22:44:45 I simply donwloaded the download studio bundle Feb 05 22:44:58 unzipped it and executed the android studio binary Feb 05 22:45:09 but I cant find a way to either run adb or gradle Feb 05 22:45:31 its in the android sdk folder Feb 05 22:45:56 no idea where this is located in linux. but I think its in the AS folder if you downloaded the bundle Feb 05 22:46:19 adb is in platform-tools folder Feb 05 22:47:11 the problem is that i cant really find such platform-tools folder Feb 05 22:47:35 I found out about this when i tried to run an app in my phone Feb 05 22:48:23 and didnt recognize my mobile Feb 05 22:48:26 are you sure you actually got the bundle, and not the standalone ide (means: does it work when running from the ide?) Feb 05 22:48:58 well I can code,compile and run virtual devices Feb 05 22:49:48 ah, i see. not sure where Android Studio puts the SDK on linux Feb 05 22:50:01 the platform-tools folder is in the sdk folder, wherever she may be Feb 05 22:50:43 android studio is a zip Feb 05 22:50:47 which I simply uncompress Feb 05 22:50:54 and look for the ide binary in bin Feb 05 22:50:55 lol Feb 05 22:52:13 but it would have downloaded the SDK in a wizard when you started it Feb 05 22:53:17 i would just run `find android-studio/ -name adb` and see if it's in there somewher Feb 05 22:54:10 Im pretty sure its just bundles inside the folder that you unzipped Feb 05 22:54:14 nope Feb 05 22:54:17 there must be an androidsdk folder or sth like that Feb 05 22:54:19 by any rason Feb 05 22:54:22 it takes all that stuff Feb 05 22:54:24 to HOME Feb 05 22:56:57 if you are linux, try mlocate adb Feb 05 22:57:22 or slocate, whatever you jave Feb 05 23:00:54 If memory serves me right, you only get the sdk manager and you download all platform-tools/sdk apis from that Feb 05 23:01:10 so open SDK manager in Android Studio and see what you actually have, adb is part of platform-tools Feb 05 23:08:38 hi guys.. is there a better way to apply a filter to a view than doing getBackground().setColorFilter inside onDraw? Feb 05 23:09:03 when I do that, onDraw gets called indefinitely Feb 05 23:13:35 is the best way to learn sqlLite the android docs? i dont have any sql knollege Feb 05 23:14:29 DadFoundMy no ... probably the sqlite website. you can get the sqlite binary for your pc and fiddle around yourself Feb 05 23:16:25 dad what platform do you have ? Feb 05 23:16:37 machine OS Feb 05 23:16:46 lol DadFoundMy ^^^ Feb 05 23:17:55 g00s: i have easy access to a windows machine and loonix, which ever is easier to learn it for Feb 05 23:18:29 i haven't used this since 2008, but it worked well then http://www.yunqa.de/delphi/doku.php/products/sqlitespy/index Feb 05 23:18:57 i honestly didn't even realize that it was used outside of android dev :/ Feb 05 23:18:59 a gui to make exploration a little easier. there are bunch of guis, most of the better ones cost $$$ though Feb 05 23:19:08 firefox also has a plugin Feb 05 23:24:30 anyone from Czech? Feb 05 23:25:01 android-dev: so is there some way in picasso, when loading from url, to load to disk as well as caching the file? Feb 05 23:25:25 i don't understand what that means Feb 05 23:25:56 JakeWharton: my understanding of caching, is that it saves the file + info somewhere right? Where exactly does it save it? Feb 05 23:26:05 in whatever directory you tell it Feb 05 23:26:14 or the one picasso picks by default Feb 05 23:27:28 does it save it as the file? like if it was a png file, would I now have a png file somewhere on my phone? Or does it save it in some weird cache format? Feb 05 23:30:36 sunrise calendar bought for >$100million? wtf Feb 05 23:30:38 are they crazy... Feb 05 23:32:45 Im using a mac and restarted it and today I'm getting various permissions problems when running git commands, is there something I have to do special? Feb 05 23:32:46 geniuses Feb 05 23:33:14 lasserix um, you can go into the disk utility and checkpermissions Feb 05 23:33:53 in_deep_thought: cache format Feb 05 23:34:00 but i've never seen that before, and believe me - i've seriosly fucked up my hfs+ - but thats pretty easy to do considering it such a shitty FS Feb 05 23:34:38 JakeWharton: are they all in the same folder then? And is it possible to have a seperate process save those “cached format” files to their original png format? Feb 05 23:34:58 i can sudo then it works, but that's kind of stupid Feb 05 23:35:19 and is that folder possible com.android.googlecamera? idk why it would be but those are the only cached files I can find Feb 05 23:35:25 lasserix weird. you use git-osx-installer ? Feb 05 23:35:39 in_deep_thought: it's in your app directory Feb 05 23:35:45 um some kind of xcode crap Feb 05 23:35:53 that's probably why Feb 05 23:36:00 usually apple git is pretty far behind Feb 05 23:36:36 if you get SourceTree its bundled with one you can put in your path, or you can use git-osx-installer for a newer one Feb 05 23:36:50 * g00s <3 SourceTree Feb 05 23:40:11 thanks Feb 05 23:41:08 how do I find my app directory? Feb 05 23:41:22 /data/data/package.name/ Feb 05 23:45:49 i didn't realize how difficult it would be to learn sqlite :/ Feb 05 23:45:56 i thought it would be like a 1 hour thing Feb 05 23:47:01 DadFoundMy: what do you want to use SQLite for exactly? Feb 05 23:47:29 i am making an school agenda book app Feb 05 23:48:17 https://twitter.com/matt_j2/status/563479553813659649 Feb 05 23:48:32 DadFoundMy: depending on what you need it for, it might just be best to read the Android API to learn how to interact with the database (querying for cursors etc) Feb 05 23:48:38 databases are kinda a whole other kind of programming, in a way. think of it like a spreadsheet though, that's basically all it is for simple purposes. Feb 05 23:48:51 :) Feb 05 23:49:05 or, once you have an idea of how Android apps use SQLite, you might consider using an ORM library like GreenDAO or ORMLite Feb 05 23:49:58 DadFoundMy you can also look at realm.io - but sql is pretty good to know Feb 05 23:51:02 g00s: first I've heard of this Realm business! Looks interesting... Feb 05 23:51:19 barbs hmm, maybe. on paper looks good, like lots of things Feb 05 23:51:23 yeah :) Feb 05 23:51:31 so far it's working in a toy app, but I haven't tried it in anything bigger. Feb 05 23:52:03 in a few places though, it definitely feels like it's not yet "ready". e.g. migrations are experimental and the API for them isn't even finalized. Feb 05 23:52:17 oh interesting, it doesn't even use SQLite... Feb 05 23:52:40 then there's their weird-ass code generation, where you declare attributes on "model" objects which aren't even used in the models it creates, wasting space. Feb 05 23:53:38 developed by Zynga I think? Feb 05 23:53:58 or just used at Zynga... Feb 05 23:54:39 i tend to prefer the less magic option, so sqlite is fine for me Feb 05 23:55:11 realm has too many wtfs Feb 05 23:55:12 quick question: is the getDefaultProguardFile keyword highlighted as an error in your build.gradle? Mine is and has a "cannot resolve symbol" tooltip. (note, I use gradle.properties and these are also marked as errors, but work. This is why I'm confused) Feb 05 23:55:47 JakeWharton: what wtfs specifically? Feb 05 23:55:55 strange threading restrictions Feb 05 23:55:57 mutable objects Feb 05 23:56:03 lack of null support in places Feb 05 23:56:06 I forget if I found anything conclusive, but there are also a few ??? floating around with regards to thread safety and yeah, shared mutable objects. Feb 05 23:56:31 basically: use it on the main thread, only, ever, and you're probably fine. which is a horrible idea. but it does appear to be speedy enough that I don't notice it. Feb 05 23:56:32 not to mention it's like 5MB and closed source Feb 05 23:56:58 interesting. maybe that's a hangover from it being developed for iOS first? Feb 05 23:57:05 5mb? for an orm? that's huge Feb 05 23:57:14 it's a database, not an orm Feb 05 23:57:15 pfn: orm + database Feb 05 23:57:47 they've got code on github, I assumed this was the source... https://github.com/realm/realm-java Feb 05 23:57:48 though at the java level it's really more of a "query proxy object builder" than an "orm". Feb 05 23:58:40 oh, nice. still wouldn't use it. Feb 05 23:59:24 same. interesting for toy use, too many questions and wtfs and incomplete corners for anything at all important. Feb 05 23:59:57 JakeWharton what is your opinion on RoboElectric? Feb 06 00:00:15 I'd love to have a nice alternative to sqlite, but realm isn't it (yet, at least) Feb 06 00:00:21 I wouldn't mind playing around with it :) Feb 06 00:00:23 robolectric is half amazeballs half dogshit Feb 06 00:00:29 hehe Feb 06 00:00:40 elaborate? Feb 06 00:00:56 amazeshit! Feb 06 00:01:01 "it works" + "via magic"? Feb 06 00:01:37 quick question: is the getDefaultProguardFile keyword highlighted as an error in your build.gradle? Mine is and has a "cannot resolve symbol" tooltip. (note, I use gradle.properties and these are also marked as errors, but work. This is why I'm confused) Feb 06 00:02:11 half of Robolectric is just real Android code Feb 06 00:02:24 Uri, Intent, Bundle, etc. Feb 06 00:02:38 for this, it is amazeballs because I can test my code which happens to need these objects Feb 06 00:02:49 the other half is fake implementations of non-trivial things Feb 06 00:02:58 Bitmap, system services, etc. Feb 06 00:03:00 MikeWallaceDev: I get that on "getDefaultProguardFile()" fwiw. but it works. I suspect the intellij inspecting just doesn't quite work there in groovy. Feb 06 00:03:39 for this, it is dogshit because the implementation against which I am writing my tests was written by someone who didn't care about mimicking the behavior exactly but only just getting whatever they were trying to test working Feb 06 00:03:54 thanks groxx , the real problem is that I added the rules to disable logging, but logs still show up in release mode, I'm trying to figure out why... Feb 06 00:04:25 MikeWallaceDev, getDefaultProguardFile() isnt underlined for me Feb 06 00:04:48 maybe because im using EAP builds of Intellij. mh Feb 06 00:04:50 don't blame intellij, blame groovy Feb 06 00:05:13 the high levels of dynamism make it impossible to have accurate inference everywhere Feb 06 00:05:19 sorry I know Ive asked this before, but can I somehow convert saved cached files from okHTTP to a folder in their original formats? like if I am loading a png file from a url, can I later convert those cached files to pngs? Feb 06 00:05:23 MikeWallaceDev: make sure you don't have _any_ -dontoptimize (or similar) lines. a single one disables code removal. Feb 06 00:05:29 in_deep_thought: no Feb 06 00:05:41 you can make an HTTP request for the asset and save it directly to a png Feb 06 00:06:01 ok Ill do that instead Feb 06 00:06:16 -dontoptimize doesn't prevent code removal Feb 06 00:06:23 MikeWallaceDev: if you are using the default 'proguard-android.txt' it has a -dontoptimize in it. there's a 'proguard-android-optimize.txt' you need to use instead. Feb 06 00:06:37 re: realm. if they sort sync i think there will be massive push towards it from the iOS side. Feb 06 00:06:45 coredata is hard to do right Feb 06 00:06:52 and sync is harder Feb 06 00:07:09 do you mean client-server sync? Feb 06 00:07:09 groxx, I'm using the optimize one :) Feb 06 00:07:13 Thanks Feb 06 00:07:25 JakeWharton: yes. Feb 06 00:08:02 JakeWharton: theres a bug open on it and they are about to start trials with devs i think. hopefully they will document their api allowing custom server implementations. Feb 06 00:08:07 i would argue that client-server sync is impossible to generalize in any efficient fashion Feb 06 00:08:25 certainly it's always more optimal to do something tailored to your specific use case Feb 06 00:08:54 pfn: pretty sure I read that somewhere, and it did seem to be the case when I added that flag locally (-assumenosideeffects log calls appeared after adding -dontoptimize). I'll admit it's possible it was something else / I'm misremembering though. Feb 06 00:08:55 JakeWharton: you might well be right, althought coredata is sufficiently general and apple support syncing your coredata store Feb 06 00:09:06 I'm hunting for a mention of it now, not finding. so I'm getting more doubtful. Feb 06 00:09:14 and realm does close-to replace coredata Feb 06 00:09:42 groxx, pfn might be right, there's also a -dontshrink flag. I think that's the one for code removal... Feb 06 00:09:55 aah, that could be Feb 06 00:09:59 what are the weird threading limitations? not passing the realm objects between threads? Feb 06 00:10:02 google purchased firebase, i wouldnt be surprised if we see those apis sometime Feb 06 00:10:07 I use -dontoptimize religiously, if it didn't remove code, I'd constantly be hitting dex method limit Feb 06 00:10:12 in android, maybe play services, etc Feb 06 00:10:45 g00s: good point Feb 06 00:11:03 and they’d open it up to apple too Feb 06 00:11:43 pfn & MikeWallaceDev : -dontshrink certainly seems to be the one to watch out for. thanks, I must've misremembered :) Feb 06 00:11:57 groxx, yeah, never want to use -dontshrink on android Feb 06 00:12:16 -dontoptimize saves a lot of time during development, and isn't really necessary Feb 06 00:12:26 lots of optimizations dont work on android as well, although I think the default template works now Feb 06 00:12:31 used to be that the default template didn't work Feb 06 00:12:36 MikeWallaceDev: fwiw I've noticed some proguard snippets for some libraries are a bit over-broad. I may have even seen -dontshrink / -dontoptimize once. Feb 06 00:12:43 worth checking them in detail if you haven't already. Feb 06 00:12:51 pfn, you run proguard during development? Feb 06 00:12:52 the best proguard file is an absent one Feb 06 00:13:09 groxx, yeah, I'm watching out for them Feb 06 00:13:22 how can i get main/resources into build/test-classes with gradle? Feb 06 00:13:44 i don't want to copy the java resources into the test folder, but i need them to make sure my tests run properly Feb 06 00:14:08 test apks include the main java code, dont they? Feb 06 00:14:13 at least they do for me :o Feb 06 00:14:21 as well as resources Feb 06 00:14:21 unit tests Feb 06 00:14:25 oh nvm :) Feb 06 00:14:36 wait for 1.1 then ^^' Feb 06 00:14:52 they are .xml files but i don't want to just duplicate all of the files Feb 06 00:15:03 who here uses protobufs over json? Feb 06 00:15:16 MikeWallaceDev, yes Feb 06 00:15:19 danijoo: thanks for the response tho :) Feb 06 00:15:58 MikeWallaceDev, 1) I use it for all scala applications, 2) many of my java projects also go over the method limit Feb 06 00:16:09 so because of that: proguard is a requirement during development Feb 06 00:16:11 heater89, yeah. its kinda stupid to copypaste them. but unit test support is very limit atm. Maybe it will work better in a few weeks Feb 06 00:16:14 gotcha Feb 06 00:16:56 danijoo: alright, good to know. thanks! Feb 06 00:18:02 heater89, tests should have main resources available to them automatically Feb 06 00:20:26 unit tests should have main resources on classpath Feb 06 00:22:40 samskiter: i do Feb 06 00:22:58 if by 'over' json you mean 'instead of' json Feb 06 00:23:03 yes sorry Feb 06 00:23:10 protos over json would be interesting! Feb 06 00:23:26 lol. json over protos would be…. pointless Feb 06 00:23:51 proto3 has json as a first party serialization format Feb 06 00:23:56 in addition to binary Feb 06 00:24:36 so i’ve been trying to keep the json organised by using json-schema religiously but lately realised without the code generation you’re still prone to errors in the chain Feb 06 00:24:42 oh interesting Feb 06 00:25:02 you use the schema definition and generated code but it reads and writes JSON Feb 06 00:25:54 so its protobuf over the wire. then you pull that out into json and then GSON that to POJOs? Feb 06 00:26:12 but the proto doesn’t generate your final POJOs> Feb 06 00:26:12 it's JSON over the wire Feb 06 00:26:24 ahhhh ok. thats nice! Feb 06 00:26:59 hmm. Feb 06 00:27:02 seems like a waste. Feb 06 00:27:24 string serialization and deserialization takes more time and ressources, and has higher overhead Feb 06 00:27:28 i would agree, but the debugging powere you get from being able to sniff the json... Feb 06 00:27:59 also clients which cannot easily support binary serialization Feb 06 00:28:04 JakeWharton: when you say “schema” you mean protobuf message format right? Feb 06 00:28:04 You get the same from knowing your binary format by heart ^^ Feb 06 00:28:11 :P Feb 06 00:28:18 i mean the .proto files Feb 06 00:28:23 yea. Feb 06 00:29:18 MessagePack! Feb 06 00:29:35 hmmmm. ive seen mention of obj c protobufs… wonder how good they are Feb 06 00:29:56 your own weird Qt based format that no client supports, that has no good support anywhere and has to be slowly en/decoded manually! Feb 06 00:30:05 * justJanne is still frusted from working on quassel Feb 06 00:30:23 proto3 has support for objc Feb 06 00:30:30 it will support 11 languages when released Feb 06 00:30:57 danijoo: the code generation bit is very important. Feb 06 00:31:47 samskiter, mh? Feb 06 00:32:54 messagepack doesn’t define the messages right? so you have to separately validate…. Feb 06 00:33:27 its just json with a bit binary docoding put on top of it Feb 06 00:33:28 <_genuser_> what happens if your app exists and an AsyncTask was hard at work? Feb 06 00:33:35 to make it smaller Feb 06 00:33:58 _genuser_: exits? Feb 06 00:34:06 _genuser_, i dont understand that question at all Feb 06 00:34:08 do you mean process death? or just pressing home? Feb 06 00:34:32 oh. with exits it suddly makes sense. Feb 06 00:34:50 but... can an AsyncTask do light work too? :p Feb 06 00:34:50 the short answer is: if you care, you shouldn't be using AsyncTask Feb 06 00:34:51 <_genuser_> JakeWharton: pressing home or back until the activity is closed. Feb 06 00:35:10 <_genuser_> yeah, simonvt.net showing me "AsyncTask is badn and you should feel bad" on google. Feb 06 00:35:22 even shorter: don't use asynctask Feb 06 00:35:27 _genuser_, it may take some time, and then android will kill it Feb 06 00:35:28 hi Feb 06 00:35:31 together with yout asynctask Feb 06 00:35:49 <_genuser_> so what's recommended to get work done on an alternate thread away from the main UI thread, etc? Feb 06 00:36:09 _genuser_, if you want to make sure the stuff is done even when app is closed, use a service Feb 06 00:36:51 <_genuser_> oh, I see. use a service which will run independent of the app? Can you hand it off stuff to do via main app? Feb 06 00:37:15 <_genuser_> such as I have finished a new document, here "service", upload it to the website using REST api... Feb 06 00:37:25 a service isn't a thread Feb 06 00:37:29 it's a managed lifecycle object Feb 06 00:37:34 _genuser_ look at IntentService Feb 06 00:37:41 anyone know how to clear android studio history? Feb 06 00:37:49 <_genuser_> g00s: I see. Feb 06 00:37:55 _genuser_: yea you can do that. if you choose to use a service, go read about best practises - you should avoid having a service open if you don’t need ot Feb 06 00:37:57 <_genuser_> thanks all for the pointer. I have some _more_ reading to do. Feb 06 00:38:36 <_genuser_> samskiter: I see. seems every feature I implement I learn a lot but it also takes a lot of times to get it done because I'm learning it fresh. ;) Feb 06 00:38:47 linuxuz3r, did something naugthy? :p Feb 06 00:39:06 yes it wont compile it says make error Feb 06 00:39:10 probably started a Realm project. tsk tsk. Feb 06 00:39:43 linuxuz3r: does build -> rebuild project fix it? Feb 06 00:39:52 _genuser_: yea there’s lots out there. there’s two kinds of ways of starting services up too. so lots to learn Feb 06 00:39:56 thats where i get the errors groxx Feb 06 00:40:08 so fix the errors Feb 06 00:40:08 linuxuz3r, fix your code? Feb 06 00:40:15 how is that hard... Feb 06 00:40:19 <_genuser_> samskiter: heh, and only way to do it: spend time reading and coding it. :) Feb 06 00:42:42 make.exe: *** No rule to make target Feb 06 00:43:54 please its an ndk error Feb 06 00:45:58 linuxuz3r: you do know android studio doesn't support ndk yet, right? Feb 06 00:46:41 ok Feb 06 00:46:58 was able to compile 1 project last night Feb 06 00:47:24 but when i compiled ndk samples san-angeles it wont work Feb 06 00:51:18 Okay, small question: Imagine I want to send push messages to a phone from a server efficiently, how do I do it the best way? Feb 06 00:51:49 (No, GCM is not good enough for this case, as the NSA is NOT someone I’d want to CC on my messages) Feb 06 00:52:03 justJanne: so encrypt the payload? Feb 06 00:52:21 Metdata, also not okay Feb 06 00:52:42 so, should I just keep a socket open or put a queue on a server and use pull? Feb 06 00:53:06 Because the NSA is totally not being CC’ed on these IRC messages Feb 06 00:53:46 ok fixed it Feb 06 00:54:04 justJanne: since I assume you'd prefer something mostly-prebuilt: maybe there's a websocket system out there for android? plus then you can support browsers. Feb 06 00:54:13 Still, some of our users use our IRC client with blowfish end-to-end encryption, s73v3r, so having safe transport would be nice Feb 06 00:54:25 http://www.pushlets.com/ Feb 06 00:54:37 http://developer.android.com/reference/android/app/ActionBar.html says NAVIGATION_MODE_TABS and friends are depreciated. i have a use case in which user enter values in a table and a corresponding mathematical graph is generated. i wanted to show them as | Table | Graph | navigation tabs Feb 06 00:54:39 it’s an HTTP publish/subscribe framework Feb 06 00:54:53 HTTP? ugh :/ Feb 06 00:54:58 ooh, dhtml support too. retro Feb 06 00:55:24 kuldeepdhaka, its deprecated because google wants you to write your own tabs view and not use the actionbar implementation Feb 06 00:55:25 That’d mean each user would have to open another port for their bouncers Feb 06 00:55:59 http://ollieparsley.com/2013/05/20/using-mqtt-as-a-gcm-replacement-for-android-push-notifications/ Feb 06 00:56:02 for example a horizontalScrollView with textviews in it. Or one of the trillion viewpager/tab libraries out there Feb 06 00:56:31 justJanne, fixed the usb problem for Android Lollipop. patched libusb not to query file-system, (just live with fd) Feb 06 00:56:48 ^ yeah, mqtt is likely a decent option. last time I looked at it, Facebook used mqtt for their app. Feb 06 00:57:30 hmm. Feb 06 00:57:37 danijoo, its perfect for me. i cannot get better than that. (atleast at the start of development) Feb 06 00:57:44 'course, mqtt is basically just the protocol. you still need server library, client library, etc. Feb 06 00:57:51 oh, that is nice! Feb 06 00:57:57 danijoo, why they want program to re-write? Feb 06 00:58:00 Because that’s exactly what I’ve been searching for Feb 06 00:58:03 *programmer Feb 06 00:58:16 (Adding push notifications to an IRC bouncer isn’t an easy thing to do properly) Feb 06 00:58:19 kuldeepdhaka, because actionbar is replaced by toolbar Feb 06 01:00:11 thanks a lot, s73v3r! We’ll probably go with that Feb 06 01:00:23 good luck Feb 06 01:03:52 groxx have you use the java paho client ? Feb 06 01:04:01 can you download a file to a cache in a background service? Feb 06 01:05:22 g00s: nope. haven't had to switch to mqtt yet, never got too far into it Feb 06 01:06:11 groxx ah, k. ian is debating some api changes. was going to send him some thoughts, wondered if you had ant problems with it Feb 06 01:06:19 is it bad form to save data in a .txt file? in my app i am trying to save data about classes and assignments Feb 06 01:06:31 danijoo, i feel "NAVIGATION_MODE_TABS" is a better option for me. (atleast now). Feb 06 01:07:39 danijoo, thanks for introducing toolbar. :) Feb 06 01:10:33 how does picasso know when it should timeout? does it just stop when the activity its in ends? Feb 06 01:10:43 the http client times out Feb 06 01:10:46 or I guess okHTTP Feb 06 01:11:03 the socket is doing that Feb 06 01:11:04 if I don’t set it specifically Feb 06 01:11:08 we set defaults Feb 06 01:11:15 whats the default for okHTTP? Feb 06 01:11:27 okhttp has no default Feb 06 01:11:43 picasso specifies a default if do not pass it your own client Feb 06 01:12:05 well I specified okHTTP by including it in the dependencies. but I didn’t set a timeout anywhere Feb 06 01:12:31 hey ho there ppl!! Feb 06 01:12:34 but you are not giving picasso an instance of a client so it sets defaults when it creates the client Feb 06 01:13:26 JakeWharton: ok. so it creates the client and uses okHTTP, because it has build that one in the dependencies right? so it sets a default when it creates that depenedency. Feb 06 01:13:44 correct Feb 06 01:13:47 and i think it's 15s Feb 06 01:14:05 What if the activity its in ends before that? Feb 06 01:14:08 <_genuser_> johny-b-goode: sup Feb 06 01:14:22 the imageview is garbage collected which calls into picasso and we cancel the request Feb 06 01:14:44 ok Feb 06 01:15:30 ok Feb 06 01:15:32 thanks Feb 06 01:15:33 xD Feb 06 01:16:18 JakeWharton um so is there any chance I can keep that request going and have it store the response in the cache for the next time I request it? Feb 06 01:16:32 just saying that sounds unlikely Feb 06 01:16:35 the request will complete Feb 06 01:16:40 it just won't be delivered anywhere Feb 06 01:17:08 Is the source code for android auto avaiable to say compile on to a tablet? Feb 06 01:17:16 so even if the activity lasts 3 seconds, the request keeps going to complete and caches it, and next time the activity is made, it uses the cached response? Feb 06 01:17:29 Haxxa: no Feb 06 01:17:32 or is it not even delivered to the cache? Feb 06 01:17:37 in_deep_thought: correct Feb 06 01:17:39 to the first one Feb 06 01:17:45 oh nice! Feb 06 01:17:51 I think Feb 06 01:18:11 so it has 15 seconds no matter what then. Why was 15 seconds determined? can I make it longer? Feb 06 01:18:27 JakeWharton, any annucemtns or which quarter it will become available or will it not the source code always remain sourced closed to anyon who not a manuafactur? Feb 06 01:18:36 Haxxa: i have no idea Feb 06 01:18:42 sorry multitasking rammar is off Feb 06 01:18:48 *grammar Feb 06 01:18:50 ok fe Feb 06 01:18:52 in_deep_thought: create your own OkHttpClient, set your own timeouts, and pass it to Picasso Feb 06 01:19:42 JakeWharton: ok. and if I just set the timeout to greater, it should pass the response to the cache correctly? Feb 06 01:19:48 sounds like a background service of sorts Feb 06 01:20:08 the timeout has nothing to do with the cache Feb 06 01:20:29 it's on the socket over which the data is being transferred Feb 06 01:20:50 but the data goes to the cache if the imageview does not exist? Feb 06 01:21:04 because the activity ended Feb 06 01:21:10 yes Feb 06 01:21:32 ok I think I get it, thanks JakeWharton Feb 06 01:41:12 So if im creating a class to handle data for an activity, the activity should do all of the GUI work and the class should just handle data right? Feb 06 01:47:42 can anyone suggest a good library for floating labels with EditText? there are so many Feb 06 01:50:43 dynmeth, https://github.com/thebnich/FloatingHintEditText works for me Feb 06 01:51:22 kuldeepdhaka, thanks. was just looking at that one! Feb 06 01:55:06 dynmeth, its took me 1 whole night to select from 6+ plotting library to discover that none will work for me :p Feb 06 01:55:06 dynmeth, too many options are bad! agree? Feb 06 01:56:25 kuldeepdhaka, haha yes. I agree. Just because it's available doesn't mean it's useful! Feb 06 01:57:19 kuldeepdhaka, I find this one quite good: https://github.com/PhilJay/MPAndroidChart Feb 06 01:58:31 dynmeth, theirs many more. i also find MPAndroidChart is good. (looks) Feb 06 01:59:11 dynmeth, no plotting library can handle 500+ samples without lagging Feb 06 02:01:46 (lagging is easily noticeable and degrade the ui, i couldnt move or zoom without waiting) Feb 06 02:11:23 I am trying to get a result from a child activity that is a object. What's the best way to put that as an extra? Feb 06 02:12:32 OK, so I have a problem with fragments. I'm using a viewpager, and adding a detail fragment on a grid item click. if I use replace() to add my detail fragment, my backstack acts as expected, and animations run. however, when I go back, my viewpager stops working and doesn't display items correctly. if I use add(), the fragment shows, and the GridView shows correctly when I go back. however, if I use add() AND animations, I crash wit Feb 06 02:13:42 https://github.com/drinfernoo/Cuber Feb 06 02:14:35 CFOPFragment has the ViewPager, inflating GridFragments, which using GridViewAdapter, starts a DetailFragment from BaseActivity Feb 06 02:22:39 Zomg. Beta 4. Feb 06 02:22:48 that's so 6 hours ago Feb 06 02:23:38 I did predict something like it around eight hours ago, though. Feb 06 02:25:42 One thing I don't get is this: https://code.google.com/p/android/issues/detail?id=132194 Feb 06 02:26:16 TacticalJoke: you born two hours early for this world Feb 06 02:27:39 beta 4 was yesterday right ? Feb 06 02:28:46 yesterday Feb 06 02:28:49 all my troubles seemed so faar awaaaay Feb 06 02:29:04 Did you see the unit-testing thing, g00s. Finally my prayers are answered. Feb 06 02:29:09 https://code.google.com/p/android/issues/detail?id=131080 Feb 06 02:29:17 I haven't actually tried it yet, though. Not at computer. Feb 06 02:29:30 TacticalJoke did you file that ? Feb 06 02:29:38 Yeah. Feb 06 02:29:53 I didn't make that reddit post, though. Feb 06 02:32:18 huh, this is kinda a zinger : "since Android 5.0, we cannot have more than one map fragment resumed at once." Feb 06 02:32:57 anybody have ideas on that fragment stuff? Feb 06 02:33:11 g00s: developers affected 0.001% Feb 06 02:34:00 TacticalJoke see, you saved the day with your bug report, and now we have a fix ! Feb 06 02:34:02 Funny how nobody mentioned Kotlin in that Scala.js post on /r/programming. Feb 06 02:34:28 any idea how to increase the GPU memory / performance of scrolling in a webview. Chrome renders close to 60fps and shows GPU memory of 256MB using chrome dev tools debugger. My webview averages about 14-15 fps and shows max memory of 40MB from chrome dev tools Feb 06 02:35:49 It's weird that they didn't notice that big at first. I'm guessing they wrote only tests that ensured passing tests. Feb 06 02:35:58 bug Feb 06 02:36:29 Which version of Android, beout? Feb 06 02:36:55 kitkat Feb 06 02:37:42 thats still better than the kindle app play webview which gets seconds per frame Feb 06 02:37:44 is there any tool that can make better settingsactivity than the eclipse wizard? Feb 06 02:38:02 because I'd like a tool that you say what settings what you want and it will spit out the right code Feb 06 02:40:15 I'm trying to think of ways to celebrate the unit-test thing. Feb 06 02:40:48 I think I might just spend hours writing Mockito tests. Feb 06 02:49:54 it'd be great if you could write mine too -- thanks Feb 06 02:50:47 there's no time to celebrate Feb 06 02:53:31 Haha. I love the consistency, JW. :) Feb 06 02:53:35 Brb. Feb 06 02:56:23 Whoa. The Ctrl+F thing (in IntelliJ/AS) supports Ctrl+Space. Feb 06 02:56:37 AS is the one place I keep tip-of-the-day enabled. **** ENDING LOGGING AT Fri Feb 06 02:59:59 2015