**** BEGIN LOGGING AT Fri Nov 14 03:00:00 2014 Nov 14 03:04:13 i'm not blaming you but the allocation error you're getting is definitely a symptom of other issues Nov 14 03:06:48 well, not spike that would explain anything imho Nov 14 03:06:56 *no Nov 14 03:09:42 anyway, JacobTabak the event is sent when a dialog promting the user to rate our app is displayed. so it kinda makes sense to display it only once the dialog is shown Nov 14 03:10:02 i'm going to disagree with you on two points Nov 14 03:11:11 a) waiting for an animation to complete before a DB write makes no sense. why not make the DB write when the animation starts or the button is clicked? Nov 14 03:11:27 b) there's no reason to do it on the UI thread Nov 14 03:15:05 well, that's how it has been written, writing doesn't seem to be the issue Nov 14 03:15:23 right Nov 14 03:15:34 its a symptom of a memory leak Nov 14 03:15:49 i never said that was the issue, just pointing out obvious flaws Nov 14 03:15:54 if i can see 2 bugs from a stack trace Nov 14 03:16:04 unrelated to the crash that the stack trace isf rom Nov 14 03:20:58 not sure why it would leak in this case Nov 14 03:21:46 maybe i can't see it because I'm tired, or because i'm not that experienced with memory management Nov 14 03:23:17 yea thats why g00s said its a bad problem to have Nov 14 03:23:25 what does your app do? Nov 14 03:23:55 diary for diabetics Nov 14 03:24:01 hmm Nov 14 03:24:23 lots of image loading? Nov 14 03:24:35 anything with bitmaps? Nov 14 03:26:04 well, not lots, this activity can but doesn't have to handle images taken from another activity. and handles saving it Nov 14 03:31:47 high res bitmap? Nov 14 03:31:53 almost all memory issues are with bitmaps Nov 14 03:32:09 or other large IO like files Nov 14 03:32:12 Hey guys what is the command I can use xml to have my text field match my resolution? wrap_content isn't working. Nov 14 03:32:40 Not gonna bite Demon_Jester, go back to the tutorials Nov 14 03:33:14 I got it Nov 14 03:33:53 I forgot about fill_parent. Nov 14 03:34:04 ... Nov 14 03:34:10 i'm not even going to correct you Nov 14 03:34:20 because it doesn't need correcting. Nov 14 03:34:32 you're the expert Nov 14 03:34:47 but google fill_parent and you'll see what im talking about Nov 14 03:36:09 You still couldn't resist. Nov 14 03:37:00 god damn it, i'm so sick of stuff not working -.- Nov 14 03:37:13 now android studio can't recognize my device again Nov 14 03:37:50 Did you accept the rsa key on the device? Nov 14 03:38:19 its time to do the dance of fun Nov 14 03:38:23 yes, it worked until a few minutes ago Nov 14 03:38:38 randomly altenrnate between adb kill-server/start-server, replug the device if ita a device, restart the emul;ator if its an aemulator, restart your IDE, reboot Nov 14 03:38:45 this is the dance we android developers do several times a day Nov 14 03:38:47 if we have macs Nov 14 03:38:57 I would do the basic, swap cords, restard android device etc... Nov 14 03:38:59 well, I'm on windows Nov 14 03:39:02 restart* Nov 14 03:39:03 lmao Nov 14 03:39:11 and except for restarting my PC, already tried all of that Nov 14 03:39:24 reboot the phone! Nov 14 03:39:56 ah well, I'll restart this pc as well... brb Nov 14 03:40:00 I think there is an option to remove/revoke the rsa key. Nov 14 03:40:53 Syzygy__: which OS ? Nov 14 03:41:07 shmooz he is already gone. Nov 14 03:41:22 Does anyone know how I can restart a loader inside a broadcast reciever? Nov 14 03:41:46 yeah my message shows up late cause of lag, my internet swears I'm disconnected but xchat keeps working :O Nov 14 03:42:11 I guess it somehow keeps the socket alive Nov 14 03:43:13 actually it's hexchat, same crap Nov 14 03:43:54 I have a broadcast reciever for an activity which extends LoaderCallbacks, and I want to be able to reset the loader whenever the broadcast reciever calls it's onReceive method. Nov 14 03:52:11 well... operating system updates are a bitch... Nov 14 04:02:20 If I say "new MyAsyncTask().execute()" (and I'm not holding onto the AsyncTask), the garbage collector won't collect it till it's finished, right? Nov 14 04:02:27 I'm guessing something under the hood holds onto it. Nov 14 04:16:08 Threads are not GCd while running Nov 14 04:17:24 K. Thanks. Nov 14 04:20:25 hmmm I think I have to emulate a spinner without extending spinner unless I can override it showing a popup on gingerbread despite android:spinnerMode="dropdown" Nov 14 04:20:58 shmoooz minSdk=16 Nov 14 04:21:04 never! Nov 14 04:21:46 my min is 3 lol Nov 14 04:21:49 and why can't GB user have a crappy spinner ? Nov 14 04:22:01 but I'll settle for 10 Nov 14 04:22:02 only ravioli uses GB Nov 14 04:22:14 all hail ravioli Nov 14 04:24:53 g00s i am learning the power of doOnNext() Nov 14 04:25:09 hehe Nov 14 04:25:19 i've used that for 2 things: Nov 14 04:25:25 not as powerful as On Error Resume Next Nov 14 04:25:31 shit shmoooz thats' gone now? Nov 14 04:25:34 i just fucking wrote somethign that uses that Nov 14 04:25:42 a chain of processing, and mutation Nov 14 04:25:53 is onerrorresumenext gone now? Nov 14 04:26:03 never existed Nov 14 04:26:29 except in VB Nov 14 04:26:33 ... Nov 14 04:26:53 return cache.getCachedValue().onErrorResumeNext(getNewValue()); Nov 14 04:27:02 this code is in my app :O Nov 14 04:27:52 huh? you writing it in BASIC ? Nov 14 04:28:07 shmoooz can you pls tell me wtf u are tlaking about Nov 14 04:28:20 g00s i'm using doOnNext to keep reusable logic out of my anonymous subscribers that update my UI to adjust application state Nov 14 04:30:36 also i just wrote some observables that basically just call mkdirs on a directory for me Nov 14 04:30:47 and throw an error if it fails, because i hate the file api Nov 14 04:31:07 JacobTabak: what are you working on ? Nov 14 04:31:15 timehop Nov 14 04:31:17 ! Nov 14 04:31:34 but anyway i used doOnNext() to create a ".nomedia" file in my export directory Nov 14 04:31:43 so if that file creation fails, the entire observable chain errors out Nov 14 04:31:46 its just such a beautiful thign Nov 14 04:32:24 and now i'm using doOnNext to create a random file in my export directory Nov 14 04:37:32 i dunno, observables for creating dirs ? Nov 14 04:37:54 go on Nov 14 04:38:13 dunno :D Nov 14 04:38:22 I'm slowly figuring the threading code for a Reddit client. I'm wanting to avoid AsyncTask because it doesn't seem great. I read that we shouldn't directly create Threads in Java. I'm not sure that a Service is a good idea (given that if my app is going down then I just want any background task to cease). Is Executor my best option? Nov 14 04:38:22 what do you not know about? Nov 14 04:38:25 out^ Nov 14 04:38:28 would you just do it on the main thread? Nov 14 04:38:29 rx shines composing streams of data Nov 14 04:39:07 probably dust mkdir on the main thread unless strictmode complained Nov 14 04:39:12 *just Nov 14 04:39:43 TacticalJoke: it's worth pointing out that a service also runs on the main thread :) Nov 14 04:39:49 still need to learn rx.... Nov 14 04:39:51 Oh. lol Nov 14 04:39:55 Shows what I know about services. Nov 14 04:40:10 you'd need to wrap it in a try/catch Nov 14 04:40:25 TacticalJoke: service and eventbus for the win Nov 14 04:40:27 so its already too ugly for a 1 lnier Nov 14 04:40:35 unless you want to make broadcast receivers all the place Nov 14 04:40:38 the whole file api is retarded Nov 14 04:40:58 it's just like java right ? ;) Nov 14 04:41:02 it is java Nov 14 04:41:06 there is that great bug , you can't change the file modified time Nov 14 04:41:07 i'm using rxjava to wrap it so its more sane Nov 14 04:41:18 so i can pass excpetions down the pipeline Nov 14 04:41:23 gordon_: Hmm, I considered it but, like, if my app isn't showing anything on the screen then it might be okay for all background threads to die. (Though it depends.) Nov 14 04:41:27 i have this one transaction thats ridiculously complex for uploading local photos Nov 14 04:41:43 If someone closes the Reddit client and doesn't want to come back to it, it'd probably be best for the background tasks to simply die. Nov 14 04:41:45 For example. Nov 14 04:42:05 Then, when they come back, we can restart the download. Nov 14 04:42:07 TacticalJoke: if so use that othrt service Nov 14 04:42:21 I guess I'm trying to avoid a service. Sounds more complex than something like Executor. :) Nov 14 04:42:28 Though I'll tolerate the complexity if it's really justified. Nov 14 04:42:35 create temp file in private dir, resize, map exif data, upload, download rebranded version from the server, put it in a public export dir so user can share it, create export dir if doesnt exist, put .nomedia file in the export dir if it doesnt exist Nov 14 04:42:42 IntentService Nov 14 04:42:59 if any of those operations failes, the whole thing fails Nov 14 04:43:05 so i think rxjava really shines for it Nov 14 04:43:17 its not working on main thread Nov 14 04:43:24 are you talking to someone i have muted gordon? Nov 14 04:43:26 or me? Nov 14 04:43:37 IntentService was for TacticalJoke Nov 14 04:43:43 JacobTabak yeah, why not just put that in intentService ? Nov 14 04:43:46 Im reading you JacobTabak ;) Nov 14 04:43:56 or executor or something Nov 14 04:44:02 i need callbacks along the way Nov 14 04:44:08 k Nov 14 04:44:26 are there any devs in here that work on the google remote desktop app Nov 14 04:44:27 why would intentserivce be better? Nov 14 04:44:28 ok I need to write some rails now ;) Nov 14 04:44:32 so bbl Nov 14 04:44:32 ? Nov 14 04:44:41 the user has to pay attention to the whole process, they can't do anything until tis complete Nov 14 04:44:48 || Nov 14 04:44:51 ^ there ya go Nov 14 04:45:05 you are amazing JesusFreke Nov 14 04:45:18 Would you guys use an IntentService for a Reddit client? Nov 14 04:45:28 I guess I could try every single option, but I'm trying to avoid unnecessary work here. :D Nov 14 04:45:43 TacticalJoke: that question doesn't make much sense Nov 14 04:46:16 I think I need just one background-downloading *thing*. Not sure whether it should be an IntentService or some kind of Thread. Nov 14 04:47:01 rails for eveybody |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Nov 14 04:47:18 g00s: If I were op in here.... :p Nov 14 04:47:28 I'm guessing IntentService is slower than just using Thread, right? Nov 14 04:47:39 meh, gimme pythons any day SSSSSSSSSSSSSSSSSSSSSSSSSSS Nov 14 04:47:51 isn't ruby dead yet ? Nov 14 04:47:57 can i do java Nov 14 04:47:59 A service would make sense if you want to download something in the background, not associated with any activity Nov 14 04:48:02 c[] Nov 14 04:48:05 g00s: you're thinking of Perl Nov 14 04:48:18 yep Nov 14 04:48:30 unfortunately the user needs to wait for all this processing ot complete before they can actually share so... Nov 14 04:48:39 performance isn't particularly a concern either way Nov 14 04:48:53 i thought ruby was on its way down too, since everyone used it for RoR Nov 14 04:48:56 anyway i think rxjava is great for it due to the error handling Nov 14 04:49:12 Hmm. Pretty much everyone on SO is saying that services are for scheduled stuff while threads are for stuff related to Activitys. So I'm leaning towards the latter. Nov 14 04:49:28 just makes for really clean code Nov 14 04:49:34 all the hipsters started using anguar and node Nov 14 04:49:38 I'm guessing I can easily change this later. Nov 14 04:52:11 why are my fields being created at the bottom of my classes Nov 14 04:52:15 i'm not an idiot i promise Nov 14 04:52:21 i looked at all the code style settings Nov 14 04:52:33 (in AS 0.9.2) Nov 14 04:53:37 g00s: it's not I like rails Nov 14 04:53:44 they choose it for backend Nov 14 04:53:58 so when I need to add something, I just have to write ruby ;) Nov 14 04:54:06 and play > rails Nov 14 04:54:16 but I'd like to try go Nov 14 04:54:36 what I like about rails is.. rspec Nov 14 04:54:38 i dont like dynamically types languages much, but to each their own Nov 14 04:55:07 wish I could test android like I test rails Nov 14 04:55:08 i think PragProg is to blame for all the RoR, they were hyping it constantly Nov 14 04:55:20 dont know PragProg so ... Nov 14 04:55:27 Pragmatic Programmer Nov 14 04:55:31 http://canrailsscale.com/ Nov 14 04:55:32 they wrote the pickaxe book Nov 14 04:56:23 also ThoughtWorks was trying to push it in the enterprise Nov 14 04:56:50 it seems ruby's fate is tied to RoR Nov 14 04:56:57 it is Nov 14 04:57:02 at least Python, used in so many places like numerical computing Nov 14 04:57:22 seems so Nov 14 04:57:23 but even there Julia is getting attention Nov 14 04:57:32 but there might be better alterntivies to python Nov 14 04:57:49 so python is like... it's there but if you look for python jobs there arent that many Nov 14 04:58:13 i would guess django would overrepresent pure python jobs Nov 14 04:58:22 used in sysadmin, etc Nov 14 04:58:35 yeah same with perl, how many perl jobs ? Nov 14 04:59:58 no idea Nov 14 05:00:02 dont know perl Nov 14 05:00:05 only the legends Nov 14 05:00:22 what's the difference between perl and python ? Nov 14 05:00:46 in python you can write a script and after that you can read it and understand what it does ;) Nov 14 05:01:04 that legend Nov 14 05:01:52 yeah beside being write only, weakly typed Nov 14 05:03:01 https://github.com/JesusFreke/teensyhand/blob/master/main.S.pl#L223 <--- perl ftw! ;) Nov 14 05:03:14 (yeah yeah, I'm sure I've probably linked that in here before. sorry :p) Nov 14 05:03:31 where's your readme.me Nov 14 05:03:34 hat u Nov 14 05:04:38 and no, that's obviously not typical perl Nov 14 05:07:20 there is no typical perl, thats the problem Nov 14 05:07:23 heh Nov 14 05:07:46 g00s: well, I think that's probably less typical than most :) Nov 14 05:08:06 it fell off the edge of the typicallity graph Nov 14 05:11:07 JesusFreke: project name is suspicious :> Nov 14 05:11:43 gordon_: not really. it's a firmware for the datahand keyboard, using the teensy board Nov 14 05:13:24 (https://www.pjrc.com/store/teensy.html) Nov 14 05:13:27 that was joke ;) Nov 14 05:27:22 it would be cool - if play store gave you stats on all the different versions of android which visitied your listing Nov 14 05:27:37 oh yeah totally Nov 14 05:39:45 Ok here is another question, with android I wam wanting to attempt grid similar to this image. https://boltingupandroid.files.wordpress.com/2012/06/bumble_landscape_grid.png?w=587 would I need to do gridlayout then put listview over it? Nov 14 05:40:21 wat Nov 14 05:40:32 GridView Nov 14 05:40:48 Or RecyclerView with GridLayoutManager Nov 14 05:41:42 hmmm people kept using gridview to display images.. hmm I am sure I will figure it out. Nov 14 05:42:07 have you used scrollview? Nov 14 05:43:07 I did before but I did not like it, but funny thing is, I was wondering if I can make grids in scrollview... Nov 14 05:43:14 no nevermind sorry I thought you said listview. Nov 14 05:48:22 is an android studio expert here Nov 14 05:48:30 just ask bru Nov 14 05:49:09 I get this msg Nov 14 05:49:13 files under the build folder are generated and should not be edited Nov 14 05:49:28 when I try to edit mainfest file Nov 14 05:49:40 you're editing the wrong manifest Nov 14 05:50:07 JacobTabak: thanks Nov 14 05:50:09 gradle merges the manifests of your app and libraries and puts it in a generated directory Nov 14 05:50:30 thanks Nov 14 05:50:32 if you use 'android' view in android studio, you should be able to easily find your manifest Nov 14 05:54:05 thinking of switching to linux on the desktop, am I going to still be able to connect to my phone? Nov 14 05:54:34 like with adb to upload apk for test Nov 14 05:54:58 of course Nov 14 05:55:06 ok Nov 14 05:55:08 Leeds are you sure ? Nov 14 05:55:17 just wasn't sure about the usb drivers Nov 14 05:55:26 its generally ok Nov 14 05:55:28 support isn't as good Nov 14 05:55:38 ui is glitchy in AS sometimes Nov 14 05:55:44 ok Nov 14 05:55:50 there are no USB drivers for Linux - or OSX, for that matter Nov 14 05:55:52 no show stoppers though Nov 14 05:59:51 zmuser3: yes you can Nov 14 06:00:00 you might need to edit one file Nov 14 06:00:12 ok Nov 14 06:00:21 happy to hear more people are moving to linux :))) Nov 14 06:00:29 you may need ia32 libs Nov 14 06:00:40 zmuser3: what distro ? Nov 14 06:00:54 LFS Nov 14 06:01:00 lolwut Nov 14 06:01:08 ooops Nov 14 06:01:15 go for something more mainstream like wolvix Nov 14 06:01:36 and you ask me about linux questions :D Nov 14 06:01:48 zmuser3: how long is your beard ? Nov 14 06:01:52 heh Nov 14 06:02:17 I've been running linux since 92 but not on the desktop Nov 14 06:02:37 I'm not saying it's a bad thing that you want to run LFS ! Nov 14 06:02:47 '92, impressive... I only go back to '94 :) Nov 14 06:02:53 just.. my force is smaller than yours :) Nov 14 06:03:15 '92 is floppy disk days Nov 14 06:03:25 true Nov 14 06:03:45 I remember 94 Nov 14 06:03:49 92... not really Nov 14 06:04:12 I ran the Ted Tso boot/root floppies. before any distro Nov 14 06:04:59 and after 20 years you will run desktop for the first time ?! Nov 14 06:05:17 every couple years I check it out and feel like it isn't quite ready Nov 14 06:05:28 well... Nov 14 06:05:51 well now I just can't take windows any more Nov 14 06:07:05 they go open source ! :D Nov 14 06:07:09 yeah, I started with a boot/root pair, but moved to slackware very quickly Nov 14 06:08:19 this is too much for me to take in. windows might be bad, but LFS for desktop ? Nov 14 06:08:34 I didn't have enough floppies for a full install, and the nearest place to download it was the next dorms over - I was at university - so I'd take my little box of floppies, download 10 images direct to floppy - no local disk access for us plebs - take them back to my dorm, install them... Nov 14 06:08:37 this has to be a joke right ? Nov 14 06:08:50 no I can't take the bloat of the big distros and being tied to their repos Nov 14 06:09:24 yeah i guess if you started linux in 92, things are bloated now Nov 14 06:09:43 your android device is more bloated than your LFS Nov 14 06:09:45 X ran fine back then. on my 25mhz 386 Nov 14 06:10:38 slack4life Nov 14 06:10:42 vim4ever Nov 14 06:10:57 chrome4eatingallyourram Nov 14 06:12:34 sometimes i do stupid things Nov 14 06:13:03 like pass a uri as a parcelable extra instead of data to an intent Nov 14 06:15:04 g00s: rekt Nov 14 06:15:30 like, tyrannasaurs rekt Nov 14 06:16:49 >.> Nov 14 06:26:40 JacobTabak: sometimes I do stupid things... like not writing tests Nov 14 06:26:46 thats not stupid Nov 14 06:26:48 If I'm writing to a reference in one thread and reading from it in another, is it sufficient to declare it volatile? It seems that this handles both atomicity and freshness of data. Is that correct? Nov 14 06:26:53 that's efficient Nov 14 06:26:59 yeah... Nov 14 06:27:01 right Nov 14 06:27:02 :D Nov 14 06:27:06 kind of jk. Nov 14 06:27:14 but to be fair i'm gutting my app Nov 14 06:27:16 and all my tests are broken Nov 14 06:27:17 (I mean that a reference type is already atomic regarding reads/writes, and 'volatile' handles freshness of data.) Nov 14 06:27:23 but at least they're written so i can fix them later Nov 14 06:27:25 and not miss stuff Nov 14 06:29:18 what I would like to do, is to create place to host robolectric samples Nov 14 06:30:46 github? :O Nov 14 06:32:05 hmm Nov 14 06:32:08 more like site Nov 14 06:32:25 people start to think github and markdown will resolve world problems.... Nov 14 06:32:45 heh. my lumia 521 updated to WP 8.1 and it has a FM radio app now. and it actually works XD Nov 14 06:32:51 but it will Nov 14 06:32:55 you just have to give it more money Nov 14 06:33:06 like, $1 billion series A rounds Nov 14 06:33:22 oh my ! Nov 14 06:33:34 the devs will etiher build a great product or blow it on expensive in-office booze Nov 14 06:33:50 probably the latter Nov 14 06:34:09 lumia? Nov 14 06:34:15 windows phone? Nov 14 06:34:20 Blasphemy! Nov 14 06:35:49 i'm all about blasphemy Nov 14 06:41:07 install gentoo Nov 14 06:42:17 Hi Nov 14 06:44:25 I was able to see the custom listview with an image and label in each row with the ic_launcher Nov 14 06:44:25 I used a customlistadapter Nov 14 06:44:25 But now when I try the same for accessing an image coming from the db its not showing up Nov 14 06:44:25 I get ResourceNotFound Exception Nov 14 06:44:25 No Package identifier while getting the value for the resource with the ids Nov 14 06:44:30 for ImageView Nov 14 06:46:03 niru post code, but sounds like your are using an external image but still using R? Nov 14 06:47:56 whatitis: while I was using ic_launcher I had that in drawable folder but now the images are in the db Nov 14 06:49:02 I got that, post code, and you cant use getResources from your db. if thats what youre saying Nov 14 06:49:46 here is the adapter class http://pastebin.com/wppaRhzi Nov 14 06:51:24 whatitis: here is the mainactivity http://pastebin.com/CNxat9Zd Nov 14 06:52:20 thats hard on the eyes. but majority of that needs rethought Nov 14 06:53:31 youll need to query your db using your image id int and get the image Nov 14 06:53:51 yes its done Nov 14 06:53:55 is the image a blob in the db, or an actual file Nov 14 06:54:03 I am quering the db for Integer Nov 14 06:54:41 you need to get the actual image Nov 14 06:54:57 imageView.setImageResource(cat_Image[position]); wont work as it isnt a resource Nov 14 06:56:05 the db has {"icon":"\/data\/data\/org.ofsdp.mobilegis\/files\/img\/l\/orng-ddpolfs.png","cat":"1010"} Nov 14 06:56:10 unless after the app is compiled you somehow injected entries in your db of the resource ids of drawables in your app Nov 14 06:57:14 that seems just messy and wrong. rethink it. if your are dl images use their path to load the image from your apps data cache or files dir Nov 14 06:57:36 whatitis: ok Nov 14 06:58:33 but setimageresource that way will not work. if anything get the path from db and load image from the path to file Nov 14 06:58:43 sure Nov 14 07:00:25 plus in db what is point of \/ in the path, dont think you have to escape / chars, but im not a db guru Nov 14 07:02:50 can i get Here+ in Play or do I have to dl the apk O.o Nov 14 07:04:17 Oh man. I'm trying to recreate a situation where my background thread tries to update an Activity that has been destroyed. I'm doing screen rotation. But it seems impossible to post a message to the UI thread between someActivity.onDestroy and someActivity.onCreate. Nov 14 07:04:23 So I can't test this scenario. Annoying. lol Nov 14 07:05:07 No matter what I try (e.g., Thread.sleep()ing), onDestroy will run, onCreate will run, and *then* my message gets handled. Nov 14 07:05:23 It's kinda good, though. Makes life simple in some cases. Nov 14 07:06:56 Never mind; I found a way to test. Simply call "finish()" on the activity. Nov 14 07:07:48 And my code works. :D Nov 14 07:08:03 Downloads shall be cached when there's no Activity around to collect them. Nov 14 07:09:30 There's one thing I'm unsure about with this Reddit client: Nov 14 07:09:43 What should I do when Reddit-post comments get really deeply nested? Nov 14 07:09:50 Will I have to wrap at some point? Hmm. Nov 14 07:10:14 The site shows a "load more comments" thing. Guess I could do that. Nov 14 07:18:18 Another idea is to stop nesting after a certain point. Nov 14 07:18:28 Allow nesting to go really far and then just show them at the same level. Nov 14 07:18:31 Hmm. But that might look bad. Nov 14 07:26:01 Reddit clients on Android are so bad. The one I just downloaded prompts when you try to exit. "Are you sure you want to exit?" Really. Nov 14 07:26:15 is there no option ? Nov 14 07:26:22 same for xmpp clients ;) Nov 14 07:26:24 I think there's a setting, but it's on by default. Nov 14 07:26:33 People who make such stuff -- have they ever used Android before? Nov 14 07:26:39 no Nov 14 07:26:40 :D Nov 14 07:27:04 :) Nov 14 07:27:20 ok, rails Nov 14 07:27:26 need to get this done today Nov 14 07:29:24 gordon_ use django :) Nov 14 07:29:38 just kidding Nov 14 07:30:31 Hello people :) Nov 14 07:32:38 Thanks for just staring at me I instantly found my answer. Nov 14 07:32:48 haha Nov 14 07:32:55 score 1 point for #android-dev! Nov 14 07:32:57 got the emulator running on LFS. so my distro seems ok. Nov 14 07:33:55 Unknown0BC: We'll collect your fee at the exit. Thank you for your service. :) Nov 14 07:34:05 * g00s still figuring out what to do with recyclerview and cursors Nov 14 07:34:13 he serviced you? Nov 14 07:34:31 True. My brain has melted. Nov 14 07:34:34 This # is really full of wizards. Nov 14 07:34:36 Thank you for your custom. Nov 14 07:35:19 Or maybe he's an army guy. Didn't consider that, did you? :p Nov 14 07:35:58 just trying to see if prostitution is legal on web Nov 14 07:38:55 Is there a reason android wear doesn't simply proxy TCP connections through the phone? Why the awkward messaging api?? Nov 14 07:40:24 Does runOnUiThread (and therefore Handler.post) establish a happens-before relation? Nov 14 07:40:31 I'm guessing it has to, but I'm wanting to know for certain. Nov 14 07:40:48 yeah Nov 14 07:41:02 backed by synchronized message queue of the looper Nov 14 07:41:14 Okay, that makes sense. Thanks. :) Nov 14 07:47:03 lasserix: I've finally started the Reddit client. It's going a lot more easily than I'd expected. Nov 14 07:47:11 Famous last words, though. :D Nov 14 07:51:16 hmm, what is the best way to generate a continuous sine wave? Nov 14 07:54:58 roll a ball Nov 14 07:55:53 that generates a cycloid Nov 14 07:58:55 generates a lot of things :) Nov 14 07:59:43 spots you can just feed the sin function some step Nov 14 08:00:29 how is it usually done? a can generate a buffer with a sine wave, but when do you update it? Nov 14 08:00:55 that's up to you whatever you are doing, your question is very general Nov 14 08:01:29 i just want to play a 440 Hz sine wave when i press play and stop it when i press stop Nov 14 08:06:01 whatitis: hi Nov 14 08:06:45 the images are present in data/data/package_name/files/img/l/ Nov 14 08:07:06 and when I just do setImageBitmap with one of the images there it works prefect Nov 14 08:08:05 context.getFilesDir().getPath().toString() and then the path of the image folder. How can i repeat it for all the images Nov 14 08:29:52 if I only give my project any graphics in the drawable-hdpi section and nowhere else, what will happen on huge resolution devices ? Nov 14 08:30:08 will it display the hdpi graphics or will it fail to retrieve graphics ? Nov 14 08:31:24 so long as there is any graphics available, android will cope Nov 14 08:31:29 it will probably just look crappy Nov 14 08:31:45 Be aware that, when the Android system picks which resources to use at runtime, it uses certain logic to determing the "best matching" resources. That is, the qualifiers you use don't have to exactly match the current screen configuration in all cases in order for the system to use them. Specifically, when selecting resources based on the size qualifiers, the system will use resources designed for a screen smaller than the Nov 14 08:31:46 current screen if there are no resources that better match (for example, a large-size screen will use normal-size screen resources if necessary). However, if the only available resources are larger than the current screen, the system will not use them and your application will crash if no other resources match the device configuration (for example, if all layout resources are tagged with the xlarge qualifier, but the device is Nov 14 08:31:46 a normal-size screen). For more information about how the system selects resources, read How Android Finds the Best-matching Resource. Nov 14 08:31:48 whoahhh Nov 14 08:31:55 wasn't expecting that to be so long Nov 14 08:32:42 and i pasted the wrong thing too Nov 14 08:32:44 derp Nov 14 08:32:45 ok im done bye Nov 14 08:33:10 cpfail Nov 14 08:33:36 mmm Nov 14 08:39:41 ravilov, you are quite the regular face around here. Nov 14 08:40:02 you must be the god of android development by now. Nov 14 08:40:14 :) Nov 14 08:41:36 there are people who have been here much longer, what does that make them? Nov 14 08:41:57 deprecated gods Nov 14 08:42:28 lol Nov 14 08:42:47 because *you* are the ones still clinging to 2.3, not me ;) Nov 14 08:42:54 outdated gods. Nov 14 08:43:23 on dusty shelves. Nov 14 08:43:42 but still fully functional Nov 14 08:44:00 oh yeah i forgot your unreasonably clinging to outdated standards ;p Nov 14 08:44:02 hey at least they are forward compatible Nov 14 08:44:13 lets hope for the best :) Nov 14 09:10:18 hmm, i still can't find a good example how to play a continuous sine wave with android :/ Nov 14 09:15:27 umm Nov 14 09:15:30 did you see this? Nov 14 09:15:30 http://www.bongo.net/theremin/AndroidSound.htm Nov 14 09:17:04 nope, thanks Nov 14 09:18:48 g00s you here? Nov 14 09:20:03 Anyone know if I can just use a singleton in a service instead of having to bind to it? Nov 14 09:22:32 if when I start a new activity Nov 14 09:23:03 I do WakeLock.acquire(30*1000); does that mean it will not switch that screen off for 30 seconds? Nov 14 09:23:10 lasserix, can't see how that would work Nov 14 09:23:38 Zharf, you just start a service, pop a singleton into it, use a getInstance instead of bindService in whatever activity Nov 14 09:25:19 you could but android might destroy your service if you're not bound to it or it isn't in the foreground Nov 14 09:25:19 ChrisUK: If WakeLock is SCREEN_DIM_WAKE_LOCK or SCREEN_BRIGHT_WAKE_LOCK then yes. Why would you want to do that though? Nov 14 09:30:19 If one thread is blocking with an InputStream reading from an HttpURLConnection, can I call InputStream.close from another thread and thereby cancel the download? Nov 14 09:30:50 you probably shouldn't be passing the IS around b/w threads like that? Nov 14 09:31:23 How else can I stop a download? Nov 14 09:32:07 depends on how you are doing your threading Nov 14 09:32:41 and why aren't you using okhttp? Nov 14 09:33:20 Hmm, I'll check that out. Nov 14 09:33:32 What is the issue with two threads accessing an InputStream, BTW? Isn't that okay with locking or something? Nov 14 09:34:03 no i just think you want your IS to be local Nov 14 09:34:18 you shou;dn't be passing it around since a single thing should be responsible for it Nov 14 09:34:42 Right. It's private to one class. Nov 14 09:35:06 I'm just thinking that in future I'll need to be able to stop HTTP downloads, and so I'll have to expose a public "cancelDownload" method that will call InputStream.close or something. Nov 14 09:35:13 This will run on a different thread (the UI thread). Nov 14 09:35:19 just call httpUrlConnection.disconnect? Nov 14 09:35:26 use chunked mode Nov 14 09:36:44 or i mean, whatever thread class that's doing this, just have a cancel method, you can change it later, but for now close the IS or disconnect the urlConnection Nov 14 09:37:05 or if you use chunked mode you can put it in a while loop with a sentinal that cancel can switch to break Nov 14 09:37:07 etc Nov 14 09:37:16 Okay. Nov 14 09:37:23 but in reality just use okhttp? Nov 14 09:37:33 I seem to remember reading in my Googling that HttpURLConneciton.disconnect doesn't stop the download. Hmm Nov 14 09:37:34 . Nov 14 09:37:43 But I have like 200 tabs open now, and my computer is slowing to a crawl. Nov 14 09:38:18 lasserix, I don't think using a singleton within a service is a good idea Nov 14 09:38:26 ravilov: why? Nov 14 09:38:55 the two (the service and the activity) are likely to be two separate processes in the sam task (or at least two separate VM instances) Nov 14 09:38:57 this is for a specialized app, which will run exclusively in kiosk mode on a tablet, where there are multiplte activities needing to get a callback, however the callback is going to be fed by something that is constant Nov 14 09:39:03 no Nov 14 09:39:05 its a local service Nov 14 09:39:21 hm okay Nov 14 09:39:22 a singleton from a seperate process would not work at all. Nov 14 09:39:25 never worked with those Nov 14 09:39:36 yes I know, that's why I thought this wouldn't work either Nov 14 09:39:46 that's only true if its a seperate process Nov 14 09:40:05 dunno, overall seems risky I guess Nov 14 09:40:09 for a local process, i just don't want the developer using this, to have to add a bunch of service connections, etc in all their activities Nov 14 09:40:19 seems much easier just do start it at the beginning, set up the looper Nov 14 09:40:25 then call getInstance.registerCallback Nov 14 09:40:41 I guess the best way to know for sure is to give it a shot :p Nov 14 09:40:42 and unregister in start/stop of the activities Nov 14 09:41:04 that way the service can continually be fed data, and will propogate it to whoever is listening Nov 14 09:41:10 and then subject it to all kinds of torture using force stops and various task killer :p Nov 14 09:41:17 again Nov 14 09:41:22 kiosk mode single application tablet Nov 14 09:41:35 hm okay Nov 14 09:41:47 seems highly specialized and specific Nov 14 09:41:49 so might work Nov 14 09:42:00 why wouldn't it work anyways? Nov 14 09:42:07 the only thing is if the OS kills it for whatever reason Nov 14 09:42:14 in which case you just start sticky, Nov 14 09:42:30 grab the connection metadata from the intent, reconnect and continue feeding/ pushing data Nov 14 09:42:41 technically it might work, it just has a "bad design/bad pattern" stench for me ;) Nov 14 09:43:03 services are singletons anyways, why bother with binding if it's local? Nov 14 09:43:51 eh Nov 14 09:59:01 I would use old style menu (option menu: http://goo.gl/pKL3mR ) on android 4.4, is that possible ? Nov 14 10:00:03 set your targetSdk to 10 Nov 14 10:01:05 ravilov: done, it works but only on android 4.3. because my app requires FEATURE_ACTION_BAR Nov 14 10:01:59 using FEATURE_ACTION_BAR and tartgetSdk=10, on Android 4.4 and Android 5, menu appears like action bar overflow menu Nov 14 10:03:15 not sure then Nov 14 10:06:53 Hi all, on the android site it says you can use simple junit tests for testing non android specific code. Does anyone know how this is done in android studio? Nov 14 10:17:38 feature definietly works better when you're on branch that you implemented it Nov 14 10:17:55 it doesnt work before merge... Nov 14 10:25:46 Clockworkant: Are you using Eclipse? Nov 14 10:26:11 If you're using Eclipse, it's easy. If not, it's difficult or impossible (take your pick). Nov 14 10:27:52 Clockworkant: Sorry, didn't read. Nov 14 10:28:22 Some people have set this up in Android Studio, but it's a little tricky. Try googling "android studio robolectric" or some such. Gotta run. Nov 14 10:31:00 TacticalJoke I was hoping to do it without roboelectric Nov 14 10:33:21 I'm detecting a glitch in the matrix! Nov 14 10:34:29 more like a sink hole ;p Nov 14 11:10:17 hi, my eclipse have this problem: Element is unknown, anybody can help me? Nov 14 11:13:47 anybody know a cool UI widget that lets you show a measurement relative to two thresholds? imagine temperature measurement on a scale and having a line for "too hot" and "too cold" Nov 14 11:15:30 Quick question: Can I create repeating AlarmManager with varying time delays? Nov 14 11:25:23 anybody? Nov 14 11:25:36 no Nov 14 11:26:04 no Nov 14 11:31:18 hi guys, im trying to create a new parse project and im receiving a strange errro saying cannot resolve symbol ‘Parse’ Nov 14 11:31:26 I have followed the guides and still not working Nov 14 11:31:31 all help is appreciated Nov 14 11:46:09 most people here don't use parse ... where's the tutorial you're following ? Nov 14 11:51:07 what have I missed? Nov 14 11:57:05 does anyone know how those drop down suggestions work in android? Nov 14 11:57:29 I'm doing a sign up flow and I want to suggest the users email address without pre-filling Nov 14 11:57:35 and do the same for their phone number Nov 14 11:58:26 is this just automatic based on inputType or is there something I need to hook an adapter to or something? Nov 14 11:58:59 just started teaching myself how to use android studio... noticed the tuts for making your own apps is a little different since its using gradle build Nov 14 11:59:08 so basically i had to do a little comparing and reading tooltips that android studio throws up Nov 14 12:01:34 Ankhwatcher: http://developer.android.com/reference/android/widget/AutoCompleteTextView.html Nov 14 12:06:22 bankai_au: ah ha, very nice. thank you Nov 14 12:11:10 hi guys, im running android studio and im trying to get the stop button to show on my toolbar. how can i do this? Nov 14 12:12:47 Anyone else experiencing problem with TextUtils.equals in android studio 0.9.3?? Nov 14 12:28:44 TextUtils is a utility class with nothing but static methods, so you'd never use TextUtils#equals Nov 14 12:33:21 SimonVT, TextUtils does have a static boolean equals(CharSequence, CharSequence) though ;) Nov 14 12:34:18 exactly :) but the new android stuido 0.9.3 thinks i'm calling the Object.equals Nov 14 12:35:56 Works here Nov 14 12:36:27 Kannibal, that would depend on your code, wouldn't it? maybe you should post some Nov 14 12:36:42 It still works and compiles but the IDE complains Nov 14 12:36:55 hi Nov 14 12:37:01 No complaints here Nov 14 12:37:32 android studio is still beta, eh? Nov 14 12:37:50 i have this situation: http://pastebin.com/5SvfrwBc , but when i press in item on listview o the color arround the item is blue, how i can make change background and color on click? Nov 14 12:38:05 AC-130U, what's the official page say? Nov 14 12:38:41 http://imgur.com/2slactX Nov 14 12:39:00 oh. 0.8.14 is beta, thats what it says Nov 14 12:41:15 Kannibal, that is weird, try restarting AS Nov 14 12:41:33 have done that already Nov 14 12:42:39 I will just ignore it and wait for a fix. :) Nov 14 12:43:08 I guess thats what you get when using canary channel Nov 14 12:44:52 or beta quality software in general Nov 14 12:45:01 no matter what anyone might say Nov 14 12:54:23 hi guys, im trying to create a textview with rounded corners and i am creating a GradientDrawable and settting the Corner Radius. However, i see that i am sending in a float value. is this in pixels or dp? Nov 14 12:57:06 Hi! How do I get settings values from a PreferenceFragment? I googled and theres a lot of material but I cant find anything that answers my question. Nov 14 13:25:30 Hello Everybody! I have a really annoying issue with android studio und the google maps api. Please look over http://stackoverflow.com/questions/25867876/android-sha1-release-keystore-not-working-with-google-maps . You would save my day! Thank you :-) Nov 14 13:26:22 http://i.imgur.com/G33OLNJ.jpg <- $2 occulus rift Nov 14 13:26:36 (not counting the old nexus 7) Nov 14 13:27:16 I'll be glad to explain if anyone is bored and wants to try it Nov 14 13:27:28 (it does work) Nov 14 13:27:53 still waiting for my google cardboard to compare Nov 14 13:30:00 is there a well known repository of free drawables? for example im just looking for a small HD/high def image to use as a 'badge' Nov 14 13:30:37 eh.. off the top of my head, I would consider checking turbosquid and setting the max price to $0 Nov 14 13:30:51 just make sure the license is liberal enough on each given one Nov 14 13:31:13 good deal thanks Nov 14 13:31:28 to get a good one you might have to get a 3d model, light it appropriately, and export the image yourself Nov 14 13:49:24 if i have a whole code base in native... (game stuff), is it better to have my activity in native or in java? Nov 14 13:49:38 what do people normally do? Nov 14 13:49:43 pros/cons? Nov 14 13:50:28 can i actually get away with 0 java in the application? Nov 14 13:50:47 (i presumed most system calls would be in java) Nov 14 13:53:25 no you at least have to hava a java wrapper Nov 14 13:54:02 DrBenway: Qt does it like that, a java activity that calls all the c++ code Nov 14 13:54:34 thats what i have right now but i just saw people implementing native activity Nov 14 13:54:56 if i can avoid having to do interops and what not... i wouldn't mind Nov 14 13:56:10 and i really dont know much about java, so i feel more comfortable with the native Nov 14 13:59:36 http://discuss.cocos2d-x.org/t/should-we-remove-nativeactivity/12229/6 <-- discussion about it Nov 14 14:01:01 Hi all. Is it possible to generate a bitmap / imageview which contains a qrcode based on a string? Nov 14 14:01:17 like: i have a string and need to show the correct qrcode in my app Nov 14 14:03:30 Sure, nothing's stopping you from writing an ImageView that does that Nov 14 14:04:46 maybe something like https://github.com/FoamyGuy/QRMaker Nov 14 14:05:13 i think he asks for something like Bitmap createQRCode(String str) Nov 14 14:06:57 Ashiren, cool! can this be done offline? Nov 14 14:08:35 hmm Nov 14 14:09:12 try looking for zxing Nov 14 14:09:36 https://github.com/zxing/zxing Nov 14 14:23:27 anything wrong with using gson to turn objects into JSON for me to pass in Bundles? Nov 14 14:25:06 Greetings. I'm trying to send a simple POST request to a PHP script, but the server doesn't receive the POST parameters. Could someone take a look? http://pastebin.com/ap6pWtUc Nov 14 14:28:18 hi guys, im trying to add images to support multiple screen sizes and i have added a folder drawable-mdpi under the res folder but for some reason the project does not show the folder Nov 14 14:30:40 RobbingHood Use Retrofit instead http://square.github.io/retrofit/ Nov 14 14:31:18 pangelovski what IDE you using Nov 14 14:31:29 mattblang: Android Studio Nov 14 14:33:22 mattblang, no way of doing it with the "built-in" HttpClient? Nov 14 14:35:01 RobbingHood sure, its just a PITA haha Nov 14 14:35:26 fixed it Nov 14 14:35:31 Thing is, if I do the exact same thing just with GET it works perfectly fine Nov 14 14:35:34 pangelovski what was it Nov 14 14:59:25 I am drawing polylines on a google map using a set of co-ordinates. I need to be able to change the colour of individual line segments along the path. I have tried several different approaches and spend considerable time researching but I cannot achieve this. It is an easy implementation on iOS but it does not seem to be a feature for the Android SDK. Does anyone have any insight? Nov 14 15:03:22 Heh, developing on Lollipop reduces my build times from 2 minutes to 20 seconds Nov 14 15:05:43 eh? Nov 14 15:11:36 multidex Nov 14 15:13:23 you can do multi dex before lollipop Nov 14 15:13:49 I should try out multidex Nov 14 15:14:24 someone's even made a pull request implementing it for me Nov 14 15:15:27 Yes you can, but if you set targetApi as lollipop, it uses the Lollipop native multidex support which doesn't need to do clever stuff with the dex Nov 14 15:15:37 which apparently has the effect of increasing build times about 5 times Nov 14 15:19:13 eh? it should be the same... Nov 14 15:20:43 I don't remember seeing version specific code in android builder Nov 14 15:22:17 hello, i have a chat application which connects to a xmpp server. Where is best to place the connect to the server method? in the MainActivity onCreate? in the MyApplication constructor? please help Nov 14 15:22:34 a service Nov 14 15:23:36 how can i make a service? Nov 14 15:24:48 i'm documenting about it, thanks Nov 14 15:26:53 can I make reycler view be both horizontal and vertical scrollable? Nov 14 15:27:16 might as well use proguard instead of multidex if it took 2 minutes Nov 14 15:28:40 The android docs (https://developer.android.com/tools/building/multidex.html) talk about the difference but don't go into specifics Nov 14 15:29:59 yoavst: yes Nov 14 15:30:18 Estel: how? the regular GridLayoutManager doesn't do that Nov 14 15:31:32 Dunno, but recyclerview is generic enough to allow it Nov 14 15:32:35 I could write a custom LayoutManager and... But :/ Nov 14 15:33:12 Someone already wrote that, it's on github Nov 14 15:33:13 Somewhere.. Nov 14 15:34:35 lucasr's TwoWayView might have something, but the pretty pictures only show one dimensional scrolling Nov 14 15:34:43 https://github.com/lucasr/twoway-view Nov 14 15:34:58 Estel: Yea, I was trying that Nov 14 15:37:06 their GridLayoutManager (also android support v7 one) support only one dimensional scrolling Nov 14 15:38:39 "TwoWayView's core layout logic is based on the assumption that you either scroll horizontally or vertically. Implementing simultaneous horizontal & vertical panning is probably a topic for a separate library." Nov 14 15:41:00 Hey I was wondering what is the best way to setup updating the current values in my db when a new alarm time is set? Nov 14 15:48:07 Mugwump101: depends how you use your db. if you have a service, let the service hold the db and the broadcast receiver triggers the service Nov 14 15:48:22 Mugwump101: otherwise you'll need to make sure something else doesnt' ahve your db open for writing already Nov 14 15:49:22 I have a notification service and an alarm receiver Nov 14 15:51:33 Mugwump101: well the fundamental issue is only one thing can open the db writeable at a time Nov 14 15:52:06 Mugwump101: so you have to make sure that your timer isn't trying to open it while something else holds it, or you have to have something else that holds it that the timer can ask to write to it for you Nov 14 15:54:22 hmm Nov 14 15:55:02 I think at this point, the only problem I am likely to see is if I am trying to save data to the database and an alarm pops up as soon as I save data... then I would have that problem right? Nov 14 15:59:14 hmm, is there an xml drawable I can use to invert the colors of an existing drawable? Nov 14 15:59:50 anyone experienced with setting up CI with android(gradle) Nov 14 16:04:18 Has anyone ever seen the "TrustModifier" thing? TrustModifier.relaxHostChecking(connection) Nov 14 16:04:19 Hi. Nov 14 16:04:26 I need some help with leaked windows. Nov 14 16:04:43 http://dpaste.com/3P2ZSAW - I am running this code in asynctask doInBackground() method. Nov 14 16:05:11 I am starting a progress dialog in onPreExecute() and dismissing it onPostExecute() Nov 14 16:05:18 dragorn: Do you know if there's a good example on this online? Nov 14 16:05:49 When I add a new Date(timestamp) in doInBackground I am getting a leaked window error. What am I doing wrong? Nov 14 16:06:28 can you give asynctask code? Nov 14 16:06:33 do you use dialogFragment Nov 14 16:08:25 Ashiren, http://dpaste.com/0CM6FTG Nov 14 16:08:30 No, I am using ProgressDialog Nov 14 16:09:37 http://dpaste.com/0ZJYV95 Nov 14 16:09:40 Ashiren, ^ Nov 14 16:11:22 maybe because you have new Date(timestamp) inside your for loop? Nov 14 16:12:59 pkp: does it work when you remove dialog code? Nov 14 16:14:00 Ashiren, it works when I remove new Date() actually. Nov 14 16:14:53 :o Nov 14 16:15:32 Ok I was'nt really ready for a neet little puzzle right now when I thought I was going to try use this neet navigation drawer thing. Nov 14 16:15:55 Mugwump101: it totally depends on your design architecture, I have no idea. You need to design your accesses to the database so that two things never open it for writing at the same time; that's up to your setup. Nov 14 16:16:13 I mean, I thought I was going to find the OnSelected method or something and get some code going in it. Nov 14 16:17:16 Ashiren, Got it! The problem was not with the dialog, but with Date.. it needs long to passed. I was passing a string. Nov 14 16:17:38 Do any of you ever use the code generated when you start an android application with the navigation drawer ? Nov 14 16:22:40 Puzzling the one sure way to sort things out and figure them out ( eventually ) Nov 14 16:24:34 so I've got a detail page with enough information to warrant tabs, but I also want to put the detail page in a ViewPager. ViewPager with tabs seems a little weird. Nov 14 16:24:36 ugh, how do I style the mediarouter-v7 button Nov 14 16:28:32 mattblang, have you ever written an async task for something inside a viewpager? Nov 14 16:29:45 Mugwump101 I haven't, I typically stay away from async task in general. why? Nov 14 16:31:10 looks like mediarouter-v7 hard-codes the theme information :( Nov 14 16:31:13 does anyone have any nice resources for building and publishing android libraries to maven? Nov 14 16:31:56 I just do sbt publish-signed and it shows up on maven... Nov 14 16:32:14 pfn: and i have to register on maven i assume Nov 14 16:32:19 of course Nov 14 16:32:27 there are guides for how to register on sonatype oss Nov 14 16:32:28 pfn: someone said that they accept users manually Nov 14 16:32:28 ;/ Nov 14 16:32:38 it's a manual process for the first time publishing Nov 14 16:33:08 return new ContextThemeWrapper(context, isLightTheme ? Nov 14 16:33:08 R.style.Theme_MediaRouter_Light : R.style.Theme_MediaRouter); Nov 14 16:33:16 come on... make it so I can override this shit :( Nov 14 16:38:22 mattblang, I started to load images and strings onto my views inside my viewpager from my database. While it works, it has made swiping between views rather slow. I was thinking I might have to move the db operations inside an async task? I was wondering if that was the right way to go? Nov 14 16:41:47 Mugwump101 where are the images coming from Nov 14 16:42:10 hi guys, I have a UI with master/detail fragments. I'd like to be able to set the selection in the master fragment and highlight the selection. Nov 14 16:42:20 images are drawables Nov 14 16:42:49 Mugwump101 are you doing any resizing on them Nov 14 16:43:21 yes because normally they're huge, so I have to resize them to fix my screen Nov 14 16:43:42 Mugwump101 yeah, that is probably your problem. resizing a large image is very intensive Nov 14 16:43:50 but i'm unable to make it work. I have a selector drawable xml with android:state_selected="true" as one of the choices for a background, but when I call gridView.setSelection() with the appropriate position, it does not seem to apply this background. Nov 14 16:43:58 any idea what I might be doing wrong? Nov 14 16:44:02 hm perhaps but when I was not loading them from a list from the db Nov 14 16:44:11 it was fast Nov 14 16:44:36 Now I am getting integers from the database that correspond with getting an image from an enum Nov 14 16:44:55 and that list is dynamic, so I think that's why Nov 14 16:46:42 Mugwump101 does each element in the pager represent a list item, or do different pager elements represent different screens that themselves contain lists populated from the db? Nov 14 16:48:56 I'm not sure exactly what you mean but I think it's the former. I have a viewpager that has moderately similar views. The only differences would be strings and images that depend on what's saved to the db Nov 14 16:49:41 The god called Debug is so slow ! Nov 14 16:49:46 but very powerful. Nov 14 16:49:51 anyway guys have fun. Nov 14 16:49:55 I have to go Nov 14 16:50:20 \o Nov 14 16:51:11 Mugwump101 can you show me your ViewPager code Nov 14 16:51:42 for me to use Joda-time.jar, do i just drop that in my /libs folder and good to go? Nov 14 16:51:52 mattblang, this is essentially, how I am populating the images and strings array to display on the views. http://pastebin.com/nxCAxSX9 Nov 14 16:52:09 skrite you using AS or Eclipse? Nov 14 16:52:18 eclipse Nov 14 16:52:29 This is the focus of the problem where regionsList depends on a db query Nov 14 16:52:35 skrite I believe so then. someone correct me if I'm wrong Nov 14 16:52:42 mattblang: thanks Nov 14 16:54:29 Mugwump101 how big is regionList Nov 14 16:55:03 That's the problem, it is a dynamically sized array Nov 14 16:55:22 So sometimes it's 2 items, sometimes it's 10 items. It depends on some other factor Nov 14 16:55:35 but let's say right now it's only 5 items Nov 14 16:55:46 Weee! official 5.0! Nov 14 16:55:47 but even with 2 items, it's slow Nov 14 16:55:59 Mugwump101, what's up? Nov 14 16:56:14 Afzal you got 5.0? what device? Nov 14 16:56:22 Afzal, not much. Just want to optimize a piece of code :P Nov 14 16:56:26 Nexus 5 Nov 14 16:56:39 Afzal oh snap, gotta check my Nexus 7 Nov 14 16:57:05 Mugwump101, nice! I like optimization :D Nov 14 17:01:36 Mugwump101 do something, just to satisfy my curiosity. would it be hard to just replace your images with just your launcher icon? Nov 14 17:03:00 no, not hard but what you are thinking? the thing is when I had this set up with a known integer from my enums, it was fast. Nov 14 17:03:08 so I think it's the db operation that causing it to be slow Nov 14 17:04:28 Mugwump101 link me your actual ViewPager if you can. Nov 14 17:05:25 It's horrible long but what snippets should I focus on? I think the list population with db code? Nov 14 17:08:27 Mugwump101 I want to see how you are creating a fragment in getItem Nov 14 17:08:44 actually i am not using fragments Nov 14 17:09:37 I just have this: public int getCount() { return numberOfPages.size(); } Nov 14 17:09:55 mattblang, umm I flashed the image Nov 14 17:10:17 Mugwump101, you should do some method profiling Nov 14 17:10:24 Afzal ah, wasn't an OTA? Nov 14 17:10:38 nope, I was on L preview 2 Nov 14 17:12:08 When I swipe between views: I get this message, I/Choreographer﹕ Skipped 58 frames! The application may be doing too much work on its main thread Nov 14 17:12:26 that's why I am thinking about putting this operation on a separate thread Nov 14 17:12:56 Mugwump101 so you are doing a db operating each swipe then? Nov 14 17:13:00 *operation Nov 14 17:14:28 Mugwump101 what I am getting at is you could get a cursor and just move through it as you swipe views Nov 14 17:15:08 Mugwump101 for it to be your db you must be doing a lookup on each swipe I would imagine Nov 14 17:15:27 yes that might be it :S Nov 14 17:15:37 Let me show you Nov 14 17:18:05 mattblang, http://pastebin.com/NZjDYNDh Nov 14 17:22:16 Mugwump101 do you run that code everytime you swipe? Nov 14 17:23:01 This code is in onCreate() Nov 14 17:23:06 so yes Nov 14 17:23:12 Mugwump101 yeah, you must since that is getting your regions Nov 14 17:23:40 Mugwump101 so then you are using fragments? Nov 14 17:24:01 no, just normal views Nov 14 17:24:08 dynamic views Nov 14 17:24:15 using pageradapter Nov 14 17:24:27 Mugwump101 you said this code is in your onCreate though? Nov 14 17:24:43 yes Nov 14 17:26:45 Mugwump101 sorry, I think I'm confused. onCreate would run once when your Activity starts. What happens when you actually swipe (in your getItem override) Nov 14 17:28:32 This online example is very similar to what I have: http://www.androidbegin.com/tutorial/android-viewpager-gallery-images-and-texts-tutorial/#comment-1638545837 Nov 14 17:29:53 Mugwump101 okay, so if you are only running that code you linked me in onCreate, it shouldn't be causing the lag on swipe, because you are only doing the database operation once in the beginning. Nov 14 17:31:55 Mugwump101 am I correct that the database operation is only running in onCreate? Nov 14 17:32:54 yes pretty much Nov 14 17:34:43 Mugwump101 then it couldn't be database operations slowing down the swipe right? Nov 14 17:38:47 I think onCreate is called everytime the user swipes Nov 14 17:38:51 because a new view is created Nov 14 17:38:53 on swipe Nov 14 17:40:26 Mugwump101 only if you are calling recreate Nov 14 17:40:39 Mugwump101 or restarting it manually with a setIntent Finish() Nov 14 17:41:05 Mugwump101 excuse me, startActivity finish() Nov 14 17:41:28 maybe but I think that is what is happening Nov 14 17:42:03 Mugwump101 how many configurations do you have for the different images Nov 14 17:45:25 hi all, quick question about opensl es Nov 14 17:46:34 is the standard way of having an onClickListener for an item in the RecyclerView to just set it on the item itself ? Nov 14 17:46:52 actually, I think the problem is about permssions, logcat outputs that the interface is not supported? Nov 14 17:47:04 oops permission* Nov 14 17:48:26 is there a convention for id naming? Nov 14 17:48:38 anyone using ndk? Nov 14 17:50:16 is there an rxjava channel? Nov 14 17:51:10 so this is probably the wrong place to ask this, but why isn't there a version of the downloads app with full file access and is the native file explorer code available in aosp? Nov 14 17:53:32 mattblang, not sure what you mean by configurations Nov 14 17:57:55 okay, maybe someone may help with the problem I am having, I am using android ndk, and I am not being prompted for permission confirmation and thereby not allowed to modify audio settings Nov 14 18:03:42 Morning everyone. Nov 14 18:03:52 dionis, your statement doesn't make much sense Nov 14 18:04:01 Guys is it worth shifting to Android Studio? Nov 14 18:04:14 Or should I stick to Eclipse? Nov 14 18:04:23 try it and see for yourself Nov 14 18:04:38 that is the only sensible answer to this question Nov 14 18:06:34 I personally use Android Studio KaylieG. Nov 14 18:06:51 I know google will eventually switch over to that as the main platform, so why not learn it now? :) Nov 14 18:07:08 And so far, I have not had any issues, and I launched an app that I developed 100% using it. Nov 14 18:07:27 Oh I ask because my network is really slow, so even downloading it would take hours for me, so I'd like to be sure first. Nov 14 18:07:36 Oh that's cool Nov 14 18:07:46 Is it faster than Eclipse in your experience? Nov 14 18:08:04 morning Nov 14 18:08:32 KaylieG, it is worth a shot, that is the only certain thing. the rest is entirely individual. Nov 14 18:08:52 Cool, thanks guys Nov 14 18:08:58 some have had no issues while others have had all the issues Nov 14 18:09:01 KaylieG slower if anything, especially if you have less than 4G ram Nov 14 18:09:06 just like with eclipse Nov 14 18:09:08 mostly because of gradle Nov 14 18:09:11 KaylieG, if you're looking for "faster", I'd say probably not. probably about the same if you have enough RAM Nov 14 18:09:25 Just one last thing, is it easy to import Eclipse based projects into Android studio? Nov 14 18:09:32 no Nov 14 18:10:01 KaylieG, if you're looking for opinions, I'd say give it a shot, importing a project is easy enough and it's clearly the future Nov 14 18:10:26 Alright, sounds good, thanks! Nov 14 18:10:43 also your questions are all weird Nov 14 18:10:49 it's more flexible & has better refactoring tools / shortcuts, IMO Nov 14 18:10:52 "is it easy"? what do you consider easy? Nov 14 18:11:05 it is too relative Nov 14 18:11:06 sorry about the questions Nov 14 18:11:18 i just meant as in, are there any complications? Nov 14 18:11:19 KaylieG, for me it feels faster than Eclipse Nov 14 18:11:19 KaylieG, apology accepted, don't let it happen again Nov 14 18:11:33 go kate dev ndk write c like it should be Nov 14 18:11:52 Also I kick-started android developement yesterday with AndroidStudio and it works flawlessly so far Nov 14 18:11:57 ^KaylieG Nov 14 18:12:04 KaylieG, eclipse works with ant while AS works with gradle, I figure there will be issues at least there Nov 14 18:12:18 Uh, if your project has non-trivial build scripts, i imagine you'll have to re-do those Nov 14 18:12:28 I recently migrated a maven build to gradl Nov 14 18:12:41 Oh no, most of my projects are really mostly for practice, nothing major yet so I should be good Nov 14 18:12:44 it took about a week, but mainly because of some weird stuff in the test suite Nov 14 18:12:54 KaylieG, also will it be "easy" depends largely on your projects themselves Nov 14 18:13:06 Have never even used maven, yet most libraries i've used seem to suggest maven or gradle Nov 14 18:13:08 ...but you just clarified that Nov 14 18:13:17 i guess i'll have to looking into those as well Nov 14 18:13:29 look* Nov 14 18:13:40 lookinging Nov 14 18:13:41 :p Nov 14 18:13:58 overall very happy with the move to gradle, though Nov 14 18:14:05 * ravilov isn't Nov 14 18:14:22 at this point I can't stan AS or anything about it Nov 14 18:14:35 every time I try to use it, I always just have to go back to eclipse Nov 14 18:14:49 why is tht? Nov 14 18:15:02 because AS has sooooooo many issues... Nov 14 18:15:11 yesterday it failed upgrading miserably Nov 14 18:15:14 much errors Nov 14 18:15:24 Would I have to redownload the sdks and drivers and everything else that i downloaded using the sdk manager? Nov 14 18:15:46 out dev team has been using it since about about 0.4 and haven't had many issues other than upgrading. which is easy as blowing away ~/.AndroidStudio* if there is a problem. been pretty stable since beta though Nov 14 18:15:49 our* Nov 14 18:15:52 not necessarily, but impossible to sat for sure Nov 14 18:16:23 just set your ANDROID_HOME variable to where your sdk is located Nov 14 18:16:37 I think AS picks that up now... Nov 14 18:17:18 oh wow cool that would be great if it does Nov 14 18:17:31 lyles, here's a short summary of its failures: first it complained I can no longer have the SDK inside the AS folder (which AS put there itself to begin with); next it failed with fatal error of not being able to delete some file (svn4idea.jar or somesuch), I deleted said file without a hitch; next it complained it cannot *find* that same file Nov 14 18:17:36 at that point I just gave up on it Nov 14 18:18:08 if not, I think you can select it in the Project Structure menu Nov 14 18:18:14 if you're on mac it's CMD + ; Nov 14 18:18:41 shekibobo, AS will ask you about the SDK folder on first run *and* if the previously configured one becomes invalid (removed or something) Nov 14 18:18:47 ah ok. good to know. yeah, the sdk bit was in the release notes Nov 14 18:19:13 lyles, that was just an unnecessary annoyance, the other things are just plain failures Nov 14 18:22:18 downloading now, thanks guys, i'll go watch a movie or something till it downloads Nov 14 18:22:49 try not to watch a streamed movie :p Nov 14 18:22:57 c# 6, nice. no big things lots of small syntax improvements. even null conditional operators ans string interpolation Nov 14 18:23:06 now that everybody is awake, how does the debug permission system work Nov 14 18:23:07 haha no, i even have to buffer youtube Nov 14 18:23:16 like even on 240p Nov 14 18:23:50 exception filters, interesting Nov 14 18:23:56 g00s, wrong channel? p Nov 14 18:23:59 :p* Nov 14 18:24:20 ravilov ok, lets talk about the cool new java things we can use on android Nov 14 18:24:32 sure thing Nov 14 18:24:38 it's applicable with Xamarin :) Nov 14 18:24:38 ...okay I guess we're done Nov 14 18:24:39 Nov 14 18:25:28 well still, I just meant it's as relevant to android as, say, talking about new features of ruby on rails ;) Nov 14 18:25:44 hey gordon_ ravioli wants to chat about RoR Nov 14 18:25:53 :D Nov 14 18:25:57 :/ Nov 14 18:26:07 <--- not a food Nov 14 18:26:13 Hakaslak do you use xamarin ? Nov 14 18:26:29 I've tried, I dislike the tooling - feels to fragile on VS Nov 14 18:26:36 still trying when I have time to waste Nov 14 18:26:54 apparently visual studio now comes with an android emulator Nov 14 18:26:59 or apparently will in 2015 Nov 14 18:27:00 (just for the record, I've never used RoR, it was just the first thing completely unrelated with android that came to mind :p ) Nov 14 18:27:12 Hakaslak ok, well just quick q. if you want to use MS tools to dev for android, they would be limited to xamarin correct? i don't think they are supporting any java stuff Nov 14 18:27:14 guys, how can i eval() in java? Nov 14 18:27:34 for now, yes - only time will tell what the new Microsoft throws out to us Nov 14 18:27:34 OverCoder, no such thing in java Nov 14 18:27:43 OverCoder: not easily. There are some java-bytecode-generating projects out there, and I think Google released one specifically for generating Dalvik ASM. Nov 14 18:27:53 Hakaslak OK, so even the MS Android emu is really for running Xamarin code, which makes sense Nov 14 18:28:09 actually i have been able to eval using scripting engine but that takes 0.8 seconds to execute on my pc Nov 14 18:28:14 since the partnership between Xamarin and MS is pretty tight, I imagine a lot of the cross platform announcements (iOS/Mac/Android development) on OSX and Linux would be built upon what Xamarin is doing Nov 14 18:28:16 so on android it will take long i believe Nov 14 18:28:25 it's just that Microsoft is finally branding it and throwing their official support behind it all Nov 14 18:28:29 OverCoder: https://code.google.com/p/dexmaker/ is probably the most-likely-to-work thing. Nov 14 18:28:44 btw, is this normal behaviour for a running app that does nothing but sending a request to a server? http://qs.lc/bcj2s Nov 14 18:29:04 thanks groxx Nov 14 18:29:05 but a competitor ti IntelliJ that is not total crap would be good, and I really do like VS as an IDE Nov 14 18:29:29 OverCoder, I don't see how "scripting engines" are relevant here, eval in java just doesn't exist by design, it is in stark contrast with the very philosophy of the language Nov 14 18:29:54 ravilov, let me paste something for you.. Nov 14 18:30:23 http://p.samuraimanpurse.com/cGt9zGkf.txt Nov 14 18:30:34 i use javascript's engine Nov 14 18:30:50 anyone? Nov 14 18:31:11 so you want to run js in java? Nov 14 18:31:35 idk i just want to eval Nov 14 18:32:00 um Nov 14 18:32:02 javascript would be pretty easy, fwiw. make a webview, pass it javascript code. Nov 14 18:32:17 actually my app doesn't have a UI Nov 14 18:32:23 so no webview Nov 14 18:32:31 I still have no idea why you're mentioning javascript here Nov 14 18:32:35 yes, other languages have eval Nov 14 18:32:37 java does not Nov 14 18:32:40 end of story Nov 14 18:32:41 so what is result when you run that code? Nov 14 18:32:57 is evals but it take 0.8 seconds on my pc which is long Nov 14 18:33:17 not surprised Nov 14 18:33:36 you're not eval()ing in java, you're using a whole entire different engine and eval()ing stuff in there Nov 14 18:33:50 other than running inside the java VM, it really has nothing to do with java Nov 14 18:34:04 how much of that is boilerplate and starting the scriptengine javascript engine? Nov 14 18:34:11 what ravioli said Nov 14 18:34:26 the whole 0.8second is for starting the engine Nov 14 18:34:28 just thinking Nov 14 18:34:30 probably almost all of it :) and I wouldn't be surprised if it took 10+ seconds on a phone, if it ran at all Nov 14 18:34:41 i could make my app as a service, and start the engine just as the service starts Nov 14 18:34:48 so evals would takes a ms Nov 14 18:34:56 ravilov, thanks just noticed your response, when my activity lacks code, and when I run the program over adb, I have no permissions therefore cannot modify audio settings... Nov 14 18:34:57 those won't take much ram right? Nov 14 18:35:00 do you really need to use js? Nov 14 18:35:07 then what the hell can i do Nov 14 18:35:18 so what do you not understand Nov 14 18:35:26 dionis, still makes no sense, how does your activity "lack code"? Nov 14 18:35:32 ndk Nov 14 18:35:42 c code through the java platform Nov 14 18:35:55 OverCoder, actually they will, as you're embedding a whole entire another language engine inside your activity Nov 14 18:36:17 i am using a native activity Nov 14 18:36:20 just confusing the basic principles here, it looks like Nov 14 18:36:23 if that helps Nov 14 18:36:28 btw, is this normal behaviour for a running app that does nothing but sending a request to a server? http://qs.lc/bcj2s Nov 14 18:36:43 alright alright Nov 14 18:36:53 OverCoder: http://divineprogrammer.blogspot.com/2009/11/javascript-rhino-on-android.html will get you started. ScriptEngine is a java thing. Android doesn't have a JVM but a DalvikVM which is not identical but similar. Source: https://stackoverflow.com/questions/8374016/how-to-execute-javascript-on-android Nov 14 18:36:56 dionis, I know what is ndk, but I still don't understand your issue; however I am not very proficient in ndk so there is that Nov 14 18:37:02 should probably wait for someone else to respond Nov 14 18:37:02 RobbingHood: are you sure those logs are from your process? Nov 14 18:37:20 JesusFreke, yes Nov 14 18:37:37 o Nov 14 18:37:41 RobbingHood: what's the timeframe there? Nov 14 18:37:41 thanks Hakaslak Nov 14 18:37:51 Are those logs generated over minutes? seconds? Nov 14 18:37:59 eons Nov 14 18:38:21 JesusFreke, ~2 of those messages per second Nov 14 18:38:24 OverCoder: in the same thread a guy posts a hidden webview that can evaluate JS in the background that works on Android 3+ https://github.com/evgenyneu/js-evaluator-for-android Nov 14 18:38:37 oh, well when you test an app over adb, in java, how do you allow a permission on the device, are you being promted on the device? Nov 14 18:38:43 * OverCoder opens the link Nov 14 18:38:48 Hakaslak, ugh, don't even, that sounds like a horrible hack Nov 14 18:38:53 if you have an activity that has a wake lock and then you open another activity can it decide you app has been taking up too much time and shut screen down automatically? Nov 14 18:39:06 RobbingHood: I would suggest using the heap related stuff in ddms to determine what objects are getting allocated and GC'd Nov 14 18:39:25 ravilov, ^ Nov 14 18:39:45 ? Nov 14 18:39:49 That should give you an idea of what is running in the process Nov 14 18:40:47 JesusFreke, how do I do that? Memory monitor? Nov 14 18:40:50 I have an activity that has some kind of wake lock and then as soon as I open a second activity the Android OS decides to shut the screen down Nov 14 18:40:51 i think i'm going to invent an eval function Nov 14 18:41:08 OverCoder, I still don't understand what you need JS for that can't be done in Java Nov 14 18:41:14 RobbingHood: I don't recall how to use it exactly. Open up ddms and experiment ;) Nov 14 18:41:17 I think it is because the new activity doesnt have a wake lock and the OS is deciding it has had enough or something Nov 14 18:41:35 i still don't understand what are you trying to tell Nov 14 18:41:36 me Nov 14 18:42:05 he's wondering why are you even bothering with all this pesky eval stuff Nov 14 18:42:13 eval()s are evil anyway Nov 14 18:42:19 OverCoder: for java? all you need to do is write a java compiler. easy! :p Nov 14 18:42:20 I think more people than myself are wondering the same thing Nov 14 18:42:34 lel Nov 14 18:42:42 no really, i'm going to make an eval function Nov 14 18:42:44 I mean, I'm writing an app with React and PhoneGap but that's because I don't like Java Nov 14 18:42:45 * OverCoder makes it Nov 14 18:42:48 Hakaslak, that is why I was able to explain it ;) Nov 14 18:43:01 Hakaslak, are you using evals in there? Nov 14 18:43:26 no Nov 14 18:43:34 * ravilov does a lot of javascript stuff professionally, but avoids eval whenever possible Nov 14 18:44:00 * Hakaslak does javascript professionally, but doesn't really know what's going on most of the time Nov 14 18:44:44 Im using a sticky service to maintain a xmpp connection to receive messages. Every time I try to kill the service using stopService the same service is restarted again. How can I definitively kill a sticky service? Nov 14 18:45:08 * ravilov also avoids using ginormous general purpose libs like jquery and does all his own code most of the time Nov 14 18:45:13 best way to know what's going on ;) Nov 14 18:45:29 it will group numbers in a list, and expressions in another list, and a for-each loop is going to calculate things, but the only thing i'm stuck on is how am i going to calculate them on priorities, like, multiply before bla bla, etc. Nov 14 18:45:30 ravilov is a badass unlike me, listen to that guy Nov 14 18:45:57 eh, I've been yelled at already for refusing to use "ready-made libs" :p Nov 14 18:46:25 ravilov, oh, well when you test an app over adb, in java, how do you allow a permission on the device, are you being promted on the device? Nov 14 18:46:28 can i use jython in android? Nov 14 18:46:42 i thought it was pretty much impossible using js without jquery these days Nov 14 18:46:43 sure Nov 14 18:46:51 is it a bad idea? Nov 14 18:46:54 sure Nov 14 18:47:23 g00s, it is impossible only if you're (way!) too used to jquery Nov 14 18:47:43 https://support.google.com/androidwear/answer/6058799?hl=en Nov 14 18:47:46 how do you deal with all the differences in browser behavior ? by yourself ? Nov 14 18:47:57 dionis, never dealt with full ndk apps, just with ndk libs and such, and even that just barely Nov 14 18:47:59 looks like the official word is that you need to reset the watch every time you want to pair it with a different device. Nov 14 18:47:59 Worst. Decision. Ever. Nov 14 18:48:13 Afzal wat ? Nov 14 18:48:31 g00s, pretty much; I don't like the way jquery handles that anyway (I can't stand browser sniffing) Nov 14 18:48:33 every time you want to pair the watch with a different device (even for debugging), you have to reset the watch Nov 14 18:48:37 * OverCoder did most of the function Nov 14 18:48:44 * OverCoder tries it Nov 14 18:48:48 Afzal thats terrible :| Nov 14 18:49:00 1+1+1 = 196.0 Nov 14 18:49:00 lel Nov 14 18:49:08 Yes. Yes it is. :( Nov 14 18:49:10 what is this "lel"? Nov 14 18:49:15 semi-lol Nov 14 18:49:15 :P Nov 14 18:49:21 lel Nov 14 18:49:24 yo're weird Nov 14 18:49:24 lemao Nov 14 18:49:39 i have been told i'm weird in every channel Nov 14 18:49:41 so yes i am Nov 14 18:49:57 also, I've heard android wearables never really took off because of largely crappy implementation, I guess the rumors are true Nov 14 18:50:02 hi Nov 14 18:50:12 I have one and remembered I don't like wearing watches Nov 14 18:50:12 What are you thoughts on MIT APP inventor? Nov 14 18:50:22 ravilov google can make services, they can't make good software or products Nov 14 18:50:51 g00s, that's relative, google made android itself as well, and while it might not be perfect, you can't say it didn't take off ;) Nov 14 18:51:17 JesusFreke, I'm getting a few hundred of these http://qs.lc/1ft33 and those: http://qs.lc/qu9lj Nov 14 18:51:25 But I have no clue what that is supposed to tell me Nov 14 18:52:04 ravilov if android wasn't free for OEMs - and the only viable choice against iOS when it came out, it probably wouldn't have gone anywhere Nov 14 18:52:22 RobbingHood: If I remember right, you should be able to find the stack trace of where those are being allocated Nov 14 18:53:52 JesusFreke, http://qs.lc/pdr6b Nov 14 18:54:24 I don't use any ssl btw Nov 14 18:55:12 well, that should give you a better idea of where to look to fix the problem, at least :) Nov 14 18:55:19 g00s, makes sense I guess Nov 14 18:55:20 although I don't have any specific advice for that Nov 14 19:03:26 Does anyone have a good tutorial on how to create a proper alarm app? Nov 14 19:04:30 sorry, I only know of tutorials to create improper alarm apps :) Nov 14 19:04:32 i think deskclock is in aosp Mugwump101 Nov 14 19:05:07 asop? Nov 14 19:05:17 asop's fables Nov 14 19:05:37 AOSP Nov 14 19:05:37 which have tales of the fabled proper alarm app Nov 14 19:05:52 lol Nov 14 19:05:56 *aosp Nov 14 19:06:01 hehe Nov 14 19:06:19 http://source.android.com/ Nov 14 19:06:21 AOSP :) Nov 14 19:06:39 what is aosp? Nov 14 19:06:44 ^ Nov 14 19:06:47 see link Nov 14 19:06:50 WOW Nov 14 19:06:59 I never saw this before... Nov 14 19:07:53 relevant: https://android.googlesource.com/platform/packages/apps/AlarmClock/ and https://android.googlesource.com/platform/packages/apps/DeskClock/ Nov 14 19:07:54 so I just search for deskclock? Nov 14 19:08:37 so I have to clone/pull the repos? Nov 14 19:08:55 I'm sure you can figure it out :) Nov 14 19:09:37 yup, figured it out Nov 14 19:09:38 thanks Nov 14 19:09:46 JesusFreke, is it possible that my doInBackground() method gets called multiple times? It keeps reappearing in the stacktrace as the root element but only gets called once Nov 14 19:10:06 maybe I should have asked for a tutorial with pictures :P Nov 14 19:11:17 RobbingHood: if the AsyncTask is executed multiple times, sure Nov 14 19:11:22 so I have my own google play account Nov 14 19:11:26 Add some logging.. :) Nov 14 19:11:26 but i also got invited to another Nov 14 19:11:42 invited to another? Nov 14 19:11:43 i accepted, and i'm pretty sure they confirmed me, but i can't see where i "switch" to the other one Nov 14 19:11:45 JesusFreke, there's no way that it is. It can only get called by a button click :< Nov 14 19:12:37 maybe you are executing the async task twice? Nov 14 19:12:39 JesusFreke: "invitation to share a google play developer console account" Nov 14 19:12:46 where are you executing the task? Nov 14 19:13:00 yoohoo: ahh. no idea, sorry Nov 14 19:13:50 RobbingHood, where are executing your async task? Nov 14 19:14:03 make sure you're not accidentally executing it twice? Nov 14 19:14:30 Not possible, as I said. Button click->method that checks that some text fields are not empty -> execute Nov 14 19:16:34 nvm got it thanks anyway Nov 14 19:17:03 I found a TODO in alarmClock Nov 14 19:17:18 Should I be worried? :P Nov 14 19:17:41 those things are pretty common everywhere Nov 14 19:18:16 well that was fun. Having to write a regex for my firewall so google play worked. Nov 14 19:22:31 Mugwump101 was it: TODO, make it work ? Nov 14 19:22:59 lol Nov 14 19:23:06 "/ TODO: Create new alarm _after_ SetAlarm so the user has the // chance to cancel alarm creation." Nov 14 19:23:11 / todo : let users use december Nov 14 19:23:26 // TODO: Make sure time is being kept properly. Nov 14 19:23:59 do you guys remember this? http://phandroid.com/2012/11/20/android-4-2-december-calendar-bug/ Nov 14 19:24:10 // TODO: Figure out why alarms don't fire sometimes. It looks like it happens here. Nov 14 19:24:13 ;) Nov 14 19:24:39 "While this isn’t an experience-breaking omission" wtf description Nov 14 19:24:49 I can just say that working with date is a big big pain Nov 14 19:25:30 I maintained a calendar for a web framework and damn, lot of issues. Safari jumping months, australia timezone kicking asses... Nov 14 19:25:30 time is hard, period. Nov 14 19:25:34 can I create a boolean variable that is not assigned either true or false? Nov 14 19:25:39 skrite: false Nov 14 19:25:43 lol Nov 14 19:26:09 you could assign object Boolean x = null Nov 14 19:26:21 but what for.. Nov 14 19:26:33 Ashiren: that evaluates to false, iirc Nov 14 19:27:29 yeah I think I had this same question and it should only be false or true Nov 14 19:27:41 s/sh/c/ # :) Nov 14 19:28:24 lewellyn: i think it would be NPE ;d Nov 14 19:28:37 note that you can set a Boolean (but not a boolean) to null, which isn't terribly useful even though you can do it. Nov 14 19:29:19 boolean avoids NPE. Boolean thrives upon them. :P Nov 14 19:29:58 related common link for discussion of booleans: http://thedailywtf.com/articles/What_Is_Truth_0x3f_ Nov 14 19:29:59 lewellyn: thanks Nov 14 19:30:03 * lewellyn runs out the door. Nov 14 19:31:27 hello all Nov 14 19:31:32 hoping to get some help with ndk dev Nov 14 19:32:05 little confused exactly which versions of things I need Nov 14 19:32:21 I know I’m targeting 4.4.2, which is API level 19 Nov 14 19:32:32 but does that mean I want an older rev of ndk than r10c? Nov 14 19:34:49 hmm Nov 14 19:35:42 or does the rev of the ndk not matter Nov 14 19:36:01 its means you want APP_PLATFORM := android-{minsdk} in your Application.mk Nov 14 19:36:34 and version of ndk shall not matter Nov 14 19:36:56 okay - so let’s say my cross compiler is arm-linux-androideabi-4.9 Nov 14 19:37:07 that will be fine for a 4.4.2 device? Nov 14 19:38:09 i didnt go deep into fancy compiler stuff, i just use ndk-build Nov 14 19:38:16 yeah, that’s what I’m trying to do Nov 14 19:38:41 I just don’t really understand how to tell which version of SDK Build-tools and Platform-tools I want Nov 14 19:39:53 Is it possible to get the last access time for a file Nov 14 19:40:02 *when reading a file? Nov 14 19:43:20 * g00s getting bored of darcula Nov 14 19:46:14 g00s: https://github.com/jkaving/intellij-colors-solarized :) Nov 14 19:47:22 JesusFreke cool thanks. i was looking at http://www.ideacolorthemes.org/home/ - do these generally do a good job of themeing all the things ? Nov 14 19:47:34 i remember in eclipse certain panels wouldn't take Nov 14 19:47:49 Does anyone know if Android 21 has an API for making your own trust agents? It seems strange to have a whole menu dedicated to one option to enable or disable smart lock, but I can't find any API references for them... Nov 14 19:47:53 yeah, that's still the case Nov 14 19:48:08 there are basically 2 themes, the overall theme, and then the editor theme Nov 14 19:48:23 you can't use a custom overall theme, you have to use one of the ones they provide (i.e. darcula) Nov 14 19:48:29 but you can customize the editor theme Nov 14 19:48:34 ahh Nov 14 19:48:50 the dark solarized editor theme looks pretty good with the darcula overall theme Nov 14 19:48:59 ok, thanks Nov 14 19:49:04 in an Array, can I assign indexs that are out of order? like myArray[45] = someObj; myArray[56] = someOtherObj; ? Nov 14 19:49:13 of course, most everything else on my computer is also dark solarized, so.. :) Nov 14 19:50:47 skrite, as long as your array is big enough? Nov 14 19:51:30 as long as index < array.length Nov 14 19:51:31 do i have to know how large the array is when i construct it? an ArrayList, i mean? Nov 14 19:51:49 ArrayList is not Array, so not Nov 14 19:51:53 but in arrays you must Nov 14 19:52:03 ah, ok, thanks Nov 14 19:52:19 what you guys think about xamarin Nov 14 19:52:48 Anybody know about Trust Agents? Nov 14 19:59:34 I have a question. When I start my activity, in onCreate, I get the current system time and set it up for viewing. When I got to another activity and after that activity, I want to go back to the previous activity with the current time on it, the current time updates back to the current time but I want the time to remain what it was originally set before. What's the best way to do this? Nov 14 20:00:32 Mugwump101: When you set the time in oncreate put it in a variable. Then, each time, check if the variable is None or (previoustime). Use the value in the variable if it is not null; Nov 14 20:01:05 put that variable in onsaveinstancestate and load in oncreate if its present Nov 14 20:01:12 I have a modified version of Android (I added a Service class). How can I point android-studio at my modified android system source code so that I can write an app that uses the new class? Nov 14 20:01:37 hmm that could work... the variable would be saved even if I go to another activity and back? Nov 14 20:02:02 mostly yes, but not if you i.e. rotate your phone Nov 14 20:02:22 ohhh but I have to put it in onSaveInstanceState Nov 14 20:02:29 eeyup Nov 14 20:02:40 or fragment with retained state if you use fragments Nov 14 20:02:58 nope I am not using fragments for this Nov 14 20:03:07 how do I pass my variable to onSaveInstanceState Nov 14 20:03:57 you override the method Nov 14 20:04:20 and put outState.putString("something_something",yourVariable); Nov 14 20:04:27 or putInt if its int etc. Nov 14 20:04:31 and to load Nov 14 20:04:35 you check in onCreate Nov 14 20:04:45 if is savedInstanceState null Nov 14 20:05:15 if not, then variable = savedInstanceState.getString("something_something") Nov 14 20:06:06 wait but in this case, should I be getting the current system time and displaying it initally in onsaveinstancestate or onCreate? Nov 14 20:06:44 apparently Message.sendToTarget is crap >_< Nov 14 20:06:51 in onCreate you check if savedInstanceState (in onCreate method you have this argument) null Nov 14 20:06:56 because it should return a boolean Nov 14 20:06:57 then it means the activity starts for the first time Nov 14 20:07:01 so you gt your time then Nov 14 20:07:16 but the thing is Nov 14 20:07:23 okay Nov 14 20:07:34 so, I perform some action in Oncreate Nov 14 20:07:45 save string to global variable Nov 14 20:08:18 in onsaveinstancestate.... outState.putString("lastsync", last sync"); Nov 14 20:08:35 Then in onCreate check and see if the variable is null or not Nov 14 20:10:18 eeyup Nov 14 20:13:33 Sounds good so far I will try. Thank you Nov 14 20:23:23 can i make a singleton ArrayList ? Nov 14 20:24:43 ._. Nov 14 20:25:56 what do you mean Nov 14 20:27:15 well, i need a listArray that will hold the same objects for the life of my app. I thought about public class mySiteArray extends ListArray and makeing it static Nov 14 20:27:32 but it seems to cause some trouble. Nov 14 20:28:00 hi Nov 14 20:28:35 hmm you could just make public static that arraylist Nov 14 20:28:46 just to make sure you want instantianize more than once Nov 14 20:28:47 ohai Nov 14 20:29:03 from anywhere? and refer to it from other activities? how would i get the instance of it? Nov 14 20:30:14 you could make new 'static' class but dont extend anything Nov 14 20:30:18 man, is there a plugin out there that lets you write xml layouts cleanly Nov 14 20:30:21 which would have public static arraylist Nov 14 20:30:28 ...like in json, or in an html/css way Nov 14 20:30:41 :o Nov 14 20:31:06 heh https://pbs.twimg.com/media/B2bbsnPIUAAUC_w.jpg:large Nov 14 20:31:16 i feel like I'm designing a web page using the style="" attribute Nov 14 20:31:37 a new static class that returns an array list? awesome, thanks ! Nov 14 20:32:01 mostly it that is. Nov 14 20:32:13 i dont know any "css" for xml Nov 14 20:33:35 Ashiren: here is the class, http://pastie.org/9719787 how can i make it an ArrayList ? Nov 14 20:34:00 Ashiren: xml markup is ugly and difficult to keep clean, and it isn't easy to see what's going on right away Nov 14 20:34:11 i know Nov 14 20:34:55 something like LESS would be awesome Nov 14 20:36:28 Something like this http://hastebin.com/opeyiluvov.mel Nov 14 20:36:47 skrite: i meant something like http://pastie.org/9719796 Nov 14 20:36:52 sounds like i need to start an ambitious github project Nov 14 20:37:43 skrite: then you can get into arrayList everytime by GroupSiteArray.getInstance() Nov 14 20:37:44 where is what i want to store in the list? Nov 14 20:37:58 yes, the object type Nov 14 20:38:06 like String Nov 14 20:38:11 Ashiren: Dude, thanks so much ! Nov 14 20:44:30 Is it possible to convert Integer[] intarry to ArrayList? Nov 14 20:44:53 Arrays.asList(the_array) Nov 14 20:46:53 opps Nov 14 20:47:01 I mean ArrayList to Integer[] Nov 14 20:47:49 afair list.toArray(the_array) Nov 14 20:48:47 and before that Integer[] the_array = new Integer[arraylist.size()] Nov 14 20:50:02 or was it retuning array.. dunno Nov 14 20:50:18 all these questions are less to do with android more to do with java 101 and are but a 5 second google search away :) Nov 14 20:50:38 eeyup Nov 14 20:52:29 Thank you Ashiren, I will test it now :D Nov 14 20:53:40 hi.. im currently writing a shell script to get "next alarm".. with this command: sqlite3 /data/data/com.android.providers.settings/databases/settings.db "select value from system where name = 'next_alarm_formatted';" Nov 14 20:53:58 works perfect.. but.. how to check if this is a real alarm.. or a snoozed alarm? Nov 14 20:54:44 demlak is there not a type kinda field ? Nov 14 20:55:11 in the table? can´t find one that seems to be related.. Nov 14 20:55:30 also no field for configured snooze time Nov 14 21:14:02 Ashiren, trying to use this in an array adapter and i am getting an error about not being able to cast GroupSiteArray as an Array list. hang on.. will pastie Nov 14 21:16:33 ok, here is the code http://pastie.org/9719870 Nov 14 21:16:57 I want to stop an HTTP download. Is it okay to call HttpURLConnection.disconnect from another thread? Nov 14 21:19:02 skrite: can you change that ArrayList into List? Nov 14 21:19:17 where? Nov 14 21:20:06 public SummaryListAdapter(Context context, ArrayList groupSiteArray), and any practically anywhere ArrayList -> List Nov 14 21:20:13 it's java basics.. Nov 14 21:22:21 i see, sorry, very new to Java here. Nov 14 21:22:44 skrite: What are you trying to do? That code looks weird -- you're not doing anything with the ArrayList parameter. Nov 14 21:23:04 i think it wasnt pasted whole Nov 14 21:23:21 skrite maybe you should learn some java or visit #java ? Nov 14 21:23:27 this is more for android dev Nov 14 21:24:38 skrite: Note that you probably meant "ArrayList" rather than "ArrayList". Even then, you probably want "List". Nov 14 21:24:55 well, all this was working with an ArrayList, and i am trying to make it static so that i do not have to reload the info in the Site objects Nov 14 21:26:06 ok, why is List preferable to ArrayList? Nov 14 21:26:27 because ArrayList is an implementation detail Nov 14 21:26:43 List is only preferable for public interface definitions Nov 14 21:27:04 ah, ok Nov 14 21:27:18 One other note is that it's probably better to extend BaseAdapter than ArrayAdapter. ArrayAdapter is pretty lame. Though you might not care about this right now. Nov 14 21:27:39 god, I wish android gave a way to detect system ui nav presence Nov 14 21:28:13 or even a config filter... Nov 14 21:28:26 JakeWharton: Sorry to bother, but do you know whether it's safe to call HttpURLConnection.disconnect from another thread (other than the one doing the download)? I'm wanting to cancel a download. Nov 14 21:28:48 I'm looking at the code, but it's so hard to follow. lol Nov 14 21:28:53 Interfaces everywhere. Nov 14 21:32:30 so, are there any android devices with physical buttons but no menu key? Nov 14 21:32:39 or do all physical key devices have a menu button? Nov 14 21:32:59 New Samsung devices have hardware buttons without a menu button, don't they? Nov 14 21:33:09 http://www.fussylogic.co.uk/blog/?p=1031 Nov 14 21:33:09 dunno, that's my ask Nov 14 21:33:10 hey guys Nov 14 21:33:33 how do I access the PreferenceScreen without activity but still have access to shared preference? Nov 14 21:33:41 They have recent tasks, home, and back, I think. Nov 14 21:33:42 All the new ones. Nov 14 21:33:43 yeah, samsung just recents, back and home now Nov 14 21:33:45 that's annoying Nov 14 21:35:36 I don't really see any advantage to hardware buttons. I guess people get emotionally attached to them or something. Nov 14 21:36:21 It seems that the only reason Samsung got rid of the menu button was that Android changed to *always* show on-screen menus (regardless of the presence of a hardware menu button). Nov 14 21:36:32 Thereby making hardware menu buttons pointless. Nov 14 21:39:04 hardware buttons are important for many reasons, least of which is either simpler UI or more screen space Nov 14 21:39:24 I would love something like a dual purpose button for home/back Nov 14 21:39:27 Ooh, this is interesting. HttpURLConnection seems to use OkHttp under the hood! (At least on new versions.) Nov 14 21:39:32 Surprising. Wow. Nov 14 21:39:50 much wow, so ok Nov 14 21:41:43 Isn't it, though? It's basically merging the Java internals with a third-party library. Nov 14 21:41:55 For some reason when I hover the package on every first line of my .java files it opens a huge window for documentation which is a pain in the ass. Does anyone know why this is happening? I never changed any settings. Nov 14 21:42:44 StingRay_: How do hardware buttons give more screen space? Nov 14 21:42:54 The buttons take physical room on the phone. Nov 14 21:43:04 would allow for no nav bar Nov 14 21:43:06 I hate physical buttons Nov 14 21:43:07 Now it happens for every single variable, class etc Nov 14 21:43:12 the nav bar can be hidden as of api19+ Nov 14 21:43:16 so that's no longer a good reason Nov 14 21:43:19 I hover over anything from my package and the huge ass documentation page pops up! Nov 14 21:43:25 I can't do anything Nov 14 21:43:27 lack of physical buttons allow having a smaller overall device Nov 14 21:43:29 which is great Nov 14 21:43:38 it is hence my sencond wich is less complex UI Nov 14 21:43:46 Muchoz: What do you mean? What *exactly* are you hovering over? Nov 14 21:43:50 Class names, package names, what? Nov 14 21:44:17 For example a line where a the variable of one of my classes is being declared. Nov 14 21:44:18 oooh, lollipop email app runs fine on kitkat Nov 14 21:44:19 awesome Nov 14 21:44:31 And what does the documentation say? Nov 14 21:45:02 TacticalJoke, I hover the name of the variable: WhateverAdapter.supersecretvariable Nov 14 21:45:16 Whenever I hover the supersecretvariable it opens the documentation Nov 14 21:45:31 Holy shit this is annoying Nov 14 21:47:25 TacticalJoke, it's doing it for everything! Nov 14 21:47:35 https://www.dropbox.com/s/uxh4w22bqbin7sg/Schermafdruk%202014-11-14%2022.47.33.png?dl=0 Nov 14 21:48:07 Did you hover over something called "getString" that time? Nov 14 21:53:41 TacticalJoke, yes. Nov 14 21:54:36 TacticalJoke, I know what it's called. Don't take me for a fool haha Nov 14 21:54:54 Is putting a switch in a wear app a good idea? Nov 14 21:55:13 Muchoz: I was trying to figure out whether the hovering was related to the documentation appearing. Nov 14 21:55:27 Anyway, I dunno. Nov 14 22:01:00 Okay, I've looked through the OkHttp code, and, as far as I can tell, calling HttpURLConnection.disconnect should be safe from any thread as long as we're running on a recent version of Android. Nov 14 22:01:07 If we're not, God knows what happens. Nov 14 22:06:34 ok, it doesn't quite work, the lollipop email app (on kitkat) Nov 14 22:07:44 God, this code is so hard to follow. :[ Nov 14 22:10:08 Hello.. can someone give me some advice please Nov 14 22:10:48 I want to write an applications that is simmular to the application called `Gallery version 4.4.2-N900AUCUCNC2` on my samsung note 3... is this application open source or is it proprietary? I got the phone from at&t Nov 14 22:10:59 I want to see how it does stuff Nov 14 22:11:50 I guess you could try "Show Java". Nov 14 22:11:59 Im thinking that it could be this: grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.3_r1/com/android/gallery3d/app/ Nov 14 22:12:00 Though they might obfuscate, making that hard to understand. Nov 14 22:12:04 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.3_r1/com/android/gallery3d/app/ Nov 14 22:13:10 if I go to App Info, it has stuff named com.android.gallery3d.app in there Nov 14 22:13:12 in the permission list Nov 14 22:14:48 i compiled tha app named the same from cyanogenmod 11 .. its not the same Nov 14 22:15:01 after_r: This is the latest: https://android.googlesource.com/platform/packages/apps/Gallery2/+/master/src/com/android/gallery3d/app/PhotoPage.java Nov 14 22:15:13 Dunno whether it's the app you're talking about. I guess os. Nov 14 22:15:14 so* Nov 14 22:16:21 ok ty Nov 14 22:16:44 fire unicorn Nov 14 22:16:46 If you google "android googlesource ", you can quickly find the source. Nov 14 22:16:57 cyano mod Nov 14 22:17:20 damnit.. i can´t find, where snooze settings are stored Nov 14 22:20:05 anyone any idea on this? Nov 14 22:23:29 read the docs ? find out how to add data containing what you want ? all in all just search Nov 14 22:24:14 Ugh, Google Code is so horrible Nov 14 22:24:43 1) No control 2) My email address is almost publicly displayed. Nov 14 22:24:50 It seems that Http(s)URLConnection has used OkHttp since Android 4.4. Nov 14 22:25:04 Why do I have to report an Android bug on such a shitty piece of software Nov 14 22:25:07 StingRay_ im searching since hours.. Nov 14 22:25:18 seems im searching for the wrong thing Nov 14 22:26:32 hey, i got it working. Thanks for all your help. Nov 14 22:29:12 hmm, how can i change a variable inside a runnable while its running? Nov 14 22:29:16 God, Schwarzenegger looks old now: http://i.imgur.com/1tlcpFW.png Nov 14 22:29:33 hey anyone here expieranced with MediaCodec? Nov 14 22:29:37 god you look like an off-topic redditor Nov 14 22:37:50 Hello, I'm trying to figure out how I might get a button release event. I've got some code that needs to be executed on button down, then some other code that needs to be executed on button up. I've heard of the MotionEvent and tried to implement it, but ACTION_UP happens instantaneously after ACTION_DOWN. Nov 14 22:37:58 Sigh. I'm just gonna assume that HttpURLConnection.disconnect is thread-safe. Maybe I'll switch to OkHttp later. Nov 14 22:39:28 I hate how it's called HttpURLConnection. Should be "HttpUrlConnection". Nov 14 22:39:58 And URL should (at least in my mind) be "Url". Nov 14 22:40:20 Not technically; URL is an acronym.. English dictates that they be uppercased :) Nov 14 22:40:24 TacticalJoke, try LoopJ: http://loopj.com/android-async-http/ Nov 14 22:40:35 Yeah, but that's a bad programming practice, IMO. Nov 14 22:40:38 It makes code harder to read. Nov 14 22:40:57 TacticalJoke, nonsense! Nov 14 22:41:12 "HTTPURLConnection" would be very hard to read. Nov 14 22:41:19 "HttpUrlConnection" <-- obvious Nov 14 22:41:41 Using all-caps for initialisms/acronyms is old-school. New libraries rarely do it. :) Nov 14 22:42:00 TacticalJoke, then stop whining and start your library for it. Nov 14 22:42:12 Whining? Nov 14 22:42:15 It's not a deal breaker Nov 14 22:42:24 I think he was just expressing his opinion.. Nov 14 22:42:49 Same thing here Nov 14 22:43:22 People seem to easily confuse having a strong opinion with "whining". lol Nov 14 22:43:53 pragma: Ironic ! Nov 14 23:01:42 No ideas? Nov 14 23:04:22 maybe turn it left and elevate it a bit more Nov 14 23:07:25 you stated you wanted the up action, then stated wanting the down to do code but your up is happening, thats a click action. maybe be a bit more specific of how you may want down to finish before up, or how theyre related Nov 14 23:08:29 That's not what I mean.. I'll try to explain it a little better. Nov 14 23:08:39 thats a good start Nov 14 23:09:00 I need some code to execute when I press the button down, but don't release it. Then I need some other code to execute when it's released. Nov 14 23:09:01 maybe pastebin it if itll be a bit wordy Nov 14 23:09:29 a click is down up. long click is down....... Nov 14 23:09:48 how are the actions related Nov 14 23:09:55 Right, but the up event is also generated just after the button is pressed - about 1 second after holding it, the release action is generated Nov 14 23:09:58 or simple what are you doing Nov 14 23:10:25 it isnt unless a release happens or a cancel is issued Nov 14 23:10:38 That's not what my debug messages say. Nov 14 23:11:02 thats what happens. you have code canceling your down if not releasing Nov 14 23:11:40 action_cancel. so check to see what maybe overriding your gesture Nov 14 23:11:50 Hmm... Interesting. I don't.. It's only a single-activity app, and there's only about 20 lines of my code in there. Nov 14 23:12:03 Is there some setting in the XML to enable that behavior? Nov 14 23:12:28 but actions trickle down, so something is interfering Nov 14 23:13:11 or you arent returning true on something to stop other views from responding Nov 14 23:13:41 get as descriptive as you can. as what you are doing, what views are involved etc Nov 14 23:14:10 even pastebin code etc Nov 14 23:15:24 not saying I have all the answers, just that you are keeping it broad and open to a million answers. be acute Nov 14 23:16:13 Here's the Main.Java Nov 14 23:16:14 http://hastebin.com/esuhuzumek.avrasm Nov 14 23:16:39 connect(View v) {...} is executed when a "connect" button is pressed. Nov 14 23:17:02 Guys, how stupid am i, how can a user share a text from an app? Nov 14 23:17:16 like, he selects a text from browser, then share it? Nov 14 23:18:38 share it as an intent action or just use clipboard Nov 14 23:19:58 no i mean the user not me/my app Nov 14 23:20:34 tbh, i made an app that receives a text intent, and evaluates it, and shows a toast with the result Nov 14 23:22:02 Xenoth, are you setting onClick in xml for connect? if so out wont be set in sync with setting touch listener events too. you need to rethink this Nov 14 23:22:40 Yes, but as long as I don't touch lForwardButton before the Connect button, I'm fine Nov 14 23:22:57 I know it's not good, but I'm just trying to get a working skeleton before I make it better Nov 14 23:22:58 overcoder, the text from browser you want in app? just use clipboard manager or whatever its called Nov 14 23:23:21 yea Nov 14 23:23:22 hmmm Nov 14 23:23:27 xenoth, you need to rethink your approach Nov 14 23:23:29 * OverCoder searchs from clipboard manager Nov 14 23:24:16 overcoder, whatever its called you can get an instance of it, and add you own ClipData or retrieve, and remove etc Nov 14 23:24:21 I don't see how the way the Connect button listener is handled would affect the lForwardButton listener Nov 14 23:25:53 there is no connect button, just a click listener named connect, how many buttons are set for that. is forwardbutton have onclick in xml for it? Nov 14 23:26:36 Forwardbutton does not. Nov 14 23:26:47 All of the buttons are in XML Nov 14 23:27:26 basically, as long as all your seperate threads are synced, yes connect, then once connection is established allow out to be written to Nov 14 23:28:00 you have alot of random new Threads, rewrite that in one class and use it Nov 14 23:28:29 you need just one thread class controlling the connection status and io Nov 14 23:28:38 Okay.. Nov 14 23:30:34 I have a stupid question but when I use IDEA IDE, why does it go through the android source code even I step over ? How can I avoid it going into the source code when debugging? Nov 14 23:30:39 so create you a client class that you can use to connect and send your data etc. then on click of connect run method of class to connect, then anyother input call class to write out data, receive data, check connection state etc Nov 14 23:35:58 Xenoth, also disable any views that have io implications til you connect has successfully happened. keep things in sync to stop any io errors from trigger happy users. Nov 14 23:37:03 Mugwump101, if the next method to run is in a framework method, it would go to that I would assume? Nov 14 23:38:15 that is, how can I debug my session so that it only goes through my code and not other code because it's taking me even longer to debug because it goes line by line or method by method through android source? Nov 14 23:39:17 Mugwump101: use step over (or step out, to get out) Nov 14 23:41:27 I did try step over but I will try step out Nov 14 23:50:29 whatitis: Could the issue be that I'm not using any return statements in my switch? Nov 14 23:53:26 you are returning false always which says you didnt handle the event, but I think it maybe more of an issue shooting off new threads in your switches. like I said create a client class, use it :) and rethink your flow Nov 14 23:55:23 Thanks. I'm nearly done with the class... Nov 14 23:59:12 Why is my savedInstanceState null? Nov 14 23:59:13 http://stackoverflow.com/questions/26939420/savedinstancestate-is-null Nov 14 23:59:55 maybe you save "nothing" Nov 15 00:01:43 no I checked Nov 15 00:01:46 and it saves a string Nov 15 00:01:57 but nothing gets saved in onCreate Nov 15 00:02:08 but the OnSave and onRestore methods save a string Nov 15 00:02:58 the fileLastSync is valid then ? as in not null Nov 15 00:03:19 yes Nov 15 00:03:36 then maybe you have a lauch/overide property in xml ? Nov 15 00:03:48 is onSave* called ? Nov 15 00:04:45 why not save time in milliseconds and not a formatted then a reformatted string also Nov 15 00:05:27 yes it is called Nov 15 00:06:16 whatitis: I set up an OnTouch listener for the button, except now, the button doesn't highlight when it's clicked - nor does the code that it's supposed to run execute Nov 15 00:06:35 onSave is called Nov 15 00:06:45 whatitis: http://hastebin.com/nezeracuya.java Nov 15 00:07:18 Mugwump101 then maybe the conditions you invoke and the expect result is the problem Nov 15 00:07:44 under what circumstance do you expect it to be a !null bundle ? Nov 15 00:08:18 I want it to be not null if a current system time was already previous set Nov 15 00:08:20 in onCreate Nov 15 00:08:35 If not, then create one. If so, then keep saved state of old current time Nov 15 00:08:44 I mean how and what is happening for you to return to this activity Nov 15 00:08:49 I know what the logic does :) Nov 15 00:09:28 hello, i need to insert a json object of the form : Nov 15 00:09:38 {\"menu_id\": \"1\", \"submenu_id\": \"1\", \"submenu_style\": \"None\", \"submenu_name\": \"Drinks\", \"position\": \"0\", \"submenu_desc\": \"Drinks, alcoholic and non-alcoholic\", \"icon\": \"None\"} Nov 15 00:09:42 Well right now I have an alarm set that pops up a new activity. Once, I save some stuff in the new activity, I call a new intent to go back to the previous activity Nov 15 00:09:48 whats the it a db Nov 15 00:09:53 into a db* Nov 15 00:10:05 whats the best way of doing that? Nov 15 00:10:12 INSERT ? Nov 15 00:10:15 :) Nov 15 00:10:40 yes, but is there a nice toObj function, then a obj.insert? Nov 15 00:10:53 StingRay_, does that make sense? Nov 15 00:11:01 or do i have to iterate across key values to build the string Nov 15 00:11:33 Mugwump101 intent ? Nov 15 00:11:40 you would just finish though right ? Nov 15 00:11:46 not fire a new intent ? Nov 15 00:13:39 ahhh Nov 15 00:14:44 so this is what I do before going back to the old activity Nov 15 00:15:14 Intent nextScreen = new Intent(CollectionPager.this, InfoActivity.class); startActivity(nextScreen); Nov 15 00:15:30 I put this inside my save button Nov 15 00:15:48 once the user clicks on save, they go back to this old activity, is that wrong? Nov 15 00:16:01 yes Nov 15 00:16:19 you already have the activity behind on the stack Nov 15 00:16:20 ok explain why and provide a possible fix :S Nov 15 00:16:27 well no Nov 15 00:16:34 Technically it's not in order... Nov 15 00:16:53 neways starting a new activty the bundle will always be null Nov 15 00:17:01 so flow is your problem, not code Nov 15 00:17:16 So actually, I have this old activity, that fires a new activity, that fires another new activity with the save button and I want to go back to the old old activity. Nov 15 00:17:24 So I thought it would be better to create an intent Nov 15 00:17:30 to go back to the old old activity Nov 15 00:17:37 What should I do instead of this? Nov 15 00:18:12 a > b > c while in c is there any condition to go back to b ? Nov 15 00:18:47 finish the middle activity after launching the last, and the rest will settle itself. Nov 15 00:19:04 Thorbear depends on answer to my question Nov 15 00:19:10 True Nov 15 00:19:20 yes you can go back to b Nov 15 00:19:23 from c Nov 15 00:19:40 but I need it to go straight from c to a on save Nov 15 00:19:54 and not by clicking back Nov 15 00:19:58 ok so now startActivityForResult from b to c, and send complete back that finishes b Nov 15 00:20:13 and on save in c you just finish and setResult OK Nov 15 00:20:20 have a read of activity flow Nov 15 00:22:16 what do you mean by send complete back? Nov 15 00:22:35 He just said. setResult OK Nov 15 00:23:34 no look again Nov 15 00:23:36 I mean to say Nov 15 00:23:49 startActivityForResult takes in two parameters Nov 15 00:24:09 intent and intentcode... what is intentcode? Nov 15 00:24:26 You mean requestcode? Nov 15 00:24:29 any small int so you can ident it Nov 15 00:24:42 *requestcode Nov 15 00:24:43 ok Nov 15 00:24:45 int SAVEACTION = 666; Nov 15 00:24:49 It is passed back through onActivityResult, as an identifier Nov 15 00:24:49 :) Nov 15 00:24:54 haha Nov 15 00:25:03 ok I will use that Nov 15 00:25:29 maybe try to understand it instead Nov 15 00:25:53 okay but what is meant by send complete back that finishes b? Do I send it in my activity b? Nov 15 00:25:56 Is packet-sniffing the emulator difficult? Nov 15 00:26:48 setResult(RESULT_OK);finish(); <--- if save completed, then if the result code is OK in b, finish that too Nov 15 00:27:01 Mugwump101 just have a read about activites, it's all there Nov 15 00:27:08 in the docs on d.android.com Nov 15 00:28:52 hmm Nov 15 00:29:06 I will try the suggestion and see how it ties in Nov 15 00:30:48 Well it still doesn't work appropriately Nov 15 00:31:04 should by bundle still be null? Nov 15 00:32:01 not if you "return/resume" to it Nov 15 00:32:15 but yeah, if you start a new one, yes it will Nov 15 00:33:37 How am I resuming it with this process? Nov 15 00:34:19 like I said, in always return to b and if c completed call finish Nov 15 00:34:34 this is android 101 and is quite clear in the docs if you read thought the tutorials Nov 15 00:35:05 StartActivityForResult is used if you want a result when it finished. Nov 15 00:35:19 I don't really need a result from activity b or c Nov 15 00:35:37 erm.... ok... then do what you want Nov 15 00:35:57 I just want my time when it is first set in onCreate to remain static Nov 15 00:36:06 in activity a Nov 15 00:36:17 I know I am getting the current system time Nov 15 00:36:30 but I just want to get it for only one instance Nov 15 00:36:33 I just told you how and what to read Nov 15 00:36:39 it's up to you really Nov 15 00:36:53 this is not really a tutorial channel for android beginners Nov 15 00:37:01 what am I saying is even if AI move between activities Nov 15 00:37:01 and not suited to 1 on 1 tutoring Nov 15 00:37:04 *I Nov 15 00:37:13 it should remain static Nov 15 00:37:32 well either do as I said or look at persitant storage Nov 15 00:37:34 up to you Nov 15 00:37:35 static it to file Nov 15 00:37:57 yes I could save it in db Nov 15 00:38:04 that's my other alternative Nov 15 00:38:19 but I don't feel like i need a table and a column for one string Nov 15 00:38:25 db/file/sharedprefs/singleton you have lots Nov 15 00:38:30 who said db Nov 15 00:38:52 its a string that should really be a long, save it Nov 15 00:41:42 whatitis: I got it working - turns out it was those stupid threads. Thanks a ton! Nov 15 00:43:04 awesome, not stupid threads, just launching random new threads when dealing with one source. client class ftw! :) Nov 15 00:43:21 :D Nov 15 00:45:42 So basically, instead of learning any of this activity stuff. I going to go and just use shared preferences Nov 15 00:45:49 Seems to be a good idea instead Nov 15 00:46:28 also work on removing hardcoded adresses and ports and maybe pass them to constructor Nov 15 00:47:27 mugwump if activities b and c dont relate to a, yes save your preferences Nov 15 00:50:28 not related at all. I don't need any data from them for activity a Nov 15 00:50:50 The problem was that I was creating a new instance of the activity and not getting the previous state Nov 15 00:50:58 thats what I said Nov 15 00:50:59 so that's why it was null Nov 15 00:51:02 yes Nov 15 00:51:58 How would I take a .txt file from RAW resources and move it into my apps private data directory? Nov 15 00:52:13 the problem would be is if I use StartActivityForResult, I would still need a new intent Nov 15 00:52:18 so that's what confused me Nov 15 00:52:38 and I don't understand how it solves the issue Nov 15 00:53:41 you wouldnt start for result if not wanting a result Nov 15 00:54:04 yes that too Nov 15 00:54:07 I don't want a result Nov 15 00:54:15 In this case Nov 15 00:54:19 eghdk, use the class to read assets and write it wherever Nov 15 00:54:43 method* Nov 15 00:55:02 So, I think in this case maybe savedInstanceState won't work to save my string because I am launching the activity over again and it's null. So, I think it would be best to just go with shared prefs now Nov 15 00:56:09 whatitis: Is it correct for me to put a txt in the RAW directory? If so how do I read the .txt file contents? Nov 15 00:56:28 just read up on activity lifecycle and when to use save instance Nov 15 00:56:30 Mugwump101: I missed most of the conversation. Why are you starting an activity multiple times? (Just curious.) Nov 15 00:57:08 getAssets () Nov 15 00:58:08 whatitis: getAssets().open("myname.txt");? Nov 15 00:59:18 tias Nov 15 01:02:36 TacticalJoke, In activity a, I have a string that reflects the current time of sync with another device. When an alarm goes off, activity b pops up asking to enter information or snooze. If the user clicks on enter information, they go to activity c to fill out info and then click on save. Now, once they save, I want activity a to show. Nov 15 01:02:45 In that effect I am lauching it twice Nov 15 01:03:03 Sorry to bother you whatitis but can you take a look at this? File i/o scares me. I just want to double check everything. http://pastebin.com/QK8vg8Kh Nov 15 01:04:23 Mugwump101: I've never done something like that, so I'm not sure what's best, but you know you can create single-instance activities, right? launchMode=singleTop Nov 15 01:04:31 It might not be applicable to this situation. Just saying. Nov 15 01:05:11 Hi people. I'd like to run a periodic task once in a week or once in a month. Is there a class for that? AlarmManager or something else ? Nov 15 01:05:15 eghdk: Blindly swallowing exceptions is almost always bad. Nov 15 01:05:23 Beket, there is Alarm Manager Nov 15 01:05:32 and you can set the interval Nov 15 01:05:50 The task should run in the background without the user noticing. (Basically the task will delete some of app's cached data files so that they don't pile up) Nov 15 01:05:59 Mugwump101, can it operate on a week interval ? Nov 15 01:06:12 yes it can Nov 15 01:06:17 cool Nov 15 01:06:26 I'll read about it right now.thanks! Nov 15 01:06:32 TacticalJoke: Is that the only issue with it? Nov 15 01:06:46 eghdk, if knowing text, there are wrappers. or can even use Scanner. if utf16 definitely wanna use appropriate reader. but toString on an object wont give you what you expect. itll give whatever result that object implements for that object method Nov 15 01:07:44 Yeah, an InputStream is to be read. You can't just toString it. Nov 15 01:07:44 check out FileReader for text and its readX methods Nov 15 01:08:08 So FileReader takes an inputstream? Nov 15 01:08:18 just google it Nov 15 01:08:18 I'm just confused on what to do with inputstream... Nov 15 01:08:23 for background tasks, I think maybe something besides an alarm manager would be good? I could be wrong but do you need an alarm for it? Nov 15 01:08:23 okay Nov 15 01:08:50 itll explain why to use what io wrapper method for binary versus text Nov 15 01:09:21 but text can be utf16 which is 2 bytes per char, so reading one byte isnt sufficent Nov 15 01:09:52 Can I use a Scanner with InputStream? Nov 15 01:09:55 inputstream is lower level, their are abstractions to add based on needs Nov 15 01:10:03 read! :) Nov 15 01:10:30 just google java read text Nov 15 01:10:47 there are many ways based on needs Nov 15 01:11:07 buffered, scanners, filereader/writer etc... Nov 15 01:11:35 the only issue I found with using those stream readers is complex parsing can be slow, it can be better to use regex in some cases. Nov 15 01:13:10 cant regex til read a locale char, so first read about that Nov 15 01:13:59 a lot of people find regex tedious as well ;) Nov 15 01:14:04 or charset char :) Nov 15 01:14:11 does alarmmanager survive between phone reboots ? if I set an alarm to run 1 peer week and in between the phone reboots, will it still trigger? Nov 15 01:14:39 regex is a syntax, but one to understand after getting something to regex Nov 15 01:14:40 mm, seems no Nov 15 01:15:15 I think it would be easier for me to just save the date in sharedpreferences that I last deleted the cache and check every time the app starts ? Nov 15 01:15:30 ^ Nov 15 01:22:25 beket, you could always register for on boot complete, and check/reregister your events Nov 15 01:25:00 mm, right but it will show up in the permissions dialog. I try to keep permissions low because users are scared. Nov 15 01:25:34 but if you alarms are important.... Nov 15 01:26:13 yeh, will give it a thought. thanks for the heads up Nov 15 01:27:46 otherwise between reboots you are stuck if they dont open your app, or broadcast that you respond to are delayed passed expectancy Nov 15 01:28:15 whatitis: I'm getinng a file not found except on getAssets.open() Nov 15 01:28:34 google it to make sure paths are right Nov 15 01:31:20 getAssest uses files in assets maybe not raw Nov 15 01:31:55 Path? I thought with getAssets.open() you just pass it the file name Nov 15 01:32:21 You mean I have to do something like /data/data/mypackagename/res/raw/filename.txt? Nov 15 01:43:39 no I mean just like /drawable in app use /assets and put included file to be packaged Nov 15 01:59:17 folks, I used to have an options menu in android 2.x. Now that I port my app to 4.x it has gone and replaced by actionbar. I have a full screen 'About' activity though Nov 15 01:59:29 and I'd like there to put some kind of option for the user to see the open source licenses Nov 15 01:59:35 used by the application Nov 15 01:59:53 The thing is that actionbar is hidden at that activity. Do you have any suggestion on how to set it up ? Nov 15 02:00:09 Perhaps just add a regular button at the bottom of the activity 'Show licenses' ? Nov 15 02:00:27 or unhide the actionbar ? Nov 15 02:01:39 them wanting to view licenses is a low priority, make them find it Nov 15 02:03:35 well, the only way I see is to use an overlay action bar so that there's a place for the options menu Nov 15 02:04:33 im saying on tablet sure show an action, on smaller, make em work, dont make it use ui Nov 15 02:05:35 is it really an issue for how to place action to show license? or something more Nov 15 02:07:00 The action bar is hidden, so I don't have anywhere to place the show license option. Hm Nov 15 02:07:57 if they really wanna read words, make them find it. dont obstruct ui for something of 1 use Nov 15 02:08:32 okay, thanks Nov 15 02:09:12 Hey, I was wondering if it were possible to pull all system set alarms? Nov 15 02:09:25 so that I can see all the alarms set Nov 15 02:11:13 why do you need that access? Nov 15 02:12:24 I want to check if my alarms are set properly Nov 15 02:12:37 so you need all? Nov 15 02:12:38 and how many are going on at once Nov 15 02:12:57 bah, comeback with a real question Nov 15 02:12:58 yeah it just gives me visibility Nov 15 02:13:29 sorry Nov 15 02:13:35 if you are setting properly then no need to check Nov 15 02:14:19 I know Nov 15 02:14:40 I think I just need to reason out something, I think I can do it but I need to go over the logical steps in my head Nov 15 02:15:38 just read docs, then trial and error. no need for all events just check and expect for yours Nov 15 02:15:58 ok Nov 15 02:17:19 I just I am worried about when to update the alarms when a user clicks on snooze. I think if they click something like 15 minutes, then I would have to query the database to update the alarm to a new time. Nov 15 02:18:27 if a user clicks snooze its something you produced and expected. so adhere to your design and move forward Nov 15 02:18:33 Do you folks use OkHttp rather than HttpURLConnection? Nov 15 02:18:58 Yes Nov 15 02:19:07 if you are getting unexpected results document and express those in a manner that others can easily associate and asssist Nov 15 02:20:32 JakeWharton: Can I cancel a download (from a background thread) with OkHttp? I can't seem to see how in the javadoc. Nov 15 02:20:53 9hrs later he can release his load Nov 15 02:21:30 ladies will love your stamina, or men Nov 15 02:23:13 Oh, Call.cancel. Nov 15 02:23:34 did you finish early? Nov 15 02:23:53 I'm guessing Call.cancel is thread-safe. Nov 15 02:24:07 hahaha Nov 15 02:24:35 whatitis: Whom are you talking to? Nov 15 02:24:50 stingray is a decent dude but if you say so TacticalJoke Nov 15 02:26:15 JakeWharton: I suspect that HttpURLConnection.disconnect is not thread-safe pre-4.4. Is that right? Nov 15 02:26:29 This comes from spending hours reading the source. Nov 15 02:26:53 (And thereby noticing that OkHttp is used on 4.4+.) Nov 15 02:27:14 But the code is hard to follow, so I'm not sure. Nov 15 02:29:02 thread safe as in altering something in a thread from a seprate thread. or thread safe as in you have no idea what your clammering about? Nov 15 02:40:06 strange question but is it possible to show single pages from a viewpager if a viewpager contains multiple pages? Nov 15 02:48:11 viewpager shows single pages Nov 15 02:48:24 so success **** ENDING LOGGING AT Sat Nov 15 03:00:00 2014