**** BEGIN LOGGING AT Fri Dec 05 02:59:58 2014 Dec 05 03:01:30 g00s: Cool. I figured the osx and linux sdk would be the same. Maybe if he has had windows it wouldn't work. Dec 05 03:01:38 But actually? Would it work on windows? Dec 05 03:02:01 oh wait, this can't work eghdk_ Dec 05 03:02:11 in tools/ there are binaries for your platform. its not all java Dec 05 03:02:35 what you could do, is download the SDK from the website for him and put it on usb Dec 05 03:02:40 Why is it that my Runnable subclasses always end up doing too many things. Dec 05 03:02:44 They're so weird. Dec 05 03:03:01 you can download the sdk from the website? like platform 5 and platform 4.4? g00s Dec 05 03:03:36 no its only the SDK. not stuff the SDK manager downloads Dec 05 03:04:16 g00s: I should be able to install a linux vm and then grab everything he would need right? Dec 05 03:04:21 that sounds reasonable? Dec 05 03:04:30 eghdk_ i've never tried it Dec 05 03:04:37 try it , for science ! Dec 05 03:04:54 alright. I'll give it a try. Figured I'd ask. Most of you guys seem like you've been through it all. hahaha Dec 05 03:05:29 the machine these days, is only as good as the network its connected to , unfortunately Dec 05 03:06:31 Oh! g00s he doesn't have the JDK. Do i download jdk 8? Dec 05 03:06:34 hello sirs, I am adding an option to an empty actionbar menu, however, even when I menu.clear() before menu.add("custom"), the menu always has a "Settings" option after the "custom" one. Any ideas why that is? Dec 05 03:06:45 eghdk_ yeah Dec 05 03:06:56 Even though android doesn't support 8? Dec 05 03:07:00 eghdk_ maybe you could make him a vagrant image or something :D Dec 05 03:07:12 aam: Can you show MainActivity.java and menu_main.xml (or something like that)? Dec 05 03:07:23 eghdk_ get 8, set language level to 7 Dec 05 03:07:36 coolio! thanks Dec 05 03:08:11 TacticalJoke: menu_main.xml is what I was missing Dec 05 03:08:16 I was looking at activity_main.xml Dec 05 03:08:18 thank you! Dec 05 03:11:36 My code is starting to scare me. It just feels like I should be extracting a superclass in two cases but I can't see how. Dec 05 03:11:55 That feeling of "God, this might be a pain in the future". Dec 05 03:12:13 Though hopefully the situation will clarify itself in future. Dec 05 03:13:04 I've been having trouble with the NDK for the past couple of days. Can I ask here for someone to look over my Android.mk files and ndk_build output and maybe see if they can identify what is wrong that I am missing? I'll pastebin it if yes. Dec 05 03:13:10 Actually, it'll probably be easy to refactor. The issue right now is that I simply don't understand the problem domain well enough. lol Dec 05 03:13:34 g00s: You mean set lang level to 7 in Android Studio right? Dec 05 03:13:44 yeah Dec 05 03:13:49 or gradle Dec 05 03:14:00 k thanks Dec 05 03:26:25 any of you guys use linux? what do you use for irc? Dec 05 03:26:47 no to linux, but irssi ftw Dec 05 03:26:51 I use irssi Dec 05 03:27:06 irssi + tmux ;) Dec 05 03:27:16 Yes I use tmux too. Dec 05 03:27:54 why irssi? Dec 05 03:28:02 Hello Dec 05 03:28:31 How can I have a list view within a list view? Dec 05 03:29:01 why would you :/ Dec 05 03:30:35 "The method create cannot be declared static; static methods can only be declared in a static or top level type" Dec 05 03:30:36 Pointless. Dec 05 03:30:48 I see that question more often than I'd believe Dec 05 03:31:04 Can't use static factory methods in non-static nested classes. Dec 05 03:31:52 Lol. A ListView within a ListView? Dec 05 03:32:14 bankai_au: Let's say I want to display a list of dishes each with their ingredients. Dec 05 03:32:39 tmi Dec 05 03:32:41 So a list of dishes each containing a list of ingredients. Dec 05 03:33:02 How would I go about doing something like that? Dec 05 03:33:15 I am new to Android/mobile dev. Not new to programming however Dec 05 03:33:22 I guess one way is to use an inner TextView with new-lines. Dec 05 03:34:01 What if the inner list was something complex Dec 05 03:34:04 Fervicus: depends how you want it to look, but you'll need to have a custom layout. listview in listview is not a good solution Dec 05 03:35:04 Fervicus: I guess another idea is multiple TextViews which are instantiated at runtime. Dec 05 03:35:10 Not sure whether that's a good idea, though. Dec 05 03:37:02 JakeWharton: Earlier, someone said that IntelliJ 14 allows JVM unit testing with Gradle. Do you know whether this is true? I know I could just try it, but the last time I "just tried it" I wasted hours of my life. :( Dec 05 03:37:19 Fervicus: if you're doing some kind of cooking app, have a look at CookPad Dec 05 03:37:36 Fervicus raises an interesting question: how do we do lists within list views? Dec 05 03:37:40 Let's say I wanted something like this Dec 05 03:37:42 https://dpaste.de/uhgL Dec 05 03:37:54 And each thing also say has a picture Dec 05 03:37:55 TacticalJoke: expandable listview and yes to your gradle question Dec 05 03:38:29 Fervicus: Couldn't you just add each one to the top ListView? Dec 05 03:38:29 bankai_au: the cooking thing is just an example Dec 05 03:38:37 but I want to display a similar structure Dec 05 03:38:39 Fervicus: You can return multiple row types from your adapter. Dec 05 03:38:49 You could have a "heading" row and an "ingredient" row. Dec 05 03:38:59 Fervicus: use an expanadablelistview Dec 05 03:39:09 http://developer.android.com/reference/android/widget/ExpandableListView.html for details Dec 05 03:39:22 bankai_au: How easy is it to set up and run a JVM unit test in IntelliJ with Gradle now? Dec 05 03:39:28 Like, is it just clicking stuff. Dec 05 03:39:54 i'm very impressed with libreoffice. i havent used this in like 5 years Dec 05 03:39:56 i've never had any problems Dec 05 03:40:14 bankai_au: The guy earlier said that this is new to IntelliJ 14. Dec 05 03:40:27 works fine for me in 13 Dec 05 03:40:35 I want to pass in a two dimensional array and the view to render whatever is passed. Dec 05 03:40:47 bankai_au: You're able to JVM-unit-test your Android code and you're using Gradle? Dec 05 03:40:56 I'll look at expandablelist view, thanks. Dec 05 03:41:20 I agree, g00s. It used to look and feel awful, but they've shaped up lately. Dec 05 03:42:05 i was going to get that apple thing, but people said it couldn't even open its own docs Dec 05 03:42:06 lol Dec 05 03:42:08 bankai_au: is it possible to have an expandableview that isn't actually collapsable? Dec 05 03:42:11 Fervicus: Also keep in mind the idea of returning different views from your adapter. Dec 05 03:43:16 Fervicus: You could give your adapter the multi-dimensional array and it could determine whether to return a header or an item depending on the current position. Dec 05 03:43:36 No collapsing required. Dec 05 03:43:42 TacticalJoke: So in my activity layout, I'll have one ListView Dec 05 03:43:47 Yeah. Dec 05 03:44:12 and what would the layout for that listview then contain? Dec 05 03:44:15 You could override Adapter.getViewTypeCount and return 2. Dec 05 03:44:34 The ListView would be very boring. It'd be your adapter that's interesting. You'd have two layout files for each item type. Dec 05 03:44:45 I mean "one for each item type". Dec 05 03:45:22 A header_view.xml and an item_view.xml (or something). Dec 05 03:45:57 Then your adapter decides whether to return a header view or an item view depending on position. (Position 0 would be a header; 1 would be an item; etc.) Dec 05 03:46:18 I think it'd be quite easy to "flatten" the multidimensional array in this way. Dec 05 03:46:21 I see Dec 05 03:46:26 Okay. Dec 05 03:46:32 I'll look into both these options Dec 05 03:46:34 Thanks guys. Dec 05 03:46:36 It just needs to map the array to 1D positions. Dec 05 03:46:43 g00s: apparently now you can get a degree called "Master of Mobile Applications Development" Dec 05 03:47:28 MoMAD Dec 05 03:48:18 bankai_au thats insance Dec 05 03:48:22 *insane Dec 05 03:50:55 https://github.com/Naturally-Being/G-Rex Dec 05 03:52:09 rx all the things :) Dec 05 03:52:25 bankai_au i'm going to wait for a masters in Rx Dec 05 03:52:35 (just kidding) Dec 05 03:53:15 haha Dec 05 03:53:44 i love that G-Rex logo Dec 05 03:55:38 what have they done to the Bugzilla dino? Dec 05 03:55:59 i hope they killed it Dec 05 03:56:39 ouchies Dec 05 03:57:36 g00s no fondness for bugzilla? Dec 05 03:58:12 :) just an issue tracker Dec 05 03:59:16 its written in perl, i dont think anyone understands the code any more Dec 05 03:59:34 perl? tul Dec 05 03:59:42 er, til Dec 05 04:00:39 actually I may have heard that before Dec 05 04:05:27 bankai_au new rx talk by ben on parley's https://www.parleys.com/play/543f8d5be4b06e1184ae4106/about Dec 05 04:05:33 Anyone use the material libararies to make material theme app for 4.x devices? Dec 05 04:05:42 i always seem to have problem with parleys Dec 05 04:07:43 You know something bad happened when you pickup your Wear device and see your mobile app on it :/ Dec 05 04:07:46 lol Dec 05 04:07:48 capella-s3 there was a story on HN a few weeks ago about a newish bug tracking system (open source) can't find it though Dec 05 04:08:29 man, my app is leaking Messages :( Dec 05 04:08:33 I don't even ... :/ Dec 05 04:08:40 mmmmm.. didn't spot it... Dec 05 04:08:51 too many Message objects allocated. Dec 05 04:09:26 using Message.obtain? Dec 05 04:09:31 yup Dec 05 04:09:36 wait no Dec 05 04:09:44 Handler.obtainMessage Dec 05 04:09:45 i think here is also like Dec 05 04:09:48 Handler.obtainmessage Dec 05 04:10:01 then thats not the source Dec 05 04:10:44 lasserix, I have an ExecutorService that runs a pool of cached threads with the parcelable inside the incoming message Dec 05 04:10:50 Are you doing this to invalidate a view? Dec 05 04:10:56 nope, it's in a service Dec 05 04:10:59 ahh Dec 05 04:11:50 i believe the culprit is the parcel Dec 05 04:12:03 lasserix, how so? Dec 05 04:12:24 once you parcel the original object elgible for GC Dec 05 04:12:35 that's good, right? Dec 05 04:12:39 no Dec 05 04:13:01 if you are doing this 1000 / per second and not retaining these objects you are parceling that's why you are producing garbage Dec 05 04:13:14 why are you using parceable is this for aidl? Dec 05 04:14:02 nope, I am just getting sensor readings from a Wear device, putting them in an object and passing them to a handler Dec 05 04:14:11 but yeah, 1000/sec, yup Dec 05 04:14:32 * capella-s3 remembers this security issue w/bugzilla, but nothing re: new alternatives http://www.ehackingnews.com/2014/10/http-parameter-pollution-bugzilla-vulnerability.html?m=1 Dec 05 04:14:47 so what's the alternative? if not passing the parcelable? Dec 05 04:14:52 so you are not parcelling? Dec 05 04:14:59 I am parcelling the object Dec 05 04:15:26 can't you just set the obj of the message and not parcel it? Dec 05 04:15:59 since this is not IPC Dec 05 04:16:13 you might be changing my world, my friend, let's see. compiling Dec 05 04:16:40 you only need to parcel if you are doing IPC since it is a different process, but within same process you can just use same references since they are all valid Dec 05 04:16:53 When I run my app on my Tesco Hudl 2, I see a few messages from "I/dalvikvm(2709)" like this: "Total arena pages for JIT: 15". Dec 05 04:16:56 Anyone know what that's all about? Dec 05 04:17:32 no, read the source Dec 05 04:17:40 It warns if >10. Dec 05 04:17:42 should be easily found in grep code Dec 05 04:17:42 Dunno why. Dec 05 04:17:56 I generally ignore everything from dalvikvm Dec 05 04:18:02 unless there's a crash Dec 05 04:18:44 TacticalJoke: different devices do different things, for instance, a binary on one device spits out eventlib (message library for c++) log messages, like, every single last one: on a different device, does not spit out any (doing exact same stuff) Dec 05 04:18:56 I guess I've been approaching it all wrong. I thought I *didn't* want to keep any references so that they *would* be garbage collected Dec 05 04:19:08 but yeah, it seems like the memory leak is gone!! wow Dec 05 04:19:34 Afzal its just about creation, recycle when you can. but definatly avoid object creation Dec 05 04:19:40 well it's allocating memory much slowly so it seems like that for now Dec 05 04:19:51 I see. Learned something new today. Thanks lasserix!! Dec 05 04:19:53 if (numArenaBlocks > 10) ALOGI("Total arena pages for JIT: %d", numArenaBlocks); Dec 05 04:19:54 the other thing you can do Dec 05 04:20:07 Afzal you are sending thousands of Messages per second ? Dec 05 04:20:12 Yeah, they vary a lot. Dec 05 04:20:25 This is what I'm looking at: https://android.googlesource.com/platform/dalvik2/+/master/vm/compiler/Utility.cpp#43 Dec 05 04:20:27 is set up a pool on either end of your handler, so that the sensor events are loaded from this pool, then passed, then pulled from the other pool and consumed Dec 05 04:20:40 he is probably sending 160 messages a second Dec 05 04:20:41 TacticalJoke, that's info, not warn Dec 05 04:21:01 Okay. Dec 05 04:21:01 g00s, whatever the fastest sensor rate is Dec 05 04:21:06 ⚠⚠⚠ Dec 05 04:21:12 160 / sec is still kinda a lot. i'd use a blocking queue or something else Dec 05 04:21:25 💣 Dec 05 04:21:25 no no Dec 05 04:21:37 you dont want to block on reading sensor data Dec 05 04:21:52 lasserix the consumer blocks, producer doesn't Dec 05 04:21:56 you might average it so you only send at a much reduced rate Dec 05 04:21:57 but its bounded Dec 05 04:22:18 why have the consumer block reading? Dec 05 04:22:34 JacobTabak: "shiet there's no dismiss all notifications button on n5 running lollipop?" There is on N6 Dec 05 04:22:42 its better to have producer just interpolate/average sensor data and spit it out at a reduced rate Dec 05 04:23:12 Someone want to tell me why a toothbrush has Bluetooth? http://www.amazon.com/SmartSeries-Bluetooth-Electric-Rechargeable-Toothbrush/dp/B00O8ODHOA/ref=br_lf_m_10488247011_1_1_ttl?ie=UTF8&m=ATVPDKIKX0DER&s=hpc&pf_rd_p=1993888342&pf_rd_s=center-2&pf_rd_t=101&pf_rd_i=10488247011&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=1BEX5HWQYRMQ8QG2R2CX Dec 05 04:23:15 oh god.. Dec 05 04:23:31 yeah for technique stats Dec 05 04:23:32 lasserix not sure what you're getting at, but ok Dec 05 04:23:35 So it can connect to devices the NSA is watching? Dec 05 04:23:55 we tried artificially a lesser sampling rate some months are but then the accuracy of our algorithm is hurt. There used to be a lag, so I haven't tried it since then Dec 05 04:24:09 g00s if you have an incoming sensor triggering at like 500 events/ a second. make whatever is recieving these events average the results, so they are only piped on at a rate of say 16 events/a second Dec 05 04:24:23 or use RMS Dec 05 04:24:35 it's basically comparing the sensor data to another stream of sensor data Dec 05 04:24:36 lasserix sure there are many resmapling algorithms Dec 05 04:24:40 *resampling Dec 05 04:24:44 Root Mean Squared.. Dec 05 04:24:49 makes nice smooth data Dec 05 04:24:49 tricknology: wow 80 bucks! Dec 05 04:24:53 Right? Dec 05 04:24:56 it can Dec 05 04:25:28 heh lasserix, you're right.. there are times when it will fail Dec 05 04:25:31 but I am a fan Dec 05 04:25:35 tricknology, yeah, that doesn't work in our case :p Dec 05 04:25:42 Afzal, bummer Dec 05 04:25:52 Do you have really inconsistent data? Dec 05 04:25:53 g00s: but having the consumer block, would be bad if the consumer can't consume faster than the producer produces? Dec 05 04:25:59 where can i find gradle docs specific to android and android studio ? Dec 05 04:26:18 lasserix, but it might not matter for such a high sample rate hmm? Dec 05 04:26:21 lasserix i'm not going to say any more, not being familiar with Afzal's code. i was just commenting on 1000 messages / sec Dec 05 04:26:37 Afzal: what do you mean? Dec 05 04:26:40 I know the ios developer skips like 5 messages at a time and it still works for him Dec 05 04:26:52 100's of Hz seems like a little overkill, no? Dec 05 04:27:11 Afzal: that's what i mean-- you can average the raw results, and only handle them at some rate much below the raw rate Dec 05 04:27:11 i mean depending on what you're sampling.. Dec 05 04:27:34 60 hz is 16 ms which is about as fast as you need for the eye to see smooth animation Dec 05 04:27:37 What is the shape of your data? have you graphed it? Dec 05 04:27:41 tricknology, yeah, as I said, we observed there was some lag that lessened when I increased the sample rate. Could've been something completely different though Dec 05 04:27:58 could of been gc lag :) Dec 05 04:28:00 Is this an external device? Dec 05 04:28:08 tricknology, android Wear device Dec 05 04:28:29 how long is the data/sample? Dec 05 04:28:33 android studio 1.0 RC 4 "runProguard true" method not available !!! Dec 05 04:28:42 Very probable. Also, sending wear messages is taxing on phone and watch apparently Dec 05 04:28:50 t2mkn, minifyEnabled Dec 05 04:29:22 Afzal thanks. what about varient.outputFile ? Dec 05 04:29:35 tricknology, depends on how long the user wants it to be on. It's a motion detection algorithm Dec 05 04:29:42 woah nw. there is an AS 1.0 now? Dec 05 04:29:55 there's an ArrayDeque that is maintained Dec 05 04:30:03 or rather 6 of them Dec 05 04:30:11 tricknology: A what Dec 05 04:30:11 ? Dec 05 04:30:17 AS Dec 05 04:30:19 Oh snap, Afzal. I messed with motion detection on the device.. Not easy Dec 05 04:30:20 Android Studio Dec 05 04:30:24 ^ Dec 05 04:30:34 Not on ear but on the phone Dec 05 04:30:36 wear* Dec 05 04:30:36 There's no 1.0. Dec 05 04:30:43 There's 1.0 RC 4. :D Dec 05 04:30:48 aaah ok Dec 05 04:30:52 I was going to say Dec 05 04:30:53 http://tools.android.com/recent/androidstudio1rc4_releasecandidate4released Dec 05 04:31:01 tricknology, yup. We have been pretty successful though, mixed reviews on the play store :p Dec 05 04:31:03 The release candidate has been released. Dec 05 04:31:11 I wanna see a release candidate for a release candidate. Dec 05 04:31:16 RC4 is pretty close to 1.0 Dec 05 04:31:27 I guess they're waiting for gradle 1.0 Dec 05 04:31:27 Finally.. Dec 05 04:31:46 Which version of IntelliJ is AS 1.0 RC4 based on? Dec 05 04:31:48 Guess I'm going to have to start tinkering now.. Think they'll drop eclipse support? or is it even droppable? Dec 05 04:32:14 don't take my beautiful Eclipse Dec 05 04:32:18 TacticalJoke, 135.1626825 Dec 05 04:32:22 Loads of people are on Eclipse. Dec 05 04:32:26 Afzal: Is that version 13? Dec 05 04:32:36 dunno Dec 05 04:32:43 probably Dec 05 04:33:01 i think 14 is the highest avail, 13 is stable Dec 05 04:33:11 BTW, why do they call it "IDEA"? Sounds so weird to me. Like broken English. Dec 05 04:33:20 how can i specify custom output file android studio 1.0 rc4. gradle 2.2.1 Dec 05 04:33:21 Hence my referring to it as "IntelliJ". Dec 05 04:33:24 IntelliJ Idea --- say it Dec 05 04:33:45 Intelligent Idea Dec 05 04:33:56 Hmm. Dec 05 04:33:57 But drunker Dec 05 04:34:00 lol Dec 05 04:34:08 tricknology: if you're not going to share ... Dec 05 04:34:12 bankai_au: I honestly don't get it. Dec 05 04:34:21 share? Dec 05 04:34:22 "Intelli-jay idea". Dec 05 04:34:36 share what? Dec 05 04:34:45 tricknology: oh... i thought you meant YOU were drunk :( Dec 05 04:34:48 Sharing is caring Dec 05 04:34:48 Share with Google Plus! Dec 05 04:34:55 whats that ? Dec 05 04:35:03 haha, nope. 32oz in though. bout to make it 64 and go to sleep Dec 05 04:35:06 IDE Afzal Dec 05 04:35:09 obviously Dec 05 04:35:29 are you idiots still measuring in oz? argh Dec 05 04:35:30 Some people refer to it as "the IDEA". Dec 05 04:35:32 God, that sounds weird. Dec 05 04:35:36 It's a freakin' IDE. Dec 05 04:35:37 Not an idea. Dec 05 04:36:01 the intelligent idia Dec 05 04:36:02 idea* Dec 05 04:36:13 I don't get how "J" is "gent", though. Dec 05 04:36:21 I just made it up Dec 05 04:36:50 it's intelligent Java IDE...A Dec 05 04:37:00 :D Dec 05 04:37:31 It seems that we can append 'J' to anything Java-related. Dec 05 04:37:42 A shall stand for Apache 2.0, which is the license of the Community edition Dec 05 04:37:47 Not Jessie, though. Dec 05 04:37:49 BAM! mystery solved Dec 05 04:39:12 thanks a lot lasserix! Really appreciate the help there. Spent a few days in profiler hell Dec 05 04:39:42 I wish my app would just hurry up. Dec 05 04:39:50 Development is so slow sometimes. Dec 05 04:39:50 I always thought the J stood for Jew Dec 05 04:39:57 das racist Dec 05 04:40:06 wat wat wat? Dec 05 04:40:06 It stands for Jainism. Dec 05 04:40:40 I really wanna make a joke but I don't want to have it in irc history forever lol Dec 05 04:40:50 You might as well. lol Dec 05 04:40:51 it's a word that starts with J, ends with D :p Dec 05 04:41:15 TacticalJoke: you need a new drug Dec 05 04:41:41 Afzal: How many letters? Dec 05 04:41:43 (Then I can google it.) Dec 05 04:41:44 TacticalJoke stays deving Dec 05 04:41:45 5 Dec 05 04:42:10 http://worddetector.com/q/j%3F%3F%3Fd/ Dec 05 04:42:26 hahahaha it's there lol Dec 05 04:42:31 11? Dec 05 04:42:36 'h' or 'w'? Dec 05 04:42:39 top down left right Dec 05 04:42:45 no lol, center Dec 05 04:42:48 right in the center XD Dec 05 04:42:51 Jihad? Dec 05 04:43:00 i didn't say this Dec 05 04:43:06 Not such a scary word. Dec 05 04:43:16 aaaaaanyyyyway Dec 05 04:43:17 lol Dec 05 04:43:33 Aloha Snackbar Dec 05 04:43:34 shmooz: Yeah, these drugs are wearing off. Got anything better? Dec 05 04:43:37 not as scary as JarJar Dec 05 04:44:00 Christopher JarJar Nolan if he messes this one up Dec 05 04:44:02 Has any one taken a look at android studio yet? Dec 05 04:44:06 Joking aside, I've never taken "drugs". Closest I've come is tobacco and alcohol. Dec 05 04:44:14 like 90% of this chat Dec 05 04:44:16 TacticalJoke: you're missing out! Dec 05 04:44:22 ^ Dec 05 04:44:31 Should I drop acid or something? Dec 05 04:44:35 yes Dec 05 04:44:36 Not by yourself.. Dec 05 04:44:36 Imagine how my app would turn out. lol Dec 05 04:44:43 and shrooms and of course weed Dec 05 04:44:44 zacnomore: use IJ14 -- much better than AS Dec 05 04:44:50 It'd randomly destroy the hard drive or something. Dec 05 04:44:55 It wouldn't you would be too distracted by the pixels Dec 05 04:44:59 basically psydelic drugs are pretty nice Dec 05 04:45:14 bankai_au what version of the android gradle plugin are you using with ij14 ? Dec 05 04:45:17 "I CAN SEE ALL THE PIXELS!!! OMG IT"S LIKE A DOUBLE RAINBOW!!" Dec 05 04:45:21 psychodelic Dec 05 04:45:26 Am I the only person who's never taken drugs? Dec 05 04:45:32 phychadelic? Dec 05 04:45:34 g00s: no idea :) Dec 05 04:45:35 I swear, every time this topic comes up, the whole world is telling me what drugs are like. Dec 05 04:45:44 psychedelic Dec 05 04:45:45 bankai_au O.o Dec 05 04:45:53 lol psycho drugs man Dec 05 04:45:56 heh TacticalJoke, where do you live? Dec 05 04:46:02 there's still gc Dec 05 04:46:05 England (near London). Dec 05 04:46:06 bankai_au: Never heard of it? Dec 05 04:46:12 but hey, no garbage data :D Dec 05 04:46:20 We're all prim and proper and civilized. Dec 05 04:46:22 with Amsterdam so close I wonder why.. Dec 05 04:46:25 No drugs here. What, what. Dec 05 04:46:26 Afzal if you do this right, you can get 0 allocations per event. but its tough ! Dec 05 04:46:28 zacnomore: i don't understand. was that a question ? Dec 05 04:46:42 g00s, really? Dec 05 04:46:44 stay away from numbing drugs like coke or heroin or opium Dec 05 04:46:58 Next time I'm in the EU I'm goign to let you fellas know Dec 05 04:47:03 those make you dumb Dec 05 04:47:11 Afzal thats what systems like hft chronicle aim for Dec 05 04:47:30 Do you ever think that being dumb would be easier? Less stress. Dec 05 04:47:35 Yes Dec 05 04:47:38 Then again, you'd also make dumb decisions, increasing stress. Dec 05 04:47:41 ignorance is bliss Dec 05 04:47:42 People who are dumb don't know they're dumb Dec 05 04:47:43 g00s, bah forget it lol. Just analyzed the hprof dump. It's all Ion's fault now :D Dec 05 04:47:43 bankai_au No, I'm just setting up my keyboard still, I just switched to linux Dec 05 04:47:46 I think you'd have less stress overall, though. Dec 05 04:48:04 No worries for me! As soon as I stop using gifs in the app, Ion will be gone and no more memory leaks :D Dec 05 04:48:07 Well you, in your ignorance, could always blame your situation on something else Dec 05 04:48:14 True. Dec 05 04:48:17 I can finally go home! it's almost midnight >_< Dec 05 04:48:24 Afzal gifs? Dec 05 04:48:27 Bankai_au: My punctuation is all wrong Dec 05 04:48:30 Think of, like, a cat. Dec 05 04:48:32 whyyyy Dec 05 04:48:35 A cat isn't clever enough to figure out what's going on. Dec 05 04:48:39 It's just sleep and food and running around. Dec 05 04:48:42 They seem pretty happy. Dec 05 04:48:44 I hate cats.. but don't let the internet hear me Dec 05 04:48:49 Aww, I loved my cat. Dec 05 04:48:52 tricknology, lol you should just check out the app at this point :p Dec 05 04:48:53 Though he's gone. ;| Dec 05 04:48:57 Some cats are nice. Dec 05 04:48:57 animals are a lot smarter than we give them credit for Dec 05 04:48:57 Cats are instinctual Dec 05 04:49:03 I agree, shmooz. Dec 05 04:49:07 Sure, Afzal, is it on play store? Dec 05 04:49:13 I don't have a W device Dec 05 04:49:15 tricknology: My cat used to cuddle me every day. lol Dec 05 04:49:16 tricknology, it's https://play.google.com/store/apps/details?id=com.kiwiwearables.app Dec 05 04:49:19 He was crazy about that. Dec 05 04:49:26 eh, you can still see the gifs :p Dec 05 04:49:30 He would litearlly follow me around the house till I sat down. Dec 05 04:49:39 I couldn't get away unless I ran into a room and closed the door. Dec 05 04:49:41 But then I felt evil. Dec 05 04:50:00 And he's just sit by the door, waiting. Dec 05 04:50:09 I love cats too :) Dec 05 04:50:11 Kiwi for Android Wear? Dec 05 04:50:12 hey guys, quick question about notifications. does anyone know how apps grab othert nitification apps? for example my smart watch can catch facebook messenger, email, etc etc. where can i get this list? Dec 05 04:50:15 afzal can't you just load the gif frames into an animation drawable? Dec 05 04:50:17 Guess I'm going to have to get a Wear.. Dec 05 04:50:25 lasserix, they're fetched from a server Dec 05 04:50:31 yeah Dec 05 04:50:32 I've always wanted one but waiting for tech to progress a bit.. get them thinner Dec 05 04:50:34 I guess I was too lazy :p Dec 05 04:50:37 shmooz: Where do you live? Dec 05 04:50:38 I have littler wrists Dec 05 04:50:38 just split the frames into an animation drawable Dec 05 04:50:38 Just curious. Dec 05 04:50:44 Toronto Canada Dec 05 04:50:46 <-- California, Los Angeles Dec 05 04:50:53 Okay. For some reason, I thought you were English. Dec 05 04:50:55 ahh oops Dec 05 04:51:01 Yeah, we have videos now. Just a matter of when I actually put them in :p Dec 05 04:51:04 < -- California, San Jose Dec 05 04:51:11 <---- Toronto! Dec 05 04:51:15 Canada is so chill. I would live there if not for cold Dec 05 04:51:21 So many Canadians in here. Dec 05 04:51:25 it is cold indeed Dec 05 04:51:38 I used to live in the north.. it sucked Dec 05 04:51:38 TacticalJoke: where from you? Dec 05 04:51:46 England. Dec 05 04:51:53 ahh Dec 05 04:51:59 We should organize a meetup, lol Dec 05 04:52:02 lol Dec 05 04:52:18 go eat some hashish and take a long sunday listening to pink floyd or somethign ;p Dec 05 04:52:20 Imagine how awkward it'd be. Dec 05 04:52:36 nah just need some kind of stupid contest + beer Dec 05 04:52:42 lol, not as awkward as a ##Java meeting Dec 05 04:52:47 I've never met someone IRL from the Internet. Dec 05 04:52:47 hehehe Dec 05 04:52:51 Have they had meetings? Dec 05 04:52:53 many cities already have android meetups Dec 05 04:52:55 They should meet at an asylum. Dec 05 04:52:56 I have met many people online Dec 05 04:53:01 I have met a few best friends that way Dec 05 04:53:11 From which online places? Dec 05 04:53:11 Met a few girls that way Dec 05 04:53:13 If I can ask. Dec 05 04:53:13 does anyone know about the notifications? Dec 05 04:53:20 First was Myspace and AIM Dec 05 04:53:25 Interesting. Dec 05 04:53:26 now Tinder Dec 05 04:53:34 met my first Tinder girl last week Dec 05 04:53:42 Anyone know of a good site with screenshots of many different kinds of material design themed apps? Dec 05 04:53:43 Was she insane? Dec 05 04:53:47 I always suspect that e-people are insane. Dec 05 04:53:49 beware of the notifications Dec 05 04:53:54 I can't tell yet.. She seems cool enough Dec 05 04:53:56 lasserix: you can try dribble Dec 05 04:54:02 Lots of energy Dec 05 04:54:10 but its not material design, just alot of concept design Dec 05 04:54:35 I've had my fair share of crazy in the past. I've kinda lost hope. Dec 05 04:55:00 Never lose hope and go into it with 0 expectations Dec 05 04:55:02 maybe i should add a progress indicator just for the sake of layout even tho it only takes 20 ms to parse the file Dec 05 04:55:04 True. Dec 05 04:55:13 and hashish Dec 05 04:55:20 My recent one just ended, actually. Making this app is part of my attempt to get over her. Dec 05 04:55:34 Aaaah TacticalJoke, I know the feeling Dec 05 04:55:38 jareddlc: thanks Dec 05 04:55:49 If not for programming, I would be seriously depressed, I think. Dec 05 04:55:57 It sucks and takes time but at some point you're going to have to face the music Dec 05 04:55:58 Our thoughts are extremely powerful. Dec 05 04:56:00 Yeah. Dec 05 04:56:09 TacticalJoke: are you like one of them autistic type nerds ? Dec 05 04:56:13 One could even say that thinking is dangerous. Dec 05 04:56:14 Oh, no. Dec 05 04:56:18 It took me 2-3 years to get over my last serious relationship Dec 05 04:56:20 hey TacticalJoke Do you know how apps get a list of applications that submit notifications? and how they are able to grab those notifications? Dec 05 04:56:29 Not sure, jareddlc. Sorry. Dec 05 04:56:29 I couldn't form new ones because I was always thinking of her Dec 05 04:56:38 Yeah, tricknology. I feel like I don't wanna. :/ Dec 05 04:56:41 thanks, TacticalJoke Dec 05 04:56:41 can you send different kinds of data at the same time with ACTION_SEND ? Dec 05 04:56:42 This was two years. Dec 05 04:57:06 like Sheldon from Big Bang Theory ;) Dec 05 04:57:15 sup g00s Dec 05 04:57:23 HI jareddlc Dec 05 04:57:24 jareddlc, not in manifests? Dec 05 04:57:26 shmooz: I'm not autistic (at all, AFAIK), but I have serious OCD. Dec 05 04:57:42 Those often (but not always) go hand in hand. Dec 05 04:57:56 OCD is good for programming Dec 05 04:58:04 tricknology: my samsung gear fit, was able to get all the apps that submit notifications so it can relay them to my watch. i was wondering how they get that list Dec 05 04:58:04 Yeah, though it's crazily stressful at times. Dec 05 04:58:24 you guys need to get out and do something that threatens your life more often Dec 05 04:58:25 TacticalJoke: I'd hire you Dec 05 04:58:30 I guess I see code as art. Every little thing has to be in the right place. Dec 05 04:58:33 Afzal might have an idea Dec 05 04:58:35 lol lasserix Dec 05 04:58:47 tricknology, for? Dec 05 04:58:57 lasserix, I've been out in DTLA the last 3 nights, I'm chilling tonight Dec 05 04:58:58 like go bungee jumping or something, great way to remind yourself of life after "her" Dec 05 04:59:02 shmooz :) Dec 05 04:59:10 hehe tricknology yeah that works Dec 05 04:59:14 Afzal, tricknology: my samsung gear fit, was able to get all the apps that submit notifications so it can relay them to my watch. i was wondering how they get that list Dec 05 04:59:48 lasserix: Or go crazy and become a priest or something. Dec 05 04:59:56 Gear fit is not a Wear device right? Dec 05 05:00:06 Afzal: nope Dec 05 05:00:07 TacticalJoke: no that would be so lame these days Dec 05 05:00:10 I guess it just used the accesibility notification APIs Dec 05 05:00:12 TacticalJoke: but I'd get a manager to whip you to meet your deadline Dec 05 05:00:15 like PushBullet does Dec 05 05:00:16 I've never really believed, though. Dec 05 05:00:26 Is there no android equivalent or javascript's alert('foo'); ? Dec 05 05:00:26 shmooz: with as much as TacticalJoke chats you'd have too Dec 05 05:00:29 What did it for me is that I graduated college and realized that there are about 3 billion girls out there, half of which are single, and about half of which are of legal age. Dec 05 05:00:31 thanks Afzal so i'll look into accesibility notifications Dec 05 05:00:32 shmooz: God, that'd be stressful. lol Dec 05 05:00:32 "forget a woman, try to kill yourself" :p Dec 05 05:00:42 nooooooooooo don't do that Dec 05 05:00:48 arbitraryuser, Log.d Dec 05 05:00:52 or log Dec 05 05:00:59 bungee I meant Dec 05 05:01:01 oh wait no, it should be a Dialog! Dec 05 05:01:01 :D Dec 05 05:01:02 lol Dec 05 05:01:06 javascript Dec 05 05:01:08 yes and ban him from irc , lol Dec 05 05:01:29 wot? Dec 05 05:01:29 capella-s3: no bunjee jumping? Dec 05 05:01:36 (I'm using it for debugging purposes, so log should work... reading now) Dec 05 05:01:46 arbitraryuser: yeah log is the way to do that Dec 05 05:01:55 Not yet... had a ball skydiving though Dec 05 05:01:59 The thing is, after almost dying, the first thing I'd think of is her. Dec 05 05:02:06 Like "I'd better let her know I almost died. Wait". Dec 05 05:02:13 arbitraryuser: tho you might want to make a static reference class with a flag whether to print log since it can be a real pain to remove all logs when building for release Dec 05 05:02:32 arbitraryuser: check out the source for Log.d it has a condition in there I think like "if (BuildConfig.DEBUG) ..." Dec 05 05:02:59 yeah, I'm still very much in the learning phase... not even building anything particular, just buttons that click etc. Dec 05 05:03:17 (so all the code will be thrown away) Dec 05 05:03:20 BuildConfig.DEBUG is true if you sign the app with your debug cert, like pressing play in the IDE.. once you sign it with a real cert that gets changed to false and your log messages don't show up anymore Dec 05 05:03:53 arbitraryuser, that's a good start :) Dec 05 05:03:57 Log is such a handy class. Dec 05 05:04:01 I love it Dec 05 05:04:04 I think .NET had nothing like it. Dec 05 05:04:04 arbitraryuser: http://pastebin.com/vVVu7NbC Dec 05 05:04:30 tricknology: all log messages? Dec 05 05:04:32 How did you guys learn android dev, but for me it's like everyone is speaking greek. (and I'm an actual programmer) Dec 05 05:04:56 oh Dec 05 05:04:57 arbitraryuser: One step at a time. Mainly just *doing*. Dec 05 05:04:57 nm Dec 05 05:05:04 IDK lasserix, I built a wrapper for Log events called log() that checks BuildConfig.DEBUG Dec 05 05:05:08 * capella-s3 writes lots of bad code Dec 05 05:05:16 arbitraryuser: that Config.Debug should be BuildConfig.DEBUG Dec 05 05:05:19 capella-s3: so do I sometimes Dec 05 05:05:39 and then instead of log.d("blah", "msg") you just do cat.d("blah", "whatever") Dec 05 05:05:55 I hate leaving Log calls in my rebased code. :[ Dec 05 05:05:57 eventually one pares back the truly bad stuff :) Dec 05 05:05:58 arbitraryuser: you can use that second method to make a all log filter by just making the keyword thats concated to the filter Dec 05 05:06:00 Though I probably should at some point. Dec 05 05:06:26 Here is my solution for the logger: https://github.com/znwabudike/ALog/blob/master/ALog/src/com/github/znwabudike/alogger/Log.java Dec 05 05:06:30 anyone know what the iOS equivalent of the number picker is ? Dec 05 05:06:31 capella-s3: It seems that a lot of the code we write ends up being replaced anyway. Dec 05 05:06:38 it includes stack trace elements so I can see what method called the log Dec 05 05:06:47 g00s isn't it like a circular wheel thing? Dec 05 05:06:48 not perfect, threads throw it off Dec 05 05:06:54 lasserix yeah that dumb thing Dec 05 05:07:03 main point is the "if (BuildConfig.DEBUG){...}" Dec 05 05:07:03 tricknology: yeah but getting the stack trace is SLOW Dec 05 05:07:11 arbitraryuser: which languages do you already know ? Dec 05 05:07:24 Well yes, that's why it checks the buildConfig Dec 05 05:07:33 tacticaljoke yah! I've seen entire blocks of my stuff pulled and replaced during ui refactorings Dec 05 05:07:34 It's helpful for taking over projects you didn't write Dec 05 05:07:44 no i mean if you are doing optimization that can really fuck up your performance numbers Dec 05 05:07:48 capella-s3: Aww. lol Dec 05 05:07:49 but yeah Dec 05 05:07:50 that's cool! Dec 05 05:07:54 shmooz: python Dec 05 05:07:54 just stick a log() in there and you can see what called the method containing the log() Dec 05 05:07:57 I feel bad when *I* replace my code. I'd hate someone else to. Dec 05 05:08:13 Actually, I usually feel pretty good, since the old code is relatively horrible. Dec 05 05:08:21 arbitraryuser: you need to learn some java and xml Dec 05 05:08:32 eventually I want to write a code crawler that parses code and puts it into a UML style image.. if anyone would like to help with that that would be awesome Dec 05 05:08:49 arbitraryuser: you don't have to but it would make your life easier Dec 05 05:08:57 Work in a large project and eventaully it all gets repolished Dec 05 05:09:12 Yeah. Dec 05 05:09:16 I am completely rebuilding this project because the last one is like a house of cards Dec 05 05:09:27 change one thing and race conditions everywhere Dec 05 05:09:58 I basically came to the conclusion that, generally speaking, multithreading is too complex for humans. Dec 05 05:10:01 We have 7 or so devices that connect with the app.. It got so ugly I had to write a wrapper to connect the devices Dec 05 05:10:05 That was after writing an HTTP server, I think. Dec 05 05:10:22 someone who has more e time than me comes along and does ut one better Dec 05 05:10:22 There comes a point where you just can't understand it anymore, no matter who you are. Dec 05 05:10:25 TacticalJoke: It is safe to assume that threads behave like renegades lol Dec 05 05:10:33 they don't GAF Dec 05 05:10:37 lol Dec 05 05:10:40 They DGAF Dec 05 05:11:02 arbitraryuser: just read some basic tutorials and some basic concepts and you can get your IDE and SDK installed and do your hello world in a day or two Dec 05 05:11:04 The worst bugs are the 1-in-1,000 data-loss ones. Dec 05 05:11:10 Ones that are almost impossible to reproduce. Dec 05 05:11:19 I had some code that would fire off 3 threads to ping a server.. the first one to call back, use that URL.. Dec 05 05:11:20 shmooz: yeah, my understanding of xml is good. And I've previously done c, c++ so I'm only struggling a little bit with the Java ;) Dec 05 05:11:31 I ended up using that URL 1 2 or 3 times Dec 05 05:11:48 even with synchronized methods Dec 05 05:11:55 arbitraryuser: it's pretty similar to C , it shouldn't be hard to get it Dec 05 05:12:09 so much better Dec 05 05:12:10 I'm sure you know what OO is Dec 05 05:12:13 of 10000 tests only 5687 or something happened correctly Dec 05 05:12:23 tricknology: Was it related to stale data? Dec 05 05:12:39 Memory observability, or whatever they call it. Dec 05 05:12:46 anyone else have issues with their HAXM emulator going into a "Not Responding" state when trying to load up a new build? Dec 05 05:12:51 (windows 7) Dec 05 05:13:00 arbitraryuser: How long have you given it? Dec 05 05:13:13 TacticalJoke: hmm, 20 seconds? Dec 05 05:13:24 stale? no I had a boolean like "if (!stopPingingBecauseURLFound){ pingURL(); ...} Dec 05 05:13:28 Mine takes minutes (even the HAXM thing). Dec 05 05:13:33 The first run, anyway. Dec 05 05:14:04 Do you mean stale like one thread is accessing the data while the other thread hasn't finshed writing to the data? Dec 05 05:14:12 TacticalJoke: yeah, I'm talking about once it's up and running, and then I make a change to the code and try to run it again. Dec 05 05:14:29 loves me the volatiles Dec 05 05:14:30 A -> true B-> false, result = true? Dec 05 05:14:30 tricknology: I mean where one thread has a cache of a value (and so it doesn't have the latest value). Dec 05 05:14:37 yes Dec 05 05:14:40 super stale Dec 05 05:14:46 that was using static Dec 05 05:14:55 synchronized just didn't do what it was supposed to do at all Dec 05 05:15:30 I think some situations require the class in question to be using locks and stuff. Dec 05 05:15:39 And so, even if you use locks around it, that won't be enough. Dec 05 05:15:48 I don't know about the URL class, though. Dec 05 05:15:52 I'll hav eto look into that. Dec 05 05:16:13 Also, some cases don't allow for locking, so the best you can do is use volatile variables. :/ Dec 05 05:16:16 meh the pinger is a custom class that gets the status, no actual ping (timing ) data Dec 05 05:16:36 so the logic was that the first one to return 200/OK was the one to use Dec 05 05:16:46 since the threads were fired off at (relatively) the same time Dec 05 05:17:00 We have 3 servers, one east, and two west.. Dec 05 05:17:30 old logic was to ping the first onem if it returns 200/OK use it. if not go to the next Dec 05 05:17:43 sicks for you if you were in the west coast and the first one on the lsit is East coast Dec 05 05:18:29 hi guys, I have a thread problem when implementing a countdown timer with a progress bar. Dec 05 05:19:00 ping uses icmp, are you just connecting over tcp and sending a http command? Dec 05 05:19:22 Is there a simple way to create the onclick method for a button in AS? Dec 05 05:19:43 (ie. not typing it out manually?) Dec 05 05:20:56 Cervantes what is the problem? Dec 05 05:21:19 i get this problem , CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch views Dec 05 05:21:21 whatitis, I am not sure what it uses. I think it just posts and gets the status in a response Dec 05 05:21:35 you need a Handler Dec 05 05:21:37 or Runnable Dec 05 05:21:55 You are trying to modify something on the UI thread from a secondary thread Dec 05 05:22:00 Android does not like this Dec 05 05:22:05 so much awesome : http://www.theverge.com/2014/12/2/7319319/stephen-hawking-as-a-theoretical-bond-villain Dec 05 05:22:20 runOnUiThread(runnable) Dec 05 05:22:22 tricknology: ah, i see. Dec 05 05:22:41 saw that.. I hope they take him up on it Dec 05 05:23:26 :p Dec 05 05:27:32 arbitraryuser: you don't sound too serious about wanting to do this Dec 05 05:28:01 arbitraryuser: type out your code by hand so you learn better Dec 05 05:28:05 If anyone is really bored come figure this out with me: http://stackoverflow.com/questions/27307201/set-text-select-drawables-on-htc-sense Dec 05 05:28:55 jrummy are you aware that each device and carrier has their own build of Android? Dec 05 05:30:25 I have no idea what to do but if I can make a suggestion.. make it so that you can copy-paste long lines of text in a scrollview. So far no mater what device I test, If I have to copy a large block of text in a ScrollView it fails.. even up to 5.0 Dec 05 05:30:25 tricknology: yes. The handles haven't changed since JB. Dec 05 05:31:28 oh sorry I just now got to the part where you link HTC's code Dec 05 05:32:14 Jesus.. 6.3k Lines? Dec 05 05:32:37 text selection in java... I've been doing it in JavaScript Dec 05 05:32:43 arbitraryuser: you google 'whatever it is you are trying' and end up comparing usually stackoverflow solutions Dec 05 05:32:57 ^ how I learned Dec 05 05:33:10 and here.. you guys are awesome btw Dec 05 05:34:51 jrummy do you wrk for Google? Dec 05 05:35:49 ok, so I typed it all out. My button's onclick value is "selfDescruct" and I have a "public void selfDestruct(View view){" method, but when I click the button nothing happens. Dec 05 05:36:16 can you pastebin.com the code? Dec 05 05:36:25 sure Dec 05 05:37:42 http://pastebin.com/ubrYj1Zt Dec 05 05:38:03 jrummy maybe it has something to do with the drawables bieng final? Dec 05 05:41:00 arbitraryuser: you should not do xml defined onClick event Dec 05 05:41:23 ^ Dec 05 05:41:39 tho that should be working Dec 05 05:41:45 but why? http://developer.android.com/reference/android/widget/Button.html says that's a way of doing it? Dec 05 05:41:53 it promotes bad design Dec 05 05:41:57 it's a bad way Dec 05 05:42:03 it's old school Dec 05 05:42:09 you should properly encapsulate your click function Dec 05 05:42:16 *functionality Dec 05 05:42:28 another way of saying this its a noob way of doing it Dec 05 05:42:29 arbitraryuser: both your button and checkbox have the same id, is that on purpose ? Dec 05 05:42:56 shmooz: err, not on purpose, let me look. Dec 05 05:43:39 oh ok layout_below, sorry Dec 05 05:43:45 I read it wrong Dec 05 05:43:47 I was gonna se.. Dec 05 05:43:47 kk Dec 05 05:44:07 so how do I "properly encapsulate your click functionality"? Dec 05 05:45:07 also, now that I've completely torn down my emulator and started again, the button press log is working. Dec 05 05:45:21 it depends on how you want to do it Dec 05 05:45:35 you can use annonymous classes or otherwise Dec 05 05:45:57 but your answer lies here http://stackoverflow.com/questions/8977212/button-click-listeners-in-android Dec 05 05:46:28 http://mxr.mozilla.org/mozilla-central/source/build/mobile/sutagent/android/SUTAgentAndroid.java#345 Dec 05 05:46:52 ah beat me Dec 05 05:47:06 tricknology: They aren't final. There is a lot more going on there then in AOSP. It is probably just a waste of time. I don't work for Google. Got a job offer at Google Irvine though. :) Dec 05 05:47:10 ugh, can't figure out what I'm doing that's blocking the main thread on resume Dec 05 05:47:36 jrummy, as you should have/ should be.. that code is heavy Dec 05 05:48:15 tricknology: hi, so i fixed my problem by using handler inside second thread. Dec 05 05:48:20 * capella-s3 has a coding interview coming upbw google Dec 05 05:48:43 tricknology: is there a way to reset a progress bar and start counting again? Dec 05 05:49:00 from where? Dec 05 05:49:13 capella-s3: for what location? Dec 05 05:49:28 tricknology: I set the counter inside a thread that counts the progress bar to 0 when the progress is max. Dec 05 05:49:54 not sure yet... mv i think... they're still very vague with details Dec 05 05:50:16 tricknology: and use setProgres(0) on the progressbar outside. It does the job reseting the bar, but it does not count anymore. Dec 05 05:50:32 capella-s3, sick of of moz? Dec 05 05:50:56 heh, not at all :) They've been nice to me Dec 05 05:51:48 I'm in Portland right now at their invitation ... we're bopping people over the head on the docks to get new contributors :P Dec 05 05:52:18 (That was the best joke I heard today) Dec 05 05:52:19 Cerantes, can you paste code? it's pretty hard to understand what you're trying to do without seeing it Dec 05 05:54:28 are you following http://developer.android.com/reference/android/widget/ProgressBar.html ? Dec 05 05:55:10 capella, you use yaaic and not qicr? booo Dec 05 05:55:33 if you set status to 0 outside of the thread and doWork() returns >= 100 then the progressbar will show 0 when actually completed Dec 05 05:55:42 Yaaic has issues I know ... qicr? Dec 05 05:56:39 oic https://play.google.com/store/apps/details?id=com.hanhuy.android.irc.lite&hl=en Dec 05 05:56:40 Nice, the have moz right there on the page :D Dec 05 05:57:09 tricknology: here's the activity code : http://pastebin.com/B7YaxZds Dec 05 05:58:16 capella, yeah, your name is practically front and center... I should make a different splash image Dec 05 05:58:38 Oh! "perry nguyen" :) Dec 05 05:58:54 * capella installs Dec 05 05:59:51 ok, So I've got a method that tries to fetch a quote of the day from an API (using HttpClient) but when I try and execute that method I get "java.lang.IllegalStateException: Could not execute method of the activity" Dec 05 05:59:53 no special perms is refreshing Dec 05 06:00:10 Is that because my app doesn't have internet permissions? Dec 05 06:00:44 how much variability is there in picture quality for camera apps (that I make). like should it just be up to the hardware pretty much? Or is it more like, the quality of my code, how well I handle the conversion to bitmap, saving the image, etc, really affects the end image quality Dec 05 06:06:50 cervantes is the problem to do with line 144? Dec 05 06:06:55 has* Dec 05 06:06:56 JakeWharton, does wire use okio for anything? Dec 05 06:07:03 reading and writing data Dec 05 06:07:24 Excuse me all, but I ould like to know where I can get Android SDK 22.3 tools for linux. Dec 05 06:07:36 So the whole reading and writing of binary to protobuffed data has been accounted for? Dec 05 06:07:54 well, you know what i mean Dec 05 06:08:15 i don't know what you mean Dec 05 06:08:21 you can download android sdk for linux on the developer website Dec 05 06:08:40 tools > view all downloads and sizes Dec 05 06:08:42 tricknology: no, the app runs, there is no crash problem Dec 05 06:08:53 Ok, well, heres the situation. I have a socket connection which communicates packets which are protobuf'd Dec 05 06:09:04 some packets are protobuf'd, some arent. Dec 05 06:09:09 yes, but as I understand the progressbar doesn't update if you set it to 0.. does it update at all? Dec 05 06:09:26 tricknology: you see that when it reach 'finally', which is when the progressbar is max, i set 'waited = 0'. Dec 05 06:09:36 Was considering using wire and okio to do my data processing Dec 05 06:10:02 so was wondering what the coverage is like for wire, okio Dec 05 06:10:12 tricknology: yeah, it updates, and set the progressbar back to empty. But my intention is to start the progress bar filling up again. Dec 05 06:10:35 kevel1: okhttp uses okio. Android uses okhttp. there are hundreds of millions of devices using Android 4.4 or newer. Dec 05 06:10:49 tricknology: what it does not is, it fill up -> empty -> not filling up. Dec 05 06:10:55 now* Dec 05 06:11:07 can you debug it? Dec 05 06:11:11 is mbActive false? Dec 05 06:12:11 guys pls tell whre I can get ADT tools 22.3 Dec 05 06:12:30 you can download android sdk for linux on the developer website Dec 05 06:12:30 tools > view all downloads and sizes Dec 05 06:12:36 borw3 ^ Dec 05 06:12:52 tricknology: no, i think it always stay true, i never change it to false anywhere Dec 05 06:15:06 oh.. that is because your thread is finished Dec 05 06:15:10 and you set your progess to 0 Dec 05 06:15:12 end Dec 05 06:15:44 is this test code or why are you waiting 15 seconds every time? Dec 05 06:16:18 1.5s Dec 05 06:16:29 tricknology: yeah, i try to test every 15 seconds for now Dec 05 06:16:45 tricknology: some kind of quiz game that has 15 seconds limit Dec 05 06:16:48 ok cool. well it looks like you are not restarting the thread Dec 05 06:16:58 after line 307 Dec 05 06:17:02 tricknology: yeah, it seems, so how do i do this? Dec 05 06:17:21 progress is 0, waited is 0 but your thread hasn't been started Dec 05 06:17:41 well.. this will probably cause an infinite loop until mbActive is set to false but.. Dec 05 06:18:12 mTimerThread.start(); Dec 05 06:18:33 maybe put a for loop around that on line 308 Dec 05 06:18:37 ...to test Dec 05 06:19:43 Guys plz assist, I would like to know where I can download android sdk tools 22.3 stand alone Dec 05 06:19:55 borw3 look above Dec 05 06:20:11 dowload.com Dec 05 06:20:31 tricknology: the one at google devs website is 23.0 not 22.3 Dec 05 06:20:47 oh ok. I didn't know, not using Linux Dec 05 06:21:11 tricknology: ok, starting the thread after setProgress(0). gives this "java.lang.IllegalThreadStateException: Thread already started" Dec 05 06:21:48 tricknology: stop() and destroy() thread functin is depreciated. Dec 05 06:22:01 Guys plz assist, I would like to know where I can download android sdk tools 22.3 stand alone Dec 05 06:22:45 borw3 if you can't find it on the website, we probably can't either Dec 05 06:22:49 on the error: that is because your thread has called onContinue() and onContinue() is being used to call the thread.. so onContinue() belongs to the thread and it's essentially trying to start itself. my bad Dec 05 06:23:11 call interrupt() and get rid of the finally clause Dec 05 06:24:08 g00s:well, I thaught there was a trick, like in getting the adt 22.3 it wasnt hard but t also wasn't avalablewritten in plain site by google devs Dec 05 06:25:14 actually Dec 05 06:25:33 youre going to have to restructure things a bit Dec 05 06:25:51 at least the way I see it working (take it work a grain of salt).. Dec 05 06:26:28 tricknology: should i put the interupt inside the while loop? Dec 05 06:27:01 no Dec 05 06:27:08 neg Dec 05 06:27:10 tricknology: this is my first android app. I just go along with as many new stuff i can try for now. Dec 05 06:27:22 well you're not doing such a bad job.. Dec 05 06:27:48 Cervantes: just make lines 134 a method Dec 05 06:27:54 and pass it a new progress bar each time Dec 05 06:28:01 134 to the end Dec 05 06:28:04 of oncreate Dec 05 06:28:08 and pass it a progress dialog Dec 05 06:28:32 god suggestion Dec 05 06:28:36 good* Dec 05 06:28:37 pfn: where do you specify sasl settings? Dec 05 06:28:48 lasserix: oh okay, i will try that now Dec 05 06:29:18 Cervantes: and then each new question, reset the progress dialog and pass it into that method Dec 05 06:31:10 one problem is Dec 05 06:31:15 you don't keep a handle to this thread Dec 05 06:31:18 so you can't interrupt it Dec 05 06:31:42 you might want to implement pause with a wait/notify Dec 05 06:32:28 lasserix: to reset the progressbar, i just setProgress(0) before calling that big method, right? Dec 05 06:32:37 yeah probably Dec 05 06:32:51 make sure you don't cancel it tho? i dont know exactly haven't used the progress bar itself much Dec 05 06:33:09 by the way you'll want to do something like Dec 05 06:33:25 Thread countdownThread; in your class Dec 05 06:33:32 then countDownThread = big anonymous thread class Dec 05 06:33:35 that way you can do Dec 05 06:33:48 JakeWharton, are there any example where wire reads from a stream without having to keep firing up a WireInput.newInstance(...) ? Dec 05 06:34:04 @Ovveride onStop() { super.onStop(); if (countDownThread != null) { countDownThread.interrupt(); } } Dec 05 06:34:07 kevel1: no Dec 05 06:34:15 kevel1: that's its abstraction Dec 05 06:34:18 otherwise it'll keep counting even when your activity goes to the background Dec 05 06:35:32 lasserix: ok, i will try implement that after this Dec 05 06:37:28 capella, sasl isn't implemented yet, but regular server auth should identify you with nickserv Dec 05 06:38:10 It doesn't seem to let me on ... I always thought I needed sasl auth w/password etc Dec 05 06:38:30 capella, I wrote some stuff to start supporting sasl but never found a reason to finish it Dec 05 06:38:36 why not this? http://pastebin.com/ahbmM32J Dec 05 06:38:41 lasserix, cervanted Dec 05 06:38:44 cervantes Dec 05 06:39:13 moznet works ok ... guess I need to fiddle around w/freenode some more Dec 05 06:39:23 win 1 Dec 05 06:39:53 lose some Dec 05 06:40:10 tricknology: you need to break in the InterruptedException Dec 05 06:40:16 break from the while loop Dec 05 06:40:28 well Dec 05 06:40:29 capella: I am irssi noob, missed / Dec 05 06:40:39 onContinue -> interupts but by the time the thread is finished Dec 05 06:40:42 nah it will throw exception and kill the thread, no? Dec 05 06:40:54 and tricknology you can't restart a thread Dec 05 06:40:57 has to be a new instance each time Dec 05 06:40:58 no Dec 05 06:41:07 by the time onContinue has been called Dec 05 06:41:11 it is beyond the interrupt catch Dec 05 06:41:18 you are right Dec 05 06:41:27 and calling thread.start() more than once will crash out, a thread can only be started once Dec 05 06:41:33 that's why you have to do = new Thread each time Dec 05 06:41:39 I did not know that.. pretty fundamental Dec 05 06:41:55 so you can do something like private Thread getCounterThread() { return new Thread = big ole anon class; } Dec 05 06:43:00 so why not move the catch to the end ot the run() and define the thread in onContinue() and start it there? Dec 05 06:43:36 later true Dec 05 06:43:38 so, will it be a thread inside a thread inside a thread inside a thread ... ? Dec 05 06:43:44 no Dec 05 06:43:50 the thread executes and finishes Dec 05 06:44:00 when it finishes you call a function that starts a new thread Dec 05 06:44:08 its not a thread in a thread its a thread after a thread Dec 05 06:44:23 ah, ok Dec 05 06:44:30 What's a good way to save if my checkbox is checked or not in boolean? Dec 05 06:44:42 if that makes you uncomfortable you could call back via the handler and create a new thread spawned from the main thread Dec 05 06:44:42 capella, send your nick as username and nickserv password as server password Dec 05 06:44:45 each time Dec 05 06:45:09 capella, should work on freenode Dec 05 06:45:40 tricknology: ok, my app works the way i wanted Dec 05 06:45:44 enable ssl? Dec 05 06:45:50 tricknology: lasserix: thanks so much guys Dec 05 06:46:03 np Dec 05 06:46:05 capella, if you connect to an ssl port, sure Dec 05 06:47:29 what about this? http://pastebin.com/njHW9bxf Dec 05 06:47:34 condensed Dec 05 06:47:53 http://www.reddit.com/r/androidAppPromotion/new/ Dec 05 06:48:01 what kind of asshole made this category Dec 05 06:48:09 lol Dec 05 06:48:09 tricknology: you are starting to cramp yourself Dec 05 06:48:14 I think so Dec 05 06:48:52 well Dec 05 06:48:54 line 20 Dec 05 06:49:01 and like 53 Dec 05 06:49:28 I didn't even look at that tbh Dec 05 06:49:59 I'm getting there... I have it fetching stuff from the internet via a runnable. Dec 05 06:50:06 delete 20 and put 13 there Dec 05 06:50:13 but I'm trying to Log.d(jObj.getString("quote")); where jObj is a json object. Dec 05 06:50:42 arbitraryuser: usually you don't want to do gets inside a log Dec 05 06:50:49 since your log can NPE Dec 05 06:50:54 NPE? Dec 05 06:51:03 non-person entity Dec 05 06:51:15 when your code becomes ephemerally self concious and bitch slaps you Dec 05 06:51:15 right, that clears it up ;) Dec 05 06:51:16 no people entrance Dec 05 06:51:29 null pointer error Dec 05 06:51:48 I like the middle one better Dec 05 06:52:02 tricknology: oh ok, yeah. So, interupt() will force end the thread? or just leave it there hanging? Dec 05 06:52:28 interrupt will throw InterrupedException Dec 05 06:52:36 which will be caught and your thread will do nothing Dec 05 06:52:40 and finish Dec 05 06:52:47 slappin hand gets ta twitchin Dec 05 06:53:01 ok, but it's complaining "cannot resolve method 'd(java.lang.String)'" Dec 05 06:53:16 tricknology: ok, thats what i needed. my game now has multiple countdown bar switch back and forth if i skip the question when the thread hasnt ended Dec 05 06:53:31 arbitraryuser: you using intellij android studio? Dec 05 06:53:39 click into the arguements of that method Dec 05 06:53:42 and press crtl P Dec 05 06:53:43 yeah because there is not ondition to stop that Dec 05 06:53:47 Android Studio RC2 Dec 05 06:54:06 click inside the method paranthesis and press crtl P Dec 05 06:54:12 doh . Dec 05 06:54:13 or click on the method name and press crtl Q Dec 05 06:54:16 I forgot the tag Dec 05 06:54:17 lol, i fresh installed AS rc-4 and they messed up the gradle location again. seems like they keep fixing things to break it in the next release Dec 05 06:54:30 * capella just found ctrl-o today :/ Dec 05 06:54:31 Cervantes, maybe I don't understand... Dec 05 06:54:40 tricknology: that works Dec 05 06:54:40 hahahaha Dec 05 06:54:56 capella ctrl-e ftw :) Dec 05 06:54:56 tricknology: Cervantes so if you call interrupt on the thread it's essentially cancelling the thread actio Dec 05 06:54:57 n Dec 05 06:55:03 cancelling the thread action Dec 05 06:55:08 you may want to add a finally block Dec 05 06:55:11 to reset your state Dec 05 06:55:26 * capella needs to play w/menus more Dec 05 06:55:28 however, you should proabably always reset it before you start a new question so... Dec 05 06:55:58 mmm crtl e is nice ! ;p Dec 05 06:56:23 lasserix: okay Dec 05 06:56:28 Cervantes: if you get it fixed up i'll help you add a pause function Dec 05 06:56:31 ctrl + a, ctrl + i, ctrl + o, ctrl+s Dec 05 06:56:50 can I macro all these functions into one keystroke? Dec 05 06:56:51 In Android Studio, how do I force a rebuild ? It seems like I can press play and it just boots up the same old version in the emulator? Dec 05 06:57:02 clean? Dec 05 06:57:51 lasserix: its ok. After i get this fixed, i gotta study physics for my final. Dec 05 06:58:29 Good to see you've got your priorities sorted out ;p Dec 05 06:59:25 arbitraryuser: everytime it should rebuild if you press play Dec 05 06:59:57 Cervantes: oh ok, it's pretty easy you just have to add an Object that is a lock and use a wait notify on it Dec 05 07:00:09 lasserix: hmm. thanks. I'm well aware that what I think going on is more likely my ignorance and placebo ;) Dec 05 07:02:12 lasserix: hmm, it seems that sometimes it gets stuck. I've just tested changing a log from "aaa" to "bbb" and re-played and it work, but previously I had code that just wasn't being run... killed the emulator and restarted it and everything's working again. Dec 05 07:02:59 wow, View in Lollipop is 20K lines ! Dec 05 07:03:09 i wonder how anyone comprehends that Dec 05 07:03:27 i guess thats why i dont work at google :) Dec 05 07:05:44 to any of you guys that do freelance android work, what % upfront of the total cost is reasonable ? Dec 05 07:06:03 depends Dec 05 07:06:16 oh man it always does :( Dec 05 07:06:18 if you know the total cost Dec 05 07:06:22 g00s, pay per iteration Dec 05 07:06:48 no pay, no next iteration Dec 05 07:06:49 kevel1 ah, so if an iteration is 2 weeks, you would ask for that upfront Dec 05 07:07:00 either upfront of after Dec 05 07:07:09 at most u'll lose 2 weeks of work Dec 05 07:07:11 arbitraryuser: yeah it does get stuck sometimes, what i do is stop current and then replay Dec 05 07:07:20 kevel1 thanks Dec 05 07:08:08 lasserix: how do I stop current? Dec 05 07:08:11 you don't Dec 05 07:08:26 under run Dec 05 07:08:26 Stop Dec 05 07:08:38 if its greyed out it means it hung Dec 05 07:08:40 just do it again Dec 05 07:08:55 still doing most all moz dev in sublimetext... intellij wont help w c++ nor js Dec 05 07:09:27 need more java pure play work Dec 05 07:09:49 lasserix, hung like a horse? Dec 05 07:09:54 im grayed out and hung Dec 05 07:10:05 hahahaha Dec 05 07:10:07 im just jung Dec 05 07:10:10 hung Dec 05 07:10:11 -_- Dec 05 07:10:15 fucked that up Dec 05 07:10:16 lol Dec 05 07:10:29 was jung hung? Dec 05 07:11:18 If I'm just doing a torch app, should I use camera2 in L or use the deprecated camera for all versions? Dec 05 07:12:33 sometimes using eclipse proabbly did feel something like getting slapped in the fact with a big horse ... Dec 05 07:13:09 fishsticks? Dec 05 07:13:17 yeah Dec 05 07:13:49 the insecure hetereosexuals worst nightmare: big horse fishsticks Dec 05 07:14:10 sums up about half the frustration with android Dec 05 07:14:34 he's a gay horse fish Dec 05 07:15:03 someone at google should come up with a material transform algorithm Dec 05 07:15:15 you can feed it some xml file and it'll materialize it for you Dec 05 07:17:06 Hi! I am getting error in this code dpaste.de/VLhc Error: Variable 'device_type' is accessed from within inner class, needs to be declared final. But if I declae it as final, how will I change its value? Dec 05 07:21:00 guys, does View.getHeight() return the total height of the view or does it return the height based on how much the view is visible on screen? Dec 05 07:21:55 height of view Dec 05 07:22:03 so Dec 05 07:22:20 I see a lot of code examples that passes 0 as flags here http://developer.android.com/reference/android/app/PendingIntent.html#getActivity(android.content.Context, int, android.content.Intent, int) Dec 05 07:22:31 given that there is no constant/flag with that value, what happens then ? Dec 05 07:23:06 shmoon: 0 means no flag is passed. Dec 05 07:23:33 lasserix, you mean its actual height? meaning there's nothing to do with what amount of dimension is visible? Dec 05 07:24:29 You combine flags with | (bitwise or) and check it a flag is set with & (bitwise and). anything & 0 is 0. So no flag is set. Dec 05 07:25:19 height but you have to consider padding and margins Dec 05 07:25:20 Also, (I guess, never checked), every flag has value in binary as 1, 10, 100, 1000, and so on, so combining flags using | is possible Dec 05 07:25:32 razzledazzle: but it does not care about visible clipping Dec 05 07:25:55 astroduck: but what behaviour should I expect then ? given that no flags are passed if its not documented Dec 05 07:26:10 lasserix, thanks for the explanation Dec 05 07:29:34 What's a good way to save if my checkbox is checked or not in boolean? Dec 05 07:29:37 shmoon: oh, no experience with PendingIntent, sorry :P Dec 05 07:30:12 nvm found it Dec 05 07:31:13 astroduck: cool no probs Dec 05 07:36:07 hi Dec 05 07:36:55 what solution do I have to add an ItemList on top of my app, an Item would be sort of a tag for filtering purpose, I would like to permit the user to add filters or remove them by just clicking on it Dec 05 07:37:23 I was thinking of an horizontal ListView but there should be multiple line of it in case it doesn't fit Dec 05 07:37:42 maybe a vertical listview of horizontal list view :) Dec 05 07:42:33 lists in lists Dec 05 07:48:51 this https://github.com/afollestad/material-dialogs or https://github.com/drakeet/MaterialDialog ? Dec 05 07:52:35 how can I start camera view with an extra data (ie. row position) from an adapter and catch it in the onActivityResult? Dec 05 07:52:43 Been googling a while and look like putExtra/getExtras does not work with ordinary data (data not related to the capture file) Dec 05 08:08:03 anyone updated AS to 1.0 RC ? Dec 05 08:10:12 ya Dec 05 08:11:08 ya Dec 05 08:12:26 any problems so far ? Dec 05 08:12:36 like upgrading gradle plugin etc Dec 05 08:13:08 no Dec 05 08:14:19 i'm staying on gradle 0.14.2 because of shrinking issue https://code.google.com/p/android/issues/detail?id=80872 but no particular pb with AS (of course there are issues, but minor in my case) Dec 05 08:16:39 anyone had a problem using facebook sdk + parse Dec 05 08:16:50 a dex conflict ? Dec 05 08:17:26 I'm using 0.13 plugin ;) Dec 05 08:18:27 here is the error https://gist.github.com/tagrudev/cc485cb4240a4c55075d Dec 05 08:20:21 Hi Dec 05 08:21:46 I want to ensure (in server-side) that user downloaded my app from Google Play, and not a modified version of my app Dec 05 08:22:08 shmoon you were asking about pending intents? Dec 05 08:22:50 actually I think is the RC 2.0 Dec 05 08:22:51 problem Dec 05 08:23:00 something my app sends to my server, then my server decides either it is original app or modified Dec 05 08:23:01 http://stackoverflow.com/questions/27286578/how-to-android-studio-rc2-build-tools-error Dec 05 08:23:45 tagrudev: woh, I am thinking of upgrade from RC 1 to 2 Dec 05 08:23:49 MalekAlrwily very, very difficult. License Verification Library is your best bet Dec 05 08:23:53 thanks for that Dec 05 08:24:05 https://developer.android.com/google/play/licensing/index.html Dec 05 08:24:26 still not sure about that Dec 05 08:24:35 sarbs: Thank you, I am reviewing it Dec 05 08:24:38 usually a dex duplication error occurs when Dec 05 08:25:03 hmm Dec 05 08:25:29 removing the parse sdk and the project builds fine Dec 05 08:25:43 so I am guessing it's facebook/parse sdk conflict Dec 05 08:25:45 of somekind Dec 05 08:26:19 MalekAlrwily the crux of the issue is that if i, as an attacker, can decompile/recompile your app in order to modify it, then it is comparably easy for me to figure out what your app is sending to your server to authenticate itself, and copy that over to my modified version Dec 05 08:26:42 basically any "secret" that gets published inside the app, isn't really secret. Dec 05 08:27:51 sarbs: what if my app needs some info from server to work, and server will not give it that info before ensure it is original apk Dec 05 08:28:08 MalekAlrwily how does the server ensure that it's an original apk? Dec 05 08:28:24 This exactly my question Dec 05 08:28:26 anything your version of the app tells your server, i can make my version of the app say Dec 05 08:29:06 well, from a security/cryptography standpoint, the answer is "the server can't tell. period." Dec 05 08:29:16 sarbs: what about certificate SHA1? Dec 05 08:29:27 from a pragmatic/nobody's-gonna-put-that-much-effort-into-a-cracking-a-free-app standpoint, proguard is often enough Dec 05 08:29:33 can attacker extract it from my apk? Dec 05 08:29:38 yes Dec 05 08:29:44 :( Dec 05 08:29:57 found the solution: facebook sdk includes bolts in it's gradle file as dependency as do Parse :) Dec 05 08:30:20 literally *anything* in the apk, an attacker can extract. i've disassembled native binaries before; java and java resources are a cakewalk compared to that. Dec 05 08:30:57 but, again, the thing you really need to weigh here is "what does an attacker stand to gain by cracking my app?" Dec 05 08:31:09 that will give you an idea of how much effort they're willing to spend on it. Dec 05 08:31:26 sarbs: then what can licensing library do? Dec 05 08:31:47 go open source Dec 05 08:32:01 do anything sensitive only the server Dec 05 08:32:02 lasserix: I am merchant Dec 05 08:32:09 licensing library is more about your app verifying that it was downloaded from Play, instead of a server verifying that the app communicating with it is a specific apk Dec 05 08:32:29 MalekAlrwily there is a new book on that may help http://www.informit.com/store/bulletproof-android-practical-advice-for-building-secure-9780133995114 Dec 05 08:32:42 g00s: Thank you Dec 05 08:32:56 MalekAlrwily what do you mean you're a merchant? what's the model Dec 05 08:33:02 Can I add to Android studio a module that doesn't stored on the project folder? Dec 05 08:33:10 (Without moving it to the project folder) Dec 05 08:33:31 sarbs: I have in-app purchases Dec 05 08:34:27 oh, well those are easy to verify, you just have your server contact Play with the IAP receipt in order to verify that it's valid before allowing the user to have whatever they bought Dec 05 08:34:35 that's part of the tutorial i believe. Dec 05 08:36:14 Hey guys Dec 05 08:36:21 Anyone familiar with AVD? Dec 05 08:36:29 I am trying to get one running with the play store Dec 05 08:36:31 seeeems to be possible Dec 05 08:36:39 by pushing in the google services stuff Dec 05 08:36:49 basically to boil down the security concepts, you have to think of anything that comes "in" to your server as potentially being an attacker who is lying to you. so, i have your app (you don't know if i've modified it or not), you have to assume that whatever the app tells you is a lie. so you have your server go ask Google (since you are initiating that call and you have chosen to trust Google, that can be "trusted data") if the Dec 05 08:36:49 receipt is valid Dec 05 08:37:10 MJCD it's possible but much easier to just launch one of the Google Play avd images Dec 05 08:37:26 hmm I tried one of them too Dec 05 08:37:32 but it didnt seem to come with the play store Dec 05 08:37:38 oh you want Play Store.. i don't think they come with that Dec 05 08:37:43 the thing is im trying to use the image to run some existing software on my computer Dec 05 08:38:03 I had a VM that was working with virtualbox Dec 05 08:38:12 but, it was horrendously slow compared to the AVD's Dec 05 08:38:35 yeah, it would be Dec 05 08:38:39 Ive managed to get the play store, google framework and logon services installed now Dec 05 08:38:52 but it just says cant sign in continually when trying to associate my google account Dec 05 08:39:15 sarbs: But I am worry if attacker modified my app, do a real purchase then send the IAP to my server and save the "info" that my app need to work Dec 05 08:39:16 and wont let me create an account either - just says all addresses are taken Dec 05 08:39:19 probably still something you're missing. gapps are a ton of packages Dec 05 08:39:34 http://www.flinkd.org/2013/12/installing-google-play-on-the-android-emulator-api-18/ Dec 05 08:39:37 im following this guide Dec 05 08:39:51 sadly, since 5.0 runs muuuch faster in the avd yet again Dec 05 08:39:51 but meh Dec 05 08:40:13 i'm unfortunately for you gonna halt my help right there since teeeechnically what you're doing is a copyright violation, but i will tell you it is possible Dec 05 08:40:50 I'm trying to display a webpage over HTTPS in a webview, but it fails and gives a blank page, while HTTP works OK, note that I'm building for API 21, and the certificate is self signed, is there a work-around to make it accept the cert? Dec 05 08:40:54 MalekAlrwily IAP doesn't work like that, every purchase is unique Dec 05 08:41:24 what you're describing is called a "replay attack" - the attacker goes through a real sequence, then "replays" that sequence over and over with fake data Dec 05 08:41:27 sarbs: Im not sure about that, its a terms of service violation perhaps Dec 05 08:41:53 sarbs: I know, but my server returning data to my app after validating the purchase Dec 05 08:42:07 and if my app modified, attacker can save that data Dec 05 08:42:27 MJCD nah, it's more than ToS because it's installing copyrighted applications on a device that didn't originally come with them Dec 05 08:42:59 that's how it's still legal for you to install a ROM like CM and then install the gapps on top of it; your device originally shipped with gapps Dec 05 08:43:20 if you bought some chinese non-compliant knockoff that didn't come with gapps, and then did the same, it'd technically be piracy Dec 05 08:43:27 sorry I got disconnected from my BNC for a sec Dec 05 08:43:44 I don't think that's true, once again, I believe its a terms of service violation, not a copyright issue Dec 05 08:43:46 i don't think anybody is gonna give a shit about you putting gapps on your emulator, but i can't help out more than i have heh Dec 05 08:43:51 JakeWharton, does wire handle the whole 'import ' mechanic? Dec 05 08:43:56 yes Dec 05 08:43:59 one being a civil criminal offense, the other being a private contractual issue Dec 05 08:44:07 kevel1: it's a full protoc replacement Dec 05 08:44:12 its not working for me :( Dec 05 08:44:12 anyway, one thing you might be able to advise with that might help at least Dec 05 08:44:36 is whenever I restart my AVD I lose all the APK's ive installed, is there a way around that without enabling snapshots? since I want to use GPU support Dec 05 08:44:59 MalekAlrwily sure, but they're just saving data that they've actually purchased Dec 05 08:45:20 you shouldn't be sending the same data for different purchases, each purchase should result in something unique Dec 05 08:45:22 JakeWharton, if i using imports i get a nullpointerexception Dec 05 08:45:37 sarbs: then sharing that data with other users Dec 05 08:45:43 but if i compile each proto individually without the import, it works Dec 05 08:45:55 MJCD make sure you're not checking "wipe data" when you restart the emu Dec 05 08:46:11 sarbs: Nah im not, but they're installed to the system partition if that makes a difference Dec 05 08:46:42 lemme go look.. i've done loads of tinkering with /system on them, hold up Dec 05 08:47:08 MalekAlrwily again, the data for each purchase should be unique (and ideally validated each use against your server) Dec 05 08:47:36 whatever data represents the Super Blaster Sword that i buy, shouldn't work for MJCD's copy of the app Dec 05 08:48:29 sarbs: Thank you for your help and time Dec 05 08:48:51 MJCD qemu keeps its partitions in a bunch of .img files, things like system.img, userdata.img, cache.img etc Dec 05 08:49:12 sarbs: yep yep Dec 05 08:49:27 if you modify one of those partitions from what it originally was created with, it copies that data into userdata-qemu.img, or system-qemu.img, and begins using that one instead Dec 05 08:49:43 so your changes to /system live in system-qemu.img Dec 05 08:49:57 if that file goes away, qemu will still load the avd but from system.img - the original, unmod'ed one Dec 05 08:50:28 MalekAlrwily np Dec 05 08:50:56 so you think its deleting that file? Dec 05 08:51:34 i think something funky's going on with that, yeah.. i can't think of any options that'd make it delete that file automatically, but maybe there's a problem creating it or something Dec 05 08:51:43 what host os? Dec 05 08:51:44 JakeWharton, extending an imported proto message with a prefixed . kills Wire (not sure why I had one, but protoc handles it) Dec 05 08:51:57 maybe I was reading that there's an APK that runs on the startup of the AVD Dec 05 08:52:00 or auto reinstalls Dec 05 08:52:04 that handles that kind of thing Dec 05 08:52:06 but I couldnt find it Dec 05 08:52:31 i can't think of anything like that Dec 05 08:52:37 in my case, imported my descriptor proto, then 'extend .google.protobuf.MessageOptions { .. }' would produce a nullpointer Dec 05 08:52:53 whereas protoc would compile fine Dec 05 08:53:02 is there a way to have a horizontal list that stretchs on multiple line if it does not fit ? Dec 05 08:53:07 what image are you basing this on? Dec 05 08:53:12 yeah doesnt look like there's any options in config.ini Dec 05 08:53:13 I tried grid layout but it has a fixed column number which is not ideal Dec 05 08:53:14 ummm im usingggg Dec 05 08:53:25 4.3.1 x86 atom Dec 05 08:53:29 JakeWharton, just a note, use it / don't use it. I dont know enough about .proto's to know which is the correct or accepted way Dec 05 08:53:38 but ive tried 5.0 x86 too Dec 05 08:54:01 kevel1: what are you trying to use it for? Dec 05 08:54:38 MJCD starting up now, will push a few things to system and see if i can reboot and still have them Dec 05 08:54:50 I got RC4 Dec 05 08:54:57 You can see the steps I followed in that guide I posted Dec 05 08:55:03 but the APK's could be anything that runs from system Dec 05 08:55:11 to avoid that being an issue from you helping me Dec 05 08:55:11 :) Dec 05 08:55:40 JakeWharton, Steamkit2 on github push changes describing the steam protocol packet proto's. I base my proto's off of those for steam on android usage Dec 05 08:56:06 protoc made massive classes, so I'm giving wire a shot Dec 05 08:56:35 What is the default gradle task ran when I use the app build configuration? Dec 05 08:56:40 the partition-size argument is the only thing that i can see that might have something to do with this Dec 05 08:56:52 MJCD haha yeah i have my own apks that go into /system that i can test with ;) Dec 05 08:57:20 yeah it is a pain to have to increase it :( Dec 05 09:00:20 kevel1: ah, yeah it will work for that Dec 05 09:00:26 and yes I know the error message and documentation sucks Dec 05 09:00:28 i'm working on v2 Dec 05 09:02:34 aha Dec 05 09:02:36 bingo Dec 05 09:02:40 i had the same issue Dec 05 09:02:49 it's due to the config file i think.. there's no system.img in the avd directory Dec 05 09:03:02 it's just loading the stock one from the sdk dir every time Dec 05 09:03:15 JakeWharton, what error message? ;) Dec 05 09:03:22 all of them Dec 05 09:03:26 or lack of them, i should say Dec 05 09:03:37 was a joke, because i didnt see any lol Dec 05 09:03:40 MJCD in ~/.android/avd/test.avd/config.ini there's a line: image.sysdir.1=system-images/android-18/default/x86/ Dec 05 09:03:49 also, a nice --help would be, well, helpful Dec 05 09:04:57 lasserix, I've tried Dec 05 09:05:01 sarbs: hmm Dec 05 09:05:04 any suggested fix? Dec 05 09:05:15 looking up the correct config in one of my other avds Dec 05 09:05:21 lahwran, but apk can't be executed Dec 05 09:05:38 lasserix, but apk can't be executed Dec 05 09:05:44 kevel1: there's Javadoc on the main class Dec 05 09:05:50 but yes, i will add --help Dec 05 09:06:08 lasserix, I get: 'can't be executed, permissioin denied' Dec 05 09:06:13 runProguard was renamed to minifyEnabled ? Dec 05 09:07:02 christian_c no idea Dec 05 09:07:40 lasserix, but I can install the apk. anyway the app seems empty. If I open, I see an example screen: 'MainActivity' and 'Hello world, MainActivity' Dec 05 09:07:51 lasserix, you have told me to try the apk Dec 05 09:07:55 oh Dec 05 09:07:56 yeah Dec 05 09:07:57 now i remember Dec 05 09:08:07 JakeWharton, thanks! Dec 05 09:08:25 lasserix, it seems as if the build has not included my java code Dec 05 09:08:40 so Dec 05 09:08:43 alter the mainactivity Dec 05 09:08:45 but only an example code Dec 05 09:08:48 and see if the code is there Dec 05 09:09:11 cristian_c: you should ask in android-root since you are not really deving apps you are doign something Dec 05 09:09:15 else than app dev Dec 05 09:09:22 lasserix, yeah, I had looked at it before install the apk, and nothing related to my code was included Dec 05 09:09:47 lasserix, I was told to join #android-dev Dec 05 09:10:02 mf'er Dec 05 09:10:17 well Dec 05 09:10:21 you are not making an app Dec 05 09:10:25 you are making a script Dec 05 09:11:18 lasserix, ok, I think you are right, but an user has told me that apk is needed in android, because dalvik virtual machine is different from jvm Dec 05 09:11:29 I'm trying to display a webpage over HTTPS in a webview, but it fails and gives a blank page, while HTTP works OK, note that I'm building for Dec 05 09:11:32 API 21, and the certificate is self signed, is there a work-around to make it accept the cert? Dec 05 09:11:37 cristian_c: depends on who you are making this for Dec 05 09:11:53 but essentially if you can't run a script on a rooted device, you need to make a service that boots on device boot Dec 05 09:11:55 lasserix, and he says that I can't compile with javac Dec 05 09:12:00 android code Dec 05 09:12:13 yeah cause you need sdk Dec 05 09:12:17 but only by ant Dec 05 09:12:21 lasserix, ok Dec 05 09:12:49 again until you clarify your objective i dont really think anyone will help since wtf are you trying to do anyways Dec 05 09:13:09 I'm trying to display a webpage in a webview over HTTPS, but it fails and gives a blank page, while HTTP works OK, note that I'm building for API 21, and that the server SSL cert is self-signed, is there anyway to make this work? Dec 05 09:13:17 lasserix, but you are right, at the moment I'd like to test a script, later I'd like to create an app, but it's too early Dec 05 09:13:51 then get a rooted phone Dec 05 09:13:55 go hang out in root Dec 05 09:13:58 and write your script Dec 05 09:14:00 JakeWharton, can i ask you an architectural question? Do you have the time? it's gonna be somewhat involved Dec 05 09:14:01 if the script works, then I can create an app Dec 05 09:14:02 sorry for posting twice... Dec 05 09:14:11 when you are ready to make an app you can ask here for help w/r to that Dec 05 09:14:11 'gradle sync in progress' I guess I will go and buy some coffee Dec 05 09:14:17 kevel1: nope. going to bed right now Dec 05 09:14:28 =( Dec 05 09:14:34 lasserix, my device is already rooted, I can become root with su in the shell, already Dec 05 09:15:08 hehe lasserix Dec 05 09:15:48 lasserix, but problem seems related to compilation because my java code maybe it's not included Dec 05 09:16:28 cristian_c: again you are not deving apps you are trying to compile java to run in dalvik on a rooted device, goto #root and explain that Dec 05 09:16:43 lasserix, ok Dec 05 09:16:47 does dalvik even run java i have no idea Dec 05 09:17:16 i had to install busy box just to get su so i doubt java is included Dec 05 09:17:35 wael: http://stackoverflow.com/a/5978391 Dec 05 09:18:00 lasserix, no, I can use su because I've installed supersu from recovery Dec 05 09:18:13 now I ask in #android-root Dec 05 09:18:30 wael: You probably need to do something like that Dec 05 09:19:10 sarbs: lol Dec 05 09:19:16 think i've about got it Dec 05 09:20:31 hah!! Dec 05 09:20:34 yes, got it. Dec 05 09:20:44 go into your avd's directory Dec 05 09:20:58 in it, you'll need to modify a couple ini files Dec 05 09:21:25 in config.ini, there's a line that sets the value "image.sysdir.1" - set it to your avd's directory, instead of the android sdk directory Dec 05 09:22:29 cristian_c: here's what you should do. write a unix script that runs on your phone that does what you want. you can trigger it from command line to see if it works. then, download android studio and make an app. the app will have a button. when the button is pressed, you'll use Java.lang.process/RunTime to run your script (you may need to run su first, also using java.lang.runtime) to do what you wanted it do. Dec 05 09:22:42 then, copy the files system.img, ramdisk.img, and kernel-qemu from $ANDROID_HOME/system-images/android-18/default/x86/ into your avd's directory Dec 05 09:22:47 cristian_c: that's the only thing i can think of, unless you want to figure out how to unmount from java/android apis Dec 05 09:23:10 but until you actually are writing an app this chat room isn't for figuring out how to write scripts that run in dalvik nix Dec 05 09:23:31 that still won't get you a writable image yet however. now, copy your local system.img into system-qemu.img, and then add a line to hardware-qemu.ini: (make sure the avd is not running while you edit this file, it'll get overwritten if so) Dec 05 09:23:56 lasserix, I don't know methods to unmount not using java/android apis :) Dec 05 09:24:18 change the line "disk.systemPartition.initPath = ..." to be "disk.systemPartition.path = ...-qemu.img" Dec 05 09:24:24 Mrdarknezz: I tried it , this only works for anything before API 19 Dec 05 09:24:41 nothing changes Dec 05 09:24:41 MJCD follow all that? Dec 05 09:24:41 I've created java code to do it because it's the only method I know, but if there are other methods, I'd be happy to know them Dec 05 09:27:29 hi Dec 05 09:28:16 if you scroll down a bit and see the first piece of xml that is to be put in manifest here - https://developer.android.com/google/gcm/client.html - it has this piece in its intent-filter - `` - why would gcm want that and what does category do exactly apart from the fact that it can be used as an extra data in an intent for mathcing purposes? Dec 05 09:30:37 shmoon, because GCM service will send a message intent with category equal to your package Dec 05 09:31:07 shmoon, so it's there exactly for a matching purpose: so the OS knows which GCM messages you're interested in Dec 05 09:31:20 MJCD hopefully you followed what i said.. imma go to sleep cuz i should've been asleep 90 min ago lol. if it still doesn't work for ya i'll be online tomorrow as well. Dec 05 09:31:20 that basically means while sending that intent they'll set intent.addCategory(my_package_name) ? Dec 05 09:31:42 they'll = GCM Dec 05 09:31:54 yes. Dec 05 09:32:10 i work with android studio and i make a project like a library in other project the problem is when i make import package he show the error cannot resolve symbol any help ? Dec 05 09:32:43 ok thanks Mavrik Dec 05 09:32:57 so does anyone know how to ignore SSL errors in webview post API 19? Dec 05 09:40:57 ah Dec 05 09:41:03 proguard fail :D Dec 05 09:49:26 wael: Haven't tried this but http://developer.android.com/reference/android/webkit/WebViewClient.html#onReceivedClientCertRequest(android.webkit.WebView, android.webkit.ClientCertRequest) Dec 05 09:53:16 Mrdarknezz: I'll try it and see Dec 05 09:54:54 Does anyone know if it's possible to use the built-in alarm icon to show when creating a custom alarm clock app? It's a popular request by users, but I can't seem to find anything about it in the documentation. Dec 05 09:56:19 i added a library called parse to my project. when I open a code file inside AS from it I get this - http://puu.sh/dhQXc/2f64034c60.png - I'm really curious on knowing what onReceive has, is there some way to get that piece? Dec 05 09:59:16 havchr: http://materialdesignicons.com/ Dec 05 09:59:26 https://developer.android.com/design/downloads/index.html Dec 05 09:59:30 you can pick around till you find it Dec 05 10:00:07 no, not the graphics, but to display the built in icon on the right side when an alarm from your own app is set. Dec 05 10:03:23 hi androids developers Dec 05 10:16:12 havchr: not sure what you are talking about Dec 05 10:17:28 When you set an alarm in the built in clock app, you get an icon in the top right status-bar, but I have found no way of settings this icon for my third party alarm clock app. I'm asking if anyone know if there's a way. Dec 05 10:23:43 Mrdarknezz: nothing is working... Dec 05 10:23:54 should I just redirect it to a browser Dec 05 10:23:55 ? Dec 05 10:33:31 Hello guys, I have a fragment that retrieves a list of items from a webserver. After a backstack (meaning going back to the fragment from another fragment) my fragment retrieves the same list from the webserver again. But that's a waste, I don't want to get data from a webserver if the fragment pops back from another fragment. Than what's the best place to handle retrieving data from webserver in the fragment? Dec 05 10:56:32 is there a way to set which points you want a word to break if it has to wrap Dec 05 10:56:40 using spannable maybe? Dec 05 11:07:39 wael: Can't you fix a proper certificate? Dec 05 11:11:05 Mrdarknezz, nope, would cost too much for a school project, though now I'm looking at just downloading the HTML and manually setting it... Dec 05 11:19:18 It's ok, I fixed my problem. I think I need some sleep. Dec 05 11:19:41 It's friday so almost weekend babies. Dec 05 11:25:01 hello Dec 05 11:25:05 everyone Dec 05 11:25:18 I have installe ADT Eclipse edition Dec 05 11:25:33 damn I need to disable that highlight on 'everyone' Dec 05 11:25:36 but hi! Dec 05 11:25:38 and I am facing issues with the code completion feature Dec 05 11:25:40 djangonewbee: boo Dec 05 11:32:08 whenever I try to create a method in my java file in the src directory, I get an error: like Multiple markers at this line Dec 05 11:32:08 - Line breakpoint:MainActivity [line: 28] - Dec 05 11:32:09 sendMessage(View) Dec 05 11:32:10 - DisplayMessageActivity cannot be resolved to a type Dec 05 11:32:30 please anybody help in fixing this issue Dec 05 11:34:33 I was trying to create an intent to start a new activity called as DisplayMessageActivity Dec 05 11:34:41 but, unable to do it Dec 05 11:37:14 hi, what's the recommended way to add onclicklisteners and the like to views on the tabs of a tabbed activity? i can't seem to find a hint about that in the tabbed activity tutorial Dec 05 11:43:02 API level 18 has removed the WebView.setSavePassword method. Would it be insane to inject a saved password with addJavascriptInterface if I checked the Uri.getHost() was the one of my website? Dec 05 11:45:26 @djangonewbee you have a problem in @+id/ in xml ( there are two with the same id ) Dec 05 11:46:36 no, actually I am a newbee to android app development and I was going through the website “developer.android.com” tutorials Dec 05 11:46:56 and I was going through the tutorial step by step Dec 05 11:48:48 @test05: you mean to say, in res/layout/xxx.xml? Dec 05 11:54:46 ok, i understood : i have to create a class named DisplayMessageActivity, but why is the syntax of the class like (String,Intent, View, etc) not highlighted in eclipse? Dec 05 11:54:54 @test05?? Dec 05 12:04:04 anyone seen an NPE on 'IBitmapDescriptorFactory is not initialized' when adding markers to a map? Dec 05 12:04:44 I've only seen it on 4.1 Dec 05 12:50:13 What's the size for notification icon? assets studio make them too small Dec 05 13:00:23 wonder if anyone could help me with this http://stackoverflow.com/questions/27316455/gcm-broadcast-receivers ? Dec 05 13:02:18 yoavst I just use setSmallIcon() on the app icon and android does the rest, not sure of exact size http://developer.android.com/reference/android/app/Notification.Builder.html#setSmallIcon(int) Dec 05 13:11:58 is there a way from the application to figure out when the user purchased it? Dec 05 13:13:02 bloch recomended doing set(first, rest..) which is total bullshit Dec 05 13:13:06 worst api ever Dec 05 13:48:33 i have an activity that adds something to a list and is reflected in my list view. should i use onbackpressed or finish? Dec 05 13:48:49 when i want the activity to close after a successful ad Dec 05 13:58:55 Something(?) has added maxSdkVersion=18 to my READ_EXTERNAL_STORAGE for my .apk. Anyone else experienced this? Is this something Android Studio auto-applies somewhere, or could it be one of my libs that are adding this? In my AndroidManifest.xml I do not specify it, but Google Play claims it's specified Dec 05 14:01:04 libs will Dec 05 14:02:32 lasserix: any way I can override them? I'd rather not change uses-permission at this time Dec 05 14:02:55 dont include the library Dec 05 14:03:08 but just look at which library it is by examining the manifests of the libraries Dec 05 14:14:41 hi guys Dec 05 14:15:05 does anyone have experience with Samsung Look SDK? Dec 05 14:15:13 Anyone? Dec 05 14:25:04 lasserix: any good way to find which library when they're all gotten via maven/gradle? I tried browsing the "External Libraries" project tree but that's not exactly elegant. Dec 05 14:32:52 web source Dec 05 14:32:55 Anyone happen to know why NavUtils.getParentActivityIntent(this) would return null when testing with Robolectric, but works just fine when the app actually runs? Dec 05 14:33:33 lasserix: or git repo, OK thanks Dec 05 15:03:39 PlusClient.Builder.setVisibleActivities is deprecated and seems to have been replaced by setActions, but where can I find information about the API levels involved if I want to support old versions? Dec 05 15:04:17 Ah, I figured it out. If you before had WRITE_EXTERNAL_STORAGE it would auto add READ_EXTERNAL_... as well. Now it auto-adds with a maxSdkVersion appended. Thus, Google Play store complains the permissions diff Dec 05 15:04:55 I am building android kitkat. I have give make -j16 | tee output Dec 05 15:05:36 is there a shortcut to go to the previous place the caret was ? im using AS . Cant find something similar on keymap ... Dec 05 15:07:24 If I rotate TextView to 270 degrees, using android:rotation, the text can not fill the entire height of the screen. It only goes as high ad the width of the parent. Dec 05 15:07:32 Any ideas how to workaround that? Dec 05 15:11:17 the build fails. how can i find out which project has caused the build to fail Dec 05 15:13:23 rsv: wrong place to ask Dec 05 15:17:23 shmooz: which is the right place to ask Dec 05 15:17:32 shmooz: sorry for the noise Dec 05 15:17:36 I don't know Dec 05 15:18:31 but people here will answer rom dev questions Dec 05 15:18:40 I mean will NOT answer Dec 05 15:19:08 this is for app dev Dec 05 15:19:17 shmooz: apologies then Dec 05 15:19:29 rsv: try #android Dec 05 15:21:00 hi there Dec 05 15:21:09 Hopefully I'm not offtopic by asking, but is anyone able to help me with my NDK issue? https://groups.google.com/forum/#!topic/android-ndk/9sQVqkFichg Dec 05 15:21:38 I have a phone number, but with spaces, or "-" in it, sometimes even +. Is there a way to normalize it easily ? Dec 05 15:22:29 YAY!!! finally got extracting AlbumArt from mp3's working :) Dec 05 15:22:31 quelqun_dautre: http://developer.android.com/reference/android/telephony/PhoneNumberUtils.html Dec 05 15:22:56 normalizeNumber maybe? Dec 05 15:25:33 Hi everyone! Dec 05 15:26:02 hi Dec 05 15:26:35 Is anyone else having problem with git commits after updating android studio? Dec 05 15:28:50 for material design: "The resting elevation for a given component type is consistent across apps throughout a platform." does that mean that I need to have the same elevation for, let's say a button as anyone else? Dec 05 15:29:49 hi Dec 05 15:30:07 Syzygy__: I guess if you want to follow the recommended guidelines Dec 05 15:30:46 I don't pay attention to design fashions myself Dec 05 15:31:05 well, design is important as well i guess Dec 05 15:32:58 I'm getting the error "pathspec file.iml did not match any files known to git" Dec 05 15:33:24 when I try to commit Dec 05 15:38:15 Don't check your IDE files into git. Dec 05 15:38:59 I am updating a single ROW in a sqlite database, is there a way to get the rowid of the updated row without having to do an additional query and process the resulting cursor ? Dec 05 15:39:15 freeone3000 file.iml? Dec 05 15:39:33 ashemark: .iml files are generally Android Studio project files, yes. Dec 05 15:39:43 ok, sure Dec 05 15:40:43 freeone3000 but the same file was committing before without any problem, just checked Dec 05 15:41:26 now I gotta figure out how to write an audio equalizer :P Dec 05 15:48:07 I guess I should write a to-do list of priorities, so many things to do , not sure where to start next Dec 05 15:48:09 How can I display Vertical Text in Android? The android:rotation is not working for me, because it can't display the text with the screen height Dec 05 15:50:30 HikaruBG: you said you rotate 270 degrees, does it hit 180 first ? before it gets there ? Dec 05 15:50:45 sounds like a refresh problem Dec 05 15:50:45 it's chopping off and then not restoring ? Dec 05 15:51:12 so rotate to -90 you suggest? Dec 05 15:51:31 g00s: Thx, saw it already (of course). Not doing native stuff currently however (@getkahoot.com). Dec 05 15:52:09 shmooz, same thing :) -90 or 270 still chops the text off Dec 05 15:52:10 :) Dec 05 15:56:37 shmooz: Build band-pass filter to isolate frequencies. Build attenuation filter. Recombine signal using demultiplexer. Dec 05 15:56:44 HikaruBG: no idea, make sure the textview has the desired length itself, and then try redrawing the text after rotate Dec 05 15:57:02 OK Dec 05 15:57:04 Thanks! Dec 05 15:57:37 freeone3000: have you done this before ? Dec 05 15:57:51 I guess I'll have to read stuff for a week first Dec 05 15:57:52 shmooz: With a dedicated circuit board. Dec 05 15:58:12 I'm thinking just a 5 band equalizer Dec 05 15:58:51 it shouldn't be hard since it's already built into the API Dec 05 15:59:35 Ah. https://developer.android.com/reference/android/media/audiofx/Equalizer.html effectively does all of that, and allows all sorts of stuff. Dec 05 15:59:52 but I observed a lot of media players did not include one, and ones that did usually do it in their paid pro version, like winamp Dec 05 16:00:09 Shoot, AudioEffect can implement second-order effects. Dec 05 16:00:49 shmooz: It's not a feature most people understand. Also, the sound cards in mobile phones are generally not the best, nor are the headphones people use with cell phones, so lipstick-pig. Dec 05 16:00:57 yeah I expect happy days, they better be Dec 05 16:01:29 more than 5 bands on phones is overkill Dec 05 16:01:49 I'm sure there's someone out there listening to their S5 with Sennheisers, but... no, I'm not actually sure there is. Dec 05 16:02:21 I think winamp has 7 or 9 band, and it's annoying how you have to swipe sideways and can't see the whole thing Dec 05 16:07:25 I still use my Klipsch S4A's on a slow 1Ghz phone with 768 ram gingerbread and it still does boost bass fine but yeah it sure isn't as nice as a analog equalizer Dec 05 16:07:48 or hardware Dec 05 16:18:52 Hey everyone! Dec 05 16:19:09 I just checkout out a project from github after updating android studio Dec 05 16:20:24 I'm getting the error "the project is using an unsupported version of the Android Gradle plug-in (0.12.2). The recommended version is 1.0.0-rc4. Dec 05 16:20:42 And the quick fix isn't working too :( Dec 05 16:28:06 How to determine how many DP is my screen height? Dec 05 16:28:15 how to convert px to dp ? Dec 05 16:28:57 is the spect from Samsung Website for my display in Pixels? 5.6 Quad HD+ Super AMOLED (2560 X (1440+160)) Dec 05 16:30:14 we should have a bot in here named LMGTFY Dec 05 16:32:30 wtiger: Tried updating it from the SDK manager? Dec 05 16:32:57 Where do other Mac/Linux users here place their Android SDK? Dec 05 16:33:06 HikaruBG: What unit of measure would /YOU/ use to advertise the screen resolution to non-developer customers? Dec 05 16:33:12 flan3002 there were no updates related to gradle in the sdk manager Dec 05 16:33:31 Mine is currently in /Library/programs/android-sdk and that seems to be giving me access denied issue applying the patch from RC1 to RC4 Dec 05 16:33:41 issues* Dec 05 16:33:48 yiati: This time, pacman installed it in /opt/android-sdk, but I usually place it in ~/app/android/sdk Dec 05 16:35:35 Hmm looks like the current access mode of my /Library/programs/android-sdk directory is 750 that might be my issue Dec 05 16:36:01 wtiger: Oh, taking a guess, the configuration files make it use 0.12.2, while it should use a more recent version. Maybe grep for version... Dec 05 16:36:48 flan3002 where? Dec 05 16:37:18 I tried to open another project, which shot the same error, and the quick fix worked(reinstalled/updated the plugin i think) Dec 05 16:38:48 flan3002, I would probably use pixels... Dec 05 16:39:06 flan3002, I need to convert 2560px = ?dp Dec 05 16:39:13 Anyone help? Dec 05 16:39:20 wtiger: I'm sorry, I don't use Gradle (yeah...), but I'm certain there /is/ a configuration file somewhere. Dec 05 16:39:37 my screen is xxxhdpi ~640 DPI Dec 05 16:40:06 flan3002 i understand, but is this the system config file we're looking for or the project one? cos i know about the project files Dec 05 16:40:46 HikaruBG: 640, AFAICT. Dec 05 16:41:18 What is the best way to find wich drawable and android component is using? For example, I want to know wich drawable the spinner is using to use the same on a custom component I'm creating Dec 05 16:41:24 wtiger: I'd guess it's the project file. Dec 05 16:41:38 yes, i see it Dec 05 16:41:49 it says gradle version 0.12.+ Dec 05 16:44:58 tried changing it to 2.2.+ but to no avail Dec 05 17:09:42 good evening Dec 05 17:18:07 Hi. Dec 05 17:18:25 hello Dec 05 17:18:32 i added a library called parse to my project. when I open a code file inside AS from it I get this - http://puu.sh/dhQXc/2f64034c60.png - I'm really curious on knowing what onReceive has, is there some way to get that piece? Dec 05 17:36:04 hello, anyone here could help me out? Dec 05 17:36:53 anyone willing to playtest a game for me? possebly send me a screenshot? Dec 05 17:42:16 shmoon: is it a jar? Dec 05 17:43:33 no, its out Dec 05 17:43:49 https://play.google.com/store/apps/details?id=com.passeride.Shades Dec 05 17:44:17 How can I disable the ANR SIGABRT that means I cannot debug my application? Dec 05 17:44:46 I get this: 12-05 17:41:16.727: A/libc(27719): Fatal signal 6 (SIGABRT) at 0x0000046d (code=0), thread 27719 (_android_wallet) Dec 05 17:45:01 Passeride: You have spelling errors in the description. Dec 05 17:45:46 pices --> pieces, gloyrious --> glorious, loook --> look, Its --> It's, gryes --> greys/grays Dec 05 17:47:10 Can I at least pause the eclipse debugger on SIGABRT? Dec 05 17:47:48 In fact, it also has grammar errors. Dec 05 17:51:05 i know, i am correcting them as we speak :) Dec 05 17:52:22 now its changed, but it will take some time before you can see it, thanks anyway :) Dec 05 17:52:39 [info] W/System.err( 5989): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() Dec 05 17:52:48 huh, cursoradapter has to be created on a looper thread? ugh Dec 05 17:52:49 To be honest, I don't understand what the game does from that description. Dec 05 17:53:13 I see i must add a tutorial Dec 05 17:53:22 Passeride: IMO, you need to rewrite the description. Dec 05 17:53:23 pfn: maybe because it usually inflate views.. Dec 05 17:53:27 If you tell me what the game does, I'll suggest something. :D Dec 05 17:53:29 you are suppose to merge the black and white to create grey squares Dec 05 17:53:32 danijoo, no, /created/ on Dec 05 17:53:53 and then merge the grey squares to create 2x1 towers and then merge the 2x1 towers to squares Dec 05 17:54:03 And squares disappear revealing the background? Dec 05 17:54:17 Hey all Dec 05 17:54:29 if I swipe from outside of the screen to the left/right Dec 05 17:54:34 my app doesn't see this touches at all Dec 05 17:54:40 danijoo, inflation occurs during UI thread no matter what Dec 05 17:54:46 can I capture these touches? or are they out of limits for apps? Dec 05 17:55:27 i dont know Dec 05 17:55:36 but i assume i will have to check that out Dec 05 17:56:04 I guess the answer is to use support-v4's cursoradapter Dec 05 18:08:45 yay, play store fixed the permissions screen when updating apps Dec 05 18:09:03 kind of Dec 05 18:09:25 <_Auron_> where updates wouldn't auto-update and show permissions when there's no new ones? Dec 05 18:09:44 no, now it's showing "already has access to: " Dec 05 18:09:59 dunno about that one, I've seen that, I assume it's a display issue when there are new permissions added Dec 05 18:10:08 <_Auron_> yeah perhaps Dec 05 18:10:19 <_Auron_> it's the only off thing I've seen with updates Dec 05 18:10:32 it shows "already has access to: " and new permissions now Dec 05 18:10:57 <_Auron_> that's good. I know it was doing that before but I hadn't seen it in a while, like 6mo+ Dec 05 18:18:45 is the support-annotations library worth it ? Dec 05 18:19:49 g00s, it's pulled in transitively by appcompat, etc. Dec 05 18:20:05 so it's used regardless of whether it's "worth it" Dec 05 18:25:14 so when i do a build from AS it downloads the dependencies and puts them somewhere ... when i do a build from the command line gradle does the whole things all over again, as if ~/.gradle/cache is empty. anyone know where AS caches the dependencies ? any way to make both command line and AS use the same cache ? Dec 05 18:32:56 I'm surprised AS _doesn't_ use the gradlew in the app dir Dec 05 18:34:08 because AS doesn't want to embed/execute arbitrary code Dec 05 18:34:11 and that's what gradlew is Dec 05 18:38:57 hi Dec 05 18:44:50 i got a problem initializing audio (using SDL with android ndk) -> http://pastebin.com/hmXGdn5g any ideas? Dec 05 18:50:59 [info] WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix. Dec 05 18:51:00 eh? this is new Dec 05 18:51:29 I’ve seen it quite a bit Dec 05 18:51:37 I can’t say I have any idea what it means Dec 05 18:52:19 never noticed before, installing to an emulator though Dec 05 18:52:20 * pfn shrugs Dec 05 19:13:53 pfn: .text sections of executables probably shouldn't have reloactions. It means the runtime can't pack or relocate the code effectively, and allows for introduction of no-op or other relocations into your elf. Dec 05 19:14:26 broken emu image Dec 05 19:14:28 * pfn shrugs Dec 05 19:15:19 It's also present in the android tools. PIC may not work well on armv7. Dec 05 19:18:05 pfn i've seen that, relatively recently i think Dec 05 19:18:07 5.0 image? Dec 05 19:18:12 sarbs, 4.4 Dec 05 19:18:16 i've seen this warning very often with genymotion Dec 05 19:18:20 hmm Dec 05 19:18:28 no big, I just never noticed it before now Dec 05 19:18:35 i don't recall where, but i've read to not take it into account Dec 05 19:18:48 yeah, I'm sure it's no problem, just noticed it being different Dec 05 19:19:07 maybe it's related to running on x86 (if you're using gm) Dec 05 19:20:19 oh duh i couldn't have seen that on 5.0, libdvm doesn't exist anymore lol Dec 05 19:20:45 i definitely would have seen it on 4.4 too then. like you said, no big.. i wouldn't worry about it Dec 05 19:22:02 hi sarbs Dec 05 19:22:10 sup adkins Dec 05 19:22:29 not much, getting hungry ;) sup with you? Dec 05 19:24:00 starving and eating Dec 05 19:25:37 i`m starving too actually ;) fixin somethin now......bon appetit! Dec 05 19:25:46 brb Dec 05 19:29:46 Huy guys, I need a user-edited bitmap to carry over onConfigurationChanged/orientation. I am wondering how I do this with a bundle. The image may not be very small but it is greyscale. Dec 05 19:30:02 ..maybe I can just do it with an intent Dec 05 19:34:05 tricknology bitmaps and intents/bundles do not play well Dec 05 19:34:24 then how do I preserve the user drawn bitmap on screen orientation change? Dec 05 19:34:25 the binder can only handle on the order of kilobytes of parcelled data Dec 05 19:34:27 tricknology: http://pastebin.com/WTnvsVFz Dec 05 19:34:34 i do it like this^ Dec 05 19:34:36 save it to disk, parcel the url, reload it Dec 05 19:35:00 or stick it in a non-activity-lifecycle-managed class Dec 05 19:35:01 BAOS is costly though, no? Dec 05 19:35:07 Ah that’s a devent Idea sarbs.. Dec 05 19:35:13 decent Dec 05 19:35:35 then you have a string, you might wanna save it to databse/disk though like sarbs says Dec 05 19:35:38 yeah that second idea won't survive process death, but for configuration change you don't give a rip Dec 05 19:35:58 and will be zillions of times faster Dec 05 19:36:01 I jsut want something quick and stable/fast Dec 05 19:36:34 writing to disk will be slower but keeping it in mem could be hazardous depending on the size and phone Dec 05 19:36:54 I’ll try both.. thanks adkins and sarbs Dec 05 19:37:38 tricknology: i decode like this http://pastebin.com/3MPZA7we Dec 05 19:38:13 eh, won't be any more hazardous than displaying it :) you've already got the bitmap in memory, all you've gotta do to make the java object survive the Activity object destruction is hold a reference to it in some other class that doesn't get destroyed Dec 05 19:38:25 then in the new Activity, grab that reference - you're not allocating any new memory Dec 05 19:39:29 I have a singleton that handles this type of thing. I think it will do here as long as I interact with it Dec 05 19:39:33 correctly Dec 05 19:39:36 well i just show you how to convert to string and back, i need this in my case, your use-case is probably another more simple Dec 05 19:39:37 How do you center a gridview horizontally on the screen? I've tried setting the gravity to "center", "center_horizontal", I've tried setting the relative layout to macth_parent and then the gridview's centerinparent property to "true", nothing seems to work Dec 05 19:39:41 yeah that'd be a perfect use Dec 05 19:41:16 got a pastebin of your code neochronomo? Dec 05 19:41:51 You have to do it programmatically Dec 05 19:41:52 tricknology: sure, just a sec... Dec 05 19:41:56 nto in xml Dec 05 19:41:58 tricknology: wait what? Dec 05 19:42:05 tricknology: why? Dec 05 19:42:08 see this post: http://stackoverflow.com/questions/20680355/center-gridview-horizontally Dec 05 19:42:19 and this one http://stackoverflow.com/questions/6141910/android-center-gridview-horizontally/10797061#10797061 Dec 05 19:42:20 for why Dec 05 19:42:32 well maybe not why… lol Dec 05 19:43:27 another answer says you just add margins that are the same size to the center of the screen Dec 05 19:43:29 tricknology: I should NOT have to manually calculate screen size in the code behind to do this >_> Dec 05 19:43:40 shouldn’t but.. Google Dec 05 19:43:54 how do I speed up initial display of a listview when the cursor adapter I throw into it has thousands of rows? Dec 05 19:44:03 it seems to block the UI thread when I setAdapter Dec 05 19:44:18 can you branch the cursor? Dec 05 19:44:33 (no idea how just applying some critical thinking) Dec 05 19:44:35 pfn did you getCount() of the cursor on the bg thread ? Dec 05 19:44:48 g00s, no, does that accomplish anything? Dec 05 19:44:54 hmm Dec 05 19:44:56 yeah it fills the cursor window Dec 05 19:45:13 you can look at CursorLoader sources Dec 05 19:45:20 thanks Dec 05 19:45:36 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/content/CursorLoader.java Dec 05 19:46:01 yep, that helps Dec 05 19:47:11 // Ensure the cursor window is filled Dec 05 19:47:12 cursor.getCount(); Dec 05 19:47:17 That’s sly Dec 05 19:47:22 it is Dec 05 19:47:42 how does it do this though? I go to getCount() it it just returns an int.. Dec 05 19:47:53 getCount fills an internal window Dec 05 19:47:54 talking about ui thread, i've noticed if you pass too much data to setText of a textview (per example an html page with spannables inside), it hangs the ui thread and I did not find anything better way than separating in blocks with multiple calls of append Dec 05 19:48:04 since setText must be called on the uithread ;( Dec 05 19:48:36 and appending blocks is not really satisfying, since it still takes time but at least it reduces the slutter effect Dec 05 19:48:58 https://github.com/pfn/qicr/blob/master/common/src/com/hanhuy/android/irc/MessageLog.scala#L378 Dec 05 19:48:59 weee Dec 05 19:49:06 split into pages unfortunately Dec 05 19:49:09 adq Dec 05 19:50:01 Maybe a dynamic ViewPager will help Dec 05 19:50:42 a bit heavy just for displaying a simple help.html with few images and few formatting (bold, italic) Dec 05 19:51:07 why not just open the website? Dec 05 19:51:15 or is is on the device.. Dec 05 19:51:31 if it's a help.html, open a webview Dec 05 19:51:32 is this html static? Dec 05 19:51:35 the device is also limited, it's a watch Dec 05 19:51:36 :) Dec 05 19:51:37 that's quite trivial... Dec 05 19:51:42 so no webview... Dec 05 19:51:43 but still Dec 05 19:51:49 yep pfn, no webview Dec 05 19:51:55 http://imgur.com/74aELZK Dec 05 19:51:58 looks like this Dec 05 19:52:16 then break the text up Dec 05 19:52:18 looked* i changed few things, but the content did not Dec 05 19:52:23 yes this is what i'm doing pfn Dec 05 19:52:29 separating in block with append Dec 05 19:52:30 use an adapterview, like a listview Dec 05 19:52:41 listview works as well Dec 05 19:52:48 yeah but i might lose the benefit of Html.fromHtml Dec 05 19:52:53 you don't Dec 05 19:52:58 and Html.fromHtml is extremely slow Dec 05 19:53:09 yup but it's far from being the bottleneck here Dec 05 19:53:19 are you sure? run through traceview to see? Dec 05 19:53:20 (i verified it comes from setText) Dec 05 19:53:44 * pfn shrugs Dec 05 19:53:53 break up text sections into a listview/adapter and it should work well then Dec 05 19:54:24 yeah, i might do that, i'm just lazy ^^ Dec 05 19:54:53 http://stackoverflow.com/questions/10696530/android-listview-lazy-loading Dec 05 19:54:56 well, putting it in a listview or any recycling view would be optimal Dec 05 19:55:08 you don't have to render/settext until it needs to be shown Dec 05 19:55:53 yeah i could split that into item of the list which can still be a simple textview Dec 05 19:55:58 i cannot execute traceview :( Dec 05 19:56:03 from /sdk/tools Dec 05 19:56:13 tricknology, exec it from ddms or android studio Dec 05 19:56:13 tricknology, how so?? Dec 05 19:56:14 command not found Dec 05 19:56:21 in terminal Dec 05 19:56:35 hello all , i want to protect my APK , so i deside to test apkprotect.com , now i did download the exe but it saide Dec 05 19:56:36 This application need java jre,please install jre and retry. Dec 05 19:56:48 i always used ddms (or android device monitor in AS, same thing) Dec 05 19:56:57 the strange thing that i have installed jar and android sdk Dec 05 19:57:02 because you can directly select your process, click, trace, done Dec 05 19:57:14 often click the wrong button though, and kill the process Dec 05 19:57:14 and my bath : C:\Java\jre62\bin\;C:\android-sdk\platform-tools;C:\Java\jre6\bin\;C:\Java\jdk1.6.0_24\bin Dec 05 19:57:18 instead of terminating the trace :p Dec 05 19:57:20 adq, you can traceview from android toolwindow in AS now Dec 05 19:57:23 please advice Dec 05 19:57:25 maybe it needs JRE 7 or 8? Dec 05 19:57:36 you have JRE 6 Dec 05 19:57:38 beshoo, use proguard and not some random crap Dec 05 19:57:44 and there's no such thing as protecting your apk Dec 05 19:57:46 ^ Dec 05 19:57:48 pfn, k Dec 05 19:57:57 you can obfustace the code Dec 05 19:58:17 but someone can always DL your code, decompile your APK, and put a wrapper around it Dec 05 19:58:39 I’ve seen some stuff like that Dec 05 19:58:40 obfustace can change strings play with immages Dec 05 19:58:41 proguard is not really meant for security Dec 05 19:58:53 dexguard was also defeated quickly Dec 05 19:59:01 everything is defeated pretty easily Dec 05 19:59:08 dex2jar Dec 05 19:59:12 yes Dec 05 19:59:13 :/ i've stopped using LVL because of that Dec 05 19:59:14 JD Dec 05 19:59:17 finished Dec 05 19:59:17 dex2jar Dec 05 19:59:20 totally useless now, and risky Dec 05 19:59:36 adq, anyone that can work with dex directly defeats obfuscation Dec 05 19:59:42 or any sort of protection Dec 05 19:59:45 yep Dec 05 19:59:49 dex2jar will allow you to decompile your APK into a .jar Dec 05 19:59:54 what is the best way to encript strings and other ! ,,, i love IOS cos no one can change a thing ! Dec 05 19:59:58 tricknology, decompile any of my apps to .jar :p Dec 05 20:00:01 have fun Dec 05 20:00:04 and I don't even obfuscate Dec 05 20:00:20 heh I’ll give it a go.. did you do anything special? Dec 05 20:00:21 beshoo, that's false, anyone jailbroken can change anything Dec 05 20:00:23 smali is close to be human readable too Dec 05 20:00:27 and easy to replug Dec 05 20:00:41 pfn got a link? Dec 05 20:01:08 tricknology, http://www.hanhuy.com/~pfnguyen/lite-debug.apk Dec 05 20:01:10 beshoo, what do you want to protect? login/password? use an auth token mechanism Dec 05 20:01:17 with a third party service per example Dec 05 20:01:57 and a cache mecanism so you don't have to be "always" connected if internet is not required (it will be for downloading your app, and i'm sure 90% of user runs the app just after, thus internet is there at this time) Dec 05 20:02:03 well , my friend can take any app , from the market , decompile it , chnage urls inside the app to his website , chnage immages , volal he has a new app Dec 05 20:02:22 yeah we are aware of that issue beshoo Dec 05 20:02:33 some ppl also repackage application into their own Dec 05 20:02:35 so how can i stop this ! Dec 05 20:02:42 yes ,,, Dec 05 20:02:50 i know that s**t Dec 05 20:02:54 you can only mitigate that Dec 05 20:03:13 in the past there were some routines to make apktool crashes :) Dec 05 20:03:20 I have a webview app, can I show a loading hud between page loads, so that the user doesn't send the same request twice? Dec 05 20:03:42 adq ... what is your best option ! Dec 05 20:03:48 beshoo, i told you the best option Dec 05 20:03:49 to mitigate !! LOL Dec 05 20:04:08 auth token mechanism, and you retrieve your url from your service Dec 05 20:04:10 smali is close to be human readable too ! no i can read it EASY Dec 05 20:04:17 if someone replace the url TO your service, he will not get any url Dec 05 20:04:57 he can change my urls to his server , understanding my app and make his own database Dec 05 20:05:13 any app is just JSON and some other stuff ! Dec 05 20:05:45 that means someone would target individually your application, take the time to defeat it, etc Dec 05 20:05:53 pfn, does this look familliar? http://pastebin.com/JDz7XRmm Dec 05 20:05:54 so whatever you do, it's just a matter of time for anyone enough skilled Dec 05 20:06:08 tricknology, who cares about libraries Dec 05 20:06:13 https://gist.github.com/pfn/1f1fa96f993b0a40bb74 Dec 05 20:06:15 too funny... in Settings > Security I have "Make Passwords visible" . So anyhow, I go to add a new google account to my device and its not respecting that. So I must have fucked up my huge password as it didn't work, and now got a 'suspicous sign in prevented. Dec 05 20:07:12 ah I was in the wrong package.. Dec 05 20:08:21 JD keeps freezing on me but I am able to see your entire source Dec 05 20:08:38 tricknology, yeah, can you understand any of it :p Dec 05 20:09:30 oh decompiled code? It’s a pain in the ass to read but I have been able to reconstruct methods Dec 05 20:09:36 the worst are switch/case Dec 05 20:09:45 tricknology: I found a way to center gridviews with xml. You have to set the layout_width to fill_parent, and then set the gravity of the content of the gridview to center Dec 05 20:09:53 redrawing the stuff in canvas :) Dec 05 20:10:03 oh, nice neochronomo Dec 05 20:10:23 gravity of the content of each cell? Dec 05 20:11:04 tricknology: yeah Dec 05 20:11:49 enat Dec 05 20:11:52 neat* Dec 05 20:12:29 tricknology: knew it was possible.... it would be COMPLEEEETELY stupid if you had to do it with code behind calculations Dec 05 20:13:18 tricknology, https://github.com/JakeWharton/Android-ViewPagerIndicator/blob/master/library/src/com/viewpagerindicator/CirclePageIndicator.java lot of similarities with your pastebin ;) Dec 05 20:13:41 can I show a loading hud between page loads, so that the user doesn't send the same request twice? Dec 05 20:14:13 that will not necessarily prevent him to send the same request twice, but yeah at least Dec 05 20:14:19 he knows he has to wait Dec 05 20:14:26 well it looks like as of 2011 that’s how people were doing it Dec 05 20:15:29 adq that wasn’t mine that was pfns.. and it was in his common package so pfn could be using that lib. Dec 05 20:15:31 tricknology, i need something like that thinking about it, also with vertical positioning, the gridviewpager in android wear does not have any indicator or native class for doing it (but there is a listener like for viewpager) Dec 05 20:15:37 http://stackoverflow.com/questions/24883134/page-location-for-gridviewpager something like that Dec 05 20:15:40 but better Dec 05 20:15:55 adq I have noooo idea lol. I was just showing pfn that I could decompile his code pretty easily Dec 05 20:15:58 tricknology, ahh thought was your, np Dec 05 20:16:08 however he showed me that it’s not so easy to read after being decompiled Dec 05 20:16:26 k Dec 05 20:16:34 pfn did you… did you name all those methods that?? Dec 05 20:16:38 tricknology, no Dec 05 20:16:50 result of decompiler or do you have something else goign on Dec 05 20:17:04 tricknology, the result of not writing code in java Dec 05 20:17:25 scala did that? Dec 05 20:17:30 of course, presumably someone could write a decompiler for the right language Dec 05 20:17:36 adq, yes Dec 05 20:17:42 interesting Dec 05 20:17:54 gnarly Dec 05 20:18:02 what are the benefits of scala besides this case? Dec 05 20:18:18 tricknology, a language that's not java Dec 05 20:18:27 haha Dec 05 20:18:45 how is it compatible with Android? Dec 05 20:18:51 or is just that part written in scala? Dec 05 20:19:13 scala compiles to java bytecode.. Dec 05 20:19:28 so I can use scala in Eclipse to write Android code? Dec 05 20:19:45 tricknology, you could Dec 05 20:19:52 how do you do it pfn? Dec 05 20:19:55 lol Dec 05 20:19:57 I use intellij and sbt Dec 05 20:20:05 haha ok :P Dec 05 20:20:13 tricknology, https://github.com/pfn/qicr/blob/master/common/src/com/hanhuy/android/irc/MessageLog.scala Dec 05 20:20:17 i did install ProGuard , now when i try to target my APK , it saide this :The input doesn't contain any classes. Did you specify the proper '-injars' options? Dec 05 20:20:18 anyway, samples of what my code looks like Dec 05 20:20:53 proguard is not straightforward to master beshoo Dec 05 20:21:01 you better read some documentation first Dec 05 20:21:06 and start on a small project Dec 05 20:21:16 ^ Dec 05 20:21:29 i have my apk ! dos it work with apk directly ! Dec 05 20:21:39 mmm Dec 05 20:22:10 would it be better to learn Scala by itself, or to just dive in and use it on Android? Dec 05 20:22:14 beshoo, http://proguard.sourceforge.net/manual/introduction.html Dec 05 20:23:00 be prepare for few days of scratching your head and pulling your hairs :) Dec 05 20:23:21 s73v3r, depends on how good you are with java to begin with Dec 05 20:23:37 if you're comfortable working with android, then picking up scala isn't too difficult Dec 05 20:23:44 I’m adequate, but I’m not a Java wizard. I’ve only really done Java on Android Dec 05 20:26:39 anyoen know what could cause duplicate texts? Dec 05 20:26:39 do you use scala-android, scaloid, or something else? Dec 05 20:26:55 I don’t see them as sent duplicate but people receive them in duplicates Dec 05 20:29:58 s73v3r, I've been using macroid Dec 05 20:45:48 how can i programatically add a custom view to a cardview??? Dec 05 20:46:06 should i just set up a custom view that extends cardview? Dec 05 20:49:41 gjrisngrenag Dec 05 20:57:27 MartialLaw: CardView is a ViewGroup so you can just use addView Dec 05 20:59:51 oh sweet thanks bro Dec 05 21:02:49 Hi all Dec 05 21:06:51 what could be wrong if i got "void *buffer=malloc(bufSize); printf("%p\n", buffer); someLibDoingThings(buffer); printf("%p\n", buffer); free(buffer);" both printfs show "0x2a10cd40", but free() segfaults with "F/libc ( 1535): @@@ ABORTING: INVALID HEAP ADDRESS IN dlfree addr=0x2a10cd38" Dec 05 21:07:20 perhaps your buffer wasn’t actually allocated Dec 05 21:07:28 why does free try to free 0x2a10cd38 and not 0x2a10cd40? Dec 05 21:08:08 s73v3r: buffer!=NULL after the malloc Dec 05 21:08:23 i see Dec 05 21:08:36 and everything works too, its just that it segfaults when i quit Dec 05 21:09:17 and the same code btw doesn't segfault on my desktop linux Dec 05 21:11:30 I believe the address discrepency might be because the system puts some info about the block at the beginning Dec 05 21:12:53 could it be the 2bytes declaration pointer? Dec 05 21:13:46 and just android does that? Dec 05 21:14:12 Bombo that is indeed very weird Dec 05 21:14:20 idk, somelibdoingthings could mess with your pointer? Dec 05 21:14:47 did you try to print the pointer adress before freeing it too? (so you're can remove free from the equation) Dec 05 21:14:53 every malloc implementation adds an overhead structure to the request Dec 05 21:15:07 adq: wouldn't the printf just one line before show a different address? Dec 05 21:15:27 s73v3r yeah but free() should match it in implementation Dec 05 21:15:29 adq: yes, i do it twice Dec 05 21:15:49 Bombo paste the whole file if you can, or at least any includes/defines you have in there Dec 05 21:15:59 i got one printf right after the malloc, and one right before the free() Dec 05 21:16:07 is it possible you're somehow ending up using a different malloc impl than free impl? Dec 05 21:16:21 is it possible that somelib is doing something to the memory below your buffer, and is possibly overwriting the thing that tells free() how big the memory block is? Dec 05 21:16:28 and also, what happens if you take out the lib call - that seems to be the only unknown here Dec 05 21:16:36 when i remove the someLibDoingThings(buffer); it doesn't segfault Dec 05 21:16:39 ^^^^ that seems very possible Dec 05 21:16:46 so it's inside somelibdoingthings ;) Dec 05 21:16:48 yeah, the lib call is overwriting shit it shouldn't then Dec 05 21:16:59 HEY! I've got the stupidest question-- I'm including some bogus non-essentialy third-party library with native code for armeabi... Google Play doesn't seem to be filtering it down automagically-- it says 7,793 supported device and 0 excluded. What if somebody with an Intel phone visits the app in Google Play? Dec 05 21:17:20 ScottishPig crash Dec 05 21:17:31 if your code tries to load the library, at least Dec 05 21:17:36 if your java code never mentions the .so, no crash Dec 05 21:17:42 but in that case.. why include it :p Dec 05 21:18:43 It's a third-party advertising library. Supposedly, the supplied JAR checks around it so it doesn't poke the .so. Dec 05 21:19:10 I have an unpublished leaderboard, my g+ account is setup as a tester and when my app posts a score using Games.Leaderboards.submitScoreImmediate, the result is success (0), yet I can't see any scores updating anywhere Dec 05 21:19:13 ScottishPig hmm Dec 05 21:19:21 Is there a certain amount of time to wait for leaderboards to populate? Dec 05 21:19:33 ScottishPig install the apk on an x86 emulator and try it out. if it'll crash on a x86 device, it'll crash on an x86 emu Dec 05 21:20:00 sarbs: I was just 'bout to do that, actually. :) Just thought I'd ask first since the emulator takes a decade to load. Dec 05 21:20:12 Hi all. I need to collect logs from a medium size set of users devices in order to debug application issues during initial setup. What's everyone using to get logs from Android mobile devices? Dec 05 21:20:43 intransit Crashlytics or Google Analytics are afaik the big players Dec 05 21:20:51 hmmhmhmmmhmhmh reading someLibDoingThings(); strange things going on there, i don't understand, thats why i'm using it ;) Dec 05 21:20:55 ScottishPig use HAXM, it's very very fast Dec 05 21:21:25 sarbs: I've heard this. Also contemplated Genymotion. Dec 05 21:21:31 but still, why does this only happen on android... Dec 05 21:21:49 sarbs: This is for extracting application logs off the Android devices themselves? Something's happening in the application on the phone, and I need more insight into what's going on there. GA and Crashlytics may be the right tool, but I'm not familiar with using them in that way. I have more experience with GA and e-commerce websitesite. Dec 05 21:22:26 ScottishPig GM is also good but proprietary; intel's haxm is blazing fast and works out of the box with qemu. Dec 05 21:22:47 GM's advantages are easier emulator controls for setting things like network state, battery level etc Dec 05 21:23:17 sarbs: Woah. Good to know. Thanks. Dec 05 21:24:07 Bombo *most* of the time i've seen code doing "strange things" it's because the original author didn't know what they were doing ;) it's not usually difficult to write code that's both clear and accomplishes some complex goal Dec 05 21:25:24 intransit i don't think there are any libraries you can include that will pull logcats automatically, though i don't imagine that'd be too hard (you would only get your own process' logcat, if anything, however - only root can get the full device logcat). GA and Crashlytics are more geared toward exception and event tracing. Dec 05 21:25:32 sarbs: ok, that, and i'm not too good at c ;) Dec 05 21:25:52 Bombo, it’s likely the different malloc implementations are giving different pieces of the stack to the calls Dec 05 21:26:31 sarbs: Yeah, I'm looking to investigate things that aren't necessarily resulting in a crash, which is where Crittercism or something to that effect http://docs.crittercism.com/android/android.html#logging-transactions might have some impact. Dec 05 21:26:43 Does anyone here have experience using Crittercism in this sort of manner? Dec 05 21:26:57 s73v3r: whouldn't printf report different addresses then? Dec 05 21:27:12 I mean between Android and the desktop Dec 05 21:27:30 Bombo do you have access to the library method's source? Dec 05 21:28:14 Anyone here using AdMob ? Dec 05 21:28:21 s73v3r: yes, but if %p prints the addr, then free ... ah i don't know ;) Dec 05 21:28:31 sarbs: yep Dec 05 21:28:32 i think s73v3r may be onto something; perhaps the library is compiled against a different malloc than you're compiling against, so when you call it and pass it your ptr, it gets misused Dec 05 21:28:39 Why is it this hard to test something, I want to see if a listner I have setup is working, in any other language/development I would use somthing like console.log to say anything to see if it fires. Dec 05 21:28:42 Anyone know if there are devices that are API level >15 using mips or armeabi? Dec 05 21:28:48 In IOS I would use an alertView Dec 05 21:28:53 seems like an unlikely scenario but it's the only one i can think of that doesn't involve directly f'ing with pointer math in the lib call Dec 05 21:29:01 How do I do something like that here Dec 05 21:29:10 CapnKlutch ... Log.d? Dec 05 21:29:24 you can also pop dialogs in android. Dec 05 21:29:30 How Dec 05 21:29:38 How do I do the dialogs Dec 05 21:29:45 Please Dec 05 21:29:46 d.android.com :P Dec 05 21:29:59 Bombo: when malloc gives you a chunk of memory, there’s also a structure attached to it that tells how big it is. You don’t get access to that, but free() can. In this case, it looks like free() is looking for that info 2 bytes ahead of the pointer you pass in Dec 05 21:30:18 sarbs / s73v3r well ok, but if malloc() is different on android, i guess free() would also be Dec 05 21:30:25 s73v3r: hmm Dec 05 21:31:07 Bombo yeah it would be, but if the library comes precompiled then it might ahve been built against (and include) a different malloc.. or it might be doing some weird pointer math and overwriting shit it shouldn't Dec 05 21:31:10 Bombo: yup. And so that 2 bytes is where malloc() is putting the info. But it’s possible your library is clobbering it Dec 05 21:32:01 i compile the lib with the same ndk/everything Dec 05 21:33:11 Bombo: That’s not going to stop the lib from clobbering those two bytes if it overwrites it’s bounds Dec 05 21:34:00 As a tester, how do you see results of a leaderboard before it is published? Dec 05 21:34:09 oh, ok you're compiling it yourself, so that rules out the malloc diff between lib and consumer Dec 05 21:34:21 paste up the library method if you're able. it's clearly doing something wrong Dec 05 21:40:04 What do I do to fix this error - Dec 05 21:40:05 The method shouldOverrideUrlLoad(WebView, String) of type MainActivity.DoItWebViewClient must override or implement a supertype method Dec 05 21:40:53 Here is the code Dec 05 21:40:54 sarbs: its actually http://ftp.de.debian.org/debian/pool/main/libs/libsidplay/libsidplay_1.36.59.orig.tar.gz Dec 05 21:40:54 http://pastebin.com/KQAFVB8s Dec 05 21:41:09 it doesn't like the @Override for some reason Dec 05 21:41:25 sarbs: 6581_.cpp:901 sidEmuFillBuffer() Dec 05 21:42:18 Bombo mind throwing it up on pastebin or gist? inertia is preventing me from dling/extracting that heh Dec 05 21:42:20 i see it does "buffer = (*sidEmuFillFunc)(buffer, bufferLen);" Dec 05 21:42:20 Please anyone Dec 05 21:44:21 CapnKlutch http://android-dev-tips-and-tricks.blogspot.com/2012/08/so-you-need-help.html i don't mean to be (terribly) offensive here.. but the kind of questions you're asking belie a general lack of understanding about java and android, an understanding that most ppl here will expect someone to have before helping them Dec 05 21:44:57 most of us here are professionals who are (at least during the day) at work doing work stuff, and taking time to help others.. it's not usually worth our time to handhold someone through what should be very rudimentary skills. sorry Dec 05 21:45:17 sarbs, I am not an android dev sorry, I just need to get this webview app working Dec 05 21:45:48 sarbs: http://pastebin.com/PyUUXRnh Dec 05 21:46:00 Bombo that line is just a function pointer, that's not necessarily too funky in and of itself Dec 05 21:46:00 All I want is to get this @Override thing to work then I'm done Dec 05 21:46:47 I'm a web developer Dec 05 21:46:55 sarbs: hmkay, see anything too funky? ;) Dec 05 21:46:56 Just need a helping hand Dec 05 21:47:59 CapnKlutch: have you tried removing the @Override? :) Dec 05 21:48:32 Yes but then it doesn't get called at all, I verrified this with log.v Dec 05 21:48:44 oh actually.. that line probably is the problem Dec 05 21:48:50 it's also setting buffer to the result of that function Dec 05 21:48:58 CapnKlutch: take another look at http://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading(android.webkit.WebView, java.lang.String) Dec 05 21:49:08 CapnKlutch: Adding or removing @Override isn't going to change whether it's called Dec 05 21:49:11 Take a really close look at the method name.. :) Dec 05 21:49:17 I would look for where it’s getting bufferLen Dec 05 21:49:25 Ok will do thanks Dec 05 21:49:31 so if (*sidEmuFillFunc) returns a different value (which i imagine it is doing, so that it "walks" through the buffer you gave it in that loop" it'll start writing in a different location Dec 05 21:50:05 whatever sidEmuFillFunc points to, will be or call the culprit.. i don't see anything otherwise scary about sidEmuFillBuffer Dec 05 21:51:34 hmm Dec 05 21:51:36 6581_.cpp:898:void* (*sidEmuFillFunc)(void*, udword) = &fill8bitMono; // default Dec 05 21:52:44 Bombo do you know how to use gdb? this seems like the kind of bug that you really have to watch under a debugger and inspect memory to end up figuring out, especially if you're not familiar with what the library's doing implementation-wise Dec 05 21:53:20 sarbs: just basic functions... Dec 05 21:55:08 not sure what to watch i gdb Dec 05 21:56:00 plus, on linux it doesn't segfault did i mention that? ;) Dec 05 21:56:49 ok i could watch something to see how it changes the buffer Dec 05 21:57:20 yeah.. which is what's weird. i would bet that that library was built/designed on debian and is making some memory model assumption that's not valid on android Dec 05 21:57:20 hmm Dec 05 21:57:40 watch changes to the buffer and to the 16 bytes or so before the buffer Dec 05 21:58:24 i don't know android's malloc struct offhand but the data lives "before" the pointer value you see. Dec 05 21:59:06 *tilt* Dec 05 22:01:30 i'll give it up for today, need some sleep, thx for the hints, sarbs and s73v3r, i'll see if i can find something with gdb tomorrow... Dec 05 22:01:33 gn8 Dec 05 22:01:40 good luck mate Dec 05 22:01:43 good luck Dec 05 22:02:58 question: if onReceive gets called in onPowerConntected and my app was never started yet......does the application-object exist so that i can access application-data objects? Dec 05 22:03:17 adkins: always Dec 05 22:03:17 (onPowerConntected-Broadcast receiver) Dec 05 22:03:31 Groxx: always? Dec 05 22:03:43 adkins yes, the BroadcastReceiver should get passed a Context that will most likely be an ApplicationContext Dec 05 22:03:47 adkins: application onCreate happens before any activities, services, or broadcasts Dec 05 22:04:19 the only time that's not true is with a ContentProvider.. which is annoying as shit Dec 05 22:04:26 so as long as an app is installed application-object exists? Dec 05 22:04:43 it's not true on ContentProviders? really? Dec 05 22:04:45 adkins as long as your application code is running.. there's a difference Dec 05 22:05:12 God, some refactorings take hours of thought. Dec 05 22:05:15 Groxx yeah, gave me fits until i figured out wtf was happening. CP.onCreate *can* (doesn't always) occur before Application.onCreate Dec 05 22:05:17 And they seem so simple afterwards. Dec 05 22:05:43 sarbs: yuck. I'll have to check that out, I wonder if it's a thread timing thing. Dec 05 22:05:46 Kinda makes me feel dumb. But then you think "I'm less dumb now". Dec 05 22:05:55 I haven't made any content providers yet Dec 05 22:05:55 adkins basically anytime you have a Context, you have an Application Dec 05 22:06:03 Groxx i think it is, yeah Dec 05 22:06:08 thx a lot Dec 05 22:06:38 TacticalJoke that happens to me way more often than i like to admit Dec 05 22:07:06 sarbs: does that mean context.getApplicationContext returns something not fully initialized? Dec 05 22:07:51 :D Dec 05 22:07:55 Groxx never ran into a situation where the two were executing actually at the same time. if it really is different threads, i suppose that'd be possible tho Dec 05 22:08:17 sarbs, that's not possible... Dec 05 22:08:19 there's a big clue in that ContentProvider doesn't give you any Contexts though. Dec 05 22:08:31 sarbs: iirc content providers run on a different thread? I might just not be remembering that though. Dec 05 22:08:33 My current refactoring was to extract PresentedPostListing from PostListing. The latter had started to gain UI-related stuff, so the former had to come out of it. Dec 05 22:08:36 But it was so subtle. Dec 05 22:08:42 pfn which isn't? Dec 05 22:08:47 Just a hint of UI stuff (not obvious View-related stuff). Dec 05 22:08:52 sarbs, application not being initialized before content provider... Dec 05 22:09:11 pfn tell that to my dagger graph creator :p Dec 05 22:09:37 sarbs: pfn: this seems pretty conclusive, the hackbod has spoken in sarbs' favor: https://code.google.com/p/android/issues/detail?id=8727 Dec 05 22:09:39 And then "PresentedPostListing ourPostListing = new PresentedPostListing(existingPostListing);". Dec 05 22:09:41 content provider is first Dec 05 22:09:59 application may not have gone through create Dec 05 22:10:01 hackbod's word is law Dec 05 22:10:07 just make your dagger graph instantiation lazy Dec 05 22:10:12 first accessor wins Dec 05 22:10:14 Groxx, sarbs interesting Dec 05 22:10:46 JakeWharton yeah we just moved the injection to the actual CP methods, which do occur after app oncreate Dec 05 22:11:16 or at least, haven't lost that race yet.. been a while now Dec 05 22:11:17 yeah, that makes sense. I'll have to remember this one... Dec 05 22:17:07 sarbs: just noticed the dagger-graph-creation remark. is dagger doing something wrong here? Dec 05 22:17:15 no Dec 05 22:17:17 no Dec 05 22:17:31 i initialize my dagger graph in my application oncreate, and expected it to be available in CP oncreate Dec 05 22:17:38 aaah Dec 05 22:17:44 gotcha, thanks Dec 05 22:17:47 i like how JW immediately "no." Dec 05 22:17:50 lol Dec 05 22:19:13 I'm mixed about ##java. While the people are quite helpful, they tend to be crazily aggressive. Dec 05 22:19:37 Screaming at people in text and such. Dec 05 22:19:42 TacticalJoke s/##java/irc/ ? Dec 05 22:19:53 s/irc/the Internet/ :D Dec 05 22:19:59 +2 Dec 05 22:20:00 In fact, humanity. Dec 05 22:20:01 ##java sucks Dec 05 22:20:21 Anybody have familiarity with Windows environment variables? Dec 05 22:20:22 speaking as a long-time member there Dec 05 22:20:28 ForestBits, try #windows Dec 05 22:20:36 agree on sucks, agree on quite helpful Dec 05 22:20:37 Almost every time I've gone into ##java, I've wanted to strangle at least one of the admins. Dec 05 22:26:41 Think I got it working. Went through frustration trying to set the environment variables for Android Studio (twice, sort of). Turns out, I was setting them on a different user. Lesson learned. Dec 05 22:27:35 JakeWharton is there anyone i need to hound about robolectric-gradle-plugin PR's, or do you guys keep pretty on top of those? Dec 05 22:27:43 i'm not Dec 05 22:27:56 i don't like that plugin Dec 05 22:28:04 o really? what do you use Dec 05 22:28:20 a modern version of this: http://blog.blundell-apps.com/android-gradle-app-with-robolectric-junit-tests/ Dec 05 22:28:39 JakeWharton: Someone in here yesterday claimed that IntelliJ 14 supports JVM unit testing with no hassle whatsoever. Dec 05 22:29:00 Dunno whether it's true. Dec 05 22:29:05 kk, i'll take a look at that if i can't bend robolectric-gradle-plugin to my will. thx Dec 05 22:29:15 TacticalJoke: then that's not very useful of them Dec 05 22:29:22 or they're just wrong, dumb, or not using Gradle Dec 05 22:29:58 If I were a masochist, I'd try it again (it was so painful last time :[). Dec 05 22:30:07 I think I'll wait and see what happens. Dec 05 22:30:10 just don't use gradle to test Dec 05 22:30:16 why insist on it? Dec 05 22:30:21 or add a separate gradle task to test Dec 05 22:30:28 but the fact that you run it in gradle and/or ide is pretty irrelevant Dec 05 22:30:35 my CI doesn't run an IDE Dec 05 22:30:47 sure, but you can make gradle run unit tests just fine Dec 05 22:30:56 pfn: I think you can't add non-Gradle modules when you're using Gradle. Dec 05 22:31:07 Or I could be misremembering. Dec 05 22:31:08 TacticalJoke, that's dumb if true Dec 05 22:32:50 I think the error message is "Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project". Dec 05 22:32:54 From here: https://code.google.com/p/android/issues/detail?id=77983 Dec 05 22:34:17 Though that bug might not be relevant (it just reminded me of the error message). Dec 05 22:34:34 i mean, that's not at all surprising because IntelliJ's internal build system isn't used at all Dec 05 22:34:52 the Gradle tooling API is bound to IntelliJ's tooling API so it delegates out for everything Dec 05 22:35:01 * pfn shrugs Dec 05 22:35:05 intellij > android studio Dec 05 22:35:08 when you're doing ant, make, maven, etc. you never actually use those things to build Dec 05 22:35:13 it has nothing to do with AS/IJ Dec 05 22:36:25 fire up IJ, you'll see the same behavior Dec 05 22:36:44 Yes, I couldn't get any of this working in IntelliJ (as well as in AS). Dec 05 22:47:49 I know you've missed me, it's just that I've been working on things that I know by heart Dec 05 22:48:03 not that I simply use you for answers, don't get me wrong! Dec 05 22:53:04 If I'm saying {@link ClassName}, do I need to include the package name? Seems to work without the package name, but the documentation doesn't say anything here. Dec 05 22:53:09 (In JavaDoc.) Dec 05 22:53:23 Javadoc* Dec 05 22:53:56 TacticalJoke from what i can tell, if the java file imports the class, you don't have to fully-qualify it Dec 05 22:54:06 Okay. Dec 05 22:54:16 IDEA always tries to fully-qual it if i autocomplete tho Dec 05 23:00:21 there's a setting to turn that off Dec 05 23:00:26 otherwise it follows normal import rules Dec 05 23:01:28 how does more weight for an element in LinearLayout mean less space for it?! Dec 05 23:01:41 is it because I haven't specified weightSum? Dec 05 23:04:46 Odaym: Maybe post something. Dec 05 23:05:03 nvm Dec 05 23:05:29 its about how weights work, not my case specifically Dec 05 23:12:49 public static final int layout_weight --> Must be a floating point value, such as "1.2". () Dec 05 23:12:50 Wat. Dec 05 23:13:24 I use "1" all the time Dec 05 23:13:30 also 1.x Dec 05 23:13:40 should be "Can be" :P Dec 05 23:14:06 I used the force, Luke, and it seems to be a float. Dec 05 23:14:08 source* Dec 05 23:14:09 yeah, I don't really follow why they used floats there. probably to simplify adding views, but you have other problems if it's _that_ hard to adjust related weights. Dec 05 23:14:38 I rarely use Linear personally, so also rarely run into weight Dec 05 23:15:53 I've been using "1". Should I use "1.0"? Dec 05 23:16:25 I guess this uses 1: http://developer.android.com/guide/topics/ui/layout/linear.html Dec 05 23:16:29 "1" * Dec 05 23:18:25 "public static final int weightSum" () Dec 05 23:18:29 'int' again. Dec 05 23:18:38 That int quite right. Dec 05 23:18:40 TacticalJoke: OH, lol, now I see the int confusion with weight. I assume that's because it's expecting an R.etc.reference, which is an int. (does it just generate them automagically when you use e.g. "#FFF"? ) Dec 05 23:18:59 Oh, it's an int reference? Dec 05 23:19:35 I guess so, since everything on that page declares 'int'. Dec 05 23:19:45 (almost?) everything in there is probably an int. see e.g. layout_toRightOf. Dec 05 23:19:57 EndOf! Dec 05 23:20:03 haha Dec 05 23:20:07 jesus... Dec 05 23:20:09 true. Dec 05 23:20:12 :P Dec 05 23:20:23 I didn't even know about it before AS Dec 05 23:20:35 one of these days I'll RTL-ify the apps I work on. Dec 05 23:20:41 a little harder with custom views tho Dec 05 23:20:45 That page is kinda int-imidating. Dec 05 23:20:53 haha..... Dec 05 23:21:15 that's pretty int-elligent Dec 05 23:21:21 TacticalJoke: http://i0.kym-cdn.com/photos/images/original/000/001/582/picard-facepalm.jpg?1240934151 Dec 05 23:21:32 agh, it's in the url. d'oh Dec 05 23:21:34 :D Dec 05 23:22:22 Oh, this is fun. A thread about what AS does that Eclipse doesn't. The first comment I see: "It doesn't really do anything that Eclipse doesn't." Dec 05 23:22:23 wow, so many exceptions detected according to intellij Dec 05 23:22:25 http://www.reddit.com/r/androiddev/comments/2odeg8/what_are_the_benefits_of_android_studio/ Dec 05 23:22:33 if you select "break on any exception" Dec 05 23:22:48 Break on any exception, no exception. Dec 05 23:22:55 too many exceptions Dec 05 23:24:46 well, the comment is almost right. AS has better resource / FLAG_WHATEVER linting (e.g. warns you if you pass the wrong value) Dec 05 23:25:13 other than that and the memory monitor, I don't know of anything that you can't do in Eclipse. easier, certainly, but not outright nope. Dec 05 23:25:16 Groxx: Ya. I'm just amazed he hasn't been downvoted to -17. Dec 05 23:25:20 well. and gradle integration. and it's based on IDEA, not Eclipse. and it actually gets updates. Dec 05 23:25:58 there's lots AS *doesn't* do that Eclipse *does*... #1 on that list is "make me want to punch babies"... Dec 05 23:26:01 The slightest negative comment about AS usually gets downvoted to Hell. Dec 05 23:26:02 yeah, but is gradle integration a thing Eclipse can't do, or is the Eclipse android plugin a thing AS can't do? Dec 05 23:26:14 Yeah, sarbs. Dec 05 23:26:20 Groxx hohohoho deep Dec 05 23:26:36 ikr, I surprise myself sometimes Dec 05 23:28:37 Everyone is talking about Eclipse crashing and having to restart Eclipse... Dec 05 23:28:49 I can't remember the last time I saw Eclipse crash, and I use it for at least six hours a day. Dec 05 23:29:22 I think people just download the ADT Bundle (which featuers a two/three-year-old Eclipse) and refer to that. Dec 05 23:29:22 I had more problems previously, I suspect bugs in the android plugin. several updates ago it completely stopped crashing for me. Dec 05 23:29:26 features* Dec 05 23:29:43 ah, yeah, possibly. I exclusively use 'normal' eclipse because it sucks less. Dec 05 23:29:47 The ADT Bundle is so bad. They should get rid of it. Dec 05 23:30:21 It uses some old, buggy version of Eclipse. They even downgraded it to an older version a few months ago. Dec 05 23:30:26 It's like time travel. Dec 05 23:30:33 that's horrible xD really? Dec 05 23:30:46 Yeah, when there was that huge bug (I've forgotten the details). Dec 05 23:30:52 It was around three months ago, I think. Dec 05 23:32:56 I wish they hadn't gone with Gradle. Dec 05 23:32:59 It's slow and weird. Dec 05 23:33:18 (Okay, I don't know much about it, but that's the impression I have.) Dec 05 23:34:22 main thing I dislike about Gradle is that it seems to have really bad tooling. how do you debug a gradle script, for instance? why is there no autocomplete? wtf did they resist adding a "provided" compilation-scope so hard when it's basically the only way to do code generation? Dec 05 23:34:56 also the documentation is roughly as large as Eclipse's source code D: holy hell. Dec 05 23:35:09 :D Dec 05 23:35:22 I like this tech support tone Google Canada has Dec 05 23:35:30 Wish I could make this a ringtone lol Dec 05 23:35:30 The documentation length really does suggest that something is wrong. Dec 05 23:35:38 In either the documentation or the system itself. Dec 05 23:36:03 (Or both.) Dec 05 23:37:18 I dunno; I still need to learn Gradle, I guess. Dec 05 23:39:38 same. superficially it seems nice as far as I've seen, it's just that going from "copy this magic line you found on the internet" to "know why the line works" seems to involve scaling a crazy mountain of documentation. Writing an Eclipse plugin is significantly easier and more debuggable. Dec 05 23:41:25 Ya. Dec 05 23:43:22 So... where do I -start-? Dec 05 23:43:58 ThePendulum: at the beginning Dec 05 23:44:25 Interesting Dec 05 23:44:54 where is the beginning you ask? Dec 05 23:45:04 WELL IT DEPENDS! <200 lines paragraph> Dec 05 23:45:10 well, good night! Dec 05 23:45:16 * Groxx claps Dec 05 23:45:16 lol https://mail.google.com/mail/u/0?ui=2&ik=e8428745ae&attid=0.1&th=14a1cd73ff4993ff&view=fimg&realattid=1486695244710805504-local0&disp=thd&attbid=ANGjdJ_mQZzw08wjap8PwRWwAUH-svbr3Xd7nT-xXkn7K3PiTC9MnuCcB8MavpBLFgB41TCD-mnoHkIPQcHun9bDCD-ckUbFURJtqC-9wdOsPwLnVCzSkyaLFUPaBFk&ats=2524608000000&sz=w2536-h798 Dec 05 23:45:17 hehe Dec 05 23:45:27 my phone screen right now XD Dec 05 23:45:33 somebody didn't test safe mode enough Dec 05 23:45:35 ThePendulum: so what'cha starting? Dec 05 23:45:52 On a serious note, I've been looking into Android dev, coming from webdev, and I have no clue how to get going on the back-end. I understand basically the entire environment will be dominated by Java? Dec 05 23:46:15 ThePendulum, the backend of what? Dec 05 23:46:23 the app or the web server? Dec 05 23:46:41 Afzal: server-side, my bad Dec 05 23:46:50 in webdev it's more obvious :P Dec 05 23:47:05 it's exactly the same answer for both android and web: whatever you want Dec 05 23:47:39 unless you're thinking of using Google's android-studio-cloud-server-helper-API-things or something? Dec 05 23:48:45 Ah, right, they have a 'cloud' API for it Dec 05 23:49:19 afaik it's mostly a code generator / IDE integration thing. Android itself is totally agnostic about whatever server you're using. Dec 05 23:49:45 I really need to follow a masterclass Java or something, it's unoverseeable Dec 05 23:51:54 not really sure what unoverseeable means, aside from "does not handle management well". but yeah: if you're going to do Android dev, I'd definitely recommend learning Java. there are plenty of books. Dec 05 23:52:34 unless you want to use something like Cordova or Phone Gap to do mostly JS coding. that might be the quick way to start, though eventually you will likely need to understand what it's sitting on. Dec 05 23:53:06 also the app quality will suffer Dec 05 23:56:51 Is LearnJavaonline.org a good source at all? Dec 05 23:58:29 ¯\_(ツ)_/¯ Dec 05 23:58:58 looks pretty bare-bones from a quick skim, but it has the basics. if that's enough for you to learn from, it's probably a quick way to get going Dec 06 00:05:34 ThePendulum: ah. actually, it has empty tutorials after the first 10 or so. still a quick start for the first steps, but probably look elsewhere if you're not already going through it. Dec 06 00:06:16 Already going through it... you underestimate my procrastination skills Dec 06 00:07:48 A *true* procrastinator puts procrastinating off until later Dec 06 00:08:39 guess I'm an amateur crastinator Dec 06 00:17:49 Im working with a search view in a fragment and setting iconified by default causes it to get focus every time I bring up the fragment. Anyone know how to stap this? Dec 06 00:18:40 ahh i mean seticonifiedbydefault(false) Dec 06 00:19:30 JesusFreke: I've been looking into that approach, but well Dec 06 00:34:56 how I compile some old app on new SDK? Dec 06 00:35:15 or rather, how I figure what is the problem? the studio telling me it is displaying 100 out of 255 errors don't help Dec 06 00:36:54 speeder: pretty hard to say in the general case. are any of those 100 fixable? Dec 06 00:37:00 You probably need to find out what the errors are Dec 06 00:37:13 start at the top of the list and see what you can fix Dec 06 00:39:49 the errors are non-sensical to me, for example: Fragment cannot be resolved or R cannot be resolved to a variable Dec 06 00:39:56 I am not sure what would trigger those sorts of errors Dec 06 00:41:13 speeder: probably one of: broken XML, wrong package name for R, you need to clean the build. Dec 06 00:41:18 R cannot be resolved is a result of broken xml Dec 06 00:43:52 idea's git support is pitiful Dec 06 00:44:18 Is there a tool that would allow us to validate the various resource XMLs by themselves, and as such, point to the errors that would cause that? Dec 06 00:44:19 also apparently installing lollipop on a nexus 5 extends the warranty a little Dec 06 00:44:23 who knew Dec 06 00:44:34 sarbs: I've never met an IDE that had good git integration Dec 06 00:44:39 just about every IDE’s SCM support is crap Dec 06 00:44:46 sarbs: what is wrong with it? Dec 06 00:44:51 I use a combination of the command line and SourceTree Dec 06 00:44:57 cli ftw Dec 06 00:45:00 I use AS git integration Dec 06 00:45:15 shadynastys i want to diff my current tree against a specific tag Dec 06 00:45:24 can't. can diff against a branch, but not a tag or specific revision Dec 06 00:45:33 `git diff `? Dec 06 00:45:34 It always amazes me just how much basic naming can be the difference between easy-to-read and hard-to-read code. Dec 06 00:45:38 have to create a branch from it to fool idea :P Dec 06 00:45:43 there is a cmdline in AS for git Dec 06 00:45:48 Groxx not gonna be a very pretty diff via cli Dec 06 00:45:48 One bad name can spoil it all. Dec 06 00:46:26 s73v3r sourcetree does kick some ass, but i just feel dirty using it Dec 06 00:46:43 I just make sure to take a shower right after work Dec 06 00:46:44 gVim can display diffs nicely. (I created my own diff viewer, personally, but I dislike that I had to create such a thing.) Dec 06 00:46:48 tbh i really liked eclipse's git integration. Dec 06 00:47:09 it had some quirks but it could do the majority of stuff i wanted at least Dec 06 00:47:12 sarbs: I've only really used the blame view in Eclipse, out of curiosity. surprisingly decent. Dec 06 00:47:17 oh well. that's like eclipse's one positive Dec 06 00:47:33 alright, I tried to clean the build, don't fixed, so XML is broken Dec 06 00:47:34 how I fix it? Dec 06 00:47:37 * pfn never uses ide git integration Dec 06 00:47:46 speeder, look for errors, fix Dec 06 00:47:50 I guess i have never had to diff against a tag in AS Dec 06 00:47:53 run build from commandline always best Dec 06 00:47:57 P4Merge is nice. Dec 06 00:48:10 pfn the rror is that R cannot be resolved Dec 06 00:48:33 speeder, there's more errors than that, look in the build output tab/console/whatever Dec 06 00:48:51 The thing I hate most about merging in git is that generally the sides are named “Mine” and “Theirs” or “Local” or “Remote”, without much explaination as to which is actually which Dec 06 00:49:04 I always do have cmdline up though behind everything for a fallback Dec 06 00:49:15 Well local remote is pretty clear Dec 06 00:49:37 not always. like when I’m trying to apply a stash Dec 06 00:49:38 I just say "hg vd" to launch DiffMerge or whatever. Dec 06 00:49:43 Though I do like the old diff format. Dec 06 00:49:48 I prefer to live in the command line Dec 06 00:50:12 Yeah, revision control is one of the few places a CLI makes sense. Dec 06 00:50:25 s73v3r ugh god, yeah, just replace mine/theirs with the full / qualifier and be f*ckin done with it Dec 06 00:50:28 how goddamn hard is that Dec 06 00:51:44 i feel like "remote", "branch" is not as clear as "local", "remote" Dec 06 00:52:04 mine theirs is silly though Dec 06 00:52:42 I think Mercurial shows branch names in merge conflicts now. Dec 06 00:52:47 Though only if you're doing the manual thing. Dec 06 00:52:52 I don't see this in my GUI merge tool. Dec 06 00:53:22 no not "remote"/"branch", just do "master" and "origin/master", or "develop"/"stash@{1}" Dec 06 00:54:02 local and remote isn’t clear when you’re merging one branch into another, though, and you have both checked out Dec 06 00:54:25 fair Dec 06 00:54:53 I would still get confused i dont think it matters what you call it Dec 06 00:55:19 pfn only the problems tab show errors Dec 06 00:55:30 speeder, then build from commandline Dec 06 00:55:31 it always takes me a min to figre which is which Dec 06 00:55:33 pfn Eclipse is not even trying to build, it just say there is errors Dec 06 00:55:42 now I have to remember how to do that =D Dec 06 00:55:44 speeder, learn to build from commandline Dec 06 00:56:26 GUIs make people stupid?... not the right word. Dec 06 00:56:35 ignorant..? Dec 06 00:57:01 and sometimes productive Dec 06 00:58:02 depends on the gui. I'd argue most are garbage, and that's the real problem. Dec 06 00:58:53 I think terrible GUIs is very common on Android. Dec 06 00:59:16 are* Dec 06 00:59:48 Go GithUb For Windows!! lol Dec 06 00:59:49 Some apps are textbook examples of what not to do. Having hidden gestures to bring stuff into view is a common one. Dec 06 01:00:39 I mean "having unintuitive gestures to bring hidden stuff into view". Dec 06 01:00:46 I kinda like github for android Dec 06 01:00:48 shadynastys, in my case here I am using GUI out of necessity... ie: my work is not specialized enough to allow me to keep spending time in learning all non-gui tools Dec 06 01:00:54 it makes viewing source on phone somewhat bearable Dec 06 01:01:03 dunno why but the github website runs like utter shit in chrome Dec 06 01:01:25 Bitbucket is great on my phone/tablet. Haven't used GitHub much. Dec 06 01:02:08 I am really hating what people did to "the web" in recent years Dec 06 01:02:15 at least they're both better than sourceforge's UI. good god is it confusing. Dec 06 01:02:28 making sites that use 600mb of memory is seemly becoming WebDevs favourite pasttime Dec 06 01:02:40 heh Dec 06 01:02:46 speeder: Same here. Dec 06 01:02:56 The thing I hate the most is the bar at the top that doesn't disappear as you scroll down. Dec 06 01:03:02 Effectively making my screen smaller. Dec 06 01:03:04 the HUGE bar. yeah. Dec 06 01:03:08 polymer is broken that way Dec 06 01:03:11 pisses me off Dec 06 01:03:12 Who ever thought that was a good idea? Dec 06 01:03:20 it's not because it's a good idea Dec 06 01:03:29 it's because that shit is broken and a pain in the ass to fix from a framework perspective Dec 06 01:03:34 TacticalJoke: probably the same people who thought all laptops need to be widescreen Dec 06 01:03:42 4:3 FTW Dec 06 01:04:06 speeder: fair if you are not going to be spending any significat amount of time in the environment then sure. But if you are then it is very useful to know the manual way of doing things. which usually means cmdUI Dec 06 01:04:27 Someone on Reddit posted a link the other day, and it had one of those bars, and 10 or so Redditors talked about how it was the "best designed site they'd ever seen". Bleh. Dec 06 01:04:28 Most people only learn the hard way out of necessity Dec 06 01:05:22 I absolutely despise this site: http://www.google.co.uk/nexus/6/ Dec 06 01:05:29 Makes my screen feel about six inches tall. Dec 06 01:07:24 I hate all the blog sites that only use the middle of the page. When they have code posted you have to scroll the little code box to see everything. So annoying. Dec 06 01:08:12 Yeah, those suck. Dec 06 01:08:24 speeder: do your XML files have any lines marked as errors? I'd try to resolve those first Dec 06 01:09:02 And generally designs that try to implement "material design" are awful. Dec 06 01:09:07 sites* Dec 06 01:10:45 Happy Friday, everyone! Dec 06 01:11:26 Before I accept defeat - I just want to confirm ... since I'm on a laptop with the i7-4700HQ chipset which, despite having hardware virtualization and VT-d enabled in the bios, still identifies as not having VT-x so haxm won't install ... my best option for emulated debugging is ARM images? Dec 06 01:11:35 What if it's unhappy, tricknology? :D Dec 06 01:11:46 "Unhappy Friday" doesn't have the same ring, I guess. Dec 06 01:12:05 Okay, I'll leave it as "Happy". Dec 06 01:12:50 TacticalJoke what abou that site? are you lokign at it on your mobile? Dec 06 01:12:57 I’d posit that an unhappy Friday is still better than an average Monday Dec 06 01:13:00 Nah, on my laptop. Dec 06 01:13:10 The bar at the top effectively steals screen space. Dec 06 01:13:17 And the images and text just feel too large. Dec 06 01:16:02 bubbafat: hm. did you try downloading the installer direct from Intel? I've only used that one, it has previously been more up-to-date than the one the Android SDK tools will download. Dec 06 01:16:29 Hmm, am I the only one who seldom uses the emulator? Dec 06 01:16:41 bubbafat: also you can use genymotion, which is basically a virtualbox x86 emulator, which uses a different acceleration driver. Dec 06 01:16:43 About 99% of my testing is on devices. Am I doing it wrong? Dec 06 01:16:52 TacticalJoke: you might just have more devices? Dec 06 01:17:12 TacticalJoke: when I only have one handy, I tend to start up two or three emulators for major API differences and density changes Dec 06 01:17:45 and screen size. Galaxy Ys are really tiny D: Dec 06 01:18:38 Hmm, I've never tried multiple emulators. Dec 06 01:18:52 Can you deploy your app to multiple at once, or does it have to be one after the other? Dec 06 01:19:00 Groxx: I tried the direct download with the same result. I'll take a look at genymotion - thanks! Dec 06 01:19:23 TacticalJoke: also, if it's x86, installing and running is faster than on a device Dec 06 01:19:42 I'm using the HAXM thing but it's still a lot slower. Dec 06 01:20:02 how much "a lot slower"? ARM-level? it might not be working. Dec 06 01:20:19 when I was able to use it, my emulators booted in ~3 seconds Dec 06 01:20:24 Starting takes minutes, and everything feels laggy. Dec 06 01:20:29 yeah, it's probably not working Dec 06 01:20:31 But it's hugely faster than the non-HAXM thing. Dec 06 01:20:42 Oh, it used to be absolutely painful. It would take 20 minutes to start before. lol Dec 06 01:20:46 heh Dec 06 01:20:57 dunno then. maybe my computer just has a lot of horsepower? Dec 06 01:21:44 if you don't have gpu accelerated UI, the UI still lags a bit, but it's functional still Dec 06 01:22:08 I tend to disable GPU acceleration, I've had way too many crashes / won't-start-back-up / my computer locks up. Dec 06 01:24:45 What do you folks think of navigation drawers? Dec 06 01:24:48 I don't really like them. Dec 06 01:24:49 Not sure why. Dec 06 01:24:57 They just feel awkward to use. So hidden, and stuff. Dec 06 01:26:00 they've come a long way, and as long as there's the hamburger button to bring them into view by _tapping on a frickin button and not using a gesture_ I'm mostly in favor of them, and like them far more than Android's awful "spinner" Dec 06 01:26:59 it's often a sign that there are too many things happening in the app…. but that can happen legitimately. Dec 06 01:27:58 I'm not sure what to do for my Reddit app (to present subreddits and the inbox). Dec 06 01:28:47 I guess most people would use a navigation drawer here. Dec 06 01:29:04 that's where I mostly like them, fwiw. they're faster to get in and out of than going back "down" to a master-list activity. Dec 06 01:29:08 It's subscribed subreddits (if the user is logged in) or default subreddits (if not). Dec 06 01:29:22 Yeah, using an activity for this isn't great. Dec 06 01:29:48 Would a spinner be annoying for this? Dec 06 01:29:49 also the side gesture is handy for phablets, though if you use them you might in fact be summoning satan. (so I do on a daily basis, but it's because I'm a developer, I swear!) Dec 06 01:29:54 It was my first consideration, but I'm not sure about it. Dec 06 01:30:22 How does Satan get notified? Dec 06 01:30:31 every time you put it up to your head Dec 06 01:30:52 it's so ludicrous, the universe rebels, and satan feels a tremor in the force Dec 06 01:31:32 and then poof: red guy with pointy tail stabs you with a pitchfork. Dec 06 01:31:41 you get used to it eventually Dec 06 01:32:27 what spinner? Dec 06 01:32:38 I like nav drawers Dec 06 01:33:31 A spinner at the top, in the action bar. Dec 06 01:33:46 It would show the current subreddit and allow you to pick a new one. Dec 06 01:34:04 I'll avoid the "/r/" naming, I think. Dec 06 01:34:30 Groxx: Satan seems like a fairly good guy, in any case. Dec 06 01:34:41 I think he was largely misunderstood. Dec 06 01:34:45 I know what a spinner is Dec 06 01:35:02 I mean what is "androids spinner" Dec 06 01:35:06 TacticalJoke: yeah, I mean I don't blame him for the stabbing. Dec 06 01:35:35 pfn: I'm personally visualizing this when I hear "spinner" and "android" http://developer.android.com/guide/topics/ui/controls/spinner.html Dec 06 01:36:32 aka "thing that takes up your actionbar, gives you no metadata in your choices, and has that weird triangle that isn't used anywhere else in Android and somehow people are supposed to know it's clickable" Dec 06 01:37:36 it also has a bad habit of showing "home……………….." because there's one big option in the list Dec 06 01:38:05 in action bar it's deprecated now Dec 06 01:38:11 If I went with a spinner, I'd either make it wrap the current text (not sure if possible) or go the full width. Dec 06 01:38:11 and good riddance Dec 06 01:38:18 common though Dec 06 01:38:21 as a spinner ui Dec 06 01:38:25 pfn: Same with tabs, right? Dec 06 01:38:34 I think all that stuff is deprecated because they want us to use Toolbar. Dec 06 01:38:36 especially the actionbar. having a top-most navbar: useful! actionbar: painfully unconfigurable! Dec 06 01:39:47 It's weird that they didn't make Toolbar right away. Dec 06 01:39:57 Seems like the obvious thing to do. Dec 06 01:42:27 In any case, if I do go with a navigation drawer, I won't be putting Settings there. That belongs in the menu (and should be available from any activity), IMO. Dec 06 01:42:37 only obvious in hindsight Dec 06 01:43:01 and I like tabs, except they take up screen space Dec 06 01:44:00 Toolbar is way more obvious than ActionBar, IMO. Just another View on the screen is the simplest solution. Dec 06 01:45:03 TacticalJoke: completely agreed. settings are different. drawers are "nav through this large list of options which are all relevant". Dec 06 01:45:15 again, only in hindsight Dec 06 01:46:28 I'd say the complete opposite: Toolbar was more obvious at first and less obvious once we'd gotten into the "ActionBar all the things" mentality. Dec 06 01:46:58 if it were immediately obvious, it wouldn't have taken 4 years Dec 06 01:47:25 It wasn't obvious to Google, I guess. Dec 06 01:48:07 it was definitely obvious in the honeycomb days that fixing the action bar on the window was a bad idea Dec 06 01:48:12 yeah, toolbar / something simple seems like the first step, not ActionBar. all I really want is a container I can put stuff in that maybe hides itself when I scroll, and has some helpers for conforming to HIG. Dec 06 01:48:43 Exactly. Another ViewGroup is the natural progression. God knows what Google were thinking. Dec 06 01:48:58 Or another View type. Dec 06 01:51:25 There are Reddit clients that put Settings in the navigation drawer. Dec 06 01:51:38 And in some cases you have to Back several times to get to the settings. Dec 06 01:51:48 What are those people thinking? Dec 06 01:55:30 design guidelines state that a drawer should be able to be opened from any screen with a bezel swipe Dec 06 01:55:52 settings on every page makes no sense either Dec 06 01:57:35 JakeWharton: What do you think about a nav drawer versus an ActionBar/Toolbar spinner for a Reddit client? Dec 06 01:57:46 (For subreddits.) Dec 06 01:58:05 nav drawer Dec 06 01:58:22 K. Dec 06 02:00:34 I guess it should be openable (with a swipe) from any screen? Dec 06 02:00:45 As the guidelines state. Dec 06 02:01:21 I guess it would be nice to be able to jump to a subreddit listing from basically anywhere. Dec 06 02:01:53 The client I use (RedReader) uses an Activity to display subreddits. Such a pain to go all the way back. **** ENDING LOGGING AT Sat Dec 06 03:00:00 2014