**** BEGIN LOGGING AT Tue Jun 23 02:59:58 2015 Jun 23 03:00:20 there's no jar file? Jun 23 03:01:57 I don't think my project has maven Jun 23 03:02:50 well that is just stupid, you can't test an IAP if you dont have the actual balance to buy it even though it doesnt charge you Jun 23 03:03:33 Sawbones: you can add maven lib in AS Jun 23 03:06:10 OkHttp is a good HTTP library. I haven't encountered HttpRequest before. Just looks like an HttpURLConnection wrapper. Jun 23 03:06:16 Sawbones: Don't bother with maven, use gradle Jun 23 03:06:32 Is there a reason you're using this instead of OkHttp? Jun 23 03:08:42 you need a lib for a http request Jun 23 03:08:43 ? Jun 23 03:09:17 pagefault: You realise how insanely complex HTTP is, right? Jun 23 03:09:41 depends what you are doing with it Jun 23 03:09:46 No it doesn't Jun 23 03:10:28 Even if you're sending a straight GET, you really want a robust HTTP stack underneath, one that knows how to correctly handle redirects, ssl handshakes, proxies, headers or mime types, etc... Jun 23 03:10:37 why don't you use HttpClient Jun 23 03:10:53 basic HTTP requests/servers are pretty simple (see https://github.com/ethanmad/HTTPServer/tree/master/src). but anything more than this will get really complicated very quickly Jun 23 03:10:56 Because it's ancient and not updated. Jun 23 03:12:01 it works Jun 23 03:13:17 horse and carriage 'worked' Jun 23 03:13:49 you guys like to complain a lot Jun 23 03:14:09 Cave men were perfectly happy before discovering fire Jun 23 03:14:15 why would you bring personal attacks into a valid discussion on http clients Jun 23 03:14:18 thats just childish Jun 23 03:14:26 well, except for the occasional evisceration of loved ones by saber tooth tigers Jun 23 03:14:32 personal attack? lol Jun 23 03:15:52 On Android, some of the built-in stuff is not good. The Apache HTTP stuff is a prime example. Jun 23 03:15:58 If somebody doesn't complain about that, they don't know much about it. Jun 23 03:16:11 It's even deprecated now. Jun 23 03:16:56 State of the art of Android programming moves faster than Android Jun 23 03:17:26 On 4.4+, HttpURLConnection uses OkHttp under the hood. But it's behind a less-good API, and (AFAIK) it doesn't support HTTP/2. Jun 23 03:19:04 I agree HTTP isn't that simple and I would much prefer a library to handle the heavy lifting Jun 23 03:19:12 So I can focus on interacting with the actual API Jun 23 03:19:24 idk how to add this to build.gradle Jun 23 03:19:52 compile 'com.squareup.okhttp:okhttp:2.4.0' Jun 23 03:20:01 / NOTE: Do not place your application dependencies here; they belong Jun 23 03:20:02 // in the individual module build.gradle files Jun 23 03:20:05 The commment of build.gradle says that Jun 23 03:20:10 wrong build.gradle Jun 23 03:20:12 there are 2 Jun 23 03:20:23 use app/build.gradle Jun 23 03:20:38 right idea otherwise Jun 23 03:21:22 ok I added it Jun 23 03:21:26 looks like it compiled ok Jun 23 03:21:45 It just knows where to get the OKHttp lib? Jun 23 03:21:58 Somehow, yes Jun 23 03:22:08 I believe there's a centralized repository Jun 23 03:23:23 hmm can't find it Jun 23 03:23:25 most likely on maven Jun 23 03:24:29 http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.squareup.okhttp%22 Jun 23 03:25:05 desmin88 is correct Jun 23 03:27:16 Do I have to run something after adding it to gradle? Jun 23 03:28:23 It should be a part of your project. When you run the app, it should just work. Jun 23 03:29:08 Square says you also need okio, but if gradle is worth it Jun 23 03:29:21 I think gradle will automatically get it for you Jun 23 03:29:33 it will Jun 23 03:29:52 He knows better than anyone Jun 23 03:30:49 Cool it works Jun 23 03:30:57 Thanks guys, I was getting red in the face Jun 23 03:33:24 JakeWharton: Any chance Square Wallet will come back in some shape or another? There was a case study on it in a book I read and it seemed so brilliant. Jun 23 03:33:45 even if i knew that i couldn't tell you Jun 23 03:34:01 I figured as much Jun 23 03:35:35 What is your goto json parsing library? Jun 23 03:35:39 gson Jun 23 03:40:07 JakeWharton one more question: is there a reason you don't delete feature branches in git after they've been merged into master? I personally delete them (in my much, much smaller projects)--is that a bad thing? Jun 23 03:40:20 we do Jun 23 03:42:20 Oh, I just saw a bunch of old branches in OkHttp. I guess they haven't been merged yet Jun 23 03:43:23 jesse doesn't delete when he merges Jun 23 03:43:30 we both have bash aliases which delete all merged remote branches Jun 23 03:44:00 The okhttp library's snippet gives me syntax errors Jun 23 03:44:35 I see. That's pretty cool. Jun 23 03:45:11 nvm was reading it wrong Jun 23 03:48:49 ugh I need getting android.os.NetworkOnMainThreadException Jun 23 03:49:18 Sawbones: I wonder why. :D Jun 23 03:49:29 I'm reading into it Jun 23 03:49:50 I've never had this issue in the land of async javascript so it's new hurdles Jun 23 03:50:14 You can solve it with Call.enqueue rather than Call.execute. Jun 23 03:50:33 But you might have to come back to the main thread (perhaps via Handler.post). Jun 23 03:58:22 hey guys, googled and can't find a simple answer. I have written a native lib and occasionally it crashes, I don't want to catch the crashes in native code, actually I just want not crash the java side, so that I can enter a diagnostic mode and run different code (as catching the native crashes wouldn't actually be that helpful to me). can I stick the calls to native code in a try catch block? would that catch everything? or is there a better way? Jun 23 03:59:00 for asynctask can you set callbacks? Jun 23 03:59:51 With AsyncTask you'd have to use Call.execute. Jun 23 04:08:07 can it be done? Jun 23 04:12:11 Hi, I am working on an application that will periodically take a picture in a background thread every ~5 seconds. Is it better (battery wise) to keep the camera on or release it between captures? Jun 23 04:14:05 I think i'm done with java android development this language is pretty annoying to work with Jun 23 04:14:18 Sawbones: Use Kotlin! Jun 23 04:14:33 or Go Jun 23 04:14:35 or Dart Jun 23 04:14:38 No, not Go. Jun 23 04:14:41 jk Jun 23 04:14:52 Don't even kid about that Jun 23 04:15:03 Go's not a bad language Jun 23 04:15:12 Yes it is Jun 23 04:15:23 obj-c, c#... Jun 23 04:15:28 swift! Jun 23 04:15:41 I'd like to stick with android Jun 23 04:15:44 https://github.com/golang/mobile if you want to use Go [note: I have not tried it] Jun 23 04:16:03 Don't bother, you won't go very far with go on Android Jun 23 04:16:03 I'll see what other alternatives are out there, I just can't do Java...been spending way too long just to make http requests Jun 23 04:16:17 Sawbones: Java's decent in a lot of ways. You'll get used to the annoying parts. Jun 23 04:16:18 Sawbones: That's not a Java problem, it's a "you not picking the right library" problem Jun 23 04:16:28 And you could perhaps switch to Kotlin at any time. Jun 23 04:16:28 I'm using okhttp Jun 23 04:16:30 and that BS Jun 23 04:16:32 Sawbones: Heard of retrofit? Jun 23 04:16:54 Java is probably the best way to develop for Android regardless of personal preference because it's by far the best supported. Jun 23 04:16:56 Sawbones, java is terrible ;) Jun 23 04:17:11 ethanmad, true Jun 23 04:18:11 Sawbones: JakeWharton, a developer of okhttp is in this room. You could ask him. Jun 23 04:18:16 Sawbones: HTTP requests and multithreading are very complicated. Jun 23 04:18:18 * JakeWharton runs Jun 23 04:18:20 Java is verbose but I feel like a lot of people confuse language with the framework Jun 23 04:18:23 Why would you expect stuff to happen instantly? Jun 23 04:18:24 The android related stuff is fine, but when I try to make http requests I hate all of that effort I have to put in and it still doesnt work Jun 23 04:18:41 The android-related stuff can be pretty awful, actually. Jun 23 04:19:08 The language just feels like a burden Jun 23 04:19:27 Doesn't even new language feel that way? Jun 23 04:19:27 after a week in an IDE you don't even notice it Jun 23 04:19:37 I've never switched language and thought "Wow, this language doesn't feel like a burden at all". Jun 23 04:19:52 I've used java before Jun 23 04:20:00 you only type like 30-40% of the characters that end up in the source file Jun 23 04:20:03 maybe less Jun 23 04:20:30 if you didn't have the IDE, those 30-40% are basically just scala which is like gzipped java—only for computers to read Jun 23 04:20:31 Imagine if we used something truly horrible such as C++. Jun 23 04:20:35 Imagine the complaints. My goodness. Jun 23 04:20:42 so can I stop a native lib from crashing java? Jun 23 04:21:25 Sawbones: What in particular feels like a burden? Jun 23 04:21:40 the whole process of making a GET request Jun 23 04:22:19 making a class to then extend AsyncTask with some weird after it, then adding the method and implementing a callback interface Jun 23 04:22:44 Maybe I'm just spoiled with my Javascript Jun 23 04:22:44 AsyncTask is one of those awful things about Android Jun 23 04:22:47 highly discouraged Jun 23 04:22:47 You shouldn't be using AsyncTask with Call.enqueue. That's doing it wrong. Jun 23 04:23:02 I need it for networking Jun 23 04:23:09 Yeah, I'd never use AsyncTask, I think. Jun 23 04:23:12 no you don't Jun 23 04:23:12 Certainly not for networking. Jun 23 04:23:21 what is a solution Jun 23 04:23:33 TacticalJoke: I use it on occasion. One-off reads or writes to disk or maybe a quick bitmap manipulation Jun 23 04:23:37 Sawbones: You are spoiled with your Javascript but literally, in the sense that it rotted your brain and gave it all kinds of terrible habits Jun 23 04:23:57 AsyncTask is not part of the Java language Jun 23 04:24:14 CedricBeust: That can be said about ever language Jun 23 04:24:35 yeah but JS is up there as one of the worst Jun 23 04:24:37 Isn't JavaScript a toy language? I've not used it much, but I got the impression that it was very limited. Jun 23 04:24:40 PHP beats it Jun 23 04:24:42 TacticalJoke: no Jun 23 04:24:53 ES6 is amazeballs too Jun 23 04:25:08 TacticalJoke: Javascript makes up a ton of the industry these days Jun 23 04:25:13 Sawbones: Not really. First of all, realize that dynamically typed languages are in all ways inferior to statically typed languages. We're talking minor leagues vs/ major leagues here. Jun 23 04:25:30 Now in the statically typed language area, there's a spectrum, and Java scores probably in the middle there Jun 23 04:25:30 Citation needed Jun 23 04:25:55 Sawbones: decades of CS findings, there's your citation Jun 23 04:26:32 Statically typed languages give you 1) performance 2) automatic refactoring 3) catching errors early 4) fantastic tooling that's simply impossible to achieve with dynamically typed languages. Just off the top of my head Jun 23 04:27:01 CedricBeust: i got so frustrated with ruby the other day when some variable kept changing types to something that made no sense. i then realized why statically typed languages exist Jun 23 04:27:09 ethanmad: right on Jun 23 04:27:14 Yeah, catching a whole class of errors at compile time is a huge win. Jun 23 04:27:35 Doesn't mean your code will work Jun 23 04:27:44 Of course not Jun 23 04:27:47 It's a spectrum Jun 23 04:27:48 too bad NPE kills like 50% of static typing safety :) Jun 23 04:27:55 There's tons of amazing tools out there for JS Jun 23 04:27:56 Just increases the odds of your code not crashing Jun 23 04:28:04 Being on a plane without internet access made it an even bigger deal. And yup icedp Jun 23 04:28:12 Sawbones: They are fundamentally crippled by the fact there is no type info Jun 23 04:28:17 I don't think it's 50% (although I agree that nullability, as implemented in a language such as Java, is a problem). Jun 23 04:28:36 They do have a type though Jun 23 04:28:48 That can't be inferred Jun 23 04:29:07 Even the simplest renaming can't be performed safely in dynamically typed languages Jun 23 04:29:10 (statically) Jun 23 04:29:36 it's why things like Typescript are coming about Jun 23 04:29:50 Kotlin appears to solve a lot of nullability issues. (I haven't used it seriously yet, though, so I can't say much about that.) Jun 23 04:29:58 people like JS for its flexibility but the presence of statically known and verifiable types can't be beat Jun 23 04:29:58 Food for thought: http://beust.com/weblog/2006/10/01/dynamic-language-refactoring-ide-pick-one/ Jun 23 04:30:34 All these issues you are mentioning I haven't had an issue with, I'm aware of types and how memory works, but I'm not going to waste an hour setting it up so Java is ok with making the http request Jun 23 04:30:58 It amazes me that someone could think that making an app that sends an HTTP request should be a five-minute job. Jun 23 04:31:17 because it does Jun 23 04:31:44 you'll forgive us for not trusting you given that you've barely had five minutes of experience Jun 23 04:31:45 Maybe I'm just remembering how things were in the old days, before we had decent HTTP libraries and stuff. Jun 23 04:31:46 Sawbones: You're being penny wise and pound foolish. Look at it as an investment with an upfront cost that will pay tenfold down the line Jun 23 04:32:33 Sawbones: The fact you are dismissing Java because you don't like how it makes you write your HTTP code makes me think you really haven't given much thought to your position nor your process to write good code Jun 23 04:32:57 Don't get me wrong, Java has a lot of warts I curse at every day, I just don't think you have the qualifications to make that judgment Jun 23 04:33:07 CedricBeust: He's gone Jun 23 04:33:14 Ah well Jun 23 04:33:18 You tried Jun 23 04:33:28 ... and failed Jun 23 04:33:41 we should've pointed him at aquery Jun 23 04:33:41 A for effort Jun 23 04:33:42 Maybe the seed has been planted. :D Jun 23 04:33:47 remember that shit? Jun 23 04:34:05 https://code.google.com/p/android-query/ Jun 23 04:34:15 here's JS for Android. GL;HF Jun 23 04:34:39 He may like it, actually Jun 23 04:35:03 I'm not going to badmouth AQuery, it was an ok thing at the time, we've learned to do things better now Jun 23 04:35:03 At least it's not Java Jun 23 04:35:22 (is what I imagine his response would be) Jun 23 04:36:41 aquery looks like something contractors use because they can just dump a product and cash out Jun 23 04:36:57 I'm amazed at some people's expectations today. :D People not long ago were spending months learning assembler just for fun (and education). Making an HTTP request with OkHttp is pure simplicity and joy by comparison. Jun 23 04:37:05 JakeWharton: I'll take "What is Thoughtworks?" for $250 Jun 23 04:37:08 It's like programming on easy mode. Jun 23 04:37:26 Does anyone else use the IdeaVim plugin? Is there any way to make it less annoying? Jun 23 04:37:35 ethanmad: Yes: don't use it Jun 23 04:37:38 Learn the IDE Jun 23 04:37:53 Vi-like movement is so handy though Jun 23 04:38:05 That's what I really care for, not the more advanced features Jun 23 04:38:05 ethanmad: Not really. You're editing text, not code. vi is optimized for text editing Jun 23 04:38:09 I dunno; maybe there were people back then wanting jQuery-like abstractions too. Maybe they were just less visible. Jun 23 04:38:41 CedricBeust: Is there a better way to move around without using the mouse? Jun 23 04:39:06 ethanmad: Again, learn the IDE. Moving across a Java file or files is not adequately performed with text moving functions Jun 23 04:39:18 e.g. ctrl-w Jun 23 04:39:29 Yeah, I must say that IntelliJ is good at making me never want to use vim again. Jun 23 04:39:35 Though I did come to that decision years ago. :D Jun 23 04:39:38 cmd+f12, cmd+left, cmd+backspace, cmd+B, etc. Jun 23 04:39:45 hell, cmd+f! Jun 23 04:39:49 The only overlap between text editing and code editing is plain text searching. This is useful in both cases Jun 23 04:39:54 I wonder whether there is any time to save with vim compared to just using Android Studio or something. Jun 23 04:39:54 Really? I'll look into these shortcuts Jun 23 04:40:08 So much of my "typing" is just code completion, for example. Jun 23 04:40:31 There's still one thing where IntelliJ is worse than Eclipse: moving word by word should stop at camelcase limits Jun 23 04:40:36 Eclipse gets it right, IntelliJ doesn't Jun 23 04:40:46 Yeah, that annoys me sometimes. Jun 23 04:40:53 you can move word by word in intellij?? Jun 23 04:41:14 As far as I know, you can't in IntelliJ. Jun 23 04:41:36 Ctrl arrows Jun 23 04:41:39 Oh Jun 23 04:41:40 "kinda" do that Jun 23 04:42:02 Wait, we can do it! Jun 23 04:42:06 yeah. that's what i wanted to get away from Jun 23 04:42:18 Settings > Editor > General > Smart Keys > Use "CamelHumps" words. Jun 23 04:42:20 I think that solves it. Jun 23 04:42:35 TacticalJoke: Ah good find, need to try that Jun 23 04:43:46 webassembly looks very interesting; seems inevitable it will wind up in android sometime Jun 23 04:44:17 to me, IdeaVim seems superior to ctrl/cmd shortcuts Jun 23 04:44:33 Anyone want to take a look at my playstore description? http://pastebin.com/CHwUdAe7 looking for suggestions on what i could add to or change to spruce it up before i release Jun 23 04:44:35 ethanmad: Reprogram your brain Jun 23 04:44:52 Ctrl-shift-a is awesome to learn shortcuts Jun 23 04:45:20 Pretty cool Jun 23 04:46:17 desmin88: This is missing a verb: "Watch videos, read thought provoking blog posts, and news articles" Jun 23 04:46:28 i used to think android would eventually go the way of pnacl + shims into the framework, but doesn't seem nacl/pnacl really took off Jun 23 04:46:29 desmin88: Reads well to me. TacticalJoke is correct Jun 23 04:46:43 TacticalJoke: Or it has an extra comma. Thank you! Jun 23 04:47:00 Also, "thought provoking" should probably be hyphenated as it's a compound adjective coming before a noun. Jun 23 04:47:20 Without the comma, you'd still need the extra verb. Or an "and" before the first "read". :D Jun 23 04:47:23 I think it should then read "Watch videos and read thought provoking content and news articles." Jun 23 04:47:40 But the better solution is adding a verb Jun 23 04:48:00 Yeah. Jun 23 04:48:06 Or splitting it into separate sentences Jun 23 04:48:12 Threes work well. Do X, do Y, and do Z. Jun 23 04:48:18 It pleases our brains, for some reason. Jun 23 04:48:38 True Jun 23 04:49:39 vim bindings are very handy. you still need to edit some text even if you use IDE features to navigate between files and methods Jun 23 04:49:52 perhaps its because our upper limit on recognizing counts of things is about 4 before we have to actually take time to count them out Jun 23 04:49:59 so small sets are pleasing Jun 23 04:50:16 Alternatively, "Watch videos and read thought provoking content or news articles," works. Jun 23 04:50:51 I went with "Watch videos, read thought provoking blog posts, and stay updated with news articles" Jun 23 04:50:54 I guess you could say "Watch videos, read thought-provoking content, and discover news articles". Jun 23 04:51:28 For me, Vim has always been much better for writing/editing code than it is for English. Jun 23 04:51:36 it's a false dilemma to say: either use vim shortcuts, or learn IDE. everybody uses ctrl+arrows, home etc or analogues Jun 23 04:52:55 The nice thing about vim shortcuts is that they are fairly standard and don't require a full keyboard; they can be used on a 60%, small laptop, etc. Jun 23 04:53:48 So I don't have to adjust when switching from desktop to laptop. Jun 23 04:55:11 desmin88: It's well written. Concise and straight to the point. Jun 23 04:55:16 Thank you Jun 23 04:56:13 motherfuckingappdescription.com Jun 23 04:56:41 (Not a real site. :D) Jun 23 04:57:43 http://txti.es/ph38l here it is Jun 23 05:00:31 Hello, my app only requires the ACCESS_FINE_LOCATION permission in the manifest file, for some reason writing to SDCard is also added, not into the manifest file but to the app required permission (seen on install time) is that normal? Jun 23 05:01:38 Nope Jun 23 05:02:00 I'm assuming you're talking about WRITE_EXTERNAL_STORAGE, which is a big deal for users and going to cost you installs Jun 23 05:02:32 Double check the permissions you're requesting? Jun 23 05:02:53 Im definitly not asking for that permission, how is that possible? Jun 23 05:03:12 I don't know what process you are using to build that adds permissions behind your back Jun 23 05:04:40 maybe if you have 1+ modules and 1+ manifests viran Jun 23 05:04:51 normal android studio build, with appcompat and play-services-location Jun 23 05:05:42 here's the manifest: http://pastebin.com/Bz0b4BQL Jun 23 05:06:18 Isn't that build.gradle? Jun 23 05:06:47 sorry :) Jun 23 05:07:27 manifest: http://pastebin.com/98Q0S6t3 Jun 23 05:07:37 Oh man, I love when I expect a change to cause a crash and it doesn't. Jun 23 05:08:42 viran are you using any libraries? maybe one has that permission in their manifest Jun 23 05:08:52 viran: Comparing against my manifest, it looks good. I only see the one permission, so it must be something else. Jun 23 05:09:06 g00s: What do you think about this WebAssembly thing? Jun 23 05:09:07 g00s: could this be a virus? Jun 23 05:09:08 should be playservices viran Jun 23 05:09:31 g00s: no libs, basicly a skeleton project Jun 23 05:09:58 compile 'com.google.android.gms:play-services-location:7.5.0' Jun 23 05:10:08 Anyone know if this will cause a crash on API 15 devices? "Attribute parentActivityName is only used in API level 16 and higher" Jun 23 05:10:10 looks like a lib) Jun 23 05:11:03 icedp: can I do something about that? and still keep play services? Jun 23 05:11:05 ethanmad: I think it's just ignored, but I can't remember for sure. Jun 23 05:11:41 TacticalJoke: Do you think the behavior is as expected? Jun 23 05:11:47 Oh, no. Jun 23 05:11:49 It won't work. Jun 23 05:11:54 The support one does work, though. Jun 23 05:11:56 ethanmad: it won't. there is also meta-data something equavalent Jun 23 05:12:18 Ok I'll check it out Jun 23 05:12:31 Those 4 users on pre-4.1 will thank me for it Jun 23 05:16:26 TacticalJoke i'm not familiar with the JS ecosystem; still trying to figure out the relationship between JS and wasm. wasm operated on native machine types, doesn't have an object model, etc Jun 23 05:16:36 viran: there maybe a way to remove it but I don't know if it will break the lib Jun 23 05:16:39 Yeah, I'm trying to figure that out too. Jun 23 05:16:53 does this look right? Jun 23 05:17:28 android:name="android.support.PARENT_ACTIVITY" Jun 23 05:17:45 nvm the formatting wont work here Jun 23 05:18:02 Hmm, I don't think both are needed. (Not sure why the guide suggests adding both.) Jun 23 05:18:19 Just use the meta-data one? Jun 23 05:19:48 TacticalJoke i'm reading https://medium.com/javascript-scene/what-is-webassembly-the-dawn-of-a-new-era-61256ec5a8f6 Jun 23 05:19:57 so it seems like a new language Jun 23 05:20:25 ethanmad: I think so, but I'm not sure (going on the memory of a five-minute trial). Jun 23 05:20:30 g00s: Thanks. Jun 23 05:20:54 he mentions Borland Turbo C++ :D Jun 23 05:21:05 TacticalJoke: Seems to work with just the meta-data. Thanks for the tip Jun 23 05:21:06 :D Jun 23 05:22:04 I wonder if users have got stuck in activities because of that Jun 23 05:25:51 It's definitly the new version of play services, could this be a bug by google? Jun 23 05:26:09 Try an older version to test? Jun 23 05:26:51 TacticalJoke i would think that scala.js and kotlin's js target -> wasm Jun 23 05:28:37 man scala.js was in development for 2 years, i wonder what those guys are thinking now Jun 23 05:34:27 this is good http://a16z.com/2015/06/19/mobile-it-changes-everything/ Jun 23 05:34:59 so yeah, can you stop a native lib from crashing in java? don't need to catch the exception, just need to know it crashed Jun 23 05:36:52 no Jun 23 05:37:22 native lib crashing is going to fuck your process over Jun 23 05:38:45 CedricBeust, manifest merging adds permissions behind your bacj Jun 23 05:39:31 yeah but -- he wasn't using any libraries. so even still ? Jun 23 05:41:51 he was Jun 23 05:41:53 dunno Jun 23 05:42:19 if a permission is getting added, it'd from a library Jun 23 05:42:24 yup Jun 23 05:43:10 viran: g00s: no libs, basicly a skeleton project Jun 23 05:43:11 Hi, if I've aligned an object to the top via RelativeLayout.ALIGN_PARENT_TOP, how do I then cancel the alignment? Jun 23 05:43:40 removeRule Jun 23 05:43:59 pfn: graciac Jun 23 05:44:00 gracias Jun 23 06:00:02 Whats the preferred method of passing large objects across activities or to fragments? Bundle/parcelable just aint cuttin it Jun 23 06:01:38 a singleton Jun 23 06:01:53 g00s: thanks for the a16z link, that was good listen Jun 23 06:04:28 pfn: thanks, i was thinking that as well Jun 23 06:06:10 Does anyone know if you can transfer admob payment/tax/legal data across to wallet merchant? Jun 23 06:16:46 any recommendation on which to use ExpatPullParser or KXmlParser? (https://developer.android.com/training/basics/network-ops/xml.html) Jun 23 06:17:46 Do you have to use XML? Jun 23 06:19:42 TacticalJoke, yes, xml is used to store some read only data (in assets) Jun 23 06:20:14 TacticalJoke, why not? json? Jun 23 06:23:02 kuldeepdhaka: JSON is usually easier to handle Jun 23 06:23:30 also, this is the best place I found to read about XML parsing in Android Jun 23 06:23:30 http://www.ibm.com/developerworks/library/x-android/ Jun 23 06:24:42 thepoosh, the xml data was originally designed for a qt program. Jun 23 06:25:21 so, keeping XML has some benefits (as well as xml validation) Jun 23 06:27:21 you can easily use xml + state machine like http://vanillajava.blogspot.com/2011/06/java-secret-using-enum-as-state-machine.html Jun 23 06:27:26 kuldeepdhaka: XML has many advantages Jun 23 06:27:31 g00s: Jun 23 06:27:37 hey thepoosh Jun 23 06:28:18 you can use enums to model hierarchical state machines which mirror the grammar Jun 23 06:29:59 hey how can I do version control in Android Studio? Jun 23 06:30:29 * g00s has no idea; i use git from command line and only rely on AS for nice colors Jun 23 06:30:39 ^ git from commandline Jun 23 06:30:48 Android Studio provides a terminal Jun 23 06:30:50 i will do recursive decent parser style parsing (maybe they call it pull parser) (that i did in qt code), recommendation which to use ExpatPullParser or KXmlParser Jun 23 06:31:02 (for android) Jun 23 06:31:16 Version control is best dealt with from the command line Jun 23 06:31:29 oow nice Jun 23 06:31:40 ashwink005: yes you can! Jun 23 06:31:54 but I agree with ethanmad and g00s Jun 23 06:32:06 However, if you really want, AS has Git & GitHub built in. Search in settings Jun 23 06:32:44 so then I'll be able to make modifications and roll back if they blow up right? Jun 23 06:32:53 sorry me a git noob Jun 23 06:33:11 * kuldeepdhaka find people think git == github Jun 23 06:33:28 (btw, not related to this conversation) Jun 23 06:33:35 I'm not saying git == github Jun 23 06:33:44 ashwink005: yes, what OS are you running? Jun 23 06:33:45 ashwink005: yes Jun 23 06:33:58 you can also use sourceTree or turtoisGit Jun 23 06:34:03 please say linux or osx Jun 23 06:34:05 whooaa!! really! thats so cool! I'm running windows 7 Jun 23 06:34:14 soorry.. :( Jun 23 06:34:15 i am of no use Jun 23 06:34:17 ashwink005: try turtoisGit Jun 23 06:34:17 ethanmad, yea, that why i added a comment right after it. Jun 23 06:34:34 or cygwin Jun 23 06:34:38 ethanmad: still thanks alot man :) Jun 23 06:34:45 thepoosh: what are those? Jun 23 06:34:46 but kuldeepdhaka that is an important misconception Jun 23 06:34:56 cygwin and turtoisGit Jun 23 06:35:10 cygwin is a terminal for windows that has git incorporated in it Jun 23 06:35:12 ashwink005: cygwin is a good terminal on windows Jun 23 06:35:20 im guessing turtoisgit is a gui for git Jun 23 06:35:25 turtoisGit is a plugin for git via file system Jun 23 06:35:32 oh that's pretty cool Jun 23 06:35:32 Command-line version control fo lyfe. Jun 23 06:35:35 left click on a folder for actions and crap Jun 23 06:35:51 ashwink005: https://code.google.com/p/tortoisegit/ Jun 23 06:36:20 make sure to set up ssh login for git. makes pushing less of a hassle in the future Jun 23 06:36:45 should I use this? coz ppl are suggesting command line control.. and tortoisegit seems to be a UI Jun 23 06:37:02 use command line (cygwin) Jun 23 06:37:15 you'll learn it the right way and then be able to use git on any machine Jun 23 06:37:29 +1 Jun 23 06:37:43 and it'll get to the point (eventually) where command line is faster than gui could possibly be Jun 23 06:37:46 it's easier to understand the process from commandline Jun 23 06:37:59 * thepoosh agrees Jun 23 06:38:21 and if you mess something up, fixing it will be easier because solutions & help are generally only available for command line Jun 23 06:39:28 okok Jun 23 06:39:34 So I should get cygwin Jun 23 06:39:40 yeah Jun 23 06:39:49 command line feels much cooler anyways Jun 23 06:39:55 exactly Jun 23 06:39:55 thanks a lot guys Jun 23 06:40:11 you can tell friends you're a l33t h4xor and they'll believe it Jun 23 06:40:13 you can try tig Jun 23 06:40:54 lol :D Jun 23 06:40:56 i just wouldn't advise using the command line on an airplane next to technologically incompetent people Jun 23 06:43:36 I'm having a bit of confusion with CoordinatorLayout Jun 23 06:44:46 I have a Toolbar, a RecyclerView, and a FloatingActionButton all inside a CoordinatorLayout. The Toolbar and FAB are fine, but the RecyclerView is going on top of the Toolbar and I have no idea why Jun 23 06:45:43 hehe, i just watched Trump's speach - it was actually kind of entertaining Jun 23 06:45:44 I haven't tried a CoordinatorLayout before, but are you setting the start of the recyclerview correctly? Jun 23 06:46:11 I didn't think Coordinator had start Jun 23 06:46:39 oh, my bad. that's what happens when one speaks about things they don't know. Jun 23 06:47:40 My impression is that CoordinatorLayout kinda figures out what's what and places it all for you Jun 23 06:48:20 You don't need something like ` android:layout_marginTop="?attr/actionBarSize">` in the layout? Jun 23 06:49:04 Eh, that'd probably work, but from the examples and stuff I'm reading it doesn't look like it should be necessary Jun 23 06:49:43 Are they defining the toolbar in the layout, too? Jun 23 06:49:51 Yes Jun 23 06:50:13 well, that's all i've got, then. Jun 23 06:50:49 I thought it may be possible that they're using a theme with a toolbar rather than one without, which would eliminate the need for that line I posted. Jun 23 07:06:42 hi,how can i create a view that will be gone when user swipes right or left like gmail app ? Jun 23 07:07:02 i've found a library but i couldnt find it right now :D Jun 23 07:10:23 sci-fic: setVisibility(View.GONE) Jun 23 07:11:03 how the hell do I add new packages to a package in Android Studio? Jun 23 07:11:30 I made a package "oldAdapters" in "Adapters" package and now it shows as Adapters.oldAdapters Jun 23 07:11:58 I am not able to make a package "newAdapters" in "Adapters"... Jun 23 07:12:22 hey anyone with Android TV app dev experience? Jun 23 07:13:20 I'd like to implement a lazy loading, when the user gets to the last movie I'd like to make an API call to get more movies Jun 23 07:14:24 but I can't implement the correct method for which item is currently selected / highlighted Jun 23 07:15:02 Anyone please!!! Its very irritating! I can't even add a folder! Jun 23 07:17:33 ashwink005: In the Packages view of the file explorer, you can right click and select New -> Package Jun 23 07:18:04 ethanmad: then it adds the new package inside Adapters.oldAdapters Jun 23 07:19:21 I want the new package "newAdapters" inside Adapters. Jun 23 07:19:40 any idea how do I do that? Jun 23 07:20:13 I don't, sorry. Jun 23 07:20:40 ethanmad: hey man can you help me out with my Android TV problem? Jun 23 07:20:45 man.. android studio is so stupid. Jun 23 07:21:23 lazz: I wish, but I'm a noob. You're probably way beyond me. Jun 23 07:21:40 ethanmad: oh man, thanks anyways :D Jun 23 07:22:42 lazz: you were asking the same question 7 or so hours ago, no? Jun 23 07:23:40 ethanmad: yeah, still can't find a way :D Jun 23 07:24:14 hello Jun 23 07:24:15 lazz: Maybe try again tomorrow during a peak time. If anybody could help it would be somebody around that time Jun 23 07:24:24 can someone help me with android functionality_ Jun 23 07:24:34 maybe Jun 23 07:24:40 ethanmad thanks Jun 23 07:24:54 the question is, is there a possiblity to set users network or APN? Jun 23 07:25:45 Char: I don't have experience with that, but I would guess not without root access. Jun 23 07:26:14 hmm Jun 23 07:26:48 Probably the best you could do without root is make a button that links to the APN screen with text users can copy+paste Jun 23 07:27:29 But I'm not sure, and that's a really bad solution for making new APNs becuase there are so many text fields Jun 23 07:29:10 Char: you may want to look at this https://play.google.com/store/apps/details?id=com.mwiacek.apn&hl=en Jun 23 07:30:08 http://developer.android.com/reference/android/Manifest.permission.html#WRITE_APN_SETTINGS Char Jun 23 07:32:58 If Char comes back, someone should advise him to decompile the apk of https://play.google.com/store/apps/details?id=com.mwiacek.apn&hl=en Jun 23 07:38:16 What are the best options if my apk has more than 65k classes? Use multidex? Jun 23 07:44:32 barq: First figure out why, if you can cut down on methods. then i personally would use proguard to slim the apk down, then use multidex as a last resort Jun 23 07:47:42 desmin88: How well does proguard work with with reflection? Jun 23 07:47:56 as well as you configure it to Jun 23 07:48:01 although, how much reflection are you using? Jun 23 07:48:07 barq, might need to set some rules Jun 23 07:48:48 I have a preference in my app that is an int (5 or 15). When that preference has changed, I want to display a dialog (in the main activity). What's the best way to do this Jun 23 07:48:56 A lot of reflection. Jun 23 07:49:20 why do you have so much reflection in an android app Jun 23 07:49:21 My current implementation shows the dialog on startup if the preference is 15 because 5 is the default Jun 23 07:50:05 The whole framework uses it, so that is not something that can be changed. Jun 23 07:50:15 oh, thats unfortunate Jun 23 07:50:32 ethanmad, theres preferencechangelistener Jun 23 07:50:48 danijoo: thanks, i'll check it out Jun 23 07:51:16 What about multidex, how well does debugging etc. work with that? Jun 23 07:51:32 unsure Jun 23 07:51:40 barq, just tell proguard to ignore that framework Jun 23 07:51:45 https://developer.android.com/tools/building/multidex.html#limitations Jun 23 07:52:38 Just curious, why is that many methods an issue. Does it exceed the max number of methods in an Android app? Jun 23 07:52:50 Yes, more than 65k methods. Jun 23 07:54:01 multidex shouldnt make a problem Jun 23 07:54:06 build time will go up a bit Jun 23 07:54:22 there are still limitations Jun 23 07:54:35 in most use cases it works out of the box though Jun 23 07:54:41 danijoo: Do I implement the preferencechangelistener in the preference activity or in the main activity? Jun 23 07:55:00 Hmm, I'll have a look into the different options. Thanks. Jun 23 07:55:06 Proguard would be a good idea anyway. Jun 23 07:55:25 im proguarding/multidexing all the time Jun 23 07:56:00 ethanmad, everywhere where you want to listen to changes Jun 23 07:56:24 danijoo: how are you consistently breaking the 65k limit Jun 23 07:56:50 danijoo: I'll try it and see what works. Thanks. Jun 23 07:56:52 desmin88, kotlin Jun 23 07:56:55 ah Jun 23 07:59:09 after proguard: http://pastebin.com/isuzbu0m Jun 23 07:59:15 before, im at arround 70k Jun 23 07:59:45 I don't get how you have so many methods. What kind of app is it? Jun 23 08:00:10 ethanmad, some libraries here, some libraries there ;) Jun 23 08:00:27 Oh, importing libraries counts against the limit? Jun 23 08:00:31 and the standard lib of a language thats not java Jun 23 08:00:32 danijoo: i gave up on mopub, it never worked right and the website seemed unneccessarily confusing Jun 23 08:00:36 ethanmad, yes Jun 23 08:01:12 desmin88, switched to it when admob decided to drop my eCPM from 1.50$ to 0.20$ without a reason Jun 23 08:01:20 eeek Jun 23 08:01:42 That's crazy because some libraries have over 20K methods Jun 23 08:01:48 now I distribute between 4 adnetworks Jun 23 08:01:59 ethanmad, thats why you should proguard :) Jun 23 08:02:03 if only those libraries were modular, it wouldn't be such an issue Jun 23 08:03:45 facebook is really evil Jun 23 08:04:07 every lib from them Jun 23 08:04:09 Actually, my current app does use a couple of support libraries among others. proguard might shrink the app size Jun 23 08:04:36 somehow this app is 5.4 MB Jun 23 08:04:59 one man project, only ~1200 lines of code Jun 23 08:05:27 thats what proguard is for :_ Jun 23 08:05:28 :) Jun 23 08:05:51 man, I just deleted proguard from my git repo today Jun 23 08:06:02 Do i have to set rules? Jun 23 08:06:08 most likely Jun 23 08:06:14 deoends on your libs. but usually yes Jun 23 08:06:27 but most repos give some advice about what rules they nmeed Jun 23 08:06:30 too much work for now Jun 23 08:06:40 its not really Jun 23 08:06:53 i'd rather make features for the time being Jun 23 08:07:01 until i get everything in this release ready Jun 23 08:07:25 i'll hopefully cut out at least one library when i'm done with this release Jun 23 08:07:31 doing all your proguard rules at the very end is a pain Jun 23 08:07:32 the older a project gets, the harder it is to proguard :p Jun 23 08:07:57 even for a tiny app like this? Jun 23 08:08:09 even. Jun 23 08:09:01 I go through my gradle dependency list, lookup each library and find its associated proguard rules and add em in Jun 23 08:09:05 build and test Jun 23 08:09:08 every lib kinda comes with a new set of rules Jun 23 08:09:31 yeah Jun 23 08:09:33 so if i cut a library out, proguard will be easier, no? Jun 23 08:10:13 i have a snackbar library in this app that i'll soon replace with the official design support lib Jun 23 08:10:27 only if that lib required special rules Jun 23 08:10:31 example file: http://pastebin.com/KNPKsDcQ Jun 23 08:11:10 Are the support libraries heavily affected by proguard? Jun 23 08:11:19 hello, if i have a png (56x57) how do i know in which density it belongs (ldpi etc...) and also how do i calculate the other sizes ;] Jun 23 08:11:44 Candyman, http://developer.android.com/guide/practices/screens_support.html Jun 23 08:11:46 some are Jun 23 08:12:00 design support library needs special proguard exceptions for the CoordinatorLayout behavior classes Jun 23 08:12:31 because you link to class name in xml directly (kinda dumb imo) Jun 23 08:12:34 danijoo, can you help me out with the preferences listener? Jun 23 08:12:36 desmin88, maybe thats why that damn hide toolbar thing never works for me :D Jun 23 08:12:42 dum dum duuum Jun 23 08:12:45 look through your stack traces Jun 23 08:12:51 youll see a failed to instantiate exception Jun 23 08:13:00 i didnt understood much from there about the calculation from a specific size Jun 23 08:13:22 in my case 56x57 ... Jun 23 08:13:26 danijoo: http://pastie.org/10254342 thats what you need + individual -keep for your own behaviors Jun 23 08:13:28 Candyman, if a device is hdpi, it needs an image 1.5 times the size of an mdpi device Jun 23 08:13:36 and so on Jun 23 08:14:14 desmin88, i messed arround with it but didnt keep interfaces. maybe that was my problem. thanks :) Jun 23 08:14:23 yup yup Jun 23 08:14:44 Here's my settings fragment: https://github.com/ethanmad/En-Garde/blob/appcompat/app/src/main/java/com/ethanmad/engarde/SettingsFragment.java; here's my preferences xml: https://github.com/ethanmad/En-Garde/blob/appcompat/app/src/main/res/xml/preferences.xml Jun 23 08:15:06 the preference I want to set a listener on is "pref_mode" Jun 23 08:15:13 ethanmad, whats your problem? Jun 23 08:15:15 just do it Jun 23 08:15:49 in the words of the great shia Jun 23 08:15:53 "just DO IT" Jun 23 08:16:09 sharedPreferences.registerOnSharedPrefernceChangeListener(yourListener) Jun 23 08:18:26 desmin88: :P Jun 23 08:20:36 Wow I've been doing settings wrong Jun 23 08:33:34 Yay I got it working danijoo Jun 23 08:36:17 danijoo: should i handle all my preferences using a listener? I am currently using a method that loads the sharedprefs and then acts on them all at the same time Jun 23 08:36:36 and it's blind to whether or not there were changes Jun 23 08:36:50 and i have to explicitly tell it to run Jun 23 08:37:18 ethanmad, i dont know. usually you dont need to be are of prefs all the time Jun 23 08:37:27 its enough to check their values when you need them Jun 23 08:39:54 ok thanks. I'll think about it in the morning, when I'm more awake Jun 23 08:40:24 pfn, explain further? I only want to run a few lines of code after a native lib crash, for example save to shared prefs to start in diagnostic mode next run, then restart the whole activity + process, etc. Jun 23 08:40:28 10 am here ^^' Jun 23 08:40:40 1:40 am for me Jun 23 08:40:53 danijoo, 3:40pm Jun 23 08:41:14 i probably wont wake up until noon Jun 23 08:41:35 What country has 40 minute time difference to GMT? ^^ Jun 23 08:42:03 seriousl Jun 23 08:42:04 y Jun 23 08:42:25 what country has 1 min 40s time difference to GMT? Jun 23 08:42:38 -_- Jun 23 08:42:39 i should swap my enter switch for MX green so i stop accidentally hitting it Jun 23 08:42:44 What is the best way to cache the view or data of a Fragment that has some List that you get from an API? View options: 1) setRetainInstance? 2) onSaveInstanceState: Your Pojo needs to be Parcelable to save it to the bundle? API Options: Caching your calls somehow, assuming you implement timing mechanism. 1) Put them on a global in App/Activity(they are not that big) 2) Use guava's cache (guava is too big, have fun waiting for my Jun 23 08:42:44 api to build, and overrun Dex limit) 3) Serialize list Pojo back to JSON and store it in savedPreferences. 4) Store global AsyncSubjects since I am already using RxJava. Same as option1. 5) Store the results in SqlLite? Jun 23 08:43:02 MX brown is the best Jun 23 08:43:15 so, if I want to stop a native lib from crashing and killing the whole app, just long enough to set a shared prefs for "diagnostic mode" is it possible? Jun 23 08:43:30 danijoo: Actually it would be 1:20 difference :p Jun 23 08:43:43 I have blues. I like them, but I frequently accidentally hit enter with my pinky or something and send a message/command before it's done Jun 23 08:44:01 #humor https://groups.google.com/forum/#!topic/adt-dev/j2EwlTVYPWg Jun 23 08:44:03 claint, all of thyem for absolute fail safty! Jun 23 08:44:14 danijoo: haha Jun 23 08:44:34 Gah, Maven is giving NullPointers again in Eclipse when updating project -.- Jun 23 08:44:34 danijoo: seriously, isn't there a clean way to do this thing? Jun 23 08:44:47 danijoo: all of them look ugly to me. Jun 23 08:45:38 claint, you mixed up mechanismns to store stuff on disk forever (sqlite, shared prefs) and only between lifecycle recyles (savedInstanceState, application obj) Jun 23 08:45:51 wow, every app I have wanted to unlock premium has been easy so far, does any dev protect their sh*t? Jun 23 08:46:09 smellymoo, your an **** then :) Jun 23 08:46:16 danijoo: I know. That's why I didn't even implement the forever stuff yet. Jun 23 08:46:44 claint, if you only want to persist between app pausing or screen rotation, id go for onSaveInstanceState Jun 23 08:46:46 danijoo, yes, or inapp billing doesn't work for me in this country and I want to use it anyway. Jun 23 08:46:51 smellymoo: you should email the devs and tell them. how do you do it, anyway? Jun 23 08:47:04 ethanmad, always do. Jun 23 08:47:13 danijoo: I would have to put my list into Bundle and thus it will need to be Parcelable for that, right? Jun 23 08:47:25 smellymoo, awesome excuse Jun 23 08:47:56 "i cant pay for it, so ill steal it" :) Jun 23 08:47:56 smellymoo: How do you protect your app from doing that? Jun 23 08:48:12 claint, or serializeable (which is slow though) Jun 23 08:48:12 ethanmad, can't disclose how to bypass, not fair. don't agree with it really. am a dev myself. only agree with it for someone that will never pay. Jun 23 08:48:49 It's easy to bypass by just decompiling and recompiling. But how do you protect your app from that smellymoo ? Jun 23 08:48:53 barq, depends on many things, but most of the time I do almost nothing to bypass, so code things properly, for example verify they have paid. Jun 23 08:49:18 smellymoo: You can just set that flag to true. How do you protect from someone doing that? Jun 23 08:49:28 smellymoo: fair enough. i wouldn't use it, just curious. i would think decompiling, removing relevant code, and recompiling would work Jun 23 08:49:29 barq, I don't, as I don't mind people getting it free, its freemium anyway. Jun 23 08:49:55 make it hard to find out what flag is the right one Jun 23 08:49:59 wow, every app I have wanted to unlock premium has been easy so far, does any dev protect their sh*t? Jun 23 08:50:00 oh it's that simple Jun 23 08:50:05 ie. obsfucscating code Jun 23 08:50:08 hello guys, do you have any clue how to get a registration code error from new GCM class InstanceID.getToken(String, String) ? according to javadoc there are some constants error but I didn't get how to use them https://developers.google.com/android/reference/com/google/android/gms/iid/InstanceID Jun 23 08:50:14 ethanmad, decompiling and recompiling would probably kill it. as decompiling isn't perfect. Jun 23 08:50:19 What do you use for obfuscating? Proguard is not good enough. Jun 23 08:50:24 theres no 100% safty but you can make it hard enough so people give up Jun 23 08:50:39 smellymoo: I works very well. You can even inject Java. Jun 23 08:50:42 why is proguard not good enough? Jun 23 08:50:42 it* Jun 23 08:50:43 probably better just to let it happen rather than fight it Jun 23 08:51:02 barq, nothing is safe then. Jun 23 08:51:08 Because proguard just renames some classes and methods and makes it a bit harder to read. You can still debug it. Jun 23 08:51:09 ethanmad, you only say that if you dont make money from it :) Jun 23 08:51:17 ethanmad, I agree, I don't fight it, just keep updating my app. Jun 23 08:51:23 most people don't know how to do this Jun 23 08:51:30 there are devs out there you lose about 40% of their income to that Jun 23 08:51:32 Or use CodeInspect, which is really simple to use. Jun 23 08:51:49 those who do are probably like smellymoo in that they can't pay for it anyway Jun 23 08:51:53 danijoo, I make a living from programming, I don't care if people hack it, as long as they keep the info to themselves. Jun 23 08:52:20 The only tool I have heard of that actually protects from cracking the app is DexProtector. Jun 23 08:52:25 i care about people stealing from me. Jun 23 08:52:28 ethanmad, some, hard to know. some just like the challenge. like a sudoku. Jun 23 08:52:53 hah, yeah. it's fun just to win Jun 23 08:52:57 danijoo, not sure it's stealing, as they wouldn't pay anyway/ Jun 23 08:53:18 it's stealing, but it doesn't hurt the developer imo Jun 23 08:53:24 smellymoo, can I use the same argument if I steal in a shop? Jun 23 08:53:34 its not stealing! i woudnt have bought it anyways! Jun 23 08:53:44 The good thing about software is there's no unit cost Jun 23 08:53:48 What are your experiences with DexProtector. smellymoo have you been able to break that as well? Jun 23 08:54:06 danijoo, there is a reason that arguement fails... when you steal an item there is one, and you are taking it, not cloning it and taking the clone. Jun 23 08:54:18 smellymoo, thats not true Jun 23 08:54:21 my work time is the cost Jun 23 08:54:30 if less people pay it. im working for less Jun 23 08:54:40 But the work time is a fixed cost Jun 23 08:54:43 I agree with danijoo. Jun 23 08:55:12 ethanmad: time is the most dear cost there is. You have a finite supply of it. Jun 23 08:55:21 barq, normally don't try if it has native code, or if I can't find any strings in the decompressed package, so not sure, never come across an app I wanted to use that was protected. proguard doesn't work. Jun 23 08:55:23 It's already been invested. Someone who is unable to pay stealing doesn't hurt your bottom line Jun 23 08:55:25 but we have that discussion every 3 days here. you cant convince people who want to think its k to steal. They will always find excuses Jun 23 08:55:55 claint: but it's not like you're putting in more time to make the unit being stolen. you spent time and it doesn't matter how many are sold or stolen Jun 23 08:56:21 the easiest solution is to produce Free software and not worry about any of this Jun 23 08:56:24 ethanmad: Think of it this way. The unit costs are not dear to people, when they are built in factories by robots. Jun 23 08:56:30 smellymoo: You need to move everything to native then. If you generate your private stuff in native and you still retrieve it from java you can still debug it easily. Jun 23 08:56:51 i dont write in java. thats obfuscation enough :p Jun 23 08:56:58 danijoo, I actually think it's bad to steal, just don't think "stealing" software is stealing. as it's copying it... like if you had a nice car, and I copied it. why would you care? Jun 23 08:57:05 What do you write in? Jun 23 08:57:14 c++! Jun 23 08:57:18 :D Jun 23 08:57:19 claint: I'm not sure I follow Jun 23 08:57:24 barq, android-assembler! Jun 23 08:57:26 :D Jun 23 08:57:35 There's still the costs of the resources used to manufacture the item Jun 23 08:57:39 danijoo, for real? Jun 23 08:57:54 imple can still decompile it probably since you are creating the same byte code. Jun 23 08:57:59 jimple* Jun 23 08:57:59 my keyboard has 2 keys Jun 23 08:58:01 0 and 1 Jun 23 08:58:28 just make sure your product is always better than the one copying it Jun 23 08:58:35 barq, yeah but it will be damn hard to read when it tries to decompile non-java generated bytecode to java Jun 23 08:58:37 then you dont need to obfuscate that much Jun 23 08:58:41 ethanmad: I agree with that. What are we discussing? Jun 23 08:58:54 ethanmad danijoo, but actually, for example windows, they realised that it made good sense to allow people to pirate it, as it is good advertisement having everyone using it, similar to freemium. Jun 23 08:59:22 danijoo: What are you using then? Kotlin? Jun 23 08:59:27 I run a freemium / hackmium business model. the people that don't pay, show it to the people that pay. Jun 23 08:59:27 I'm just saying having someone who can't pay steal doesn't hurt the developer economically Jun 23 08:59:30 ethanmad: I wanted to disagree with the fact that not counting/respecting one time costs, like development of a software item, is wrong. Jun 23 08:59:31 barq, yup Jun 23 08:59:46 I don't know. Would be an interesting experiment to try. Jun 23 09:00:16 What I have seen is obfuscating Strings. Dexprotector does that. But I don't like the fact you have to pay for it. Jun 23 09:00:17 claint: Time is a fixed cost, though. That time has been spent regardless of whether the product is stolen or not Jun 23 09:00:29 You don't put in more time because something has been stolen Jun 23 09:00:48 anyway, had a simple question, can I stop at a native lib crash in java? Jun 23 09:01:10 [In no way do I condone theft, I just don't think software theft by a person totally unable to pay hurts the developer] Jun 23 09:01:19 smellymoo: Yes. Jun 23 09:01:26 barq, is dexprotector protected with dexprotector? lol ;) Jun 23 09:01:40 barq, which way would be best? how? Jun 23 09:01:54 barq, i really wonder how all those kotlin features that java doesnt have look if you try to reverse engineer it to java Jun 23 09:01:59 must look horrible Jun 23 09:02:05 smellymoo: I don't undestand your question. Please clarify. Jun 23 09:02:17 danijoo: Not Java, Jimple. Jun 23 09:02:17 ethanmad: What I wanted to say is, in most factories, the producer also doesn't put in more time, if things are automated. The factory is the whole thing. Time goes into designing it. Anyway, we should take discussion elsewhere, since it would be off-topic. Jun 23 09:02:21 ethanmad, exactly. should bitch at google and get them to sort their stuff out and support more (crappy) countries. Jun 23 09:02:44 smellymoo: where are you from, anyway? Jun 23 09:03:08 barq, when the native lib crashes I want to catch it in java and set a shared pref before exiting. Jun 23 09:03:11 danijoo: You cannot decompile Kotlin? Jun 23 09:03:12 barq, jimple looks horrible by default. my argument still stands :p Jun 23 09:03:15 What does this: return searchResultItemList == null ? new List(0) : searchResultItemList; do ? Does it return a new List with 0 arguments if it's null and else return searchResultItemList? Why do you have the 0 there? Jun 23 09:03:35 claint, ofc you can Jun 23 09:03:36 danijoo: Have you looked at CodeInspect? Jun 23 09:03:42 ethanmad, I am from England / Spain, but living in South east asia right now. Jun 23 09:04:04 ethanmad, if I really like something sometimes I paypal someone. Jun 23 09:04:17 danijoo: ofc. So it doesn't make it safe from decompilation. I guess it makes it more of a hassle. Jun 23 09:04:35 claint, yeah. but obfucasted by default :> Jun 23 09:04:36 smellymoo: I wonder if you can bypass restrictions via VPN Jun 23 09:04:59 Zajtarn, initial capacity , probably to save small amount of memory Jun 23 09:05:04 ethanmad, that would be too easy. better steal it with the excuse that its not possible to pay :) Jun 23 09:05:19 ethanmad, google play is quite a bitch to change country, then it goes all weird when I try to use it or test things... had a lot of problems. Jun 23 09:05:30 I'm lucky to be in the US Jun 23 09:05:31 ktwo what do you mean? it doesn't feel it is needed. Instead I can only return directly the list Jun 23 09:06:09 danijoo, actually, on my freemium app, I am thinking of giving it for free to anyone that doesn't have in app billing... but not sure if people will use that as a bypass Jun 23 09:06:22 Zajtarn, i dont recall the inital capacity of a list, but maybe 10 , really if you arent on an embedded and very memory-limited system, screw it dont use initializer like (0) Jun 23 09:06:30 smellymoo: Why would you care. They would not buy it anyway. Jun 23 09:06:34 Hi guys, can you serialize whole Retrofit requests? Jun 23 09:06:43 okok thanks for the help! Jun 23 09:06:54 danijoo, have you ever tried to change your google play country? and then back? not really that good an idea. Jun 23 09:06:55 I need to save a POST's data in case there's no connectivity. Jun 23 09:06:59 fabiob, you mean the response? Jun 23 09:07:01 Zajtarn, maybe read this: http://stackoverflow.com/questions/15430247/why-start-an-arraylist-with-an-initial-capacity Jun 23 09:07:08 barq, true Jun 23 09:07:36 danijoo: No, the whole request, in order to make it later when the connection come back. Jun 23 09:07:43 smellymoo: You are contradicting yourself. Jun 23 09:08:07 fabiob, you could intercept it and just save the query url Jun 23 09:08:13 maybe together with request headers Jun 23 09:08:28 ktwo ok so it is only useful to save time and small memory Jun 23 09:08:31 smellymoo: You actually care about someone stealing your own app but steal others'. Jun 23 09:08:42 barq, how exactly? I said I don't mind... doesn't mean I will add a button to my app that says "don't want to pay" no reason to make it easy. Jun 23 09:09:15 smellymoo: The fact that you are putting effort in to prevent stealing shows you care. Jun 23 09:09:39 There's a difference, though: he's concerned about people who are able to pay getting it for free Jun 23 09:09:46 barq, and I email each person with a detail of the work-around, so it's like a bug-bounty, they get to close the hole for the price of one person getting it free. that's a great deal. Jun 23 09:10:53 danijoo: That could work, thanks. Jun 23 09:10:57 smellymoo: Of course this workaround will stay private and never be leaked. Jun 23 09:11:01 barq, how? nothing wrong with making it a bit harder, I haven't secured mine in any hard way. but leaving the door open is just not a clever idea, think they should at least get a good puzzle to crack. Jun 23 09:11:38 barq, never disclose. not fair to. Jun 23 09:12:03 smellymoo: Funny you talk about fairness. Jun 23 09:12:19 barq, in which way? Jun 23 09:12:35 He's right, though. It wouldn't be ethical to disclose how to crack apps Jun 23 09:12:38 I don't think pirating an app is fair. Jun 23 09:12:52 because? Jun 23 09:12:59 Devs lose $ Jun 23 09:13:06 no they don't. Jun 23 09:13:16 If you write if(cursor != null && cursor.moveToFirst), am I correct if I think like this: cursor != null first checks if the database returned a query, because it returns a query in a cursor or nothing else so here you check if there are something in the database. Then you check if you can move to the first row, because it is not sure you can move to the first row if it's an empty row. Jun 23 09:13:23 I can't pay, so I pay with my time, showing them how to fix it. Jun 23 09:13:36 Of course, if you are forced to pay you will do so. If you have the option to pay or not to pay, some percentage will choose not to even though they could. Jun 23 09:13:48 Zajtarn, yes Jun 23 09:14:01 smellymoo: You contact the devs and tell them the hole? Jun 23 09:14:09 for && the statement will return if the first part of it already fails without checcking the second Jun 23 09:14:29 barq...haven't paid for software, I use FOSS... so if android was terrible and made it unusable to be free, then I would install linux. Jun 23 09:14:44 barq, every time. Jun 23 09:14:46 danijoo what do you mean? it will only return true if both are true Jun 23 09:14:54 barq: yes, he said he did before you joined the conversation. Jun 23 09:15:04 Note that this is called short-circuting (in case you want to google it). Jun 23 09:15:09 smellymoo: Ok, sorry. I must have missed that bit. Jun 23 09:15:12 short-circuiting* Jun 23 09:15:32 Zajtarn, i think i misunderstood your question. Thought you want to know if this if could throw a NPE Jun 23 09:15:59 barq, no problem. I guess you miss judge me. I'm fair, I let others hack my stuff, and use and contribute to FOSS, when I crack, I disclose only to the dev. Jun 23 09:16:32 smellymoo: I think I joined late and missed the first part. I can only judge by what I read and was lacking information. Jun 23 09:17:00 oh no i was just asking if I understood the if-statement correctly, why you check if it's not null and if it can move to the first row. Because if it is null or the first row is empty, then it should go into try catch? But what happens if the second row contains information? Jun 23 09:19:05 anyone using coordinatorlayout with proguard? Jun 23 09:19:55 so, anyway, does anyone here know how to catch in java a native lib crash running on a background thread (don't need to retrieve any thing, just stop it from killing the app) Jun 23 09:23:16 smellymoo: I would be interested in how to actually fix that hole of just changing the flag for premium. Jun 23 09:24:02 barq, its java. you can never be 100% safe Jun 23 09:24:14 but you can hide the fuck out of that flag Jun 23 09:24:24 and always check against the server Jun 23 09:24:46 and always obfuscate Jun 23 09:24:49 How do you hide it though? Just shoving its generation to native doesn't help. Jun 23 09:24:55 And obfuscation doesn't do much either. Jun 23 09:25:06 barq, when your app checks a flag for premium, it then checks the appstore or your server to verify. Jun 23 09:25:10 compared to no obfuscation it does Jun 23 09:25:28 Unless you use something more sophisticated than proguard like DexProtector. Jun 23 09:25:38 smellymoo, still not 100% secure. people could just recompile the apk and make it an if(true) Jun 23 09:25:49 true. Jun 23 09:26:04 as a java dev you just have to live with that you cant be secure Jun 23 09:26:19 android LVL can also help Jun 23 09:26:46 danijoo, that's true for *all* software, no need to recompile, just read in asm, then find the conditional, make a patch to it. Jun 23 09:27:07 good luck with reading ASM for big software Jun 23 09:27:31 i thought we talk about things that are actually possible, not theoretical Jun 23 09:27:49 alright guys I'm done for the night. I'll be back post-wake up Jun 23 09:28:00 danijoo, actually that's normally how it's done, look for a string in ram / binary of the text for "not pro", then trace from there to the conditional Jun 23 09:28:05 Hey folks. I'm currently trying to migrate a really old C2DM app to GCM, but am getting confused as they seem to have changed the API a few times. Is there any definite document about how you should implement this now (GcmListener vs GcmBroadcastReceiver etc.)? Jun 23 09:28:23 pehlert, the official docs Jun 23 09:29:41 danijoo, doesn't take long to trace from an error of not pro to the conditional in asm, try it :) Jun 23 09:30:15 smellymoo: What tool do you use for tracing? Jun 23 09:30:43 barq, not done on android, done in c++ programs on windows, before I moved to linux. Jun 23 09:31:11 danijoo: Oh okay, I just found the google-services.git repo, I hope that will help. Thanks Jun 23 09:31:12 How can I store the current state of my app if you close it and then without Internet opens it again? I have written an DbHelper class which got everything, one method to put the information to the database and one to read it from it. Should I in MainActivity's onPause method call my insertInformation method. And then in onCreate call my readInformation or how can I do this? Jun 23 09:31:13 licensed windows programs also werent available in your country? 8) Jun 23 09:31:46 I have also a method that checks if you got Internet connection Jun 23 09:32:11 Zajtarn, what kind of information? Jun 23 09:32:41 ok, got an idea, if when my app runs, it sets a shared_pref, then when it closes normally it clears it... then I can check if it's set and run in diagnostic mode? Jun 23 09:32:48 The information you have searched in the app, in the app you can search movies so it should open the previous state so the search again Jun 23 09:33:15 Zajtarn: OnResume or OnStart, not OnCreate, that won't be refreshed Jun 23 09:33:34 mh. you dont really need to do that if your queries are done via http Jun 23 09:33:45 just implement an http cache that does the work for you Jun 23 09:33:59 danijoo, nah, I am not saying I am perfect, this is 10 years ago, when I used to do it for fun... normally commercial software worth 5000+$ so I would never buy. Jun 23 09:34:05 barq: Oh ok, what's the difference between OnResume or OnStart? Are they only used when you need to refresh and open the app again after it has been opened before Jun 23 09:34:30 danijoo Haven't done that before hehe Jun 23 09:34:37 Zajtarn: https://github.com/xxv/android-lifecycle Jun 23 09:34:47 Zajtarn, much easier then implementing sql Jun 23 09:34:51 its 3 lines of code Jun 23 09:35:14 yeah but i need to use SQL now, because it was something we needed to use in the app. So it's easy to use here I guess. barq gonna read that Jun 23 09:36:05 good luck.. Jun 23 09:37:05 hey, does anyone have some experience with deep linking? Jun 23 09:37:19 yes Jun 23 09:37:27 Zajtarn: http://stackoverflow.com/questions/6812003/difference-between-oncreate-and-onstart Jun 23 09:37:37 ok, so if everytime I start a dangerous native lib, it sets a shared pref, and after the callback it clears it, then if when the app starts it's set, it almost definitely crashed. Jun 23 09:38:16 joroci, better ask the question you really want an answer for :) Jun 23 09:38:45 i have two activities with a scheme and pathPrefix and a BROWSEABLE category Jun 23 09:39:04 smellymoo, you can't really recover from a native lib crash Jun 23 09:39:08 the problem is if i don't set a DEFAULT category the intent filter doesn't work Jun 23 09:39:17 because when it clobbers the heap/stack it also clobbers the JVM memory Jun 23 09:39:39 maybe run it as a service in a separate process Jun 23 09:39:43 (overhead++ though) Jun 23 09:40:20 i read in the docs DEFAULT is optional but it seems it's not, or maybe i'm missing something Jun 23 09:40:59 joroci, The DEFAULT category is optional, but recommended. Without this category, the activity can be started only with an explicit intent, using your app component name. Jun 23 09:41:05 I think the description is pretty clear. Jun 23 09:41:13 Without DEFAULT, the intent has to explicitly target your app Jun 23 09:41:25 It won't show up as an option in menus / as a link handler Jun 23 09:41:30 barq alright but if you look there, then it seems that you need onRestart() if you want to use onStart(). While you otherwise just need onResume() Jun 23 09:41:53 Zajtarn: But don't do updating in onCreate as you suggested before. Jun 23 09:43:30 Mavrik this is the url i use "intent://dashboard/#Intent;scheme=myscheme;package=com.example.com;end" Jun 23 09:43:35 Mavrik, the last idea I posted wouldn't recover, only it would know the second time it crashed the first. Jun 23 09:43:48 joroci, dafuq is that? where do you use that? Jun 23 09:43:54 chrome Jun 23 09:44:08 yeah that won't work without a default. Jun 23 09:44:24 or chrome Jun 23 09:44:35 unless i use default category Jun 23 09:45:45 but the question how to do it in all browsers? Jun 23 09:46:00 barq: yeah but I'll use onResume. So in onPause, i just create an object of DbHelper and call insertInformation. Then in onResume, I create an DbHelper object and call readInformation. But where should I check if it has internet connection? Should I check if hasInternet() method is false and then update? Jun 23 09:46:49 Zajtarn: be back in a bit Jun 23 09:49:52 okok Jun 23 09:57:45 Hey, anyone who has used MapFragments, what is the correct way and time to remove them? Jun 23 09:58:33 Every time my app is exited it crashes and gives a NPE Jun 23 09:59:29 havent used it but look at where it crashes and remove it before that ? Jun 23 09:59:34 maybe onPause Jun 23 10:00:30 people from all over the world, I need to know what is the average of salary for a Junior Android Developer Jun 23 10:00:40 does anyone know it? Jun 23 10:00:44 danijoo, So I tried onPause, the problem is that when I try to add it back in onResume, the map is frozen Jun 23 10:01:07 I am capturing video use camera with NV21 format, but I can’t find any method/property to get the stride , is there any document I missed? Jun 23 10:04:30 anyone? Jun 23 10:13:31 I have a method to get the picture row stride of nv21 buffer got in onPreviewFrame or there is some promise to be aligned at 4/8/16 bytes? Jun 23 10:16:24 Hi, is there a list of items you could include in a custom style? Jun 23 10:20:06 hi. please help me! Jun 23 10:20:13 at the company they gave me one of their previous projects to use as a reference and it uses this lib: Jun 23 10:20:24 https://github.com/rengwuxian/MaterialEditText Jun 23 10:20:37 I need to know if I should use this lib or dump it Jun 23 10:26:38 hello Jun 23 10:27:00 anyone has experience with network and APNs? Jun 23 10:28:43 Don't ask if you can ask, ask directly and if someone can answer he/she will :P Jun 23 10:58:17 I appear to be going in circles, I am setting a custom actionbar as a toolbar with setSupportActionBar , then attempting to change the title using getSupportActionBar().setTitle("Test"); However this has no effect at all Jun 23 10:58:42 If it matters I'm also hooking up DrawerLayout, NavigationView and using an ActionBarDrawerToggle Jun 23 11:03:58 i think i had this issue, try setting the title on toolbar object Jun 23 11:04:55 I've tried doing that both before and after setting it as the SupportActionBar with no luck :( Jun 23 11:04:57 Hey, does anyone know when cloud test lab will go live? Jun 23 11:06:18 did you do toolbar.setTitle or getSuppotActionBar().setTitle()? Jun 23 11:06:44 Well before iset the actionbar I tried toolbar, after getSupportActionBar Jun 23 11:09:15 show me the code Jun 23 11:11:45 http://izquotes.com/quotes-pictures/quote-talk-is-cheap-show-me-the-code-linus-torvalds-273528.jpg Jun 23 11:11:46 :P Jun 23 11:12:28 :) Jun 23 11:12:44 ivali: he doesn't look half the fucking assholw he is Jun 23 11:12:48 *asshole Jun 23 11:13:07 https://gist.github.com/benpye/45f0d6e536580f117a2a Jun 23 11:15:41 in line 35 getSupportActionBar().setTitle() should work Jun 23 11:16:37 What I have is equivilent right, forgot I had the getSupportActionBar as a seperate call but yeah Jun 23 11:18:23 Ahh I'm stupid, I was messing about with CollapsableToolbarLayout and left it in Jun 23 11:18:29 Collapsing* Jun 23 11:32:56 hey guys, how can I get the index of the current selected item in the row in an Android TV app? This is the method I'm using: public void onItemSelected(Presenter.ViewHolder itemViewHolder, Object item, RowPresenter.ViewHolder rowViewHolder, Row row) Jun 23 11:33:21 there's the selected item and it's view holder, and the selected row and it's viewholder Jun 23 11:33:34 but I can't get anything from the row Jun 23 11:45:07 lazz: what about Presenter.ViewHolder.view? Jun 23 11:45:21 itemViewHolder.view Jun 23 12:12:00 Where can I download adb? I downloaded and installed the sdk, but adb is not in the usual location platform-tools Jun 23 12:15:51 thepoosh: it returns me the view, but I can't get the index of that element. I'm making a movies app. The vertical axis are the categories, the horizontal are the movies from that particullar category. There are lots of movies, so I can't get them all by a single API call, but I can get them like Page 1, Page 2, Page 3 etc... So, because I can't implement paging inside the Leanback Launcher, I decided to do a lazy load. so when the user gets to the last Jun 23 12:15:52 element of that row, I'd like to get the next page of movies and append them to the row. I have trouble determing when is the user going to be at the last element of the row. Jun 23 12:42:43 hello Jun 23 12:43:15 anyone making apps in kotlin? Jun 23 12:47:24 osxorgate, yes Jun 23 12:47:43 danijoo: how is it? :) Jun 23 12:49:26 hi some android studio and git user - http://pastebin.com/a3yAKjAw Jun 23 12:49:27 ? Jun 23 12:49:41 its like writing them with java, but instead, you use kotlin Jun 23 12:50:23 osxorgate, do you want me to say something like "its awesome!" or what? ^^ Jun 23 12:51:11 it has very sexy lambdas Jun 23 12:51:15 danijoo i'm interested in the why, and whether or not it eases development. in general, what's your idea of using kotlin (as opposed to java) Jun 23 12:51:41 osxorgate, there are a lot of websites that can answer that better than me. Jun 23 12:52:18 osxorgate: it works, but there is a pitfall. when doing interop with your Java classes or, well, Android framework, you should always use nullable types Intent? and so on. Otherwise you will get less null-safety, not more Jun 23 12:52:22 most important is you get lambdas, null-safty and lots of other nice gimmicks Jun 23 12:52:24 osxorgate: https://docs.google.com/document/d/1ReS3ep-hjxWA8kZi0YqDbEhCqTt29hG8P44aA9W0DM8/edit Jun 23 12:52:52 CedricBeust: cheers, i already pocketed it for on the way home Jun 23 12:52:54 thanks CedricBeust, I was right now googling for it Jun 23 12:53:21 i reckon if jake's 'advocating' it, it's probably not too shabby Jun 23 12:53:29 osxorgate: ..well unless methods/arguments annotated @NonNull Jun 23 12:54:29 osxorgate, just try it out and decide for yourself Jun 23 12:54:51 i can just mix java and kotlin in a project, right? Jun 23 12:54:57 YUP Jun 23 12:55:08 problem is this will cause brain damage Jun 23 12:55:09 that's neat Jun 23 12:55:14 ow :( Jun 23 12:55:18 how so Jun 23 12:55:25 you will start to always forget ; in java classes Jun 23 12:55:40 and confuse `when` with `switch` Jun 23 12:55:54 and try to use kotlin extension functions in java Jun 23 12:55:58 stuff like that :p Jun 23 12:56:13 haha Jun 23 12:56:22 alright Jun 23 12:57:23 for example i always try to do Activity.toast() to show toasts in my old java project Jun 23 12:57:32 then i realize this is not available Jun 23 12:57:41 and I immediatly get sad :( Jun 23 13:01:14 Hello, how can I see my entire scroll view in the android studio preview ? It's been limited by the device screen size. Jun 23 13:01:43 when you do a staged roll-out, is the percentage for people that download it, or for everyone that has it already? Jun 23 13:05:03 smellymoo, why don't you read the doc: "New and existing users are eligible for to receive updates from staged rollouts. Staged rollouts can only be used for app updates, not when publishing an app for the first time." Jun 23 13:05:11 https://support.google.com/googleplay/android-developer/answer/3131213?hl=en Jun 23 13:05:30 adq, I did read, wasn't sure. Jun 23 13:06:05 adq, still not sure... Jun 23 13:07:03 adq, does it mean if I have 1000 people with it, and set 10%, that it updates them and installs it to new people until it reaches the 10% target? Jun 23 13:07:24 (100 people with it). right? Jun 23 13:08:01 Hello, how can I see my entire scroll view in the android studio preview ? It's been limited by the device screen size. Jun 23 13:08:24 for sure smellymoo, but stage roll-out is related to updating your app Jun 23 13:09:08 someone (a new user) will not directly get the "staged roll-out" version Jun 23 13:09:16 welli this is pretty awesome gotta say.. http://try.kotlinlang.org/ Jun 23 13:09:37 otherwise you could not measure the impact of your future update which you are testing on a small amount of user Jun 23 13:09:53 adq, its updating and new downloads combined, right? so if I have 1000 people with it, and set 10% I can expect 100 people approx to have it... does it also scale up? say if I leave it on 10% and my users reach 2000, will I have 200 on it? confused as how they implemented it exactly. Jun 23 13:10:14 how does one exactly add a JSONArray to a JSONObject ? Jun 23 13:10:27 again, smellymoo: "When you increase the percentage of a staged rollout, your original group of users who are eligible to receive the APK is always included. If you upload a new APK to an existing staged rollout, your original group stays the same. When you create a brand new staged rollout, your staged rollout starts with a new user group." Jun 23 13:10:44 read many times and carefully if you don't understand, i don't know more about it anyway, good luck Jun 23 13:11:37 lol - sure, thanks adq, still confused to exactly how it will play out, was wondering about others that have tried it. Jun 23 13:11:56 emilsp, easy no? Jun 23 13:12:12 smellymoo Jun 23 13:12:31 well, JSONObject().put('arr', JSONArray()); sure works, you get an empty array Jun 23 13:12:52 but when you've already filled the array with stuff, the outcome will be the same Jun 23 13:13:01 emilsp, isn't there a simple method, my last app used JSON a lot, it's simple, look through the auto-complete of methods, you will find it. Jun 23 13:13:02 you'll get a key in the object and an empty array Jun 23 13:13:15 smellymoo, I wouldn't be asking here, woudl I / Jun 23 13:13:35 emilsp, hmmm... Jun 23 13:14:04 emilsp, not sure you should do a "put" Jun 23 13:14:16 what else then ? Jun 23 13:14:48 there are others... my app was reading not writting, but I remember there being more options than just "put" Jun 23 13:15:38 yeah, and they don't really work Jun 23 13:17:36 emilsp, *looking* Jun 23 13:19:40 emilsp, put should work. Jun 23 13:19:49 I know, right ? Jun 23 13:19:53 but... Jun 23 13:20:06 JSONArray() <- why? Jun 23 13:20:22 should be sending it a ref... Jun 23 13:20:23 why I need a json array ? or why am I doing in the line I wrote here ? Jun 23 13:20:36 of course, that's just so people can understand what I'm doing Jun 23 13:20:41 the line you wrote. Jun 23 13:20:50 in my code, the array is initialized before I try and add it to the object Jun 23 13:21:09 JSONArray() should be replaces with a ref to the JSONArray object you want to add. Jun 23 13:21:23 so that method is returning it? Jun 23 13:22:14 JSONObject(). <- should be [the json object ref, no ()] Jun 23 13:22:28 in my code I do this -> jlist = new JSONArray(mClientMap.keySet()); mUpdateBody.put(J_UPDATE.THINGS, jlist); Jun 23 13:23:05 I was trying to express what I am doing in the shortest way possible, clearly you're not a java compiler and got confused Jun 23 13:23:23 which isn't really your fault, I can't parse java consistently either ;) Jun 23 13:23:25 yeah. seems fine. Jun 23 13:23:53 funny thing is, jlist.toString(); returns the thing I expect, but the object just has an empty list Jun 23 13:24:16 JSON is a bitch. Jun 23 13:24:35 smellymoo, this is a candidate for multi process Jun 23 13:24:47 no, JSON is super easy, but this faulty JSON implementation for java is mighty stupid Jun 23 13:25:02 emilsp, yeah, my meaning. Jun 23 13:25:16 pfn, your meaning? Jun 23 13:26:36 exactly what I said Jun 23 13:31:18 hahaha, in the end it was my own damn fault, I was overwriting the stupid value all along Jun 23 13:31:44 but I still have to downcast the array to (Object) for it to work... Jun 23 13:32:03 emilsp, normal :) Jun 23 13:33:03 emilsp, write a "better" one :> Jun 23 13:33:59 danijoo, yeah, I'll execute node as a subprocess from C++ and hand myself back a proper json string :P Jun 23 13:34:09 node as in nodejs Jun 23 13:34:41 or just write another implementation Jun 23 13:34:47 ^^' Jun 23 13:34:56 im pretty confident with gson Jun 23 13:37:17 If it says this "App uses a Loader to move its data to its views", I can't use an adapter cuz I have written a class MyListAdapter which I use. Have never worked with Loaders before Jun 23 13:38:01 why should your adapter not work with a loader? Jun 23 13:38:58 danijoo i mean am I using an loader if I use an adapter or? Jun 23 13:39:14 doesnt make sense Jun 23 13:39:22 a loader is something totally different from an adapter Jun 23 13:40:01 loaders usually load the data that the adapter displays (when load is finished) Jun 23 13:40:41 alright so if I have an app where you search for movies, I can use Loader to load the data the the adapter displays in the textviews? Jun 23 13:40:57 yeah Jun 23 13:41:00 avoid loaders. Jun 23 13:41:17 it would be search query -> loader -> adapter -> listview Jun 23 13:41:30 but why do you use it? what can it help my app to do? because it works fine right now without loaders. But it seems I need to implement it if I look at the criterium but not sure how Jun 23 13:41:34 how does one do unit testing in android studio? all I can find documentation on is GUI testing Jun 23 13:42:00 * gavit wants to test things like Math.add(int, int) Jun 23 13:42:06 Zajtarn, loaders are automatically async, and they reset by default on reload Jun 23 13:42:09 loaders are useless Jun 23 13:42:17 but its not that hard to not use them Jun 23 13:42:28 and they can be a pain to debug Jun 23 13:42:33 and have bugs Jun 23 13:42:41 http://stackoverflow.com/questions/20762514/why-are-loaders-bad-in-android Jun 23 13:44:20 alright, but jvrodrigues I wouldn't use it if I didn't have some criteriums hehe Jun 23 13:44:49 CursorLoader works just fine, it's only a few lines of code Jun 23 13:44:58 icedp, until you rotate screen :D Jun 23 13:45:21 how so? Jun 23 13:45:51 Greetings all, I am doing some reading on services and I am confused Jun 23 13:46:16 icedp wanna show me how you implemented it? Jun 23 13:46:33 What I would like to do is create a service which runs, more or less, independent of the whether the app is running or not Jun 23 13:47:06 I would like it to run on an interval (AlarmManager) every day at 5pm and produce a local notification based on certain conditions Jun 23 13:47:36 I am reading about Services and IntentServices and am confused which is intended to handle this use case Jun 23 13:47:37 thanks Jun 23 13:47:55 Zajtarn: https://developer.android.com/training/load-data-background/setup-loader.html Jun 23 13:48:08 icedp, the very concept behind cursor loader is wrong in almost all the cases, the only case where a cursor loader would be reasonable is if you are dealing with thousands of rows in a database, which actually rarely happens. Jun 23 13:48:31 or at least I've rarely seen it happen Jun 23 13:48:33 icedp, there are funny things like this issue: http://stackoverflow.com/questions/12507617/android-loader-not-triggering-callbacks-on-screen-rotate?rq=1 Jun 23 13:49:25 danijoo: I've said CursorLoader Jun 23 13:49:34 what i am thinking right now is, something like, my main application has the AlarmManager kick off my service at some interval. The service then checks for the condition, if the condition is present, it broadcasts an intent which is received and produces the notification Jun 23 13:49:46 danijoo: didn't use AsyncTaskLoader Jun 23 13:49:54 the user can then then tough the notification to open the requisite Activity within the application Jun 23 13:50:15 cursorloader extends asynctaskloader -_- Jun 23 13:50:27 jvrodrigues: it is right if dealing with thousands of rows but wrong when there are hundreds? I don't understand Jun 23 13:50:45 Feels useless for me to just insert Loader just to have it because I'm using AsyncTask already for the background work Jun 23 13:51:06 icedp, you would want extra layers of abstraction on top of your data to ease the handling of it and to make it faster Jun 23 13:51:36 also to improve security, debugging and homogeneity through the application Jun 23 13:51:46 danijoo: ok then, but it works just fine. query seems to go on during screen rotation and it refreshes correctly Jun 23 13:51:56 anyone? Jun 23 13:52:14 no idea. havent used loaders for a while Jun 23 13:52:28 everytime i come across one in a project, i replace it Jun 23 13:52:38 jvrodrigues: what abstraction do you have in mind? Jun 23 13:53:02 xximjasonxx, a service runs in the background an intent service can be triggered through an intent, you want an intent service for wha you want! Jun 23 13:53:09 icedp, using data models? Jun 23 13:53:48 jvrodrigues: so what I am describing is accurate yes? AlarmManager sets the interval for the IntentService to kick off, IntentService checks for the condition. If found, broadcasts an intent that is received and the notification shown Jun 23 13:54:08 sounds about right, but you can trigger the notification through the intent service Jun 23 13:54:16 thanks Jun 23 14:02:42 My fragment's onViewCreated called twice, and I need to action only once. I tried to save boolean and change it, but it stays the same. Jun 23 14:02:51 Hey guys! How do I append more movies in a row dynamically? I'd like to update that particular row when the user gets to the last item. I have the event and the new movies, I just need to append them to the current row. Jun 23 14:03:02 it's about an Android TV app :D Jun 23 14:03:16 yoavst: sounds like you are creating it twice Jun 23 14:03:32 xximjasonxx: ViewPager adapter, so not. Jun 23 14:03:41 or maybe yes, but It isn't my bug :| Jun 23 14:06:09 Hello, fellow devs. I need some advice. If I am uploading some data from an Android app to a php server, what is the safest way t Jun 23 14:06:27 for the server to make sure that the data comes from the app. Jun 23 14:06:31 ? Jun 23 14:06:43 Even ReentrantLock fail to lock it. (I just lock and not unlocking) Jun 23 14:07:01 LordRatte, client side certificates or oauth Jun 23 14:07:21 and ofc sssl Jun 23 14:07:24 but you cant be 100% sure Jun 23 14:08:05 Does oauth require one to log in, danijoo? Jun 23 14:08:09 yes Jun 23 14:08:35 Hey guys! How do I append more movies in a row dynamically? I'd like to update that particular row when the user gets to the last item. I have the event and the new movies, I just need to append them to the current row. Jun 23 14:08:36 it's about an Android TV app :D Jun 23 14:08:38 oauth is this "use google acc to login" thing Jun 23 14:09:03 I would rather avoid that. What are certificates? Jun 23 14:09:21 LordRatte, https certificates Jun 23 14:09:29 Oh. Jun 23 14:09:31 Right. Jun 23 14:09:34 its the same but reversed Jun 23 14:09:46 client sends certificate and server checks if its valid. \ Jun 23 14:10:01 a website does the opposite. server sends cert and client checks Jun 23 14:10:18 Guys, im using LocationManager and registering a listener Jun 23 14:10:30 I'd have to register a paid certificate then, right? Jun 23 14:10:32 Does CoordinatorLayout just not like having a preview in Android Studio? Jun 23 14:10:34 and in onLocationChanged, even if I dont move my device at all, its saying things like 9 meters and stuff Jun 23 14:10:39 Why would it do that Jun 23 14:10:51 problem with client side certs is if someone disassembles your app and steals your client side cert you're screwed Jun 23 14:11:16 Nizumzen, yeah. but you cant be sure this wont happen Jun 23 14:11:36 if you put it in a secure container and obfuscate the password a bit in your code, you can make it pretty hard to do that Jun 23 14:11:52 theres no 100% security in bytecode Jun 23 14:11:59 danijoo: true Jun 23 14:12:24 Is the LocationManager in accurate? Jun 23 14:12:35 Its saying I moved 10 meters when the device didnt move at all Jun 23 14:13:12 drose379, depends on the location provider Jun 23 14:13:32 NETWORK_PROVIDER is quite inaccurate Jun 23 14:13:32 Hmmm. Alright, thanks, folks. Jun 23 14:13:47 Im setting listener for Network and GPS danijoo Jun 23 14:13:54 Im pretty sure its using Network tho, cause im inside Jun 23 14:13:58 You think thats why? Jun 23 14:14:14 I have gps inside Jun 23 14:14:18 check your phone settings Jun 23 14:14:37 users can disable gps and only use network if they want Jun 23 14:15:08 I just set the threshhold to 12 meters in NETWORK Jun 23 14:15:18 so it doesnt register as movement unless its over 12 meters Jun 23 14:16:00 Hello guys, I used Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY|PendingIntent.FLAG_UPDATE_CURRENT to pass a notification intent to resume my in the background. But I recently found out (after converting my project to Android Studio) that these constant are not supported anymore. What constants should I use than? Jun 23 14:16:08 just notify ur users that its currently inaccurate when u see they are on network Jun 23 14:17:00 danijoo but why wud it say im moving when im not Jun 23 14:17:55 it makes developing more exciting :p Jun 23 14:18:13 hah true Jun 23 14:18:27 I have a Toolbar and a RecyclerView in a CoordinatorLayout and the Recycler is overlapping the Toolbar. How do I fix that? Jun 23 14:18:42 Also I want to convert meters to miles, I havent seen a class for doing that but I know the calculation for it Jun 23 14:18:52 Is there a class or Math method to do it? Jun 23 14:19:20 its a oneliner Jun 23 14:19:37 just the meters/1609.334 ? Jun 23 14:20:31 dunno. imperial system is retarded Jun 23 14:20:57 hm Jun 23 14:21:17 but something in this scale should be right :p Jun 23 14:21:18 is it possible to get gps coordinates from a phone consistently within a couple feet of true? Jun 23 14:21:26 so i have an image that im using for my camera button, but how would i resize it so that when i wanna put it on my layout its not crazily sized? right now its a 300x300 pixel image i think and i want it to be a way smaller image for a camera button Jun 23 14:21:43 danijoo does this look right? http://pastie.org/private/kj0chdfnfmiz4jqbiss3a Jun 23 14:21:50 couple feet? maybe with wifi direction location, based off of the access point or something Jun 23 14:21:56 but usually no fxmulder Jun 23 14:21:58 I tried averaging 10 gps coordinates and they result still seemed to be pretty wild Jun 23 14:22:09 yeah gps isnt as accurate as i wish it was Jun 23 14:23:25 Is this how you start a new activity? https://gist.github.com/anonymous/c218a3e41e339eaeef85 when I click my button I can see the log entries but the activity doesn't come up. Jun 23 14:24:33 bobbiejim, thanks to US DoD Jun 23 14:24:36 ExeciN: you need context.startActivity(intent) Jun 23 14:25:22 danijoo yeah basically Jun 23 14:25:28 we need military grade phones :) Jun 23 14:26:08 quinnjn: oh, thanks Jun 23 14:26:41 bobbiejim, just wait for european galileo :) Jun 23 14:27:56 Is there a formula to get the distance between 2 pairs of coorinates Jun 23 14:28:59 drose379, theorem of Pythagoras? Jun 23 14:29:02 jvrodrigues: I cant seem to wrap my head around how this works Jun 23 14:29:29 whenever I try to use the AlarmManager to kick off my IntentService, I never see it run (with and without the debugger) Jun 23 14:29:42 is that it danijoo? Jun 23 14:29:50 Im just trying to get distance traveled by a person Jun 23 14:29:54 Ive seen plenty of apps do it Jun 23 14:30:32 yeah, seems like pythagoras would cover it, between two points on a plane Jun 23 14:30:45 not pythagreain Jun 23 14:30:52 ha, i cant remember how to spell it Jun 23 14:30:58 drose379, d = sqrt( (x1-x2)^2 + (y1-y2)^2 ) Jun 23 14:31:10 it actually was euklid, not pythagoras :/ Jun 23 14:31:24 http://www.purplemath.com/modules/distform.htm Jun 23 14:31:48 danijoo its called the euklid theroem? Jun 23 14:32:15 think so Jun 23 14:32:49 "Euclid's theorem is a fundamental statement in number theory that asserts that there are infinitely many prime numbers." Jun 23 14:32:54 its a variant of the Pythagorean Theroem, so this website says Jun 23 14:32:58 not entirely sure how that applies :D Jun 23 14:33:01 https://en.wikipedia.org/wiki/Euclidean_distance Jun 23 14:33:03 ^^ Jun 23 14:33:06 not the theorem then Jun 23 14:33:24 i dont think that is what he is looking for Jun 23 14:33:36 I just need distance between coordinates Jun 23 14:33:39 http://www.purplemath.com/modules/distform.htm Jun 23 14:33:41 ^^ Jun 23 14:34:03 a^2 + b^2 = c^2 Jun 23 14:34:11 that gets me c2 Jun 23 14:34:15 wud that be distance? Jun 23 14:34:18 ok, but surely that's just applying the pythagorean theorem backwards? Jun 23 14:34:29 yeah Jun 23 14:34:34 Leeds: indeed. I misspoke earlier when I said it wasnt Pythagorean Jun 23 14:34:34 thats what I first said Jun 23 14:34:38 is this what the getDistance(Location) method does? Jun 23 14:34:49 probably Jun 23 14:34:56 Ok Jun 23 14:35:00 Dont know why its so innacurate Jun 23 14:35:22 for what its worth, Euclidean does have a distance formula Jun 23 14:35:28 but i THINK its for 3D spaces Jun 23 14:35:34 Saying I moved 60 meters when the phone hasent moved... Jun 23 14:35:45 drose379: well the GPS isnt accurate Jun 23 14:35:52 ah, and as wikipedia says, it's equivalent to the Pythagorean theorem, on a Euclidian plane - and I did specify "on a plane" :) Jun 23 14:36:10 and if you arent using that, its the wifi or the cell towers Jun 23 14:36:22 but gps is 3D space, isnt it? Jun 23 14:36:28 xximdasonxx so whats the best way to track distance traveled by a user? Jun 23 14:36:33 gps Jun 23 14:36:35 well actually Jun 23 14:36:38 assuming you're doing geography, there's a point where it starts to matter that the earth isn't flat... Jun 23 14:36:38 depends on whats available Jun 23 14:36:56 techically lat/long is NOT a cartesian plane Jun 23 14:37:14 i am actually not sure how they work that out Jun 23 14:37:17 though Jun 23 14:37:29 your ideal way to track a user position is GPS Jun 23 14:37:37 which obviously doesnt work inside Jun 23 14:38:04 if youre doing coordinate geometry distance, just use the distance formula Jun 23 14:38:08 OK so im inside right now Jun 23 14:38:10 is that why its terrible Jun 23 14:38:15 gps? Jun 23 14:38:19 so you are likely using wifi, if available Jun 23 14:38:21 yeah gps isnt really accurate to inside Jun 23 14:38:29 if not, it will use triangulation from cell towers Jun 23 14:38:29 It literally just said i moved 70 meters... Jun 23 14:38:32 im sitting at a desk Jun 23 14:38:52 it does that, i have actually seen it jump all over the lakefront here in Chicago when I am in my apartment Jun 23 14:39:08 yeah haha. its not that GPS doesnt work inside, its just that the GPS on our phones are only accurate to like 50 meters or something Jun 23 14:39:15 drose379: there not only location of a point, but also a radius of circle you are in Jun 23 14:39:17 you should average things like that out Jun 23 14:39:22 bobbiejim: gotta love no military GPS :) Jun 23 14:39:23 which is why i wonder why google is so hellbent on indoor maps :P Jun 23 14:39:39 xximjasonxx i know right? why cant they just give us civvies real GPS's Jun 23 14:39:46 i wonder how accurate military GPS is :) Jun 23 14:39:52 i bet to the foot Jun 23 14:39:58 drose379: so it's likely you stayed in circle, but circle just moved a bit Jun 23 14:40:06 well they use it to guide cruise missiles so one has to hope Jun 23 14:40:07 interestingf Jun 23 14:40:08 xximjasonxx, to cm Jun 23 14:40:20 yeah its gotta be pretty damn accurate Jun 23 14:40:21 But how come google maps seems so accurate Jun 23 14:40:30 down to like 50 feet Jun 23 14:40:34 drose379: https://developer.android.com/reference/android/location/Location.html#getAccuracy%28%29 Jun 23 14:40:41 your gps should be +/- 50 feet too Jun 23 14:40:43 drose379: Ive seen plenty of cases where Google cant tell where I am Jun 23 14:40:56 thats why Uber specifies "Pickup Location" Jun 23 14:41:05 drose379: GPS gives a circle radius of a few meters Jun 23 14:41:19 Ok, so if im trying to find the distance moved by a user Jun 23 14:41:20 right now google maps is off from my distance in this building by about 20 meters Jun 23 14:41:29 I just get the distance from the last location Jun 23 14:41:33 and add that to a master Jun 23 14:41:38 Wud it be accureate? Jun 23 14:41:41 accurate Jun 23 14:41:59 its not always that simple Jun 23 14:42:01 I have a naked-eye 3D tablet, but I cannot find any documentation on how to display 3D video on its screen. It comes bundled with 3DVPlayer, which plays flv, mp4, and 3dv all in 3D. I know it can be done, but there does not seem to be any documentation on making your own 3D player using an Android VideoView. Jun 23 14:42:07 yeah GPS distance is weird Jun 23 14:42:14 drose379: consider, if you are driving and you take two points Jun 23 14:42:21 i took a class where the first section was on it. it was pretty complicated Jun 23 14:42:22 you might say the distance in 100ft Jun 23 14:42:30 but actually the person drove 1km Jun 23 14:42:40 because of the road distnace Jun 23 14:42:42 hmm Jun 23 14:43:02 * xximjasonxx obviously lives in the US and has little experience with metric (unfortunately) Jun 23 14:43:27 formula to convert metric are simple enough, don't worry Jun 23 14:43:34 so what would you reccomend for tracking total distance xximjasonxx Jun 23 14:43:47 drose379: honestly, I have never built a system that does that, so I dont know Jun 23 14:43:50 honestly fahrenheit makes sense for everyday use :P zero degrees is really cold, 100 degrees is really hot Jun 23 14:43:53 i imagine there is some good tools out there though Jun 23 14:43:58 when talking distance though feet and inches is so dumb Jun 23 14:43:59 *are Jun 23 14:44:10 xximjasonxx, for the US guys: gps is accurate in about 0.4 inch Jun 23 14:44:22 danijoo military GPS you mean? Jun 23 14:44:26 yep Jun 23 14:44:26 danijoo: Civilian? Jun 23 14:44:29 thats crazy Jun 23 14:44:34 nah def not civilian lol Jun 23 14:44:37 yeah, no Jun 23 14:44:39 civilian is 50meters Jun 23 14:44:39 would be cool though Jun 23 14:44:49 maybe in 20yrs Jun 23 14:44:53 :) Jun 23 14:44:54 bobbiejim: what is the temperature ice melts in F? Jun 23 14:44:54 danijoo, there's no difference between "civilian" and "military" gps Jun 23 14:45:02 and no, GPS can't get near 0.4 inch accuracy -_- Jun 23 14:45:10 Mavrik, accessible for civilian then Jun 23 14:45:15 Mavrik: that's not true Jun 23 14:45:21 icedp just above 32 degrees Jun 23 14:45:24 i think :P Jun 23 14:45:31 last I checked, the civilian population was not able to use the full range of GPS capabilities Jun 23 14:45:35 celsius freezing point is 0 right? Jun 23 14:45:37 that was reserved for military use only Jun 23 14:45:48 civilian GPS is obfuscated Jun 23 14:45:50 perhaps that has changed Jun 23 14:45:57 because of security Jun 23 14:46:02 ahh Jun 23 14:46:08 Mavrik: https://en.wikipedia.org/wiki/GPS_signals#Military_.28M-code.29 Jun 23 14:46:08 GPS was obfuscated until 1996 Jun 23 14:46:28 I thought that was when they passed the bill saying, you cant charge people to use GPS Jun 23 14:46:31 Initially, the highest quality signal was reserved for military use, and the signal available for civilian use was intentionally degraded (Selective Availability). This changed with President Bill Clinton signing a policy directive in 1996 to turn off Selective Availability in May 2000 to provide the same precision to civilians that was afforded to the military. The directive was proposed by the U.S. Secretary of Defense, William Perry, because of the Jun 23 14:46:31 widespread growth of differential GPS services to improve civilian accuracy and eliminate the U.S. military advantage. Jun 23 14:46:43 GPS has about 3m accuracy with 95% confidence interval Jun 23 14:46:56 its gotta be more accurate than that at this point Jun 23 14:47:00 id say down to the foot Jun 23 14:47:00 (meaning it's accurate to 3m 95% of times measured) with the best equiment Jun 23 14:47:02 so, what you are saying is, I can write an Android app to guide a cruise missile :) Jun 23 14:47:06 lol Jun 23 14:47:10 more than that is not possible due to orbital / timing drift Jun 23 14:47:11 hm.. then im confusing it with sth Jun 23 14:47:16 so do you guys think it wud be safe to set the mindistaance on my LocationListener to 50meters then? Jun 23 14:47:24 To only get movement more then 50 meters Jun 23 14:47:26 drose379: I think that is pretty standard Jun 23 14:47:28 danijoo, maybe Galileo or some other new upgrades Jun 23 14:47:34 ah lol. It was SAPOS that was 0.4 inch accuracy :S Jun 23 14:47:43 OK thanks xximjasonxx Jun 23 14:47:45 also beacons, cell towers and wifi can be used to augment data :) Jun 23 14:47:47 does using ButterKnife enlarge the method count of the final dex? Jun 23 14:48:27 (Don't get me wrong, even 5m accuracy is pretty awesome) :) Jun 23 14:49:48 cant find any actual number about galileo accuracy though Jun 23 14:51:09 "up to few centimeters", eventhough afaik Galileo was planned to be two-tiered - free GPS-like tier and commercial high-accuracy tier Jun 23 14:51:27 btw Mavrik, to me what you posted Clinton says Jun 23 14:51:40 "its not that we want it to be fair, we just found something better than GPS for location tracking" :) Jun 23 14:52:13 "about 85% of measurements achieve accuracy better than 2cm for a base line of 10km" Jun 23 14:52:24 thats GPS Jun 23 14:53:20 danijoo, ah neat, what kind of equipment? Jun 23 14:53:27 Mavrik, http://www.ifp.uni-stuttgart.de/publications/phowo07/220Eissfeller.pdf Jun 23 14:53:48 citation from page 189 Jun 23 14:55:10 ah well. this is after some weird calculation to archive better results Jun 23 14:56:07 yeah, and it uses a base station to improve measurment Jun 23 14:56:13 not to take us away from #GPS-chat :P but does anyone know how i can scale down my 300x300 image in the layout file? ive tried using android:scaleHeight/Width="some percentage" but it only scaled it so far Jun 23 14:56:13 and antenna on top of university building :D Jun 23 14:56:33 bobbiejim, scaleType center_inside Jun 23 14:56:35 ? Jun 23 14:56:42 lemme try that Jun 23 14:56:48 i think i tried it already :P but lets see again Jun 23 14:57:42 so what would I be able to do with the getAccuracy method Jun 23 14:57:47 it says it gets the accuracy in meters Jun 23 14:58:00 what would that represent? Jun 23 14:59:03 drose379: http://stackoverflow.com/questions/6328896/how-to-calculate-distance-between-two-points-in-driving-direction-mode-in-androi Jun 23 14:59:31 obviously that is driving, but I assume the model would be the same for walking or general movement Jun 23 14:59:46 drose379, We define accuracy as the radius of 68% confidence. In other words, if you draw a circle centered at this location's latitude and longitude, and with a radius equal to the accuracy, then there is a 68% probability that the true location is inside the circle. Jun 23 14:59:46 In statistical terms, it is assumed that location errors are random with a normal distribution, so the 68% confidence circle represents one standard deviation. Note that in practice, location errors do not always follow such a simple distribution. Jun 23 14:59:57 just saw that danijoo lol Jun 23 14:59:58 ups.longer then expected. sorry for spam Jun 23 15:00:00 I was gonna say nevermind Jun 23 15:00:31 The simple solution is just to measure position continiously Jun 23 15:00:36 and reject the inaccurate measurements Jun 23 15:01:39 depending on what you are using the location for, you could also average the last locations and check if the current one stands out too much Jun 23 15:01:42 but I need each measurement Jun 23 15:01:53 cause it tells how far the device moved Jun 23 15:02:00 I cant afford to discard any Jun 23 15:02:05 Hmm my button is still showing the text and not the drawable Jun 23 15:02:23 do i need to change a button's image programmatically? Jun 23 15:02:30 no location is better than an inaccurate one Jun 23 15:02:31 drose379, wrong. Jun 23 15:02:48 you must discard measurments that are not accurate enough or you'll get totally broken data Jun 23 15:02:52 you get enough locations for a continous track even when taking inaccurate ones out Jun 23 15:03:22 So say I get 3 location intervals Jun 23 15:03:35 and discard the second and third one Jun 23 15:03:39 ill only be left with the first Jun 23 15:03:45 thatll be inaccurate Jun 23 15:03:55 wait for the next 2 then Jun 23 15:04:09 orr Jun 23 15:04:20 actually nevermind Jun 23 15:04:36 I was gonna say I could get a base location when they first start and then just get distance from that Jun 23 15:04:48 given how this is done in Google, Nike, and other such apps, there is probably a library out there for handling this Jun 23 15:04:49 But then as they go back to their base location, it wud be messed up Jun 23 15:04:52 you just feed it the points Jun 23 15:04:57 i never used location service, so how many locationsdo you get per second? Jun 23 15:05:10 You ususally get 1 every 5-10 seconds Jun 23 15:05:19 danijoo_: you dont take it every second, but you discard if they havent moved far enough Jun 23 15:05:42 thhats still not that bad. Jun 23 15:05:49 https://code.google.com/p/little-fluffy-location-library/ Jun 23 15:05:50 :) Jun 23 15:06:03 just wait a few packages for the first location and then sort shitty ones out Jun 23 15:06:10 I mean no offense, we are all smart people Jun 23 15:06:20 but you probably dont want to be writing this algorithm yourself Jun 23 15:06:25 :) Jun 23 15:06:36 Mavrik that one goes every 15 mins Jun 23 15:06:36 not if theres something nice arround, yeah :) Jun 23 15:06:40 reusing is always better Jun 23 15:06:49 unless its for learning Jun 23 15:06:58 hrrmf Jun 23 15:07:13 I've yet to see a lib for that Jun 23 15:07:21 danijoo_: I dont disagree, but this is probably something that learning about might not be as helpful as you believe :) Jun 23 15:07:26 unless you intend to work at Google Jun 23 15:07:45 Has anyone here worked with displaying 3D video in an Android app? Jun 23 15:07:52 xximjasonxx, or you are interessted :) Jun 23 15:07:57 see page 2 how GPS track usually looks like: http://www.geocomputation.org/2007/1B-Algorithms_and_Architecture1/1B2.pdf :) Jun 23 15:08:03 that too Jun 23 15:08:49 So Ill just set the threshold to 50 meters Jun 23 15:08:54 get an update every 10 seconds Jun 23 15:08:59 and have a master number Jun 23 15:09:04 xximjasonxx, learning something is _always_ helpful Jun 23 15:09:04 every update, add to the master Jun 23 15:09:12 thatll hold the distance Jun 23 15:09:21 Mavrik: while true, I would say there are perhaps more pressing things one could learn about Jun 23 15:09:23 especially when you wanna move from "average" to "top of the charts" Jun 23 15:09:41 since you'll have to modify those libraries sooner or later to fit your usecase better Jun 23 15:09:48 especially when we're talking data analysis Jun 23 15:10:08 Yeah, I don't buy that about more pressing things :) Jun 23 15:10:26 :) Jun 23 15:14:21 is there a way to access a mysql database without hosting any php files? Jun 23 15:14:43 yeah but its not a good idea Jun 23 15:15:06 ... to do it directly Jun 23 15:15:15 there are still other languages than PHP :) Jun 23 15:15:28 ExeciN . Depends on the application. Localhost or an internal network is fine. Don't open mysql to the internet though Jun 23 15:16:01 its going to be localhost Jun 23 15:17:05 I have set mysql to only listen to localhost anyway Jun 23 15:17:23 why would you consider php then anyways? Jun 23 15:19:35 every guide I found online does it with php Jun 23 15:20:22 is there like a mysql library for android? Jun 23 15:22:48 SQLopenlite i think its called right? Jun 23 15:22:54 er opensqlite Jun 23 15:22:58 something like that Jun 23 15:23:21 Can't you just use a Java MySQL library? Jun 23 15:23:43 android is sqlite, not mysql Jun 23 15:24:13 For local storage, maybe ExeciN wants to talk to an external DB? Jun 23 15:24:15 oops, I said localhost, I meant local network Jun 23 15:24:27 Kephael, he said local host Jun 23 15:24:28 ahh Jun 23 15:24:54 i think any java mysql library will work with android too Jun 23 15:26:06 yeah, I'm not sure if you want to remotely connect to a DB directly Jun 23 15:26:58 if you dislike php theres still all kind of other languages you can use for backend Jun 23 15:27:03 It sounds like a bad idea but if it's some internal company application it might be okay. Jun 23 15:27:34 okay, but still not good :p Jun 23 15:29:14 The thing is that SQL protocols really aren't optimized for mobile links and don't handle connection problems very well Jun 23 15:37:19 heck. you should just build a backend that uses and API or other calls so no one can do any serious damage to the database Jun 23 15:38:12 I have a search filter in my listview and the listview is populated with database results.. if i use search filter would be good if i just use another search query and repopulate the listview based on the results? Jun 23 15:38:41 by default the listview is poulated with all table data Jun 23 15:39:12 What's the best way to manage notifications? Jun 23 15:39:24 If I have multiple instances being created and each one needs its own notification Jun 23 15:39:26 i was thinking of adding another asynctask to query for that specific data Jun 23 15:39:45 is there some library or something that can assist in creatign and managing a number of notifications Jun 23 15:48:40 dvass haven't seen anything; the apis are clumsy though Jun 23 15:49:30 ok i am still fuzzy Jun 23 15:49:40 can you not start a service from AlarmManager? Jun 23 15:52:32 I am using the MultipartEntitiy to send a file to my php script, in my script I do a validation if the file extension is ok...anyhow when I echo the extension I get this output: txttxt for .txt extension. In my browser my php script works fine. any ideas how this could happen? http://pastebin.com/GmeEwWU4 line 108 Jun 23 15:53:45 hi, is there a way to restore app state on screen rotation, without need to set each instance from Bundle manualy in onrestoreInstanceState? Jun 23 15:54:47 something like moving app to background and restoring - no need to do "anything special" - app will restore its state on "its own" Jun 23 15:57:45 i continue to be confused with the notion that a receiver declared in the manifest is always active Jun 23 15:57:46 I am lookin what is saved in Bundle and there are things that I need to reuse on screen rotation, is there a way to restore them from within onRestoreInstanceState globally - at least some of them Jun 23 15:57:57 Design patterns stuff, if I have a master layout that I'd like to use globally, am I best to just have this one base layout, then for each different activity load a different fragment to provide the actual content, so the drawer etc is the same, I set that up from a base class. Or is there a way to have a template layout? I guess the other option would be to duplicate DrawerLayout everywhere then just include all my nav draw and toolbar stuff? Jun 23 15:57:59 however, very clearly when I exit my app from the task manager, I cease getting intents Jun 23 15:58:24 because screen configuration is changed on screen rotation so changing view for view is not possible, if I am right... Jun 23 15:59:24 bolovanos, I don't understand your questions. Jun 23 15:59:35 bolovanos, the way to keep the state is to store it between orientations Jun 23 15:59:41 what's your _actual_ problem? Jun 23 16:00:10 forgot to say - I need to restore searchView query, listView content and position of first item of list view that was visible to user before rotation Jun 23 16:00:38 Mavrik, I am able to store those things manually Jun 23 16:01:05 Mavrik: if I kill an app through the task manager Jun 23 16:01:11 but I do not know whether is there any easyer way to do it - restor from bundle, where i can se - for example position of listView Jun 23 16:01:16 does it nuke the receivers so even if the alarm manager broadcats, it wont hear it? Jun 23 16:01:22 bolovanos, hmm, that should actually work by default Jun 23 16:01:26 since views have their own store Jun 23 16:02:21 unless you of course manually clobber the saved state in them Jun 23 16:02:35 Mavrik, i thought so - because i can see those variables in Bundle "2131689551=AbsListView.SavedState{4216d540 selectedId=-9223372036854775808 firstId=-1 viewTop=0 position=0 height=1414 filter=null checkState=null}" Jun 23 16:03:16 Mavrik, what is happening - on rotation I am going through onCreate state, and then onRestoreInstanceState Jun 23 16:03:47 Mavrik, when moving app to background and restoring app is not going through onCreate Jun 23 16:03:56 just onResume Jun 23 16:04:10 Yeah. Jun 23 16:04:46 and in onCreate is initialization of whole app, which destroys all object previously stored before rotation finished Jun 23 16:05:50 I was trying to implement "if (savedInstanceState != null) {" from http://developer.android.com/training/basics/activity-lifecycle/recreating.html#RestoreState Jun 23 16:06:13 but it ends up in NullPointerException in onCreateMenu Jun 23 16:06:32 can anyone think of a java interface that simply aggregates other smaller-role interfaces (interace X implemeny A,B,C) ? Jun 23 16:06:33 and anyway it supply onRestoreInstanceState Jun 23 16:09:44 maybe this helps http://stackoverflow.com/questions/456211/activity-restart-on-rotation-android Jun 23 16:16:15 i've just had a weird compiling problem. http://pastie.org/10255034. changes in the if or else blocks were compiled, below (the log statement) weren't. Jun 23 16:16:49 had to clean the project and then it worked Jun 23 16:17:11 ugh Jun 23 16:17:27 when i use PendingIntent.getService my service does get called by only one time Jun 23 16:17:29 then never again Jun 23 16:20:04 Is it difficult to fix so that my app adapts to different screens and tablets? Went through some videos where they did that some time ago but forgot if there was much work to do Jun 23 16:21:14 Zajtarn . different screen resolutions easy, different aspect ratios a little trickier but still doable Jun 23 16:21:32 okok what do you have to do to fix different screen resolutions? Jun 23 16:21:48 Here's a resource you can look over : http://developer.android.com/guide/practices/screens_support.html Jun 23 16:21:53 well, it's strange. the log statement appears in the decompiled file, but doesn't work Jun 23 16:23:05 Zajtarn, depends on how much you messed up designing the original Jun 23 16:23:13 Good designs are automatically fine on all sizes Jun 23 16:23:32 Bad designs and implementations sometimes have to be thrown away completely. Jun 23 16:24:19 Gryd3`Shop ty gonna check that link. Mavrik alright don't know if my design are good but you search for movies and if you click on a view, then another activity comes up with just text information in paragraphs Jun 23 16:24:52 So why doesn't it already adapt? Jun 23 16:24:59 Are you using fixed preprogrammed sizes? Jun 23 16:25:11 Do you have parts of layouts that can stretch on different screens? Jun 23 16:27:10 wow...it's insane; if i remove the Toast statement the log logs Jun 23 16:27:48 it's like the toast statement is causing the method to return Jun 23 16:28:14 it doesn't Jun 23 16:28:43 that doesn't happen Jun 23 16:36:17 Hello i have two textview inside a relative layout i want one of them to stick at dead left and one of them to align to dead right Jun 23 16:36:47 by dead right and left i mean extreme right and left Jun 23 16:38:50 Mavrik what do you mean with fixed preprogrammed sizes? In the xml, then I got some margin values, but other than that I got no like textSize or something Jun 23 16:39:09 Where can I test different phones without using the emulator? Jun 23 16:40:03 hi guys, I would like to refresh my ListView so what I did is to call notifyDataSetChanged() of the adapter, but the list scroll up to the begining after Jun 23 16:40:31 I just want that it doesn't scroll up, but stay at the same position that it appeared Jun 23 16:41:22 on the web development work, an ajax request would do the trick Jun 23 16:42:32 can you anyone lend a hand. How do I continue to allow my broadcast receiver to receive intents after the app has been closed via task manager? Jun 23 16:43:37 boodllebat: What have you tried? Have you used android:layout_alignParentLeft="true"? Jun 23 16:45:51 surf2b1: yes worked for me thanks :) Jun 23 16:46:18 So right now i have an activity that allows the user to swap between two different views. i want them to be able to take pics on one view and save it to a gallery separate from the other view's gallery, how can i do this? i can paste pieces of it if need be Jun 23 16:46:41 right now i have it so that the pics taken on either view save to the same gallery in the app Jun 23 16:50:44 If I have a FrameLayout into which I inject a fragment, how can I have the fragment top align when I'm using app:layout_behavior="@string/appbar_scrolling_view_behavior" so that it may be in a coordinatorlayout? Jun 23 16:52:18 How can i give radius to liner layout without creating another xml file ? Jun 23 16:52:51 Actually I guess what I said makes little sense... Jun 23 16:58:51 radius? boodllebat ? Jun 23 16:59:38 so who's been using CoordinatorLayout? Jun 23 17:01:41 well...solved. the problem was that Bolts (for Tasks) were being incorrectly used Jun 23 17:07:47 Mavrik got any thoughts? Jun 23 17:07:57 Afzal: yes Jun 23 17:08:26 Afzal: i wanna set radius in existing XML i dont wanna create another XML and set background drawable to it Jun 23 17:08:37 Zajtarn, I'm still not sure what your problem is Jun 23 17:08:48 Zajtarn, if you didn't hardcode stuff, then your designs should "just work" Jun 23 17:08:57 go run them on Genymotion and see for yourself Jun 23 17:09:15 Now I wanna try my design on different screens, but what counts as hardcode? That's why I'm unsure Jun 23 17:09:20 alright what's genymotion? Jun 23 17:09:38 emulator Jun 23 17:09:44 a bit better than default one Jun 23 17:10:58 alright gonna try downloading it and see if it's fast : Jun 23 17:11:06 It is fast Jun 23 17:11:20 nice :) Jun 23 17:14:14 hi guys Jun 23 17:20:04 do the knew text input widgets from the support library support floating labels? Jun 23 17:22:56 anyone have the link to the chris barnes text validation stuff Jun 23 17:25:04 I *think* design support has floating labels, yeah Jun 23 17:25:32 I'm working on an android app built with gradle, I built and tested my changes with './gradlew assembleDebug' which produced an apk that install and ran on my phone, but './gradlew assembleRelease' creates a release apk that my phone says it can't parse, any ideas? Jun 23 17:25:41 groxx, yes it has Jun 23 17:26:14 you have to wrap EditText in TextInputLayout Jun 23 17:26:15 if design support doesn’t have them, there are a couple libraries that do it, and it’s easy enough to roll your own Jun 23 17:26:41 i have a library, i want to phase it out Jun 23 17:26:54 moparisthebest, have you uninstalled the debug version? Jun 23 17:26:55 someone posted a link to chris barnes i think? showing how to do it with support library Jun 23 17:27:24 Anyone have that link? its a g+ post i think, it has like text email / password with chooser buttons for login/register? Jun 23 17:27:47 lasserix, open g+ and check his profile maybe? Jun 23 17:28:20 hello, please i have question about raiting how can i add icon about supervision advised of parents Jun 23 17:28:35 wirrez . Splash screen in the app Jun 23 17:29:14 I think PEGI raiting Jun 23 17:29:41 https://support.google.com/googleplay/answer/6209544?p=appgame_ratings&rd=1 Europe Jun 23 17:30:37 wirrez, when you upload the app, you have to answer some questions and they will give u appropriate rating Jun 23 17:30:45 ^ Jun 23 17:30:50 In the SDK manager the latest google play services is rev 25, how do I know which version number is it for build.gradle ? Jun 23 17:30:52 the icon will be automatically added after validation Jun 23 17:30:57 where can I find older versions? Jun 23 17:31:31 viran, https://developers.google.com/android/guides/setup shows you the latest version Jun 23 17:31:43 .... Yes, I have icons Everyone 3+ but its streaming app and the content is individual Jun 23 17:32:03 or i will send mail to google cause i dont know what i have to answere :D Jun 23 17:32:09 danijoo_: thanks, is there an archive for older versions? Jun 23 17:32:23 have you answered the question about usergenerated content with yes wirrez Jun 23 17:32:24 ? Jun 23 17:33:16 wirrez, google does not answer mails ^^ Jun 23 17:33:36 and you should be able to answer the survey, questions are very easy and it's your app so you know it Jun 23 17:33:42 viran, no idea. why would you want to use an older one? Jun 23 17:35:31 danijoo_: for some reason the latest version adds SDCARD write permissions to my app.... Jun 23 17:35:36 i have ppl in gog :) Jun 23 17:36:00 I dont want to waste time for trying and get the right icon .. Jun 23 17:36:16 ... Jun 23 17:36:38 wirrez, its not your job to try to get an icon Jun 23 17:36:49 its your job to answer the question and get the icon they give you Jun 23 17:37:05 <3 human kind Jun 23 17:37:18 ... I answered and get Everyone ( 3+ ) but it not corrent... Jun 23 17:37:46 you have a link in your mail, something like: https://iarcweb.azurewebsites.net/Dashboard/Request/***** Jun 23 17:38:03 telling you, please explain why you believe that the selected ratings are incorrect Jun 23 17:38:08 not stop wasting our time too please Jun 23 17:38:10 now* Jun 23 17:38:12 wirrez, its not your job to rate. period. Jun 23 17:38:45 "Please complete this form by clicking on each rating that you believe is incorrect. Use the text area below to fully explain why you believe the rating(s) assigned should be adjusted. You will receive an email response within 1-3 business days. At that point, we may require additional materials (e.g., screenshots, video snippets) in order to complete the rating check process." Jun 23 17:38:52 it's very easy Jun 23 17:38:55 you have no more excuse Jun 23 17:39:40 ahh it was cyril mottier Jun 23 17:39:41 https://plus.google.com/+CyrilMottier/posts/j9FKakj2d7s Jun 23 17:39:44 the irony is that you probably failed at properly answering the initial survey Jun 23 17:40:20 the reason is variable content which is downloaded to app. Maybe i dont find text area i take a look. Jun 23 17:40:40 oh sorry lasserix, it was me who forwarded this link yesterday iirc Jun 23 17:41:55 how do you solve onCreate call on every screen rotation? do you use android:configChanges="orientation|screenSize", or what is your solution? Jun 23 17:42:14 hey all, why would a Period return 0 days when the interval spans 7 days Jun 23 17:42:27 bolovanos, http://developer.android.com/guide/topics/resources/runtime-changes.html Jun 23 17:42:35 boodllebat: saveinstancestate Jun 23 17:42:41 or retained fragment Jun 23 17:42:55 or singelton + saveinstancestate (just dont leak context in the singelton) Jun 23 17:43:29 adq, yes - i was there and through other guides Jun 23 17:44:02 I am asking what people here are using, what is the best payof Jun 23 17:44:04 f Jun 23 17:44:25 iirc it's not recommanded to use configChanges, as you figured out since you asked other solution Jun 23 17:44:35 despite this one is the easiest but not the best one Jun 23 17:45:07 "This technique should be considered a last resort when you must avoid restarts due to a configuration change and is not recommended for most applications." Jun 23 17:45:39 yes I have red that - therefore I am asking Jun 23 17:45:42 it works fine for speeding up rotation, but configChanges does exactly nothing to address the _actual_ problem of not saving state correctly. ignore it until you've fixed state-saving. Jun 23 17:46:20 ugh f---k fabric and their auto install of stuff Jun 23 17:46:32 yeah, much hate Jun 23 17:46:37 so f--king annoying when some plugin/program does this kind of thing Jun 23 17:46:47 just let me do it, i know what the -fk i am doing Jun 23 17:47:10 groxx, so u suggest saving states according to manual and recreating them the way it's said? Jun 23 17:47:48 bolovanos: saving state is the best route imo Jun 23 17:47:56 it seems to be like resource waisting, when all object are gone on each rotate :/ Jun 23 17:48:19 bolovanos: save them in the bundle and restore them Jun 23 17:48:30 or better yet. Keep them in a DB and just reload that data Jun 23 17:49:07 lasserix: see line 13 i tried to apply radius but its not working http://paste.ubuntu.com/11763465/ Jun 23 17:49:16 I haven't found to recreate my own object in put methods Jun 23 17:49:25 bolovanos Jun 23 17:49:36 danijoo_: yes I've uninstalled the debug version, if I try to install the new one with adb my phone reboots, if I copy it to the phone and install from there it complains it can't parse the package Jun 23 17:49:39 just one thing was the closest putSerialisable, but it does not work for mine objects? Jun 23 17:49:54 lasserix, yes? Jun 23 17:49:59 I am trying to make a mysql connection from my app but it just doesn't work. this is the code I am using https://gist.github.com/anonymous/9b65f05a7f6c067e21a1 and this is the log I am getting https://gist.github.com/anonymous/1b6b4f2e13d904b96361 any idea on what the problem is? Jun 23 17:50:11 request beep.boop.bop Jun 23 17:50:32 bolovanos: it works, it's pretty slow though. Best to use parcelable. There's a tool that helps you implement parcelable on POJOs: http://www.parcelabler.com/ Jun 23 17:50:38 ExeciN: there's no jbdc on android Jun 23 17:50:55 boodllebat: Jun 23 17:51:00 bolovanos Jun 23 17:51:01 http://pastebin.com/UBDg32gt Jun 23 17:51:04 lasserix: yes Jun 23 17:51:09 groxx: I imported jdbc Jun 23 17:51:11 boodllebat: nm wrong tab Jun 23 17:51:36 bolovanos: in the shape drawable the color should be 3d566e Jun 23 17:51:43 ExeciN (1) jdbc can't be used for WAN (2) you need a web service (3) android's jdbc is .. not maintained Jun 23 17:51:46 bolovanos: now with that being said, I'm pretty sure I've been lazy in some cases and used serializable to get it up and going. Jun 23 17:51:59 but you can just add that as a #3d566e Jun 23 17:52:17 directly connecting to a database over the internet just seems like insanity to me :| Jun 23 17:52:19 lasserix: in my xml file ? Jun 23 17:52:28 lasserix: that'd be great Jun 23 17:52:34 quinnjn, ok thx for directing me :) Jun 23 17:53:17 ExeciN: oh, heh, problem is simpler than that. looks like you're trying to do that on the main thread, which isn't allowed. Jun 23 17:53:53 ExeciN: further down the stack trace is the "caused by" chain, which ends in: "Caused by: android.os.NetworkOnMainThreadException" Jun 23 17:54:00 toss it on a background thread, it may work. Jun 23 17:54:07 lasserix add it to your styles (the color definition) Jun 23 17:54:21 then add the one thing to res/drawable which is the shape stuff, then the background points to the shape Jun 23 17:54:32 i just add the color to your styles since it is kinda part of a theme Jun 23 17:54:44 and if you use it multiple places, you can just change it once there Jun 23 17:55:50 i'm curious, why does AdapterView exist when I can easily get most things the AdapterView can do from an Adapter? Would I use the AdapterView to redraw something? Jun 23 17:56:39 bolovanos: yep, I would recommend saving and recreating. saving state will also let you resume the app after the process has died (which happens all the time in the real world, though rarely while developing). _after_ you have that working, using configChanges for things you _know_ you can handle makes perfect sense. Jun 23 17:56:40 adapterview is an abstract class shoerain Jun 23 17:56:51 see listview and co Jun 23 17:56:51 the description between the two here doesn't seem helpful to me: https://stackoverflow.com/questions/20553773/ Jun 23 17:57:26 top answer covers it pretty well Jun 23 17:57:31 Adapter is not a view. Jun 23 17:57:51 it provides a framework for reusing views and binding data to them, but it doesn't do any kind of layout. Jun 23 17:58:07 for sure groxx, but listview, gridview inherits from adapterview Jun 23 17:58:16 but not Adapter Jun 23 17:58:18 data <- adapter -> listview Jun 23 17:58:33 yeah but he said "AdapterView" Jun 23 17:59:01 groxx, thx, btw - any idea how to adress position from Bundle, which look liek "2131689551=AbsListView.SavedState{4200a1a0 selectedId=-9223372036854775808 firstId=4 viewTop=-92 position=4 height=528 filter=null checkState=null},"? Jun 23 17:59:23 bundle.getInt("position") probably. check the Bundle documentation. Jun 23 18:00:28 groxx, yes thats exactly what I have done accordingly to docs, but it returns zero, even the real value is different Jun 23 18:01:46 groxx, adq: still confused, but alrihgt Jun 23 18:02:00 danijoo, and other next people.. how to get parental guidance recommended icon you have to contact IARC. Jun 23 18:02:11 read more on this topic, practice a bit, it will be clear to you, just understand the data are separated with the UI Jun 23 18:02:14 position: '0', listViewPosition: '4', where position is "savedInstanceState.getInt("position")" and listViewPosition is "savedInstanceState Jun 23 18:02:15 .getInt(STATE_LISTVIEW_POSITION)" - the last one is created by my using putInt... Jun 23 18:02:18 and something in between is there to link both of them Jun 23 18:02:29 bolovanos: AbsListView.SavedState isn't a bundle. Check your types. Jun 23 18:03:29 groxx, I said Bundle because it is incorporated in that Bundle ... Jun 23 18:03:40 there any way to keep a receiver alive after an app is closed from the task manager Jun 23 18:04:04 if you have a in a bundle, and contains , you probably can't get directly from the bundle. get the first. Jun 23 18:04:48 groxx, ... its bit deeper in structure Jun 23 18:05:06 xximjasonxx: if it was a "force stop", no. by design. if they just swiped it out of the recent apps list, it'll still be "alive" - are you trying to keep the process alive? Jun 23 18:05:28 bolovanos: why do you need the position? if you're doing it for retention Listview can retain itself. Jun 23 18:05:38 xximjasonxx: actually, is this a broadcast receiver in your manifest, or is it one you created and registered in code? Jun 23 18:05:45 manifest Jun 23 18:05:47 but this means that I am unable to adress that because the number can, and probably will change Jun 23 18:06:03 manifest one will still exist. your process may die, but it'll be restarted if a broadcast occurs Jun 23 18:06:06 basically, trying to run some logic periodically, if a certain condition is met raise a notification Jun 23 18:06:20 so i got an alarm manager sending off my intent string Jun 23 18:06:31 it works fine, when the app is in the foreground and background Jun 23 18:06:39 soon as i swipe it out of that list however, the notifications stop Jun 23 18:06:46 could it be an emulator thing? Jun 23 18:06:48 groxx: Jun 23 18:06:58 quinnjn, my listView does not retent it's self. when going through onCreate (when rotate screen), every init function is started and therefore results are erased Jun 23 18:07:01 xximjasonxx: hm. should be fine. Jun 23 18:07:19 bolovanos: state = listView.onSaveInstanceState(); / listView.onRestoreInstanceState(state); Jun 23 18:07:27 groxx: i know, its frustrating Jun 23 18:07:35 everything i read says this should work Jun 23 18:07:40 but yet... Jun 23 18:08:09 bolovanos: see http://stackoverflow.com/a/5694441/1473536 Jun 23 18:08:32 xximjasonxx: seems likely that what you've written relies on the process staying alive. swiping will kill processes (and on M, it'll even kill foreground processes, which seems stupid. we'll see if that stays until release.), but it doesn't change your manifest-component states Jun 23 18:08:40 quinnjn, thx going to study :) Jun 23 18:12:22 xximjasonxx: have any code you can stick on pastebin or something? I / someone could take a look, see if there's something obvious Jun 23 18:12:33 working on it Jun 23 18:12:54 its in Xamarin, so I am converting it to the equivalent Java synta Jun 23 18:12:57 *syntax Jun 23 18:13:16 Hey. Anyone knows how to get the activity background color via xml? Jun 23 18:13:27 _get_ the color? Jun 23 18:13:34 xml only sets Jun 23 18:13:37 it never gets Jun 23 18:14:21 ugh. I've read on SO that ?android:attr/colorBackground should work but it just returns white. While the activity is I think #EEE Jun 23 18:14:45 that'll be the system default background color, not the color of yours Jun 23 18:14:55 it returns the color you set in your style.xml Jun 23 18:15:12 not the stuff you set somewhere in code or layout Jun 23 18:15:19 Is there any way to return the bg color that the activity uses? It's probably style specific as I didn't modify anything. Jun 23 18:15:39 groxx: http://pastebin.com/S92tBdC0 Jun 23 18:15:45 asimas: it'll be coming from your theme, most likely. or some other view with a background. Jun 23 18:16:09 I'm unable to put wrap_content inside wrap_content Jun 23 18:19:12 xximjasonxx: worth reading https://developer.android.com/training/scheduling/alarms.html if you haven't. and fwiw: 10 second repeating alarms won't work reliably in the future (the shortest possible is turning into 60 seconds), because short alarms are terrible for battery life. Jun 23 18:19:34 yeah i am noticing that in the emulators Jun 23 18:19:46 doesnt matter, its jsut for testing, actual interval is one day Jun 23 18:19:47 xximjasonxx: also: setRepeating will be _inexact_, so it may arrive a fair bit later. have you waited e.g. at least 2 minutes? Jun 23 18:19:56 that'll work :) Jun 23 18:20:12 of course, waiting one day to see if it works is, well, inefficient :) Jun 23 18:20:16 you probably don't want elapsed realtime then, but is that for testing too? Jun 23 18:20:19 and my boss wouldnt be overly happy with me Jun 23 18:20:23 haha Jun 23 18:21:01 the realtime was what i had intended to go with Jun 23 18:21:22 oh, actually: elapsed realtime should work, but / because alarms won't survive a device reboot. Jun 23 18:21:47 so as long as the device lives longer than a day, it should fire in ~ a day Jun 23 18:21:52 yeah i have been reading a whole lot of stuff about recreating alarms when the device reboots Jun 23 18:22:07 well, the condition we are searching for can only be met twice a month Jun 23 18:22:10 and we knows the days as well Jun 23 18:22:26 so i suppose i could also create two separate alarms Jun 23 18:22:31 and have them fire a month apart Jun 23 18:22:42 but i figured this was the most straightforward approach Jun 23 18:23:09 and to answer your previous question, just waited 3m and no notifications after I closed the app from the Task Manager Jun 23 18:23:23 by "closed the app from the task manager", what exactly are you doing? Jun 23 18:23:24 i have tried both the Xamarin emulator and the stock emulator as well Jun 23 18:23:37 hitting the recent tasks buttong and "flicking" it out of the list Jun 23 18:23:39 *button Jun 23 18:23:46 I really thought that getting activity's bg color would be much easier @_@ Jun 23 18:24:12 asimas: naw, outside of textcolor colors in android can be a pita Jun 23 18:24:13 one second Jun 23 18:24:42 :/ should be fine then. and to double check: the receiver is declared in your manifest (with that action), it's not set as disabled (this can be in code or the manifest), and/or you're not creating a new instance and calling registerReceiver anywhere? Jun 23 18:25:10 ugh, bintray download statistics charts are busted right now Jun 23 18:25:11 how annoying Jun 23 18:25:23 there is a call to register receiver Jun 23 18:25:26 but its for a different ereceiver Jun 23 18:25:28 not this one Jun 23 18:26:02 asimas: you try this? http://pastebin.com/Lb07ZnLC Jun 23 18:26:24 i imagine if you can set the decor view you can also get it, but i am speculating Jun 23 18:26:59 xximjasonxx, trying to do it in xml :| Jun 23 18:27:09 groxx: when you say action, do you mean intent-fliter? Jun 23 18:27:11 *filter Jun 23 18:27:27 xximjasonxx: yeah. a filter for that action (the string you're creating the intent with) Jun 23 18:27:28 asimas: you are trying to "get" something in XML? Jun 23 18:27:32 groxx: yes Jun 23 18:27:50 Should I be building google/dagger examples in AS or intellij. Neither seems to be playing nicely with it right out of the box Jun 23 18:27:57 I'm trying Intellij at the moment Jun 23 18:28:09 xximjasonxx, I'm trying to "get" the pre-set activity background color from the theme that I'm using. Jun 23 18:28:31 asimas: i dont entirely follow Jun 23 18:29:09 perhaps, you gave a third party theme and you want to pull a particular drawable from this theme? Jun 23 18:29:13 *have Jun 23 18:29:21 or color resource Jun 23 18:29:55 asimas: you can resolve the attribute in code. I forget exactly how, but it's somewhere in Resources (probably something like getColor(android.R.color.activityBackground) Jun 23 18:30:26 attrs might have two / multi step resolving though Jun 23 18:31:15 groxx: additionally i have tried pushing the receiver to a different process Jun 23 18:31:18 but to no avail Jun 23 18:31:22 quinnjn, any idea what is that "getListView()" he used? Jun 23 18:31:32 multiple processes usually leads to tears :) Jun 23 18:31:39 dont remind me Jun 23 18:32:07 How stupid is it that you can't make a view of the same color as the background. Via xml attributes that is. Jun 23 18:32:26 xximjasonxx: dunno. you get multiple toasts if you let it sit there? and after you swipe and relaunch, do you get more toasts? Jun 23 18:32:32 anyone good with gradle? :) Jun 23 18:32:33 negative Jun 23 18:33:03 asimas: so you're not trying to get, you're trying to use the color in another location? just set background=?android:attr/the_attribute. Jun 23 18:33:21 xximjasonxx: negative how, exactly? Jun 23 18:33:42 for example, right now i have the app running in the emulator. Every minute, I see my toast pop up Jun 23 18:33:49 if i hit home (center button) Jun 23 18:33:58 I continue to get them Jun 23 18:34:16 however if i hit the recent button (square) and swipe my app out of the list Jun 23 18:34:43 my debugger disconnects (as I expect it would), but I receive no additional toasts, nor do I see any additional messages in LogCat Jun 23 18:35:28 because your filtering on your package Jun 23 18:35:30 which you just quit Jun 23 18:35:38 do you get toasts again if you relaunch the app? (not make a change -> rebuild -> reinstall, but just tap the app icon or something) Jun 23 18:35:39 change the filter in the top right corner Jun 23 18:36:27 yes Jun 23 18:36:36 i continue to get intents Jun 23 18:36:47 lasserix: i dont see anything in my LogCat that is not associated with the tag i provided the message Jun 23 18:37:25 change your filter to no filter Jun 23 18:37:30 make sure you have a device still connected Jun 23 18:37:41 i did so Jun 23 18:38:11 xximjasonxx: what OS are you testing on, btw? not the M preview, hopefully? Jun 23 18:38:18 Lollipop Jun 23 18:38:21 5.1 Jun 23 18:39:46 O.o Jun 23 18:39:58 You're running code every 10 sec to check for once-per-month condition? :) Jun 23 18:40:07 xximjasonxx: try `adb shell dumpsys alarm` and see if the alarm exists after swiping (you should be able to see it while it's working). I'm kinda wondering if it's just becoming really low priority or something... Jun 23 18:40:18 Mavrik: i consider it very efficient :) Jun 23 18:40:34 is there a way to get the calculated weightSum of a linearlayout? If I do ll.getWeightSum(), I'll get a -1.0f, and not 10.0f, which is what I was expecting in http://sprunge.us/iOXh from what I've read on StackOverflow: http://stackoverflow.com/a/12719917/198348 Jun 23 18:40:39 ohh that was weird Jun 23 18:40:41 it just worked Jun 23 18:41:02 groxx: ehh maybe i needed to wait 5m Jun 23 18:41:09 after swiping out Jun 23 18:41:20 let me monitor this and see Jun 23 18:41:27 xximjasonxx: ah, also: try using SystemClock.currentTimeMillis() instead of currentThreadTimeMillis Jun 23 18:41:48 is the application onCreate ran before any activity onCreate when starting the app for the first time in a lifecycle? Jun 23 18:41:53 yes Jun 23 18:41:54 ah, guess that's not on SystemClock. System.currentTImeMillis() then Jun 23 18:42:30 lasserix: yep. also when resuming. it'll happen before any activity onCreate. Jun 23 18:43:43 looks like it was a fluke, no intents received since 1:38cst Jun 23 18:43:49 5m Jun 23 18:43:54 yeah ijust had a stat ebug come bak, though i fixed it but somehow exact same thing cropped up--tried it from another device, didn't happen (not a device dependent bug) hate when that happens Jun 23 18:44:23 oh gawd im changing the apk name in the build.gradle but Android Studio is searching for the old one to run (even after the new one is compiled with the new name) could anyone give me a hint :) Jun 23 18:44:30 take that back, i didnt see them in logcat, had to reapply the filter Jun 23 18:44:31 its working Jun 23 18:44:40 lasserix: it does _not_ reliably happen before ContentProvider.onCreate, if that's relevant. but I think everything else only happens after. Jun 23 18:44:46 ok groxx, so I guess it must get deprirotized Jun 23 18:44:53 groxx thanks Jun 23 18:45:12 xximjasonxx: also check the currentTimeMillis vs currentThreadTimeMillis. I wonder if it's getting registered with a crazy / far-future time after the first. Jun 23 18:45:47 I think currentThreadTimeMillis is an elapsed measure, not wall-clock. Jun 23 18:47:20 alarmManager.SetRepeating(AlarmType.RtcWakeup, new GregorianCalendar().TimeInMillis, 10000, pendingIntent); Jun 23 18:47:24 so I dont have that method in Xamarin, best I can come up with is: Jun 23 18:47:27 *that Jun 23 18:47:41 O.o Jun 23 18:47:55 or i might have it, just not on a System class, since System matches a namespace in .NET Jun 23 18:48:02 are you deliberately trying to kill users battery in 5 hours? Jun 23 18:48:07 yes Jun 23 18:48:12 3 i am hoping :) Jun 23 18:48:19 No seriously. Jun 23 18:48:20 Don't do that. Jun 23 18:48:24 its testing code Mavrik Jun 23 18:48:24 this isnt even working on lollipop Jun 23 18:48:29 Indeed. Jun 23 18:48:35 xximjasonxx, doesn't matter Jun 23 18:48:36 the actual check is done once a day Jun 23 18:48:43 Just... don't do dumb shit. Jun 23 18:48:50 xximjasonxx, lollipop throttles that to 60 seconds Jun 23 18:48:55 danijoo_: i have noticed Jun 23 18:49:21 again, its fine, its going to be once per day when I actually finish, right now I just want to make sure the notification is occurring Jun 23 18:49:40 no user devices are being harmed as part of this process :) Jun 23 18:51:46 I want to create a library to monitor and check changes in wear data storage (data, messages, maybe even channels). Right now, it's an activity that you start, which basically means you can't observe these things live when doing it in your app Jun 23 18:52:29 Any suggestions on what kind of interface would be more useful? Keep in mind that it has to be a library that is included in the app because the application id has to be the same to access wear data store Jun 23 18:52:39 Could make it a logcat thing... :/ Jun 23 18:55:01 danijoo_: Mavrik so how much does lollipop throttle alarms when the associated app is closed? Jun 23 18:55:32 it sets them to at max 60s and then executes them in batches if the CPU is running Jun 23 18:55:46 i see Jun 23 18:56:06 i think that is where i am fuzzy. Cause when I close the app, I have to wait 5m or so before I see my notifications return Jun 23 18:56:09 again, its fine Jun 23 18:56:18 but it makes me thing they are not working Jun 23 18:56:20 :) Jun 23 18:56:30 no input, nobody does wear dev here? Jun 23 18:56:41 close to nobody Jun 23 18:57:11 yeah I guessed, I don't like doing wear stuff either :p Jun 23 18:57:17 nature of the job though Jun 23 18:58:07 almost 6m since last intent capture Jun 23 18:59:48 groxx: so i think i spoke too soon Jun 23 18:59:51 Did you check dumpsys alarm? Jun 23 19:00:00 xximjasonxx: sorry about the over aggressiveness of the room :) we tend to encounter the biggest, most obvious mistakes, and assuming the worst saves a ton of time normally Jun 23 19:00:14 groxx: i spent many years on IRC in the PHP chats years ago Jun 23 19:00:20 i know how it goes :) Jun 23 19:00:21 yeah, dumpsys. see if it's actually there. Jun 23 19:00:29 g00s: you here? Jun 23 19:00:34 yeah, i had terminal open and everything and then, got distracted Jun 23 19:01:07 dumpsys has tons of useful info, it's worth poking into Jun 23 19:02:24 confirmed, it is in there Jun 23 19:02:44 ha Jun 23 19:02:44 if you dumpsys | grep "DUMP OF SERVICE" you can use those names to "dumpsys " that section only Jun 23 19:02:49 4 wakeups and 4 alarms Jun 23 19:03:50 i think it might just be coming in batches since i have the interval set so low Jun 23 19:04:01 cause its working right now, i think it just takes forever Jun 23 19:04:12 btw, considered using JobScheduler on 5.x_ Jun 23 19:04:14 ? Jun 23 19:04:30 i hadnt read up on it, but this app has to target 4.x Jun 23 19:04:33 is there a compat lib? Jun 23 19:05:23 see i am wondering how much of this is Lollipop just throttling as it should and me either being unsure of those timing or they being irregular so you dont know when you might see it Jun 23 19:05:34 which is funny because its showing up every minute right now, with the app closed Jun 23 19:06:26 there's a Google-play-based backport, but nothing else. it's new behavior. Jun 23 19:07:38 xximjasonxx: dumpsys should show you when the alarm is scheduled to fire, and how far overdue it is (if any). unfortunately nothing for when it's *predicted* to fire. Jun 23 19:08:04 i'm drawing polygon from data retrieved from parse each polygon row as a unique id that each points in the set making up that polygon has but when the points are displayed and polygons drawn the lines criss cross between set of points http://pastebin.com/j1xL5HbT Jun 23 19:09:13 well thats weird, its not in there anymore Jun 23 19:10:27 ok groxx Jun 23 19:10:38 so, i think, and if this is correct i am baffled Jun 23 19:10:50 it does work IF I start the app without my debugger Jun 23 19:12:05 so basically, if i hit play in my IDE, the app runs and I see the notifications and I see the alarm in the sysdump Jun 23 19:12:20 however, if i detach (hit stop or close the app) I no longer see the alarm in sysdump Jun 23 19:12:41 if I then go into the AppList and touch it, the app starts and the alarm is present in sysdump Jun 23 19:12:57 if i close the app, the alarm remains in sysdump and continues functioning as expected Jun 23 19:14:07 funky Jun 23 19:14:52 I have kinda noticed some differences in launching from an IDE vs the launcher, but I've never been able to trace them down for sure / know if I'm just doing something subtly different that I don't notice. Jun 23 19:17:22 my guess is Jun 23 19:17:43 its a cleanup thing, so you dont end up with 10-20 background processes running on the emulator Jun 23 19:17:50 im sure thats documnted, but wow Jun 23 19:18:14 that essentially happens IRL too, but it shouldn't be removing alarms :\ Jun 23 19:34:49 any resource suggestions for picking up android? Jun 23 19:35:03 Google mostly Jun 23 19:35:05 http://d.android.com Jun 23 19:35:10 develiper.android.com Jun 23 19:35:22 develiper Jun 23 19:35:24 i like that Jun 23 19:35:35 going to be working my way through the treehouse course, I think, because it's free in my area due to a library deal Jun 23 19:35:43 nice Jun 23 19:36:21 develoerps http://www.macuser.ro/index.php?ACT=25&fid=41&aid=21513_2DoH8q6xGnztgCZ7zWQA&board_id=1 Jun 23 19:36:28 any nub mistakes I should watch out for in android? Jun 23 19:36:33 anyone have success in editing material edit text underline color / textinputlayout floating text color? Jun 23 19:36:53 groxx: is that real Jun 23 19:37:36 powersurge: deal with onSaveInstanceState early, and use it religiously. your process will die and be recreated with ONLY that information, so you need to store everything necessary. it's easy to miss while developing. Jun 23 19:37:40 xximjasonxx: yep! Jun 23 19:37:45 ha!! Jun 23 19:38:09 I'm sad that there was so little hubbub when it happened, but I still have a screenshot of it somewhere too Jun 23 19:39:35 thanks for the tip groxx :> Jun 23 19:40:08 so I guess that's the bit that is responsible for saving state if android decides to kill your app when it's in the background? Jun 23 19:40:27 background is probably the wrong term. 'not in focus' Jun 23 19:40:30 powersurge: the saved state + process restoring behavior ends up driving a lot of the API design in android stuff. the lifecycle of an app is a bit weird, but it has benefits, and it's best to embrace it rather than fight it (since you will lose :) ) Jun 23 19:41:00 background works. especially since there are "foreground services" which make your background app (nearly) the same priority as if it were in the foreground Jun 23 19:41:33 gotcha Jun 23 19:42:35 Hi all, I'm just converting my old ListViews to RecyclerViews, I'm struggling to get any sort of touch feedback from the on item click though Jun 23 19:42:43 Any suggestions? Jun 23 19:42:51 powersurge: tbh I generally recommend people stick to d.android.com because it explains _why_ things exist so much better than e.g. vogella. once you have the basics, sure, branch out, but I haven't seen anything even remotely as good as the official source for those basics (sadly) Jun 23 19:43:00 Memery, theres no itemclicklistener with recyclerview Jun 23 19:43:06 is that your problem Jun 23 19:43:24 Well no I have created a listener but essentially that's what it's doing Jun 23 19:43:27 powersurge: https://developer.android.com/training/basics/activity-lifecycle/index.html may be useful, and when you realize that the application lifecycle diagrams are a bit over-simplified, https://github.com/xxv/android-lifecycle is pretty good :) Jun 23 19:43:43 Memery, and its not working? Jun 23 19:43:51 ha ha ha ha oh wow groxx Jun 23 19:44:01 It works, it recognises the click and which position on the recycler is being clicked Jun 23 19:44:09 But there is no touch feedback Jun 23 19:45:06 it's cool to look at the deepend of stuff when you get started and be baffled/intimidated because it makes it that much more rewarding when you revisit it later and can actually grok it Jun 23 19:45:16 mongolab costs are so rediculous.. Jun 23 19:45:30 180$/month for 40gb? Jun 23 19:46:04 powersurge: yeah, don't worry about it for starting :) it's a handy resource though. and tbh most application frameworks are roughly as complex when you actually start diagramming the whole thing (and that's not at _all_ the whole set, just the most common) Jun 23 19:47:12 https://s.paste.ninja/2015-06-23_20-46-39.png any way to achieve that sort of alignment with a relative layout? Currently App Title and the package name are working, I want my other two elements to be vertically centered relative to the text but right aligned Jun 23 19:47:15 Is that possible Jun 23 19:47:41 are you asking if you can have a custom title bar? Jun 23 19:48:09 Hm, no, this is an element for a RecyclerView, just can't get the alignment correct Jun 23 19:48:26 ohh yes definitely possible Jun 23 19:48:38 bpye: I'm not quite sure what you're trying to achieve... do you want the red square and ".com" to be vertically centered and on the right, or something else? Jun 23 19:48:41 layout_weight can help you achieve that Jun 23 19:49:03 The grey lines are kinda meant to indicate, I want them to have the same vertical centre as the left elements Jun 23 19:49:25 Each one individually, as you might realise the red square is smaller Jun 23 19:49:36 aah. layout_alignBaseline (or something like that) is probably what you want. otherwise things align based on edges, not text. Jun 23 19:50:28 otherwise, you can make that whole thing with a single TextView with some Span elements, which would be faster to compute and possibly do everything you want. you may want to stick with layouts for starters though. Jun 23 19:51:25 hello Jun 23 19:52:02 anyone has experience with mobile networks and APNs? Jun 23 19:52:03 anyanghesaou Jun 23 19:52:14 APNs? Jun 23 19:52:23 danijoo_, any idea on the touch feedback? Jun 23 19:52:26 bpye: otherwise, I'd say wrap the title and square in a layout that handles gravity (like FrameLayout), layout_gravity them to the left/right, and then the red square can be `layout_gravity="right|center_vertical"` Jun 23 19:52:41 xximjasonxx access point names Jun 23 19:52:46 Memery, did you add a touch effect? Jun 23 19:52:49 ahh Jun 23 19:52:51 I've searched a lot and most say to use android:background="?android:attr/selectableItemBackground" but I've tried that and it didn't work. Jun 23 19:52:52 negative for me Jun 23 19:52:54 it wont be there automatically like in a list Jun 23 19:53:13 groxx: Yeah I've gotten the bottom working correctly so I guess that's the easiest thing for the top two Jun 23 19:53:30 Ah I see, how do you add a touch effect? Jun 23 19:53:50 bpye: yeah. I tend to make deep-ish hierarchies because it's usually simpler to think about. if it turns out slow, optimize it, but make it _work_ first :) Jun 23 19:53:58 Memery, a selector Jun 23 20:08:30 Hi!!! Jun 23 20:08:46 What's the best system to do animations (for games) on Android? Jun 23 20:08:47 WOAH. that's way too much excitement. I need more coffee for this. Jun 23 20:09:07 syste? Jun 23 20:09:27 obviously solaris Jun 23 20:10:15 Iarfen: what kind of games? would a full game stack make sense, like Unity or something? or are you building something that's just drawing to a canvas? Jun 23 20:10:48 groxx: games like Candy Crush, Dragon City, common animations :D Jun 23 20:11:32 unity is definitly the easiest to just get something done Jun 23 20:12:07 What's the best way to test an app for different screen sizes if you don't have the devices? Is the AS Emulator good enough or would you recommend something like Genymotion? Jun 23 20:12:14 I want to do animations, I'm programming with ADT Jun 23 20:12:32 barq, genymotion is nice Jun 23 20:12:51 And also to test for different Android versions Jun 23 20:15:08 genymotion is far, far better than the android emulator Jun 23 20:15:34 barq, for just testing different devices it doesnt really matter Jun 23 20:15:38 so Xamarin actually released their own emulator for their apps as well as native androud Jun 23 20:15:43 but in general genymotion has nice extras Jun 23 20:15:44 in preview but it is very nice Jun 23 20:15:57 What about different Android versions? Jun 23 20:16:00 its actually based on genymotion but is a bit nicer and easier to install Jun 23 20:16:08 I quite like Microsoft's Android emulator, means I don't have to dual boot to disable Hyper-V Jun 23 20:16:31 xximjasonxx, easier to install then double clicking genymotion_installer.exe? Jun 23 20:16:34 larfen: Unity is probably the best bet for doing that. It’s got a nice community around it, and a lot of ready made assets available Jun 23 20:16:42 The AS Emulator just takes forever to load. Jun 23 20:16:51 danijoo_: I have always had problems with VirtualBox working properly Jun 23 20:16:54 barq: if your layout preview shows the right thing, you can show multiple screen sizes right there, all simultaneously Jun 23 20:17:02 the Xamarin one takes care of that for me Jun 23 20:17:16 i never had that. Jun 23 20:17:29 i must be special Jun 23 20:17:29 but xamarin ui looks pretty nice Jun 23 20:17:44 didnt know they released their own emu Jun 23 20:17:47 fwiw, its a fork of geny motion Jun 23 20:18:02 though much earlier, before genymotion required payment for the more adv features Jun 23 20:18:02 too expensive for me though Jun 23 20:18:09 well its free right now Jun 23 20:18:25 but yeah, Xamarin in general, while very nice Jun 23 20:18:28 pricet Jun 23 20:18:31 *pricey Jun 23 20:18:53 it lists 25$ per month Jun 23 20:18:59 vs 10$ for genymotion Jun 23 20:19:03 really? i havent paid a dime :) Jun 23 20:19:10 hey guys anyone a bit familiar with marker and polygon google map? Jun 23 20:19:24 xximjasonxx, free vs buisness version maybe :) Jun 23 20:19:35 danijoo_: https://xamarin.com/android-player Jun 23 20:19:46 yes Jun 23 20:19:46 https://store.xamarin.com/ Jun 23 20:19:48 ohh, you are looking at the licenses Jun 23 20:19:57 yeah, the player is separate, for now Jun 23 20:19:58 ah lol im stupod Jun 23 20:20:05 though I cant think they would ever charge for it Jun 23 20:20:15 i clicked pricing and thought its emulator :) Jun 23 20:20:19 :) Jun 23 20:20:19 but its for theyr cloud stuff Jun 23 20:20:28 ohh yeah their cloud stuff is super expensive Jun 23 20:20:40 <-- works for a Xamarin Premier Partner Jun 23 20:20:45 and even we are like, ehh not sure about that Jun 23 20:20:53 good thing is, its pay as you go Jun 23 20:21:08 does xamarin emu include the premium features of genymotion? Jun 23 20:21:13 like throttling network Jun 23 20:22:47 not right now Jun 23 20:23:05 ah :/ Jun 23 20:23:07 too badf Jun 23 20:23:12 again, its a preview release, so :) Jun 23 20:23:25 yeah. i definitly keep an eye on it Jun 23 20:23:27 my guess is, when they go full itll probably be like GM where you pay for those features Jun 23 20:23:34 but atm its not interessting for me Jun 23 20:23:42 understandable Jun 23 20:23:42 because I need some of those features Jun 23 20:25:02 I'm also guessing tools:listitem doesn't work with recyclerview for the preview... nor does android studio handle coordinator layout properly Jun 23 20:35:50 so I have two sqlite tables I'm sure exist -- trying to do a select * from session s join event e , when sqlite says no such table: event Jun 23 20:37:14 What's the best way to test an app for different Android api versions? Genymotion as well? Jun 23 20:37:43 barq now you are back :) should I post the question I did before? Jun 23 20:37:53 barq, why not Jun 23 20:38:42 I'm trying to get genymotion to work barq actually, wanna try to fix it with me together? Jun 23 20:38:49 Or can you simulate how the app would behave with an older api version on a new phone? Jun 23 20:39:19 Zajtarn: I haven't installed Genymotion yet. Need ro register. Jun 23 20:39:44 Yeah you can do that, I'm not sure if you need the program or just the plugin in android studio to make it test Jun 23 20:40:38 the plugin only controls the programm Jun 23 20:40:41 you need it Jun 23 20:40:52 okok i got it installed, but then not sure what to do Jun 23 20:41:01 create a vm Jun 23 20:41:18 under "add" Jun 23 20:41:29 second item from left in genymotions main window Jun 23 20:41:43 yeah I did that with a random phone Jun 23 20:41:57 then u are done Jun 23 20:41:58 saapas: I would assume sqlite is correct. but does `select * from event` do anything for you? Jun 23 20:42:02 just click and start it Jun 23 20:44:24 groxx, that was a bit oversimplified. I select individual columns from both session and event in place of the * Jun 23 20:44:43 danijoo_ alright but then how can I open my app from there? Jun 23 20:44:51 or make it open my app Jun 23 20:45:09 Zajtarn, via AS and adb Jun 23 20:45:12 I get Inilialize engine failed Jun 23 20:45:14 it shows up like a real device Jun 23 20:45:23 AS? Jun 23 20:45:26 saapas: that's alright. but does a simpler query work (e.g. did you maybe have some other kind of error), or does the table really not exist? and why are you sure they exist? Jun 23 20:45:28 Yes, AS. Jun 23 20:45:30 AS = android studio Jun 23 20:45:45 should I just leave the genymotion open and then run the app in android studio? Jun 23 20:45:53 yes Jun 23 20:46:25 groxx, Im sure because 1) I just downloaded both files from the emulator :) and 2) the event table exists since months ago. I'm refactoring my app quite a bit Jun 23 20:47:10 Coool it worked! :D Jun 23 20:47:39 What devices would you recommend me to try it on? I tried on Sony Xperia Z and it was the same(worked perfcet with design) as my OnePlus One Jun 23 20:47:55 i would recommend trying different api levels Jun 23 20:48:01 15, 19, 21 at least Jun 23 20:48:07 omg I need VirtualBox Jun 23 20:48:19 barq, genymotion has it bundled Jun 23 20:49:23 Virtualization engine not found Jun 23 20:49:36 did you follow the dev guide on the website? Jun 23 20:49:36 did you select to not install it maybe ^^ Jun 23 20:49:51 I'm on mac so I just dragged it to applications Jun 23 20:50:10 cant rememeber how it worked on mac Jun 23 20:50:12 I'm on mac too. Follow the mac guide here: https://www.genymotion.com/#!/developers/user-guide Jun 23 20:50:16 but i didnt had a problem with mac Jun 23 20:50:36 Need to install vbox Jun 23 20:50:50 danijoo_ alright i will try with different API:s. Why do they differ though? Jun 23 20:51:02 because they are different Jun 23 20:51:09 things change Jun 23 20:51:21 thats the difinition of something new :p Jun 23 20:51:29 yeh Jun 23 20:52:11 New methods/xml stuff are added and some are not backwards compatible. Jun 23 20:52:12 basically always try your minSdkVersion and your maxSDKVersion Jun 23 20:52:50 Yeah don't remeber what I set as minSdkVersion or maxSdkVersion. I took the standard stuff when I created a new project in android studio Jun 23 20:53:09 Is there a way to check it? Jun 23 20:53:16 build.gralde Jun 23 20:53:30 min: 17 and max: 22 Jun 23 20:53:37 then i will stop downloading api 10 Jun 23 20:53:38 hehe Jun 23 20:53:43 lol Jun 23 20:54:26 Once an Activity is started from my app such as ACTION_LOCATION_SOURCE_SETTINGS to take the user to the Android location settings page, if I background the app and then resume my app it picks back up at the Android location settings page. Do I have any control over preventing that? Jun 23 20:54:36 so just trying min and max is enough, thanks. I'm learning so much =) Jun 23 20:55:02 saapas: don't suppose you have each table in a different database? Jun 23 20:55:05 thats not what i said Jun 23 20:55:17 It's not enough. Maybe it only works on min and max and not between. Jun 23 20:55:20 at least those Jun 23 20:55:25 oh ok Jun 23 20:55:32 if there are bigger releases in between, check them too Jun 23 20:55:57 So let's say that I have an activity for entering an address for and connecting to a server. This starts a thread that tries to connect, and starts up a progress bar until the connection either succeeds or fails. What would the normal way be to do something like changing the state of the progress bar from another thread? Jun 23 20:55:58 groxx, that's correct. Jun 23 20:56:05 groxx, and that might be the issue Jun 23 20:56:07 btw the folders: mipmap hdpi, mipmap xhdpi, mipmap xxhdpi. They weren't created by default when you create a new project I think but when my friend sent the project to me after added some classes, do you add them manually? Jun 23 20:56:19 saapas: yeah, you can't join across databases Jun 23 20:56:43 FlyingJester, onProgressUpdate from asynctasj Jun 23 20:56:51 I get install failed missing shared library. Jun 23 20:56:59 groxx, I will not approve that :P Jun 23 20:57:06 Zajtarn, they are generated by default right now Jun 23 20:57:10 they werent in the past Jun 23 20:57:19 alright so when you create a new project, they should be there? Jun 23 20:57:31 depends on your version of Jun 23 20:57:36 -of Jun 23 20:57:53 saapas: there's a chance android will let you use 'attach', but I've never tried it: http://stackoverflow.com/questions/6824717/sqlite-how-do-you-join-tables-from-different-databases Jun 23 20:57:57 ok, but those folders are for fixing responsive layouts Jun 23 20:58:03 no Jun 23 20:58:07 not? Jun 23 20:58:10 whatever fixing layouts mean Jun 23 20:58:35 making it responsive, like so it works on tablets and different sizes. xxhdpi is the leargest I got there Jun 23 20:58:43 groxx, wait.. can I have multiple tables in one database? Jun 23 20:58:48 saapas: yep Jun 23 20:58:57 generally you're better off with a single database file Jun 23 20:58:59 they are to provide differnt resources for different configurations, yues Jun 23 20:59:09 yeh Jun 23 20:59:09 there are reasons to do otherwise, but they're relatively esoteric Jun 23 20:59:13 I get install failed missing shared library when I drag my apk into genymotion. How can I fix this? Jun 23 20:59:14 you could have a different image for tablet then for phone Jun 23 20:59:16 groxx, oh ok. :D well, that solves it. for all this time I've thought that's only a sqlite constraint Jun 23 20:59:17 or a different size Jun 23 20:59:22 yeah Jun 23 20:59:32 barq, you tried what? Jun 23 20:59:41 Dragged my apk into genymotion Jun 23 20:59:41 thats not how it works Jun 23 21:00:06 add a new device, then press start. Then run it in AS Jun 23 21:00:10 adb install -r path/to/your/apk.apk Jun 23 21:00:19 or press run in AS Jun 23 21:00:33 According to docs dragging is equivalent. Jun 23 21:00:39 I also tried run in AS, same error. Jun 23 21:00:40 fuck them Jun 23 21:00:41 :D Jun 23 21:00:59 i didnt know one can do that Jun 23 21:01:13 https://www.genymotion.com/#!/developers/user-guide search for string "drag and drop" Jun 23 21:01:25 I've had zero luck with genymotion's drag-and-drop, fwiw Jun 23 21:01:28 always fails Jun 23 21:01:51 as ->run doesnt work either Jun 23 21:02:14 no idea what this shared lib error means Jun 23 21:02:21 it's worth double checking that you're on the right build target Jun 23 21:02:24 Same when I run from shell Jun 23 21:02:46 barq: any native code Jun 23 21:02:47 ? Jun 23 21:02:52 no Jun 23 21:03:01 Only Google APIs Jun 23 21:03:54 That's probably what I am missing. Jun 23 21:04:04 Has anyone have used this library? http://hiteshsondhi88.github.io/ffmpeg-android-java/ Jun 23 21:04:24 barq: aah, via a tag? yeah, probably Jun 23 21:05:00 uses-library? Jun 23 21:05:02 ulises_: yeah, though it was a little while ago and I had to modify it Jun 23 21:05:17 ah, yes in the manifest I have that Jun 23 21:05:17 barq: e.g. http://stackoverflow.com/questions/1113088/install-failed-missing-shared-library-error-in-android Jun 23 21:05:58 ah. there are google play apks out there for genymotion, but they've never worked for me. Jun 23 21:06:01 Hey, camera issue - even when there is light the camera shows black preview & black or very dark picture while the camera app shows everything ok. Is there anything I need to add to the camera parameters to make sure that the camera will automatically use the light ? Jun 23 21:06:05 It deploys fine to my devices, just not to the emulator. Jun 23 21:06:21 I just use the stock emulators ¯\_(ツ)_/¯ they're just as fast and they've been way more stable in the past year or two. Jun 23 21:06:41 I get the same error on stock emulator Jun 23 21:06:58 then its you(r app) Jun 23 21:07:05 lol Jun 23 21:07:21 pigiman: might want to try Parameters.SCENE_MODE_AUTO ? Jun 23 21:07:27 I use samsung emulators on genymotion. My theory is if it works on a Galaxy S4, it should work on anything. Jun 23 21:07:34 I forget if that handles brightness on its own, or if you need others (like white balance / etc) Jun 23 21:07:40 At least last time I tried from ADT, will try AS native emulator Jun 23 21:07:47 quinnjn, its not real samsung Jun 23 21:07:58 samsung has emulators too, don't they? Jun 23 21:08:01 its just stock android with samsungs screen and cpu settings Jun 23 21:08:08 thank you groxx. I was able to load the library without problems. But I am not able to use it correctly. I am trying to convert a gif to an mp4 file. But the output is a blank video. Do you have any idea whats going on? Jun 23 21:08:10 groxx, they discontinued them a while ago Jun 23 21:08:11 groxx: I ll check it out. Is there anything else that can be related ? Jun 23 21:08:16 danijoo_: well that figures Jun 23 21:08:30 they dont generate money, you know :p Jun 23 21:08:42 pigiman: not sure :| I didn't write that part of the app I work on, just noticed that while browsing through the code. Jun 23 21:08:44 danijoo_: hmm interesting. I seem to reproduce the same errors as I see on fabric with it. Jun 23 21:09:03 quinnjn, and they are android related Jun 23 21:09:08 samsung related? Jun 23 21:09:10 * Jun 23 21:09:11 groxx: ok I will try it out anyhow as it might make sense. thank you Jun 23 21:09:12 ulises_: be sure to read all the output, and turn on verbose / debugging flags when you exec the library Jun 23 21:09:39 ulises_: and if you're taking the output and putting it into logcat, watch out that the line isn't too long. logcat will truncate after a certain point (depends on the device) Jun 23 21:09:40 danijoo_: I always just assumed so. Maybe it was Android related over Samsung Jun 23 21:09:57 ty for the heads up on the samsung emulators though Jun 23 21:10:07 quinnjn, im pretty sure you could reproduce them on any genymotion vm then Jun 23 21:10:31 they just take the size and RAM and density from a real samsung device and call it samsung emulator Jun 23 21:10:47 its not a different system afaik Jun 23 21:11:24 which is the same thing the stock emulators do, fwiw :) if you want a _real_ emulation of device X, you'll almost definitely have to get it from the manufacturer somehow (if it exists) Jun 23 21:11:35 yep Jun 23 21:12:03 groxx: the string is around 83 characters long. Do you think is too long? Jun 23 21:12:19 ulises_: nah, most devices truncate around multiples of 1000 characters Jun 23 21:12:23 and the answer to does it exists is mostly "no" Jun 23 21:12:44 ulises_: unless you're putting that in the tag - that's too long for a tag, which will make it just ignore the call entirely :| Jun 23 21:13:24 thanks for the help today, cya tomorrow guys Jun 23 21:13:49 ulises_: if you turn on the more verbose modes though, you'll probably go well over 1000 characters Jun 23 21:14:18 for a short encode, I think I tend to generate like 16,000 in some cases Jun 23 21:14:25 groxx: How can i turn on verbose modes. Sorry for my ignorance Jun 23 21:14:52 Ah, on AS the Emulator works Jun 23 21:14:54 ulises_: I'm assuming you're using it as an opaque binary that you're just System.exec-ing? not using JNI? Jun 23 21:15:26 ulises_: https://www.ffmpeg.org/ffmpeg.html#Generic-options is a good spot to start Jun 23 21:16:24 Is there any easy way to shake the device in as emulator? Jun 23 21:16:38 pick up computer -> (╯°□°)╯︵ ┻━┻ Jun 23 21:16:49 D Jun 23 21:16:51 :D Jun 23 21:16:58 I tried dragging the windows hard already :p Jun 23 21:17:09 groxx: readin the link. Here is the comand I am using: cmd2 = "-f gif -i /mnt/sdcard/Movies/20150623_1606380548.gif /mnt/sdcard/Movies/outfile.mp4"; Jun 23 21:17:18 i thbink you can somehow send fake sensor datas Jun 23 21:17:23 to fake a shake Jun 23 21:17:41 Yes, just wondering if AS can do this without a huge overhead. Jun 23 21:17:43 groxx: I think the problem is something with the codecs, but I have no experience with video formats Jun 23 21:17:59 barq: https://code.google.com/p/openintents/wiki/SensorSimulator may work, or I'd recommend moving the "what to do when shaken" logic somewhere else that you can trigger via e.g. a broadcast, or a debug-only button in the app. Jun 23 21:18:39 Or get genymotion to work properly... Jun 23 21:19:17 dont think genymotion handles computer shakes :p Jun 23 21:19:25 ulises_: could be. I don't know if that ffmpeg_android project includes a gif decoder. if you change the command to `-decoders` you can get the list it supports. Jun 23 21:19:40 it might be under -formats or something else though, I forget Jun 23 21:19:43 But I can do them on my phone and genymotion will register on screen I think Jun 23 21:20:19 barq, thats not part of the free version Jun 23 21:21:08 https://www.genymotion.com/#!/store Jun 23 21:23:52 ugh. so apparently onSaveInstanceState can happen _before_ onPause? Jun 23 21:24:50 can or will? Jun 23 21:24:53 I think onSaveInstanceState can be pretty random Jun 23 21:24:55 groxx, i dont think so Jun 23 21:25:06 its called when app is killed, isnt it? Jun 23 21:25:08 I just got a crash that seems to show it happens :| Jun 23 21:25:21 and foreground app is not killed usually Jun 23 21:25:59 explicitly tracking onPause / onResume, and I still get fragment "cannot commit after onSaveInstanceState" exceptions. _or_ the FragmentManager is buggy (which seems entirely possible) Jun 23 21:26:00 but you are right. its even in the docs.. Jun 23 21:26:12 If called, this method will occur before onStop(). There are no guarantees about whether it will occur before or after onPause(). Jun 23 21:26:13 Can be called any time before ondestroy Jun 23 21:26:28 ah, it does say that? how have I missed that so many times? Jun 23 21:26:34 yeah. Jun 23 21:26:38 me too Jun 23 21:27:28 why cant they just give us a reproduceable lifecycle :/ Jun 23 21:28:16 the lolcycle strikes again! Jun 23 21:28:29 WHen I do things like c.getResources.getDimensionPixelSize(R.dimen.some_dimension_declaration) does android cache these? Jun 23 21:28:54 definitely lolcycle :( Jun 23 21:30:04 lasserix, http://grepcode.com/file/repo1.maven.org/maven2/org.robolectric/android-all/4.4_r1-robolectric-1/android/content/res/Resources.java#Resources.getDimensionPixelSize%28int%29 Jun 23 21:30:13 huge link :o Jun 23 21:30:41 so... if onSaveInstanceState can happen before onPause, and it can happen multiple times for an activity, how can you know when it's safe to commit fragment transactions? Jun 23 21:31:50 danijoo: Jun 23 21:31:53 that would be ano? Jun 23 21:32:15 thats a look at the few lines of the implementation Jun 23 21:34:55 yeah it doesn't seem it does Jun 23 21:35:02 i know it does with drawables Jun 23 21:35:14 uuh no Jun 23 21:35:22 that's why i put a default resources static class in my app class where i resolve a bunch of dimensions i use all over the place Jun 23 21:35:32 but i figured if it did the caching for me why bother? Jun 23 21:35:35 guess i wont delete it tho Jun 23 21:35:59 i doubt theres any performance gain in that Jun 23 21:36:19 accessing a few int resources should cost close to nothing Jun 23 21:38:38 yeah i was going to bench it Jun 23 21:38:40 just curious Jun 23 21:38:59 cause for instance i have like onedp twodp eightdp 32dp etc all over the place Jun 23 21:39:05 so i added a few to my app class Jun 23 21:39:11 (then i can didivde / mulitply to get what ineed) Jun 23 21:39:19 and what to you mean with android caches drawables? Jun 23 21:39:19 as opposed to c.getResources.getDimensionPixelSize Jun 23 21:39:21 it does not Jun 23 21:39:23 yeah it does Jun 23 21:39:50 if you "inflate" a drawable from res it'll cache it so if you "inflate" it again it'll pull it from the cache, it won't redecode it Jun 23 21:40:01 *inflate => forgot what the method is Jun 23 21:40:18 you mean decodeSampledBitmapFromResource? Jun 23 21:41:19 no thats not what its called.. Jun 23 21:41:30 havent decoded bitmaps myself for a while.. Jun 23 21:42:07 yeah whichever or if you do Jun 23 21:42:10 setDrawableREsource Jun 23 21:42:13 or whatever on an imageview Jun 23 21:42:18 it'll cache that Jun 23 21:43:03 damn now they say don't use enums again Jun 23 21:45:11 they lie Jun 23 21:45:13 is it possible to override with styles colorControlActivated for say, an edit text that is different from the theme declared colorControlActivated ? Jun 23 21:46:27 define a new style that differes from theme and add that to your texts xml Jun 23 21:47:15 Jun 23 21:47:19 View* Jun 23 21:47:35 Hi can someone help me with Android Studio. I am trying to use UI Automator, but Android Studio is not importing android.support.test.uiautomator http://developer.android.com/training/testing/ui-testing/uiautomator-testing.html#build Jun 23 21:48:41 hm, cool https://appdevelopermagazine.com/2793/2015/5/28/Magnet-Systems-Launches-Apache-Open-Source-Solution-for-Messaging-in-iOS-and-Android-Apps/ Jun 23 21:50:29 oh wow, thats a lot Jun 23 21:52:41 wtf, sources for TextInputLayout aren't in aosp? Jun 23 21:52:42 fail! Jun 23 21:58:00 pfn: its kinda useless actually Jun 23 21:58:19 is there any way to set edittext cursor color in code? Jun 23 21:59:45 i dont think its useless. im actually using it :o Jun 23 21:59:59 g00s: interesting. any idea if it's at all decent? Jun 23 22:00:16 groxx just heard about it Jun 23 22:00:45 apache 2 licensing is awfully attractive Jun 23 22:00:53 it's a handy thing that intellij has a decompiler Jun 23 22:01:06 yeah, that decompiler is soooo useful Jun 23 22:01:18 ah nice, somebody added a recyclerview ItemTouchHelper tutorial Jun 23 22:01:25 once its explained it seems pretty easy Jun 23 22:01:46 https://medium.com/@ipaulpro/drag-and-swipe-with-recyclerview-b9456d2b1aaf Jun 23 22:03:09 lasserix, you can change its color together with the underline color Jun 23 22:03:19 not seperatly Jun 23 22:03:26 yeah. not seperatly Jun 23 22:04:10 god google wants us to define the whole colorset with colorPrimary and colorAccent anyways ^^' Jun 23 22:04:21 yeah -fk that Jun 23 22:04:36 anyways is it possible to change the edittext color? Jun 23 22:04:39 err Jun 23 22:04:45 edittext cursor color in code? Jun 23 22:05:40 only hackiish Jun 23 22:06:47 you can do it in xml tho? Jun 23 22:06:49 you can change the cursors drawable Jun 23 22:07:08 and with that the color Jun 23 22:07:54 Hi can someone help me with Android Studio. I am trying to use UI Automator, but Android Studio is not importing android.support.test.uiautomator http://developer.android.com/training/testing/ui-testing/uiautomator-testing.html#build Jun 23 22:12:56 lasserix: yes, with some hackery. http://pastebin.com/PByc6ARZ Jun 23 22:13:08 yeah ill just def a ref for the custom view Jun 23 22:13:13 then add it as an attr Jun 23 22:13:26 so you can just reference a deferent style which will point to the drawablecursor Jun 23 22:13:41 note: this might break any time Jun 23 22:14:31 thats why i wont use the hack Jun 23 22:14:47 i will just use the (context, null, attr style) trick naplam pointed out yesterday Jun 23 22:14:50 should be hard to assert that it still works Jun 23 22:14:52 then add that as a custom attr Jun 23 22:14:54 when there is a new release Jun 23 22:14:58 good from api 7 to current release though. Jun 23 22:15:00 to my view group Jun 23 22:15:12 so you can just point to the style in the xml Jun 23 22:15:23 or just replace the cursor drawable via xml Jun 23 22:15:29 i can't Jun 23 22:15:33 this is now a custom view Jun 23 22:15:35 (group) Jun 23 22:15:38 since textlayout sucks Jun 23 22:19:46 when getting reference is that resource id? Jun 23 22:20:08 lasserix: in the code I posted? Jun 23 22:20:20 no Jun 23 22:20:25 when using custom attributes Jun 23 22:20:41 if you define format="reference" what is that when you gety it from the attributes? Jun 23 22:20:52 the resource id Jun 23 22:23:19 thanks Jun 23 22:32:11 anyoen know what input type is? Jun 23 22:32:17 is that just an int? Jun 23 22:51:49 always nice when random devices have unique bugs: http://cl.ly/image/0C0N0K2m3G0Q Jun 23 22:51:51 lasserix: yes, an int. See https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/text/InputType.java Jun 23 22:52:57 pfn: did that workaround for the snackbar and translucent statusbar actually work? Jun 23 22:53:47 groxx 85% devices rooted ? Jun 23 22:54:07 g00s: very small numbers at play Jun 23 22:54:27 there's like 5 users involved, and I think the ALPS might all be from the same person Jun 23 22:55:20 lasserix, I don't use snackbar, but of course it works Jun 23 22:55:34 thanks Jun 23 23:10:55 How do I add a jar file to my project in Android Studio? Jun 23 23:14:25 In android studio does it matter what i use for the domain? Jun 23 23:16:07 What happon if you don't have a domain? Jun 23 23:16:13 probably does not matter unless you are building the application for a company Jun 23 23:16:47 I believe domain is used to uniquely identify your app on google play and attach it with a developer account Jun 23 23:18:06 Android Studio doesn’t care. The Play Store cares Jun 23 23:19:23 sorry DC Jun 23 23:20:03 I don't have a company i just one person for android developer. Jun 23 23:20:29 I use a nickname in my personal projects Jun 23 23:20:52 i thought it had to bbe com.something? Jun 23 23:21:21 nope. It could be org.something, net.something, or something.something Jun 23 23:21:33 http://stackoverflow.com/questions/6878793/are-android-application-domain-names-used-for-anything-other-than-uniquely-ident Jun 23 23:21:48 from sun on Java domain names Jun 23 23:22:40 or even just "something" Jun 23 23:22:46 (I think) Jun 23 23:22:58 or are 2 components required? I can't recall Jun 23 23:23:24 but yeah, the package name is arbitrary, it doesn't have to correlate with an actual domain name or anything Jun 23 23:23:30 it just needs to be unique Jun 23 23:23:32 you do not need the prefix i believe. i think its just custom to use a valid domain name. Jun 23 23:23:40 I know we ran into some issues when we tried to have just two, as opposed to 3. I don’t recall if they were from some of our code assuming it was three, though Jun 23 23:24:00 Yeah, 2 should definitely be fine, I'm just not positive about 1 Jun 23 23:24:26 I know a good way to find out Jun 23 23:24:40 i suppose just come up with a nickname, and see if that domain is available. Jun 23 23:24:54 use that nickname as your “company name” Jun 23 23:24:55 http://developer.android.com/guide/topics/manifest/manifest-element.html The spec doesn't mention that there has to be multiple "parts" Jun 23 23:26:25 wow i keep getting DC Jun 23 23:27:28 god, why is textinputlayout so garbage Jun 23 23:27:33 it doesn't show the hint properly, nor clear it Jun 23 23:27:43 everything in the design compat lib is so poorly thought out... Jun 23 23:27:49 and implemented Jun 23 23:29:36 hehe Jun 23 23:29:43 yeah Jun 23 23:29:53 just got finished writing same thing from scratch with everything customizable Jun 23 23:30:01 even a clear text button! Jun 23 23:30:02 I wanted to ditch chinese guy material edittext Jun 23 23:30:08 but textinputlayout is completely non-functional Jun 23 23:30:12 Can someone explain me what does it mean when something is between <> signs? for example "LoaderManager.LoaderCallbacks". What are the <> trying to say? Jun 23 23:30:19 it doesn't render correct, doesn't show the hint properly, and doesn't hide it Jun 23 23:30:21 genoskill, generics Jun 23 23:30:33 type parameters Jun 23 23:30:42 Not to mention that som things in that support lib are incorrectly documented Jun 23 23:30:53 https://docs.oracle.com/javase/tutorial/java/generics/types.html Jun 23 23:31:03 s73v3r,Can be something like cmp.cmp? Jun 23 23:31:08 basically the class name inside the <> is the type parameter Jun 23 23:31:09 i think so Jun 23 23:31:38 cool Jun 23 23:31:55 then that fix my prob. Jun 23 23:31:57 :) Jun 23 23:32:42 everybody thanks. Jun 23 23:32:49 god 16 hours developing today Jun 23 23:32:59 what is everyone up to? Jun 23 23:33:13 not much here. Jun 23 23:33:32 banging my head against wall Jun 23 23:33:55 yea, banging head against the wall Jun 23 23:33:58 comes with the job Jun 23 23:34:10 oh i forgot to say again Jun 23 23:34:18 ya so true Jun 23 23:34:40 here i am sure there is a way around this without changing the backend Jun 23 23:34:43 but it gets a lot better, dunno for how long you've been coding for android Jun 23 23:34:58 Can't wait when the gogole test lab come out:) Jun 23 23:34:58 what is your exact issue again? Jun 23 23:35:03 got 10 minutes to spare Jun 23 23:35:08 https://gist.github.com/px-amaac/1ef7da5a68c1c4512ba8 Both of these JSON objects are in the same file but I am getting the following error Jun 23 23:35:19 yes Jun 23 23:35:32 brb latter Jun 23 23:35:37 what is the error? Jun 23 23:35:44 ah its there Jun 23 23:36:23 who returns an object or a boolean in an api call Jun 23 23:36:49 poor design if the object is not there just do not return it. Then it will evaluate to null Jun 23 23:37:30 The error happens on line 12 of B.JSON Jun 23 23:38:18 jvrodrigues: good going Jun 23 23:40:18 shadynastys, can I see the POJO you're trying to cast this object to? Jun 23 23:40:24 thats probably the issue Jun 23 23:40:29 nothing wrong with the backend Jun 23 23:40:56 there is like 7 for this call Jun 23 23:40:59 hold on Jun 23 23:41:08 there should be yea Jun 23 23:41:24 I don't think the Image field is of type boolean Jun 23 23:42:18 but I might be wrong, I can't see anything wrong with either of the JSONS tbh, they are valid by all standards I can think of Jun 23 23:43:17 its not its an object Jun 23 23:43:22 yea Jun 23 23:43:24 thats the issue Jun 23 23:43:38 why does an edit text not get inputable? Jun 23 23:43:39 wtf Jun 23 23:44:19 you need to register a JsonDeserializer Jun 23 23:44:22 and check manually Jun 23 23:44:23 there Jun 23 23:44:24 if its false Jun 23 23:44:24 https://gist.github.com/px-amaac/1ef7da5a68c1c4512ba8 Jun 23 23:44:27 or an object Jun 23 23:44:37 I was actually just getting to that in the GSON docs Jun 23 23:44:52 deserializer Jun 23 23:44:52 yea Jun 23 23:44:54 very easy Jun 23 23:45:09 ok that sounds exactly like what I need Jun 23 23:45:13 https://github.com/joaovrodrigues/mobiileimgur/blob/master/app/src/main/java/joaorodrigues/mobileimgur/model/ImageList.java Jun 23 23:45:16 here is an example of one Jun 23 23:45:45 https://github.com/joaovrodrigues/mobiileimgur/blob/master/app/src/main/java/joaorodrigues/mobileimgur/connection/ApiManager.java Jun 23 23:45:47 Thankyou for the help Jun 23 23:45:50 heres how to register it with Gson Jun 23 23:45:59 thats what I'm here for Jun 23 23:46:00 and now Jun 23 23:46:05 if you fellas don't mind Jun 23 23:46:28 I'm going to quietly pass away due to too much work Jun 23 23:47:37 yeah, don’t work that much. It’s never worth it Jun 24 00:22:39 the google location service is so innacurate Jun 24 00:22:52 One interval it will say im 90 meters away from last location, the next it will say im 5 Jun 24 00:23:24 Maybe only take a update every 10 seconds Jun 24 00:23:26 instead of like 5 Jun 24 00:23:34 I believe we've talk about that Jun 24 00:23:46 Yeah we did earlier Jun 24 00:24:01 Like im sitting here, and its oing from 22 to like 3 Jun 24 00:24:03 then back to 22 Jun 24 00:24:59 * pfn continues using the rengxuan materialedittext Jun 24 00:25:00 yuck Jun 24 00:27:47 icedp sorry I know we talked earlier, but do you think taking 2 intervals and getting the average of them would increase accuracy? Jun 24 00:28:03 Because im sitting here and getting intervals every 10 seconds.. and they keep switching back from like 37 to 2 Jun 24 00:28:17 Well.. now theyre going steady around 37 Jun 24 00:28:23 Which makes no sense, im not moving Jun 24 00:29:53 Maybe only accept the value if the accuracy is less then 10.. Jun 24 00:30:03 or 15 Jun 24 00:33:09 drose379: confidence that location is in the circle of radius getAccuracy() is 68%; IDK confidence of it being in particular point, probably a 1 % or something. Maybe averaging will help, but how do you know device is not moving? Jun 24 00:33:19 drose379: what are trying to do exactly? Jun 24 00:41:01 icedp because I have the device and im sitting at a desk Jun 24 00:41:17 icedp my ultimate goal is to track the distance that a device moves, like if the user is on a walk or something Jun 24 00:41:32 Im thinking of accepting any values with an accuracy < 25 Jun 24 00:44:15 it's unlikely to work w/o GPS Jun 24 00:44:21 I have GPS on Jun 24 00:44:41 My current thought: Min displacement = 10 and max accuracy = 25 Jun 24 00:44:52 cause the lower the accuracy number, the better Jun 24 00:47:04 try adding distance only if it moved >> accuracy Jun 24 00:47:41 You think those two are related tho? Jun 24 00:47:57 Cause accuracy is the radius of the circle that it may be in Jun 24 00:48:03 so lets say accuracy is 25 Jun 24 00:48:21 I'm not sure that hsa anything to do with how far someone moved Jun 24 00:51:01 if accuracy is 25 and you will count every moves of 1, 2 or 5 meters you can count an infinite distance eventually Jun 24 00:51:11 and devices won't move an inch Jun 24 00:51:30 now, if it's moved 30 m while accuracy was 25 - probably it moved Jun 24 00:52:23 But im setting the minimum displacement to 10 Jun 24 00:53:12 For some reason that doesnt work tho, cause im still getting distances lower then that Jun 24 00:53:26 I guess I have to look at displacement manually Jun 24 00:56:48 Im sitting in my house and the accuracy will not go below 25 Jun 24 00:57:11 remember that indoor, gps will not work and accuracy will be very bad without a gps Jun 24 00:57:26 Ok so I really need to be outside to test this Jun 24 00:57:32 (also accuracy varies across time) Jun 24 00:57:37 adq did you see the strategy im using? Jun 24 00:58:00 Only accepting Locations if the accuracy is less then 25 and displacement is more then 10 Jun 24 00:58:00 just backlogged a bit, but it's 3AM right now Jun 24 00:58:01 :p Jun 24 00:58:05 sorry man Jun 24 00:58:15 I just posted it above for you Jun 24 00:59:53 if you get outside you can get accuracy of 2m but you won't log displacement less than 10 Jun 24 00:59:53 you need something like project tango ;) Jun 24 01:00:07 whats project tango? Jun 24 01:00:29 https://www.google.com/atap/project-tango/ Jun 24 01:00:38 it's more suitable to indoor i'm pretty sure Jun 24 01:00:47 thus, to walk speed Jun 24 01:00:51 Looks cool, but all I really want to do is track distance of a person doing an activity outside Jun 24 01:00:55 Walking, running, etcc Jun 24 01:01:01 drose379 lol, you mean the whole time you were indoors ? Jun 24 01:01:16 all of this .. because you were indoors ?!?! Jun 24 01:01:19 he said he was sitting on his desk, so i assumed he was indoor Jun 24 01:01:25 no way he would catch satellite Jun 24 01:01:30 no i go outside to test lol Jun 24 01:01:34 I just walk around a bit outside Jun 24 01:01:34 :p Jun 24 01:01:49 im gonna go outside for a sec now actually to test my current set up Jun 24 01:01:59 drose379 one sec Jun 24 01:02:01 sure Jun 24 01:02:18 drose379 go to the play store, and get one of those GPS apps that tells you which satellites you are using, which have locks, etc Jun 24 01:02:30 why? Jun 24 01:02:30 and test that out, for sanity :) Jun 24 01:02:45 because if you only have 1-2 satellites your accuracy will be low Jun 24 01:02:45 Theres so many apps out there that track distance, idk why this is giving me such a hassle hah Jun 24 01:03:01 My accuracy sitting here at my desk is ~15 Jun 24 01:03:03 which is good Jun 24 01:03:08 because it's an android phone, not a dedicated garmin gps ;) Jun 24 01:03:08 I wonder what it is if I step out Jun 24 01:03:25 How come other apps can do it so well? Jun 24 01:03:37 well, guess we know what the problem is then :D Jun 24 01:03:51 I know the guy who made this app drose379: https://github.com/BoD/bikey Jun 24 01:03:54 maybe you can take a look Jun 24 01:03:56 it works well on a bike Jun 24 01:04:12 whats the problem g00s Jun 24 01:04:14 and he is using the fuse location, iirc Jun 24 01:04:22 Yeah im using that too rn adq Jun 24 01:04:41 ill def check that out tho adq thank you Jun 24 01:05:26 I may email the guy Jun 24 01:05:40 oh he is on freenode too but asleep i guess right now Jun 24 01:05:47 :| touch events happening after onSaveInstanceState is so very sadface-inducing. I'm honestly starting to wonder if the "best" solution is to block all touch events after it happens. Jun 24 01:06:29 drose379: for better accuracy you might need accelerometer Jun 24 01:06:51 really rrr_ Jun 24 01:08:34 accelerometer might be better for relative dislocation, you might combine GPS and accele Jun 24 01:09:22 so when i step outside the accuracy gets way worse Jun 24 01:09:30 Like outside it goes up to 96 Jun 24 01:09:38 and inside it sits around 20< Jun 24 01:09:44 I meant less then 20 Jun 24 01:10:32 gps accuracy is better outside than inside. don't know why that happen to you Jun 24 01:10:48 Yeah its weird Jun 24 01:11:05 Im only collecting data with accuracy lower then 25 and with movement greater then 10 Jun 24 01:11:09 so far i havent gotten a hit Jun 24 01:11:09 maybe something block you from satellate outside Jun 24 01:11:12 you need to wait a relative amount of time before gps catch up, and be sure that gps is used Jun 24 01:11:18 and don't stay near a wall Jun 24 01:11:27 it's not vertical Jun 24 01:11:33 not vertical? Jun 24 01:11:37 i found gps much easier with the native apis Jun 24 01:11:40 the beam is not vertical Jun 24 01:11:46 except for geofencing, which never really worked Jun 24 01:11:51 or perpendicular to the ground Jun 24 01:11:55 g00s native as opposed to the FusedApi thing? Jun 24 01:11:59 yeah Jun 24 01:12:08 You think I shud go with those Jun 24 01:12:23 I mean, thats not even my issue right now Jun 24 01:12:30 drose379 when you get your coordinate, can you check which provider it came from ? Jun 24 01:12:32 * adq imagines drose379 going in and out, hundred of times in the day :p Jun 24 01:12:41 hehe Jun 24 01:12:49 haha thats literally what ive been doing Jun 24 01:13:03 and g00s : I get the Location obeject and then just do getAccuracy() on that Jun 24 01:13:06 Lemme chekc the provider Jun 24 01:13:20 Yeah I can get the provider Jun 24 01:14:26 g00s its telling me the provider is "fused" Jun 24 01:15:16 lol Jun 24 01:15:24 ?? Jun 24 01:15:46 I was expecting "GPS" or "Network" or something Jun 24 01:16:13 fused is a combination of multiple types of location, afaik Jun 24 01:16:22 Oh ok Jun 24 01:16:39 Fused did you see the strategy im using now to collect locations? Jun 24 01:17:00 drose379 generally you are going to make time or accuracy tradeoff. if you want accuracy, forgo fused Jun 24 01:17:14 so get rid of fused API and go native? Jun 24 01:17:27 Wont that have the same Issue? Or Ill set the provider to only GPS so it will be better? Jun 24 01:17:32 well, time, accuracy, and power tradeoffs Jun 24 01:17:51 So Native will give me better accuracy? Jun 24 01:17:51 drose379 what do you want? you have to pick the best provider / strategy to meet your needs Jun 24 01:18:05 g00s I want accuracy Jun 24 01:18:33 i haven't used GMS location in a while, you want high precision gps then. whatever API gives that to you Jun 24 01:18:36 but not fused Jun 24 01:18:49 Is there any others? All ive seen is fused and the native Jun 24 01:19:25 i think Mavrik- has played with GMS location, you might ask him Jun 24 01:19:37 drose379, also from another acquaintance, i remember having testing: https://github.com/levelup/Android-FusedLocation Jun 24 01:20:02 take a look at it, despite not using playservices, it will display individually for each gps wifi etc some info Jun 24 01:20:10 s/testing/tested/ Jun 24 01:20:26 hmmm Jun 24 01:20:41 adq so he has a sample app ther I can try? Jun 24 01:20:48 drose379 did you use this? https://developers.google.com/android/reference/com/google/android/gms/location/SettingsApi Jun 24 01:20:48 yep just build and run Jun 24 01:20:55 .addLocationRequest(mLocationRequestHighAccuracy) Jun 24 01:21:26 g00s what do I set that on? Jun 24 01:21:45 Im setting priority on my LocationRequest to HIGH ACCURACY Jun 24 01:21:58 adq how do I do that? never done it before? Jun 24 01:22:09 what? you import the project, you build the apk Jun 24 01:22:15 hey. Jun 24 01:22:18 well, i guess before ruling out GMS location i'd make sure you are setting it up right :) Jun 24 01:22:39 g00s I thought I was, what am I missing? Jun 24 01:22:50 "The sample app shows the value for each source, so you know the Fused provider works and where its data are coming from. In real life you don't target a specific provider but uses a Criteria, in which case the Fused provider will be favored, for better & faster results." Jun 24 01:23:00 gotta crash soon, good luck drose379 Jun 24 01:23:02 drose379 the example are right on that page :| Jun 24 01:23:04 thanks man Jun 24 01:23:28 oh alright g00s Jun 24 01:24:22 load a bunch of app giving you info, so you have a reference to compare Jun 24 01:24:23 g00s I see setting up LocationSettingsRequest but I dont see where to attach it to my LocationRequest Jun 24 01:24:42 that will limit the i/o between indoor and outdoor ;) Jun 24 01:25:05 adq I actually have no idea how to get that sample app from the repo you linked me to Jun 24 01:25:07 never done it before Jun 24 01:25:35 you never imported a module or a project in AS??? Jun 24 01:25:42 No Jun 24 01:25:54 then it will be your first time maybe :) Jun 24 01:26:06 it's pretty straight-forward Jun 24 01:26:09 Could you tell me how? Jun 24 01:26:18 nope, because it's 3:30AM now Jun 24 01:26:22 i should not even be here lol Jun 24 01:26:23 New->import project? Jun 24 01:26:26 yep Jun 24 01:26:26 haha alright Jun 24 01:26:33 But I need to download the project first Jun 24 01:26:48 ctrl-f "download" Jun 24 01:27:05 of just the sample folder or the whole thing? Jun 24 01:27:23 don't be lazy, everything Jun 24 01:27:27 haha ok Jun 24 01:27:44 thanks Jun 24 01:28:29 i am importing another project into AS, but it seems "configuring..." forever. is anything wrong setting for me? I am new to AS Jun 24 01:28:45 np, "a journey of a thousand miles begins with a single step" Jun 24 01:29:05 very true adq Jun 24 01:30:32 hmm, saying the proj doesnt use gradle Jun 24 01:30:50 how to check what is going on behind 'configure...'? Jun 24 01:30:56 and its not letting me run it Jun 24 01:32:06 WTF, its trying to make me use an AVD to run this.. Jun 24 01:40:27 so, I'm planning to rip MediaPlayer out of my app and replace it with ExoPlayer Jun 24 01:40:43 since I'm getting frustrated with MediaPlayer's limitations Jun 24 01:40:55 any pitfalls I should be aware of before I start? Jun 24 01:44:30 omfg android http://cl.ly/image/1b153k3G0L2Y . end result: `fragmentTransaction.commit()` in onResume can crash, even after super.onResume. Jun 24 01:45:29 (that's in the support FragmentActivity) Jun 24 01:47:16 How come when im overriding methods in a interface the docs dont say to use @Override Jun 24 01:47:48 drose379: Which ones? Jun 24 01:47:59 Like im looking at LocationListener Jun 24 01:48:19 Well im doing LocationListener x = new LocationListener() {methods} Jun 24 01:48:27 Wait, is that cause its an inner class and not an interface Jun 24 01:48:44 ohh ok Jun 24 01:48:55 It's the same with nested classes. Jun 24 01:49:18 Inner classes? Jun 24 01:49:23 It's good practice to use @Override because the compiler checks whether you're really overriding what you're intending to override. Jun 24 01:49:29 Inner classes are non-static nested classes. Jun 24 01:49:41 Ok, so I should use override for inner classes and interface methods Jun 24 01:49:43 just to be safe Jun 24 01:49:46 The annotation also serves as documentation. Jun 24 01:50:00 Right Jun 24 01:50:06 Ok, cool Jun 24 01:50:13 TJ you ever worked with Location? Jun 24 01:50:18 Never. Jun 24 01:50:23 I'm often confused should I use support library or framework. e.g. from what api level do I need to use support fragments? Or should just always use support variant? (Fragments are one example) Jun 24 01:50:47 groxx all those queued events + complex state + lolcycle = engineering disaster Jun 24 01:51:14 g00s: no kidding. and why the heck does the support fragment try to mimic old _system_ fragment behavior, instead of reducing the roflfails? Jun 24 01:51:50 or... maybe it's due to other lolcycle on oldroids? Jun 24 01:51:59 I dunno. it's not documented. wonderful! Jun 24 01:54:45 So GPS would be more accurate then network? Jun 24 01:54:53 I feel like we're just guinea pigs. Jun 24 01:55:19 "Here's a bunch of crazy-code; in 10 years we'll be laughing at how bad it was." Jun 24 01:56:03 Ive been messing with iOS , I must say I enjoy Java a lot more Jun 24 01:56:15 Maybe its cause I dont know objective-C tho Jun 24 01:56:46 Yeah, the Java language is one of the (relative) highlights of this platform, IMO. Jun 24 01:56:50 As annoying as it is. Jun 24 01:57:02 We could be dealing with a disaster such as C++, but thank goodness we're not. Jun 24 01:57:10 <3 Java Jun 24 01:57:30 You like Kotlin dont you? Jun 24 01:57:35 java's predictable. an amazing feat. I miss categories / extension classes though :( Jun 24 01:57:37 Yeah. Kotlin is very nice Jun 24 01:57:53 I'll have to try kotlin eventually Jun 24 01:58:40 So whats the deal with that? will it compile in the DalvikVM Jun 24 01:58:55 anyway. TIL / message of the day: avoid onResume like the plague if you're using support fragments (because you're not crazy enough to use system fragments, right?). use onResumeFragments unless you have a fantastic reason to do otherwise. Jun 24 01:59:55 drose379: It compiles to Java bytecode, and this bytecode is converted (?) to Dalvik bytecode. Jun 24 02:00:01 Or is the word 'compiled'? I don't know. Jun 24 02:00:07 dexed? Jun 24 02:00:14 battered? Jun 24 02:00:15 hey tacticaljoke Jun 24 02:00:21 Hay. Jun 24 02:00:22 is that what happens with java? Jun 24 02:00:24 can u help me with an okhttp problem?? Jun 24 02:00:29 ask a question Jun 24 02:00:29 compiled into bytecode then run in the dalvik vm Jun 24 02:00:38 drose379: Right now, yeah. Jun 24 02:00:47 Ok, just making sure ;) Jun 24 02:00:51 The future plan is to miss out the middle step. Jun 24 02:00:53 I think. Jun 24 02:00:57 With Jack. Jun 24 02:01:02 the middle step of bytecode? Jun 24 02:01:10 which will still have to handle java bytecode, because jars. but yeah. Jun 24 02:01:12 http://tools.android.com/tech-docs/jackandjill Jun 24 02:01:19 http://pastebin.com/PhMnRSAs <- so, thats teh response i get from response.body().string() when i try accessing a website on my private network... if i do sites like google on android.com the entire source is returned Jun 24 02:01:21 Yeah, of Java bytecode. Jun 24 02:01:27 and i didnt do anything but update my android studio Jun 24 02:01:37 now that i did, the website im trying to visit does that for some reason Jun 24 02:01:40 woah, noticing a significantly better accuracy with GPS Provider instead of FusedProvider Jun 24 02:01:57 bubbely: I don't see how that message is related to OkHttp. Jun 24 02:02:03 Yeah its not Jun 24 02:02:21 TacticalJoke: thats the value of response.body().string() Jun 24 02:02:35 Its not Jun 24 02:02:45 wrong.. Jun 24 02:03:03 I think you're misreading LogCat. Jun 24 02:03:03 That just doesnt look like something a server would give you Jun 24 02:03:50 like i said, if i go to google.com then the src is returned Jun 24 02:03:56 so, if i go to my site, i get that as the return Jun 24 02:04:05 not the source to the page im actually trying to access. Jun 24 02:04:28 Try `Log.d("bubbley", "Reponse = " + response.body().string());`. Jun 24 02:04:38 s/Reponse/Response/ Jun 24 02:06:04 g00s you ther Jun 24 02:06:12 Maybe this is a crazy thought, but I wonder whether Kotlin will ever compile directly to Dalvik bytecode. Jun 24 02:06:20 is a book from Nov 2012 on android game dev still relevent? or should i find a newer book Jun 24 02:06:34 Use the interweb Jun 24 02:07:03 Oh, game dev. I have no idea Jun 24 02:07:12 bubbley﹕ Reponse = Jun 24 02:07:16 it goes all the way to 4.1 Jun 24 02:07:23 now, if i do google.com as my URL, it'll display something Jun 24 02:07:25 what we at now? 5.0 Jun 24 02:07:29 It's empty. Jun 24 02:07:32 There's no body. Jun 24 02:07:44 I think. (Checking the source.) Jun 24 02:07:50 no this website has a body Jun 24 02:08:06 bubbley have you tested that your api is getting the call? Jun 24 02:08:25 The response you pasted (which was not the actual) response looks like the request was not successfully received Jun 24 02:08:36 (Just a wild guess), its happend to me a few times Jun 24 02:09:14 why would i work with one site but not the other Jun 24 02:09:29 drose379 kinda Jun 24 02:09:31 bubbely: I'd first check the response headers. Jun 24 02:09:52 g00s so I changed to the native LocationListener and am only using the GPS provider now and the accuracy seems a ton better Jun 24 02:10:00 TacticalJoke: if my webpage is a .php page that i use, does session variables get in the way? Jun 24 02:10:06 that might be my problem Jun 24 02:10:54 drose379 hm, well i guess just make sure GMS location was set up right. if you think it was, well - stick to native then Jun 24 02:10:57 example: new DownloadImageTask().execute("http://localhost/index.php?action=login&un=usename&pw=password"); Jun 24 02:11:11 No doubt that there are many factors in an HTTP server's reponse. Jun 24 02:11:16 now, if index.php logs u in with the session varaible if pw is ok Jun 24 02:11:24 would the session be created wtih Okhttp Jun 24 02:11:25 sounds good g00s Jun 24 02:11:43 or would it be treated as the session variable doesnt exist next time a request is made Jun 24 02:11:58 sessions? why sessions? Jun 24 02:12:17 im using my webpage as a proxy to a database im using to make things easier for me Jun 24 02:12:37 Ok, but why do you need a _$SESSION Jun 24 02:12:53 $_ sorry Jun 24 02:13:34 Oh, Ok! Jun 24 02:13:35 :) Jun 24 02:13:40 TacticalJoke will be interesting if kotlin gets wasm target Jun 24 02:13:51 Yeah, I wonder about that. Jun 24 02:13:54 bubbely you fix it? Jun 24 02:14:17 no Jun 24 02:14:19 hm.. Jun 24 02:14:20 I keep typing "reponse". What's up with that. :D Jun 24 02:14:28 lol one second..... Jun 24 02:14:31 With an accent that'd be a French word. Jun 24 02:14:34 oh Jun 24 02:14:58 bubbely are you using PHP for the webpage? Jun 24 02:15:09 ya Jun 24 02:15:28 =DD Jun 24 02:15:34 You fix it? Jun 24 02:15:53 kinda Jun 24 02:16:04 Ok, im pretty sure you dont need sessions at all for this Jun 24 02:16:08 it may just be complicating things Jun 24 02:16:20 fixed Jun 24 02:16:23 :). Jun 24 02:16:24 ttyl Jun 24 02:16:24 great Jun 24 02:16:39 dont ya wanna chat? Jun 24 02:16:41 :P Jun 24 02:18:26 lol Jun 24 02:18:29 ill talk to you later i have work to do Jun 24 02:28:38 hi Jun 24 02:28:56 I just finished my first PhoneGap app Jun 24 02:29:01 I also did a Cordova app Jun 24 02:29:04 and a Xamarin Gap Jun 24 02:29:17 and now I am doing a "normal" android app ¬¬ Jun 24 02:29:45 Cool! Jun 24 02:30:26 I hate Java Jun 24 02:30:37 but I dislike even more having so many limitations on an Application Jun 24 02:30:43 So I will stick with Java Jun 24 02:30:46 even if I don't like it Jun 24 02:31:41 cool story bro Jun 24 02:38:43 http://opensource.com/life/15/6/2015-summer-reading-list Jun 24 02:39:23 is it me, or gradle became slower again Jun 24 02:39:34 I mean gradle plugin Jun 24 02:41:24 or maybe I should upgrae gradle to 2.4 Jun 24 02:41:40 what gradle version are you using? Jun 24 02:42:10 Maybe I'm missing something but what's the difference between using the keystore to save info and just writing a file that's -rw------- owned by me? Jun 24 02:42:24 gordon_ i think its one of those subjective things, gradle always seems to keep getting slower :D Jun 24 02:45:42 like no matter what it does, its still got half way to go :P Jun 24 02:57:49 huh interesting, no DHCPv6 in android Jun 24 02:59:20 google doesn't seem to get enterprise much. took them forever to get their ipsec VPN story right **** ENDING LOGGING AT Wed Jun 24 02:59:58 2015