**** BEGIN LOGGING AT Sun Apr 12 02:59:58 2015 Apr 12 03:00:08 drawview is the entire screen? Apr 12 03:00:17 lasserix_: No Apr 12 03:00:17 the touch event happens in or out or both of the drawview? Apr 12 03:00:39 lasserix_: What? Apr 12 03:00:58 so either push your touchevent from your drawview to your activity Apr 12 03:01:12 or push your touch event from your activity to your drawview (if its outside) Apr 12 03:01:32 you can also use intercepttouchevent on the root viewgroup of your activity Apr 12 03:01:51 to capture all touch events, and pass thema round accordingly Apr 12 03:02:12 lasserix_: How to push touch event? Apr 12 03:02:31 anyway you want Apr 12 03:02:52 mDrawView.handleActivityTouchEvent(TouchEvent event) Apr 12 03:03:02 mTouchEventListener.onTouchEvent(TouchEvent event) where Activity implement TouchEventListener Apr 12 03:03:07 and is one in the drawview Apr 12 03:03:25 haha yes I do love my car and unfortunately I don't have a garage to park it in at night. Thats a good idea, but by move I meant when someone sits in it the cars suspension moves the car around (it's a lightweight sports car) also when someone tries to tow it away it will tilt as they lift it. I am practically looking for an alert before the thief drives away with it. Apr 12 03:03:27 http://imgur.com/FTW1MxB Apr 12 03:03:34 Yelp is so broken Apr 12 03:03:46 lasserix_: Thanks Apr 12 03:04:13 not to mention their mefia like tactics Apr 12 03:05:07 ironpusher: any acceleration felt by the car the accelerometer of the phone will feel Apr 12 03:05:21 masterjef_: thank you, i will look into it further Apr 12 03:05:24 above whatever threshold of sensitivity Apr 12 03:05:42 so that's why i am saying, use an app out there to record and get a feel for what those different actions will register as Apr 12 03:06:01 then build your app to detect all events, filter them if recognized Apr 12 03:09:22 lasserix_: That's great advice! Thank you, sorry I misunderstood. I will do that tomorrow morning. I am new to android, will i be able to set the threshold according to the current tilt of the car, for example if I park in a hill instead of my relatively flat front yard. Apr 12 03:09:38 you might read on physics Apr 12 03:09:51 about how accelerating from an inert frame works Apr 12 03:10:30 but what you will want to measure is difference, not absolutes Apr 12 03:10:47 you dont care what orientation it is in, only if it changes in orientation Apr 12 03:13:33 like i said just download an app that shows you the readings and play around with it / test scenarios Apr 12 03:19:00 I see, I will read up on the sensor class specifically the accelerometer aswell as do what you said and play around with the app. Thanks for guiding/helping me out. Apr 12 03:21:04 Constants public static final int FLAG_AUTO_REQUERY (Added in API level 11) -> This constant was deprecated in API level 11. <---- text from https://developer.android.com/reference/android/widget/CursorAdapter.html#FLAG_REGISTER_CONTENT_OBSERVER Apr 12 03:22:06 a premature death (facepalm) Apr 12 03:36:57 fuu******* almost 2 weeks with same issue, can't refresh a listview using loadercallback and a contentprovider currently using a database query Apr 12 03:51:45 feathersanddown, what's the error? Apr 12 03:52:13 can you use shared preferences to store parcelables? Apr 12 03:52:25 no Apr 12 03:52:31 parcelables shouldn't be persisted to disk Apr 12 03:52:45 their format isn't guaranteed to be stable Apr 12 03:52:57 Maybe you guys might be a better group to ask: I just updated my Galaxy S5 with ATT to Lollipop, and recently my phone has been restarting randomly. I went and set up ADB, and grabbed the logs from logcat, but I'm not sure how to proceed from here Apr 12 03:53:05 http://codepad.org/4jYtOWBq <-- can't do a listview refresh when adding an item to the list from a alertdialog Apr 12 03:53:22 joshkovach: http://developer.android.com/reference/android/os/Parcel.html - 2nd paragraph :) Apr 12 03:54:04 thanks Apr 12 03:54:08 Jarhead: you want #android-root probably for that. I did the same on my dev device but i wiped it beforehand Apr 12 03:54:19 when click to positive button, go to "notifyDataSetChanged" but SimpleCursorAdapter won't do anything Apr 12 03:55:02 masterjef_: Its stock android 5.0/touchwiz, short of apps I've downloaded from the play store Apr 12 03:55:12 I guess I'll ask anyways Apr 12 03:55:12 JesusFreke can you do this on your unicycle? http://digg.com/video/man-narrates-his-own-harrowing-descent-on-a-downhill-mountainbike Apr 12 03:55:24 did you sideload the OTA or download it? Apr 12 03:55:37 Downloaded officially Apr 12 03:55:55 Through the "check for updates" Apr 12 03:56:24 ok, if no one has an answer i'd say your best bet is to look at your logcat with adb Apr 12 03:57:35 Yeah, I have the logs, I just don't know what I'm looking at/for Apr 12 03:57:37 JesusFreke but instead of the voice, your version would have didgeridoo Apr 12 03:57:49 feathersanddown: I'll give it look in a minute Apr 12 03:58:03 :) Apr 12 03:58:04 Jarhead: can you pastbin them Apr 12 04:02:22 g00s: hahaha, that's great :) Apr 12 04:02:33 I'm pretty sure I could do almost all of that Apr 12 04:02:45 of course, for the "jumps", I would ride over them Apr 12 04:03:04 you don't have nearly the speed on a uni for doing jumps like that Apr 12 04:03:16 but yeah, the constant narration was awesome Apr 12 04:07:56 er Apr 12 04:08:00 its too big Apr 12 04:08:03 give me a min Apr 12 04:08:46 ok Apr 12 04:15:17 http://jarwa.in/uploads/3d852e3f0a9343beb5cff3620b8962d6.txt Apr 12 04:21:40 Jarhead: there's a bunch of ANR's in there. have you pulled /data/anr/traces.txt? Apr 12 04:22:55 No, I'm not exactly sure how to Apr 12 04:35:34 Hi all. Has anyone worked with filtering data from SQLite in ExpandableListView/SimpleTreeCursorAdapter? I'm trying to find some documentation or sample code but having a hard time finding anything relevant Apr 12 05:02:40 masterjef: anyway have to go, thanks for your time :) Apr 12 05:05:12 what might be the best way to persist a set of longs? Apr 12 05:06:18 I literally don't need anything else as far as storage goes, I just need to be able to store them so I can read/write them and not worry about them disappearing say, between boots Apr 12 05:07:03 How many? I would say just format them as a comma separated string, and throw it in a SharedPreferences Apr 12 05:23:30 Could someone explain to me how to get the data from the review fragment in this GitHub project? Apr 12 05:23:34 https://github.com/MarkOSullivan94/Android-Lollipop-Wizard Apr 12 05:35:38 Hey all! Apr 12 05:39:46 anyone here? Apr 12 05:52:33 templarian Apr 12 05:53:23 anyone do HLS with exoplayer? Apr 12 05:54:15 masterjef: how to get the what? Apr 12 06:08:03 anyone awake in here? Apr 12 06:08:14 if so, anyone know anything about dm-verity? Apr 12 06:19:01 Hello all Apr 12 06:20:01 hi Apr 12 06:22:23 thepoosh ! Apr 12 06:22:31 g00s: ! Apr 12 06:22:34 sup dude? Apr 12 06:22:46 thepoosh did everything go ok with google ? Apr 12 06:22:49 how's life? Apr 12 06:22:56 idn, they haven't responded yet Apr 12 06:23:01 *idk Apr 12 06:23:12 thepoosh still on vacation ? Apr 12 06:23:17 nope Apr 12 06:23:19 What poosh ? Apr 12 06:23:20 first day bacl Apr 12 06:23:28 back Apr 12 06:23:29 thepoosh so whats to work on now ? Apr 12 06:23:37 next version Apr 12 06:23:39 for now Apr 12 06:23:43 until we here some more Apr 12 06:23:45 \o/ Apr 12 06:24:07 hopefully all will be good Apr 12 06:24:20 but it seems like if they don't respond we'll publish anyway Apr 12 06:24:25 it's already out on beta Apr 12 06:24:42 What app Apr 12 06:24:49 glide Apr 12 06:25:32 thepoosh did you have a good vacation ? Apr 12 06:25:48 it was ok, my daughter is teething so that was a huge pain in the ass Apr 12 06:25:51 but it was good Apr 12 06:25:54 :) Apr 12 06:26:04 wow Apr 12 06:26:39 wow? Apr 12 06:27:17 :D is it over at least for your daughter ? Apr 12 06:27:34 * g00s has no kids Apr 12 06:27:49 not over yet Apr 12 06:27:52 it is what it is Apr 12 06:27:55 i'm trying to think if my dog went through something similar, don't think so Apr 12 06:27:56 just little sleep Apr 12 06:28:02 nah Apr 12 06:28:08 dogs get sick though Apr 12 06:29:00 my pooch is 14 years old. he's quite adorable. even though he's blind he takes the leash in his mouth and walks next to me Apr 12 06:29:19 lol Apr 12 06:29:23 needs some mid course corrections here and there but does ok Apr 12 06:29:44 14 is not the end Apr 12 06:29:55 it has about 4 more years to go Apr 12 06:29:57 no? Apr 12 06:30:19 hmm ... if he could see he'd probably be more active Apr 12 06:30:46 but he's in good shape generally. i hope he lasts until 16 Apr 12 06:31:32 yay for the k9 family members! Apr 12 06:31:45 my wife is waiting for us to move to our own house an get a dog Apr 12 06:31:50 she relly wants one Apr 12 06:31:55 what kind ? Apr 12 06:32:19 hotdog Apr 12 06:32:57 I'm enforcing something with less hair Apr 12 06:33:31 this was her dog when we were dating Apr 12 06:33:32 https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpf1/v/t1.0-9/1909790_7905061959_8678_n.jpg?oh=efc688df712895dbceb139261929af5d&oe=55A2F195&__gda__=1437679906_d2d1532d7f44e2e9d8de6b94aadb5b76 Apr 12 06:33:34 i loved it Apr 12 06:33:52 they give him away to be a guard dog because he was too aggressive Apr 12 06:33:52 i knew somebody with a Canaan Apr 12 06:33:59 quite a regal fellow Apr 12 06:34:12 yes Apr 12 06:34:15 i loved him Apr 12 06:34:28 his name was Ketem which is the hebrew word for Spot Apr 12 06:35:08 whaaat, where do you guys live? Apr 12 06:35:12 how long did she have Spot ? Apr 12 06:35:40 why was he afressive ? Apr 12 06:35:54 thats sad :( Apr 12 06:36:40 he was aggressive because her youngest brother was a dickhead Apr 12 06:36:51 and a 13 year old hot head Apr 12 06:36:51 oh no Apr 12 06:36:59 and trained him to be aggressive Apr 12 06:37:05 even though he liked me Apr 12 06:37:20 he hated some people and bit some Apr 12 06:50:52 thats all to common, I saw a bumper sticker recently, euthanize people not pit bulls. Apr 12 06:51:37 i like my pet more than most people in the world. Apr 12 06:51:57 it makes me depressed when people weaponize animals. Apr 12 06:52:04 heh, ya Apr 12 06:52:35 my pet never tried to cut me off in traffic or sell me anything ;) Apr 12 06:53:24 :) Apr 12 06:53:55 do you have a pit bull? Apr 12 06:54:08 Guys, please stay on topic Apr 12 06:54:21 do you use dat volley? Apr 12 06:54:58 good point, if the channel is offtopic people hesitate to ask questions. Apr 12 06:55:23 alright, I do have a serious question though. Apr 12 06:55:45 how do i get parsed json data back from onResponse in volley? Apr 12 07:02:36 ah well, I wish I knew ;) Apr 12 07:03:07 learning how to work with json is still on my list Apr 12 07:05:19 Pwnies: i use Volly Apr 12 07:05:41 if you create your own Request extending the volliy Request object Apr 12 07:05:55 implement your own parseNetworkResponse Apr 12 07:06:13 and use the StringRequest as a basis of parsing a JSONObject Apr 12 07:07:51 Wait, why not a JsonObjectRequest? Apr 12 07:08:12 hm. gotta clarify a bit. I'm posting to the api Apr 12 07:09:28 is there a JsonObjectRequest? Apr 12 07:09:50 oh Apr 12 07:09:51 yes Apr 12 07:09:53 use that Apr 12 07:10:07 and then the OnResponse will have a JSONObkect for you Apr 12 07:10:24 hi there Apr 12 07:10:29 hi hi Apr 12 07:10:44 Is there any way to prevent android from dropping a bluetooth connection when it start scanning ? Apr 12 07:10:58 heh Apr 12 07:11:00 I am transmitting data and when scan start, it just disconnect every paired device Apr 12 07:11:09 which is annoying Apr 12 07:11:23 br/edr scan or BLE scan ? Apr 12 07:11:31 not BLE scan Apr 12 07:11:34 normal Bluetooth scan Apr 12 07:11:49 here @thepoosh Apr 12 07:11:49 http://pastebin.com/qFCnyQQv Apr 12 07:11:54 Marlinski probably not Apr 12 07:11:59 damn Apr 12 07:12:20 I can prevent my own software from discovering, but it will be difficult to prevent other (like firechat) from doing so Apr 12 07:12:22 i try to initialize class variables with the json response from onResponse Apr 12 07:12:29 ok Apr 12 07:12:57 Marlinski the bt stack barely works. i just had a similar scenario; if i'm connected to multiple devices and disconnect from one, they all disconnect Apr 12 07:13:07 arg Apr 12 07:13:10 does that code look feasible to you? Apr 12 07:13:12 Bluetooth sucks on Android Apr 12 07:13:17 that's a nightmare Apr 12 07:13:19 ^^ Apr 12 07:14:04 it is, indeed Apr 12 07:14:19 Pwnies: as long as you take into consideration the onErrorResponse Apr 12 07:14:24 if i call log.d(TAG, DataSeries2.toString) outside of the onResponse, it turns out to be null Apr 12 07:14:36 g00s: is there a way to tell that I am BONDED (without iterating over the neighbour) Apr 12 07:15:02 because the request is async Apr 12 07:15:21 as long as the response didn't finish it's null Apr 12 07:15:22 Marlinski try BluetoothDevice.getBondState Apr 12 07:15:29 i log.d inside the onResponse and the class variables spit out text in the onResponse. when I do it outside the onResponse, i get null Apr 12 07:15:44 ohhh Apr 12 07:15:59 yeah. i understand that, i was wondering how i bring it to the main thread Apr 12 07:16:22 g00s: but I first have to have a bluetoothdevice Apr 12 07:16:33 g00s: is it possible to have a globalstate Apr 12 07:16:35 Pwnies: all Volly responses happen on the main thread Apr 12 07:16:35 my brain hurts from trying :.( Apr 12 07:16:38 from the adapter for instance Apr 12 07:16:50 Marlinski BluetoothDevice is just a proxy. you get it from the adapter with an address Apr 12 07:17:00 you can make the request immediate Apr 12 07:17:21 alright, it appears that I have a misunderstanding of something... Apr 12 07:17:40 seems like it Apr 12 07:17:43 hm? immediate? Apr 12 07:18:13 g00s: when discovery start, I just want to probe the state if bonded and cancel if it is the case Apr 12 07:18:22 g00s: so I don't want to rely on address state Apr 12 07:18:36 oh you mean address is current mac address or remote one ? Apr 12 07:18:41 Marlinski i dunno then. when you start discovery the bond state can come at any time Apr 12 07:19:26 i dont know what you mean by address state Apr 12 07:19:41 it's ok there is the getBondedDevices() method Apr 12 07:19:49 so if set is null I can procees with scanning Apr 12 07:19:51 else I cancel :) Apr 12 07:20:02 that might only be for BLE, but give it a try Apr 12 07:20:37 my wrong, api 5 so yeah Apr 12 07:20:54 lol, i even use that method duh Apr 12 07:20:59 huhu Apr 12 07:21:19 I waste way too much time fixing the bluetooth bugs for my app Apr 12 07:21:30 it's full of /* little hack to make it work */ comments ^^ Apr 12 07:23:01 Marlinski its so bad that i specifically added google analytics event tracking for weird behavior Apr 12 07:23:21 so at least i know bad devices Apr 12 07:23:46 would you mind sharing your findings ? Apr 12 07:24:14 some day ... was thinking about writing a book :D Apr 12 07:24:34 there is just too much Apr 12 07:24:55 :] Apr 12 07:27:26 g00s just starta blog Apr 12 07:27:32 couple of posts each week Apr 12 07:27:41 I'll read it Apr 12 07:27:50 after a couple months you can aggrendize and publish it Apr 12 07:27:58 plus you go on the droid conference tour Apr 12 07:28:12 it will be you and commonsguy Apr 12 07:28:23 then you can lurk SO Apr 12 07:28:29 lol, actually dave smith gives BT talks already Apr 12 07:28:59 also Mark Murphy Apr 12 07:29:00 hello. i am cross-building android. after 'repo sync' downloads the git srcs, how do i set up a seperate build folder so that my build files are not also in .repo getting mixed up with the source code ??? Apr 12 07:29:01 its not like its mutually exclusive Apr 12 07:29:10 he gave a gradle webinar not long ago Apr 12 07:29:17 thepoosh mark murphy talks about bluetooth ? Apr 12 07:29:22 g00s: getBondedState() gives me a list of devices which I am not even paired with Apr 12 07:29:26 idk, I'll ask Apr 12 07:29:30 euh I mean getBondedDevices Apr 12 07:29:39 it's like a list of devices it has being paired historically Apr 12 07:29:44 been* Apr 12 07:29:59 thepoosh it should match the list in Settings -> Bluetooth Apr 12 07:30:05 oops sorry Marlinski ^^^ Apr 12 07:30:37 this is for thepoosh https://www.youtube.com/watch?v=4-ucldwWABY :D Apr 12 07:30:56 i see Apr 12 07:31:10 that dog is cheicovski Apr 12 07:31:53 they should put things on top that just plays 3rd or something so he can actually use his paws Apr 12 07:32:12 bet you could teach him to actually play something relatively simple that way Apr 12 07:32:53 g00s: what exactly means BONDED or paired if there is no socket ? Apr 12 07:33:06 lasserix_: I'm told he has a few chapters on bluetooth Apr 12 07:33:07 or does that mean that we can grab a socket from somewhere ? Apr 12 07:33:08 it means there is a shared link key Apr 12 07:33:20 I see Apr 12 07:33:30 so it's not similar that having an openned socket Apr 12 07:33:39 not at all :| Apr 12 07:33:55 damn Apr 12 07:34:06 ok, then I will add yet another quick fix Apr 12 07:34:09 :) Apr 12 07:36:07 I'll use a Reentrant lock or something Apr 12 07:36:14 a condition Apr 12 07:43:06 g00s: socket seems to drop during scanning only if trying to transmit data no ? Apr 12 07:58:35 [19:25] < JesusFreke> dreamcat4^: also, if you use the -c option when syncing, it should reduce the amount of stuff that is downloaded a bit Apr 12 07:59:40 JesusFreke: but this is in the documentation, the '-c' option? ---> https://source.android.com/source/using-repo.html#sync Apr 12 07:59:53 dreamcat5^: repo help syn Apr 12 07:59:56 repo help sync Apr 12 08:06:20 JesusFreke: still not seeing any '-c' option over here Apr 12 08:07:49 dreamcat5^: http://hastebin.com/exajexuluf.vbs Apr 12 08:08:34 JesusFreke: thanks man. there is someting wrong with my repo command. Apr 12 08:09:05 you have to do it in an initialized repository Apr 12 08:09:33 e.g. http://hastebin.com/osiwovisal.vhdl Apr 12 08:13:16 JesusFreke: right... but the cmd i want to run is: repo "init" "-u" "https://github.com/hardkernel/android.git" "-b" "s805_4.4.2_master" Apr 12 08:13:44 -c is an option to repo sync, not repo init Apr 12 08:13:52 JesusFreke: ah! ok. sorry i'm being a bit dumb. ok it makes sense now Apr 12 08:14:11 repo init doesn't pull any objects down. Or rather, I guess probably only the objects for the manifest project. Apr 12 08:14:15 JesusFreke: thank you, it's clear to me now Apr 12 08:15:27 JesusFreke: so my command should be (in total): $ repo init -u https://github.com/hardkernel/android.git -b s805_4.4.2_master && repo sync -c Apr 12 08:16:12 sure. you might want to add a -j to your repo sync -j4 or -j8 or so Apr 12 08:16:57 depending on your bandwidth and cpus, etc. Apr 12 08:17:56 JesusFreke: hmm. it's a docker image so i can't really determine those things ahead of time Apr 12 08:18:24 I would say throw a -j4 on there. that's still pretty conservative Apr 12 08:18:48 the problem is that repo sync won't be constantly downloading with just 1 thread Apr 12 08:18:55 JesusFreke: well actually, i know it will run on hub.docker.com trusted builds farm. Apr 12 08:18:55 it's also doing various git operations and what-not Apr 12 08:19:20 JesusFreke: thanks! ok then so at least a minimum of -j2 then Apr 12 08:19:35 so adding more threads will make sure that it's always downloading something while the other thread is doing other stuff Apr 12 08:21:43 JesusFreke: but on lower spec hardware, with mechanichal HDDs, perhaps too many thread and the disk accesses might end up seeking around a lot? Apr 12 08:22:42 perhaps that can only happen on faster connection speed Apr 12 08:23:17 dunno. you might experiment with it :) Apr 12 08:23:47 also, you might consider setting up a local mirror if possible Apr 12 08:24:08 so you're pulling the source from a local machine on their build farm, instead of from google or wherever else Apr 12 08:25:16 i recon: j2 or j4. just the minimum enough to allow git to pack/unpack objects in background whilst stil downloading the other repo(s) Apr 12 08:28:51 JesusFreke: anyway. thanks again! have to go away and sort out building of the other OSes now (openelec and lubuntu) Apr 12 08:28:58 bye Apr 12 08:34:35 oh wait. i still need to configure a seperate build folder, for the build files. have not found the option for that yet. Apr 12 08:38:14 or maybe that is out/ common base path variable :/? Apr 12 08:40:59 I think there should be an environment variable for that Apr 12 08:41:02 dunno what it is offhand :) Apr 12 08:41:06 my question is: where are the build files written to? i cannot know ahead of time, because it takes so many GB of data to download, build etc. and on slow connection Apr 12 08:41:26 all outputs will be in "out" Apr 12 08:41:50 JesusFreke: you mean buld files + build products Apr 12 08:42:05 not sure what you mean by build files Apr 12 08:42:13 the Android.mk files are all in their respective projects Apr 12 08:42:21 JesusFreke: object files, you know. Apr 12 08:42:23 the source tree is never modified by the build Apr 12 08:42:33 any outputs are generated in the out folder Apr 12 08:43:05 including any intermediate files, etc. Apr 12 08:43:17 JesusFreke: ok. so then i don't need to worry as already setting the ENV OUT_DIR_COMMON_BASE=/out Apr 12 09:16:23 hello. I want to send events to previous subscribers. Can I do it without subscriptions? Apr 12 10:24:24 I have inherited LinearLayout and it runs Runnalbe on when it detects long press - how can I open alertdialog from that runnable? Apr 12 10:24:57 I get BadTokenException when trying to create the alertdialog with that class' context Apr 12 10:25:22 code can be found here: https://github.com/vhakulinen/push-tool-android/blob/master/src/com/vhakulinen/pushtoolapp/ListItem.java#L16 Apr 12 10:49:44 I need to schedule a network task in my app and since it needs to be scheduled for an hour ahead, I figured going with alarmmanager is preferred over a scheduledexecutorservice. Apr 12 10:50:23 now I'm confused about what I should use to guarantee that the intent will be handled Apr 12 10:51:28 should I use a receiver or a service Apr 12 10:51:33 or both? Apr 12 10:51:44 or should I use a wakefulbroadcastreceiver Apr 12 10:52:51 what happens if the phone is asleep them the timer goes off? Apr 12 10:53:03 when* Apr 12 10:55:16 I mean, since it's a network task that needs to be done, I will need to fire up a new thread anyway, should I still pass the intent to a service? Apr 12 12:27:21 Can a Realm model that has been removed from realm be added back? Apr 12 12:27:32 Or is it basically a dead object at that point? Apr 12 12:37:52 Hey guys, anyone able to help me with a GSON conundrum? My root element is 'data', which is fine. When I want to grab an object I just use a JSONDeserializer to get that object from within the "data" element. Apr 12 12:38:43 But, the problem lies wherein I have a list of these objects. There is only one data tag, at the top, followed by a JSON array containing one or more of the objects. Problem is, the data tag only exists at the root of the tree, not for each object, so it doesn't find any because it expects a "data" root element for each of the children too. Apr 12 12:39:26 (I am using a GsonBuilder with type adapters for each type of object) Apr 12 13:05:43 Im following a tut on how to populate a listview from a url with json results but its not working.. i get blank results. Apr 12 13:05:45 http://pastebin.com/mQAfqLrQ Apr 12 13:05:56 xml file http://pastebin.com/xjEd1S31 Apr 12 13:05:59 someone please help Apr 12 13:22:31 Im following a tut on how to populate a listview from a url with json results but its not working.. i get blank results. Apr 12 13:22:37 http://pastebin.com/mQAfqLrQ Apr 12 13:22:41 xml file http://pastebin.com/xjEd1S31 Apr 12 13:22:50 someone please help Apr 12 13:56:19 is there a limit to how many messages a single device can get via GCM? Apr 12 14:01:36 thepoosh, in what way? Apr 12 14:01:38 over time? Apr 12 14:01:41 yes Apr 12 14:01:53 a qa guy came over and said that after getting X push messages Apr 12 14:01:58 he stops getting them Apr 12 14:02:15 i kinda maybe remembered a flooding prevention mechanism Apr 12 14:02:48 Hmm, there's just a limit of max queued messages on the server Apr 12 14:02:56 but that's everything that's notified Apr 12 14:03:36 mmkay Apr 12 14:03:39 will let him know Apr 12 14:03:50 we should move towards collapsed keys Apr 12 14:23:22 collapse keys exist for GCM Apr 12 14:26:21 Anyone know why a recyclerview's adapter won't call onBindViewHolder? Apr 12 14:27:16 getCount == 0 ? Apr 12 14:28:33 Nope :/ Apr 12 14:28:57 Get count = array.length+3 (so even if array is 0 which it wont/cant be, the +3 means it isnt) Apr 12 14:29:08 and the array is not null Apr 12 14:32:10 The RecyclerView isn't in a scroll view either Apr 12 14:32:35 setHasFixedSize is true Apr 12 14:33:36 Anthaas: layout? Apr 12 14:33:44 Anthaas: LayoutManager Apr 12 14:34:06 new LinearLayoutManager(this) Apr 12 14:34:09 this being an Activity Apr 12 14:51:02 MikeWallaceDev: Is your video up yet? :D Apr 12 14:55:51 hey guys! how can i create a folder on the SDCARD of the device which is read-write mode for my application and read-only to other application? Apr 12 15:27:50 can anyone help me? Apr 12 15:32:47 DarkChaoz: With such pointless meta-questions, no. Apr 12 15:33:03 ok. Apr 12 15:34:49 Im following a tut on how to populate a listview from a url with json results but its not working.. i get blank results. Apr 12 15:34:57 http://pastebin.com/mQAfqLrQ Apr 12 15:35:01 xml file http://pastebin.com/xjEd1S31 Apr 12 15:35:52 Hi, not really a dev question but I was wondering should version names be transcribed or literally translated when translating to other languages. For example Android Major versions like Lollipop, Gingerbread, Honeycomb? Apr 12 15:36:03 there is no error on the logs.. Apr 12 15:36:13 im not sure whats the problem is with the code Apr 12 15:38:20 DarkChaoz: Use Log.d to check each part. Apr 12 15:38:40 It's also hard to read that code because the whitespace is so inconsistent. Apr 12 15:39:17 DarkChaoz: trying use Retrofit to handle response. will be more easy to populate the listview Apr 12 15:44:05 mhmm says no value for streams when parsing Apr 12 15:52:08 cant seem to figure out, not good with json stuff. Apr 12 16:01:02 DarkChaoz: Log.d all the things and if you still can't figure it out then ask a specific question with the new data. Apr 12 16:03:59 from the code, the log shows this error JSONException: No value for streams Apr 12 16:04:30 basically the parsing code is wrong.. and Im not sure how to re arrange it Apr 12 16:04:37 let me get the stream json Apr 12 16:05:39 http://pastebin.com/2RR0HQzn Apr 12 16:07:25 the code specifically wrong is in the doinbackground http://pastebin.com/riPxpMaZ Apr 12 16:12:44 DarkChaoz: That message makes it easy -- there's no value for the key "streams". Apr 12 16:12:52 So you can debug what's going on and figure out why there is no such value. Apr 12 16:13:04 See which values exist and don't exist. Apr 12 16:15:29 not sure how to debug tbh? do i just run it from eclipse and check logcat? Apr 12 16:16:20 DarkChaoz: Add breakpoints around the problematic area, add watches on different variables/expressions so you can see their value change as you step through the code, and use those to work out what is going wrong. Apr 12 16:16:40 but yes, you can run it through eclipse using the debug button (to the right of run IIRC) Apr 12 16:23:12 Ugh. Even when I set a fixed size in xml (500dp) on the recycler view it doesnt call onBindViewHolder. I have no idea now why that isnt being called. Apr 12 16:29:49 I love Bitbucket's issue tracker. It's so simple. Apr 12 16:30:11 Simplicity FTW. Apr 12 16:37:42 all hail the conquering hero.. the one thats suppose to save us all. Let us all remember him as our hero and not our betrayer Kappa Apr 12 16:37:54 oh crap.. wrong channel ._. Apr 12 16:37:56 my bad.. Apr 12 16:57:04 Sounds cultish Apr 12 16:58:26 I thought this drink tasted a bit weird. Apr 12 16:58:50 Aww, you weren't supposed to do it yet. I thought it was after 3, not on 3. Apr 12 17:03:54 TacticalJoke, no :D Apr 12 17:04:16 I hope that I didn't tank. I had lots of difficulty in my talk... Apr 12 17:05:04 I'm happy that I was able to actually give a talk (I thought I would have to bail) but I don't think that the quality is going to be there on video :-/ Apr 12 17:05:28 I feel so bad that I want to redo the talk in my office and post it on YouTube! Apr 12 17:08:36 If it's any consolation, I've been watching some PyCon ones which were utterly boring. :D Apr 12 17:08:44 The speaker just drones on and on and on. Apr 12 17:09:17 Did something go wrong? Apr 12 17:09:31 I would like to see it regardless of whether or not you or others didn't think it went well. Apr 12 17:09:35 Is it online? Apr 12 17:12:52 Actually Anthaas , nothing went wrong. I mean, as far as what happened on stage, I'm happy with it. But, reviewed on video, I have a feeling that it will be lame. Apr 12 17:13:08 No, it's not online yet. It will take a while, they have to edit it Apr 12 17:13:35 Speakers recorded their screens, so they will edit the screen into the live action Apr 12 17:13:41 which should be cool Apr 12 17:13:57 besides, I can't wait to see all of the talks, I only saw 2 ! Apr 12 17:13:57 Im sure it went absolutely fine then :-) what you are experiencing is, im sure, similar to what it feels like after an exam Apr 12 17:14:08 No matter how well you actually did, until you get the results you feel it went crap :P Apr 12 17:14:13 oh no... I wish :D Apr 12 17:14:50 I know that I walked too much, pointed at the screen too much (once is too much), screwed up the sound because the mic kept falling... Apr 12 17:15:20 Acted weird with the audience... ("Ok, it's over. Can I go now?") Apr 12 17:15:36 funny when you're live, but I'll look like an ass on video Apr 12 17:15:41 Nerves haha Apr 12 17:15:46 Itll be fine honestly :P Apr 12 17:15:50 thanks man :) Apr 12 17:16:24 You have to understand, things went REALLY BAD before the talk. I thought I would have to pull out. Apr 12 17:16:31 MikeWallaceDev: At least it wasn't this bad: https://youtu.be/N0fINE8jfA8?t=8 Apr 12 17:16:35 I couldn't access my slides! Apr 12 17:17:09 Oh oops. Apr 12 17:17:34 no slides, no text, no AS... it was bad Apr 12 17:17:57 As a lecturer at Uni told me (where the systems get going wrong.) "You cant trust anyone round here to do anything right, so always have a back up, and when that ultimately fails, have a back up of your back up that doesnt touch anything they have touched". Apr 12 17:18:02 Oh crikey! Apr 12 17:18:20 That is unfortunate! But hey-ho, you got to do it right? Learning experience if nothing else :-) Apr 12 17:19:25 exactly, that's why I'm saying that I'm happy with the talk itself : I actually got it out! So that's good. Apr 12 17:20:26 let me put it this way, I give my talk a 60%. Which is GREAT because I thought it would be a 0% But who wants to watch a 60% talk? Apr 12 17:20:40 So it's a pass, I'm happy. Apr 12 17:20:46 Does that make sense? Apr 12 17:21:33 You think it could have gone better, and wish that you could turn things back and do them a little differently? Thats you though, Im sure lots fo people will enjoy it. Plus, the way I look at it, a 60% talk about something I know 0% about is better than a 0% talk I know 0% about :-) Apr 12 17:23:10 :) Apr 12 17:30:13 Yeah, it's an achievement. A lot of people will never give such a talk. Apr 12 17:31:23 Because they're too scared, because they're not knowledgeable enough about anything, etc. Apr 12 17:36:13 I slept with a crooked neck. It's a pain in the neck. Apr 12 17:36:44 groan Apr 12 17:38:35 Indeed. We're both groaning. :D Apr 12 17:50:24 I'm creating a wizard-like ViewPager setup. Right now, for simplicity, I want to have two buttons at the bottom of the screen. Depending on where the user is in the wizard, the action these buttons may vary (i.e. it may be 'Next' or 'Done' for instance, depending on whether or not the user is on the last slide) Apr 12 17:50:57 What's the cleanest way to do that: just having the two buttons and switching their label and respond accordingly depending on current state? Apr 12 17:51:28 AndreasL maybe have a look at https://github.com/romannurik/Android-WizardPager Apr 12 17:51:39 AndreasL: or this ^ Apr 12 17:51:44 memorion, yeah, I came across that one. It's not flexible enough for my purposes, I'm afraid Apr 12 18:05:35 you could just use a viewflipper Apr 12 18:06:05 Hi everyone. I have a question.. I have an activity with few fragments. Each of the fragments has form fields. I need the data from each field of each fragment to populate some Preview fragment. I could pass entered data from each fragment to an activity and then later populate Preview fragment from that activity. Now question. How do I send data from fragment to activity when I swipe to next fragment? Or what would be something better way to do some Apr 12 18:06:17 the buttons can all be declared on xml, and the buttons would flip with each page as well Apr 12 18:21:18 JuliaS, http://developer.android.com/training/basics/fragments/communicating.html Apr 12 18:23:36 MikeWallaceDev, I have implemented that and able to send data on button click event but I'm trying to figure out the way to do send it automatically on swipe action.. Any ideas? Apr 12 18:36:46 Could anyone recommend a good basic tutorial for starting with testing using android studio? I have found many online, but they all seem to be either outdated, or talking about eclipse specific things, Apr 12 18:36:51 I'm just having a bit of trouble following along when what I see on my screen does not match what is in that tutorial Apr 12 18:37:42 zzxx: What kind of testing? Apr 12 18:37:58 Hi guys! I have a ListView with attached ArrayAdapter. Unrelaying ArrayList elements might be rearranged from time to time. When it happen I call notifyDataSetChanged(). Everything works great but I need elements not just be reloaded but animated. Is there any simple way to achieve that? Apr 12 18:38:33 Or is there a way to move ListView items up and down at all? Apr 12 18:38:36 TacticalJoke: I am starting with unit testing. but that is only because it is what I have read about so far. I'm open to all resource to learn more Apr 12 18:38:48 resources* Apr 12 18:39:16 zzxx: Any JUnit/TestNG tutorial will be good. Apr 12 18:39:22 If you're talking about JVM unit testing. Apr 12 18:40:12 Well I think because I use the android SQLiteOpenHelper, that is the android api so i need to use an android testing framework? Apr 12 18:46:54 should you ever override onDestroy or onStop after honeycomb? Apr 12 18:47:03 zzxx: I'm not sure how many good tutorials there are. Testing on Android has never been amazingly documented. Apr 12 18:47:24 AlexBerdnikov: I don't believe ListView supports such animations. You might need to use RecyclerView for that Apr 12 18:47:34 Pwnies: It depends on what you're doing. Apr 12 18:47:44 hi, can anyone help me out with extending baseadapter Apr 12 18:48:20 TacticalJoke, thanks Apr 12 18:48:28 what've you done that prompted you to override them? Apr 12 18:48:48 i can't really see anything other than config changes maybe Apr 12 18:48:51 TacticalJoke: fair enough. Yeah, I sure have not been able to find them. I am starting to get the feeing it would be better to first learn testing separate from android, and then try to combine the two. Apr 12 18:48:55 TacticalJoke: Thanks Apr 12 18:49:03 do i need to enable usb debug mode on an android phone before it will show up in android device manager? Apr 12 18:49:16 nfk|laptop: Yes. Apr 12 18:49:25 zzxx: Yeah, definitely. It'd actually be pretty easy to start with writing JVM unit tests for Android code. Instrumentation tests are a bit more difficult to grok, IMO. Apr 12 18:49:28 thanks freeone3000, i'm looking at docs but they are all about emulator not running on the device Apr 12 18:50:47 Hi, can anyone help me with extending baseadapter. I am overriding the getView method and I am getting the following error: Apr 12 18:50:48 java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams Apr 12 18:50:48 nfk|laptop: it's the same, mostly Apr 12 18:51:05 except i'd love to see it on a real device and touch it Apr 12 18:51:06 I have tried for hours to solve it but I couldnt find any solution Apr 12 18:51:35 spjps2009__: Can you post your adapter class? Apr 12 18:51:46 and emulator is shit slow even when running an atom image on a business class laptop with vmx extension on linux and with kvm enabled Apr 12 18:52:31 nfk|laptop: hw accel probably isn't working Apr 12 18:52:48 TacticalJoke: http://pastebin.com/ajHJmhGJ Apr 12 18:53:03 nfk|laptop: can you see your device with adb? Apr 12 18:53:35 myke, i already see the application on the device's screen ;) Apr 12 18:53:41 myke, should be working Apr 12 18:53:58 can it even not work when i explicitly tell it to turn on? shouldn't it generate some warnings? Apr 12 18:56:24 well, TPB down Apr 12 18:57:29 spjps2009__: It's probably because you're returning the child (e.g., 'rowTextView') rather than the container (e.g., 'rowView'). Apr 12 18:57:41 The child's layout parameters are relative to its container, not relative to the ListView. Apr 12 18:59:07 Also, that is horribly inefficient. You're inflating a view every single time, ignoring the recycled view (the second parameter to the Adapter.getView override). Apr 12 18:59:21 TacticalJoke: Well yes that was an error but that still doesnt fix the problem. For some reason it works on lollipop but not on kitkat Apr 12 19:00:07 TacticalJoke: Yes I was planning on using the convertView Apr 12 19:01:38 spjps2009__: You changed the code to return 'rowView' (or equivalent) every single time and the problem is still happening? Apr 12 19:01:44 yeah Apr 12 19:02:37 If i'm shipping an app with an SQLite db, should I ship it with the database prepopulated? Apr 12 19:02:46 TacticalJoke: I am getting this error: java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams and it doesnt give any line numbers Apr 12 19:03:49 Can you post tthe new code? Apr 12 19:03:53 the*I Apr 12 19:05:22 TacticalJoke: Oh wait now its working Apr 12 19:05:36 TacticalJoke: Thank You very much Apr 12 19:06:43 easy problem spjps2009__ Apr 12 19:07:39 Odaym: yes I know. Sorry about that Apr 12 19:07:57 sorry for what Apr 12 19:08:08 <-- veteran at fucking up listview adapters Apr 12 19:09:08 Odaym: What do you know about RecyclerView adapters? Apr 12 19:09:16 that they are the same Apr 12 19:09:30 but the viewholder is a must Apr 12 19:09:31 Mine is never calling onBindViewHolder Apr 12 19:09:40 getCount is not 0 Apr 12 19:09:40 Hi guys.. Does anyone know how to perform smth on fragment swipe action? I'm passing data to an activity with on button click event now.. Need a way of doing it automatically when navigating to the next fragment.. Thanks.. Apr 12 19:09:50 Pwnies, if you ship an empty database it'll stay empty in your apps resources. You can't modify it, so if you ship with prepopulated you extract the resource to your apps db path and use Apr 12 19:09:51 I've tried setting the size to 500dp and match_parent. Apr 12 19:09:54 I think spjps2009__'s problem was actually pretty complex. AdapterViews and LayoutParams are complicated. Apr 12 19:09:58 and setHasFixedSize(true) has been called. Apr 12 19:10:27 JuliaS, use the fragment lifecycle to update whatever whenever however Apr 12 19:10:36 sorry Apr 12 19:10:55 what is the problem Anthaas? what is not happening because onbind not called? Apr 12 19:10:58 list doesnt appear? Apr 12 19:11:22 List appears but all the list items contain placeholder text Apr 12 19:11:33 placeholder text? Apr 12 19:11:39 onBindViewHolder is where I'm using position to set the text of the items from my array. Apr 12 19:11:44 true Apr 12 19:11:57 yeah, in the nav_item.xml, I set the text to hold "Lorem Ipsum" Apr 12 19:12:02 where else would the placeholder text come if not from what you gave the adapter as a dataset? Apr 12 19:13:35 Odaym: The xml file defining the view for the row of the list Apr 12 19:13:56 yes or that, but I dont understand what's the problem? Apr 12 19:14:03 data is appearing Apr 12 19:14:18 onBindViewHolder is where you update the content of each row? Apr 12 19:14:24 yes Apr 12 19:14:30 The rows are never updating because onBindViewHolder is never getting called. Apr 12 19:14:32 its where you used to do after the convertView == null check in baseadapter Apr 12 19:14:45 after that block of if/else, you used to start putting things inside the views of the list item Apr 12 19:14:57 Is there a Y-Cable for OTG that will charge my One M8 while using host mode? Apr 12 19:14:58 never updating when you do what? Apr 12 19:15:04 Yes. Exactly. Apr 12 19:15:06 at first run they will all appear, then what? Apr 12 19:15:36 LewsTherin: afaik, you typically have to use an alternate method of charging, if available Apr 12 19:15:38 At first run, onCreateViewHolder is run, which is where each item is placed into the RecyclerView, so I have nav items, nav separators, and a nav header. Apr 12 19:15:41 if it has something to do with updating, the dataset must be updated and then adapter.notifyDataSetChanged called Apr 12 19:15:46 e.g. wireless, or those little docking pins on some devices Apr 12 19:16:08 onBindViewHolder is where you set what content each nav item holds. So, for example, I might want the first one to say Home, the second to say Search, etc. Apr 12 19:16:14 JesusFreke, can't use wireless, the HTC One M8 is sealed Apr 12 19:16:18 great, you have Position for that Apr 12 19:16:18 Well, all of mine contain Lorem Ipsum Apr 12 19:16:23 Yes Apr 12 19:16:27 But the methods isnt ever called Apr 12 19:16:32 So nothing ever happens. Apr 12 19:16:32 but you defined lorem ipsum in the xml man Apr 12 19:16:41 ALL the rows will have that xml layout defined, with Lorem Ipsum as text Apr 12 19:16:51 Yes, but onBindViewHolder should overwrite that with a call to setText on the text view. Apr 12 19:16:52 LewsTherin: "if available" ;) Apr 12 19:16:55 Right Apr 12 19:17:00 I don't know anything about that device specifically Apr 12 19:17:03 hmm Apr 12 19:17:04 just giving general advice Apr 12 19:17:16 Yes, I understand that, thanks. Apr 12 19:17:18 so why do you want it to have that text in the beginning if you're going to override it? Apr 12 19:17:30 But the method is never called, so setText is never changed Apr 12 19:17:39 Was for the sake of creating the layout. Apr 12 19:17:44 I can remove that, that isn't a problem. Apr 12 19:17:53 did you put a log and see that it is never called or you saying that cause youre not getting the output you expect? Apr 12 19:18:03 But its irrelevant because onBindViewHolder is never called, so setText is never called. Apr 12 19:18:04 because it's impossible that it is never called Apr 12 19:18:05 I used breakpoints Apr 12 19:18:20 Its not, apparently in a scrollview you have to do a certain thing to ensure it is called Apr 12 19:18:24 something to do with onMeasure. Apr 12 19:18:34 but that's insane Apr 12 19:18:40 it WAS called, you have the items Apr 12 19:18:45 whatitis, thank you! So I can do it in onPause(), right? Apr 12 19:18:48 something else is wrong Apr 12 19:18:49 But that isnt the problem, because the viewgroup it is in has a fixed size (which scroll view doesnt) Apr 12 19:19:12 I do know that hasFixedSize is necessary to be called, so yea it might be something with the fixedsize Apr 12 19:19:24 maybe it isnt called because by the way you ran, those views were out of screen Apr 12 19:19:26 so not handled Apr 12 19:19:28 JesusFreke, also, are USB hubs known to work with androids? Apr 12 19:19:44 by the time you ran* Apr 12 19:20:09 LewsTherin: yes Apr 12 19:20:16 dont know. Apr 12 19:20:16 ok Apr 12 19:20:21 should be very easy Apr 12 19:20:24 LewsTherin: a powered usb hub is a great way to not drain the battery :) Apr 12 19:20:26 Guess my phone just isn't putting out enough powerthen. Apr 12 19:20:28 Odaym: http://pastebin.com/6zFjkgYr Apr 12 19:20:29 yep (ツ) Apr 12 19:20:35 That is my onBind methods Apr 12 19:21:08 thats how you determine who gets what as a title? Apr 12 19:21:18 Yeah - they will be static Apr 12 19:21:21 They will never change. Apr 12 19:21:38 mTitles is an int[] holding R.string ids Apr 12 19:21:48 what is that scrollview you mentioned, isnt this just a list? Apr 12 19:21:57 There is no scroll view Apr 12 19:22:08 Sorry, I was using that as an example to why onBindViewHolder might not get called. Apr 12 19:22:50 ah, ok Apr 12 19:22:52 you have to set the else Apr 12 19:23:11 Uhh, why? Apr 12 19:23:13 Anthaas: FWIW, it's often easier to debug with Log.d than with breakpoints. Apr 12 19:23:25 because recycler view :) Apr 12 19:23:34 try Apr 12 19:23:38 Thats....odd? Apr 12 19:23:43 no it isn Apr 12 19:23:45 isn't* Apr 12 19:24:23 Forcing an else to an if is odd. Apr 12 19:24:27 Surely its implicit? Apr 12 19:24:44 if I dont define something for an else block, then I dont want anything to happen in the case that the if statement isnt true. Apr 12 19:24:46 implicit how? where is the decision of the else gonna come from? fallback on your XML? Apr 12 19:25:10 cause I had this problem yesterday Apr 12 19:25:30 Ok, in the case that the holderId != TYPE_ITEM, and I only have TYPE_ITEM in there, what would I put in the else? Apr 12 19:25:44 separators are just views, with nothing in them, just a line. What am I going to do in that case? Apr 12 19:25:46 how you'd want the item to look like if that condition isn't met Apr 12 19:26:01 There are only TYPE_ITEM and TYPE_SEPARATOR in there. Apr 12 19:26:10 and separators are defined in xml Apr 12 19:27:30 I don't know the exact exact reason and I feel bad about it, but this is what I solved yesterday and it makes perfect sense if the views I am dealing with are recycled, I cannot rely on one of them to stay looking the way it is at all times Apr 12 19:27:43 so I have to specify that "when you dont know what to do with an item, do this" Apr 12 19:27:53 try Apr 12 19:31:01 Odaym: Fixed it. It was a stupid error. Apr 12 19:31:10 It wasnt the else thing. Apr 12 19:31:16 yes it was! Apr 12 19:31:16 damn it.. Apr 12 19:31:20 I hadn't updated holderId when I created the ViewHolder Apr 12 19:31:21 what was it Apr 12 19:31:39 so I never did holderId = TYPE_ITEM Apr 12 19:31:43 ViewHolder has getItemViewType, you should just use that Apr 12 19:31:47 maybe what Im talking about just works in an a baseadapter, cause that was my issue yesterday Apr 12 19:31:54 RecyclerView sets it for you Apr 12 19:31:58 i dont know Apr 12 19:32:13 should talk less then! Apr 12 19:32:43 SimonVT: Oh I have implemented that, I dont know why I didnt use that. Apr 12 19:32:54 SimonVT: Thanks Apr 12 19:33:04 Odaym: Nah not at all, you helped me find it. Thanks. Apr 12 19:33:17 TacticalJoke: Thanks - I should probably start using that more, I just quite like breakpoints ;P Apr 12 19:33:41 is your list big enough to scroll and you tried scrolling? Apr 12 19:33:47 Not yet. Apr 12 19:33:50 try Apr 12 19:33:52 Only contains 8 items Apr 12 19:33:54 Not big enough Apr 12 19:33:58 I will do soon :D Apr 12 19:34:02 you should Apr 12 19:34:59 Are you expecting something to break? Apr 12 19:35:19 God, it's freezing all of a sudden. Apr 12 19:35:24 I wish it'd just stay warm. Apr 12 19:35:33 I dont know Anthaas Apr 12 19:35:41 maybe Apr 12 19:35:46 lel Apr 12 19:36:13 Nothing's going to break Apr 12 19:36:25 TacticalJoke: Gives 20s next werek Apr 12 19:36:27 week* Apr 12 19:36:28 Odaym should just focus on understanding his own code Apr 12 19:36:45 amen Apr 12 19:37:02 you should see how I worked with BLE last year.. Apr 12 19:37:14 and g00s comes here and starts asking me questions haha Apr 12 19:37:17 haha Apr 12 19:40:11 Well, that's g00s Apr 12 19:40:24 wut Apr 12 19:40:36 Huh, why am I now getting "Software caused connection abort" when trying to list the files on the phone? This suddenly happens with two different phones, from two different computers, and only when looking at the "Playlists" directory on either phone (after which, trying to look at anything at all gives "Transport endpoint is not connected"). Apr 12 19:41:36 Oh, nice. If I use ?attr/listChoiceBackgroundIndicator then I get the click-highlight-animation thingamybob on Lollipop. Apr 12 19:42:52 So many people in this channel who I've never seen talk Apr 12 19:43:19 I used to visit a web forum (kinda reddit-ish) full of people who just lurked for years. And it was weird because it was very much a "just hang out here" forum. Apr 12 19:43:38 Then one day someone made a thread asking for lurkers to post, and we had 10s of new people just saying "Yep, I just read this stuff without posting". Apr 12 19:44:13 And it was scary. Apr 12 19:44:46 yea some people just dont talk much Apr 12 19:45:10 or forgot to turn off their znc Apr 12 19:45:24 shit, i forgot to clone/copy google myTracks before they closed source it and removed the sources Apr 12 19:46:55 really lame google, lame ! Apr 12 19:47:52 Ugh. I hate when I have to design my classes around Object rather than some interface/superclass for performance reasons. :[ Apr 12 19:48:06 lot of lurkers here Apr 12 19:48:08 (In cases where not using Object would mean many extra allocations.) Apr 12 19:48:22 g00s: looks like it's still there Apr 12 19:48:26 on the googlecode site Apr 12 19:48:36 https://code.google.com/p/mytracks/ Apr 12 19:48:51 https://code.google.com/p/mytracks/source/browse/#hg%2FMyTracks%2Fsrc%2Fcom%2Fgoogle%2Fandroid%2Fapps%2Fmytracks Apr 12 19:48:55 What bothers me with the Android documentation is that there are not in-line examples of how to use classes for the vast majority of classes. Often there's just a two-line description that doesn't tell me enough about the intent of the class. Compare this with, say, documentation for the C++ framework Qt which has comprehensive examples for almost all classes. Is there any particular reason for this? Apr 12 19:49:20 there are plenty of examples: stackoerflow has them all Apr 12 19:49:27 lasserix_, that's my point Apr 12 19:49:30 AndreasL: Yeah, I wish we had that. MSDN was also (like Qt) good for examples Apr 12 19:49:38 SO is very hit-and-miss. Apr 12 19:49:42 indeed Apr 12 19:49:48 I've seen +100 answers with a checkmark that are totally wrong. Apr 12 19:49:51 and often the examples have inferior code quality Apr 12 19:49:55 yes, exactly Apr 12 19:50:12 so you dont only want the answer, you want the answer with the highest code quality Apr 12 19:50:13 lol Apr 12 19:50:27 Odaym, no, I want a correct, succint example that displays idiomatic usage Apr 12 19:50:37 Odaym: I think he wants an answer not written by a n00b. Apr 12 19:50:55 where is this ideal situation, you cannot ask for that anywhere unless you do it Apr 12 19:50:58 g00s: besides, even if the source had been removed: https://code.google.com/p/mytracks/source/clones :) Apr 12 19:51:08 you can start a website: idiomaticandroid.com Apr 12 19:51:11 Odaym, why not? Look at the Qt documentation, as I mentioned Apr 12 19:51:19 where is Qt now Apr 12 19:51:22 Android > * Apr 12 19:51:29 lol, no Apr 12 19:51:29 AndreasL, "because google didn't bother" is your answer I suppose Apr 12 19:51:35 dragorn, exactly Apr 12 19:51:42 and my question is why on earth have they not Apr 12 19:51:51 lasserix_: A site like that might be nice. But who has the time. :[ Apr 12 19:51:51 man, if someone understands it and became very good at it it means they have good documentation and information Apr 12 19:51:59 cause where else is he going to get that knowledge Apr 12 19:52:08 Odaym, I don't see what point you are trying to make Apr 12 19:52:20 AndreasL, they're slowly clueing up; there's a lot more examples now than there used to be, and less black magic in google apps that they don't explain/expose (f'ing nav drawers for a year+ for example) Apr 12 19:52:21 Or it might mean that they spent years wrestling with the poor documentation. Apr 12 19:52:22 JesusFreke thanks Apr 12 19:52:31 that if someone else is not complaining and they are doing exceptionally well at it, it means that he used what you're trying to use to get there Apr 12 19:52:33 dragorn, ok, that's good to hear Apr 12 19:52:39 he didn't think of them overnight or something, he read docs like you Apr 12 19:53:05 Odaym, but he might have used much more time than necessary wrestling with documentation, as TacticalJoke said Apr 12 19:53:08 AndreasL, that said, the best resources tend to be stuff like the u2020 app from jakewharton, which showcases how he does stuff at square. Other groups have done similar. It's not as good as being in the app itself, but, there's some good stuff out there Apr 12 19:53:19 what's necessary? Apr 12 19:53:31 is there something like 5 minutes should be enough for you to understand everything about listview? Apr 12 19:53:49 Odaym, you clearly have not worked with technology that has stellar documentation Apr 12 19:54:09 dragorn, thanks, that's useful! Apr 12 19:54:13 I tried iOS development and I saw it was very good, yea Apr 12 19:54:30 their docs* Apr 12 19:54:37 I've never worked with iOS, so I can't compare, I'm afraid Apr 12 19:55:09 I've just noticed that often I look up a class in the Android documentation and I am immediately left with a dozen unanswered questions about basic usage of the class Apr 12 19:55:21 well Im biased, Im sort of forcing myself to blame myself first with these things. cause most of the time it's only my fault Apr 12 19:55:29 the javadoc is very poor in many places Apr 12 19:55:32 so to me, docs are way too good and I am lagging behind Apr 12 19:55:55 Odaym: You have very low standards for good documentation. :p Apr 12 19:56:04 Odaym, haha, yeah, I have to agree with TacticalJoke Apr 12 19:56:06 i often wonder if that because - its javadoc, being embedded in the sources - so to change it you have to change the sources Apr 12 19:56:41 Yeah, I've never liked the presence of external documentation in source code. That entails so many issues. Apr 12 19:56:47 javadoc seems nice for small / medium things - but for documenting an entire OS, terrible Apr 12 19:56:53 Then again, the alternative isn't amazing either. Apr 12 19:56:56 g00s, I think embedding documentation sources is still the way to go. Again, using Qt as an example, they use a modified version of Doxygen to build their docs Apr 12 19:56:58 I just believe that I am not in a place to say those thngs Apr 12 19:57:19 AndreasL but then as soon as the docs become useful, your source code files are 20K lines long Apr 12 19:57:22 the nice thing about C++ headers for once, is that you can include an extra header with comprehensive documentation for a given class Apr 12 19:57:43 so you can have the brunt of documentation that doesn't pertain directly to how a method works in separate files Apr 12 19:58:15 g00s, that's a very good point Apr 12 19:58:30 AndreasL: yeah someone should make a an AS plugin to do that Apr 12 19:58:33 it would be nice for example, to be able to provide feedback on things in the javadoc, like mark a method as not having enough information Apr 12 19:58:42 i actually mentioned that at work my coworkers said it wa sa terrible idea Apr 12 19:58:56 lasserix_, sorry, what's AS? Apr 12 20:00:29 Android Studio. Apr 12 20:00:29 android studio Apr 12 20:00:40 android stupido Apr 12 20:00:44 haha Apr 12 20:00:56 its funny. Apr 12 20:01:48 Oh, heh. That's obvious in hindsight. Just never seen the acronym Apr 12 20:02:13 lasserix_, anyway, yeah, IDEs can easily be used to hide javadocs in source files Apr 12 20:02:21 could easily be used** Apr 12 20:02:49 its not hiding - its that maybe dianne H doesn't want jimbob editing the source files continaing the schedulers Apr 12 20:02:51 I think all we need is a site (preferably on d.a.c) with small examples of how to use (pretty much) every class. Apr 12 20:03:19 ah wait, you are referring to developer docs where all the methods/constructors of a class are mentioned Apr 12 20:03:31 Odaym, yes Apr 12 20:03:33 yes sometimes there is no example to show off what that class can do Apr 12 20:03:44 sort of big topics have "walk throughs" Apr 12 20:03:53 smalls one very little Apr 12 20:03:58 also there needs to be different kinds of documentation: what is possible, and what is good practice Apr 12 20:04:01 ok you're right Apr 12 20:04:14 I thought something else Apr 12 20:04:20 Yeah, there are some guides. Though I often find them way, way overcomplicated. Apr 12 20:04:33 That's another problem with Android documentation -- even where they put in the effort, the example is terrible. Apr 12 20:04:58 Yeah, I find myself ignoring much of the advice, unfortunately Apr 12 20:04:59 (Not always, but sometimes.) Apr 12 20:05:02 android seems to have suffered a lot of "grew that way" design problems Apr 12 20:05:09 like the telephony api Apr 12 20:05:16 they're only just now getting around to fixing that, in 5 Apr 12 20:05:55 there's still major discrepancies between the bluetooth, wifi, and telephony APIs, too, in calling and naming conventions, and even in being able to perform basic stuff like "what devices am I connected to" Apr 12 20:06:21 and when you look across all the apis, there are so many different flavors of callbacks, listeners, etc Apr 12 20:06:31 and then PlayServices has PendingResult Apr 12 20:06:33 lol Apr 12 20:07:33 yeah Apr 12 20:07:47 a lot is evolved rather than designed Apr 12 20:08:46 hallo Apr 12 20:08:49 anyone around? Apr 12 20:08:55 nope Apr 12 20:09:06 ProLoser: ask your question, don't ask if anyone is around :p Apr 12 20:09:06 On the plus side, it's nice that we have Android Studio now (especially now that it *finally* supports JVM unit testing), and Kotlin looks really cool. Apr 12 20:09:06 I'm trying to import an old project into android studio Apr 12 20:09:07 Totally not 400+ people her Apr 12 20:09:09 here* Apr 12 20:09:13 it's saying it can't find the gradle file Apr 12 20:09:14 hmm, yes, I guess a huge problem is the backward compability issues. I know that in order for Qt to get to the point where they are now, they've had multiple breaking releases that cleaned up stuff over the years (almost 20 years I think) Apr 12 20:09:19 I know that Kotlin isn't official -- just saying that it looks cool. :D Apr 12 20:09:21 https://github.com/jonasb/Veckify Apr 12 20:09:31 when tesla and google worked together on thheir wearable product for the car, one of the pieces of feedback Tesla gave Google was - the documentation needs improvement. so hopefully they change Apr 12 20:09:51 TacticalJoke, I know, it looks really great. Doesn't solve the API problems though.. Apr 12 20:10:03 it says the gradle location is wrong Apr 12 20:10:17 g00s, heh, let's hope so! Apr 12 20:10:23 TacticalJoke jvm unit testing == boo ! Apr 12 20:10:32 g00s, boo? Apr 12 20:10:32 heh Apr 12 20:10:43 test your crap on the device / emu Apr 12 20:10:45 It's not perfect, but the alternative has so many issues in some cases. Apr 12 20:10:57 g00s: IMO, JVM unit testing is great for testing just the logic. :) Apr 12 20:11:38 ok, i'm going to take a deep breath and put this nice picture here http://i.imgur.com/e99s9U1.jpg Apr 12 20:11:38 ProLoser, I've given up on AS importing old projects; I make a new empty one and then migrate all the code manually. Apr 12 20:12:22 ./r/waterporn (just images of water) is really nice, too. :D Apr 12 20:12:35 well, humans are what, 80% water? Apr 12 20:12:36 I love those subreddits. Apr 12 20:12:47 :D Apr 12 20:13:23 lol @ waterporn Apr 12 20:13:45 shittylifeprotips and shittyaskscience are my favs Apr 12 20:13:46 JesusFreke i thought it was 80% hot air :D Apr 12 20:13:50 It's a shame that reddit uses that naming scheme. It's hard to try to convince my parents to subscribe to /r/waterporn. Apr 12 20:13:55 how do you guys get git.exe on windows? Apr 12 20:14:01 the github app didn't add it (apparently?) Apr 12 20:14:05 do you just install msysgit? Apr 12 20:14:05 ProLoser: I get hg.exe. Apr 12 20:14:08 heh Apr 12 20:14:22 then copy hg.exe to git.exe Apr 12 20:14:28 TacticalJoke, looks like kotlin pulls an eiffel, and compiles to an intermediary java and then to bytecode w/ the standard compiler? Apr 12 20:14:29 ;o Apr 12 20:14:46 dragorn did you ever use eiffel ? Apr 12 20:14:48 dragorn: AFAIK it compiles straight to Java byte code. Apr 12 20:14:51 g00s, no Apr 12 20:14:55 TacticalJoke, interesting Apr 12 20:14:56 bytecode* Apr 12 20:15:00 lol, i dont know anybody that has :D Apr 12 20:15:05 g00s, not really. I looked at it, never cared enough to really get into it Apr 12 20:15:07 yeah. that. Apr 12 20:15:37 bertrand's OO book was pretty impressive though Apr 12 20:16:01 ProLoser: doesn't the github app install like a little mini unix-like environment, in which you can run git? Apr 12 20:16:09 or maybe I'm thinking of something else Apr 12 20:16:12 yeah Apr 12 20:16:16 nvm had to go digging through it Apr 12 20:16:44 Not sure whether that went through, but here is probably the best intro to Kotlin for an Android developer: https://docs.google.com/document/d/1ReS3ep-hjxWA8kZi0YqDbEhCqTt29hG8P44aA9W0DM8/edit?usp=sharing&hl=en-GB&forcehl=1&pli=1 Apr 12 20:18:59 AS is pretty awesome on windows: "there's a problem with the build system. Would you like us to just... go ahead and umm.. fix it for you?" Apr 12 20:19:01 sure buddy! Apr 12 20:24:25 I'm guessing that a lot of Android programmers will move to Kotlin when it hits 1.0, but it's difficult to predict. Apr 12 20:24:30 I'll probably wait till my app hits 1.0. :D Apr 12 20:25:19 also maybe depending on what google does or does not announce at I/O Apr 12 20:25:40 "Rewrote everything to Dart" Apr 12 20:25:46 "New runtime, new bugs" Apr 12 20:25:52 "Now you need to compile everything twice." Apr 12 20:26:04 "Also runs on microwaves." Apr 12 20:26:32 "and only compiles on tuesdays" Apr 12 20:26:39 TacticalJoke, I guess the nice thing about Kotlin is its complete interopability with Java, so you wouldn't have to make a major switch, rather you could do it gradually Apr 12 20:26:44 Exactly. Apr 12 20:26:50 lol, wtf is kotlin guise? Apr 12 20:27:06 AndreasL, also the 2MB standard library Apr 12 20:27:12 not the Scala "I will go over 65k methods" behemoth Apr 12 20:27:34 Mavrik, heh, that's a good point! Apr 12 20:27:42 holy shit, i was just reading that adding multiDex can cause up to 4 second pause on startup for devices below lollipop Apr 12 20:27:54 and builds regularly take 2 minutes Apr 12 20:28:16 According to JW's document, it's 835KB without ProGuard. Apr 12 20:28:16 so still, the 65k limit is kinda there - because dealing with that would drive me nuts Apr 12 20:28:50 g00s, yeah, I wouldn't ship multidex unless forced Apr 12 20:29:00 Mavrik: Where did you get 2MB from? Apr 12 20:29:05 since Play Services are split it's harded to hit that Apr 12 20:29:19 TacticalJoke, my memory, I saw somewhere 1.8MB so *shrug* Apr 12 20:29:41 Facts are better than fiction: https://docs.google.com/document/d/1ReS3ep-hjxWA8kZi0YqDbEhCqTt29hG8P44aA9W0DM8/ Apr 12 20:32:22 OK, here's an example of why I am not content with Android documentation: http://developer.android.com/reference/android/support/v4/view/ViewPager.html#setCurrentItem(int, boolean) <- It does not say what happens if the item number is greater than getChildCount(). I'm just writing a simple nextPage() method. Is this checked or do I have to check myself? Apr 12 20:33:23 AndreasL, why aren't you checking the source? Apr 12 20:33:52 Mavrik, that should really not be necessary for such trivial matters :-/ Apr 12 20:33:54 he's arguing that he shouldn't have to Apr 12 20:34:11 well life sucks Apr 12 20:34:13 Inclined to agree though Apr 12 20:34:20 Android docs suck a bit more Apr 12 20:34:30 AndreasL: Yeah, I find myself checking the source so much. When answering some questions in here, half the time I don't even check the documentation before replying -- I just check the source. Apr 12 20:34:33 But whining doesn't make great apps, actually writing software does. Apr 12 20:34:39 TacticalJoke: That screenshot is incoming btw Apr 12 20:35:18 Mavrik, I just ran into an example of our previous discussion, so I wanted to add to it. There's no need for insults Apr 12 20:35:44 What insults? Apr 12 20:36:48 Mavrik, "But whining doesn't make great apps, actually writing software does." Apr 12 20:36:52 having just started using play services - there is no code to check when the docs suck Apr 12 20:37:02 g00s, yeah, that DOES suck :) Apr 12 20:37:11 AndreasL, ? O.o Apr 12 20:37:26 Mavrik, reducing my contribution to 'whining' isn't particularly ... kind ;-) Apr 12 20:37:29 g00s, especially since GPS seems to be by far the most buggy lib of the Google stack Apr 12 20:38:13 AndreasL, well there's someone saying something like that here probably several times a day and it doesn't really add to a discussion or help find a problem solution Apr 12 20:38:26 Mavrik, right. Sorry, I don't hang around here every day Apr 12 20:38:26 seeing that repeatedly is just... annoyhing a bit Apr 12 20:38:29 :) Apr 12 20:38:58 AndreasL, so I'm afraid having android-src attached in AS is rather important and probably will stay that way :/ Apr 12 20:40:05 Anyone know how to fix a slightly scratched/mussed up camera on an android? Apr 12 20:40:15 Want to try the toothpaste trick, but don't know if it will make it worse. Apr 12 20:40:33 Doesnt that only work for screens? Apr 12 20:40:38 No idea. Apr 12 20:41:20 The plastic isn't scratched, just looks rubbed up against. Apr 12 20:41:22 Mavrik, time to attach it then. I've recently started Android development and I'm finding myself becoming frustrated over a few things (particularly documentation) and wanted to see if other developers had the same feeling. Seems to be a common sentiment among developers. Sorry for inadvertently repeating a discussion that seems to crop up here often! Apr 12 20:41:24 Criticism of the documentation is often a good thing. It helps us to verify that we're not crazy and it can lead to positive change. I agree that it can go too far, but I don't really see that in here. Apr 12 20:41:41 Also, it's possible to both criticise the SDK *and* release apps. In fact, I feel it's somewhat necessary. Apr 12 20:42:32 OK, I would like to complain about the games in the implementation details of dm-verity. Apr 12 20:42:37 errr Apr 12 20:42:38 Actually Apr 12 20:42:40 gaps not games Apr 12 20:42:49 Here is one thing I ***HATE*** about Google Play Apr 12 20:43:04 Why have a "Games" section and an "Apps" section when you are going to publish Games in the Apps section. Apr 12 20:43:23 AndreasL: Yes, it can be hugely frustrating. I've found that it gets less frustrating in time, though. Apr 12 20:44:14 AndreasL: Especially if you were spoiled before with a nice framework such as Qt. :D Apr 12 20:44:16 Or .NET. Apr 12 20:44:37 Where 'nice' talks about everything from documentation to implementation. Apr 12 20:45:14 TacticalJoke, somewhat off-topic: Have you ever tried QML for desktop interface development? I swear, it's a complete and utter dream to work with compared to Android development! Apr 12 20:45:19 somewhat on-topic** Apr 12 20:45:31 hmm, borderline on/off-topic Apr 12 20:45:32 I came from the .NET world. It was tough at first; I'd liken it to moving from a palace into a small apartment in a rough area. Apr 12 20:45:41 But you become street-wise and tough. Apr 12 20:45:47 Anyone here know anything about dm-verity? Apr 12 20:45:48 TacticalJoke, haha, that's an interesting analogy Apr 12 20:46:01 Yeah, I used Qt many years ago. I think I was using QML back then. Apr 12 20:46:37 TacticalJoke: what's really hilarious is if you're trying to help someone decide whether to port their app to bb10 or just use the bbry android runtime... and it's obviously easier to just repackage the apk, but bbry's docs are so much awesomer for their native APIs. :P Apr 12 20:47:07 :D Apr 12 20:47:08 TacticalJoke, you should see what it has involved into. It's amazing Apr 12 20:47:17 it eventually becomes a question of "almost zero effort vs having fun reimplementing on a sane platform that doesn't hate you" Apr 12 20:47:26 AndreasL: Yeah, it looks neat. (Checking the Wikipedia page.) Apr 12 20:47:33 I love that lightweight markup. Way nicer than XML. Apr 12 20:47:46 (every platform has quirks, but android is not exactly friendly if you're doing something non-trivial...) Apr 12 20:47:52 TacticalJoke, yes, and you can do ALL your interface logic in QML. So you get a completely clean separation between underlying logic and UI Apr 12 20:48:25 AndreasL: btw, qml is why bbry is so much nicer to dev for than android ;) Apr 12 20:48:35 lewellyn, that makes a lot of sense ;-) Apr 12 20:48:39 AndreasL: Have you seen Anko? It'll work with Kotlin: https://github.com/JetBrains/anko Apr 12 20:48:51 Not sure how it compares to QML, though. Apr 12 20:49:13 AndreasL: Ah, that's nice. Apr 12 20:49:22 they don't use qtquick, but rather their own qml libs (because of good technical reasons). but as your UI and logic are separated, that's not really a huge problem. Apr 12 20:50:00 and that's where qml is great. i just wish qt on android wasn't such a bother. Apr 12 20:50:34 TacticalJoke, looks interesting. Similar to QML, in a way I guess. What's cool about QML is two-way property bindings though, so it's all declarative. You set up how things are related rather than what order interactions occur. Then there are event handlers when you need things to happen in a certain order Apr 12 20:51:05 silcion valley is on tonight! Apr 12 20:51:16 Yeah, that stuff is very neat. I'm not sure whether Anko will support anything similar. Apr 12 20:51:33 lewellyn, yeah, I wonder how far they can get with QML for Android. I guess right now it only makes sense for enterprise apps that don't care much about adhering to all platform looks, feel and functionality (although there is a lot of ongoing work on this for QML) Apr 12 20:53:47 I think I used Qt in the days when everyone had their own C++ String class. Ahh, that was fun. Apr 12 20:53:48 AndreasL: there's also the whole "you probably need to deliver it captive" too. and the smallest you're really going to have for footprint creep is 30 megs. 60-80 is far more likely. Apr 12 20:54:29 you're not going to make a non-trivial app with just QtCore and QtQuick. Apr 12 20:55:35 lewellyn, that's true Apr 12 20:58:30 AndreasL: it's great for delivering via MDM/MAM, i agree. but "why is this reddit client 125 megabytes? SKIP" is the reality of the play store. :( Apr 12 20:58:37 what is good network for advertising and good with google rules ? Apr 12 21:00:33 Dunno Apr 12 21:00:40 I dont like ad networks Apr 12 21:00:49 :D Apr 12 21:01:07 so how we can earn some money ? :) Apr 12 21:01:18 Make a good app that people are going to want to pay for Apr 12 21:01:23 Or get a big enough user base Apr 12 21:01:32 happy easter Apr 12 21:01:40 Id rather make 0 money and have people use it then get people use it and make pennies. Apr 12 21:01:45 than Apr 12 21:01:56 and then have people leave because they hate ads Apr 12 21:02:14 Anthaas, just like my first. app. 250k users iirc Apr 12 21:02:24 Nice Apr 12 21:02:31 well, 250k installs Apr 12 21:02:33 not users Apr 12 21:02:44 if no ads and users there use my program then how i can get money after that ? Apr 12 21:02:47 sorry for my q Apr 12 21:02:49 :) Apr 12 21:02:59 Sell it, have in app purchases Apr 12 21:03:03 Ad networks are crap Apr 12 21:03:22 Your own ad platform however... Apr 12 21:03:57 i am from egypt so google not open yet to sell my app to users :) Apr 12 21:04:18 this option i not have in my console Apr 12 21:04:29 i dont think ads work well anyhow unless you have huge # of installs Apr 12 21:04:36 ^ exactly Apr 12 21:04:38 at least 100K maybe ? Apr 12 21:04:54 well Apr 12 21:05:02 a huge # of impressions Apr 12 21:05:11 or clicks Apr 12 21:05:14 but as you said Apr 12 21:05:22 The number you need to make it worth it is stupid Apr 12 21:05:22 when i had ~ 150k installs some company offered me to add their ads to the ap for $300/month Apr 12 21:05:24 but i declined Apr 12 21:05:54 Alright. Time to stream some pixelart! (eta 5 minutes) Come say hi C: http://twitch.tv/smoke_th Apr 12 21:06:04 i said: there will be no ads in the description, from day 1 Apr 12 21:06:05 what was the app sculptor? Apr 12 21:06:11 it's a secret Apr 12 21:06:28 Sculptor: how this company know about your app ? Apr 12 21:06:28 g00s: Anthaas well guys, but free apps have like 100 x more installs.. so ads make sense Apr 12 21:06:40 does anyone here know how to work with RequestFutures in android? Apr 12 21:06:45 err in volley* lol Apr 12 21:06:49 ShadyNagy, from google i suppose, and other services Apr 12 21:07:15 Pwnies: why requestfutures? volley gives you a callback no? Apr 12 21:07:20 icedp: but thats a general statement. the total number of paid installs compared to the total number of free installs. Facebook is free and will have a stupid number of installs etc. it is hardly a fair or representative comparison. Apr 12 21:07:41 volley gives a callback on the mainthread, but i need it on an intent service :( Apr 12 21:07:48 Sculptor, you did not offer your app somewhere or something like that ? Apr 12 21:07:57 nah Apr 12 21:08:04 0 advertizing Apr 12 21:08:23 i can find company's name if you are interesting Apr 12 21:08:28 interested Apr 12 21:08:36 Sculptor, that good news from you thank you ;) Apr 12 21:08:38 I personally uninstall apps that have adverts Apr 12 21:08:57 In the usual ad network sense, not the style that twitter has. Apr 12 21:09:12 @lasserix_ same problem i was having yesterday, but i just realized the threading problem this morning Apr 12 21:09:31 Anthaas: of course the statement that paying money stops you from pressing the button is a representative comparison. I do argue that ads is a valid strategy in /some/ cases Apr 12 21:09:33 you should use retrofit and make your life easier Apr 12 21:09:46 ugggggh. but i'm already in deep though Apr 12 21:09:59 aaccccckkkkk Apr 12 21:10:07 technical debt knows no bounds Apr 12 21:10:13 icedp: So many people seem to be interested in hammering out substandard apps swarmed with ads in the hope of becoming the next app tycoon. Apr 12 21:10:15 good way of putting it Apr 12 21:10:43 Could someone tell me whether this issue can be solved: http://stackoverflow.com/questions/18397342/deserializing-generic-types-with-gson This SO question has an 'answer' that doesn't give a solution. Apr 12 21:11:04 ShadyNagy, lol. i just logged in to the dev email account, after some time Apr 12 21:11:07 tons of emails Apr 12 21:11:11 guys offering stuff Apr 12 21:11:18 well. alright, let's say i use retrofit. how would you get the response back from the api? i have 0 xp with retrofit Apr 12 21:11:41 Sculptor: can we talk private ? Apr 12 21:12:21 Anthaas: in case app has ads I think it should have the option to remove them for some fee. so let users choose. hard to blame developers of desire to make money :) Apr 12 21:12:54 lol: What if you get 1000+ honest and meaningful reviews on your app - Apr 12 21:13:26 Anthaas: this also good idea you said Apr 12 21:15:50 Anthaas: i will think on that how to do in good way ;) Apr 12 21:16:09 What? Apr 12 21:16:21 if you do not want ads then pay xx cents :D Apr 12 21:16:33 that very good idea Apr 12 21:16:35 That wasnt my idea. Apr 12 21:16:37 And no its not. Apr 12 21:16:42 I hate ads Apr 12 21:16:47 Dont have ads Apr 12 21:16:50 I consider that to be a better idea Apr 12 21:17:06 i like it :D Apr 12 21:17:13 You will have to have a VERY good app to make people willing to pay to get rid of the ads rather than to just uninstall Apr 12 21:18:07 yes ;) Apr 12 21:18:29 There are very few apps out there I would consider to be that good. Apr 12 21:18:30 ShadyNagy, found it. it was nster.com Apr 12 21:18:42 they offered $200/month ,not $300 Apr 12 21:20:01 it is good also :D Apr 12 21:20:02 anyone know where I can get some ?s answered on verity? Apr 12 21:20:16 : it is good also Apr 12 21:20:19 dm-verity, aka secure boot. Apr 12 21:22:51 FrankRizzo890, I know of no-one doing it non-professionally (ie, w/out the help of the ODM). https://source.android.com/devices/tech/security/verifiedboot/index.html and http://nelenkov.blogspot.com/2014/05/using-kitkat-verified-boot.html may be interesting however. Apr 12 21:24:15 dragorn: I'm trying to follow the instructions in the developer docs, and there are QUITE a few holes. Apr 12 21:24:43 (from step 2 to 3, they ASSUME a lot. There needs to be a step 2.5) Apr 12 21:24:59 FrankRizzo890, yeah I dunno why they bothered; it's got to be built into the scripts the ODM provides with BSP for anything real Apr 12 21:26:08 true, but I'm making my OWN ROM for a customer project. So, I'll write the scripts, and everything else. Apr 12 21:26:17 just trying to find the right place to ask these questions. Apr 12 21:30:26 I'm to the point of trying to concatenate all the blobs, and want to make sure I'm doing it correctly. Apr 12 21:31:22 how am i supposed to use git with android studio? Apr 12 21:32:44 i have never used a gui for a VCS and i can't seem to find git add -A among git commands in studio and i can't even commit gradle directory as whole Apr 12 21:33:00 i can of course just do it from CLI but i'm wondering if i'm not doing something wrong Apr 12 21:33:33 I use SourceTree, I've found all the other graphical tools (including IDEA's) confusing, especially their diff before commit view Apr 12 21:36:28 nfk|laptop: you don't have to use it for git. or may use it just for highlighting changed files Apr 12 21:40:32 so it's prim and proper to do git add -A? Apr 12 21:43:44 if you want to add all sure Apr 12 21:44:26 nfk|laptop: yes sure you want to execute any git command in console you want to and get back to using AS integration if you like to Apr 12 21:45:53 i see Apr 12 21:46:06 i imported my AS project from mac to windows and now it's saying R is undefined Apr 12 21:46:08 how do i fix this? Apr 12 21:46:15 google isn't conducive to one-letter searches Apr 12 21:46:17 not sure what's the point then but then again i'm just committing everything and not cherry picking changes Apr 12 21:46:39 ProLoser, "Exact error message" Apr 12 21:46:46 ProLoser, an error with R is related to a resource issue Apr 12 21:47:07 Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Users\Dean\AppData\Local\Android\sdk\build-tools\21.0.0\aapt.exe package -f --no-crunch -I C:\Users\Dean\AppData\Local\Android\sdk\platforms\android-21\android.jar -M C:\Users\Dean\Downloads\Wake-Me-Up-android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml - Apr 12 21:47:13 blah Apr 12 21:47:32 http://pastebin.com/jfq2XmGn Apr 12 21:48:37 also, i love kwin, it's so easy to fix annoying window management issues with it Apr 12 21:48:52 such as android studio not restoring window state when it's re-launched Apr 12 21:56:53 * icedp TIL of TextUtils.join Apr 12 22:00:11 why do you need to call setDropDownViewResource() on adapaters AND setAdapter on spinners? Apr 12 22:00:47 do adapters require dropdownviewresources? Apr 12 22:01:10 ProLoser, theres a difference between the view that is shown as dropdown and the view that is shown for the selected item when not clicked Apr 12 22:01:22 hmm Apr 12 22:01:38 i'm given a Pager of playlists (working with spotify lib) is it possible to convert a pager to an adapter Apr 12 22:01:50 it has a list property of the items Apr 12 22:02:29 setDropDownViewResource tells the adapter what a single item should look like Apr 12 22:02:48 do i have to make an xml resource just for that? Apr 12 22:02:50 setAdapter is telling the spinner to use the views the adapter is providing Apr 12 22:02:59 ProLoser: You don't need to use ArrayAdapter.setDropDownViewResource. Apr 12 22:03:04 You can have the same view for everything. Apr 12 22:03:12 ProLoser, yes. but you can also yuse the default one provided by android Apr 12 22:03:14 Or the same resource, I guess. Apr 12 22:03:24 android.R.layout.simple_spinner_dropdown_item Apr 12 22:03:38 yeah Apr 12 22:04:06 blah Apr 12 22:04:12 i think i need to figure out how to make the adapter first Apr 12 22:04:25 if i have a list of objects, what's the best way to make it an adapter i can use for my spinner? Apr 12 22:04:27 dropdownviewresource is like the single view for a listview Apr 12 22:04:52 ProLoser, if its a difficult object, use BaseAdapter Apr 12 22:05:02 if its only a set of strings, an arrayadapter Apr 12 22:05:44 it is a list of objects and i watn to display a label but store another value Apr 12 22:05:51 Yeah, BaseAdapter is often quite simple. I was just looking at my spinner adapter: http://pastebin.com/M8Yw7fTR Apr 12 22:06:02 sup TacticalJoke Apr 12 22:06:02 You can break it down into pure simplicity. Apr 12 22:06:34 adapters are easy once you get the concept behind it ProLoser Apr 12 22:06:36 so i have to extend the baseadapter and use my own? Apr 12 22:06:37 Hey, drose379. Apr 12 22:06:41 How you doing? Apr 12 22:06:43 its basically always the same Apr 12 22:06:51 drose379: Not bad. You? Apr 12 22:07:43 ProLoser: Did you see that example? I think that's about all you need to do in many Spinner cases. Apr 12 22:08:39 Not bad thanks Tactical Apr 12 22:08:47 Hows the app coming? Im waiting for the apk! Apr 12 22:09:09 It's going well. :D Yeah, it's taking forever. Apr 12 22:09:20 How about yours? Apr 12 22:09:36 Not bad thanks, we talked about the forking feature right? Apr 12 22:10:42 brb Apr 12 22:11:45 still don't know why R is broken Apr 12 22:14:35 https://floobits.com/ProLoser/Sandbox/file/app/src/main/java/com/proloser/spotifypractice/MainActivity.java Apr 12 22:14:42 erm just realized this doesn't show the error lol Apr 12 22:15:52 my iml file got renamed when i imported it onto this computer Apr 12 22:16:53 ProLoser, If I remember right, AS automatically renames it to matches folder name Apr 12 22:17:09 if you move it to another computer and the folder doesnt has the same name -> boom Apr 12 22:17:15 happt gitignoring :) Apr 12 22:17:18 happy* Apr 12 22:17:25 i should ignore the file? Apr 12 22:17:38 is that why the project blew up? Apr 12 22:18:46 dunno Apr 12 22:19:09 i usually only check in source files. nothing IDE dependent. Apr 12 22:19:27 is the iml ide specific? Apr 12 22:19:31 i'm learning this stuff so i don't know Apr 12 22:19:35 but I know people who keep the whole structur including iml etc Apr 12 22:19:38 find out what iml file is Apr 12 22:19:45 iml is the project file of androidstudio Apr 12 22:19:56 module file Apr 12 22:23:52 what does your guys' gitignore look like? Apr 12 22:24:15 this is fucking enfuriating, i rename the folder and the entire project stops loading in AS Apr 12 22:28:29 ProLoser, thats what im using when imls should be kept Apr 12 22:28:29 http://pastebin.com/37cr1P5P Apr 12 22:31:35 you don't ignore the entire .idea folder? Apr 12 22:31:58 or any iml files? Apr 12 22:32:22 i said "when imls should be kept" :p Apr 12 22:32:39 i have no idea when they should or shouldn't Apr 12 22:32:44 does anyone know where i can look at some good open source projects? Apr 12 22:32:47 this is my first android app and for the most part i'm following tutorials Apr 12 22:33:01 so far it's been a ridiculously frustrating experience Apr 12 22:33:12 so much tooling Apr 12 22:33:13 ProLoser, if you have 2 computer and want to use the same IDE with the same version on both, keep them Apr 12 22:33:40 if you work on that project with 10 guys and 5 of them use Android studio and 5 of them dont, dont keep them Apr 12 22:34:00 what do i lose by dropping them? Apr 12 22:34:06 should I use FAB as a switch according to material design? Apr 12 22:34:27 ProLoser, When you drop them, its a bit harder to setup the project on computer #1 Apr 12 22:34:30 #2 * Apr 12 22:34:47 because you have to import the whole project again instead of just clicking on the iml Apr 12 22:34:54 well i was using the same IDE and i'm having problems already Apr 12 22:35:04 and AS pretty oftenn likes to fuck everything up on import :P Apr 12 22:35:36 i've got a fucking headache Apr 12 22:35:40 this is so assinine Apr 12 22:37:41 https://intellij-support.jetbrains.com/entries/23393067 Apr 12 22:37:55 this pretty much sums up what you can and should gitignore for android project strucutre Apr 12 22:39:45 I'll still vote for excluding all of it. just add the gradle files. Apr 12 22:40:15 yeah. its a good amount of work to set it up then, but its definitly the cleanest thing Apr 12 22:40:37 setup is trivial, you just import from the gradle file Apr 12 22:40:42 one click Apr 12 22:40:42 and the one that saves you from "let me just pull this repository - aaand project is broken" Apr 12 22:41:00 would be easier if it was just a gitignore Apr 12 22:41:32 danijoo what does that? Apr 12 22:41:34 just using gradle? Apr 12 22:41:42 what does what? Apr 12 22:41:55 like i'm fairly confused, looking at this repo what should i blow away? https://github.com/ProLoser/Wake-Me-Up-android Apr 12 22:42:51 i dont have the time to browse your whole structure now. if its a basic AS projectm just google gitignore android studio and use the first hit you get Apr 12 22:42:57 it will be ok ;) Apr 12 22:43:10 or do it the hard way and read up what the different files are for. Apr 12 22:43:14 and make your own Apr 12 22:45:39 Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Users\Dean\AppData\Local\Android\sdk\build-tools\21.0.0\aapt.exe package -f --no-crunch -I C:\Users\Dean\AppData\Local\Android\sdk\platforms\android-21\android.jar -M C:\Users\Dean\Downloads\Wake-Me-Up-android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml - Apr 12 22:51:22 anyone try to use sophia from android ? http://sphia.org/index.html Apr 12 22:52:13 How do I add NDK to android studio Apr 12 22:52:15 meh, C99 - probably easy from iOS / windows phone though Apr 12 22:55:22 wow, their logo is about as readable as my handwriting Apr 12 23:11:39 Yeah that might be contender for worst logo Ive seen today Apr 12 23:14:32 JesusFreke was reading this about desal in cali http://www.nytimes.com/2015/04/12/science/drinking-seawater-looks-ever-more-palatable-to-californians.html Apr 12 23:15:00 one thing i always wonder - is that there are so many pollutants in seawater, how could those ever be recovered Apr 12 23:15:39 ok we talk out the salt, but everything else is still there :) Apr 12 23:16:05 I can't help but think that the concentration would be so low as to be negligible Apr 12 23:16:10 the ocean is *huge* :) Apr 12 23:16:31 just all the microplastics floating around Apr 12 23:16:35 that alone Apr 12 23:17:14 genetically engineered bacteria g00s Apr 12 23:17:39 JesusFreke: you haven't heard of the island of plsatic 3x the size of texas floating in the pacific ocean? Apr 12 23:18:36 desalinization or something akin is going to be musks next project Apr 12 23:18:58 maybe they could use graphene or something else Apr 12 23:19:14 somebody needs to make a filter which only lets water pass through Apr 12 23:19:49 i knew i read about this somewhere http://newsoffice.mit.edu/2012/graphene-water-desalination-0702 Apr 12 23:20:15 sadly graphene is nasty as hell too Apr 12 23:20:39 lasserix_: that's *on* the ocean. that's not really pollution *in* the ocean Apr 12 23:21:13 misses the point: haven't you heard it is safer to eat smaller fish than larger fish? Apr 12 23:21:22 g00s: how is it nasty? Isn't it just graphite? Apr 12 23:22:05 is it carcinogenic because of it's structure or something? Apr 12 23:22:53 http://www.forbes.com/sites/jasperhamill/2014/04/30/miracle-material-graphene-could-be-pollutant-of-the-future/ Apr 12 23:23:20 future is in genetically engineered bacteria to solve these problems Apr 12 23:23:23 hey guys, anybody need another dev? looking for part time while in college Apr 12 23:24:35 B007: see topic :) no advertising Apr 12 23:25:22 JesusFreke i'm still going nuts coming up with some arbitrary unit conversion system :( Apr 12 23:25:29 thats not advertising lol Apr 12 23:26:06 B007: sure it is Apr 12 23:26:28 you're advertising yourself Apr 12 23:26:33 uh huh. and who are you again? Apr 12 23:26:43 :) Apr 12 23:26:48 :O Apr 12 23:27:55 so? Apr 12 23:29:05 try elancer or craigslist Apr 12 23:29:22 but trying to showup an op of the channel and you are only going to get booted Apr 12 23:29:45 doesn't matter Apr 12 23:30:00 Does the dexer thingy do much escape analysis? I see , but I don't know how much it's used. Apr 12 23:30:07 It'd be cool if some of my tiny allocations were on the stack. Apr 12 23:30:08 B007: this isn't meant to be a hub for job seeking/hunting. it's meant to be a place where you can get help with android development Apr 12 23:30:18 yea ok Apr 12 23:30:39 you guys were discussing water stuff tho Apr 12 23:30:46 * g00s hides Apr 12 23:31:31 Actually, it looks like it simply uses CPU registers for array access. Apr 12 23:31:43 I'm thinking of "use stack allocations" escape analysis. Apr 12 23:31:45 B007: you got me/us there :). I don't mind a bit of offtopic chat, but I do try to curb it if it gets out of hand Apr 12 23:32:15 God, I wish we could do stack allocations at whim. Apr 12 23:32:22 besides im sure there is an android app for desalnization and measuring ocean plastic pollution Apr 12 23:32:49 TacticalJoke like c++ :) Apr 12 23:33:04 B007: I think the problem is that if advertising were to be allowed then this channel would fall apart. On that basis, they draw a hard line there. Apr 12 23:33:26 and also people messing up their devices cooking roms Apr 12 23:33:26 But talking about water doesn't have the same negative impact, even though it's off-topic. :D Apr 12 23:33:38 which is similar to cooking meth i think Apr 12 23:34:05 Breaking App Apr 12 23:34:25 breaking bad apps? Apr 12 23:34:33 :p Apr 12 23:36:32 Maybe the Java designers could've made an "I really know what I'm doing; trust me on this" mode Apr 12 23:36:39 Where stack allocation is allowed. Apr 12 23:36:50 AKA "Hold my beer" mode. Apr 12 23:37:04 unsafe blocks? Apr 12 23:37:09 i keep wishing i could open up java enums, or say this enum = enum1 + enum2. i think its because i want to switch on things :( Apr 12 23:37:27 the lure of kotlin is great in this area Apr 12 23:37:51 lasserix_: Yeah, that kinda thing is nice in C#. Apr 12 23:38:04 g00s: have a Type class, with a.. type field of type TypeEnum? Apr 12 23:38:05 i have a feeling kotlin may become new standard for android? Apr 12 23:38:19 seems like the collab between as + intellij with kotlin support is heading that way? Apr 12 23:38:30 lasserix_: I'm expecting a lot of Android devs to move there. Apr 12 23:38:44 So the enum defines the type, but the actual value object is a different class. Apr 12 23:38:50 lasserix_: Have you seen #kotlin? Apr 12 23:39:00 no Apr 12 23:39:28 JesusFreke my enums have some smarts, like TimeUnit ... i have PressureUnit ... within each xxUnit conversions are allowed Apr 12 23:39:43 i guess i could just put them all in one big enum Apr 12 23:39:51 g00s cant you use rx java to flatmap it? Apr 12 23:39:56 g00s: or extend from a common interface Apr 12 23:40:07 (I think you can do that with enums) Apr 12 23:40:14 JesusFreke but then once you use an enum by interface, you can't switch on it any more :( Apr 12 23:40:20 then just make functors for ech enum for converting Apr 12 23:40:31 yeah there is a solution in here somewhere Apr 12 23:40:46 lasserix_ flatmap all the things :D Apr 12 23:41:01 Yeah, Kotlin's when-statements are fantastic here. Apr 12 23:41:27 I love the arbitrary-expression form: when { something.isTrue() -> doStuff(); somethingElse.happensToBeTrue() -> doMoreStuff() } Apr 12 23:42:09 if..else if..else is so ugly by comparison. Apr 12 23:42:28 link to comparison? Apr 12 23:43:01 g00s: you should probably have a separate enum that defines the unit type. length, mass, volume, whatever Apr 12 23:44:09 whatitis: http://pastebin.com/GURUECU4 Apr 12 23:44:26 And then you could have a single large enum, where each individual member has the UnitType and a multiplier. Apr 12 23:45:07 When providing a Toolbar with a navigationIcon and setting it as the ActionBar it should go back to the previous Activity on click. Which it does, but it doesn't act like the back button. It doesn't send the extra information that was previously sent to that activity. The back button does this somehow though. Apr 12 23:45:18 or, if you need more advanced conversion logic, just a Type interface/base class with a convertTo() method, and have a big Enum-like class with singleton instances of all the specific types Apr 12 23:45:36 Muchoz: How is the Back button sending extra info? Apr 12 23:46:31 TacticalJoke, well the activity that is gone back normally has an extra parcelable object sent to it. But when pressing the actionbar back button it apparently doesn't send that, it does get send when I press the onscreen back button on the bottom. Apr 12 23:46:43 And a Value type which has the numeric value and the type, which provides "type safe" conversions (i.e. checks that the units are compatible or whatever) Apr 12 23:47:02 ey Apr 12 23:47:12 Muchoz: Note that the action bar one is the Up button and the bottom one is the Back button. Apr 12 23:47:17 It makes this discussion easier. :D Apr 12 23:47:32 TacticalJoke, yes, my bad. Any way to make the up button act as the back button then? Apr 12 23:47:43 Muchoz: When is the Parcelable object sent? In onBackPressed? Apr 12 23:48:26 please can someone help me with this: I'm trying to update a ListView backed with a SimpleCursorAdapter that connect to ContentProvider who get sqlite data. Apr 12 23:48:35 TacticalJoke, it's not being sent. It is normally sent when (from another activity) an intent is created to that activity. But when going back to it, it's not being sent, the back button works though, but the up button generates an error saying the intent's extra is null. Apr 12 23:48:38 g00s: abstract converter then give all your enums that class, which takes the two types and does an internal lookup to find the right functor to convert Apr 12 23:49:22 http://codepad.org/EZnXjTJs <-- this is my code, this is the provider: http://codepad.org/5NDfQ8wD Apr 12 23:49:47 when click to positive button the list won't refresh :( Apr 12 23:49:48 ^ you'd probably want to define a single standard type for each type of measurement, to provide a common "base" for converting to/from Apr 12 23:50:38 feathersanddown, the notifyDataSetChanged is commented out? Apr 12 23:51:42 yes, doesn't work Apr 12 23:52:09 feathersanddown, "doesn't work" is not in my vocabulary. Explain, give backtraces. Apr 12 23:52:36 I'm not gonna look through your code if you're giving me no lead. Apr 12 23:52:43 uhm... well... when click in positive button it close the alertdialog, but doesn't refresh Apr 12 23:53:08 Because you have it commented out.... >.> Apr 12 23:53:10 if I leave app and back the new item appear Apr 12 23:53:15 I'm having a problem getting started with robolectric. I can't get any tests to run, it gives me a NullPointerException because in my Apps application file in the onCreate there is a call to getStorageVolume, which doesn't exist. Apr 12 23:53:31 feathersanddown, wait. Do you have a basic understanding of how Java works? Apr 12 23:53:49 about what? threads you mean ? Apr 12 23:54:22 Excuse me? Apr 12 23:54:30 No, Java. Apr 12 23:54:42 well... as you can see, there is a code that point to a variable "aa", using ArrayAdapter, that work, using notifyDataSetChange Apr 12 23:54:55 I don't think you know Java to be honest and you're blindly following a tutorial. Apr 12 23:55:05 but SimpleCursorAdapter won't Apr 12 23:55:27 Are you listening to me? Apr 12 23:55:30 yes Apr 12 23:55:42 Then why aren't you answering my questions? Apr 12 23:55:52 argh Apr 12 23:56:14 well... I know some java concepts, I've been using JavaFX before Apr 12 23:56:29 So why did you comment out lines 147-153? Apr 12 23:56:43 because doesn't work, neither Apr 12 23:57:07 It's not because "it doesn't work" that you need to comment it out. Apr 12 23:57:08 that's why I'm wondering what I'm doing wrong Apr 12 23:57:16 Uncomment it Apr 12 23:57:20 Run it, what happens? Apr 12 23:57:28 doesn't refresh ListView Apr 12 23:57:37 new item doesn't appear Apr 12 23:58:29 Where do you add the new item? Apr 12 23:58:46 feathersanddown: create a new adapter, then call listview.setAdapter(newAdapter);. Apr 12 23:59:16 feathersanddown: http://stackoverflow.com/questions/27042386/cursoradapter-swapcursor-not-refreshing-the-first-time Apr 12 23:59:23 Muchoz: in the alertdialog positive method Apr 12 23:59:29 JesusFreke sounds ... good, any way you could quickly put it in a gist, having some trouble seeing how it would work Apr 13 00:00:08 feathersanddown, you're not adding it anywhere as far as I see. Apr 13 00:00:09 http://news.slashdot.org/story/15/04/12/1531257/mystery-warm-blob-in-the-pacific-ocean-could-be-causing-californias-drought?utm_source=rss1.0mainlinkanon&utm_medium=feed Apr 13 00:00:10 JesusFreke do you mean keep dimension types as separate enums, like LengthEnum, MassEnum, etc Apr 13 00:00:15 kaiju! Apr 13 00:00:26 g00s: I would just have to play around with it and see what works :) Apr 13 00:00:30 pfnQ i posted that the other day :D Apr 13 00:00:47 feathersanddown, get the Adapter you're using and call a method from it that adds the item you want. Apr 13 00:00:58 g00s: that was mostly all just a live-brain-dump. welcome to the inner working of my mind :p Apr 13 00:01:03 But honestly I think this is way over your head, I don't think you have a basic understanding of Java. Apr 13 00:02:28 it's definitely not a concrete concept, mostly just an initial vague shape of a design Apr 13 00:02:46 g00s what is it you are trying to do? Apr 13 00:03:13 and in a SimpleCursorAdapter, wich method I must call ? Apr 13 00:04:17 feathersanddown, check the methods it has. Android Studio has auocomplete options Apr 13 00:04:45 lasserix_ i get sensor data from a number of devices. in the past i treated it "dumb", made no attempt at conversion - basically stored the data in sqlite, along with units of source device (user had to configure their device for the units they wanted). but now other/new devices are behaving differently - like they only give stuff in metric system, so i have to thinkn about how to handle unit conversions from arbitrary devices Apr 13 00:04:45 (and how to store units in the db, another big pita) Apr 13 00:04:56 ok...yes... there is nothing like "add" or "insert" or "put"... ArrayAdapter have "insert".... Apr 13 00:05:15 all your units are enums? Apr 13 00:06:27 lasserix_ atm, i just store the strings. pretty much just like the service i would upload to, xively.com Apr 13 00:06:54 ahh sh, how do i undo upcoting/downvoting an so post? Apr 13 00:07:04 i wonder if they too, just threw their hands in the air and said "fuck it, you do it :)" Apr 13 00:07:16 feathersanddown, google: http://stackoverflow.com/questions/8508678/how-to-add-an-item-to-simplecursoradapter Apr 13 00:08:09 g00s so can't you just use a double switch in a static function? Apr 13 00:08:38 (fromtype, totype, value) switch (fromtype) case target: switch (toType) return convert(value) Apr 13 00:09:14 yeah ... something Apr 13 00:09:33 when the conversion is encoded as switches, there is no way to reflect this back into the UI Apr 13 00:09:39 (possible choices, asking the user, etc) Apr 13 00:09:51 ? Apr 13 00:09:53 so i may need to augment this with some other table-driven file i parse Apr 13 00:10:16 the knowledge of what can ve converted to what is embedded in a switch statement Apr 13 00:10:37 oh you mean you want to make it settable ? Apr 13 00:10:56 if i want to ask the user, the kinds of units they would like to conver to, like present them a list - yeah i need another representation Apr 13 00:11:22 like a sparse matrix or something Apr 13 00:11:31 just have map that has functors Apr 13 00:11:37 err Apr 13 00:11:48 easier, a map of target that you use to change the switch arguements Apr 13 00:12:04 and then i can get units were i can't handle, in that case i need a catch-all (we'll show this, but don't know what to do with it) Apr 13 00:12:24 you can just check if the value is empty for the key Apr 13 00:12:29 hmm Apr 13 00:12:36 make a conversion formula the user can input? Apr 13 00:13:06 and then there is the issue, do i normalize all data into sqlite as metric :( Apr 13 00:13:18 yeah Apr 13 00:13:25 or carry the units received from the device into sqlite as-is Apr 13 00:13:36 no you mgiht as well convert it Apr 13 00:13:36 encoding those units as fields / codes aggghh its ugly Apr 13 00:14:17 so I want to use this library, but I don't know what the latest version is, so I don't know what to put into build.gradle https://github.com/emilsjolander/StickyListHeaders Apr 13 00:14:20 anyone know how to find this out? Apr 13 00:14:47 I tried looking in the manifest, it says "2.0", but putting 2.0.0 as the version number in build.gradle doesn't wor Apr 13 00:16:21 emil=2.6.0 Apr 13 00:18:10 ahhh, I was looking in library/build.gradle. VERSION_NAME is 2.6.0 in gradle.properties Apr 13 00:18:14 thanks lasserix_ Apr 13 00:18:48 think you can also do something like 2.0.0+ to auto make it latest version Apr 13 00:18:57 Is it this? http://search.maven.org/#search%7Cga%7C1%7CStickyListHeaders Apr 13 00:19:01 lasserix_: That's a bad idea, isn't it/ Apr 13 00:19:04 ?* Apr 13 00:19:08 dunno Apr 13 00:19:18 If you do that, it could change and break at any moment. Apr 13 00:19:21 but it sucks when your build breaks all the sudden Apr 13 00:19:23 And it'd be hard to figure out what and why. Apr 13 00:19:29 I guess you could get unpredictable behaviour Apr 13 00:19:39 well yeah if the library author doesn't do deprecation corectly Apr 13 00:20:04 There are so many ways that could happen. Simple bugs could do it. Apr 13 00:20:06 lasserix_: or a new version introduced a new bug or something Apr 13 00:20:08 yeah Apr 13 00:20:23 I actually had that happen with proguard the other day Apr 13 00:20:33 upgraded to the latest version, and things weren't proguarding correctly Apr 13 00:20:50 (http://sourceforge.net/p/proguard/bugs/568/) Apr 13 00:21:13 yeah, Android Studio will flag it if you do that, for that reason Apr 13 00:22:25 And it will also notify you that a new version is available. Apr 13 00:23:49 Just seen square are developing something called Moshi - might wait til its done for the networking aspects of my app Apr 13 00:25:45 Anthaas: what's it do? At a glance it looks like replace of sorts for gson? Apr 13 00:26:16 I think it might be Gson with less baggage. Apr 13 00:26:23 Or something. Apr 13 00:26:36 For the most part it seems like its just a JSON reader/writer, but from my experience from square/jakew itll be much friendlier to use. Apr 13 00:26:53 Yeah, Gson with less baggage as TacticalJoke puts it. Apr 13 00:26:58 Or "without the baggage". Apr 13 00:27:03 Hahah yeah Apr 13 00:27:04 I'm just guessing. Apr 13 00:27:28 sounds pretty good :) Apr 13 00:27:36 To be honest, a lot of their libraries seem to encapsulate a bunch of stuff devs want to do with the Android template and make it easier/friendlier to do so. Apr 13 00:29:10 Does anyone know a decent tutorial for learning how to properly set up REST services online? Apr 13 00:29:20 I know enough PHP to get by... Apr 13 00:49:56 Anthaas, it's just like making any other website but you return json. Apr 13 00:51:20 Muchoz: Whenever I have done networking before, I've made a PHP script that receives values through $_POST or $_GET, e.g. $_POST['name'] Apr 13 00:51:36 Muchoz: then performed some db query, and echo'd json/xml. Apr 13 00:51:43 Doesnt really feel like Im doing it right. Apr 13 00:52:01 What's wrong about it? Apr 13 00:52:11 I will literally create a HttpPost object which calls www.mysite.com/myfolder/myscript.php Apr 13 00:52:25 Oh Apr 13 00:52:38 and gets the result Apr 13 00:52:41 You need to get familiar with what the definition of REST actually is. Apr 13 00:52:41 or response or whatever Apr 13 00:52:52 Yep - which is why I want a decent tutorial :D Apr 13 00:53:00 Im talking about one which not only helps make, but also explains. Apr 13 00:53:32 Oh there are tons Apr 13 00:53:49 Could you recommend a couple? Apr 13 00:53:59 I'm currently doing the backend of a SaaS and I do the Android version of the app. Apr 13 00:54:36 Let me have a look around, I kind of just learned by using them at first and then looked around some before building my own the first time I did so. Apr 13 00:54:43 But I personally dislike PHP. Apr 13 00:55:02 Even though it doesn't have anything to do with what language you're using. Apr 13 00:55:20 Is that a personal reason/preference, or a technical reason? Apr 13 00:55:30 Im confident with PHP, I dont really know Python or Ruby or anything else Apr 13 00:55:47 I appreciate you finding me some good tutorials though :-) Apr 13 00:56:08 Can I nest a fragment within a fragment? Apr 13 00:56:56 phix, yes. Apr 13 00:57:13 Oh wait Apr 13 00:57:15 you mean a fragfragmentment? Apr 13 00:57:17 I don't think so Apr 13 00:57:27 I was thinking about something else Apr 13 00:57:42 phix, http://stackoverflow.com/questions/6221763/android-can-you-nest-fragments Apr 13 00:57:50 turn your nested fragment into a custom viewgroup and thatll solve your problems better Apr 13 00:57:56 You can with v4 appcompat Apr 13 00:57:56 Muchoz: <3 Apr 13 00:58:16 My android minimum is API 11 Apr 13 00:58:22 Anthaas, this video is decent: https://www.youtube.com/watch?v=YCcAE2SCQ6k Apr 13 00:58:26 Do I need v4 appcompat? Apr 13 00:58:51 Anthaas, it's old so don't mind some of the old technologies being used. Apr 13 00:58:51 Muchoz: Is that guy wearing eye make up? haha Apr 13 00:59:11 Muchoz: Thanks, Ill watch :D do you ahve any other videos/sites? Apr 13 00:59:11 Muchoz: ok looks like I do, hmmm v4 or v7 :/ Apr 13 00:59:19 is there a v11? Apr 13 00:59:30 as I don't need support fragments Apr 13 00:59:32 Anthaas, but I don't think it's completely correct. Watch the beginning about the requests. Apr 13 01:01:12 Anthaas, as for my reasoning behind why I dislike PHP is because of its unexpected behaviour, bad tools and I dislike how it works. Apr 13 01:01:39 With 'how it works', I mean that it's a language meant for the web and the web only. Apr 13 01:02:27 Ahh, so its a preference? I understand that. If I knew Python, I'd probably try and give it a go, but I am comfortable with PHP and I dont think Ill need anything else for what Im doing. Apr 13 01:02:34 I will give python a shot at some point though Apr 13 01:02:56 Anthaas, just look at how other APIs do it and kind of copy their way of making URLs. Also use what the HTTP protocol offers: use the headers, status codes instead of returning that information in the body for example. Apr 13 01:03:17 And I sometimes think of the URLs as if there were Classes with their methods and arguments. Apr 13 01:04:31 e.g.: /song/ -> return all songs from the user, /song/1/ -> get the user's song where the id = 1, /song/latest/ -> get song organised by when they were added. etc. Apr 13 01:04:56 Just do what's convenient. Apr 13 01:05:10 Yeah, its that kind of URL/Behaviour I am trying to get. Apr 13 01:05:35 You should definitely try Python imo. Apr 13 01:06:27 Anthaas: if you don't plan generate PDFs just go forth to python Apr 13 01:06:31 You need a PHP framework these days and they're not very friendly for beginners imo. You'll most probably have to learn a lot. Apr 13 01:06:42 And you need to scramble around in tons of files. Apr 13 01:06:49 In Python 1 file is all you need most of the time. Apr 13 01:06:57 (Well to get startedà Apr 13 01:07:03 I am fairly confident with PHP though haha :( simple to use, lots of examples and the like. Apr 13 01:07:24 Learning Python will take a lot. I mean I could, but... Apr 13 01:07:26 Well I'm just giving advice, I don't mind. Apr 13 01:07:38 Learning Python will not take a lot of time, believe me. Apr 13 01:07:49 If you can program, you can learn a new language in under a week. Apr 13 01:08:36 PHP is a dynamic language, Python is too so you don't need to learn how statically typed languages work if you don't know that already which I doubt because you're in #android-dev Apr 13 01:09:16 Muchoz: I know the concepts of programming, and learnt Java to support that rather than learning java and thats it. Apr 13 01:09:18 If you know a language and how to program, all you need to know is how to use the tools. For example here you need to use how to use the Android SDK. Apr 13 01:10:14 I don't know every detail if the Android SDK and no one knows most probably. That's why people are here to ask such things if Google cannot help you any further. Apr 13 01:10:33 Muchoz: I know PDO, and all the things I need to create a script, access a database, do logic, print, etc. All I need is to learn how REST APIs work etc, with Python I have to learn all of that and the REST stuff :/ Apr 13 01:10:37 Im tempted, I am. Apr 13 01:10:39 Even if they can just tell you how something is called or what you could use, you can start Googling further. Apr 13 01:11:10 You know how to use SQL? Apr 13 01:11:18 PostgreSQL, MySQL...? Apr 13 01:11:54 MySQL and Oracle's version, I forget what its called Apr 13 01:11:59 SQLite too obv Apr 13 01:12:44 we gotta a badass over here Apr 13 01:13:22 Hahah he asked a question. Apr 13 01:13:34 Hardly a bad ass for answering. Apr 13 01:13:59 Muchoz: Never used PostGreSQL though Apr 13 01:14:47 Anthaas: Do you ever sleep? :D Apr 13 01:14:50 Well PDO is just a simple tool though. Apr 13 01:15:07 TacticalJoke: Only on days that end with K :P Apr 13 01:15:31 * Muchoz tried to find a day that ends with a k. Apr 13 01:15:38 Hahaha Apr 13 01:15:39 * Muchoz is retarded. Apr 13 01:17:05 Muchoz: It is, but it is a nice one haha Apr 13 01:17:44 I barely write SQL anymore... Apr 13 01:18:14 The only time I wrote SQL is to incorporate a method to get the closest rows based on a location because it wasn't in MySQL yet. Apr 13 01:18:22 Now I'm too lazy to remove it. Apr 13 01:24:51 * pfnQ has yet to try out these newfangled webscale nosql things Apr 13 01:25:07 Muchoz: Its annoying, so many examples I find even I can quite clearly see they are not REST APIs Apr 13 01:25:30 Either that or they have their own little project they want me to use to make easier. Apr 13 01:26:57 Anthaas, yup. Apr 13 01:27:45 Anyone can create a script which echo's some content in JSON, but that isnt REST. Apr 13 01:27:53 But every example seems to think it is. Apr 13 01:28:10 pfnQ, I'm not using noSQL. You know it doesn't mean 'No SQL'? Apr 13 01:28:24 Not Only SQL isnt it? Apr 13 01:28:56 well, nosql databases practically mean no sql due to the fact they tend to be document and not relational Apr 13 01:28:57 Yes Apr 13 01:29:20 there is a query language, but sql isn't applicable Apr 13 01:29:37 That yes was in response to Anthaas, but you're right too. Apr 13 01:31:12 Muchoz: Annoyingly everyone wants to use Slim. Apr 13 01:32:42 Anthaas, this? http://www.slimframework.com or this? http://slim-lang.com Apr 13 01:32:54 former Apr 13 01:33:14 I cannot comment on that Apr 13 01:34:24 if wanna json and have the freedom to choose language tryout some edgy nodejs framework Apr 13 01:35:12 Honestly, what all these examples are doing seems simple and easy to understand and all the rest, but for the love of God please just show me a plain no-framework PHP example. Apr 13 01:35:37 There are SO many frameworks out there which seem to be an exact for of each other with some method name changing... Apr 13 01:36:43 Anyone know what is going on here? (android studio / gradle output) http://i.imgur.com/y9PwgO0.png something is preventing me from running test Apr 13 01:36:44 like PHP is an lazy template language which received steroid Apr 13 01:36:55 full gradel file here: http://pastie.org/10089038 Apr 13 01:38:04 abara: I'd love to use Python, but dont really have the time to learn whats what right now. I honestly quite like it too. Apr 13 01:38:17 zzxx: in your gradle build file under add packagingOptions{ exclude 'APK\ License.txt' } Apr 13 01:39:16 Solarnum: sorry, under what? Apr 13 01:39:21 I'm not 100% sure if the forward slash is needed Apr 13 01:39:34 Anthaas: dont think wit worth all that. There is still more job with PHP than Python Apr 13 01:39:51 in the android block Apr 13 01:41:56 Hmm, time for bed for me I think Apr 13 01:41:59 Night all Apr 13 01:43:16 zzxx: Hmm, do you even need that JUnit dependency? Apr 13 01:43:30 I haven't used the support-testing thing, but others don't seem to be declaring that dependency. Apr 13 01:44:01 Solarnum: Hmmm.. .didnt seem to work Apr 13 01:44:59 Look at this: https://github.com/googlesamples/android-testing/blob/master/testrunner/AndroidJunitRunnerSample/app/build.gradle Apr 13 01:45:17 TacticalJoke: Truth be told, I started setting up JUnit4 .. and then found out JUnit3 was better supported, so when I tried to downgrade, that caused headaches I could not figgure out, so now I have put in that atuff to try and get *something* to work Apr 13 01:45:31 im still working on understanding it all though Apr 13 01:46:00 thanks for the link Apr 13 01:46:51 Ugh, don't use JUnit 3. And if you're smart, use TestNG instead of JUnit 4 :) Apr 13 01:47:42 CedricBeust_: What are the advantages of testNG? Apr 13 01:47:51 Oh boy Apr 13 01:47:51 CedricBeust_: Can we use TestNG for instrumentation tests? Apr 13 01:47:58 (or should i jsut google that) Apr 13 01:48:07 Yeah I think you should :) Apr 13 01:48:33 (and I missed the last line that referenced me, can whoever wrote it repeat it?) Apr 13 01:49:20 CedricBeust_: Can we use TestNG for instrumentation tests? Apr 13 01:49:44 To be honest, I've never tried TestNG on Android but I don't see why you couldn't Apr 13 02:40:10 The advice on /r/androiddev is so bad. The latest one: "Never write anything that is already done correctly by an available library." Apr 13 02:40:32 Is it me, or is that subreddit mainly --> ? Apr 13 02:45:33 TacticalJoke like almost all programming advice :P Apr 13 02:46:01 i check that reddit for news, and some indication of how crazy people are :D Apr 13 02:46:34 :D Apr 13 02:46:36 'sentiment analysis' Apr 13 02:46:50 CB has a new article: http://beust.com/weblog/2015/04/11/android-rx-and-kotlin-part-3/ Apr 13 02:46:51 never write anything yourself that you can copy from stackoverflow instead! Apr 13 02:46:59 Wait, that was two days ago. Apr 13 02:47:05 Or one. Apr 13 02:47:19 let's call it pi/2 Apr 13 02:47:51 "I am a software engineer and the creator of the Java testing framework TestNG" ah-ha! It all makes sense now :) Apr 13 02:51:30 If you guys were able to pick your title at your place of work, what is the most crazy inane title you could come up with? Apr 13 02:51:42 The Unicycist. Apr 13 02:52:11 interesting Apr 13 02:52:34 im thinking going old school, prefect of android development, duke of mobility, vicaar of synergy promotion Apr 13 02:54:22 count droid? Apr 13 02:54:26 yes Apr 13 02:54:33 adding that to my title Apr 13 02:57:32 g00s: http://i.imgur.com/TUxmhur.jpg Apr 13 02:58:43 TacticalJoke: I don't believe that a place that idyllic looking could exist. **** ENDING LOGGING AT Mon Apr 13 03:00:00 2015