**** BEGIN LOGGING AT Fri Jun 05 02:59:59 2015 Jun 05 03:00:09 g00s: probably proguarded to the max and depends immensely on the web :P Jun 05 03:00:28 http://newsroom.fb.com/news/2015/06/announcing-facebook-lite/ Jun 05 03:01:54 New Android permissions will boost Facebook stock a lot Jun 05 03:02:56 Hey guys, I released my first app for a friend/client yesterday. Would any of you mind checking it out and letting me know what you think? Any ideas/improvements/critiques? Jun 05 03:03:23 hmm that facebook lite definitely seems more like something for their developing nations agenda Jun 05 03:05:32 what will be pretty interesting is that Fb uses MQTT instead of GCM. But the way i'm reading Doze mode, this will fuck them hard Jun 05 03:05:33 t0astt: go ahead Jun 05 03:05:47 https://play.google.com/store/apps/details?id=com.mikerinehart.geekrepublic Jun 05 03:06:24 g00s: so, a year from now, they'll kill the battery on 10% of devices... Jun 05 03:07:24 t0astt just that there should be more margins in the article Jun 05 03:07:32 text goes from edge to edge Jun 05 03:08:17 g00s: can you give me a screenshot? On my device there is about an 11dp or so margin on left and right edges Jun 05 03:08:42 t0astt the 3rd one for example Jun 05 03:09:08 t0astt: one thing I'd be careful about... there have been stories of people getting apps sanctioned because their screenshots had other people's trademarks in them Jun 05 03:09:49 Leeds: I told my client about that and he said he had permission to use them... so we'll see. I'll bring it up with him again though. Jun 05 03:10:00 he has permission from GoPro to use their logo? Jun 05 03:10:01 g00s: Are you talking about in the list of articles? Or after you click an article to view the contents? Jun 05 03:11:57 t0astt: https://lh3.googleusercontent.com/9aP0CqYLNrmB9ZHgxpuM7LQmPs9gl5SWrFcdwy_SBOzZJyf82Qac0URYlGlePV0Urro=h900-rw Jun 05 03:12:33 t0astt: "Screen edge left and right margins: 16dp" - https://www.google.com/design/spec/layout/metrics-keylines.html#metrics-keylines-keylines-spacing Jun 05 03:14:21 1mb is pretty impressive. definitely curious how they managed it :) Jun 05 03:14:25 t0astt: Also it's recommended that dimensions are done in multiples of 8dp, can remember where that quotes from though Jun 05 03:14:51 yiati: Ah, I didn't know that. Thanks for the heads up! Jun 05 03:16:56 t0astt: I'm getting [x] characters in the description fwiw Jun 05 03:17:16 groxx: can you show me a screenshot? Jun 05 03:18:04 t0astt: once I can convince Dropbox to upload even though my battery is low, yes :) Jun 05 03:18:14 :D thanks Jun 05 03:19:09 https://usercontent.irccloud-cdn.com/file/cARjQ6QC/Screenshot_20150604-201637.png Jun 05 03:19:44 I am on the M preview, possibly something is missing from it. Jun 05 03:20:34 super noob question: how do I put a project onto my phone that doesn't use gradle? All of the tutorials include "building" the project. but this one doesn't have to be built Jun 05 03:21:30 well actually I guess it has to be built into an apk right? Jun 05 03:21:32 groxx: Ah, ok. I just write the app, I don't handle uploading it to Google Play. I'll let my client know. It could be some weird unicode character. Jun 05 03:21:35 but it doesn't pull anything in Jun 05 03:21:39 Thank you for the screenshot Jun 05 03:22:53 bilb_ono: you can just "adb install" it once you've got an apk Jun 05 03:24:29 Leeds, I don't have an apk, just the code Jun 05 03:24:43 bilb_ono: then you have to build it... Jun 05 03:24:43 this is the project: https://github.com/lukehutch/android-multitouch-controller/tree/master/MTPhotoSortr Jun 05 03:24:55 Leeds, right Im trying to figure out how to build it Jun 05 03:25:01 on android studio 1.0 Jun 05 03:25:17 the "build" button is greyed out because there is no gradle file I think Jun 05 03:25:30 1.0? Jun 05 03:25:50 isnt there an import project option? Jun 05 03:27:23 lonewaft, theres open project. I already did that. Jun 05 03:27:27 now I want to make it an apk Jun 05 03:29:57 bilb_ono : i'm talking about the import project option, not the open project Jun 05 03:30:18 you can import an existing android project into android studio and it'll generate all the releavnt gradle fies for you Jun 05 03:31:35 I'd just build it on the command line, but then I'm somewhere on the borderline between oldskool and "get off my lawn" Jun 05 03:44:19 i'm kinds surprised how low tech this 'Google Now on Tap' thing is Jun 05 03:44:34 i would have thought in 2015 we'd be using some kind of semantic markup to enable this kind of thing Jun 05 03:44:46 hopefully its smart enough to ignore advertisements on the screen, lol Jun 05 03:44:55 The low tech aspect is what makes it so powerful (and scary) Jun 05 03:45:24 semantic market is a dream that died with the semantic web about 15 years ago Jun 05 03:45:28 mark up* Jun 05 03:45:42 i thought google was going in that direction (semantic) Jun 05 03:45:48 as of more recently Jun 05 03:46:02 Will never work as well as brute forcing it, they are the king at that Jun 05 03:46:04 lonewaft, yep you are correct. that worked Jun 05 03:46:26 glad to help Jun 05 03:46:38 The best example of this approach is typo correction driven not by dictionaries but by statistical sampling of millions of queries Jun 05 03:47:10 what is semantic web? Jun 05 03:47:16 tatistical sampling of queries Jun 05 03:47:19 doesn't say anything Jun 05 03:50:08 google's pretty much the king of "find semantics in non-semantically-marked-up stuff". not sure why they'd reverse thrusters suddenly :) Jun 05 03:50:17 Guys, I need some guidance Jun 05 03:50:22 go north! Jun 05 03:50:23 I'm new to Android programming. Iwas wondering Jun 05 03:50:27 I was wondering <_< Jun 05 03:50:53 If it android exposes APIs to get data from the blood oxygen sensor Jun 05 03:50:54 http://serendip.brynmawr.edu/exchange/files/images/dangerous-to-go-alone.jpg Jun 05 03:51:02 this is on a galaxy note 4 Jun 05 03:51:09 which comes with an blood oxygen sensor Jun 05 03:51:12 don't ask me why :| Jun 05 03:51:24 g00s: they were trying to see if convincing people do some of their work for them was worthwhile. afaik, they abandoned that idea. Jun 05 03:51:33 Foxhoundz: nothing native, afaik. Samsung has a number of SDKs, odds are that one of them has O2 access Jun 05 03:51:46 squ: statistical sampling gives you the most likely response very accurately Jun 05 03:51:54 groxx: exactly Jun 05 03:51:55 in spite of humans screwing up the semantics Jun 05 03:52:14 humans suck at precision, except in aggregate Jun 05 03:52:29 and keeping the markup updated is simply not scalable Jun 05 03:52:34 just let the crowds guide you Jun 05 03:54:13 Foxhoundz: http://developer.samsung.com/home.do somewhere in there probably Jun 05 03:54:36 I have a feeling android studio does google query on each keypress to perform autocompletion Jun 05 03:56:08 Nah that's just Swing being its usually slow as slug routine Jun 05 03:58:30 sometimes, after typing 3 characters, they end up after the completed snippet Jun 05 03:59:09 after xcode android studio is so obviously wrong Jun 05 03:59:42 btw, android studio doesn't run on my windows xp machine Jun 05 04:00:46 I'd consider XP dead by now, for most purposes. upgrade your OS, maybe it'll fix it :) Jun 05 04:00:51 Why are you using a 14 year old OS? Jun 05 04:00:55 sure Jun 05 04:01:06 upgrade pc to use android studio Jun 05 04:01:16 I'd buy mac instead, no? Jun 05 04:01:24 liuwenhao: because it's not old enough to vote yet. Jun 05 04:01:40 it has to stay at home until i can make its own way in the world! Jun 05 04:01:55 Squ if you were using a 14 year old version Mac OS it also wouldn't support AS :) Jun 05 04:02:05 or intel for that matter Jun 05 04:02:43 squ: More like, don't use a 14 year old OS to run modern software Jun 05 04:02:59 and, honestly, if you're not targeting ios, a mac is an expensive way to dev. :P Jun 05 04:03:01 you guys are wrong Jun 05 04:03:07 Bring back the PowerPC! Jun 05 04:03:15 no, macs were still ppc in 2001. Jun 05 04:03:17 squ: Me too? Jun 05 04:03:22 CedricBeust: some of us never stopped using them. :) Jun 05 04:03:26 <3 tenfourfox Jun 05 04:03:48 CedricBeust: after swing (excluding) mostly yes Jun 05 04:03:51 but i certainly don't try to run modern software on them. especially since vpc running xp is sooo slooow. Jun 05 04:03:59 squ: You're hurting my feelings Jun 05 04:04:09 powerpc... hahaha Jun 05 04:04:13 clang, gcc, javac is modern software Jun 05 04:04:16 it runs Jun 05 04:04:18 those were fun times Jun 05 04:04:25 android studio doesn't because it is lame Jun 05 04:04:33 powerpc, a processor so bad it brought Apple close to bankruptcy and Bill Gates had to rescue the whole company Jun 05 04:04:34 haha. you are stuck with brand spanking new java 1.4 on a mac from back then. Jun 05 04:05:14 CedricBeust: nah. jobs is the one who killed ppc by not understanding wtf he needed to do for it to succeed. he caused an expensive useless product for most users. :( Jun 05 04:05:20 CedricBeust: sorry to hurt them Jun 05 04:05:38 lewellyn: Jobs has nothing to do, the PowerPC was a pig, it was unsalvagealb Jun 05 04:05:40 ble* Jun 05 04:05:48 gah can't write tonight Jun 05 04:06:00 CedricBeust: that's not quite true. it's a scaled down power chip. and power is still quite serviceable to this day. ask ibm. :) Jun 05 04:06:22 unfortunately, he wanted to keep the wrong parts. Jun 05 04:06:26 7:05:48 AM - CedricBeust: gah can't write tonight Jun 05 04:06:34 Fri Jun 5 18:06:34 LINT 2015 Jun 05 04:06:37 AM, Carl. AM! Jun 05 04:06:39 it's night. ;) Jun 05 04:07:11 18:06? There's no land there, it's all ocean Jun 05 04:07:34 lewellyn: who are you? Jun 05 04:07:40 a dolphin? Jun 05 04:07:41 i am me. who are you? Jun 05 04:07:48 Thu Jun 4 17:07:47 NUT 2015 Jun 05 04:07:52 CedricBeust: better? ;) Jun 05 04:08:03 Hawai'i? Jun 05 04:08:26 nah. that's further west than hawaii. Jun 05 04:08:46 some abyss between Hawaii and Japan then Jun 05 04:08:57 what is there? Jun 05 04:10:18 not much. Jun 05 04:10:29 but they're convenient timezones for /tomorrow and /yesterday aliases. Jun 05 04:10:49 you must be happy up there on your island https://www.youtube.com/watch?v=51Bpx63wkbA Jun 05 04:12:52 Also, a followup question Jun 05 04:13:10 Does Android have any frameworks similar to Angular-JS Jun 05 04:13:22 for real-time search results as the user types Jun 05 04:13:44 Foxhoundz: So much wrong in this question... Jun 05 04:14:08 CedricBeust: then correct it Jun 05 04:14:13 http://developer.android.com/guide/topics/search/index.html Jun 05 04:14:19 holy outdated screenshot, batman! Jun 05 04:14:36 Foxhoundz: Angular is a data binding framework that has little to do with search results Jun 05 04:14:53 CedricBeust: And? Jun 05 04:14:56 Did I say it did? Jun 05 04:15:20 * CedricBeust shrugs Jun 05 04:15:27 the implication could be reached. Jun 05 04:15:30 I'm asking if there are any frameworks that can do something akin to how Angular facilitates data binding for stuff like search results Jun 05 04:15:51 Narrow it down, are the queries local or network? Jun 05 04:16:05 network Jun 05 04:16:11 WiFi to be exact Jun 05 04:16:40 Then any HTTP stack will work, assuming you're using HTTP for that. I've had good results with Retrofit but there's no shortage of libraries Jun 05 04:29:46 Leeds, wtf is that! https://www.youtube.com/watch?v=ld2nWfIap2k Jun 05 04:44:05 Does anyone know if there is a latency in the access of data structures transformed by a service to their rendering by a (an bound) activity, rather than hosting the model and processing inside the activity itself? Jun 05 04:45:16 Trying to parse that sentence Jun 05 04:45:55 lol Jun 05 04:46:27 DOES NOT COMPUTE! Jun 05 04:46:37 I am just thinking of trying to cleanly seperate any backend processing an activity needs by compartmentalizing in in a service, since a service is generally not exactly for that kind of thing from what i understand. Jun 05 04:47:06 a service is just a life cycle component Jun 05 04:47:08 lasserix if its in the same process, they can share the same in mem data structures ? Jun 05 04:47:09 Yeah that's not what services are for Jun 05 04:47:09 that is all Jun 05 04:47:18 right Jun 05 04:47:26 Use a background thread if you don't need to update the UI, not much to do who spawns that thread Jun 05 04:47:31 it's used to manage object lifecycles Jun 05 04:47:34 but the advantage of a service is that it's lifecycle is more contigous than an activity Jun 05 04:47:34 to do with* Jun 05 04:48:41 so instead of spawning say some execution that would outlive an activity's foreground presence in that activity, why not couple inside the life cycle component that is stickier, so to speak? Jun 05 04:48:51 more rules :( https://medium.com/google-developers/developing-for-android-vi-c0b1539f0e98 Jun 05 04:49:30 Avoid SQLite for Simple Requirements Jun 05 04:49:33 :P Jun 05 04:49:43 "Use append-only log files and periodically rotate them when storing time-series event data." Jun 05 04:49:47 I don't trust any Android blog posts anymore. They always have at least seven major errors. Jun 05 04:49:59 TacticalJoke lol but that is chet haase Jun 05 04:50:00 lol @ "at least seven" Jun 05 04:50:33 but yeah, i have seem lots of write amplification with sqlite Jun 05 04:50:57 I can run an executorservice inside an activity, but since an activity is prone to changing its state far more often than a service, by putting it into the service it'll be easier to run without having to handle those state changes. Jun 05 04:51:02 "Don’t create a separate database for each table. " lol wut Jun 05 04:51:03 sqlite is not the db that android deserves. is true. Jun 05 04:51:37 treelzebub: why Jun 05 04:51:42 which then? Jun 05 04:52:09 dvm performed too poorly for native java database like H2 Jun 05 04:52:24 sqlite is pretty damn good software Jun 05 04:52:57 lasserix what are you trying to do ? Jun 05 04:52:58 I didn't mean to say there is a better alternative, I just meant SQL is horrendous, and any Java implementation is going to be really, really ugly syntactically no matter what. Jun 05 04:53:17 yeah embedded another language in java as strings does suck ... Jun 05 04:53:24 java is bad a choice, yes Jun 05 04:53:29 for instance, if i start an intent service right after the creation of the application, and use an event bus to push any of the "backend" processing to whichever activity/fragment/view that happens to be in the foreground, the intent service is gaurenteed to terminate when it's done (or the process is killed). In either case, now I have cleanly seperated what model/domain from controller/view Jun 05 04:54:16 I have gotten some almost readable code using Kotlin with SQL queries, but the whole thing is still very ugly. Jun 05 04:54:38 SQL is very good, so is SQLite Jun 05 04:54:52 especially coupled with RxJava (see the blog post I wrote about this recently) Jun 05 04:55:30 treelzebub: Are you similarly unimpressed by the Java 8 thing? Jun 05 04:55:32 I guess what i am getting at is why put any "domain"/model (i use these terms, i hope their meaning is understood well enough to get the idea across) in the activity at all. just route it through service. I think this approach would work espicially well with rxjava Jun 05 04:55:46 CedricBeust: give link pls Jun 05 04:55:58 lasserix you may like https://github.com/tehmou/rx-android-architecture Jun 05 04:56:09 squ: http://beust.com/weblog/2015/06/01/easy-sqlite-on-android-with-rxjava/ Jun 05 04:56:11 something tells me, i sent you that link a few months ago Jun 05 04:56:19 TacticalJoke: I can't speak for Java 8. I'm an Android dev :P ... but i'd tend to ignore me and listen to CedricBeust ; Jun 05 04:56:54 To be clear, I meant this: http://www.reddit.com/r/androiddev/comments/38eo25/java_8_support_appears_to_be_being_added_to_the/ Jun 05 04:57:09 CedricBeust: add abbreviation html tag for ORM library Jun 05 04:57:13 :P Jun 05 04:57:20 g00s: right, i am just thinking the service, even though it is not "supposed" to be used in this way, is the perfect source from the stream of backend data, since its lifecycle is simpler and more robust Jun 05 04:57:22 squ: uh? Jun 05 04:57:31 lasserix so if you do it like that, then your Fetcher will use your API client to put data somewhere, like sqlite - and then the UI gets a notification to pick it up Jun 05 04:57:32 *from -for Jun 05 04:57:49 g00s yeah Jun 05 04:58:04 TacticalJoke: well i'll be damned. ((reading)) Jun 05 04:58:27 I don't think it promises much. Jun 05 04:58:45 TacticalJoke i bet I/O 2016 will announce Java 8 ! Jun 05 04:59:00 There is no doubt in my mind Google is thinking, and probably working toward, supporting Java 8. And I'm also pretty sure they'll keep denying that they are until it's ready. Jun 05 04:59:09 ie the activity is only the view-controller. it should never(?) be responsible for domain data. Jun 05 05:00:01 *at least for fairly heavy architecture Jun 05 05:00:14 CedricBeust: My lack of belief is not that Google isn't interested; it's that Oracle is going to sue. Again. Jun 05 05:00:25 CedricBeust: no doubt they will fail after releasing support Jun 05 05:00:34 treelzebub: It's never going to stop Google from moving Android forward Jun 05 05:00:50 nothing would make me happier :) Jun 05 05:00:54 Anyway my first quesiton was just is the latency of pushing things between that the fetcher/domain service and the UI was like over 1 ms Jun 05 05:01:36 like I am wondering if you could run a game engine in a service, and just push the rendering / pass back the input to / from the activity Jun 05 05:01:47 > One of the important design principles on Android is to never perform I/O on the main thread Jun 05 05:02:08 i'm guessing that a significant # of us will have heart attacks and die before we can use java 8. if Android N has streams, when can we use it? When we can say minSdk = N which will be years from now Jun 05 05:02:10 do you recommend taking read of .json files out of main thread? Jun 05 05:02:18 squ: Absolutely Jun 05 05:02:25 really? Jun 05 05:02:38 Why would you slow down your UI while you parse a JSON file? Jun 05 05:03:07 squ if you are accessing the json off the main thread, why wouldn't you transform it on that thread before pushing it back to the main thread? Jun 05 05:03:33 CedricBeust: what if they will be stored in static http://vpaste.net/RbCQG Jun 05 05:04:02 CedricBeust: not to invalidate your post (really enjoying the blog btw, thanks for all the time spent on it!), but sql performance is why I _like_ ORMs. e.g. I doubt you're using pre-compiled SQL statements - GreenDAO (to name one I'm semi-familiar with) does. Jun 05 05:04:13 public static final hoh … Jun 05 05:04:23 squ: Not sure what I'm looking at Jun 05 05:04:45 my json can be replace with that hash of hashes struct Jun 05 05:04:50 groxx: If an ORM can turn my queries into precompiled queries, then so can I without an ORM Jun 05 05:04:57 sure. but do you? Jun 05 05:05:09 groxx: I would if it's performance sensitive, of course Jun 05 05:05:13 hand-rolled will 99% of the time be better, absolutely. but it's a few multiples more work. Jun 05 05:05:14 g00s thanks, really, for that link. it'll help me wrap my head around integrating rxjava like _ a ton _ Jun 05 05:05:22 groxx, if you're using prepared statements then yes, you are Jun 05 05:05:26 the blog post is just the informal description of a design pattern, not production code Jun 05 05:05:36 can I use rxjava for json reads? Jun 05 05:05:41 lasserix np, may as well read this too http://stablekernel.com/blog/mvvm-on-android-using-the-data-binding-library/ Jun 05 05:05:57 CedricBeust, meh, I don't particularly like rx for database reads Jun 05 05:06:00 squ: I use Rx to read JSON, then I use map() to turn the JsonObject into model objects Jun 05 05:06:10 yeah, I get it. and I have yet to try rx for db stuff - that's next on my list, and the post pushes me harder in that direction :) Jun 05 05:06:13 squ: you can use rxjava for absolutely anything that needs to be observed. Jun 05 05:06:15 feels yucky to have to onNext and then onComplete Jun 05 05:06:26 now one of the thing about chet's blog - i've found a few 'libraries' that store things to get irreversably corrupted because of the way android kills processes Jun 05 05:06:37 pfn: I don't see why not, rows are natural observables, and you get the clean threading model for free (see my blog post) Jun 05 05:06:47 sqlite is robust enough, nobody closes it. android kills process, and everything is OK Jun 05 05:06:56 that is definitely not the case with many other storage libraries Jun 05 05:07:06 CedricBeust, yeah, but your example returns a list on next, not an individual entity Jun 05 05:07:20 g00s: agreed entirely. not sure what corrupting libraries you're referring to though - link? Jun 05 05:07:33 i tried leveldb and MapDb Jun 05 05:07:45 pfn: You can tailor it as you will, I hint at that at the bottom. The point of the post is a lot more about threading and using the helper as a clean separation layer while enforicing async reads and writes Jun 05 05:07:56 CedricBeust, if you were using it for streaming processing ok Jun 05 05:08:37 ah. yeah, it seems like most dbs don't play well with android's process behavior. though anything that ensures transaction complete == written to disk should in _theory_ be fine... sqlite just (massively) dominates in experience in actually _achieving_ that goal. Jun 05 05:08:40 groxx also had that problem with h2 , but we're waiting for a fix Jun 05 05:09:00 CedricBeust: I'll go that way too, thanks Jun 05 05:09:04 :) Jun 05 05:09:07 g00s: tried realm, by any chance? (not recommending it, just curious if you have opinions) Jun 05 05:09:20 groxx no .. my app is data centric and i want bare metal control :) Jun 05 05:09:33 I should keep notes on who has done what in here :| I can never remember who has tried X and who hasn't. Jun 05 05:10:20 I don't really understand the concern with lifecycle. You read and write in the background. As long as you don't depend on a Context or Activity that might be pulled from under you, the thread will run the DB query successfully Jun 05 05:12:04 g00s: oh well. the hunt continues, for someone who has experience with realm's on-disk safety :) Jun 05 05:12:22 hm. awkward sentence. too late at night perhaps. Jun 05 05:12:52 yeah, i shy away from that stuff. even in enterprise, probably because i did a lot of brown field development, i tended to use iBatis over Hibernate Jun 05 05:13:42 on android i just use plain 'ol sqlite Jun 05 05:13:54 groxx also there is Sugar Jun 05 05:14:08 that's an ORM, right? Jun 05 05:14:12 http://satyan.github.io/sugar/ Jun 05 05:14:14 * groxx does not remember details Jun 05 05:14:38 my concern with any db solution is that it must be pushed through ContentProvider, which is a horrible metaphor. RxJava seems like the perfect alternative. Jun 05 05:14:50 groxx hm, maybe thats not what i was thinking of Jun 05 05:15:01 treelzebub: Not really, I stay away from content providers for most of my projects Jun 05 05:15:13 and I want to do the same :) Jun 05 05:15:22 oh, this reminds me. I've been (strongly) considering building a toolkit of SQLite helper scripts. e.g. "rename column", "drop column", stuff like that that's not immediately trivial. Jun 05 05:15:27 All the regexp + url matching is very awkward, and it's tough to abstract as neatly as I did in that blog post Jun 05 05:15:27 think anyone would use it Jun 05 05:15:29 think anyone would use it? Jun 05 05:15:32 uh. Jun 05 05:15:39 double-enter apparently Jun 05 05:16:34 CedricBeust what do you use to notify other parties db has changed ? Jun 05 05:16:44 treelzebub: "must" is an extremely strong term. I've never touched ContentProvider, beyond being a consumer. I'd never consider using it in-process. Jun 05 05:16:48 CedricBeust: exactly. I've been searching for a solid alternative. This has been really informative. I think I'm going to disregard all my current sprint tasks in favor of migrating our db handling to RxJava. Thank you!! Jun 05 05:17:01 g00s: I hint at that at the end, also a work in progress but a customized notification that ties to adapters Jun 05 05:17:31 does it work without adapters ? Jun 05 05:17:44 It could Jun 05 05:18:04 I like array adapters, I just want to make their update smarter than it is right now, and with Rx, I think it's possible Jun 05 05:18:24 what you use ArrayAdapters ? -1000 internet points Jun 05 05:18:31 yup Jun 05 05:18:41 D': Jun 05 05:18:47 What, you use cursor loaders? -50 dkp Jun 05 05:19:01 CursorAdapter/Loader is way worse IMO Jun 05 05:19:09 glad we agree on that :) Jun 05 05:19:15 g00s: What do you use? Jun 05 05:19:23 they 100% does not map [reality] to [how cursors work]. Jun 05 05:19:27 s/es// Jun 05 05:20:14 i use a mishmash of everything except ArrayAdapter :D Jun 05 05:20:37 sometimes query -> list of pojos -> adapter, sometimes CursorAdapter Jun 05 05:20:38 hm. how does Rx make ArrayAdapter updates smarter? (and did you notice that RecyclerView got a SortedListAdapter (or whatever)?) Jun 05 05:21:08 groxx: That's what I'm working on, hope to post a progress report on my blog soon Jun 05 05:21:19 ah, cool. looking forward to it, then :) Jun 05 05:21:23 I almost always extend BaseAdapter. Am I working too hard? Jun 05 05:21:33 but i use mostly recyclerview, so there is no ArrayAdapter there Jun 05 05:21:47 treelzebub nah, thats probably the best way Jun 05 05:21:51 treelzebub: ditto, or a helper class to make multiple view-types easier. Jun 05 05:22:05 BaseAdapter is _really_ simple Jun 05 05:22:50 yeah, its almost simpler to extend BaseAdapter than read ArrayAdapter docs Jun 05 05:22:58 heh Jun 05 05:23:02 haha true fact. Jun 05 05:23:25 people often get caught on the 'ArrayAdapter now owns your list' Jun 05 05:23:36 yeah, especially since you can use the 'simple' built-in layouts that people tend to use with ArrayAdapter Jun 05 05:23:39 and they try to mutate it outside and wonder whats going on Jun 05 05:24:24 you don't need to extend anything for arrayadapter Jun 05 05:24:25 :P Jun 05 05:25:04 CedricBeust there is rxloader :D Jun 05 05:25:21 no idea how well it works https://github.com/evant/rxloader Jun 05 05:25:28 the name alone makes me throw up a little Jun 05 05:25:43 g00s: haven't looked at that Jun 05 05:26:20 http://vpaste.net/WQ5zi Jun 05 05:26:22 whew. it doesn't recreate the horrible Loader api. ok, that might be acceptable. Jun 05 05:26:31 g00s: my first thought: why in hell is that not an interface? Jun 05 05:27:46 hand crafted IRC client Jun 05 05:27:47 hehe Jun 05 05:28:19 g00s: Looks decent at first look Jun 05 05:29:12 looks like he didn't follow his own advice and forgot to call start() in the second example Jun 05 05:30:10 its funny that chet says use leveldb, but they didn't have any official JNI bindings last i looked Jun 05 05:30:45 so you're pretty much on your own, or gotta find somebody elses and hope they worked. i used somebody elses for test Jun 05 05:32:37 i remember asking ctate, should i use leveldb? he's like no, no that would be terrible Jun 05 05:33:05 gotta remember to turn off Snappy compression Jun 05 05:33:26 CedricBeust: do you have json reads with rx blog post? Jun 05 05:34:08 squ: mmh I think I touch on that briefly in my Rx Kotlin series but it's not the topic of these posts Jun 05 05:34:27 it's really trivial, especially if you use Retrofit (the Kotlin posts use Retrofit) Jun 05 05:34:47 trivial, but not for cemplete newbie like me Jun 05 05:35:07 have yet to find out how to import and use rx Jun 05 05:35:36 squ: Reading JSON is not different from reading from a database, you can adjust the code accordingly Jun 05 05:35:41 since everyone is talking about it, gotta add it to my project :) Jun 05 05:35:55 return a Callable, turn that callable into an Observable in a background thread, done Jun 05 05:36:24 the Async Rx Read design pattern is very flexible Jun 05 05:37:20 squ: it will be very helpful for you to read up on the Observer Pattern Jun 05 05:37:31 treelzebub: have link? Jun 05 05:37:50 i mean... it's a programming paradigm. google it :) Jun 05 05:37:59 okey Jun 05 05:38:37 It's a design pattern, even Jun 05 05:38:49 thing though is rx seems better when Observables are streams of data, not returning lists instead Jun 05 05:39:54 yes, my fault. functional reactive programming is the paradigm; the pattern is the Observer :) Jun 05 05:40:13 do they still call it functional ? Jun 05 05:40:20 not when it's java :P Jun 05 05:40:24 heh Jun 05 05:40:28 never heard of “functional reactive programming” Jun 05 05:40:43 ben used to say that a while back Jun 05 05:41:08 and reactive is not IT term Jun 05 05:41:19 it is chemistry Jun 05 05:41:27 anyone else equate FRP with pure™ functional rx? e.g. Elm. entirely stateless. Jun 05 05:41:42 i think thats why they dropped functional Jun 05 05:41:48 FRP is certainly not pure Jun 05 05:41:53 there's mutability everywhere Jun 05 05:42:27 A lot of operators maintain and mutate state between each emitted item Jun 05 05:42:49 but then what's the difference between "reactive programming" and "functional reactive programming"? Jun 05 05:43:17 Nobody agrees on what functional means so who cares really... Jun 05 05:43:27 heh. good point :) Jun 05 05:44:20 ben explained it some time, more like composing async streams of data with functions :D Jun 05 05:44:57 The predominant definition involves programming with functions and having these functions as first class citizen and also immutability Jun 05 05:45:10 Looser definitions exclude immutability or allow encoding it in the type system Jun 05 05:45:17 and lack of callbacks Jun 05 05:45:20 others require higher kinds for parametric polymorphism Jun 05 05:45:26 though that's more the "reactive" part Jun 05 05:45:57 speaking of which... DATABINDING!! Jun 05 05:46:36 I'm excited to see what Anko does with the new databinding capabilities. Jun 05 05:47:58 I've never had a good experience with data-binding systems :\ too easy to accidentally encode surprises when data is bi-directionally bound. Jun 05 05:48:33 meh, i wish SAF worked down to 16 ... thats one of those things, couldn't it be a support lib add on Jun 05 05:48:35 single-directionally works great when it maps perfectly to the framework, then tends to become a massive mess when it doesn't. Jun 05 05:49:10 groxx: same Jun 05 05:49:21 yeah, my current needs are unidirectional. we'll see how that goes when we can implement it Jun 05 05:49:34 when I see there is a whole expression language you have to put in strings in XML, I tell myself "No, not again" Jun 05 05:50:00 WPF is highly regarded, not sure why "not again" Jun 05 05:50:31 remember the onClick callbacks in layouts? Jun 05 05:50:59 ugh. yes. Jun 05 05:51:01 if the existing tools didn't compile an R file you would have the same problems, right? instead of an integer ID that existed you would have to use a string or something else Jun 05 05:51:14 to bind to the widget Jun 05 05:51:27 so if the tooling goes the other way, i don't see the issues yet Jun 05 05:51:40 maybe i'm just dumb :) Jun 05 05:52:38 Code in XML is never a good direction Jun 05 05:52:52 Activities are views so maybe not XML ;) Jun 05 05:52:55 More generally, code anywhere else than in source file is never a good direction Jun 05 05:53:09 Ced Jun 05 05:53:33 CedricBeust: I love logic in database ;) Jun 05 05:53:42 uh triggers? Jun 05 05:53:48 oh yeah, gordon_ is the guy with all the stored procs Jun 05 05:53:54 hehe Jun 05 05:54:11 well, damn stored procs can be a solution in extreme performance situations Jun 05 05:54:18 so i never say never :P Jun 05 05:54:19 Yes, yes Jun 05 05:54:38 g00s: if the existing tools didn't compile an R file, I wouldn't touch XML. ever. and there are plenty of things I've done in XML that, after a few iterations, make me wish I'd never put them there to begin with. Jun 05 05:54:45 Take 4 tables in transaction, create 5th temp table in count something Jun 05 05:54:56 Sounds like great idea Jun 05 05:55:31 similarly, data-binding: when it's simple (aka: your app is simple), it doesn't really matter what you use. it's all fast. use the fastest. the _instant_ it leaves that, excessively-helpful DSLs become a proportional-to-fanciness pain-in-the-ass. Jun 05 05:56:22 as android devs, we are guinea pigs to google's api experiments :D Jun 05 05:56:46 rx came from MS, mvvm came from fowler but MS was probably first to impl it Jun 05 05:57:54 groxx: that's my main concern with Anko. The syntax is beautiful, and I'm already using Kotlin more and more. But what do I lose by using this DSL? Jun 05 05:59:23 not sure how much DSL @{foo} is Jun 05 06:00:20 treelzebub: ¯\_(ツ)_/¯ if it fits, use it. I just tend to recommend "learn it well enough to re-implement it from scratch if necessary" in the background. if you outgrow it, it's good to know what you're leaving and why what you're doing is better. Jun 05 06:01:04 i guess it does get fancy @{user.isAdult ? View.VISIBLE : View.GONE} Jun 05 06:01:34 Yeah, the expression language is what makes me nervous Jun 05 06:02:48 Get Scala ;) Jun 05 06:02:57 Why would I do that... Jun 05 06:02:59 CedricBeust: Exactly, but I would love to see XML get phased out. And if I could express layouts in Kotlin along with everything else... Jun 05 06:03:05 lol scala Jun 05 06:03:08 it puts your behavior in two places instead of one => less understandable code. unlikely to be a good thing. Jun 05 06:03:42 am i the only one that dreads reading other people's android code? as if certain that its a ball of spaghetti Jun 05 06:03:57 It's Java, it's easy to read Jun 05 06:04:17 g00s: it usually is :) but I tend to look forward to it. Jun 05 06:04:26 I think most people dread reading others' code regardless of language :P Jun 05 06:04:31 maybe I'm a masochist though Jun 05 06:05:25 It gets easier with age. I even care less and less about coding style these days Jun 05 06:05:46 now that is surprising! good to hear :) Jun 05 06:06:48 new to AS/gradle. a lot of gradle build errors(a lot of redefined): http://pastebin.ubuntu.com/11581429/ Jun 05 06:07:49 Hi all. I have a small Problem with Importing in Studio. For some reason i am not able to do this aidl Imports => http://i57.tinypic.com/2d18vbk.png ! Can somebody tell me what is wrong and how i can fix this Problem ? Jun 05 06:08:04 something from google play service wallet resource redefined. but the project never uses wallet. Jun 05 06:08:32 groxx did you ever state machine-ify your app ? Jun 05 06:09:13 rrr: probably more useful to paste your build.gradle rather than just the errors you're getting :) Jun 05 06:09:23 not yet :) other more-pressing tasks. Jun 05 06:09:42 treelzebub: i Lille like Scala more than kotlin ;) Jun 05 06:10:18 gordon_: i don't understand you, but i fully support your right to exist. :P Jun 05 06:10:27 g00s: though I am having fun killing off launch-slowness. down to less than 1/4 of what I started with, and much less on the pathological devices, Jun 05 06:10:58 that LocalTrace file has been terrifically useful, though M breaks run-as D: Jun 05 06:10:59 groxx what were the biggest wasters ? Jun 05 06:12:24 eager querying, LibPhoneNumber (omfg 5 second init time on old devices), some obviously-cacheable things. unfortunately I doubt if we'll ever win fastest-app awards :) Jun 05 06:12:52 treelzebub: you will understand that one day Jun 05 06:13:10 lulz doubt it Jun 05 06:13:38 treelzebub: which build.gradle file you want to look at? there are 3 build.gradle files. one toplevel, the other 2 are module's Jun 05 06:14:50 CedricBeust when you use Android Services, do you ever use binding / localservice approach or try to stick to the intent based way ? Jun 05 06:15:14 i always find it interesting to ask what other experienced devs do in areas like this Jun 05 06:15:24 rrr: ugh. both of the module's, i suppose Jun 05 06:17:27 rrr: i strongly suspect there is something horribly wrong with your directory structure. Jun 05 06:18:17 unless your app is named JakeWharton-ViewPagerIndicator Jun 05 06:19:42 rrr: to the left of the Run button in AS, you select the module you want to run. I'm guessing you're selecting the lib ViewPagerIndicator instead of "app" or something like that. Am I right? Jun 05 06:20:43 this is app build.gradle: http://pastebin.ubuntu.com/11581648/ Jun 05 06:21:28 yeah, you have the wrong module selected for your run configuration Jun 05 06:21:50 so basically you're attempting to run ViewPagerIndicator as a stand-alone app Jun 05 06:22:49 this is JakeWharton-ViewPagerIndicator build.gradle: http://pastebin.ubuntu.com/11581667/ Jun 05 06:23:02 treelzebub: no I run the 'app' Jun 05 06:24:09 okay, remove compile 'com.android.support:support-v4:19.1.0' from your app's build.gradle -- that is already imported by VPI Jun 05 06:30:26 treelzebub: same errors after that. Jun 05 06:30:30 rrr: also consider that you are several versions behind by targeting support version 19.1.0, and by specifying "+" for Play Services, you are using the most recent, which is bound to cause problems with your old Support version; and ActionBarSherlock is a deprecated lib. Jun 05 06:32:37 my advice: take ActionBarSherlock out of your project completely. It is covered by the support lib. Then target support-v4:22.2.0 in one place only. Jun 05 06:33:44 and change play-services:+ to play-services:7.5.+ for good measure. Jun 05 06:34:35 yeah you can't say pla-services:+ ... thats recipe for diaster. i use :7.5.+ or whatever Jun 05 06:34:45 lol can't spell Jun 05 06:35:08 play services guys do lots of breaking changes Jun 05 06:36:42 i'm also having to bite my lip to stop from asking how attached you are to minSDK = 9 :P Jun 05 06:37:16 clearly i bit my lip instead of my fingers Jun 05 06:38:27 this is a project written by another Jun 05 06:38:39 I'm having trouble getting my custom View subclass to work from xml. Currently I just attach the view to a layout in my activity, and it works fine, so I know the problem isn't somewhere else. Jun 05 06:38:42 you don't say. was it written in 2013 by any chance? Jun 05 06:40:26 i have a strong suspicion this is commonsware code from a couple years ago. good stuff, but outdated. Jun 05 06:41:09 <_genuser_> g00s: yo yo. Jun 05 06:41:13 rrr: what are you trying to accomplish with your app? there are probably lots of current examples to work from. Jun 05 06:41:22 <_genuser_> g00s: you were right. the recruiter never got back. radio silence. Jun 05 06:41:29 :( Jun 05 06:41:35 treelzebub: if I remove ActionBarSherlock, there are resources referencing from main app, which causes errors Jun 05 06:41:46 <_genuser_> g00s: no worries. just would have been nice to entertain an offer and to interview. Jun 05 06:42:26 treelzebub: there are some bugs I need to fix Jun 05 06:43:19 I use eclipse before. probably around 2013 Jun 05 06:43:28 rrr: ActionBarSherlock is a lib that was written to support the ActionBar in older Android devices before Google actually supported it. These are not bugs, this is outdated code. If you remove that lib, you need to change all the references to the proper classes in the support lib. You should probably not be using this example app at all. It is outdated as fuck. Jun 05 06:45:35 http://pastebin.com/4URixXRG Jun 05 06:46:35 rrr: To clarify, if you are trying to build an app based on this example code, you are going to have a BAD TIME. Your entire codebase is outdated by about 2 years. Jun 05 06:49:44 i have a feeling you missed that, so: Jun 05 06:49:46 rrr: To clarify, if you are trying to build an app based on this example code, you are going to have a BAD TIME. Your entire codebase is outdated by about 2 years. Jun 05 06:50:48 what's the goto method of testing code which requires getActivity etc? I'd like to just be running a full test activity without creating a full project, possibly importing package code from the production activity Jun 05 06:52:15 treelzebub: yeah got it. you mean i need to rewrite it. no worth i think Jun 05 06:52:28 This is the error I'm getting Jun 05 06:52:31 http://pastebin.com/qkuvw3y6 Jun 05 06:54:07 rrr: exactly. you have to be careful choosing example projects to work from. Android tools move fast because the support/tools team is constantly trying to catch up with its own platform. Jun 05 06:54:25 treelzebub: i just want to build it successfully and fix one small bug somewhere else in the code. Jun 05 06:54:53 rrr: your one small bug is still based on horribly outdated code. that is not going to get any better. Jun 05 06:59:19 rrr: you are still learning important skills for android dev. playing with the libraries and versions in your buildscripts is an essential part of the process. Jun 05 07:00:40 treelzebub: ok so what is the recommended build script for this app? Jun 05 07:02:14 Any help would be appreciated. I'm pretty sure the problem is that I need to override some layout related functions, but I'm not even sure if that's the problem. Jun 05 07:02:44 mrmyers: java.lang.ClassNotFoundException: com.example.mrm.graphulator.Graph Jun 05 07:03:13 treelzebub: what minSDK are you using? Jun 05 07:03:35 Hi! how do i finely adjust element in relative view? when i move it around its all jagged and hard to position Jun 05 07:03:40 rrr: i outlined that a while ago, in detail. almost every version of every library you're targeting is out of date by about 2 years. you need to remove ActionBarSherlock and implement the support ActionBar provided by the android support lib. That means you have to update all the calls to ActionBarSherlock in your code. This is not going to be a quick fix. Jun 05 07:03:57 There is likely a bug in the CoordinatorLayout, AppBarLayout offset change listener only gets called when the app is relaunched, and gets lost again. Jun 05 07:07:23 Oh sorry I made an edit to my layout.xml trying to fix it, and introduced an irrelevant error. Here's the relevant one: Jun 05 07:07:56 s/layout/activity_main Jun 05 07:09:34 http://pastebin.com/Nx1Whmsy Jun 05 07:09:51 rrr: 16 Jun 05 07:10:07 guys can I obtain info about video encoder and decoders ? Jun 05 07:10:20 rrr: but that is the least of your worries at this point. i cannot stress enough: every version you are targeting is 2 years old. Jun 05 07:12:47 treelzebub: ok you talked about support library and play-service version. how about other libraries? (presage, androidchart and viewpagerindicator) Jun 05 07:13:36 rrr: search for them here: http://gradleplease.appspot.com/ it's not always totally current, but it's pretty good. Good luck, my friend. I'm going to bed. Jun 05 07:13:55 I found that when you listen to music on play music, then pause the music, and close the notification, onSessionDestroyed is not being called, only when close play music from recents Jun 05 07:14:11 treelzebub: thx Jun 05 07:14:24 Android is using OpenMax for hw decoding and encoding so is there any way to know what it supports ? Jun 05 07:15:02 Iam interested in what profile of h264 specific device supports Jun 05 07:22:38 Is it possible to pass commandline options to emulator via AS? Emulator on my system runs at 100% if -noaudio is not used. Jun 05 07:25:11 Hey guys. Im new to android app dev and I doing some tutorials to get me started.. I have done some cusomt ListView tutorials and successfully got it to display my picture for every list using a Custom layout that I have built. THing is I can only seem to give it one picture and not multiple pictures. Is making a layout the right way to go for something like this? Jun 05 07:26:02 *poke* Jun 05 07:28:58 guys Jun 05 07:29:14 what is MediaCode alternative for API 15 ? Jun 05 07:29:22 MediaCodec* Jun 05 07:31:14 people, i've registered contentobserver like this registerContentObserver(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, true, myObserver); Jun 05 07:32:01 cart_man yes Jun 05 07:32:05 so i get notified when something happens on sd card, but in uri parameter is just content://media. So is there way to find what was changed? Jun 05 07:37:48 Is there a better channel to ask for help on this? Jun 05 07:40:14 mrmyers: I guess not Jun 05 07:40:47 :-( Jun 05 07:40:48 mrmyers: there are like 200 people here Jun 05 07:41:05 mrmyers: but sometimes they can't even answer a simple questions Jun 05 07:41:39 Levite, But how can one make every list item have a different picture? Jun 05 07:42:16 your adapter provides one to the layouts Jun 05 07:43:24 How to run tests on actual device with an activity specifically written for testing Jun 05 07:43:30 harisk92: To be fair, it is 4:00am east coast, and 1am west coast. Jun 05 07:44:27 cart_man something along these lines http://ricston.com/blog/optimising-listview-viewholder-pattern/ Jun 05 07:46:01 hi guys need help. Jun 05 07:46:24 same Jun 05 07:46:36 I am working on a project for that I need to get top 1000 apps in each category Jun 05 07:46:36 same Jun 05 07:47:24 when I do https://play.google.com/store/apps/category/EDUCATION/collection/topselling_paid?start=100&num=25 i get 101-125 ranked apps of education category Jun 05 07:48:07 but when I do https://play.google.com/store/apps/category/EDUCATION/collection/topselling_paid?start=600&num=25 it redirects me to 1-25 apps. Please help I am stuck with it . Jun 05 07:51:28 there may be fewer than 600 applications? Jun 05 07:51:46 in that category Jun 05 07:53:21 no Jun 05 07:53:42 when I do https://play.google.com/store/apps/category/EDUCATION/collection/topselling_paid?start=500&num=120 it shows 120 501-620 applications Jun 05 07:53:57 Anyone know a good channel for android development help? Jun 05 07:55:01 mrmyers: #android-dev Jun 05 07:57:38 ondored, ^^ Jun 05 07:58:42 ondored: Er, do you know one where more than 20% of people asking a question get a response, even a simple RTFM? Jun 05 07:59:01 shut up man Jun 05 07:59:06 oughtta slap your face Jun 05 07:59:10 hi,i have 5x images and i want to show them user one after another.I mean 5 images will be back to back in one image view Jun 05 07:59:25 passive aggressive pathetic-ness Jun 05 07:59:32 i was thinking using 2 image views for this, is there a good way ? for example gallery view or soemthing Jun 05 08:01:35 Odaym: Right. I'll make sure to be duely intimidated by your impulse control problems. Jun 05 08:01:57 was that so hard? Jun 05 08:01:59 thank you Jun 05 08:02:19 Odaym: You're welcome. It was a challenge. Jun 05 08:02:37 it's after hours. try asking again when people are wearing pants Jun 05 08:04:53 Levite: Fair enough. Jun 05 08:05:01 mrmyers: try stackoverflow chats? Jun 05 08:05:37 nah man its early in the morning here Jun 05 08:05:42 ondored: Thanks :-) Jun 05 08:05:47 but his sentence: "ondored: Er, do you know one where more than 20% of people asking a question get a response, even a simple RTFM? " Jun 05 08:05:52 as if making you feel guilty Jun 05 08:05:53 yuck Jun 05 08:06:42 its 10:00 am. nobody is awake Jun 05 08:06:50 good morning btw :p Jun 05 08:07:02 and please RTFM Jun 05 08:07:36 danijoo: Thanks :-) I knew that was the problem, but I just needed to hear someone say it I guess. Jun 05 08:08:05 you will hear it a lot if you come here in evening :D Jun 05 08:13:16 Odaym: I know right? At least he didn't talk to an indeterminate 3rd party about how awful everyone was. That would have been so passive aggressive. Jun 05 08:13:40 you know the strategy to get an answer here? Jun 05 08:13:42 the best one Jun 05 08:13:55 you keep talking about the issue as if you are trying to just talk to yourself about it Jun 05 08:14:00 ;) Jun 05 08:14:16 you show that you dont really care if they join, but they will in the end cause htey become curious, you have to make them interested Jun 05 08:14:22 if not, then its a silly problem Jun 05 08:14:35 or some guy feels extra helpful that day, otherwise no one's interested Jun 05 08:16:10 Got an Android 1.1 project I want to upgrade to 1.2 structure and get some UI tests going Jun 05 08:18:06 1.2? Jun 05 08:18:08 damn Jun 05 08:18:09 android 1.1 ????? Jun 05 08:18:12 * jalcine cries for knapper_tech Jun 05 08:18:25 is this for research or legit prod? Jun 05 08:18:30 arent you scared of loosing all your 1.1 users when upgrading? all 5 :p Jun 05 08:18:33 he means android studio Jun 05 08:18:34 lol Jun 05 08:18:38 but he is daft Jun 05 08:18:38 oh xD Jun 05 08:18:44 daft punk Jun 05 08:18:48 lel I just got their name Jun 05 08:21:16 haha Jun 05 08:21:18 Android studio Jun 05 08:21:33 just click update .. Jun 05 08:21:44 is it possible to add additional permissions for tests part of project in idea/gradle? Jun 05 08:21:45 change to the proper channel first Jun 05 08:21:47 But I want to update the project Jun 05 08:22:01 that can be done with code, not updating the IDE Jun 05 08:22:04 you have to write the updates Jun 05 08:22:07 the project dont care about your ide Jun 05 08:22:26 people? Jun 05 08:22:40 "it seems like my environment has been upgraded, well..I better get dressed for the occasion!" Jun 05 08:22:56 i need write access on sd card, but only in tests Jun 05 08:23:23 everyday I hear people here talking about tests, im so ashamed :( Jun 05 08:23:36 really should learn what testing is Jun 05 08:24:16 ondored, add it to the manifest for tests i guess ;) Jun 05 08:25:01 i tried but test fails Jun 05 08:25:36 i tried to add it to test manifest Jun 05 08:26:54 don't use proguard? might as well open source your app. https://github.com/skylot/jadx Easier and nicer than dex2jar Jun 05 08:27:02 anyone used JEB decompiler before? Jun 05 08:27:32 expensive but looks like it has tons of extra features https://www.pnfsoftware.com/ Jun 05 08:28:32 how do i use fonts in android? like any font Jun 05 08:28:59 not very easily NateRiver, but there's a defined process you go through and it will work Jun 05 08:29:13 first google result should produce a complete answer with all needed steps Jun 05 08:29:33 NateRiver: Typeface.createFromAsset(mgr, path) Jun 05 08:32:10 NateRiver: I wrote this awhile ago. You can copy it into your project and just do: Fonts.with(context).load("font/YourFont.ttf").into(activity); Jun 05 08:32:17 http://pastebin.com/wUGpYdbx Jun 05 08:32:29 if you're going to go for solutions, see Calligraphy Jun 05 08:33:03 will the io2015 app source be open to public? Jun 05 08:33:10 nice idea, I wish Jun 05 08:35:49 really need to see if they've used the design support library Jun 05 08:35:58 we dont really need the source though, I would love to get it but I would only look at how they structured their code, not what they wrote Jun 05 08:35:58 hah Jun 05 08:36:01 we know how to make like that app Jun 05 08:36:11 ez Jun 05 08:36:22 they are noobs man Jun 05 08:36:23 the toolbar thing man Jun 05 08:36:39 yea? it's out there, there's code for that Jun 05 08:37:05 trying to reset the appbar, they've done it well Jun 05 08:37:20 I think I saw "fadingActionBar" library somewhere 2 days Jun 05 08:37:21 ago Jun 05 08:37:44 surfdb1 so is it easier to do it this way? or just draw it in illustrator? Jun 05 08:38:15 razzledazzle: It'll be open source eventually, probably within a month or two Jun 05 08:38:21 NateRiver: Oh, you are talking about making your own typeface? Jun 05 08:38:56 No i mean like making an image of your font and then using that image Jun 05 08:39:20 I need to get an activity context in a separate testing environment (differenta activity for testing?) to use some libraries. Jun 05 08:39:32 NateRiver: like a font preview? not sure what you are trying to do o.O Jun 05 08:39:56 SimonVT: the sooner the better, any ideas on how to make the appbar reset, by reset I mean return to its original position, setting the translationY to 0 works, but gets back into place when fragment gets changed, scrolled, etc. Jun 05 08:40:45 use its height? Jun 05 08:44:40 hell Im going to do it tonight too Jun 05 08:44:43 I like how they did it Jun 05 08:44:55 noobs they are, its a sweet animation Jun 05 08:45:37 but look at the animation of when you search the search icon in Explore fragment, it's Leeroy JANKY Jun 05 08:45:43 so bad Jun 05 08:46:57 its okay surf2b1 your thing explained it, im just sad i cant select a font like its microsoft word or CSS Jun 05 08:47:32 NateRiver: you can select from different font families Jun 05 08:47:44 hey hey, I have a dialog with an animation going on, any way to have dialog not clip is child views (a certain amount of the view heirachy in a dialog seems to be out of my control) Jun 05 08:47:50 surf2b1 isnt there only like 5? Jun 05 08:48:07 NateRiver: not very many but they are here: http://stackoverflow.com/a/29533686/1048340 Jun 05 08:48:26 people, i've registered contentobserver like this registerContentObserver(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, true, myObserver); Jun 05 08:48:31 so i get notified when something happens on sd card, but in uri parameter is just content://media. So is there way to find what was changed? Jun 05 08:50:41 ondored: you want to know the file path? Jun 05 08:51:11 нуы Jun 05 08:51:13 yes ) Jun 05 08:52:58 ondored: I think this would work: http://pastebin.com/vLbxcmfm Jun 05 08:53:42 surf2b1: thanks! will try later Jun 05 08:54:52 hello can anybody here answer this question ? Jun 05 08:55:02 http://stackoverflow.com/questions/30660967/obtain-informations-on-supported-media-formats-programmatically?answertab=active#tab-top Jun 05 09:00:03 I'm using admob to monetize a relatively new app. My impressions have gone up over time, however my click through rate is constantly on its way down, leading to my revenue not going up as much as it should. Any reason why this might happen? Graph (blue: earnings, red: impressions, green: CTR which goes from 1.37% to 0.21%) at http://i.imgur.com/Im0HT0t.png Jun 05 09:01:18 shitty ads or bad placment maybe Jun 05 09:01:32 there are many apps that list for oyu all the information you need about a device Jun 05 09:02:03 How powerful is the animation API of android? can you do anything you can think of? Jun 05 09:02:05 for example there's one called Display Metrics, you can test the dpi and see how textview size would appear on it Jun 05 09:03:07 NateRiver, that's a strange question :P Jun 05 09:03:51 ok this one harisk92https://play.google.com/store/apps/details?id=com.devicestats.android Jun 05 09:03:57 it has a ton of information Jun 05 09:05:45 here's the whole list, it has a lot of good apps for just testing things http://intohand.com/blog/post/apps-for-android-developers Jun 05 09:06:28 * wakelock likes elixir2 for that purpose Jun 05 09:06:58 duncannz, nobody likes ads, simple as that :p Jun 05 09:07:16 razzledazzle: Not sure I understand what you mena Jun 05 09:07:19 Mavrik why? can you do anything with the animation thingies? Jun 05 09:07:37 wakelock, I also like my stuff for free :) Jun 05 09:07:43 NateRiver, "anything" means... aynthing Jun 05 09:07:51 NateRiver, so no, you can't upload data to the internet with the animation API Jun 05 09:08:07 also, you probably will have to use some other APIs to make good animations ;) Jun 05 09:08:13 NateRiver, so I suggest you ask less broadly Jun 05 09:08:48 I suggest you try and see for yourself, you are the only one who can decide if it's good enough for your specific case Jun 05 09:09:00 Indeed. Jun 05 09:09:13 can you do any animation things with android animations Jun 05 09:09:19 ... Jun 05 09:09:25 *slap* Jun 05 09:09:30 go stand over there Jun 05 09:09:39 yeah absolutely not, I don't see why would anyone use animations to do animations Jun 05 09:09:43 lol Jun 05 09:09:45 + Jun 05 09:09:49 I'd go for TextView class Jun 05 09:09:55 and EXTEND it Jun 05 09:10:01 I'd just go for an empty View Jun 05 09:10:07 too hardcore man Jun 05 09:10:16 but ok that would work too Jun 05 09:10:19 java.lang.Object? Jun 05 09:10:25 waaaatt mind blown Jun 05 09:10:33 you told me to ask less broadley xD Jun 05 09:10:42 ask less broadway Jun 05 09:10:47 brb Jun 05 09:10:55 SimonVT: if the user has scrolled and AppBarLayout is stuck midway, changing the Fragment during that causes the AppBarLayout to remain in that position, it should be fully visible. Do not know how to get that to happen. Jun 05 09:11:05 Am I hallucinating, or is this error saying that I don't have a GraphView constructor for types Context and AttributeSet? Jun 05 09:11:56 http://pastebin.com/qSuUt0Ks Jun 05 09:11:58 razzledazzle: Give each Fragment its own AppBarLayout Jun 05 09:12:04 That's how it's done Jun 05 09:12:27 NateRiver, yeah doing "animations things" totally nails it Jun 05 09:13:17 mrmyers, correct Jun 05 09:13:32 although "for types" is incorrect here Jun 05 09:16:26 a wild guess - you are trying to use a custom view in an xml layout Jun 05 09:16:38 wakelock: Gah. I have no idea what's going wrong. I have a constructor for those types Jun 05 09:18:47 Sorry im just really tired Jun 05 09:19:45 dunno, it says you don't Jun 05 09:19:53 mrmyers, ^ Jun 05 09:20:00 mrmyers, RTFM :p Jun 05 09:20:11 and im reading these developer docs and i cant tell if im suppose to learn this OpenGl es thing they talk about to do proffessional animations or if the API thing is enough Jun 05 09:23:25 http://pastebin.com/44dbC21E Jun 05 09:23:31 This is my custom view Jun 05 09:23:48 NateRiver, just use normal animation until you think you need open gl Jun 05 09:23:57 I think you need to explicitly declare your constructors public Jun 05 09:24:24 If im in an Activities fragment what do i do to step back into the activity? just use an Intent ? Jun 05 09:24:37 thanks danijoo that sounds like a good idea Jun 05 09:24:43 yes i think wakelock is right. Jun 05 09:24:49 atm they are packageprivate Jun 05 09:24:58 * wakelock is always right :p Jun 05 09:25:08 (I'm modest too) Jun 05 09:25:10 unless he isnt :p Jun 05 09:25:31 Perfect :-) Jun 05 09:25:33 yes, those times are exceptions Jun 05 09:25:37 but EVERY OTHER TIME Jun 05 09:26:17 you make it sound as in every odd time I'm right and every even I'm not :( Jun 05 09:26:21 as if* Jun 05 09:26:47 * wakelock throws a NotRightException Jun 05 09:26:51 haha Jun 05 09:26:59 Woo. All is good in the world. Jun 05 09:27:18 told you it's more about your view ;) Jun 05 09:28:16 hi Odaym Jun 05 09:29:23 yea Jun 05 09:29:38 the Device Stats app I linked you to is shit, sorry Jun 05 09:29:45 he just dumps text on the screen without anything else Jun 05 09:29:48 but others are good Jun 05 09:30:19 i think this is correct solution for removing fragment getActivity().getFragmentManager().beginTransaction().remove(this).commit(); Jun 05 09:33:00 Woo. I have a working graphing calculator. Jun 05 09:34:33 yay, you just successfully reduced your android device to a 15-year-old hp calculator Jun 05 09:34:49 So as soon as I delete a fragment from activity is the Activities onResume called? Jun 05 09:35:51 ...no Jun 05 09:36:14 why would fragments have anything to do with the activity lifecycle? Jun 05 09:36:50 well they live inside the activity.. Jun 05 09:37:14 I'd imagine Jun 05 09:37:30 well when i start the activity it generates a random fragment in its OnCreate. Then i delete the fragment, and return back to activity what should i do to recall my random fragment generator in activity again Jun 05 09:40:27 maybe when it calls fragmenttransaction.commit() it pauses until fragment is destroyed? and i could put a while loop in OnCreate Jun 05 09:41:02 fragment transactions dont call anything on activity Jun 05 09:41:07 you have to do it manually Jun 05 09:42:36 android.fragments.random.Generate() Jun 05 09:46:01 danijoo basically Activities fragment deletes itself. How does Activity get notified of this Jun 05 09:46:26 bad design Jun 05 09:46:29 let the activity do it Jun 05 09:46:52 Is there a way to have an array of values declared in xml? Jun 05 09:47:07 mrmyers, Jun 05 09:47:40 danijoo: Will that work with attr? Jun 05 09:47:54 RTFM. its in there.. Jun 05 09:48:04 but yes Jun 05 09:48:30 its a button in the fragment though, only fragment can control it Jun 05 09:49:13 getActivity().doAllTheFragmentWord(); Jun 05 09:49:18 work Jun 05 09:49:19 :) Jun 05 09:49:25 maybe when it calls fragmenttransaction.commit() it pauses until fragment is destroyed? <-- absolutely not, that would make for a *horrific* UX Jun 05 09:49:45 most ui things are async on android Jun 05 09:50:06 * wakelock makes danijoo word Jun 05 09:50:37 ohh okay ive seen the light now danijoo thank you thank you Jun 05 09:51:43 danijoo: Can I get advice on which manual to scour? A phrase to google might also be helpful. Jun 05 09:51:59 android resources :) Jun 05 09:52:11 or resource types Jun 05 09:52:31 or "android array resource" Jun 05 09:52:33 site:developer.android.com Jun 05 09:53:05 mrmyers, it's all in there, somewhat logically organized Jun 05 09:53:24 surf2b1: null cursor Jun 05 09:53:29 ( Jun 05 09:53:48 Using that site. I've been having some trouble finding it. Jun 05 09:55:50 mrmyers, http://bfy.tw/BXr Jun 05 09:57:42 Thanks. Jun 05 10:04:52 I'm still not sure how, in a declare-styleable section, to declare an attribute accepts a string array. Jun 05 10:06:41 http://stackoverflow.com/a/15231645/1329126 Jun 05 10:07:15 hey so the TextWatcher's method onTextChanged(...) there is an int param called count... does that mean how many chars are in the string? Jun 05 10:08:57 MartialLaw, http://developer.android.com/reference/android/text/TextWatcher.html#onTextChanged%28java.lang.CharSequence,%20int,%20int,%20int%29 Jun 05 10:09:05 is it really so hard to look up the official docs? Jun 05 10:09:09 gotcha. says nothing about count tho Jun 05 10:09:12 already did braaaah Jun 05 10:09:15 yeah it does Jun 05 10:09:31 "... to notify you that, within s, the count characters beginning at start are about to be replaced by new text with length after." Jun 05 10:10:12 ah Jun 05 10:10:27 lrn2read ;) Jun 05 10:10:46 ah format="reference" Jun 05 10:11:15 fck0ff Jun 05 10:11:17 ;) Jun 05 10:15:17 hi Jun 05 10:15:32 ondored: hmm.. what is your uri.toString()? Jun 05 10:15:36 I have a ArrayAdapter, and I give him a List. Will it use the same list underneath or does it make a copy ? Jun 05 10:15:53 ArrayAdapter is a woman Jun 05 10:16:08 s/him/her/g Jun 05 10:18:38 quelqun_dautre: I believe it does not make a copy Jun 05 10:18:53 https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/ArrayAdapter.java Jun 05 10:22:25 mObjects = objects; Jun 05 10:22:27 surf2b1: content://media/ Jun 05 10:22:35 besides that in init() method it does not copy Jun 05 10:29:08 ondored: should look something like: content://media/external/images/media/461684681 Jun 05 10:38:25 quelqun_dautre: this gives immutable list http://vpaste.net/K99jA Jun 05 10:42:04 surf2b1: that would be nice ( Jun 05 10:43:24 Does anyone have tried or using GenyMotion? Is it really so good as they claims? Jun 05 10:43:43 a lot better than the default emulator Jun 05 10:44:03 it's fast Jun 05 10:44:34 So its better then the default one in Android Studio? Jun 05 10:45:00 depends, genymotion is x86 Jun 05 10:45:03 only Jun 05 10:45:34 Datasmurfen, what's your current issue with the default one? Jun 05 10:46:55 aaa my pc is x64. Nothing - it's just it is so slow :/ Jun 05 10:48:01 ok, just give a try to genymotion then Jun 05 10:58:16 its not that expensive either Jun 05 11:02:07 squ: yeah, except I don't want an immutable List Jun 05 11:02:18 ok Jun 05 11:02:23 I just want to be sure that if I modify that list, the listview will refresh with it. Jun 05 11:03:12 to refresh ‘notifyDataSetChanged’ Jun 05 11:03:20 been there, done that Jun 05 11:03:23 ok Jun 05 11:03:37 even better, I made an ObservableList and corresponding ObserverArrayAdapter Jun 05 11:03:51 now everytime I change my list, the listView refreshs automagically :) Jun 05 11:04:02 surprised it doesn't exist already somewhere, though. Jun 05 11:04:09 (maybe that's bad practice ?) Jun 05 11:05:05 what that does? can you show? Jun 05 11:05:20 bonjour! :) Jun 05 11:05:26 russo turisto Jun 05 11:05:39 oblico amorale ;) Jun 05 11:05:45 :) Jun 05 11:09:02 squ: give me a minute, I'll paste you some code. Jun 05 11:09:24 or tutorial Jun 05 11:09:34 will be better :) Jun 05 11:09:39 you'd be interested in that ? Jun 05 11:10:17 well, gimme a day or so, I'll write that :] Jun 05 11:11:01 oh, no thanks :) Jun 05 11:11:43 hey guys Jun 05 11:11:50 how can i create a pop up layout like this http://images.dailytech.com/nimage/Popup_Android.png Jun 05 11:12:01 i want something like + icon Jun 05 11:12:29 sci-fic, it looks like a Dialog window, but you could do it with PopupWindow class Jun 05 11:12:33 Looks like a Dialog.... Jun 05 11:13:49 hello i'm trying to make a JSON request , but looks like i cannot execute Network Activity on main thread so i came up with this thing "Async Task" but looks like to implement this i have to write a new class however right now i have only function and its looks quite complicated to change all code once again , can you please tell me smart way to achive this , Thanks Jun 05 11:14:39 adq and claint http://postimg.org/image/4o2u7ylz9/ this is totaly what i need Jun 05 11:14:44 im using custom layout and a alertdialog Jun 05 11:14:54 can i get this by using those ? Jun 05 11:17:00 that should be sufficient Jun 05 11:22:38 boodllebat, smart way is to do it correctly from beginning, then you dont have to "change all code once again" Jun 05 11:22:47 but you missed that opportunity, so... :p Jun 05 11:22:57 danijoo: yes i figured that out after reading its easy Jun 05 11:24:00 danijoo: it is pretty well documented , i was making desicions too fast Well thanks i'm gonna solve. Jun 05 11:28:18 2:25:57 PM Gradle build finished in 11s 188ms Jun 05 11:30:46 squ: And what is that? Jun 05 11:30:50 copy paste is root of all evil. Jun 05 11:30:56 :) Jun 05 11:31:11 this is slow, I don't like Jun 05 11:31:18 can somebody help me to get this popup ? http://postimg.org/image/4o2u7ylz9/ Jun 05 11:31:27 * squ switching to irc each time build starts Jun 05 11:31:31 :( Jun 05 11:31:34 claint: A generation survives and thrives on copy paste all around the world. All hail StackOverflow Jun 05 11:31:50 danijoo: i have one question doubt about it does ReturnedValue from doInBackground() gets passed as argument to onPostExecute( argument )? Jun 05 11:32:00 boodllebat, yes Jun 05 11:32:10 danijoo: that's great Thanks :) Jun 05 11:32:12 this is my xml http://paste.ubuntu.com/11586330/ Jun 05 11:32:16 squ: Make your code thin and get a fatter build machine Jun 05 11:32:50 does it normal to do so? http://privatepaste.com/aeac4bb88e Jun 05 11:34:05 i mean splitting into two execSQL? Jun 05 11:37:03 squ, Total time: 1 mins 20.176 secs Jun 05 11:37:59 Facebook SDK 4.0 - If the user login in through the ProfileClass: http://pastebin.com/tjc6rD4d the app remmbers his/her profile picture and name. If he have choosen to do it in the welcome (shown only one time at firststartup) it dosn't. Still it remmbers the user is logged in - but not showing the profile name or pic. Any clues :) ? Jun 05 11:46:38 anyone ? :S i want to do that http://postimg.org/image/4o2u7ylz9/ Jun 05 11:48:23 sci-fic, you cannot ask ppl to do your job Jun 05 11:48:54 if you have a more specific problem, you can ask around about Jun 05 11:49:32 i dont want to anybody do that,just want to know how i can do that Jun 05 11:50:04 sci-fic, what does your xml produce? Jun 05 11:51:33 its inside of layout i tried margin,padding etc. Jun 05 11:51:55 "Carefully explaining your problem is half the solution." as always Jun 05 11:52:11 i need something like layout_x property Jun 05 11:52:23 you should post what your current layout looks like and maybe we can adjust it from there on Jun 05 11:52:40 but nobody wants to copy paste your stuff in their ide and change it until it looks like the one you need Jun 05 11:52:47 ^ Jun 05 11:53:38 you should dissect what you see, you have an image on top, a textview below it, and the top ~third of the background is transparent and the rest is white Jun 05 11:54:14 if you're not able to represent that in a simple xml layout, you have to train yourself, try again, understand the different views, etc Jun 05 11:54:41 first thing I notice when looking in your xml is that the outer relative layout is useless Jun 05 11:54:51 because all it wraps is a linearlayout Jun 05 11:55:55 one sec Jun 05 11:56:43 How to get tabs visible using ViewPager and PagerTabStrip. The pages are being swiped left/right - changes content and all; but I can't seethe tabs. How to have two clearly visible tabs with titles? (Can't extend ActionbarActivity; as my activity is bound to extend an activity) Jun 05 12:03:04 amar: PagerTabStrip view goes inside tag Jun 05 12:03:41 Napalm: Yes, that's where it is. But I can't see the tabs. Jun 05 12:04:50 amar: did you override getPageTitle() in your adapter? Jun 05 12:06:29 Napalm: Yes, I did and I see the titles. But "TABS" are not visible. I mean like the visual and all. It's just page title. Here's my layout http://privatepaste.com/a290b1c8b3 Jun 05 12:07:21 amar: PagerTabStrip are just titles.. not true tabs.. you probably want the new TabLayout Jun 05 12:07:31 amar: https://developer.android.com/reference/android/support/design/widget/TabLayout.html Jun 05 12:08:43 Napalm: All I want are two tabs and when page A is swiped to (let's say selected or in view) the TAB A should be highlighted and so on. Jun 05 12:08:54 then you want that TabLayout Jun 05 12:09:13 you'll need to add compile 'com.android.support:design:22.2.0' to your gradle dependencies to use TabLayout Jun 05 12:10:32 its really simple, just call mTabLayout.setTabsFromPagerAdapter(yourAdapter); Jun 05 12:10:34 simple Jun 05 12:10:44 Napalm: Do I have to change signature of my class? (Because that is something I cannot do; not allowed to). As of now I am using two fragments for two pages and calling them from my page adapters. Jun 05 12:10:57 nope Jun 05 12:11:01 all that stays the same Jun 05 12:11:05 Napalm: That's a great pointer. Gonna try that. Jun 05 12:11:05 you just edit your layout Jun 05 12:11:22 remove the pagertabstrip Jun 05 12:11:38 and instead put a TabLayout above your ViewPager in your layout.. or wherever you want Jun 05 12:11:39 Napalm: Okay, so instead of TabStrip, I have to use a TabLayout, right? Jun 05 12:11:52 Napalm: ok ok..got it Jun 05 12:13:06 Napalm: Just one confusion - above "ViewPager"? PageStrip was supposed to be inside "ViewPager". It's not the case with TabLayout? And if so then can it be used independent of ViewPage? Jun 05 12:15:17 TabLayout are just general tabs Jun 05 12:15:27 they can be used for everything, not only viewpager Jun 05 12:18:10 danijoo, Napalm: Thanks. I am going to try it and read a bit about it. Jun 05 12:26:27 hey guys, got a bit of a problem ... how do I modify the layout of a listview programatically and then add the modified layout to the adapter that populates it? Jun 05 12:26:58 I've done it couple of ways but not even one works ... maybe I'm not doing it right? I don't know anymore >.< Jun 05 12:27:57 this is how it looks http://pastebin.com/r2seEZsc Jun 05 12:28:13 but it doesn't hide that textview ... Jun 05 12:28:16 any ideas? Jun 05 12:41:17 Hello i tried AsyncTask for network activity i think my logic is correct but nothing appears on my main acitvity screen i guess problem is with onPostExecute() here is this defination(http://paste.ubuntu.com/11587405/) i can also give my full code. Jun 05 12:42:49 most probably look at last line Jun 05 12:43:20 luci1093, you would have to do that INSIDE of the adapter Jun 05 12:43:32 what you are doing here has no effect Jun 05 12:43:44 what do you mean inside of the adapter? Jun 05 12:43:57 HAHAHHA sorry :) Jun 05 12:44:22 ? o.o Jun 05 12:44:31 I'm so used to overridding the adapter.... You have to override the adapter class and create your own adapter Jun 05 12:45:03 boodllebat, you are not doing anything with the result Jun 05 12:45:04 ugh >.< Jun 05 12:45:11 like updating a listview to show the posts Jun 05 12:45:23 do you, by any chance, have an example for that? :S Jun 05 12:45:52 luci1093, or change the adapters Jun 05 12:45:53 just search for it, there are many Jun 05 12:46:25 danijoo: yes i to update listview but you can on last line after catch bracket "userPost = userPost_list;" and userPost is a array which'll update list Jun 05 12:46:48 danijoo: or should i update listview inside onPostExecute() ? Jun 05 12:46:49 boodllebat, you have to tell the list to reload its content after that Jun 05 12:46:52 yeah Jun 05 12:47:04 isn't there another way? like for example I've tried v.getId() and sadly that returned the ID from R nor the R.id.tvSearchID T.T Jun 05 12:47:07 listView.getAdapter().notifyDataSetChanged() should do it Jun 05 12:47:23 danijoo: ok let me see Jun 05 12:48:14 hey MikeWallaceDev Jun 05 12:48:21 did any of you see this http://blog.printf.net/articles/2015/05/29/announcing-gittorrent-a-decentralized-github/ Jun 05 12:48:21 hey Napalm ! Jun 05 12:54:21 danijoo: do i have to update the whole listview by selecting the listview again in onPostExecute() or just use the objects from main class ? Jun 05 12:55:08 danijoo: can i show you my code ? Jun 05 12:55:13 danijoo: its small Jun 05 12:56:30 hm, yet another one that expect 1-on-1 handholding and guidance? Jun 05 12:57:48 Hello all. If anyone here has successfully used TestNG in Android Studio I would really appreciated if tell me what you put in your `build.gradle` to include the plugin. I'm having trouble: http://stackoverflow.com/questions/30666822/how-to-add-android-studio-plugin-as-dependency-in-gradle Jun 05 12:58:07 wakelock: no i'm stuck i did everything but looks i'm making some small mistake in onPostExecute() Jun 05 12:58:36 wakelock: maybe i'm not able to update listview from another subclass Jun 05 12:58:55 boodllebat, you keep asking people directly which is kind of inappropriate. just because someone was nice enough to answer your question doesn't mean they just became your personal helpdesk agent. Jun 05 12:59:46 wakelock: my bad i'm sorry for that ! Jun 05 13:01:19 Or does anyone know how to add Android Studio plugins as deps in `build.gradle`? I can't find anything in the AS docs Jun 05 13:03:34 I have a string resource in my androidTest source tree, but my espresso tests don't appear to be using that string. Does anyone know what I need to do to make it use the overloaded string resource? Jun 05 13:04:26 SpaghettiCat: i'm not prob but i think by adding "apply plugin:'package'" in you gradle build "" are not included Jun 05 13:04:32 SpaghettiCat: pro* Jun 05 13:04:55 SpaghettiCat: like this apply plugin: 'com.android.application' Jun 05 13:06:41 hmm thanks I'll try to figure out what to write into the `build.gradle` Jun 05 13:22:56 how can i change key background on keyboard key press ? Jun 05 13:26:37 can I reference the applicationId in string resources? Jun 05 13:26:52 if applicationId is defined in defaultConfig and overridden per buildType? Jun 05 13:28:52 no Jun 05 13:29:31 use context.getPackageName Jun 05 13:33:13 hello Jun 05 13:33:29 I seem to be getting crashes from less than 1% of devices Jun 05 13:33:48 is this normal? Jun 05 13:34:02 they're probably running the M preview :p Jun 05 13:34:05 Can i use two arguments on onPostExecute(one from doinbackground(),another from directly execute()) ? Jun 05 13:34:27 wakelock18: they're not Jun 05 13:34:40 is it possible that these are just badly made android devices? Jun 05 13:34:40 whoa Jun 05 13:34:46 * wakelock just became barely legal Jun 05 13:35:02 hahaha sorry about that Jun 05 13:35:23 i accidentally copied the color code thing also, i'm using hexchat Jun 05 13:35:25 paulo_, having heavily incomplete/insufficient information, the answer is - anything is possible Jun 05 13:36:18 Facebook Android SDK 4.0 Is there a easy way to change profile pic to blank? Jun 05 13:36:40 Have someone did something like that without refresh or open another activity Jun 05 13:38:37 let's see, the most frequent crash is: java.io.IOException: unable to open DEX file Jun 05 13:38:45 which can't be my fault, right? Jun 05 13:40:30 wakelock? Jun 05 13:40:45 yeah I'd say no Jun 05 13:41:05 unless your app is doing some weird crap with dexopt :p Jun 05 13:41:28 nope I'm not doing anything like that. Jun 05 13:41:44 then yeah Jun 05 13:41:51 do you also get the stack dump? Jun 05 13:41:56 wakelock: yes Jun 05 13:42:09 do you want to see the whole thing? Jun 05 13:42:12 what's that say? Jun 05 13:42:21 does it even mention your package? Jun 05 13:43:05 wait i'll pastebin it Jun 05 13:43:54 it's almost exactly like this: http://stackoverflow.com/questions/26957212/java-lang-runtimeexception-unable-to-instantiate-activity-unable-to-open-dex-f Jun 05 13:44:15 it occurs about 2-6 times a day, out of thousands of users Jun 05 13:45:28 I'd say it's cosmic rays Jun 05 13:45:28 paulo_: do you not have a stack trace to show? Jun 05 13:45:33 haha wake Jun 05 13:46:07 SpaghettiCat: it's exactly the same one on the stackoverflow question, except for the package names Jun 05 13:46:50 that seems like a plausible explanation Jun 05 13:47:19 brb 10-20mins. Jun 05 13:48:34 how can i change key background on keyboard key press ? Jun 05 13:51:15 Hi everybody! Did anyone encounter a weird behavior of RecyclerView when the list scrolls down for no reason after you call notifyItemMoved() on it? Jun 05 13:52:51 It happens to me when the item I removed to the end of the list (in adapter) is the very top in the visible area and when the top container is a bit over it Jun 05 13:53:46 Can i only pass Data type String to doInBackground() ? Jun 05 13:55:39 no Jun 05 13:58:03 boodllebat, RTFM (c) danijoo Jun 05 13:58:28 wakelock: RTFM ? Jun 05 13:58:49 wakelock: i made a wrapper class to do that Jun 05 13:59:50 boodllebat: It means Read The Fun Manual Jun 05 13:59:58 == RTFM Jun 05 14:00:09 SpaghettiCat: where is fun manual ? Jun 05 14:00:27 back Jun 05 14:00:27 SpaghettiCat: i prefer android docs they have good content there Jun 05 14:00:31 boodllebat: he's telling you to read the API docs for doInBg() Jun 05 14:00:35 SpaghettiCat: fun manual Jun 05 14:00:41 so, cosmic rays? Jun 05 14:00:43 How nice of you ;) Jun 05 14:00:49 :) Jun 05 14:00:59 SpaghettiCat: yeah i got that Jun 05 14:01:23 wakelock, SpaghettiCat: this seems to be the answer: https://code.google.com/p/android/issues/detail?id=56296 Jun 05 14:01:33 boodllebat: android docs is manual lol Jun 05 14:01:45 it occurs _while_ the app is being update, which is pretty rare Jun 05 14:01:50 S/is/are Jun 05 14:02:01 so it can't read the apk/dex file Jun 05 14:02:42 gordon_: yeah i figured that out in your conversation with SpaghettiCat Jun 05 14:03:14 paulo_, so... it really only happens during the app update, and only for users with too quick fingers Jun 05 14:03:21 so like I said - cosmic rays :p Jun 05 14:04:42 also, I've never tested my app on a Samsung Galaxy Y, i'm getting relatively many installs from that device Jun 05 14:05:00 it has a pretty small screen, so IDK how the game will even fit there Jun 05 14:05:43 Hi, I am making an app where I stream an mp3 file from a webserver Jun 05 14:06:17 and I want to make a media player service where the user can conduct various controls from a notification Jun 05 14:06:38 SpaghettiCat: Use 6.9.4 for the TestNG version Jun 05 14:06:44 such as scrolling, toggle playback etc. Jun 05 14:06:55 What would be the best place for me to look into this? Jun 05 14:08:31 boodllebat, fell asleep :D did you fix your list? Jun 05 14:08:47 danijoo: no still workin but i'm close to fix it Jun 05 14:09:58 jaana: After 2 hours I added the dep from the "Project Settings" GUI and it added the v6.9.4 and everything works great, but what it does is fetches the .jar from the online repo. But why the hell didn't Gradle find the 6.3.1 version I installed through the Plugins dialog? So I have both the 6.3.1 and the 6.9.4 installed right now... Jun 05 14:10:13 dvass, this is a very broad field, you could start with http://developer.android.com/guide/topics/media/mediaplayer.html Jun 05 14:10:56 also look how to make a custom notification layout, to add these media control button Jun 05 14:12:58 Is there anything to view the Android SQLite database of your app in realtime (or with a refresh button)? IntelliJ Ultimate seems to have it, but AS obv doesn't. Jun 05 14:14:24 Muchoz, tell me if you find something. Its the only thing i miss from ultimate Jun 05 14:15:17 (not the only thing, also RS support in editor is missing :p) Jun 05 14:15:20 danijoo, I just seem to stumble upon the issue again after installing Android M because now I have to root my device again in order to access /data. But copying it every single time is a pain in the ass. Jun 05 14:16:16 yep. Jun 05 14:16:58 I would normally click you SourceForge, but those days are in the past: https://i.imgur.com/TE6bhpp.png Jun 05 14:17:20 I dont click sourcefordge links :p Jun 05 14:17:27 about sourceforge: https://mail.gnome.org/archives/gimp-developer-list/2015-May/msg00144.html Jun 05 14:17:32 Not since they put malware on everything. Jun 05 14:17:48 they even repack lol Jun 05 14:17:57 they do that for years no Jun 05 14:18:06 im happy this gets attention now Jun 05 14:18:24 I haven't downloaded anything off of SF in like 4 years. Jun 05 14:18:40 So, re: referencing applicationId in res, I found this: https://gist.github.com/Takhion/74b67cb518e90faf2708, but I tested it and it seems that even though the test app has the .test suffix on the applicationId, the resource used is missing the .test suffix Jun 05 14:18:42 At first because the UI is the worst. Jun 05 14:19:22 hey guys, I'm currently working on a social media app. Im fetching 16:9 720p full res images. Any imagelibraries you recommend for my usage? Jun 05 14:19:45 what's wrong with the commandline sqlite3 utility? ;) Jun 05 14:20:07 chrisaardal, you said nothing about what *is* your usage Jun 05 14:20:11 wakelock, how would you access android sqlite databases with it? :p Jun 05 14:20:31 Loading 16:9 720p images Jun 05 14:20:41 It needs a good caching implementation aswell Jun 05 14:20:42 chrisaardal, that's not "usage" Jun 05 14:20:42 did they recently add adb support to sqlite3 command line util? :P Jun 05 14:21:25 wakelock, don't you still need root for that? Jun 05 14:21:28 danijoo, yes, install it in your emulator (*proper*, ie. non-stock ROMs already come with it), and then adb shell sqlite3 ;) Jun 05 14:21:38 Muchoz, true that Jun 05 14:21:40 + I'm not using an emulator. Jun 05 14:21:53 wakelock, or in short: theres no way that does not suck Jun 05 14:21:56 guess I'm just too used to all the awesomeness of a well-made rooted ROM ;) Jun 05 14:22:10 wakelock, Im building a feed that consists of only images, attached to a recycler-view and is infinetly scrollable Jun 05 14:22:12 danijoo, yeah I'd have to agree Jun 05 14:22:14 intellij ultimate sqlite feature is really awesome for that Jun 05 14:22:16 Guess I'm used to all the awesomeness of a stock ROM. Jun 05 14:22:31 Muchoz, not much to get used to there :p Jun 05 14:22:33 I'm gonna download IntellIJ ultimate then, I got a license... >.> Jun 05 14:22:39 chrisaardal, picasso Jun 05 14:22:40 if can access the sqlite db over adb and you get a nice ui Jun 05 14:22:48 Oh wait, I have it installed *facepalm* Jun 05 14:22:48 eh Jun 05 14:23:01 wakelock, please elaborate Jun 05 14:23:15 sqlite> _ <-- nice UI ;) Jun 05 14:23:15 Muchoz, should be possible to somehow extract the sqlite plugin from it and add it to AS. *should* Jun 05 14:23:38 chrisaardal, what is there to elaborate? you just got a keyword, it is up to you to research further Jun 05 14:23:43 s/ui/gui Jun 05 14:23:48 psh Jun 05 14:24:19 Can you not install it for me damnit? https://i.imgur.com/FvpvsR6.png Jun 05 14:24:20 chrisaardal, here are another two: fresco, glide Jun 05 14:24:27 danijoo, wouldn't that be *cough* stealing? >.> Jun 05 14:24:43 wakelock, why? I have an ultimate license Jun 05 14:24:53 only if I share it ;) Jun 05 14:24:59 oh I see Jun 05 14:25:04 well use it then :p Jun 05 14:25:10 at least to extract the good stuff Jun 05 14:25:11 danijoo, im allready looking at those three, the issue is how do I pick one? Jun 05 14:25:27 chrisaardal, if you don't know yourself, then nobody else can help Jun 05 14:25:33 chrisaardal, roll a 3 sided dice Jun 05 14:25:44 that is, if you don't know how to evaluate software packages... Jun 05 14:25:52 at least for glide vs picasso it really doesnt matter. Jun 05 14:25:56 Fucking "Ultimate Edition", doesn't even have an auto update feature https://i.imgur.com/2ufOXUG.png Jun 05 14:26:18 spoiled much? :p Jun 05 14:26:30 Well this stuff costs quite a bit of money Jun 05 14:26:36 I could at least get that Jun 05 14:26:45 wakelock, It is impossible to objectively evaulate the ups and downs of libraries of such depth. The reason I came here is to get some advice.. I already know that it is physically possible to read all the source and compare it. The issue is that it is impossible time wise. Jun 05 14:26:46 AS has it Jun 05 14:26:49 apparently having autoupdate would make it cost even more Jun 05 14:26:54 adq: Would it be easier to use the default media player to play it? Jun 05 14:27:12 Is it possible to pass a URL or something to the default media player to stream the audio? Jun 05 14:27:20 chrisaardal, problem is, nobody but you are intimately familiar with your use case, so nobody but you can say which is best for *you* Jun 05 14:27:21 chrisaardal, fresco is kinda new so you wnt find much about it. picasso == glide Jun 05 14:27:22 Would it automatically queue the next song if I passed another one? Jun 05 14:27:49 I really dislike Java apps on Desktop, they're so SLOW Jun 05 14:28:03 http://inthecheesefactory.com/blog/get-to-know-glide-recommended-by-google/en Jun 05 14:28:14 only the bad written once Jun 05 14:28:19 run it on a 6-year-old computer for a week, then come back Jun 05 14:28:19 ones Jun 05 14:28:22 Muchoz: they're very slow to start, but not to run Jun 05 14:28:25 everything will seem to FLY Jun 05 14:29:02 SpaghettiCat, running it is still slow. Jun 05 14:29:18 Memory usage is huge, CPU is high. Jun 05 14:29:34 * wakelock has not heard about this glide thing before, interesting Jun 05 14:29:53 Muchoz: search for benchmarks Java is nearly as fast as C/C++ Jun 05 14:30:09 * Muchoz his laptop fan starts spinning as his laptop loads IntelliJ. Jun 05 14:30:15 Muchoz, Idea/AS would be just as slow and resource-hungry even if it wasn't java Jun 05 14:30:26 the nature of the beast Jun 05 14:31:54 SpaghettiCat, admittedly that depends hugely on the actual JVM Jun 05 14:32:51 the worst thing about glide is its size Jun 05 14:33:01 430 kb for an image loading library.. really? Jun 05 14:33:16 wakelock: yes, hugely indeed. My AS process takes a GB of RAM, and java.exe that it's using to compile or do whatever in the background is another 0.8GB Jun 05 14:33:45 My Delphi IDE: Delphi XE2 only uses 400-500MB on the other hand Jun 05 14:33:49 SpaghettiCat, the gradle daemon is a beast.. Jun 05 14:33:52 add some chrome tab for documentations & distractions Jun 05 14:33:59 you're gonna swap Jun 05 14:34:01 1.8GB RAM for an IDE... fun times Jun 05 14:34:22 but the daemon is not ide t be exact :) Jun 05 14:34:43 it's part of it. Integrated Env means it's integrating lots of components together Jun 05 14:35:11 no its not. you would end with the same if you dont use the ide but command line Jun 05 14:35:11 Same here, gradle takes 1GB (WHY?) and AS 1.3-2GB. Jun 05 14:36:09 why? because it can, of course Jun 05 14:36:14 I also wonder why IntelliJ still uses JDK6 and doesn't play dice with 7 or 8 (they work, but crash a lot and have bugs) Jun 05 14:36:15 the only difference is that the gradle thread can be set to not run as a deamon when you build with commandline (increases build times though) Jun 05 14:36:29 And I'm not writing some 300 class enterprise app, it's just a shitt blackjack game for a tiny mobile device. 1.8GB RAM :) Jun 05 14:36:38 Muchoz, I run it on 7 since almost a year with no problem at all Jun 05 14:36:38 they know people will find a way to cope with whatever ridiculous nonsense they impose Jun 05 14:36:58 danijoo, font aliasing doesn't work on Mac with 7/8. Jun 05 14:37:05 = I cannot read the code Jun 05 14:37:27 doesnt mac use its only java impl. instead of oracles? Jun 05 14:37:35 maybe this is the real issue here Jun 05 14:37:36 You can install your own Jun 05 14:38:10 macs suck anyway, so no news there Jun 05 14:38:32 they are great for IT stuff imo Jun 05 14:38:46 i miss it :/ Jun 05 14:38:51 yeah computers are great for IT Jun 05 14:39:49 Hello i tried this basic thing under my onPostExecute() but on line 22 it says cannot find symbol .notifyDataSetChanged() here is the code http://paste.ubuntu.com/11589442/ Jun 05 14:39:57 I miss the native bash shell from unix on windows computers. With mac you can have that + dont have to fiddle with linux. Jun 05 14:40:13 and no. cygwin/powershell is not a solution. Jun 05 14:40:22 wakelock, what are you using dear sir? Jun 05 14:40:49 danijoo: I have an ArchLinux VM in Windows and the workflow is just great) Jun 05 14:40:54 * wakelock never has to fiddle with my linux unless I actually want to Jun 05 14:41:13 hm that didn't turn out quite right Jun 05 14:41:15 but w/e Jun 05 14:41:16 I use linux and its great Jun 05 14:41:23 * Muchoz has got an Arch Linux installation, has no time to set everything back up after reinstallation. Jun 05 14:41:49 Yes, it's great. I just can't be bothered atm to set everything up again. Jun 05 14:42:53 Muchoz: why did you reinstall? Jun 05 14:43:15 I'm using the same exact install I put on there in 2010, I only ever upgraded/updated since Jun 05 14:44:15 Because I wanted to start from scratch again and wanted to dual boot. I have a backup, but I'm not using it because I want to start from scratch. Jun 05 14:44:41 And I'm way too busy to set it up right now. Jun 05 14:44:58 then your "have no time for it" is a pretty poor excuse since it seems self-imposed :p Jun 05 14:45:12 hi i have a problem with dependencies it says multiple dex file defination Jun 05 14:45:14 http://jpst.it/zlrh Jun 05 14:45:22 com.android.dex.DexException: Multiple dex files define Lcom/google/api/client/http/HttpContent; Jun 05 14:45:44 wakelock, you're "Mac sucks anyway" is a pretty shitty way of expressing your preference since it seems self-imposed. Jun 05 14:45:47 your* Jun 05 14:45:57 I have a xml file like this : http://pastebin.com/QVLGvZ7u Jun 05 14:45:58 and thro' java (a small module) I need to turn on and off these UI buttons. I am completely new to java and Android dev as I use Unity3D. Jun 05 14:45:58 Could someone please help me to achieve this? Thank you. Jun 05 14:46:01 rathodvikas10, go through your libs/includes and clean them up Jun 05 14:46:33 how do i do that Jun 05 14:46:48 Muchoz, preference/opinion and excuse are two entirely different things Jun 05 14:47:10 wakelock, I wasn't comparing them. Jun 05 14:47:19 rathodvikas10, with your fingers and your brain presumably? Jun 05 14:48:26 why did you change your name ravilov? :p Jun 05 14:48:40 I just outed you! ha :p Jun 05 14:50:17 Is there any common java/android lib that has constants for things like meters per kilometers Jun 05 14:50:29 distance si units Jun 05 14:50:31 the answer is 1000 ! :p Jun 05 14:51:16 SQLite Android data source doesn't seem to be available.. https://www.jetbrains.com/idea/help/accessing-android-sqlite-databases-from-intellij-idea.html Jun 05 14:51:36 I never had any use for those Jetbrains docs, *sigh* Jun 05 14:52:23 danijoo:Hey i almost fixed it , but problem is i'm getting updated only one row four times that is the last one from json content also i'm unable to call notifyDataSetChanged(); from onPostExecute(); Jun 05 14:52:47 boodllebat, can you show your code again please? Jun 05 14:53:02 danijoo: can i show you my full code its small Jun 05 14:53:09 sure Jun 05 14:53:38 yiati, search for udunits library. i think they also have a java versionm Jun 05 14:53:59 Muchoz, why dual boot in a virtualization world Jun 05 14:54:32 Question about using test-variant resources in espresso - here's what I've tried so far: https://gist.github.com/shekibobo/da0237437c578cd0de00 Jun 05 14:54:33 danijoo, just for kicks, and I was never hiding :p Jun 05 14:54:45 pfn, why would I want to use a VM? Jun 05 14:54:56 i was always like "I know that atitude :p" Jun 05 14:54:57 Muchoz, because then you would be able to run both side by side Jun 05 14:55:05 because you're using VMs anyway? Jun 05 14:55:19 as soon as you use anything java... Jun 05 14:55:23 no reason to dual boot unless you don't have resources Jun 05 14:55:27 I don't want to run a Windows machine next to Arch at the same time. The only reason I still have a dual boot is because of games. Jun 05 14:55:39 but clearly you spend all your time in windows anyway Jun 05 14:55:48 I don't... Jun 05 14:55:58 ok Jun 05 14:56:05 I'm on my Mac right now Jun 05 14:56:08 danijoo: here it is line 353 causes app crash although wihtout line 353 i able to update listview from web but only last object updates to every row and no of row's is equal to objects in JSON array http://paste.ubuntu.com/11589722/ Jun 05 14:56:36 Muchoz: do you need all 3 OSs? Sounds like the Mac is the unnecessary of the 3 Jun 05 14:56:39 danijoo: no stands for number of objects in JSONArray Jun 05 14:56:39 hey guys, anybody know why im getting this error? Jun 05 14:56:42 https://www.irccloud.com/pastebin/mvaSM41t/ Jun 05 14:56:57 its a fresh install of Android Studio Jun 05 14:57:07 and so many problems with it kinda turns new devs away, no? Jun 05 14:57:14 SpaghettiCat, yes I do. I have a Macbook and no I'm not installing anything else on it. Jun 05 14:57:21 boodllebat, the reason why you only get one post is that you only create one Jun 05 14:57:31 look at line 341 to 346 Jun 05 14:57:41 you are reusing the same UserPost object. Jun 05 14:57:45 Muchoz: oh, what does Mac do better than either Windows or linux? Jun 05 14:57:46 you cant do that. Jun 05 14:57:56 SpaghettiCat: reboot faster Jun 05 14:58:03 you need to create new objects for each one because if you add it to the list and change it, it will also change in the list Jun 05 14:58:17 SpaghettiCat, please hate somewhere else. I don't need your opinion on an OS, I'll use all 3 when I want to. Jun 05 14:58:38 Muchoz: I didn't hate. I was genuinely curious bc I don't know much about macs Jun 05 14:58:46 danijoo: oh let me fix that Jun 05 14:59:03 SpaghettiCat, its a nice in between of windows and linux. at least for programming Jun 05 14:59:23 I have a useful command line and don't have to fiddle with Linux configurations. ^ Jun 05 14:59:28 But he already has both Windows AND LInux. Best of both worlds Jun 05 14:59:42 you have a nice gui (opinion!) that *just works* and still all command line tools from lnx Jun 05 14:59:44 SpaghettiCat, but that's a desktop. Not a laptop. Jun 05 14:59:57 ah no, i fixed it Jun 05 14:59:58 danijoo, yes indeed: "It just works." Jun 05 15:00:03 seems to be a 'theme' problem Jun 05 15:00:22 Surprise surprise, I use iOS for my daily driver too because "It just works." Jun 05 15:00:24 I was on mac for years and i woudnt have switched for working if its up to me Jun 05 15:00:28 Let the hate come. Jun 05 15:00:36 Windows just works, too Jun 05 15:00:36 its just that I "need" the same computer for games :p Jun 05 15:00:39 * pfn doesn't care much for mac or ios Jun 05 15:00:43 to my experience, macs only ever work if you do what they meant you to do, in any other case it needs fiddling just like with any other system Jun 05 15:00:43 I have a mac, I just use it for skype Jun 05 15:00:49 pfn: lol Jun 05 15:00:50 rMBP Jun 05 15:00:57 sits on my desk for skype and that's about it Jun 05 15:00:59 waste of tech Jun 05 15:00:59 pfn, thas a pretty expensive telephone you have there :D Jun 05 15:01:10 lol dani Jun 05 15:01:12 use it as a second screen when I'm coding and want to watch videos or something sometimes Jun 05 15:01:26 danijoo, employer-provided, so it just sits there Jun 05 15:01:29 the best definition of a "dummyphone" I've ever seen, pfn :D Jun 05 15:01:30 You can always make your hackintosh if you want to, hardware has nothing to do with an OS. Jun 05 15:01:46 danijoo: [SOLVED] GREAT !!!!! it works but still wondering why i did'nt got need to notifyDataSetChanged(); it worked without this why and how ? Jun 05 15:01:57 I prefer my workstation in any case Jun 05 15:02:03 fiddling with macintosh... then i can as well use linux ;) Jun 05 15:02:07 Muchoz: a hackintosh and a mac with macos aren't the same Jun 05 15:02:38 boodllebat, still talking directly to people instead to the channel as a whole? Jun 05 15:02:52 boodllebat, you might run into problems without notifyDatasetChanged Jun 05 15:03:03 danijoo, you'd probably work it out sooner with linux anyway ;) Jun 05 15:03:09 meaning you will get inconsistent behaviour Jun 05 15:03:53 2 hours later and I still can't access my SQLite db. Jun 05 15:04:09 Muchoz, why dont you adb pull it? Jun 05 15:04:13 Muchoz, but I thought on macs everything "just works"! Jun 05 15:04:14 * wakelock gasps Jun 05 15:04:18 not ideal but a solution :0 Jun 05 15:04:32 wakelock, unfortunately it doesn't just work on Android. *gasps* Jun 05 15:04:45 uh-huh Jun 05 15:04:52 blame it on everything else, why don't you :p Jun 05 15:05:46 This isn't a problem with Mac, it's a problem with Android, its root permissions and just IntellIJ Ultimate. So please go somewhere else with your hate. Jun 05 15:05:50 I could care less. Jun 05 15:06:05 Muchoz, you should root for android dev. really Jun 05 15:06:10 or use a simulator Jun 05 15:06:14 wakelock: oh but i thought i was having conversation with him Jun 05 15:06:15 you definitely could care less Jun 05 15:06:27 boodllebat, you have :) Jun 05 15:06:38 boodllebat, I guess if he's okay with that then okay Jun 05 15:06:40 ravilov is just rude from time to time (always) Jun 05 15:06:48 danijoo, I know. I've just tried IntelliJ Ultimate so called support for Android SQLite even though I don't fucking see it in the Data source list as it mentions in the docs. Jun 05 15:06:53 in general, you always talk to the channel Jun 05 15:07:04 danijoo, it's my (tm) Jun 05 15:07:37 wakelock: yeah i'll make sure for genral problem i'll for channel its a bad habbit that i've got to anoy people who replies fast Jun 05 15:07:41 Muchoz, ultimate cant work arround android permission system. the sqlite feature still needs access to /data which needs root or an emulator/simulator Jun 05 15:07:44 danijoo, I just want to get this IntellIJ data source working so I can have live diting. Jun 05 15:08:01 danijoo, I know, it just doesn't show Android in the list of data sources as it says in the docs.? Jun 05 15:08:11 oh.. hm.. Jun 05 15:08:16 it did for me last time i used it Jun 05 15:08:21 but thats some time ago tbh Jun 05 15:08:24 maybe it *is* because it's not rooted? Jun 05 15:08:27 danijoo, I could send a screenshot, but Imgur is down. Jun 05 15:08:57 shoudlnt have something to do with root because it lets you just browse the system Jun 05 15:09:05 danijoo: why would i go into trouble if i'll not use notifydatasetchanged() cause it is still working fine wihtout using it also i'm unable to use , how should i use it inside onPostExecute so that my app does not crashes should i ask in channel ? Jun 05 15:09:06 wakelock, I quote from Jetbrains' update log: "It works with not-rooted devices too." Jun 05 15:09:06 if shold at least allow you to view sqlite dbs in /sdcard Jun 05 15:09:15 hm, guess not then Jun 05 15:09:20 was just a wild guess anyway Jun 05 15:09:31 boodllebat, you should post the stacktrace of your crash :) Jun 05 15:09:44 ok Jun 05 15:09:45 It just doesn't show Android in the list when it should. Jun 05 15:09:55 danijoo, that it works now does not mean that it will work on other phones/in situations of heavy load Jun 05 15:10:01 can't find the IntelHAXM dmg on Mac.. help pls Jun 05 15:10:05 wow.... did I just highlight myself? ... Jun 05 15:10:27 notifydatasetchanged() is a heavy operation right. If it works fine dont bother Jun 05 15:10:36 danijoo... are you drunk? Jun 05 15:10:45 i wish I am Jun 05 15:10:54 looks like there's no need Jun 05 15:10:59 you're already there :p Jun 05 15:11:29 Its just too hot here. My brain boils :p Jun 05 15:11:38 riiiight Jun 05 15:12:21 danijoo, become a celebrity and get lots of fans Jun 05 15:12:25 that should cool you down :p Jun 05 15:12:35 can't run my test project on an emulator either Jun 05 15:12:53 says its missing a kernel file Jun 05 15:13:14 your emulator seems very sick Jun 05 15:13:24 stfu Jun 05 15:13:29 help if you can't im not here for bullshit Jun 05 15:13:34 31 degrees and the penthouse bonus is too much for me ^^ Jun 05 15:13:39 ignore if it bothers you Jun 05 15:13:51 done Jun 05 15:14:14 now would be a great time to tell him how to fix the emulator :p Jun 05 15:14:29 supay, use genymotion like everybody :) Jun 05 15:14:33 danijoo, are you actually paying to live in an oven? :p Jun 05 15:14:44 danijoo: ah, nice. thank you :) Jun 05 15:14:46 Fucking IntellIJ Jun 05 15:14:49 I give up Jun 05 15:14:53 Muchoz: i agree 100% Jun 05 15:14:54 * wakelock is not using geny, never will, yet I have no kernels missing Jun 05 15:15:02 im on the verge of giving up here as well Jun 05 15:15:03 lol Jun 05 15:15:08 wakelock, only the expenses ;) Jun 05 15:15:13 coming from eclipse? Jun 05 15:15:30 danijoo, do you live with your parents?? Jun 05 15:15:45 120Mb memory allication with 8 elements using default fresco...?! Jun 05 15:15:55 wakelock, yeah. same house, but not same flat Jun 05 15:16:01 wakelock: i live with my parent they are great Jun 05 15:16:04 here at least, living with parents or relatives is the only way I can think of where you don't pay the rent Jun 05 15:16:09 psh, such kids... Jun 05 15:16:25 also, im a poor student ;) Jun 05 15:16:31 no you're not Jun 05 15:16:35 you have apps out there Jun 05 15:16:41 you're rich but you won't admit it! Jun 05 15:16:54 danijoo: hey i'm also student and i'm also poor and i dont have apps Jun 05 15:17:14 * wakelock used to be a poor student but still lived in a rented space Jun 05 15:17:23 wakelock: can android app make people rich ? Jun 05 15:17:26 no point in living with my parents when the university is in another city Jun 05 15:17:35 boodllebat, absolutely Jun 05 15:17:56 Does someone know btw why Android Studio memory reports around 30MB, but in Android's Settings Memory info it says way more? Jun 05 15:18:03 wakelock: but how ? o.O android is soo saturated Jun 05 15:18:13 I never said it's easy Jun 05 15:18:18 wakelock: everything is already there Jun 05 15:18:22 boodllebat, ask the flappy bird guy Jun 05 15:18:29 he made 10.000 $ a day Jun 05 15:18:36 yup Jun 05 15:18:55 also what's with all these unnecessary highlights anyway, boodllebat Jun 05 15:18:56 I have no idea why he ever pulled that: "Couldn't handle it" Jun 05 15:19:31 yeah me neither Jun 05 15:22:15 it's hard to imagine being poured tons of cash onto you, but it can actually be quite stressful Jun 05 15:22:38 im really sorry for him ;) Jun 05 15:22:45 how to parse JSON recieved via smack message ? Jun 05 15:22:46 such envy danijoo :p Jun 05 15:23:28 hey, dont forget im a student living at mommy ;) Jun 05 15:23:36 hello everyone ! i have created an android keyboard .. i want to add keypress effect when i press key.. anyone can help ? Jun 05 15:24:28 how to parse JSON recieved via smack message ? Jun 05 15:24:30 make it into buttons, assign a stateful drawable as a background Jun 05 15:24:32 scorpion01, ^ Jun 05 15:24:38 danijoo: notifyDataSetChanged() suddenly started working after solving row problem but after adding notifyDataSetChanged(); at first the listview appears to be blank but after swipeonRefresh event every data comes to listview here is code again http://paste.ubuntu.com/11590265/ Jun 05 15:25:08 oh.. you have swipe on refresh? sorry I dont know how this thing works Jun 05 15:25:26 danijoo, you swipe and let go, that signals it to refresh Jun 05 15:25:27 :p Jun 05 15:26:44 hey wakelock did u get my point? Jun 05 15:26:57 hey scorpion01, did you get mine? Jun 05 15:27:21 wakelock, nah Jun 05 15:27:35 too bad Jun 05 15:27:38 wakelock: do you know ? can you take a look ? Jun 05 15:27:54 boodllebat, could you please stop with personal inquiries? Jun 05 15:28:04 you have asked THE CHANNEL, not the people Jun 05 15:28:10 wakelock: oh ! sorry Jun 05 15:28:25 so you keep saying, and then doing it again... Jun 05 15:28:47 i forget everytime Jun 05 15:29:14 having trouble getting an answer elsewhere. anyone here familiar with gerrit/repo? Jun 05 15:29:15 cause its not the only channel where i do this bad thing i do this everywhere i know its bad and i'm gonna overcome this habbit Jun 05 15:29:38 hm okay Jun 05 15:29:50 guess you just need to be yelled at a lot then :p Jun 05 15:30:40 I have some changes in a gerrit instance that span multiple repositories and are linked by topic. is there a known good way to checkout changes across repositories by topic? Jun 05 15:31:39 Hello Channel i have this code , code was working exactly fine till my line 355 was commented but moderator here told me that it might cause you trouble later if you do not use notifyDataSetChanged() so i uncommented line 355 now at first my LISTVIEW appreas to be blank and all content loads after performing swipeonRefreash event here is my code http://paste.ubuntu.com/11590265/ Jun 05 15:36:42 Is the official training material on developer.android.com the best way to get up to speed on Android development or are there better sources? Most of the published books are centered on the old Eclipse with ADT IDE and the newer textbooks I can find are published by APress and have some issues in terms of errors. Jun 05 15:37:33 Kephael, it would make most sense that the source of the API/SDK/framework is also the best source for the guides and docs Jun 05 15:38:25 boodllebat, If it's the first time populating the list. Why would you need to call notifydatasetchanged()? Jun 05 15:38:38 Kephael: I am newbie and i thing Android Docs are the best but you can always read for a particaular topics on varous blogs by googling time it'll give your perpective of many author on that topic Jun 05 15:39:03 chrisaardal, because it changed from empty to not empty? :p dunno really, haven't used lists or adapters all that much :) Jun 05 15:39:51 boodllebat, use notifydatasetchanged() only when ur adding items/removing items from the existing populated list Jun 05 15:40:52 chrisaardal: yeah it works well without notifything but moderator here told me that it may cause you trouble later , i also thing that it'll call me trouble later if this is not the first thing to be added to list Jun 05 15:41:05 chrisaardal: think* Jun 05 15:41:23 im reading Chris Banes demo code for Design Library and I dont understand why SnackBar is pushing only fab button ( code is --> https://github.com/chrisbanes/cheesesquare/blob/master/app/src/main/res/layout/include_list_viewpager.xml ) Jun 05 15:41:38 chrisaardal: like suppose i add another event or call which is primary then it'll fail i guess Jun 05 15:41:42 I mean if I add a listview why not push it too ? Jun 05 15:42:25 boodllebat, If ur populating ur adapter with a complete list of object. dont bother notifying Jun 05 15:42:52 if you f.ex want to add some elements later on. Be sure to call notifydatasetchanged() Jun 05 15:43:09 chrisaardal: hmm Jun 05 15:44:24 boodllebat, As I see it, you clearly dont need, nor will u run in to issues without calling it there Jun 05 15:44:56 chrisaardal: i've added another event to make it primary let me check if it works Jun 05 15:45:32 csst0111, Doesnt make sense to push the listview up tho Jun 05 15:46:40 indeed. But cant understand the mechanism behind "pushing" only fab Jun 05 15:47:00 well ok "CoordinatorLayout is a super-powered FrameLayout." - my bad I thought it was a LL Jun 05 15:47:38 AppBar is vertical LL (AppBarLayout is a vertical LinearLayout) Jun 05 15:50:26 csst0111, Ye true. I wanna try out the CoordinatorLayout, but I cant find any usecases Jun 05 15:53:48 chrisaardal, making the actionbar disappear on scroll is a usecase Jun 05 15:55:31 hi Jun 05 15:55:42 the download count of googleplay is global or local ?.. Jun 05 15:57:30 speaking of cosmic rays Jun 05 15:57:31 http://www.reddit.com/r/programming/comments/7yi1m/while_1_if_1_1_printfcosmic_ray_detectedn/ Jun 05 15:58:58 danijoo, getting support for DBFlow is a pain god damnit Jun 05 15:59:26 Muchoz, ORMLite :p Jun 05 15:59:38 monkeyisl, its world wide Jun 05 15:59:57 paulo_, it should be while (1) if (1 != 1) printf("bit flipping or fault injection detected\n"); Jun 05 16:00:11 cosmic ray is.... just thanks the atmosphere Jun 05 16:00:12 danijoo, why would ORMLite's support be any better? Jun 05 16:00:45 danijoo, the docs for DBFlow are basically useless too., Jun 05 16:00:52 adq, cosmic rays are actually an issue in some science fields. they are not imaginary Jun 05 16:01:10 i've never said it's imaginary Jun 05 16:01:43 they are a pain in the ass for Raman spectroscopy for example Jun 05 16:02:03 or nmr Jun 05 16:02:45 because they can trigger CCD cameras Jun 05 16:03:39 danijoo: that's exactly what the crayfis app does Jun 05 16:04:00 it crowd sources phone's image sensors to detect cosmic rays Jun 05 16:04:12 sounds interessting Jun 05 16:04:29 I recently did a Raman experiment and it seemed to be a cosmic ray heavy day :p Jun 05 16:04:49 lots of suddenly appearing signals Jun 05 16:05:09 http://crayfis.ps.uci.edu/about.html Jun 05 16:07:19 (and then you suddenly discovers a covert channel mining bitcoins in your phone) Jun 05 16:07:52 did someone already use CoordinatorLayout with proguard? Jun 05 16:07:55 haha Jun 05 16:08:31 Is there a way to show menu item name inside a toolbar? Jun 05 16:08:43 mflow, just dont set an icon Jun 05 16:08:53 I want both Jun 05 16:09:09 is it against material design ? Jun 05 16:09:35 I intend to implement a horizontal scrolling toolbar with menu items Jun 05 16:09:48 and each menu item has a an icon and a text Jun 05 16:09:55 like the Search & Now app from Google Jun 05 16:11:03 aka the "Google" app Jun 05 16:12:11 mflow, showAsAction="withText" should work Jun 05 16:13:25 and yes thats against guidelines i think. But guidelines no rules :0 Jun 05 16:14:30 guidelines rule! Jun 05 16:14:35 (not really) Jun 05 16:17:45 danijoo, only the icon is shown Jun 05 16:18:16 I have android:title and android:icon defined and app:showAsAction="withText" Jun 05 16:19:08 add always Jun 05 16:19:33 the same, tried that Jun 05 16:20:13 no idea then :/ Jun 05 16:20:39 The design I'm talking about: https://lh6.ggpht.com/PErc8MjFKyxNSqV8LG2Yn2VkOHgJfEGF6DxQ0jZ3Lr8L5B3pivfYaceCKjTBrxpRBA=h900-rw Jun 05 16:21:10 mflow, you could just do a linearlayout and add imageview+textview Jun 05 16:21:34 in the given screenshot, this is a tabLayout i think Jun 05 16:26:59 danijoo, even though there is enough room, the icon and text is only shown in landscape Jun 05 16:27:07 in portrait it doesn't want to Jun 05 16:27:14 I'll try a tablayout then Jun 05 16:27:33 android does not use the whole width for the menu Jun 05 16:27:41 so it might not be enough even if you think it is Jun 05 16:27:44 Whats the screen sizes for As (gradle) Jun 05 16:27:55 On eclipse it had mdpi etc Jun 05 16:28:05 Folders Jun 05 16:28:11 DarkChaoz, the same Jun 05 16:28:17 the folders are just hidden by default Jun 05 16:28:18 Ahh Jun 05 16:28:43 clikc on "android" in the top left of the project view and select "Project" to see everything Jun 05 16:28:47 Want to put same splash screen image in the folders according to soze Jun 05 16:28:50 *size Jun 05 16:28:59 I see Jun 05 16:29:01 Thanks Jun 05 16:35:21 danijoo, seems like it's a known "issue" http://stackoverflow.com/questions/9282122/android-4-0-text-on-the-action-bar-never-shows Jun 05 16:36:04 i think custom view is needed then Jun 05 16:42:46 I have an issue where I use setSelection() to move a ListView to a particular item, but when the underlying Cursor adapter is notified of an update, the ListView forgets its position and returns to the beginning of the List. Is there a way to get a ListView to remember its position across adapter updates? Jun 05 16:45:27 soo.. after reading the issue tracker, Its a pretty easy decision against using CoordinatorView until there is a new revision :D Jun 05 16:47:06 How much ram usage is considered to be "bad"? Jun 05 16:47:14 on a phone? Jun 05 16:47:19 depends on the api level Jun 05 16:47:26 An app Jun 05 16:47:43 it you want to support pre Honeycomb, everything above 32mb is a no-go Jun 05 16:47:53 depends on the API level and the amount that the device has Jun 05 16:47:54 Targeting android 2.2-4.4 Jun 05 16:48:17 then you need to get skimpy with your memory. Either that, or drop the older versions Jun 05 16:48:23 DarkChaoz, then you have to support a lot of low end devices with a max ram of 32 mb Jun 05 16:49:04 Currently i tested the app on my phone and it only uses 11.56mb Jun 05 16:49:16 My phone is android 2.3 Jun 05 16:49:25 thats fin Jun 05 16:49:26 e Jun 05 16:49:53 * DarkChaoz should put dozens of webviews :p Jun 05 16:50:01 if you get ooms in production, you can still optimize later :) Jun 05 16:50:13 Ahh Jun 05 16:50:34 Does using async task reduce ram usage? Jun 05 16:50:40 no Jun 05 16:50:47 not unless it runs in a separate process Jun 05 16:50:53 Ahh Jun 05 16:51:06 threads share ram Jun 05 16:51:22 I see. Jun 05 16:51:50 https://developer.android.com/training/articles/memory.html Jun 05 16:51:53 My app is simplistic.. Consist of few feeds and an in app database to fetch some content Jun 05 16:52:22 Also as a plus.. I want to reduce memory usage if possible Jun 05 16:53:50 AsyncTask has nothing to do with RAM usage, completely orthogonal Jun 05 16:53:53 use the sync adapter framework instead of an async task to keep that up to date would be my advice Jun 05 16:54:42 sync adapter actually runs in a separate process that closes down and releases resources after sync is done Jun 05 16:55:05 much more work to implement though Jun 05 16:55:10 Mhmm Jun 05 16:55:10 and you need extra permissions Jun 05 16:55:23 scary looking permissions :p Jun 05 16:55:23 more work to implement, but works better Jun 05 16:55:29 "this app can read all your accounts!" Jun 05 16:55:36 lol Jun 05 16:56:10 and what it actually means is "we have to create an account we dont actually need because sync adapter implementation sucks" :p Jun 05 16:56:15 DarkChaoz: You need a background thread to do networking stuff. That's all there is to it. Jun 05 16:56:16 there should be a "this app can drain your battery and RAM" Jun 05 16:56:19 AsyncTask is one way to achieve this. Jun 05 16:56:21 permission Jun 05 16:56:23 RAM is a complete non-factor. Jun 05 16:56:34 TacticalJoke, not on 2.x :p Jun 05 16:56:39 True. lol Jun 05 16:56:46 we are talking about 2.x Jun 05 16:56:50 Then it's s/need/want/. Jun 05 16:56:53 yup Jun 05 16:57:19 So is it worth using async task with fetching content from app database? Jun 05 16:57:29 Or is it fine doing it on the main thread Jun 05 16:57:37 DarkChaoz: fetching from the database, yes. Hitting the network I would argue there are better ways Jun 05 16:57:38 its a must-do ;) Jun 05 16:57:43 or it will crash randomly Jun 05 16:57:49 Ahh Jun 05 16:58:01 Then i guess thats my next task lol Jun 05 16:58:04 you cannot access db from UI thread without asking for a crash Jun 05 16:58:10 if it doesnt crash on your device, it will crash on another one Jun 05 16:58:25 and also on yours later :p Jun 05 16:58:36 Doesnt crash on mine Jun 05 16:58:42 accessing db from a UI thread on pretty much any technology, whether Android, iOS, Java, Windows .NET, etc. is a bad idea Jun 05 16:58:45 But still dont want to take that risk Jun 05 16:58:53 DarkChaoz, until the phone does something else in the background Jun 05 16:58:57 then it will Jun 05 16:59:02 lol Jun 05 16:59:39 there is no guarantee that a result from the db will be delivered from the RAM cache. The only reason it appears to work now is that you are hitting a cache line Jun 05 17:01:01 be back later Jun 05 17:01:13 Thanks for the advice guys Jun 05 17:01:14 as alternative, consider a cursorloader Jun 05 17:01:22 if you don't want to do asynctask Jun 05 17:01:48 I'll probably consider any improvements in the second version of the app Jun 05 17:02:08 I would not release a 1.0 version that did filesystem access from UI thread Jun 05 17:02:09 Right now just want to get everything working fine and dandy Jun 05 17:02:17 period Jun 05 17:02:53 Mhmm Jun 05 17:03:05 Especially DB access, which can be particularly slow at arbitrary Jun 05 17:03:07 moments. Jun 05 17:03:15 Yeah i'l stick to async for db for 1.0 Jun 05 17:03:23 very good Jun 05 17:03:30 And in the next versions consider alternatives Jun 05 17:03:32 Largely because of the fsync() thing, Jun 05 17:03:35 .* Jun 05 17:06:33 I'm storing data in SQLite, and I need to access it by day and hour, for example I would show all of todays data broken into a listview by hour. Should I have just a date field in the DB, or a date and hour field in the DB? Jun 05 17:06:52 date field Jun 05 17:07:08 you can then use the timestamp to filter based on what you want Jun 05 17:07:27 so in the future, if you determine you want it based on half hour intervals, you have the data Jun 05 17:08:08 Is it better to load all of today's data at once then filter in Java, or to load each hour individually from the DB? Jun 05 17:08:28 b2zeldafreak, dont load the data in lists Jun 05 17:08:30 use cursors Jun 05 17:08:41 What are cursors? Jun 05 17:09:09 queries Jun 05 17:09:10 b2zeldafreak: its a iterable thing that looks like a list in code but the doesn't actually populate into RAM until a particular row is requested Jun 05 17:09:14 Google android cursors Jun 05 17:09:18 cursors are database iterators Jun 05 17:09:20 google them Jun 05 17:09:36 so it's a temporary-ish list of the database results? Jun 05 17:09:48 I think the topic needs to be changed to google first then ask Jun 05 17:09:51 .-. Jun 05 17:09:58 b2zeldafreak: cursors are the way you can process a db result that is larger than available ram without actually burning up all of your ram doing temporary storage of the result Jun 05 17:10:30 ok, cool thanks. DarkChaoz, I just asked since I was already in conversation here :P otherwise I always google first before I come to IRC Jun 05 17:10:44 Ahh Jun 05 17:11:07 * DarkChaoz tends always get asked to google first Jun 05 17:11:29 That and print stacktrace or gtho Jun 05 17:11:36 >.> Jun 05 17:12:30 Google is the reference resource, IRC is for opinion questions and to avoid doign stupid things :p Jun 05 17:12:49 xD Jun 05 17:14:51 and for that thing that you need that you can’t remember the name of but it’s on the tip of your tongue Jun 05 17:15:03 it’s that thing, that does the thing, right? Jun 05 17:19:23 semi-on topic question Jun 05 17:19:47 battery life refers to the amount of time the device operates on a single charge Jun 05 17:20:05 what about the amount of time before the battery breaks? Jun 05 17:21:14 thats lifetime Jun 05 17:23:52 Heyyyy. Has anyone in here worked with web views and SSL cert pinning? Jun 05 17:23:56 is it even possible pre L? Jun 05 17:32:01 danijoo is this true? "Doze, as they've said in the keynote, will make apps doze in an exponential pattern, so if your app does something when doze checks it, it'll not let it doze." Jun 05 17:32:04 Hey, I'm having a weird problem with Picasso, fragements and viewpagers: Jun 05 17:32:26 have a viewpager which is showing child fragments displaying images Jun 05 17:32:38 when i watched the keynote, it seemed like doze happened when motion detection indicated nothing was going on; but you could respond to things like GCM Jun 05 17:33:05 g00s, no idea.. Jun 05 17:33:16 when I load the images from the web they work okay, but if I rotate the device the images don't load and the fragment doesn't lay out until I swipe away and swipe back to it (newly constructed fragments behave normally) Jun 05 17:33:18 im scared that sync adapters might just dont sync when doze is on.. Jun 05 17:33:21 i hope not.. Jun 05 17:33:31 danijoo whats what mark murphy found Jun 05 17:33:35 I'm using FragmentStatePagerAdapter Jun 05 17:34:20 what do you guys think about toasts vs snackbars? should I dismiss all toasts and use snacks instead?? Jun 05 17:34:45 if I take out the call to load images from the web the fragments lay out Jun 05 17:35:12 danijoo yeah toasts are out Jun 05 17:35:27 Toasts are toast? Jun 05 17:35:30 croutons too Jun 05 17:35:34 im scared about using design lib :p Jun 05 17:35:41 from toast to snackbar via crouton Jun 05 17:35:49 (lexical field is food) Jun 05 17:45:10 The new G+ has no navigation swipe left drawer in it? I see on the swipe right drawer, which is used for notifications. Jun 05 17:45:44 mflow: that's pretty loose usage of the word *new* Jun 05 17:47:01 https://plus.google.com/+RonAmadeo/posts/BZEsJTcyfmk Jun 05 17:47:27 Mavrik have you played with Doze at all ? Jun 05 17:47:51 I'm on a conference and need my devices to work atm, so didn't install M yet :/ Jun 05 17:48:13 Ankhwatcher, haven't used the mobile app for some time now :-) that's why it's "new" for me Jun 05 17:48:26 I am amazed that you cant push a ios app from xcode straight to a device Jun 05 17:49:11 lasserix_, why? it'll hurt the device's feelings? Jun 05 17:50:23 idk i am just working on the android version of an app and the ios guys gave me an iphone to check out the app on the ios side of things, but its an older version and for some reason its too complicated to simply "run" (like in as) with the device connected Jun 05 17:50:44 g00s: I was quite impressed by it: https://plus.google.com/+RoryGlynn/posts/A86tV3j4D9D Jun 05 17:51:15 what that post doesn't say is that the phone then synced every notification from the past two days, ran out of battery and turned itself off Jun 05 17:52:12 smart dog Jun 05 17:54:28 if you dont get any notification, doze is nothing for me.. Jun 05 17:55:47 g00s: looks like you can hassle the Haase and get answers to your question tonight: https://plus.google.com/+ChetHaase/posts/NvS1WyZtR7j Jun 05 17:56:05 ah. i'm not on google+ Jun 05 17:56:26 Is the dashboard pattern replaced by navigation drawer? Haven't seen any apps lately using the dashboard Jun 05 17:56:50 lol dashboard was 3 years ago Jun 05 17:57:13 ^^ Jun 05 17:57:23 yeah, since then I haven't touched Android UI Jun 05 17:57:27 it looks like :-) Jun 05 17:57:49 yeah, google just released a design support library which has stuff to make it easier to make those fancy-picture slide-out user-managing side menus Jun 05 17:58:05 besides keynote anyone got specific vid recomendations to watch from 2015 io? Jun 05 17:58:11 so, it looks like the menu drawer isn't going away for a hwile Jun 05 17:58:30 menu drawer is only good controls Jun 05 17:58:34 lasserix_, https://www.youtube.com/playlist?list=PLOU2XLYxmsIJDPXCTt5TLDu67271PruEk ? Jun 05 17:58:47 or at least, should not be used for primary navigation content Jun 05 17:58:54 lasserix_, "whats new in android development tools" Jun 05 17:59:05 lasserix_: what's new in Android, What's New In Android Developer Tools, Android Design Support Library, ATAP Jun 05 17:59:28 whats ne in * Jun 05 17:59:41 what's new in things that are new Jun 05 17:59:41 new -_- Jun 05 17:59:46 what's new in things that are old Jun 05 18:00:48 is the Android gradle plugin open source? Jun 05 18:01:37 whats best chanell to check for updates for as? Jun 05 18:01:59 I really want to use the library used in this app: https://github.com/lukehutch/android-multitouch-controller/tree/master/MTPhotoSortr. Its pretty much exactly what I need. but the dragging is so choppy Jun 05 18:02:13 does anyone know why dragging the photos is so choppy and is it possible to fix? Jun 05 18:02:38 lasserix_ they didn't really do many videos / sessions this year Jun 05 18:03:43 in_deep_thought: while running it and dragging, does logcat show a lot of GC? Jun 05 18:05:06 I like that altconf will be showing videos from google i/o this year Jun 05 18:05:09 http://altconf.pr.co/103476-altconf-streaming-of-wwdc-content-cancelled Jun 05 18:05:19 in_deep_thought: its based on view Jun 05 18:05:29 right, I have no idea how to solve this fragment/picasso/viewpager thing Jun 05 18:05:33 time to go home Jun 05 18:06:22 GC? Jun 05 18:06:29 yeah Jun 05 18:06:41 something like D/dalvikvm﹕ GC_FOR_ALLOC freed 777K, 15% free 6788K/7932K, paused 6ms, total 6ms Jun 05 18:06:43 and by view, you mean that any draggable view will be this choopy? Jun 05 18:06:52 idk id have to check later Jun 05 18:07:12 is that GC something thats fixable? Jun 05 18:07:21 in_deep_thought: is it choppy on the demo or in your implementation? Jun 05 18:07:22 probably Jun 05 18:07:27 the demo Jun 05 18:07:42 well they do everything on the UI thread Jun 05 18:08:14 idk Ive seen even simpler tutorials - like this: http://www.codeproject.com/Articles/319401/Simple-Gestures-on-Android that also do everything on the ui thread, and this one is really smooth Jun 05 18:08:55 the gc thinh -- and this is pure conjecture -- is if they implementated in such a way that it creates a lot of garbage while dragging, then the gc will cause the system to pause and hence it'll be chopy Jun 05 18:09:44 yeah then it could be a garbage problem Jun 05 18:10:21 rats, ok ill check for gc Jun 05 18:10:26 and if I see it, ask the developer Jun 05 18:11:01 what devixe are testing on? Jun 05 18:11:06 *device Jun 05 18:11:08 nexus 5 Jun 05 18:11:13 not emulator Jun 05 18:11:21 nope Jun 05 18:12:14 well Jun 05 18:12:19 one thing you can try is add Jun 05 18:12:37 Thread.currentThread.sleep(16) in onTouchEvent in the controller Jun 05 18:12:46 hi Jun 05 18:13:04 that pauses the UI Thread? Jun 05 18:13:35 umm Jun 05 18:13:39 for 16 ms Jun 05 18:13:45 its a trick they use in games Jun 05 18:13:51 since move can fire wayy too much Jun 05 18:13:58 err Jun 05 18:13:59 here Jun 05 18:14:16 bettrer is to do so if (now > lastUpdate + 16) Jun 05 18:14:22 then do process, else retuern Jun 05 18:14:33 so it won't sleep just won't do unecessary processing Jun 05 18:14:35 you mean put that inside onTouchEvent? Jun 05 18:14:39 yeah Jun 05 18:14:46 very first thing Jun 05 18:15:08 now = most recent touch, lastUpdate= previous touch? Jun 05 18:15:26 lasserix_, is that really a better way? won't it just end up doing a bunch of useless comparisons for those 16ms rather than giving up those 16ms to other threads? Jun 05 18:15:29 hey, anyone care to take a look at my code ? I'm trying to program a simplistic VUMeter in Android Jun 05 18:15:53 here's my code: http://paste.pound-python.org/show/ctxJQaZIADDIqzNIvnYB/ <-- I'm calling setValue from somewhere else, but nothing shows up in my app Jun 05 18:16:24 i need help reading an NFC Mifare classi tag... I've tried all of the examples... anyone here with some past expereince... perhaps some working code? Jun 05 18:16:58 The Design Library is amazing! Jun 05 18:18:17 in_deep_thought: http://pastebin.com/VBfBkHs9 Jun 05 18:18:54 processTouchEvent(me) is everything in the onTouchEvent class Jun 05 18:19:50 basically if a MOVE motion event fires every 2 ms Jun 05 18:20:08 there's no point in invalidation Jun 05 18:20:37 to do it everytime because you only need to target an invalidation every ~16 ms Jun 05 18:20:45 interesting. so timestamp and now get set based on the os time alone, nothing to do with a touch event success callback or anything fancy Jun 05 18:20:55 thanks ill try that Jun 05 18:21:08 would that help with gc? or is it just a general trick? Jun 05 18:21:26 the idea is that if the processing in ontouchevent is causing garbage Jun 05 18:21:46 so this is cutting down on that Jun 05 18:21:46 now by slowing the rate of execution Jun 05 18:21:56 you should get less garbage and less stutter Jun 05 18:22:10 kk Jun 05 18:22:34 *in reality you should really investigatye what is causing garbage, if there is any, and excise it independently Jun 05 18:23:01 so if im not getting those gc errors, then this probably won’t help? Jun 05 18:23:23 TacticalJoke: Hey man, I remember one day I saw that you mentioned you rarely use fragments anymore. Care to explain on that? I'm finding them alright to work with. I don't see what the big deal is why people hate them. Jun 05 18:23:28 quelqun_dautre, level is always 0 Jun 05 18:23:42 you can still use this trick, because again you don't need to update at 500hz Jun 05 18:23:45 you need to cast value to a float before you divide it Jun 05 18:23:48 in_deep_thought: no Jun 05 18:23:54 it can still help Jun 05 18:23:59 quelqun_dautre, http://ideone.com/L86REt Jun 05 18:24:02 because again, refresh rate is 60hz Jun 05 18:24:21 you might want update @ 120 hz Jun 05 18:24:27 but you definatly don' Jun 05 18:24:32 eghdk: I read this recently: https://corner.squareup.com/2014/10/advocating-against-android-fragments.html Jun 05 18:24:35 t need 200, 300, 500 hz Jun 05 18:25:04 lasserix_: the touch updates that frequently by default? Jun 05 18:25:05 eghdk: theirlifecycle is a pita and a custom viewgroup is much more flexible Jun 05 18:25:17 eghdk: I find there is a lot of code to make them perform naturally on the device. Rotations, back button management Jun 05 18:25:28 betacrash: I'm an idiot. Thank you very much. Jun 05 18:25:31 in_deep_thought: i dont remember exactly but i think it is definatly faster than 60hz Jun 05 18:25:31 in_deep_thought: Yeah. I read that as well when it was posted on reddit, but A lot of people were like... just cuz square and JakeWharton do it, doesn't mean that you have to ditch fragments. Jun 05 18:25:52 shhh JakeWharton might hear you Jun 05 18:25:56 quinnjn: and lasserix_ so custom view groups... huh? Jun 05 18:25:58 But cargo culting is so awesome! :P Jun 05 18:26:00 * JakeWharton stirs Jun 05 18:26:26 eghdk: they are more flexible, dynamic, simpler life cycle etc etc Jun 05 18:27:02 I also saw that they had a session on app architecture at io and the guy there was basically like... fragments and viewgroups are two different things, so you should treat them as such. Jun 05 18:27:05 eghdk: Yeah custom view groups are great imo. You should use DialogFragments for input dialogs. Jun 05 18:27:35 So lasserix_ now I'm just thinking... well maybe view groups is what I should be using, and I was just going to fragments all the time, which is/was incorrect. Jun 05 18:27:50 i would share /mnt/internal_sd over USB (like usb mass storage), how could i do ? i would write files from android device on /mnt/internal_sd, and read them from pc connected in usb Jun 05 18:28:10 eghdk: Well, a fragment would load a view. So you'd be making the custom view anyways Jun 05 18:28:12 ANd I'm sure fragments have been talked about on here like a thousand times, I just don't find anything terrible with them yet. Jun 05 18:28:40 Let's say I want to do tabs, I would still need separate fragments for each tab, if I wanted to swipe between them no lasserix_ and quinnjn ? Jun 05 18:28:44 eghdk: have you tried rotating your device and continue playing with your app? Jun 05 18:31:00 no Jun 05 18:31:03 so many retards on /r/Android Jun 05 18:31:40 dialogfragments are only reason to use fragments Jun 05 18:32:01 i use fragments. i like them. so bah ! Jun 05 18:32:21 eghdk tabs + viewpager + jake wharton's salvage (you get convertview) + custom views Jun 05 18:32:30 better performance, easier to manage Jun 05 18:32:59 lasserix_: Wait whats salvage? Jun 05 18:33:25 quinnjn: Yes, but I try my best to handle config changes, so I don't have any issues. Jun 05 18:33:34 view pager adapter with recycling Jun 05 18:33:48 lasserix_: thats a lib that I haven't heard about... I'm guessing? Jun 05 18:34:16 eghdk: well then you're good :) Jun 05 18:34:35 egh how would i know if you have heard of it Jun 05 18:35:05 quinnjn: Haha. I just follow the rules on handling config changes on the docs though. I don't know. I guess it adds some overhead and boilerplate... but it's not that bad? Jun 05 18:35:34 should have been: thast a lib…. I’m guessing. One that I haven’t heard about apparently. Jun 05 18:35:43 lasserix_: The lib name just didn't sound JakeWhartony enough. Didn't know if you were refering to a lib name. haha. Thanks though.. Jun 05 18:36:07 eghdk: I'm glad. Lots of people say that they've solved their config change issues by locking their app to portrait, then I cry for them. Jun 05 18:36:22 eghdk: Salvage Jun 05 18:36:25 by Jake Wharton Jun 05 18:36:45 Coming to a theater near you. Jun 05 18:36:56 so quinnjn lasserix_ and g00s since all of you have thoughts on fragments vs viewgroups... I have two more questions to ask. 1. Why would google make fragments if viewgroups were already a thing? 2. Do fragments at all provide anything better than viewgroups? Jun 05 18:36:57 is there an IMAX version ? Jun 05 18:37:24 eghdk: because viewgroups are views, not necessarily controllers Jun 05 18:37:29 and activities are controllers Jun 05 18:37:46 so fragments were introduced as modular activities subsets Jun 05 18:38:28 eghdk it wasn't terribly well thought out in any case ... its a preference, like vim vs emacs Jun 05 18:38:32 I'd consider fragments if I wanted a back stack. Otherwise, I'd consider Views. Jun 05 18:38:58 eghdk: I think to encourage easily loading multiple views into a bigger screen I believe. Only benefit of a fragment over a view imo is it persists after a config change. Pretty easily done for a view though. Jun 05 18:39:13 quinnjn: How about the fragment back stack? Jun 05 18:39:16 That's their main advantage, IMO. Jun 05 18:39:30 Along with the whole fragment-manager-being-persisted thing. Jun 05 18:40:01 TacticalJoke: if it was done correctly and let me have a back callback to my fragment before dismissing it :) Jun 05 18:40:10 yeah, but when you use fragments, you try to decouple them from activities (so you can put one fragment in many diff activities), so you implement the control in activities anyway... right lasserix_ ? At least thats what big nerd ranch taught me with implementing callbacks. Jun 05 18:40:33 TacticalJoke: because fragment manager persists on config change right? Jun 05 18:41:22 eghdk: it all depends on scope Jun 05 18:41:30 Yeah. Jun 05 18:41:31 so fragments don't really end up doing much when they are controllers, because it should end up being passed to an activity anyway... is that a correct thought lasserix_ ? Jun 05 18:41:47 wakelock . you around at the moment? Jun 05 18:41:51 why would you delegate some controller behavior exclusive to a fragment to its host activiy? Jun 05 18:41:57 no Jun 05 18:42:00 why would you delegate some controller behavior exclusive to a fragment to its host activiy? Jun 05 18:42:57 I am doing NFC on a Samsung G5 phone. I have confirmed that it can see NFC scan events becuase of some other NFC applciations. BUt I cannot get my app to see the events. I have tried a lot of sample code, both forground and back ground... BUt I am thinking that there is something else... any thoughts out there? Jun 05 18:43:21 Sometimes with NotificationListenerService there are times that Application.onCreate is not being called. Is it normal? Jun 05 18:43:40 I don't know. Thats what I got out of BNR book. seemed to make sense. You want a fragment to be flexible, so you should have the activity handle certain events, like list item clicks and such. At least... that's what I got out of it. Jun 05 18:43:47 Gryd3-Shop, no, I'm asquare, but say anyway Jun 05 18:44:09 yoavst: yea... I was thinking that... so I moved some code to onStart... Jun 05 18:44:24 IrishGringo: Application's onStart? Jun 05 18:44:28 or service? Jun 05 18:44:34 on Start Jun 05 18:44:43 but should I try another event? Jun 05 18:44:50 hehe. Bit of a random question, but I'm hoping you may know. I'm wanting to write a script to edit a database file on my phone. Specifically the public database for the mediastore Jun 05 18:45:06 Was hoping you could help get me started Jun 05 18:45:06 pfn, please fix qicr. it doesn't show sent messages Jun 05 18:45:10 eghdk: I allow the activity/fragment to accept touch events and then pass results to the presenter Jun 05 18:45:13 kroot are you familiar with M Preview Doze mode any chance ? Jun 05 18:45:24 Gryd3-Shop, shell script or sql script or? also, are you rooted? Jun 05 18:45:44 Shell or sql, I have not yet installed busybox and I am rooted Jun 05 18:45:45 IrishGringo: I'm using app as singleton. So I saved here Realm Object, but when I call it it says Attempt to invoke virtual method 'java.io.File android.content.Context.getFilesDir()' on a null object reference Jun 05 18:46:16 eghdk: that sounds like you are over complicating your code by not following proper encapsulation Jun 05 18:46:18 so it doesn't save the context Jun 05 18:46:22 it all comes down to scope Jun 05 18:46:52 I understand scope, but I don't understand it in the context that you're saying it lasserix_ Jun 05 18:47:06 could you just elaborate just a little further? Jun 05 18:47:08 did you ever see ghost busters? Jun 05 18:47:10 wakelock . the part I'm stumped at is the easy first step... I can't find how to read the stupid thing... I know it's there and can export it to csv with Titanium backup Jun 05 18:47:18 what was the thing you WEREN'T supposed to do Jun 05 18:47:22 NEVER cross the streams. Jun 05 18:47:26 same idea with scope Jun 05 18:47:46 if something can stay local to a scope, why are you mixing it with some other scope? Jun 05 18:48:15 you are just making you code over complicated and there is some techinical word i am forgetting but essentially tangled up Jun 05 18:49:11 wow Jun 05 18:49:17 this is techincal like anyrthing http://www.masonchang.com/blog/2014/8/11/smooth-scrolling-frame-uniformity-touch-interpolation-and-touch-responsiveness Jun 05 18:49:39 Gryd3-Shop, not quite sure what you mean by "public database", but here's something... http://pastebin.com/iqvcN1Xm Jun 05 18:49:45 g00s do you have those two links you sent me last night about the rx java and modelview /presenter Jun 05 18:49:59 one was a github link and the other an article with a (grey?) background Jun 05 18:50:08 sorry i forgot to send them tomyself and im at out Jun 05 18:50:27 wakelock . it's a start, it will get me going. Thank you Jun 05 18:50:48 that assumes you have sqlite3 installed on your phone. no prob, good luck Jun 05 18:51:15 * wakelock goes back to being atriangle Jun 05 18:51:26 lasserix_ link is in here http://www.slideshare.net/TimoTuominen1/rxjava-architectures-on-android-8-android-livecode-32531688 Jun 05 18:51:37 uhh Jun 05 18:51:39 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference Jun 05 18:51:40 not that one Jun 05 18:51:47 https://github.com/tehmou/rx-android-architecture Jun 05 18:51:48 But oncreate was called this time Jun 05 18:51:54 rx rocks. I'm migrating to it. Jun 05 18:51:58 yeah that one and then you linked something else Jun 05 18:51:58 thats the presentation for the repo Jun 05 18:52:05 thanks g00s lasserix_ and quinnjn . Maybe an overtalked topic (fragments), but it was really helpful to get your insights. Appreciate your time. Jun 05 18:52:07 something about presenters or model view and rx java Jun 05 18:52:11 http://stablekernel.com/blog/mvvm-on-android-using-the-data-binding-library/ Jun 05 18:52:18 yeah thats it! Jun 05 18:52:18 thanks Jun 05 18:52:28 eghdk: at the end of the day its what you are comfortable with Jun 05 18:52:39 hm.. gradle plugin 1.2.3 gives me DSL method not found: targetSdkVersion() Jun 05 18:53:36 if fragments work for you, and they aren't causing you headaches, use them. i just recomend once you have a working fragment, complete; try and make a viewgroup that does the same exact functionality/stuff and see how they compare Jun 05 18:54:57 nvm. just me eing stupid Jun 05 18:56:42 * wakelock sets danijoo's targetSdk to 10 Jun 05 18:57:56 randomly hit my keyboard Jun 05 18:58:04 targetSDK was something like 22klwewqe Jun 05 18:58:22 why didn't anyone tell me about glass screen protectors sooner. these things are a gamechanger Jun 05 19:00:59 anyone know if there is a way to disable compression in SnappyDb Jun 05 19:01:18 hey g00s, is rxjava a "flavor of the month" library? Jun 05 19:01:34 probably more flavor of the year Jun 05 19:01:45 for the next few years :) Jun 05 19:01:52 ic ic Jun 05 19:02:14 worth learning? Jun 05 19:02:23 definitely Jun 05 19:03:29 alright. i just read an article on it. so much chineseness is why Jun 05 19:04:21 i'm asking Jun 05 19:06:45 Does anyone have a recommendation for a type of view to use with a scrollable chat ? Jun 05 19:06:55 ListView, RecyclerView? Jun 05 19:07:24 Yep Jun 05 19:08:08 can anyone here recommend a free 3D mapping software similar to nutiteq? i want to create 3D objects and play around with them on my maps Jun 05 19:13:41 oh fu--kc Jun 05 19:13:51 is adding fb sdk a pita? Jun 05 19:14:22 probably 50k methods :) Jun 05 19:15:45 so it appears whitelisting app from battery optimizations still puts the device in Doze mode (has no effect) Jun 05 19:17:19 ugh, the resource shrinker is cool, but I do not want to port that over Jun 05 19:18:15 especially since the common code all sits in gradle-core Jun 05 19:19:10 lol, i fyou say targetSdk = MNC you have to say minSdk=MNC and compileSdkVersion=MNC also Jun 05 19:19:45 Just like with the L preview Jun 05 19:20:11 g00s, that's right, because you must be targeting only MNC, anything that targets MNC must not leak out to the wild Jun 05 19:23:37 man i was hoping onTrimMemory would have a new constant for 'about to doze' ... how am I supposed to cleanly disconnect my BT connections ? Jun 05 19:24:53 g00s, yeah you can't prevent doze from hitting your app it looks like Jun 05 19:24:56 from what i've read Jun 05 19:25:10 g00s, i assume you can't, you just detect they break on resume. for now. Jun 05 19:25:41 dragorn what i've seen on a few devices is that if the connection is properly torn down, i can't reconnect unless i reboot the device or reset the BT adapter Jun 05 19:26:13 g00s, that'll suck Jun 05 19:26:17 i'm a bit worried about all of this. The 'exclude from battery optimizations' seems only for App Standby Jun 05 19:26:44 if that worked, i could just put in the app Description that you need to disable that - i'm sure many would mess that up :( Jun 05 19:26:45 probably not worth worrying until it's closer to release Jun 05 19:26:48 and see what they change Jun 05 19:26:55 yeah ... Jun 05 19:26:57 https://repo1.maven.org/maven2/com/android/tools/build/gradle-core/1.2.3/gradle-core-1.2.3.pom Jun 05 19:26:59 so, I'm looking at this Jun 05 19:27:06 g00s, BT not waking device up from Doze seems like an actual bug Jun 05 19:27:12 g00s, so reporting that should be a priority :) Jun 05 19:27:17 that looks like current android build system (gradle) uses proguard 5.1 Jun 05 19:27:27 who was saying that sdk was forcing proguard 4.x usage? Jun 05 19:27:35 Mavrik i would already have established connections. Jun 05 19:27:35 that would appear to me that gradle builds are on proguard 5.1 Jun 05 19:27:54 pfn yeah somebody the other day Jun 05 19:28:25 i notice proguard 5.1 get downloaded when i get a new gradle plugin somehow Jun 05 19:29:57 I guess I'll just pull in gradle-core as a dependency Jun 05 19:31:35 i wish java would add nested package access Jun 05 19:31:36 I love a tiny changeset that fixes a bug, increases code clarity, and improves performance. Win all around. Jun 05 19:32:10 hmm, am I right that Android TV has no notification service per se? Jun 05 19:37:59 can anyone here recommend a free 3D mapping software similar to nutiteq? i want to create 3D objects and play around with them on my maps Jun 05 19:39:33 bobbiejim . Not off the top of my head, but you should look into things like 'surface from motion' Jun 05 19:40:53 Gryd3-Shop: is there software thatll allow me to render a 3D image from 2D images as well as put them in my android maps? Jun 05 19:44:06 android map part... unsure. From a series of 2D images. yes... Look at Structure* From Motion for that Jun 05 19:44:39 Can i turn the body of a retrofit error into a jsonobject? Jun 05 19:44:55 you probably could, but no one should be using org.json APIs Jun 05 19:44:56 every Jun 05 19:45:00 ever Jun 05 19:45:43 JakeWharton: so basically if I get a retrofit error, and there is some body response (like metadata: cause: invalid resource id) or something Jun 05 19:46:02 you can use Gson's DOM objects Jun 05 19:46:05 I need to pass just the raw string, Jun 05 19:46:15 (of the body) Jun 05 19:46:33 so instead of instantiating it as a like RestfulErrorResponse.class Jun 05 19:46:42 I was thinking can i just do JsonObject.class Jun 05 19:47:04 Gryd3-Shop: what if i just wanted to take a 3D model made in say, sketchup (COLLADA/.dae file) and import it into a mapping software. Is there anything that supports 3D objects that is free? Jun 05 19:47:08 that will work fine Jun 05 19:47:16 assuming you use Gson's DOM object for it and not org.json's Jun 05 19:47:33 JakeWharton: can you specify that import or show me a link Jun 05 19:47:39 sorry i can't find it on google Jun 05 19:48:24 you mean com.google.gson.JsonObject? Jun 05 19:53:41 sorry your use of the word DOM is throwing me off, I guess that's what you mewan Jun 05 19:53:49 thanks Jun 05 19:54:13 Where should I open my SQLite database in an activity that has 2 fragments that will also be using the database? Jun 05 19:55:06 bobbiejim . I'm lacking in the mapping software sense, and am unsure why you would want to stick a 3D model inside mapping software.. Jun 05 19:55:37 JakeWharton what's your reasoning for recommending against the org.json APIs? memory? Jun 05 19:55:48 the APIs are terrible Jun 05 19:55:52 custom buildings, putting an overlay over the building so that the user can see the floorplans or whatever they want, etc. i have my reasons :P Jun 05 19:56:09 lasserix_: yep, that's it. sorry. Jun 05 19:56:27 JakeWharton: np thanks very much Jun 05 19:56:36 Gson has two APIs: a DOM (JsonObject and friends) and a stream (JsonReader / JsonWriter) Jun 05 19:57:10 does the Gson DOM use reflection? Jun 05 19:57:35 no Jun 05 19:57:39 API-wise, Gson is not that much better IMO: having to do the two step o.get(“foo”).getAsString() for most types is annoying Jun 05 19:57:56 it doesn't have checked exceptions for stupid things Jun 05 19:57:59 bobbiejim . Makes perfect sense, although I'm wondering why you don't go the otherway around and snap a picture of the map and then put your building in there. I'm not aware of being able to do anything with existing mapping software other than routes, waypoints, and 2-dimenional areas.. Jun 05 19:58:13 Gson also has data binding which I guess you can consider a third API Jun 05 19:58:19 that's the reflection-based one Jun 05 19:58:39 streaming JSON data (using any streaming-capable library) obviously yields better performance, but requires much more boilerplate/structural type of code Jun 05 19:58:45 Gryd3-Shop: you mean take a piece of the map (like lets say a 100 meter radius) and import the 3D building on top of it? Jun 05 19:58:55 org.json APIs might not be perfect, but they are fast and easy Jun 05 19:59:19 (and included in the sdk) Jun 05 19:59:30 they should never have been included Jun 05 19:59:40 More like, take a 100meter radius, and import it into the 3D application and build the building on top of it. (Using the map as the ground plane) Jun 05 19:59:43 not sure they're exactly fast and easy either Jun 05 19:59:51 Hi. Someone knows how to setup the last version of GCM on Eclipse ? On the android site the instructions are to android studio. Any help ? Jun 05 20:00:01 I meant fast to get moving with them Jun 05 20:00:06 not fast performance-wise Jun 05 20:00:14 subjective statement, though sure Jun 05 20:00:16 danilolr: should be the same Jun 05 20:00:17 hmm. ill think about doing it that way. i dont see why youd need more than a 100m radius anyways Jun 05 20:00:50 Aren't they all fast to get going with? Using Jackson or Gson is just a Gradle one-liner followed by probably the same (or less) effort. Jun 05 20:01:09 Gryd3-Shop: any idea if a user would be able to simply import their own model and give lat/long coordinates and still be able to view floor plans and such if using this method? Jun 05 20:01:31 Gson can have more work in setting up the models. As far as I know, you can’t return a simple hashtable with Gson Jun 05 20:01:48 not really, IMHO, because with stream parsers you have to parse the entire stream to get what you need, even if you only need one JSON value at the "end" of the stream Jun 05 20:02:09 and that means writing a bunch of parsing code, which can have bugs Jun 05 20:02:50 argentum: Gson is just as "fast to get moving with" as json.org's library is. Jun 05 20:02:57 I don't see any advantage whatsoever to json.org. Jun 05 20:03:10 Just a bunch of drawbacks. Jun 05 20:03:12 yeah, I wouldn't argue against Gson Jun 05 20:03:17 i wish i knew when protobuf3 was going to be ready Jun 05 20:03:25 just saying org.json API is sufficient for most Jun 05 20:03:27 I use Jackson streaming for extremely low overhead, on a side note. Jun 05 20:03:37 bobbiejim . The final product would be a conventional 3D model with a groundplane that is the image of the map area you exported. (possibly with a height map) so the user could still completely explore your model in a 3D application, (but not in mapping software) Jun 05 20:03:57 s73v3r : but the problem is how to get the library jars. They made use of a gradle to manage dependencies. On the previous GCM versions I was able to just copy gcm.jar to my dependencies. Jun 05 20:04:01 Where should I open my database in an activity that uses fragments? Jun 05 20:04:17 dragorn by any chance, do you know if ext4 on android can reorder writes ? Jun 05 20:04:24 danilolr: so continue doing that Jun 05 20:04:31 g00s, no idea, sorry, never looked into it Jun 05 20:04:37 thx Jun 05 20:05:33 It seems Google is putting the foot down about Eclipse support Jun 05 20:05:40 g00s, i'm not sure it would help much on a flash-based media anyhow Jun 05 20:06:28 [info] Unused resources: 395 Jun 05 20:06:28 [info] Binary resource data reduced from 1.32MB to 1.03MB Jun 05 20:06:28 [info] Removed 21% Jun 05 20:06:29 :) Jun 05 20:06:31 that was easy Jun 05 20:06:31 Gryd3-Shop: interesting. welp, looks like ive gotta look into that and 3D modeling software. im assuming maybe OpenGL would be easiest. Jun 05 20:06:36 s73v3r : but from where I copy the gcm.jar of the last version ? I can get a gcm.jar from previous version but so I am not getting the goodies of GCM 3. Jun 05 20:06:55 that I couldn’t tell you. Jun 05 20:07:04 If I want to push my ADK out to testers... what is the latest way of doing it? Jun 05 20:07:09 is there a particular reason why you haven’t moved to AS? Jun 05 20:08:06 IrishGringo: ADK? And "latest"? Jun 05 20:08:16 The latest way might be to do it right before sleep. Jun 05 20:08:42 bobbiejim . http://flightriot.com/visualsfm-cmvs-post-processing-tutorial/ and https://www.blender.org/ would be good places to play Jun 05 20:08:51 im an iPHONE developer... APK... how about some slack? Jun 05 20:09:06 i have an sqlite with 2 tables i insert a row in table 1 and want to use the id of that row as a foreign key for a row in table 2 how do i get the id after insert in table1 to user for insert in table 2 http://pastebin.com/7yNrFyLH Jun 05 20:09:07 For an Apple dev? Never. Jun 05 20:09:09 no slack Jun 05 20:09:13 you no deserve Jun 05 20:09:31 also this bobbiejim : http://www.123dapp.com/Search/SFM/content/all Jun 05 20:11:13 hert, uhm, insert database statement actually returns the row id of inserted row. Jun 05 20:11:24 Gryd3-Shop: thanks, gonna look into this all. SFM seems like pretty complex stuff haha Jun 05 20:11:40 hey, don’t be too hasty. Slack is awesome Jun 05 20:11:52 IrishGringo, anyway, what kind of testers? People you know, remote, share link? Is the app already on play store? Jun 05 20:12:05 people I know... Jun 05 20:12:21 IrishGringo, HockeyApp or Crashlytics beta are good enough Jun 05 20:12:28 Maverick does it return it in a value somewhere how do i get access to it? Jun 05 20:12:39 s73v3r, bah, new 2.0 redesign is crap Jun 05 20:12:43 not for gen consumption... just doing some prototypes sat and sunday, and I would like to do some test apps for people to try out Jun 05 20:13:12 Marvik: Agree. But I can not just change my project to android studio on a hurry because of this. In fact I just try to install it without success. Jun 05 20:13:21 IrishGringo, yep, use HockeyApp, you'll get a link you give to testers (or just add them and the link will be sent out automatically) Jun 05 20:13:27 bobbiejim . Its not too bad to work with. A little processor intensive. SFM will let you generate a 3D object with enough 2D images.. you can create a 3D object form google earth images, or from images taken with drones. Once you have the landscape/area you simply build your objects in there and either render it, or leave it as a model to be explored Jun 05 20:13:43 danilolr, you are way past the point where you should abandon Eclipse Jun 05 20:14:09 wow... this also does iOS... Jun 05 20:14:09 All support for ADT was abandoned, there's no support for library project as they're released now in Eclipse and probably never will be Jun 05 20:14:11 https://github.com/pfn/android-sdk-plugin/commit/9fce670a8bd1a424102043dc6b6a629458c5a1c8 Jun 05 20:14:12 not bad Jun 05 20:14:16 bobbiejim . blender has a built in game engine that you can also use if you want to provide 'walkarounds' in/around the building Jun 05 20:14:16 Mavrik: thanks Jun 05 20:14:38 but that's for another channel ;) I got you started on one track. look into it and I hope it works Jun 05 20:15:08 danilolr: Why not? It’s not like it’s a difficult change. Especially given that eclipse has gone away Jun 05 20:15:08 Gryd3-Shop: think theres any way to put this all into an android app? like, take the pictures of a building on the ground, render the 3D image, then import into the 3D space over the "map" used as the ground tile Jun 05 20:15:25 Marvik: I do not think so. It is working. My team is trainned on it. I am making money from it. Jun 05 20:15:35 Dude use nick autocomplete. Jun 05 20:15:48 danilolr, then keep using eclipse until you must migrate Jun 05 20:16:01 * pfn has always used an ide agnostic solution Jun 05 20:16:07 eclipse, intellij, android studio, all irrelevant to me Jun 05 20:16:11 bobbiejim . I'm sure that once you have a 3D object built you can stick it in android. You will have to ask other developers in here what the ideal method would be... Jun 05 20:16:25 although, gradle is somewhat ide agnostic now Jun 05 20:16:28 danilolr: It’s not like there’s much training involved. If they could pick up eclipse, they can pick up IntelliJ. You can even set up the keybindings to be eclipse keybindings Jun 05 20:16:44 don’t do that, learn the new IDE Jun 05 20:16:47 pfn, yeah, using a proper build system is the important part Jun 05 20:16:59 many game engines can build apps directly for Apple and Android OS... they support importing 3D objects and would let the user walk around the building like they were playing a video game... Im sure there are more tricks Jun 05 20:17:01 Mavrik, yep Jun 05 20:17:05 Mavrik, build system es numero uno Jun 05 20:17:06 Gryd3-Shop: cool cool, thanks for the help. time to research ^.^ Jun 05 20:17:09 pfn, but then again... explaining to people what build system is when "Eclipse" is all they know... I gave up :) Jun 05 20:17:15 pnf: yes this is what I want. But I need time and planning to migrate. And now I need to use GCM. Jun 05 20:17:18 Mavrik, building from IDE = fail Jun 05 20:17:33 Wonder if Eclipse will get usable Gradle support in the future Jun 05 20:17:36 use the old version of GCM then Jun 05 20:17:39 Would solve the current problem. Jun 05 20:18:11 I remember hearing that there was a group that tried forking the ADT plugin to keep it up to date Jun 05 20:18:19 might want to see whatever happened to that Jun 05 20:18:26 Building from the IDE is fine, you’ll be doing this 90% of the time, but you should be able to build your product from the shell as well and have a continuous delivery build (Jenkis et al) Jun 05 20:18:46 I build my app from the IDE 0% of the time Jun 05 20:18:55 all of my apps Jun 05 20:19:00 s73v3r: yes, Vogella is involved in this Eclipse effort Jun 05 20:19:15 unless they're working on Gradle integration, I want to slap them Jun 05 20:19:21 have they made any progress in getting gradle support? Jun 05 20:19:21 stop kicking a dead horse. Jun 05 20:19:52 Well in the moment I am not able to install android studio because this error : "The following SDK components were not installed: sys-img-x86-addon-google_apis-google-22 and addon-google_apis-google-22" Jun 05 20:20:41 that sounds like a problem with trying to get the emulator running Jun 05 20:20:54 or with the thingy that downloads versions of the SDK Jun 05 20:21:22 s73v3r, yes is on the thing that download the sdk. Jun 05 20:21:50 that doesn’t mean AS didn’t install Jun 05 20:22:35 it is installed. but when I start it just go to the sdk download stuff. And then hangs there. Jun 05 20:23:15 pnf, I am installing gradle stand alone. Do you thing I will be able to build my android project with it ? Jun 05 20:23:42 danilolr: of course you will Jun 05 20:24:03 Does someone know a good alternative to this library: https://github.com/dmytrodanylyk/android-process-button? It doesn't support disabled button states and the style is kind of ugly too. Jun 05 20:24:04 ... Jun 05 20:24:14 Except that you practically should never use the standalone gradle Jun 05 20:24:21 But use the wrapper that pulls a pinned version. Jun 05 20:25:46 g00s: not really Jun 05 20:25:55 kroot ok thanks Jun 05 20:26:02 g00s: Do you have a problem with it? Jun 05 20:27:41 kroot i have an app that maintains connections to bluetooth devices, and normal operation of the app is that is has foreground service + partial wakelock. this allows data xfer from BT to cloud. but reading about Doze, it seems it ignores wakelocks Jun 05 20:27:47 kroot lives Jun 05 20:28:13 g00s: http://www.lispworks.com/products/lw4mr.html#lw4ar :3 Jun 05 20:28:44 LispWorks for Android Runtime is available to LispWorks 7.0 licensees, and is separately licensed under this End User License Agreement. Jun 05 20:28:47 sounds non-free Jun 05 20:28:55 kroot so, i dont see how the app can function propertly if it goes into Doze mode - the connections would be dropped at least. at minimum i would want warning to cleanly disconnect from the devices Jun 05 20:29:40 g00s: I think the foreground service part will keep it out of doze Jun 05 20:30:18 kroot ok, thanks for the heads up - i'm sure over the coming months some things will need to be clarified Jun 05 20:30:20 is android studio preferable? Jun 05 20:30:53 kish: over Eclipse? yes. Android Studio is the only official IDE now. Jun 05 20:31:51 p_l :D Jun 05 20:31:57 okay, great! i've been meaning to import an opensourc project and play around with it Jun 05 20:32:03 anything in mind Jun 05 20:32:40 g00s: for now it's just 32bit arm and essentially gives you the same environment NDK gives, but it's much easier to go far with CL than with C ;) Jun 05 20:33:25 p_l: performance is going to be horrendous compared to C though Jun 05 20:34:27 jaana: umm... why? It's quite high performance compiler, and modern GC in CL is comparable in speed to non-hand-tailored C++ allocators (by hand-tailored, I mean hand-tailored for specific object, not careful use of malloc/new) Jun 05 20:34:39 How could I implement a type of dynamic padding for my GridLayout? For example, closing the gap between these two items as seen here: http://i.imgur.com/mwBmYq9.png Jun 05 20:34:47 p_l: it’s dynamically typed... Jun 05 20:35:00 if it were lisp-on-jvm, yeah. but native? Jun 05 20:35:45 danpsy: use https://developer.android.com/reference/android/support/v7/widget/StaggeredGridLayoutManager.html instead Jun 05 20:35:49 jaana: do not mistake static/dynamic and strong/weak typing. Or assume that languages have to be naively implemented in C with runtime checks to have dynamic typing :) Jun 05 20:36:07 Thanks, groxx Jun 05 20:36:09 lol good luck with StaggeredGridLM ... that thing was *buggy* Jun 05 20:36:11 p_l: I am quite aware of the differences, I stand by what I said. Jun 05 20:36:30 (SBCL's dynamic method calls are often faster than C++'s virtual calls) Jun 05 20:36:45 g00s: I asked for some more documentation on what apps it won't affect. Jun 05 20:37:14 ah. well, if it's buggy, you might have to dive in deep to fix things :) but GridLayoutManager aligns rows by design, and it'll be a _ton_ of work to make it do otherwise (if it's even possible) Jun 05 20:38:01 groxx, oh yeah, you were the one wondering about sdk proguard being 4.xx? I doubt that's the case anymore, gradle-core depends on proguard 5.1 Jun 05 20:38:11 kroot ok great, will they update the website? Jun 05 20:38:39 pfn: yep, that was me. and cool, though afaik `tools/proguard --version` still says 4.10 or whatever :) might change soonish though Jun 05 20:38:46 that would be funny if your app was only included if you implemented a DreamService http://developer.android.com/reference/android/service/dreams/DreamService.html Jun 05 20:38:55 groxx, yeah, but gradle doesn't invoke tools/proguard anymore Jun 05 20:38:58 groxx, it runs proguard directly Jun 05 20:39:13 g00s: still, I plan on getting an evaluation license to test out on my 64bit android Jun 05 20:39:45 pfn: really? TIL Jun 05 20:39:59 any way to get the version info out of it? Jun 05 20:40:17 they probably keep the old tools/ one there so the ant stuff still works Jun 05 20:40:24 good point Jun 05 20:40:42 groxx, it should spit out what version of proguard is running when you run it Jun 05 20:40:53 jaana: in general, I expect performance within one magnitude of good C code :) Jun 05 20:41:09 [info] Packaging resources: resources-release.ap_ Jun 05 20:41:09 [info] Done packaging. Jun 05 20:41:09 ProGuard, version 5.0 Jun 05 20:41:15 I get that when I run my stuff that calls proguard directly Jun 05 20:41:17 p_l: sounds fair. And kinda unacceptable too on mobile (or everywhere actually :) ) Jun 05 20:41:35 p_l does Franz have anything ? Jun 05 20:42:09 jaana: for comparison, most popular languages are over two magnitudes slower and incur other penalties ;) Jun 05 20:42:17 jaana doesn't within 1 order of magnitde of C put it on par with dvm / art ? Jun 05 20:42:41 p_l: not true at all, the JVM is within a 2 order with C, certainly not 10 Jun 05 20:42:48 g00s: art, if anything. DVM was iirc slower. And I kinda bet the GC is going to be better Jun 05 20:43:43 jaana: JVM with well-primed hotspot VM, yes. Many of the optimizations hotspot does are also common in CL, although CL gets an edge in some compilers due to richer typing Jun 05 20:48:07 anyway, a lot of performance issues are always hidden in IO/ipc/rpc anyway. Going to reap the benefits of advanced language :3 Jun 05 20:48:53 hello, I just wanted to know if I could get help. I wanted to make an app but I am so lost at how to go about this with the IDE Jun 05 20:49:42 I want to support android 4.0.3 to the latest M, how do I go with the "native" theme for whatever OS the app will be running on? Jun 05 20:51:28 * g00s has pity for shaque Jun 05 20:51:38 p_l, except you're stucking having to constantly cross JNI bridge Jun 05 20:51:47 shaque, Theme.DeviceDefault Jun 05 20:52:08 shaque: fwiw gradle prevents you from supporting M + Jun 05 20:52:16 shaque there is a new android udacity course starting soon. also look at appcompat Jun 05 20:52:19 well, it's preview Jun 05 20:52:43 pfn: Oh, that one I know. I'd probably try to go further into generating Java code to handle some of it Jun 05 20:53:17 p_l, generating at buildtime you mean? I guess... that's rather painful Jun 05 20:55:55 Is there an easy way to test a quick code snippet or something without having to run my entire app? Like if I just want to test some java stuff etc.? Jun 05 20:56:40 thank you! I just leanred how to switch themes, what is the difference between AppCompact and Theme.DeviceDefault? Jun 05 20:56:47 Vercinger: in theory "snippets" will do that, but I have no idea how. Jun 05 20:57:03 Vercinger: personally, I run the app, hit a breakpoint, then use the debugger's expression editor to run code. Jun 05 20:57:04 I don't need to support M yet, I can wait Jun 05 20:57:27 I don't want to start eclipse or something just to test some java syntax that I have doubts about because I'm a novice :) Jun 05 20:59:11 p_l, if you're generating code at buildtime, kind of defeats the purpose of having lisp on-device at runtime Jun 05 20:59:20 p_l, might as well write yet another lisp -> bytecode converter Jun 05 20:59:23 Vercinger: I use JVM unit tests. Jun 05 20:59:29 In Android Studio. Jun 05 20:59:48 I think this'll be possible with snippets in the future. Jun 05 20:59:54 Right now, snippets are almost useless. Jun 05 21:00:01 okay, forget my snippet word :D Jun 05 21:00:36 pfn: doing code generation at runtime is not the only value of lisp Jun 05 21:00:37 Just a few lines of codes in a small test environment to get functions/methods etc. :P Jun 05 21:02:46 so if I understand right appcompat is to provide the activitybar support on versions of android that didnt have it before (which I think is < 4.0) down to 2.1? Jun 05 21:04:44 Good evening :) Jun 05 21:05:55 Does anyone here with good knowledge of Facebook SDK 4.0? I need help with this: http://stackoverflow.com/questions/30668872/facebook-logout-remove-profile-picture-and-name Jun 05 21:06:08 hey Jun 05 21:06:18 lol smurfs up ! Jun 05 21:06:18 im using eclipse indigo Jun 05 21:06:38 and it cant resolve android.support.design.widget.TabLayout Jun 05 21:06:42 what can i do? Jun 05 21:06:56 it looks like it doesnt have android.support.design Jun 05 21:07:44 g00s :) Smurf up ;) Jun 05 21:08:32 how can i install android.support.design? Jun 05 21:10:10 any help? :| Jun 05 21:10:22 i need TabLayout Jun 05 21:11:12 is there a youtube video or site one would recommend for learning how to build an android app with android studio? :D I know how to write java (among many other languages) and can learn fast, just dont know what im doing lol =/ Jun 05 21:11:23 youtube video series * Jun 05 21:12:35 shaque: you better get a good book :) Jun 05 21:12:46 books are always the best Jun 05 21:13:18 shaque - https://www.thenewboston.com/videos.php Jun 05 21:15:25 http://www.raywenderlich.com/78574/android-tutorial-for-beginners-part-1 Jun 05 21:15:30 d.android.com Jun 05 21:17:20 Hi Jun 05 21:17:59 Q: Is it possible to write a application that will add mouse for android device ? Jun 05 21:18:10 Is it possible from api side ? Jun 05 21:18:56 sounds like a security risk, unless you mean to your app Jun 05 21:20:44 hTmlDP: What makes you think that? IMO, books are just too slow to consume. Jun 05 21:20:48 I plan use esp8266 as a wifi transmiter that will emit events over tcp or UDP to my LAN, then on andorid side I want to write application that will consume this event and act like HID device Jun 05 21:20:52 no Jun 05 21:20:54 I love books and all, but they take forever to read. Jun 05 21:21:16 ed brunettes hello android is nice Jun 05 21:21:30 if its possible to have own input device for keyboard then why not mouse ? Jun 05 21:21:36 I far prefer books/sites over video tutorials Jun 05 21:21:44 brb 5 min Jun 05 21:21:57 Video tutorials are way faster to consume. Also more appropriate for anything graphical. Jun 05 21:22:08 I don't think they're faster at all Jun 05 21:22:22 you can read MUCH faster than anyone can speak Jun 05 21:22:37 you can go over bits again, and books can have pictures in them Jun 05 21:23:06 and much easier to show chunks of code? Jun 05 21:30:12 Hey Jun 05 21:30:25 How can i get android.support.design? Jun 05 21:30:35 TacticalJoke , wabz . Depends on how people learn . It's often easier to play a video then to explain detailed steps in plain text for a lot of people Jun 05 21:30:48 Eclipse doesnt find it. Jun 05 21:31:00 Text is way more complicated. We are visual creatures. Jun 05 21:31:05 Text is a whole extra layer of stuff. Jun 05 21:31:06 I do have android.support Jun 05 21:31:28 hTmlDP: find the download, and then https://developer.android.com/tools/support-library/setup.html#libs-with-res Jun 05 21:31:40 Yeah, but I'd rather read text to learn about a programming language than to watch somebody drone on about it. Jun 05 21:32:02 At the same time, I'd rather watch video of someone swapping out a component on a car Jun 05 21:33:09 groxx: the problem is that i have the support lib Jun 05 21:33:14 hTmlDP: There are more than 10 support libraries, design is just one of them. All of them are in the android.support package, and you can find all of them in sdk/extras/android/ Jun 05 21:33:38 groxx: so i can use support.v7 and v4 etc Jun 05 21:33:43 K Jun 05 21:34:23 Well i have vNs but not design there, simonvt Jun 05 21:35:04 TacticalJoke, hmm, I always wondered at that... don't you get bored waiting for the guy to click through / repeat stuff you already know (or can figure out for youself)? Jun 05 21:35:08 Then you need to update your sdk Jun 05 21:35:16 It's next to the vN folders Jun 05 21:35:32 wtf, uber's new privacy policy. "We're gonna store your contact info and access call and sms data" : Jun 05 21:35:34 :/ wtf Jun 05 21:35:48 Books suck, can't ctrl+f Jun 05 21:36:14 yeah, you need to press menu on a Kindle :P Jun 05 21:36:37 this is cool, bird ID & app http://merlin.allaboutbirds.org/photo-id Jun 05 21:36:41 SimonVT: you mean updating the support package? Jun 05 21:36:48 Yes Jun 05 21:37:10 SimonVT: this installation is about 3 months old Jun 05 21:37:24 ok.. Jun 05 21:37:33 Afzal: seems right in line with their usual policies Jun 05 21:37:33 The design library is about a week old Jun 05 21:37:57 Hahahaha Jun 05 21:38:01 Im so lucky Jun 05 21:38:03 Lol Jun 05 21:38:11 Afzal http://www.theverge.com/2015/5/29/8688985/uber-background-location-tracking-privacy-policy Jun 05 21:38:20 uber is a privacy nightmare Jun 05 21:38:22 Thanks anyway =D Jun 05 21:38:51 BTW, does tablayout display some underline animations by default? Jun 05 21:39:52 not the older ones, I think Jun 05 21:40:57 are they going to fix the square FAB :P its been a week :) Jun 05 21:41:30 it was fixed two weeks ago Jun 05 21:41:31 probably with preview 2 Jun 05 21:41:34 but i know how you like to complain Jun 05 21:41:44 cool so where is it ? Jun 05 21:42:00 internal Jun 05 21:42:02 did you check your spam folder? Jun 05 21:42:10 that doesn't do anyone good Jun 05 21:42:21 thankfully they don't live and die by the quantity of your bitching and helplessness Jun 05 21:42:23 Does someone know why Android Device Monitor monitors about a heap size of 30-35MB throughout the usage of my app. But in the Android Settings when you search memory and when I check the memory usage of the app it says an average of 73MB and max of 284MB. Jun 05 21:43:46 g00s that's messed up :/ Jun 05 21:44:12 wow, JakeWharton seems to be in a bad mood today Jun 05 21:44:25 He has seen the light Jun 05 21:44:26 in a perfectly fine mood Jun 05 21:44:45 i've exhausted my tolerance of g00s for this lifetime Jun 05 21:45:25 Muchoz: afaik android device monitor only checks your heap. there's more to memory usage (and there are at least 2 kinds of shared memory on android, and who do you blame there...) Jun 05 21:48:52 what .properties files are imported automatically? gradle.properties, and? Jun 05 21:48:58 JakeWharton i think you're probably more exhausted being Google's white knite and defending every misstep Jun 05 21:49:07 whoa whoa, easy now Jun 05 21:49:08 no. it's you. Jun 05 21:49:25 i can happily list shit about Google that's bad or wrong Jun 05 21:49:40 he doesn't defend google's missteps, remember the whole argument against fragments Jun 05 21:51:45 anyway Jun 05 21:51:49 what .properties files are imported automatically? gradle.properties, and? Jun 05 21:53:58 groxx, got any advise on how to check how your app is faring in terms of memory usage? Jun 05 21:54:12 `adb shell dumpsys meminfo` iirc Jun 05 21:55:17 starts in a few minutes https://www.youtube.com/watch?v=IGhLw85W7nQ Jun 05 21:56:35 Muchoz: ah, there we go. `adb shell dumpsys meminfo --package `. that's the dump I remember. Jun 05 22:00:43 groxx, what should I be aiming for for a general application, imagine the phone dial app. Jun 05 22:00:48 s/--package// also works Jun 05 22:01:12 icedp: that just tells me "can't find process with id " :| maybe that's an M change. Jun 05 22:01:28 This is gonna be my doom.. I've written so many functions and so much code, and havent tested it yet.. Jun 05 22:01:33 don't know, 5.1 groxx Jun 05 22:01:44 and I can't test it unless I do a 45 minute drive.. sigh Jun 05 22:01:59 Muchoz: ¯\_(ツ)_/¯ don't waste, and don't worry much if you're not an always-running foreground service app. Jun 05 22:02:33 Muchoz: probably use some system apps / other "probably good" 3rd party apps, and see what happens to them Jun 05 22:03:15 groxx, it just worries me a bit that the Settings in Android says it has a max usage of 284MB... Jun 05 22:03:54 heap won't go that large, find out where they are collecting from Jun 05 22:04:46 Muchoz: dunno. twitter on my phone currently gets: http://pastebin.com/v2iZnnxe Jun 05 22:05:11 i would just keep the eye on heap usage, and f whatever the android settings are telling you, they are probably combining shared stuff, or just not really useful stuff to keep you from OOM Jun 05 22:05:32 groxx, alright. Guess I should be fine right now with 60MB. Jun 05 22:06:00 hm. Snackbar does not adjust to colorPrimary and colorAccent? Jun 05 22:06:22 60 on the heap if maxing out is pretty substantial if your app doesn't do much, but upon GC heap can resize, do you use alot of graphics? Jun 05 22:06:33 What do google look for when reviewing app? Whats the most important requirement they tend to be strict on? Jun 05 22:06:48 spam Jun 05 22:06:52 DarkChaoz, theres no actual reviewer Jun 05 22:07:00 its just an algorithm Jun 05 22:07:18 dont spam, dont use keywords too often, and dont infridge copyrights Jun 05 22:07:20 So just upload the app to google store and no one checks? Jun 05 22:07:29 I see Jun 05 22:07:49 pretty much. and if you get banned, it's probably also just a bot, and they are crap at reviewing. if you're sure you're fine, just resubmit a new app :| Jun 05 22:07:55 What do u mean by keywords? Jun 05 22:08:01 Just because it's an algorithm does not mean it's stupid. There are plenty of people who can't do what most simple algorithms acn Jun 05 22:08:33 my algorithm detected 'acn' as false Jun 05 22:08:46 My app is a fan made community app based around a microsoft IP Jun 05 22:09:08 I hope thats fine lol Jun 05 22:09:11 Pro tip, don't use your own google account Jun 05 22:09:34 Pro tip, let your meat rest before slicing Jun 05 22:09:50 * DarkChaoz doesnt even have a dev account Jun 05 22:10:19 canvs2321, how come? stops the cooking process or something? Jun 05 22:11:07 An app based around IP sounds like a fast way to get taken down Jun 05 22:11:16 redistributes the juices Jun 05 22:11:21 So does apple have a reviewer? Jun 05 22:11:36 yes Jun 05 22:11:43 Well the said IP is a game Jun 05 22:11:54 Pro tip, still have to use your name with your google account when paying google, as if not they will deny you, ask for 3-4 documents to be scanned and sent, and still deny you Jun 05 22:12:04 And i seen one or two apps on it already in the apps store Jun 05 22:12:47 * danijoo has an app based arround Blizzard Entertainment and is not taken down Jun 05 22:13:11 it was though. I got it reinstantiated :) Jun 05 22:13:15 DarkChaoz depends on what IP you are using... never copy paste code from IP . but if it's a general idea or rewrite of something that already exists it's a bit of a different story. Jun 05 22:13:36 canvs2321, it doesn't do almost any graphics in the activity I run the memory info in. Even though App summary says Graphics takes 50MB. Jun 05 22:13:41 if you use any IP, be ready to be able to prove that you are allowed to Jun 05 22:14:01 canvs2321, the only thing on the screen is a Toolbar and a RecyclerView with few elements. Jun 05 22:14:08 prove = written consense or being able to point to their TOPS Jun 05 22:14:10 few items* Jun 05 22:14:10 TOS Jun 05 22:14:32 Its basically game lore and audio character quotes from the game Jun 05 22:14:37 No code whatsoever Jun 05 22:14:37 60 is your heap size and not what you are using? it can get resized often, but if a steady 60 and no graphics you have a lot of objects Jun 05 22:14:39 Pro tip: legally change your name to "lol google" and _then_ set up a developer account Jun 05 22:14:41 DarkChaoz, what game ? Jun 05 22:14:48 Gears of war Jun 05 22:14:54 DarkChaoz . would have been better if you say it's loosely based on an existing product. Not based on someones IP Jun 05 22:14:58 was scared you would be a concurrent :p Jun 05 22:15:00 groxx, make sure it matches with your billing name Jun 05 22:15:07 lol Jun 05 22:15:27 DarkChaoz, carefully check their TOS. if they dont give you permission to use this stuff, you have a problem.. Jun 05 22:15:31 Hello folks! Jun 05 22:16:18 I believe MS have game content usage policy which mainly applies mostly to videos but not sure about fan made apps Jun 05 22:16:19 I don't know what's going on with Android Studio here. It is showing this error message for a R reference : https://gist.github.com/anonymous/af39be88b07cf3e952e0 Jun 05 22:16:22 Muchoz, if stays a steady size of 60 and not cresting passed it, then maybe no worries, but that seems high if no graphics and just a few items in a list Jun 05 22:16:38 Need to take a look at it again Jun 05 22:16:46 DarkChaoz . IP and copyright are shadowy affairs. Don't use code, and don't use assets if your not given consent. If you write your own code and make your own assets (images, sounds etc) then your a lot safer Jun 05 22:16:46 ircfox: targeting M I'm assuming? Jun 05 22:17:07 I know Jun 05 22:17:08 groxx: what do you mean? Jun 05 22:17:09 i've had huge list with graphics involved and scrolling and lazy loading and all sorts of custom spannables and shit, and tried to always keep it below 30 Jun 05 22:17:17 ircfox: or maybe not. have you tried switching to the non-preview build tools? Jun 05 22:17:24 ok.. so snackbar has a method to set the color of the action text Jun 05 22:17:26 Im definitely goig to study IP law in my third year of uni Jun 05 22:17:31 groxx: just did that. Jun 05 22:17:36 canvs2321, the list does have 2 icons / item. But these are very basic one color icons that should be very small in size. Jun 05 22:17:38 20-30 was my target, 70-80 was a max before GC finally kicked in Jun 05 22:17:40 but if you want to set background color, you have to do snackbar.getView().setBackgroundColor Jun 05 22:17:43 groxx: but the issue remains. :p Jun 05 22:17:52 do they even think @ google? Jun 05 22:17:54 * DarkChaoz will not get his ass sued Jun 05 22:17:55 and 70-80 was with heavy scrolling Jun 05 22:18:03 ircfox: seems like it should be giving you a different error now? and/or try a clean + rebuild Jun 05 22:18:04 DarkChaoz . Have fun with that ;) I'd like to know more. You might enjoy these then : http://everythingisaremix.info/ Jun 05 22:18:17 canvs2321, Android Studio reports a steady 30. But the memory usage thing reports 60-70 Jun 05 22:18:43 groxx: yes, I think this error message was after the change. Previously it was just complaining about R. Jun 05 22:18:50 Muchoz, if you aren't having issues i wouldn't worry bout it, ship it, then optimize it Jun 05 22:18:59 is anyone using Android M here? Jun 05 22:19:13 canvs2321, well I'm running it on a Nexus 5. Doubt there will be any issues. Jun 05 22:19:16 Muchoz, there are quite a few ways to optimize, but that comes later once things work :) Jun 05 22:19:18 quinnjn, don't ask to ask, just ask your question. Jun 05 22:19:31 canvs2321, you're right. I focus on the bad things. Jun 05 22:19:37 Muchoz, that was my question. Jun 05 22:19:38 ircfox: have you changed both build.gradle's build tools version _and_ gone back and re-installed the non-preview build tools in the SDK manager? (preview replaces non-preview, you can't have both at the same time apparently) Jun 05 22:19:46 quinnjn: yup Jun 05 22:19:59 Muchoz, you aren't the first, but get it working and stable, ship it, then opitimze later Jun 05 22:20:17 quinnjn, but why do you need to know? Jun 05 22:20:32 small tweaks such as cache with bitmaps, and not over creating strings where you could use char sequence or reuse string builder etc, come later Jun 05 22:20:33 Muchoz, curiosity on how many are using it Jun 05 22:20:37 Alright Jun 05 22:20:43 I'm using it Jun 05 22:20:57 I heard about random connection and GPS drops on N5 with android M Jun 05 22:21:08 quinnjn: I mostly like it. `run-as` is broken though, which is a bit crippling :\ Jun 05 22:21:13 danijoo, don't know. I don't use it as a daily driver. Jun 05 22:21:27 Will take a look at the link later ;) Jun 05 22:21:43 danijoo, sometimes my app doesn't update the location for some reason. Maybe that's why. Jun 05 22:21:52 Damn irc client suddenly crashed on my phone -__- Jun 05 22:22:14 Damn thread! Jun 05 22:23:01 groxx: it is now installing MNC as a SDK fix. Jun 05 22:23:14 Does apple have a reviewer? Jun 05 22:23:24 probably more than one Jun 05 22:23:38 Damn Jun 05 22:23:50 though it can be to tell, since it takes a week+ to get an update out Jun 05 22:24:10 o.o Jun 05 22:24:24 darkchaoz: http://appreviewtimes.com/ Jun 05 22:27:04 by the way thank you for the link! got so busy watching i forgot to thank you Datasmurfen Jun 05 22:27:06 Damn Jun 05 22:27:24 gah he left already Jun 05 22:29:39 groxx: say I want to keep the preview build tools, how would I fix this error? Jun 05 22:30:16 ircfox: dunno. the 1.3 plugin wasn't out yet last I tried, not sure if there's a way to fix it Jun 05 22:31:38 groxx: I read it is possible using a -beta somewhere, have you tried it? Jun 05 22:31:46 haven't tried Jun 05 22:35:41 I can't find the Manifest file using Android Studio, how do I locate it? Jun 05 22:36:14 project structure Jun 05 22:36:31 ircfox: depends on your project structure 'view'. if you're in the Android one, it's in the top-level "manifests" folder Jun 05 22:36:32 canvs2321: Yes, but I can't find it. Jun 05 22:36:50 ircfox: https://www.dropbox.com/s/3t9uo7qfuoigd7f/Screenshot%202015-06-05%2015.36.38.jpg?dl=0 Jun 05 22:37:41 It doesn't have this folder. Jun 05 22:38:15 just check all the triangles til you find it Jun 05 22:38:26 ircfox: may not have one? switch to 'project', it should be in your project/src/main/AndroidManifest.xml Jun 05 22:38:27 Lol Jun 05 22:38:37 if you don't have one, make one I guess? Jun 05 22:39:00 Im sure androidmanifest is always generated when u start a project Jun 05 22:39:15 So there is no need to make.one Jun 05 22:39:27 yeah, but if it exists + is in the right place (as it would be if the project was generated), then it should automagically appear. it isn't. Jun 05 22:39:32 Ok, got it now. It was on Project instead of Android. :p Jun 05 22:40:03 easy mistake Jun 05 22:40:09 I remember that one Jun 05 22:40:17 "ooh they changed the whole project structure, nice!" Jun 05 22:41:29 Whats the current stable version of AS righf now? Jun 05 22:41:44 I have 1.2.1.1 Jun 05 22:41:51 .4.6.2.2.1 Jun 05 22:41:52 .5 Jun 05 22:41:57 .0 Jun 05 22:42:06 Odaym, are you drunk? Jun 05 22:42:11 Mhmm Jun 05 22:42:14 when isn't he? Jun 05 22:42:24 nope, it's just how I am Jun 05 22:42:27 and that's the sad part Jun 05 22:42:28 Oh daym Jun 05 22:42:31 I wake up like this Jun 05 22:42:32 on days that end in tay Jun 05 22:43:08 I can tell you that I dont have version 1.2.1.1.4.6.2.2.1.5.0 :p Jun 05 22:43:26 hehe, yea just exaggerating with the number of ..numbers Jun 05 22:43:36 did you turn off and turn on your computer to check that update took? Jun 05 22:43:36 I only accept up to 3 digits in version numbers, the rest is just a joke Jun 05 22:43:43 like Slackware back in the day Jun 05 22:43:48 1.4.1.45.6.8.9.90. Jun 05 22:43:49 Anyone here worked with Android TV? Wondering the best way to share code between my phone & TV app Jun 05 22:43:50 it was insane Jun 05 22:44:01 Ok, it still now building. How do I downgrade SDK to a stable version? Jun 05 22:44:08 s/now/not Jun 05 22:44:27 you dont make it older, you choose an older one Jun 05 22:44:37 you set the build to,min and such for sdk in gradle now Jun 05 22:44:38 Odaym: how? Jun 05 22:44:49 you dont know how to choose the target sdk? Jun 05 22:44:53 Odaym: where do I choose it? Jun 05 22:45:04 grable build file for your app Jun 05 22:45:10 Odaym: not really. Jun 05 22:46:01 will my code compile if I don't add a value to a variable, but I know it will get it.. but it's inside "if-statements"? Jun 05 22:46:14 yes Jun 05 22:46:18 Vercinger, why dont you try it? Jun 05 22:46:26 you can literally find out right now Jun 05 22:46:30 No I can't Jun 05 22:46:44 Odaym: is it on Preferences/Appearance & Behavior/Android SDK/ ? Jun 05 22:46:51 so I could just ignore the error it gives, tbh? Jun 05 22:46:52 i dont know man Jun 05 22:46:53 too basic Jun 05 22:46:57 Do variable = null? Jun 05 22:47:07 If it doesnt compile Jun 05 22:47:32 ircfox, are you asking how to adjust your target and min sdk using AndroidManifest? Jun 05 22:48:27 canvs2321: not really, I don't know how to choose a target SDK on Android Studion yet. Jun 05 22:48:46 you don't do it in AndroidManifest anymore Jun 05 22:48:56 it's in the gradle files, they take precedence Jun 05 22:50:00 U still can i think Jun 05 22:50:03 canvs2321: Oh, ok. Jun 05 22:50:11 gradle overrides it tho drakchaoz Jun 05 22:50:13 I put minsdk and targetsdk in manifest Jun 05 22:50:24 Damn Jun 05 22:50:32 Where do i edit that? Jun 05 22:50:44 lulz, coincidental learning Jun 05 22:50:53 -_- Jun 05 22:51:05 Gradle build file? Jun 05 22:51:25 app/build.gradle Jun 05 22:51:38 Thought so Jun 05 22:51:45 I have buildToolsVersion "23.0.0 rc1" on build.gradle Jun 05 22:51:48 ah but you see there are 2 of those Jun 05 22:51:53 let the confusion begin Jun 05 22:52:04 Should I change it to 22.0.1 ? Jun 05 22:52:08 ircfox, yes Jun 05 22:52:19 there is a build.gradle in root of project, but the one you want is root/app/build.gradle Jun 05 22:53:30 Ok, working again. :p Jun 05 22:53:34 Thank you guys! Jun 05 22:53:38 :) Jun 05 22:53:46 Thanks too Jun 05 22:54:08 * darkchaoz is still a noob using AS Jun 05 22:54:35 darkchaoz me2 ;) Jun 05 22:54:40 probably not as much AS as gradle, i have no idea wtf gradle does in the background, i just learn what i need to get things working :) Jun 05 22:55:06 I only started to use AS because i somehow messed up eclipse Jun 05 22:55:19 xD Jun 05 22:55:19 well good for you :) eclipse is a ghost Jun 05 22:55:21 musta looked at it funny Jun 05 22:55:27 Eclipse don't like that Jun 05 22:55:30 I did the build.gradle confuzzleling too couple of days ago.. Jun 05 22:55:41 Lol Jun 05 22:56:07 also, I was dumb enough to ignore this: // NOTE: Do not place your application dependencies here; they belong Jun 05 22:56:22 lol Jun 05 22:56:27 AS is where it's at, it's just learning the quirks of gradle, don't have to fully understand it, just what it wants so it stops crying Jun 05 22:56:29 // in the individual module build.gradle files Jun 05 22:56:55 canvs2321, rename is cradle? :P Jun 05 22:56:58 Or give gradle a big slap in the face Jun 05 22:57:02 sounds good :) Jun 05 22:57:03 there there little cradle.. Jun 05 22:57:03 Problem solved :) Jun 05 22:57:18 or until you stop crying haha Jun 05 22:57:27 Lmao Jun 05 22:57:28 one of you is going to cry Jun 05 22:57:38 more often me than it.. Jun 05 22:57:43 yessir Jun 05 22:57:44 I rage doe Jun 05 22:57:50 Cradle cries.. I rage Jun 05 22:57:56 : p Jun 05 22:57:58 you come here, rage, make other people cry Jun 05 22:57:59 I get the jist of it after tons of SO searches and such, but i don't care to know it all yet, as Android keeps evolving, i'm sure gradle does do but not on the same linear paths Jun 05 22:58:00 ez life Jun 05 22:58:06 I start yawning when I don't understand things.. really really annoying Jun 05 22:58:06 XD Jun 05 22:58:24 /do/to Jun 05 22:58:27 I give up so easily Jun 05 22:58:40 cause you got to go drink with your friends brah! Jun 05 22:58:49 missing out on the fun Jun 05 22:58:54 Lol Jun 05 22:59:09 Anymore questions please redirect to JakeWharton, thanks :) Jun 05 22:59:10 drink with friend < get a passing grade on your bachelors project Jun 05 22:59:14 I think it's gist, canvs2321 Jun 05 22:59:20 f u :P Jun 05 22:59:28 ok keep saying jist..lol Jun 05 22:59:48 haha, phenetics Jun 05 22:59:56 pho..nevermind Jun 05 23:00:20 hahah even that was wrong :) Jun 05 23:00:27 turn on spelling in your irc client Jun 05 23:00:34 that's what I do, I type anything and i see the correction Jun 05 23:00:36 Probably a stupid question but mRetrofitError.getBodyAs(SomeClass.class) only works if mRetrofitError.hasResponse() returns true? Jun 05 23:00:36 mIRC no has it Jun 05 23:00:42 use Xchat or BitchX Jun 05 23:00:46 much better Jun 05 23:01:03 gonna go back to just pigeon chat Jun 05 23:01:04 I use ychat Jun 05 23:01:15 HexChat Jun 05 23:01:19 Xchat has that nag screen i think Jun 05 23:01:22 nothing goes over HexChat Jun 05 23:01:23 Xchat Azure here Jun 05 23:01:28 telnet Jun 05 23:01:29 used to do irssi Jun 05 23:01:29 catch couple birds and have them transfer it, i won't get the spelling check :) Jun 05 23:01:32 but then I grew up Jun 05 23:01:41 lol groxx, really? Jun 05 23:01:48 for sure Jun 05 23:02:00 nah, opposite end of the spectrum. irc cloud. Jun 05 23:02:15 my friend had his BNC in tmux irssi Jun 05 23:02:32 what a bum Jun 05 23:02:38 lasserix_, only works if if it has a reponse to your error before the getBody? Jun 05 23:02:51 ? Jun 05 23:03:11 sorry i dont understand if you are asking me a question, rhetorical question or trick question Jun 05 23:03:15 you said getBodyAs only works if Error.hasReponse Jun 05 23:03:43 no i just don't get your questions on such a short question, and also not dealing with retro Jun 05 23:03:49 should elaborate for others Jun 05 23:04:40 seemed like you only got getBodyAs() if your error had a response, or is the getBodyAs() gettting the body of the response? Jun 05 23:04:53 so if I get a RetrofitError if I try to do mRetrofitError.getBodyAs(someClass.class) this will only work if the error hasResponse Jun 05 23:05:15 is a response the body? Jun 05 23:05:30 i dont know Jun 05 23:05:47 lasserix_, check the source ;) ctrl+b !! Jun 05 23:05:49 ah, got ya Jun 05 23:05:49 there is getResponse and getBody Jun 05 23:06:14 well if error, would one take over the other? Jun 05 23:06:39 crtl b just jumped me around the editor Jun 05 23:07:08 what are you doing to where you'd encounter an error? Jun 05 23:07:40 thats what retrofit does whenever you get a http response code != 200 Jun 05 23:07:44 "200" Jun 05 23:08:04 ok, so for sure you have network, it's just a server error? Jun 05 23:08:16 i dont know Jun 05 23:08:24 but yeah Jun 05 23:08:28 and that error isn't a data error as much as not found? Jun 05 23:08:29 i check for connection before Jun 05 23:08:33 making the call Jun 05 23:08:44 you've gotta dial it in Jun 05 23:08:49 retrofit throws the error if the call doesn't return okay Jun 05 23:08:51 it's simple networking Jun 05 23:09:20 canvas if my server returns OKAY but returns "resources dont exist" Jun 05 23:09:24 retrofit will not return an error Jun 05 23:09:24 so you are getting a response, just not the data you want, or are you getting a failed connection Jun 05 23:09:41 make your server return a valid error for your api Jun 05 23:09:46 is my server returns bad_request and returns a body as "resources dont exist" retrofit will throw an error Jun 05 23:09:48 i can't Jun 05 23:09:51 i have no control Jun 05 23:10:03 then...dunno how to help debug Jun 05 23:10:09 or what you are expecting Jun 05 23:10:13 again my original question Jun 05 23:10:24 [19:04] so if I get a RetrofitError if I try to do mRetrofitError.getBodyAs(someClass.class) this will only work if the error hasResponse Jun 05 23:10:24 when does getBodyAs fail Jun 05 23:10:29 that was your original question Jun 05 23:10:38 when does getBodyAs fail Jun 05 23:10:38 but it boils down to your server returning a response Jun 05 23:10:45 so Jun 05 23:10:47 it won't if you don't know it Jun 05 23:10:50 error.hasResponse Jun 05 23:11:24 if server returns a response with but you aren't capable of dealing with it, what do you expect? Jun 05 23:11:34 can anyone please look at this code for this custom view and tell me where does it say that this code spans the whole view that it sits in? https://github.com/Korilakkuma/CanvasView/blob/master/com/graphics/CanvasView.java Jun 05 23:11:52 because setting layoutparams on this view to match width and wrap height takes zero effect and I can't figure out why Jun 05 23:11:52 canvas thats not the issue Jun 05 23:11:53 lasserix_; who makes retrofit, maybe ask or post to them Jun 05 23:12:05 yes thats why i am asking in here ;) Jun 05 23:12:12 is it line 420 like I suspect? Jun 05 23:12:38 lasserix, you are getting a response, because you were able to connect to your server, but your app and retrofit can't comprehend, then you need to tweak it Jun 05 23:12:45 lasserix, are you able to post any code? Jun 05 23:12:53 420 is always suspect Jun 05 23:12:56 I want it to have the same height and width as another view that's inside the same layout, whatever that view's height and width are Jun 05 23:13:00 lol 420 blaze it Jun 05 23:13:02 :) Jun 05 23:13:19 canvas that is what i am saying, when can I use getBodyAs, Jun 05 23:13:31 if the retrofit error has no response, this fails i assume? Jun 05 23:13:45 it has nothing to do with 420, that was stupid, that's for when it is trying to draw a bitmap Jun 05 23:13:47 420 is just saying if null, use what the class has as bitmap to decide size? Jun 05 23:13:49 if the retrofit error has a response but has no body (is this possible?) this fails I assume Jun 05 23:14:01 yes, what I want is before super Jun 05 23:14:14 so i am guessing getBodyAs only works if the retrofiterror has both a response and body Jun 05 23:14:33 414 Jun 05 23:14:40 clipRect on it or something, then feed it to super Jun 05 23:15:14 lasserix_, seems body is related to html? meaning it is looking for that xml/html tag, am i wrong? i maybe, but without any source code, or screenshots or demos, it's hard :/ Jun 05 23:15:20 how will I get the dimens to it though Jun 05 23:15:32 meh, easy Jun 05 23:15:49 lasserix_, theres RetrofitError.getKind() Jun 05 23:15:53 Odaym, that is 814lines of code, what did you need again? :) Jun 05 23:16:02 set canvas size Jun 05 23:16:06 lasserix_ ^^ danijoo woke up Jun 05 23:16:16 I assume if its Kind.NETWORK or Kind.CONVERSION, there wont be a body Jun 05 23:16:18 whatever XML i give it (except for literal size in width/height), it always stretches the entire view Jun 05 23:16:41 Odaym, think i wanted to say something to you few days ago, do you adjust with density? may have been someone else Jun 05 23:16:55 nah that other problem was fixed Jun 05 23:16:57 so mdpi = 1x hdpi = 1.5 etc.... when dealing with pixels Jun 05 23:17:00 I fixed it and then dumped his library Jun 05 23:17:12 it was a translation he was doing to the canvas without telling anyone Jun 05 23:17:36 you look at the constructor and he translates it before setting it Jun 05 23:17:44 so it becomes much bigger Jun 05 23:17:52 Odaym, any sizing of your view is very controllable(sp?) Jun 05 23:18:07 canvs2321: even more fun, ldpi = 0.75px, which is often floored to 0. watch out for them 1dp things :| Jun 05 23:18:16 ldpi even still works? Jun 05 23:18:23 no, I do not know the size it needs to be at compile time Jun 05 23:18:28 thought defaulted to mdpi Jun 05 23:18:50 who ads ldpi folder to his project? Jun 05 23:18:53 canvs2321: ¯\_(ツ)_/¯ I'd assume there are new-ish ldpi devices out there. cheaper tech. Jun 05 23:19:03 danijoo: anyone targeting gingerbread :P Jun 05 23:19:09 Odaym, what i am saying is, getting your devices sizes HxW, is easy, then taking into consideration density is easy too, what is the issue Jun 05 23:19:20 groxx, if so that sucks Jun 05 23:19:36 ah, well it's an image that's being loaded Jun 05 23:19:38 figured mdpi would be default lowest case Jun 05 23:19:41 and its height varies Jun 05 23:19:56 the width always spans the whole thing, but the height of the image differs Jun 05 23:20:16 Odaym, are you seeing scaling issues? like i said, you can get your devices hxw, anything drawing wise you do with that Jun 05 23:20:30 need cropping or what? Jun 05 23:20:53 just drawing on a view that's ontop of that image, when saving i grab the bitmap from the canvas, grab the image, make them into one image Jun 05 23:21:24 I think I must take who is of higher height, when saving, like Mavrik suggested a couple of days ago Jun 05 23:22:30 i end to use a lot of stringbuilders Jun 05 23:22:44 but i dont want to make them method scoped so i can avoid unecessary creation of them Jun 05 23:23:00 anyone got a scheme that is thread safe for pooling string builders? Jun 05 23:23:08 yech Jun 05 23:23:14 ? Jun 05 23:23:20 a 200pxX200px image will look different if not scaled using density of device, my galaxy nexus is hdpi my larger screened galaxy tab is mdpi, so when dealing with pixels i have to remember the multiplier , i maybe off base, but seems you are dealing with that density Jun 05 23:23:40 lasserix_: ThreadLocal maybe Jun 05 23:23:43 lasserix_, common strings or all unique? Jun 05 23:23:47 threadlocal is never the way to go Jun 05 23:23:58 pfn sorry what's that mean? Jun 05 23:23:58 whyzat? Jun 05 23:24:01 Is the simple way to draw colored polylines on GoogleMap object that follow the roads ? I have about 30 points in a simple track, and I want to add polylines between them, but I don't want polylines to be straight lines, I know how to draw straight line polyline Jun 05 23:24:09 I scale it with Picasso Jun 05 23:24:10 canvas common strings or all unique? what do you mean? Jun 05 23:24:23 threadlocal is just a hack Jun 05 23:24:36 "myString" used 200 times versus "myString(X)" used 200 times Jun 05 23:24:47 there are string pools you can use Jun 05 23:24:54 canvas no i need to build strings with dynamic data Jun 05 23:24:55 works great for date formatting objects, and for libraries where can't be used on thread Z Jun 05 23:25:11 lasserix_, and keep those strings visible or just for formatting? Jun 05 23:25:35 if just formatting use a char sequence or reuse string builder etc... Jun 05 23:25:49 just String string = "string" a billion times is a waste Jun 05 23:25:54 and stays present on stack Jun 05 23:25:56 groxx, it's pretty bad when it comes to global state and memory leaks Jun 05 23:26:12 canvs2321, nope, "string" is interned Jun 05 23:26:13 well sure, like most static-y things. so don't do that. Jun 05 23:26:20 canvas no that's not what i mean Jun 05 23:26:20 all literals are Jun 05 23:26:20 here Jun 05 23:26:25 "string" stays on stack Jun 05 23:26:32 lasserix_ there is this, not sure if its a good idea though http://developer.android.com/reference/android/support/v4/util/Pools.SynchronizedPool.html Jun 05 23:26:47 charsequence if just searching it can be used and nulled and reused Jun 05 23:27:15 if common strings can use charsequence to check pool and reuse and not create a new object Jun 05 23:27:25 groxx, except static variables are obviously a memory leak Jun 05 23:27:42 more-so than a static ThreadLocal? Jun 05 23:27:53 http://pastebin.com/Faq7aTqH Jun 05 23:27:54 groxx, not to mention, threadlocals have performance implications due to synchronization on a global hash Jun 05 23:28:11 no common strings Jun 05 23:28:36 i have things like this i need to do everywhere in transform style methods that run on different threads Jun 05 23:28:36 anyway, object pooling on stringbuilder is over optimization that won't improve your performance perceptibly Jun 05 23:28:42 pfn: I have been trying to hunt down threadlocal performance costs - know where that detail might be written down? Jun 05 23:28:53 ThreadLocal.java :p Jun 05 23:29:02 pfn so just creating a stringbuilder method local is fine? Jun 05 23:29:08 lasserix_, i'm saying an inflood of data you are checking the data, use a char sequence then once found sure create that string Jun 05 23:29:13 lasserix_, yes Jun 05 23:29:14 derp. just realized that :) Jun 05 23:29:15 somehow i've never managed to use ThreadLocal so far Jun 05 23:29:27 * pfn has made use of it for ugly hacks Jun 05 23:29:33 it felt pretty at the time, but oh god is it so ugly Jun 05 23:29:57 you like Huey Lewis and The News? Sports was a great album! Jun 05 23:30:03 Hey Paul!! Jun 05 23:32:03 Odaym, sorry you've been demoted to greeter Jun 05 23:32:15 6 days on 1 bug Jun 05 23:32:20 makes you dumb Jun 05 23:32:24 7th is rest? Jun 05 23:32:46 workign so long on ONE problem will make you not being able to see the forest from just trees Jun 05 23:32:47 fwiw there's no synchronization at all in ThreadLocal.java Jun 05 23:32:50 haha yea the bug will become alive Jun 05 23:33:09 Vercingers got it Jun 05 23:33:14 nah Jun 05 23:33:19 you have to solve it Jun 05 23:33:23 gotta let go if fail, and get some work done Jun 05 23:33:26 nope Jun 05 23:33:32 that's madness Jun 05 23:33:35 let me put it this way Jun 05 23:33:43 Guys if I have build and object array from other arrays and I want to find at what index in my object array a certain value appear how do i do it? http://pastebin.com/xd30iCew Jun 05 23:33:46 if you knew it would get solved on the 9th day, would you go through them? Jun 05 23:33:57 int indexOfOffice = Arrays.asList(officeDistances).indexOf("OfficeNumber") Jun 05 23:33:59 yea, thought so Jun 05 23:34:00 doesn't work for me Jun 05 23:34:11 if it didn't get solved within 48hrs, then fuck it Jun 05 23:34:12 replace "officenumber" with like "005" Jun 05 23:34:16 haha waat Jun 05 23:34:31 what if it was something you really wanted to do! Jun 05 23:34:47 6days is way too long, i've spent 6-8hrs on a problem and solved it, if more than that, it isn't possible Jun 05 23:34:53 Hello all! I'm trying to install the Android Studio on a Debian Wheezy 64bit install. Is this output during install a problem? https://paste.debian.net/205219/ Thanks! Jun 05 23:34:59 Hi, here's some output from my latest attempt https://paste.debian.net/205232/ how do I fix the adb problem? thanks Jun 05 23:35:00 whats the best way to embed a tab in a string? Jun 05 23:35:05 \t or " " Jun 05 23:35:15 you can spend 10 days on a bug, man, when you're stupid enough to learn nothing from 1 day to the other Jun 05 23:35:37 read that yesterday "difference between a developer who has 10 years of experience and a developer that has experienced the same year 10 times" Jun 05 23:35:38 haha Jun 05 23:35:41 shocking Jun 05 23:35:42 I'm not seeing anything in ThreadLocal that wouldn't be under greater contention in something you might build yourself, e.g. a synchronized hashmap / specialized container. getting rid of _all_ cross-thread contention is a nice quality. Jun 05 23:35:43 Vercinger, that is a huge preloaded mess, what is your question again? Jun 05 23:35:46 if I have to spend more than a day on a bug, its a feature Jun 05 23:36:00 that quote though Jun 05 23:36:02 really scary Jun 05 23:36:06 lasserix_ best tag is something splittable Jun 05 23:36:10 I want to get the index number of where the occurence of i.e. "002" is in my objects array Jun 05 23:36:10 same year 10 times Jun 05 23:36:11 and unique Jun 05 23:36:22 canvs2321: ? Jun 05 23:36:24 no i want to format it Jun 05 23:36:36 make it unique Jun 05 23:36:42 and splittable Jun 05 23:36:54 yes Jun 05 23:36:56 don't expect spaces to wrk Jun 05 23:36:58 work Jun 05 23:37:00 but i want to vertically format it Jun 05 23:37:15 up down? with tab and spaces? Jun 05 23:37:21 new line Jun 05 23:37:24 and tab Jun 05 23:37:30 canvs2321: I want to get the index number of where the occurence of i.e. "002" is in my objects array, if that makes sense.. Jun 05 23:37:33 that is added data Jun 05 23:37:43 just make something unique that the data won't contain Jun 05 23:38:06 Vercinger: for (int i = 0; i < ary.length; i++) { Jun 05 23:38:08 Vercinger, search your list for that Jun 05 23:38:09 oops Jun 05 23:38:15 Vercinger, ##java Jun 05 23:38:32 danijoo, they were just mocking my dual arrays :P Jun 05 23:38:38 they love those questions :D Jun 05 23:38:46 told me to use enums instead Jun 05 23:38:47 haha Jun 05 23:39:16 Vercinger your "object" can have an id that is "002" and you search for that Jun 05 23:39:30 canvs2321 hoooow? :D Jun 05 23:39:40 do you know what an object is? Jun 05 23:40:02 I tried this: int indexOfOffice = Arrays.asList(officeDistances).indexOf("002"); Jun 05 23:40:04 this class hurts in my eyes... Jun 05 23:40:11 no Jun 05 23:40:13 with all those arrays Jun 05 23:40:16 please don't look at the arrays too much Jun 05 23:40:25 they are known to cause cancer Jun 05 23:40:40 yeah I closed chrome before it got too bad Jun 05 23:40:47 an Object can just be a simple Class with fields Jun 05 23:41:08 Vercinger: groxx already gave you what you need Jun 05 23:41:29 if it's objects, an ArrayList is way easier to use and not much more memory use. Jun 05 23:41:47 List are way better than Arrays if you ask me Jun 05 23:42:19 list are resizable, and very easy, Arrays are set and harder to work with Jun 05 23:42:41 arrays maybe something from late 90s to early 2000s, forget them Jun 05 23:43:15 possibly a homework assignment where they haven't got to lists yet Jun 05 23:43:16 Arrays are very primitive Jun 05 23:43:39 If so should disclose Jun 05 23:43:55 groxx: and adding a if/equals to that for-loop? Jun 05 23:44:42 do in app purchases automatically hit the production endpoints when moving an app to production from alpha testing? Jun 05 23:44:42 yep. return i if .equals, and you'll have essentially the same thing as asList().indexof(). Jun 05 23:44:55 ah.. ofcourse Jun 05 23:44:55 i noticed while alpha testing i was seeing "test" in the iap dialog Jun 05 23:44:55 thanks Jun 05 23:44:56 for(Item item : itemsList){} Jun 05 23:45:51 canvs2321: I do wish there was a "for with index" construct :| Jun 05 23:46:03 I wish Jun 05 23:46:27 it's pretty easy in ruby! :'( Jun 05 23:46:28 groxx, me too, i keep mixing that for each, and for(eachItem) Jun 05 23:46:41 if(officeDistances[i].getOffice().equals(office)); Jun 05 23:46:44 position matters sometimes Jun 05 23:47:01 or maybe it doesn't but i haven't tested it enough to find out Jun 05 23:47:04 :) Jun 05 23:47:33 but i work with it Jun 05 23:48:24 write it for Java, groxx Jun 05 23:48:29 you'll get hired by Oracle Jun 05 23:48:32 for some reason I can never decide which I dislike more - `int i = 0; for (a : b) { ...; i++; }` or `for (int i....) { ary[i].whatever }` Jun 05 23:48:35 i just choose, if position doesn't matter i foreach it, if it does i for(position) it Jun 05 23:48:55 Odaym: that's great motivation to _never ever ever_ do so Jun 05 23:50:30 shit i've never done it that deep, does a foreach still just keep the same position as for int = 0? hahah Jun 05 23:50:47 nope, takes more than 5 minutes to find that out, canvs2321 Jun 05 23:50:48 not worth it Jun 05 23:51:01 i've just done foreach if i didn't care and was just searching, and for int = 0 if i cared bout position Jun 05 23:51:08 yeah f that Jun 05 23:51:09 :) Jun 05 23:51:11 yea fuck it Jun 05 23:51:18 works for me Jun 05 23:51:31 it's a google away, we'll do it when it comes Jun 05 23:51:47 seemed silly to add position to the for each as if that'd make the old way any less Jun 05 23:51:53 fuck it Jun 05 23:52:10 adds variables Jun 05 23:52:28 if they wanted me to have it they supply it Jun 05 23:53:03 but seriously foreach works when you don't care bout position Jun 05 23:53:45 it's about beer thirty Jun 05 23:53:56 beer fifty-three, by my clock Jun 05 23:54:15 time it takes me to walk to store and back, it's spot on :) Jun 05 23:54:45 Guys.. how do you handle if you're working on something that is a 45 minute drive away to be able to test Jun 05 23:55:06 like.. wifi propragation signals in a certain building Jun 05 23:55:12 an app that calculates those.. Jun 05 23:55:23 unit tests with mocks. Jun 05 23:55:32 yeah. definitely testing. Jun 05 23:55:56 I have to many conditions etc. and I'm not getting compiler errors.. but that doesn't mean it works in practice :P Jun 05 23:56:18 I could work on it on-site, but not as much as I can off-site.. Jun 05 23:56:47 setting up a VE for it would also just seem like too much work for my very limited time Jun 05 23:57:49 then there's the argument that I'll save time by doing it in the end.. Jun 05 23:57:58 you got your answer ;) Jun 05 23:58:04 unit tests. Jun 05 23:58:04 maybe.. but I'll have to learn to set up the VE first Jun 05 23:58:13 and I've never done those before Jun 05 23:58:20 I did some junit testing in software engineering 101.. Jun 05 23:58:26 that's 3 years ago Jun 05 23:58:43 I guess it's hindsight 420 Jun 05 23:58:51 wait.. isn't it 20/20? Jun 05 23:59:18 whats a good position to modify the view of a dialog from within the dialog class? onAttachedToWindow? Jun 05 23:59:42 Vercinger: Just split up the app so that you can easily unit-test the conditions. Jun 05 23:59:45 It's textbook unit testing. Jun 06 00:00:22 danijoo: modify how? Jun 06 00:00:39 The fancy-shmancy stuff can be tested some other way. Jun 06 00:00:41 groxx, just add a string to a textview depending on some conditions Jun 06 00:01:02 new TextView().setText() :| Jun 06 00:01:04 any time works. Jun 06 00:01:36 TacticalJoke, that brings me back to that earlier question about what you guys do when you want to test some java, but not have to start up eclipse.. Jun 06 00:01:45 its actually more than a textview that i display Jun 06 00:02:20 but I guess it would just be easier to have a "clean" java environment ready on the sideline? Jun 06 00:02:55 onAttachedToWindow seems to work Jun 06 00:03:23 I just wondered why there is nothing like onCreateView for dialogs Jun 06 00:03:34 because dialogs are old and crappy :) Jun 06 00:03:39 :p Jun 06 00:03:52 does that go for alertdialogs too? Jun 06 00:04:09 Because you create your views before you show the dialog Jun 06 00:04:58 Vercinger: I run unit tests on the JVM for anything like that. Jun 06 00:05:04 if I want to start a thread after I've clicked on my alertdialog what's the best practice? I.e. I don't want my code to start running before that.. Jun 06 00:05:41 Whether that involve simple stuff such as `assertThat(DomainType.parse("imgur.com")).isEqualTo(DomainType.IMGUR);` or less simple multi-liners. Jun 06 00:06:09 TacticalJoke, where do I find this JVM? Jun 06 00:06:26 this JVM, lol Jun 06 00:06:28 It's the thing Android Studio runs on: the Java Virtual Machine. Jun 06 00:06:41 I'm too novice Jun 06 00:06:46 Or "a Java virtual machine", I guess. Jun 06 00:29:29 ha, you know you've disabled a bit too many GPS services when play store says you have "no active devices", lol Jun 06 00:32:05 hello Jun 06 00:32:14 i forgot what i was gonna ask lol Jun 06 00:32:32 oh there it is Jun 06 00:32:34 maybe lol knows Jun 06 00:32:48 does the Android Studio run on Mac? Jun 06 00:32:54 yep Jun 06 00:33:00 it'd be nice to have one machine for iOS and Android dev Jun 06 00:33:02 not right now Jun 06 00:33:05 in my case Jun 06 00:33:25 don't listen to me Jun 06 00:35:50 wouldn't a visit to the AS download page provide an answer to this easily? Jun 06 00:36:43 faster to download irc-client, join freenode server and ask :) Jun 06 00:36:50 also, socialization Jun 06 00:40:17 I have multiple activities, on one activity there is a switch, this activity can be independently transitioned to from various other activities with no necessary sequence of transitions both going to and returning from, the other activities rely on the state of that switch, and have lots of loading to do. if they have already loaded data, what's the best way to track the change of the switch without reloading unecess Jun 06 00:40:17 arily? Jun 06 00:44:12 man I really fucked up the way the actionbar is setup throughout the whole app Jun 06 00:44:26 some have toolbar and some actionbar and some flag fullscreen by default....what the fuckkk Jun 06 00:44:34 who the fuck wrote this Jun 06 00:44:39 You did Jun 06 00:44:41 NO! Jun 06 00:44:47 Embrace it Jun 06 00:44:51 * Odaym hugs himself and cries Jun 06 00:44:56 its so shit Jun 06 00:45:53 I wish AS had a "ctrl+i" function Jun 06 00:45:58 like eclipse Jun 06 00:46:11 cause the problem im having now with the drawing is because the pictures span the whole view, I understood that when I discovered getIntrinsicHeight of image, not of bitmap Jun 06 00:54:48 hello, when I get crash reports in the dev console, there are User Messages. Jun 06 00:54:52 Hate when someone asks a question I can answer on /r/androiddev. I'm too lazy to answer there. Jun 06 00:54:57 Those people should just come to IRC. Jun 06 00:55:08 but in my entire time as an android user, a crashed app never asks for a user message. Jun 06 00:55:22 where does this prompt come from? Jun 06 01:00:43 paulo_, in my experience, if you get a crash in an app you downloaded from Google Play, there's a "Report" option on the dialog Jun 06 01:00:51 you can send a user message as part of that Jun 06 01:14:08 Can anyone give me a tip on my fragment? I have an activity with a fragment, the fragment gives you a multiple choice question. I need to make the OnClick return control to Activity to generate the next question. But i dont know how to pass stuff from fragment into an OnClick Jun 06 01:21:46 JesusFreke: don't suppose you know of any smali 'ide' / viewers? jd-gui and android studio are failing to decompile decent chunks of the smali -> dex -> jar output, so I'm thinking I need to find a better way to read the original source :| Jun 06 01:25:04 if all I have is the compiled jar/apk, I just resolve to dealing with smali ;) Jun 06 01:25:12 learn a few things in the process too, so it's useful Jun 06 01:28:46 NateRiver: The "listener" pattern. Jun 06 01:31:33 groxx: well, I have a smali plugin for ide. It's pretty "alpha", but it has the basics (including debugging support!) Jun 06 01:31:46 groxx: https://github.com/JesusFreke/smali/wiki/smalidea Jun 06 01:35:53 lol, "small idea" Jun 06 01:39:12 wakelock: apk2gold :) Jun 06 01:40:31 If I continuously want to update my ui/textViews, what would be the best approach? Jun 06 01:40:39 JesusFreke: renaming might be enough to get me out of obfuscated hell :) thanks Jun 06 01:41:54 Vercinger: Wait, what. Jun 06 01:42:29 void update() { view.setText("yay"); update(); } Jun 06 01:42:45 TacticalJoke, I'm making an app that is to repeatedly (every 6th second) calculate distance to an accespoint.. Jun 06 01:43:02 so the textview that displays the distance needs to be updated every 6th second.. Jun 06 01:43:04 Vercinger look at the data binding library; if you change a property it gets reflected right away https://developer.android.com/tools/data-binding/guide.html Jun 06 01:43:24 oh, on a timer hmm Jun 06 01:43:45 well your model should update itself every 6 seconds, and let data binder reflect that ;) Jun 06 01:44:05 oh boys.. Jun 06 01:44:07 boy* Jun 06 01:44:12 I'll look in to it.. :P Jun 06 01:44:25 TacticalJoke read any good books lately ? Jun 06 01:44:25 last time I used ui thread update stuff thingie magic Jun 06 01:44:26 Is this a case for `ScheduledThreadPoolExecutor`? (I actually don't know.) Jun 06 01:44:33 groxx: it does have that :) Jun 06 01:44:35 g00s: Not in forever. ;| Jun 06 01:44:57 JesusFreke: yep, which I do quite like :) no structure / folding though D': Jun 06 01:45:14 Vercinger: Did you use Handler.postDelayed before? Jun 06 01:45:17 find usages though! :D Jun 06 01:45:25 TacticalJoke, no I used sleep Jun 06 01:45:28 (Which probably wouldn't make sense here.) Jun 06 01:46:04 To be exact: http://pastebin.com/DcT4ntNP Jun 06 01:46:55 but not entirely sure if that is a good practice Jun 06 01:47:07 JesusFreke: how would I rename? doesn't seem to appear under the refactor hotkey / right click Jun 06 01:47:17 Vercinger: That's really bad. Jun 06 01:47:19 In many ways. Jun 06 01:47:23 :D Jun 06 01:47:32 It worked.. :P Jun 06 01:47:44 groxx: is it marked as a source directory? Jun 06 01:47:51 And stuff like `scanResults = new ArrayList(); scanResults = myWifiManager.getScanResults();` isn't sensible. Jun 06 01:48:01 JesusFreke: it's not blue, so no? Jun 06 01:48:15 groxx: mark the dir containing all the smali files as a source dir Jun 06 01:48:20 TacticalJoke, you don't have to look at what it does specificly.. it's an "old" app :) Jun 06 01:50:43 data binding seems like a big mouthful Jun 06 01:51:35 Vercinger well, you can do it the old way ... it gets old quickly :) Jun 06 01:51:42 JesusFreke: :\ having problems doing so. sorry for all the Qs, but D: help? Jun 06 01:51:58 groxx: right click on the dir -> mark as -> source Jun 06 01:52:16 g00s: It's really just a few methods to be run and textviews to be updated every 6th seconds Jun 06 01:52:23 is there a project-view-mode where I can do that? it's not an option Jun 06 01:53:10 cmd-shift-A to the rescue. source'd Jun 06 01:53:25 got it? Jun 06 01:53:45 well, it's blue now :) doesn't seem to have accomplished anything though Jun 06 01:54:04 do you see syntax highlighting in the smali files? Jun 06 01:54:07 er. and now it's not blue. Jun 06 01:54:12 Vercinger: Sorry, didn't mean that rudely. More of a shaking-someone's-shoulders "Dude, we need to escape!" kinda thing. Jun 06 01:54:30 Escape from code that's not as elegant as possible. Jun 06 01:55:23 TacticalJoke, it's okay.. Odaym is worse.. and I can understand when ultra-noobs like me ask too-basic questions ;) Jun 06 01:55:50 JesusFreke: I have highlighting even without it being a source dir. but it's now a soruce dir, no renaming yet :| Jun 06 01:56:03 well everyone does it to me, might as well pay it forward! Jun 06 01:56:52 and when I sync with gradle, I lose the source dir. hm. Jun 06 01:57:15 Odaym, it's also okay then you do it ;) Jun 06 01:57:30 would a timertask be a better practice? Jun 06 01:59:38 JesusFreke: sourceSets { main.java.srcDirs += 'src/main/smali' } keeps it blue, but of course it's not java :) I have an "S" for "smali" as the file icons, but it seems to stop there Jun 06 01:59:43 This may be the best solution: http://developer.android.com/reference/java/util/concurrent/ScheduledThreadPoolExecutor.html Jun 06 01:59:47 Though I'm not actually sure. Jun 06 02:00:51 Vercinger: I hate the noob-bashing thing, personally. Jun 06 02:01:11 JesusFreke: oh wait, maybe I can't rename v0 in `const-string v0, "etc"` ? Jun 06 02:01:32 TacticalJoke: As long as it's not entirely bashing but more like "knob nuts.. take a closer look!" Jun 06 02:01:35 oh, no. you can't rename a register :) Jun 06 02:01:40 JesusFreke: I get rename as an option when I refactor on an invoke-virtual line. Jun 06 02:01:50 yeah, you can rename methods, fields, classes Jun 06 02:02:12 TacticalJoke: with some type of "hint/help" and not just bashing :P Jun 06 02:02:22 registers aren't identifiers. you can't rename them :) Jun 06 02:02:28 The help without the bashing is always better, though. Abusing people isn't good. Jun 06 02:02:31 sadpanda is sad. Jun 06 02:03:07 registers can be re-used for different values/variables Jun 06 02:03:10 oh well. better navigation / searching / etc than with a normal text editor anyway :) Jun 06 02:03:18 ##java is pretty bad for it. Some of the regs in there will bash pretty much anyone who asks a question -- as long as the name is unknown to them. Somebody *in* the tribe would not be attacked (I guess a war would result). Jun 06 02:04:15 yes Jun 06 02:05:01 really terrible people Jun 06 02:05:29 we should raid them Jun 06 02:05:58 Get them while they sleep! Burn them to the ground! Jun 06 02:06:02 JesusFreke: huh, one of the method calls isn't giving me javadoc. others do though. bug / are you interested, or should I shush and read some code? :) Jun 06 02:06:16 Allah Android Jun 06 02:06:19 I mean Akbar Jun 06 02:06:26 They have a bot Jun 06 02:06:43 groxx: sure, a bug would be fine Jun 06 02:06:49 on the github project Jun 06 02:10:22 JesusFreke: not sure how to report this one :\ it's some copy/pasted smali code from a samsung phone, which I probably can't technically put online.. Jun 06 02:11:08 groxx: eh, that's fine. just skip it :) Jun 06 02:12:05 if you have a project you can test - Landroid/database/sqlite/SQLiteQueryBuilder;->buildUnionSubQuery (both 8 and 9 argument methods) both don't work, so far everything else does Jun 06 02:12:19 TacticalJoke: will this example work: http://examples.javacodegeeks.com/android/core/activity/android-timertask-example/ Jun 06 02:12:21 ? Jun 06 02:12:48 the example displays a "toast", not updating any textView, so that's why I'm asking.. Jun 06 02:13:44 JesusFreke: being able to jump around is definitely helpful, thanks :) way nicer reading experience Jun 06 02:14:27 groxx: np :). there's still a lot of work to be done on it. but I figured it would be useful as-is Jun 06 02:14:48 I am looking forward to a book as a help desk reference about Android. Which one would you recommend me guys? Jun 06 02:14:54 yeah. find usages + javadoc + jump to definition >>> `less file.smali` Jun 06 02:15:01 The documentation for Timer says we should prefer ScheduledThreadPoolExecutor: http://developer.android.com/reference/java/util/Timer.html Jun 06 02:15:12 haha, yeah :) Jun 06 02:16:27 TacticalJoke: I don't quite understand what it means by "for new code". Jun 06 02:16:53 JesusFreke: where is the plugin source, btw? /me has curious there too Jun 06 02:16:59 Old code might use it, but new code should avoid it. Jun 06 02:17:08 In other words "Do not want". Jun 06 02:17:13 wjat Jun 06 02:17:26 what's the difference in old and new code? :P Jun 06 02:18:34 Old code seems to work and is annoying to change. New code actually works. Jun 06 02:18:50 I see an example here http://stackoverflow.com/questions/8098806/where-do-i-create-and-use-scheduledthreadpoolexecutor-timertask-or-handler Jun 06 02:19:02 which has implemented updating of textview :) Jun 06 02:19:05 I'll try that Jun 06 02:25:24 What should I do if I don't want the whole thing to start running before I've pressed "okay" on my alertDialog? Jun 06 02:26:48 You should be able to not start things until the OK click. Jun 06 02:27:01 hey all, im testing an app in alpha on google play. i noticed that when i test in app billing it says that it's in test mode. once the app in alpha gets promoted to prod, does it automatically hit the production endpoints and charge users if they purchase? Jun 06 02:27:07 Should I add it in the alertDialog builder? Jun 06 02:27:42 JesusFreke: poke, in case you missed the earlier one. idea plugin source available anywhere? Jun 06 02:29:28 ircfox: it changes too quickly, IMO. download the documentation in the SDK manager, use that :) Jun 06 02:29:39 if you need something offline Jun 06 02:32:07 If I don't want my task to start until I press "ok" in my alertdialog, should I add it in the dialog-"onclick" part or is there a better way? Jun 06 02:32:27 groxx: in the smalidea branch of the smali project Jun 06 02:33:50 I doubt there's a better way. Jun 06 02:34:11 But ideally the OK-click code would be something about as simple as `taskThing.startTask();`. Jun 06 02:34:14 JesusFreke: ah, a branch. I probably shoulda thought to check that. Jun 06 02:34:19 thanks again ;) Jun 06 02:34:23 It should probably be a one-liner. Jun 06 02:34:29 s/;/:/ Jun 06 02:35:07 lol groxx Jun 06 02:35:08 TacticalJoke, yeah I think I'll make the whole scheduleTaskExecutor as method of it's own and run it from the alertDialog-ok-onclick Jun 06 02:35:21 Vercinger: Ideally it'd be in a whole object of its own. Jun 06 02:35:33 That I don't understand Jun 06 02:35:49 Where are you thinking of putting the method Jun 06 02:35:50 ? Jun 06 02:36:01 in the same class? Jun 06 02:36:05 Same as what? Jun 06 02:36:09 activity Jun 06 02:36:14 the running activity Jun 06 02:36:21 But that's just bad design. Jun 06 02:36:21 the activity class Jun 06 02:36:29 What does your background task have to do with that activity? Jun 06 02:36:32 It's completely separate. Jun 06 02:36:43 so I should make a new class? Okay Jun 06 02:36:46 Putting separate things in one class is how you create code that's horrible to read and maintain. Jun 06 02:42:04 I am loading bitmaps with picasso and I want to check if the bitmap should have a dark or light background. question inside: http://pastebin.com/2Xfgwb7w Jun 06 02:43:30 why is a view's onMeasure called so incessantly Jun 06 02:43:57 if you have a listener on it you have to remove the listener once you hit it, and by that time you would've already tallied at least 5 hits Jun 06 02:44:15 Odaym: Depends on what you're doing. Jun 06 02:44:32 yet still you might have removed it before you got the final value that it settled on, how the hell am I supposed to get the final onMeasure that actually settles on the values Jun 06 02:44:45 if inside the onMeasure i set them once and want to retrieve them elswhere.... Jun 06 02:46:58 if you remove the listener at the bottom of the callback I guess you can reliably get the final values Jun 06 02:47:07 cause by that time you're reaching 15 calls Jun 06 02:47:23 Can't you use onSizeChanged or something? Jun 06 02:47:40 surf2b1: huh. no clue. does the Palette support-project work? and/or see how it does it. Jun 06 02:47:54 I want to get the part where there is an actual image, no white space Jun 06 02:48:15 nobody in here is using in app billing? Jun 06 02:48:31 groxx: Haven't used Palette yet. I'll go look at their code right now Jun 06 02:50:07 hey groxx, could you take a look at this traces.txt from an ANR hang I got? It's not related to the one I was having last night, this one just cropped up today. I took a look and saw this "com.google.android.gms.analytics.ExceptionReporter.uncaughtException((null):-1)", but I'm not sure if it's what is causing the hang. Here is my traces.txt: http://pastebin.com/gXzL5GwY Jun 06 02:53:06 Odaym: My ImageViews call onMeasure only once. Jun 06 02:53:41 I have my own imageView class specifically for setting sizes that I settle on, from onMeasure Jun 06 02:54:04 i dont fucking need a new class for that... Jun 06 02:54:17 I can still call intrinsicheight on the imageview.. Jun 06 02:54:33 will I end up with zero if too early? and have to do it all again? Jun 06 02:56:43 let's call it inside picasso success callback Jun 06 02:56:45 and end up with zero Jun 06 02:57:25 t0astt: whats your package? Jun 06 02:57:45 Napalm: com.mikerinehart.geekrepublic Jun 06 02:58:24 i assume thats your "redacted" bit? Jun 06 02:58:33 why JSONException is different between sun java and android? http://docs.oracle.com/javaee/7/api/javax/json/JsonException.html , http://developer.android.com/reference/org/json/JSONException.html Jun 06 02:58:33 first one throw checked exception, second one throw unchecked exception why?? Jun 06 02:58:48 see, it ends up with the first values that I saw the onMeasure produce, there are still other values that come out Jun 06 02:59:02 t0astt: and yea, it looks like analytics was waiting on a lock Jun 06 02:59:50 Napalm: When you say waiting on a lock, do you mean it was waiting on something else to finish that never finished? **** ENDING LOGGING AT Sat Jun 06 02:59:58 2015