**** BEGIN LOGGING AT Thu Jan 30 02:59:58 2014 Jan 30 03:03:07 snowinferno|work: just convert the int. Jan 30 03:06:15 seems silly to me that the only way of getting a string representation was deprecated... guess i'll have to try the one beneath it Jan 30 03:07:18 dragorn: how do you convert an int to an ip address when you have no idea how an ip address is represented as a single int? I guess the SO article answers that but the point remains Jan 30 03:07:18 just use formatter and format it. IPs are almost always stored as integer values. Jan 30 03:07:39 just use the deprecated method Jan 30 03:07:47 snowinferno|work: you look at how it's encoded by reading the docs and convert it. It's almost certainly a big endian 32 bit value Jan 30 03:07:56 because that's how IPs are almost always stored Jan 30 03:08:07 ignore the fact that it's deprecated, because that method is going nowhere so long as ipv4 exists Jan 30 03:08:58 And despite the address pool disappearing, there is no crisis Jan 30 03:09:34 pfn: however v6 is becoming more prevalent, especially on data carriers Jan 30 03:09:51 less so on wifi Jan 30 03:09:52 for now Jan 30 03:11:16 hi, brand new to java/ADT, going through youtube TUT series by D. Riley ( a year or so old),,I have all the prerequisits it seems, though on creating new project with gdx project UI and 'import'ing into android developer tools IDE ( eclipse with adt plugin), im getting 4 errors , first one being 'project not built since its build path is incomplete',,any idea ? ;)))ty anyone ;0--0-0 Jan 30 03:13:06 sure, but still not ubiquitous Jan 30 03:23:14 huh, the new google java guidelines (not android) specify 2 spaces for indent Jan 30 03:23:22 yuck Jan 30 03:23:30 yay Jan 30 03:23:38 lol i just said "yuck" out aloud Jan 30 03:25:07 two spaces are great Jan 30 03:25:08 personally I like 3, but 4 is ok ... two doesn't add much visually significant Jan 30 03:25:29 they also specify no hungarian notation shit Jan 30 03:26:56 * alex_PP dislikes prefixing everything with m Jan 30 03:27:09 i've recently changed to 2 spaces over tab Jan 30 03:27:12 i really like it Jan 30 03:27:39 hungarian notation is obsolete Jan 30 03:27:43 there's no ambiguity about whether to use 4 spaces or a tab Jan 30 03:27:43 alex_PP: no reason to unless you're contributing to AOSP Jan 30 03:27:56 our guidelines here have it too Jan 30 03:28:01 ah Jan 30 03:28:05 it was a crude way to deal with a world that didn't yet have editors that could parse your code as you were writing it Jan 30 03:28:16 it was decided that since we're writing android stuff, we should follow that Jan 30 03:28:32 no reason to have hungarian notation with modern code editors Jan 30 03:28:59 that's exactly what i said Jan 30 03:29:16 send a giant change that switches every one Jan 30 03:29:17 the argument was that it's better for gerrit, which has some merit Jan 30 03:30:27 but i've seen plenty of bugs from miss named, lazily refactored code, where people have assumed an m variable was a member but it wasn't Jan 30 03:35:23 How can I dim and brighten the soft menu button? I searched for about 30 minutes with no avail. Thanks. Jan 30 03:40:35 ColdSauce: I think you are looking for this: http://stackoverflow.com/questions/13280253/android-dimming-navigation-buttons Jan 30 03:41:02 Thorbear: I love you so much right now. You saved my life Jan 30 03:41:10 good bye all! Jan 30 03:43:59 hey what do you guys use as a cheap GCM backend Jan 30 03:44:11 linode ;) Jan 30 03:44:18 are there any services for this? Jan 30 03:44:23 I use File Not Found Jan 30 03:44:33 i could write an app server for it, but i'm feeling lazy Jan 30 03:45:02 i saw some "mobile backend starter" promoted by google, how much does that cost Jan 30 03:46:00 like ideally, a heroku app i could just fork and push Jan 30 03:48:43 i saw helios-framework but that's iOS only Jan 30 03:48:54 and there's the rapns gem, but then i need to build an app around it Jan 30 03:57:21 hey Jan 30 04:05:19 anyone free to lend 5 min to a newb Jan 30 04:06:12 5 minutes Jan 30 04:06:22 sweet Jan 30 04:06:29 Honestly though, you should just ask questions Jan 30 04:06:32 instead of asking to ask questions Jan 30 04:06:39 clock's ticking... Jan 30 04:07:04 I installed all the goodies to compile an app from source that was written in java Jan 30 04:07:25 im having issues with compile on linux Jan 30 04:07:42 That doesn't tell me anything Jan 30 04:07:51 with user permisisons i get a permissions error- with sudo i get cannot find symbol Jan 30 04:09:01 Anything else? Jan 30 04:09:04 ...createdFiles.lst (Permission denied) -> Jan 30 04:09:11 thats the user level error Jan 30 04:09:46 Person.java:[124,9] cannot find symbol Jan 30 04:09:55 and as root Jan 30 04:10:47 i googled hours, found java7 issues- backed out and install Oracel java6 same issues Jan 30 04:11:12 Was that the only line it gave you for symbol? Jan 30 04:11:23 there are many like it Jan 30 04:11:25 Also, with the permission error, did you chown the file? Jan 30 04:11:45 see if that fixes that one Jan 30 04:12:02 package javax.persistence does not exist Jan 30 04:12:17 Might help if you throw up your code and error log in a gist Jan 30 04:12:18 package org.jdom2 does not exist Jan 30 04:12:28 Sounds like your missing libraries too Jan 30 04:13:03 grrrr, why has the framework got so many methods set to final Jan 30 04:13:21 jerror: Also, I don't think javax.persistence is part of Android Jan 30 04:13:33 its glass Jan 30 04:13:36 unless it was added recently Jan 30 04:13:47 Ah. Jan 30 04:14:17 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project glass-java-starter: Error while storing the mojo status: /home/user/Glass/OxRefGlass/OxRefAppEngineServer/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst (Permission denied) -> [Help 1] Jan 30 04:15:39 jerror: try going to #googleglass Jan 30 04:15:54 I don't own Glass, nor do I develop for it, so I'm going to bow out here Jan 30 04:16:18 thanks for the time all the same Jan 30 04:16:42 ill go creep on that chan Jan 30 04:52:51 capella i think i'm going to apply for a job at Warm Springs Puppy Adoptions ! Jan 30 04:53:33 In time for The Puppy Bowl ?? Jan 30 04:53:43 \o/ Jan 30 04:54:03 My daughter got me into that when she was littler Jan 30 04:54:18 and spongebob, but don't tell anyone ;) Jan 30 04:54:54 hehe Jan 30 04:55:46 I'm ad-libbing here ... actually don't get the reference to "Warm Springs Puppy Adoptions" .... ? Jan 30 04:57:24 capella http://digg.com/video/budweisers-super-bowl-ad-will-make-you-cry Jan 30 04:57:26 hehe Jan 30 04:58:03 People use digg? Jan 30 04:59:01 the old digg died long ago; the new one is just a aggregator Jan 30 04:59:11 i dont think there is any way to comment, etc. i like it Jan 30 04:59:15 comments suck Jan 30 04:59:20 look at google+ or youtube Jan 30 04:59:21 :D Jan 30 04:59:56 The arstechnica feedback is pretty intelligent - I actually read those Jan 30 05:20:22 * capella goes back to looking for a new project Jan 30 05:26:39 does AsyncTask.execute() call AsyncTask.diInBackground()? Jan 30 05:26:44 capella getting closer to settling on one ? Jan 30 05:27:00 *doInBackground() Jan 30 05:30:11 g00s: no ... I'm going to have to do javascript if i stay in the mo-co world Jan 30 05:31:50 Anyone around to help with view/layout transitions? Jan 30 05:32:52 I want to create a view that when called on, does a slide transition into the main viewport.. When initializing/creating this view, should I just create like normal and just offset the margin? Jan 30 05:46:25 Hi, How to read pin generated by WPS in device side to my application..Please.. Jan 30 06:04:53 Why is it when I add a new view to a viewgroup, another child view's ALIGN_PARENT_BOTTOM breaks? Jan 30 06:11:24 best place to learn android development guys?? Jan 30 06:14:16 spergy: depends on learning style Jan 30 06:14:30 you could learn it all reading the cev docs and stack moverflow Jan 30 06:14:39 there's also free online classes Jan 30 06:14:44 and books Jan 30 06:16:52 I'm following through the new boston vids but they're kinda old and some resources he suggests to use are outdated and no longer available so it's difficult to keep going with those, so was seeing what you guys reccommended? Jan 30 06:17:23 my idea for an app isn't too complicated, just some menus with submenus then a heap of info/text comes up Jan 30 06:18:27 spergy may as well start with the learning section on d.android.com Jan 30 06:18:38 if that isn't helpful, plan B Jan 30 06:18:56 hopefully you know java though ;) Jan 30 06:19:33 I know a bit of Java, is it worth it to learn Java fully before trying android? thought I could kind of learn both as I go along Jan 30 06:20:11 a bit is usually all thats needed Jan 30 06:20:23 one thing that payts to know well is concurrency though Jan 30 06:20:43 ok Jan 30 06:20:52 why oh why does it have to be Java :( Jan 30 06:21:01 yea Jan 30 06:21:03 :( Jan 30 06:21:06 wish we could write apps in python Jan 30 06:21:13 makes sense Jan 30 06:21:32 Thought you could do python in Anrdoid now Jan 30 06:21:39 hm Jan 30 06:21:55 what about javascript and html5? Jan 30 06:22:02 yeah with Kivy, but that seems a bigger learning curve than learning the normal way Jan 30 06:22:07 Not a well established project but I saw something Jan 30 06:22:54 Android apps crash enough without duck typing Jan 30 06:25:27 Hi, How to read pin generated by WPS in device side to my application..Please.. Jan 30 06:29:19 Most of my Android programming for the past months has been in C++, so I've been having all the fun of that stability... Jan 30 06:29:50 how are you doing that Ologn? Jan 30 06:29:53 there's been an adroid port of python for years Jan 30 06:30:07 distributing pythons apps moght be pretty grotty tho Jan 30 06:30:12 spergy, via the Java Network Interface Jan 30 06:30:29 Network, eh? Jan 30 06:30:33 Actually I've been porting stuff...I just released my latest port a minute ago Jan 30 06:30:41 Native I mean?!!? Jan 30 06:31:03 that makes more sense Jan 30 06:32:54 One problem with porting all these open source PC apps, so many of them are for big screens Jan 30 06:33:21 My last one I had to do for tablet only...although if it's popular it might be worth it for me to redesign it and do a phone version Jan 30 06:35:15 i like that the mobile revolution is forcing websites to become very minimal Jan 30 06:35:23 and nearly identical Jan 30 06:36:17 the big screens and fast pcs just lead to design narcicissm Jan 30 06:36:42 Junky mobile web sites probably help drive app downloads as much as anything Jan 30 06:37:16 is it possible to replace the auto generated e.printstacktrace in catch blocks in android studio? Jan 30 06:38:39 Siamaster: yes Jan 30 06:39:02 you need to go to your code snippets settings and change it to Log.getStackTrace(e) Jan 30 06:39:59 Siamaster: settings > preferences > Java > Editor > Templates Jan 30 06:40:04 thnx! Jan 30 06:44:49 but is that for eclipse or for android studio? Jan 30 06:47:05 crap. it just took 40 minutes to repo sync Settings; i wonder if there is a better way - don't need all the git history Jan 30 06:50:19 Guys, I just bought a new laptop with a super hires screen. Android studio is not tiny. Any idea how I would fix that? Jan 30 06:51:05 sit further from the laptop Jan 30 06:52:09 * g00s sighs Jan 30 06:52:30 dudes Jan 30 06:56:52 i think he meant "now tiny" Jan 30 06:57:10 JustSighDudes: increase font size in android studio Jan 30 06:57:27 nope, increase os level dpi settings Jan 30 06:57:49 that way its consistent across apps Jan 30 06:58:55 deebo: I did. All the other apps are fine android studio is unaffected. Jan 30 06:59:04 what platform ? Jan 30 06:59:14 myke: I did. All that did was make the text large. So it gets cut off in all the menus and boxes and stuff. Jan 30 06:59:19 g00s: Xubuntu Jan 30 06:59:26 ohshit Jan 30 06:59:42 well you could try http://blog.jetbrains.com/idea/2013/09/jdk7_compatibility/ Jan 30 07:00:00 hah, good luck with high dpi in linux Jan 30 07:01:22 Crap Jan 30 07:01:27 Looks like it's back to windows for me. Jan 30 07:01:59 you could just use a lower res, but high dpi in linux is no go at the moment Jan 30 07:02:29 there might be some idea specific settings, atleast eclipse has some high dpi settings Jan 30 07:02:46 [A3G1S]: HAI Jan 30 07:02:54 have you worked with Volley before? Jan 30 07:03:01 oh man; i changed that setting from 1.6* to 1.7* and the fonts got totally fucking unbearable / fuzzy Jan 30 07:03:43 thepoosh what you said before was for eclipse right? Jan 30 07:03:55 yep Jan 30 07:04:11 AS is built off IntelliJ that's built off Eclipse Jan 30 07:04:18 so it should be about the same Jan 30 07:04:57 <[A3G1S]> hey thepoosh Jan 30 07:05:05 idea is not built off eclipse Jan 30 07:05:06 <[A3G1S]> naa man, I've never used Volley Jan 30 07:05:17 it has no relation to it, thank god Jan 30 07:05:19 deebo: that's what I remember Jan 30 07:05:24 lol Jan 30 07:06:17 deebo: I do hate Eclipse Jan 30 07:06:42 Siamaster: http://www.jetbrains.com/pycharm/quickstart/ Jan 30 07:06:47 this is for AS Jan 30 07:07:51 is intellij really built off eclipse? i really don't think so Jan 30 07:07:59 not Jan 30 07:08:04 fwiw i use eclipse in xubuntu 13.10 Jan 30 07:08:54 but then again i have a 22" monitor and my laptop is not high resolution Jan 30 07:12:22 can i fire onActivityResults of fragment if the fragment isn't initialized? Jan 30 07:16:42 does HttpURLConnection automatically follow redirects if I set setInstanceFollowRedirects(true)? Jan 30 07:20:20 Sounds like the right option for that. Jan 30 07:20:23 Try it out and see Jan 30 07:20:30 any one used notificationlistenerservice? Jan 30 07:20:51 for me , it sometimes works and sometimes doesn't :S really weird Jan 30 07:22:47 well that sucks ass; java 7+ on mac don't do subpixel font AA Jan 30 07:22:59 java 6 did that with Quartz Jan 30 07:23:03 (the apple one) Jan 30 07:23:27 even Tor thinks it looks like crap Jan 30 07:23:30 shit Jan 30 07:24:25 so oracle added subpixel AA to JavaFX but not Swing :| Jan 30 07:24:32 * g00s headdesk Jan 30 07:24:45 well , they did kinda say Swing was "deprecated" Jan 30 07:24:57 sucks to have a product using it i guess Jan 30 07:25:26 Eclipse looks fine Jan 30 07:26:10 A question about fragments / dialogs. My application is based on a single Activity with a navdrawer which switch between 20 fragments. Only a fragment is showed at time in full screen size. I would like to know if is possible to show a dialog from fragment and keep dialog code in that without to have to write all in MainActivity class Jan 30 07:29:43 shineworld: in fragment you can call getChildFragmentManager Jan 30 07:29:46 and use that Jan 30 07:29:59 looking for that :) Jan 30 07:31:59 How can I make a view stay overtop all others, regardless of when I add future views? Jan 30 07:32:54 Zypho: you'll need to always call bringToFront() Jan 30 07:34:00 thepoosh, what I need is to call showDialog and manage onCreateDialog, etc in my fragment code ... is possible or is completly wrong ? Jan 30 07:39:46 hm, looked like google smacked samsung on its modifications to Android Jan 30 07:40:05 i've never seen Magazine UX Jan 30 07:40:59 "Essentially, the more Samsung can do to lock consumers into its own vision of Android, the less attractive it becomes to other OEMs, and that presents a real problem for Google, as those manufacturers might start looking into competing ecosystems like Windows Phone." oopx Jan 30 07:43:44 is Windows Phone "competitive"? Jan 30 07:44:29 maybe FirefoxOs :D Jan 30 07:45:37 hm, PDF support got added back to Play Books. I wonder what PDF library Google is using Jan 30 07:46:09 if its java (doubt it) or C based maybe Adobe PDFL or more likely Foxit Jan 30 07:47:01 capella btw, one adobe engineer i know says FF pdf support doesn't pass half the tests Jan 30 07:47:17 pdf.js? Jan 30 07:47:23 yeah, that turd Jan 30 07:47:33 Heh ... it'snew" Jan 30 07:47:56 and the rendering gets messed up just because its using FF's font preferences Jan 30 07:48:00 I think on mobile we turn PDF over to native app Jan 30 07:48:01 How is it possible that a child layout can alter the size of its parent layout? Jan 30 07:55:07 android studio vs eclipse, which is good? Jan 30 07:56:01 AS vs eclipse is the new vim vs emacs Jan 30 07:56:20 the echo chamber says AS Jan 30 07:56:45 AS is good? Jan 30 07:56:56 Ah showDialog is however "deprecated" in favour of DialogFragment.... Jan 30 07:58:29 eclipse is bad Jan 30 07:59:53 thanks Jan 30 08:00:11 but i use eclipse. and then i will study android studio. Jan 30 08:01:02 g00s: fyi- Colbert just had a clip with him in the Puppy Bowl :D Jan 30 08:02:15 capella XD link ? Jan 30 08:02:34 that has to be one of the best jobs :) Jan 30 08:02:51 I saw the show on old school TV Jan 30 08:03:12 bah wat is TV Jan 30 08:03:46 ya - checkin the website Jan 30 08:04:07 g00s: that monitor for checking the source when you rip shows for putting on bittorrent Jan 30 08:04:22 capella: you use android studio? Jan 30 08:04:46 fly2web: intelliJ actually ... originl stuff from IDEA Jan 30 08:05:10 capella: i don't know your mean? Jan 30 08:05:21 tried Eclipse and hated it ... couldn't understand how anyone felt it was usable Jan 30 08:05:38 "clean" button ... cracks me up XD Jan 30 08:05:49 well TBH Jan 30 08:05:54 IDEA tends to crap out at time as well Jan 30 08:05:59 then you use android studio? Jan 30 08:06:11 Not that i've ever noticed mavrik Jan 30 08:06:14 and then you need to use the rebuild button... or even the nuclear "clean caches and restart" option :) Jan 30 08:06:52 Oh! I did see the nuclear invalidate cache and restart - that's kinda like "clean" - but i've never needed it - never Jan 30 08:07:46 fly2web: Android Studio is Googles version of Idea's intelliJ Jan 30 08:07:52 the problem i keep having with AS is that error markers either (1) don't show up until i do a project make or (2) they are exist in the editors but there are no problems Jan 30 08:07:57 "branded" kinda thing Jan 30 08:08:30 capella but i think if you are using intellij, you are basically using AS android support pre 13 final release Jan 30 08:08:55 As has the freshest android support; intellij has the freshest IDE codebase Jan 30 08:08:57 i don't know whether using android studio? Jan 30 08:09:08 They may have merged together ... my version is 13 CE Jan 30 08:09:22 capella they are not on the same page i don't think Jan 30 08:09:34 fly2web: why don't you just try it? Jan 30 08:09:49 myke: because i use eclipse. Jan 30 08:09:57 you can install both Jan 30 08:10:03 oh really. Jan 30 08:10:07 ok i see. Jan 30 08:10:09 myke: Jan 30 08:13:08 capella here is a project you can work on Jan 30 08:13:21 your own app - for burro racing ! Jan 30 08:13:21 ? Jan 30 08:13:23 http://modernfarmer.com/2014/01/full-tilt-boogie/ Jan 30 08:13:47 hahahahahahaha Jan 30 08:14:10 "And the burros! These wonderful animals." Jan 30 08:15:27 'Last Ass over the Pass' :) Jan 30 08:23:04 All sortsa puns there ... "Get your asses in gear" Jan 30 08:40:01 if i am writing a custom Preference class, does my onSaveInstanceState / onRestoreIS have to load / save things that were set in the preferences.xml and initially set up via the constructor AttributeSet ? Jan 30 08:41:04 thepoosh, thank you dialogfragment works like a charm Jan 30 08:41:14 shineworld: YAY!!! Jan 30 08:42:55 I was able to show it by my framework but using mActivity.getFragmentManger() and not with getSupportFragmentManager() which I wasn't able to find Jan 30 08:55:57 capella … is your favorite pasta capellini ? Jan 30 08:56:02 :) Jan 30 08:57:35 * capella is a star !! http://en.wikipedia.org/wiki/Capella_%28star%29 Jan 30 08:58:17 (That's what my Austrian fore fathers tell me) Jan 30 09:05:57 Hello, I need help with a Javascript interface. From stackoverflow I learned, that you can make a bridge by defining a method, to which the js part will pass the value. However, how do I correctly return this value from the method? I'm new to java scopes. Here is an example: http://stackoverflow.com/a/4892013/422621 Jan 30 09:05:57 How do I retrieve value where it says "process the html as needed"? Jan 30 09:09:23 oh, I probably should make an instance Jan 30 09:10:28 with a getter Jan 30 09:18:07 Hi, what's the best way to pull info from a website? httpPost? Jan 30 09:18:59 The thing i sort of dislike with the httpPost is that you get the whole html document instead of segments of data, like with JSON Jan 30 09:21:32 Greetings, folks! Can anyone please suggest me what to do with such an OS bug (?) when something goes weird with colors in the app: I have multiple of textviews with #ffffff color, but absolutely all backgrounds with #ffffff really become #00000000 (black-transparent). I tried to change all background to #fffffe, which sometimes works, but android seems to live his own life so such background after like 2-3 minutes of app idle can take such a view and Jan 30 09:21:33 its background #00000000 while I do nothing. After that, if I relaunch app - this background is already transparent since app start, but if I make it #fffffd it becomes ok, but until once it becomes transparent again -.- Jan 30 09:21:39 stupid question Jan 30 09:22:18 what if you go into colors.xml under res and define a black color and refer to it? Jan 30 09:23:02 jutsi: I even tried android:color/white, same thing Jan 30 09:23:13 jutsi: right now I probably got why this happens... Jan 30 09:23:13 That makes a difference huh? Jan 30 09:23:20 say i have these classes Jan 30 09:23:21 class A { void() { print "a" } } class B extends A { void() { print "b" }} class C extends A { void() { print "c" }} Jan 30 09:23:36 posplaw did you try defining color and doing @color/colorname in the android:background ? Jan 30 09:23:46 jutsi: yes, same thing Jan 30 09:23:49 and i do this .. C c = new C(); ((B)c).print Jan 30 09:23:55 what would it print? Jan 30 09:24:13 posplaw have you tried defining the background color in code rather than xml? Jan 30 09:25:52 jutsi: well, this behave the same Jan 30 09:25:55 let me explain Jan 30 09:26:52 posplaw do you have multiple views in a hierarchy? Jan 30 09:27:17 here is one thing you should know I think: my app is a view pager, where center one view is the tab host, which contains like 12-14 tabs, some of them have map fragments inside. There is an OS bug when sliding view pager makes some black background space under map fragment which is not scrolling and overlaps my side menus Jan 30 09:27:46 once I found a trick which requires you to put transparent view right above everything, so those black fragments dissappeared Jan 30 09:28:03 but it seems that it's made my views lose their backgrounds Jan 30 09:28:27 Oh, i don't think im qualified to answer you on that then Jan 30 09:28:28 lemonxah: abc? Jan 30 09:31:19 Guys, is something wrong on my loop ? its just a part of my code, I want to occupy arraylist's position (variable l) with the current contect of variable "testtest" . what is wrong with files.add(l,testtest) there is a fatal exceptions at that point . here is my code, http://pastebin.com/HxbPrUvB thank you all Jan 30 09:32:07 jebus christ, such code Jan 30 09:32:09 use foreach Jan 30 09:33:14 is foreach literally that different ? okay i use it , but you thing that the problem is there ? Jan 30 09:34:00 oh, actually the error is that you didnt instantiate an arraylist Jan 30 09:34:15 you are trying to call .add(1, value) on a null reference Jan 30 09:34:37 jutsi: well, I just removed this "fix" for black background Jan 30 09:34:48 but situation didn't change: views still lose their backgrounds Jan 30 09:35:28 how have you defined their backgrounds? Jan 30 09:35:57 xml? Jan 30 09:39:47 jutsi: no matter, xml/code, this behaves the same: I open "tab", background is white, I do swipe view pager and immediately it becomes transparent Jan 30 09:40:55 posplaw if it only becomes transparent after you swipe it sounds like you have but your views visible in the wrong order Jan 30 09:41:53 *put Jan 30 09:42:37 I can't speak entirely on the behalf of android programming, but java is generally very strict about these things Jan 30 09:43:37 jutsi: one more finding that I passed: if swipe done right after screen show - background stays white, but if there were alert dialog - background is lost after swipe Jan 30 09:44:05 posplaw is the content in the view still visible despite background being lost? Jan 30 09:44:17 jutsi: yes, it's visible Jan 30 09:44:34 deeboo, could you please explain me why i have errors ? at the bottom of my code you have logcat output with referenced lines (since logcat lines: doesnt match the lines pastebin will show) Please would you or someone take a look at my code? Thanks . http://pastebin.com/BPec13qh Jan 30 09:46:47 jutsi: ooooops! :))) Jan 30 09:46:52 i've found a bug:) Jan 30 09:47:01 oh? now im curious Jan 30 09:47:41 jutsi: I was setting transparent color in that alert dialog for testing I was doing Jan 30 09:48:08 but main problem didn't disappear: if I use text-color's #ffffff in any layout's background they don't receive it Jan 30 09:48:19 well, it's ok since I use #fffffe there ;P Jan 30 09:51:27 Guys please, i really need to understand what is wrong, can someone point me in the right direction ? // could you please explain me why i have errors ? at the bottom of my code you have logcat output with referenced lines (since logcat lines: doesnt match the lines pastebin will show) . http://pastebin.com/BPec13qh Jan 30 09:57:12 Good day people. Is there a way to get a list of devices compatible with a specific app on google play ? Jan 30 09:58:47 It ill nicely tell if any of MY devices is compat. Jan 30 09:59:10 But I don't know what device I can buy if I want to make sure app b or c will work on it. Jan 30 09:59:14 DOSP: looks like your ArrayList is empty and you are trying to pull values from it Jan 30 10:00:20 the_fog well i created a getter in another class so i can pull data between activies , why doesnt stardard generated getter work ? it should be occupied with data Jan 30 10:02:04 also i have error at runnable.run() why is that ? shouldnt it be basic process of creating new thread and executing runnable e,t,c, ? Also about the getter,please check line 108. it should go flawlessy, shouldn't it ? Jan 30 10:07:13 DOSP: i see the getter alright, but the error is indexoutofbounds which means its breaking down somewhere because the ArrayList is empty. did you debug and step through? Jan 30 10:10:00 Somehow android studio isnt working well now, i dont know why, but it just doesn't stop on all breakpoints (mainly when process goes to another class ) so is hard to debug Jan 30 10:10:35 DOSP: sorry about the vague answer, it's just a bit hard to tell from the pastebin snippet.. Jan 30 10:12:42 the_fog no i really appreciate your answer, i try to somehow fix the debugging, hopefully i come back with somehitng thank you very much, sir Jan 30 10:16:21 Hello :) I'm using achartengine inside a Fragment and want to add a vertical line on clicking a point in the graph. Clicking works but the line doesn't seem to be added. Here's the code: http://pastebin.com/XuUAW5vb Any idea what I do wrong? Thanks. Jan 30 10:17:50 Sorry, some lines were missing: http://pastebin.com/yuqWTgrt Jan 30 10:18:29 Hey Jan 30 10:18:46 Can any one here help me in RIL (Radio Interface Layer) ? Jan 30 10:48:50 hey guys Jan 30 10:49:33 Is this possible in Android to do call conference programmatically in android using SDK? Jan 30 11:00:30 I need to use a ListAdapter, what is the difference between ArrayList and ArrayAdapter? Jan 30 11:02:50 arraylist isn't an adapter? :) Jan 30 11:03:05 and arrayadapter is an adapter that uses arraylist to store element data :) Jan 30 11:03:43 Hello :) I'm using achartengine inside a Fragment and want to add a vertical line on clicking a point in the graph. Clicking works but the line doesn't seem to be added. Here's the code: http://pastebin.com/yuqWTgrt Any idea what I do wrong? Thanks. Jan 30 11:04:14 smallfoot- did you mean the difference between ListAdapter and ArrayAdapter :) Jan 30 11:39:50 guys try migrate android studio project to eclipse.. I copy src folder, Android manifest and res folder Jan 30 11:40:18 won't eclipse import from AS? Jan 30 11:41:03 * capella doesn't prefer Eclipse Jan 30 11:41:26 eclips give me 131 errors, reason is missing supprotV7 Jan 30 11:42:46 capella Android Studio give me grandle error 1.8 needed and current is 1.9 Jan 30 11:43:08 Dudi: I once read a good link on that topic: http://rexstjohn.com/exporting-android-project-eclipse-android-studio-0-4-0/ maybe it helps a bit Jan 30 11:44:18 oh i c Jan 30 11:44:22 the other way round Jan 30 11:44:29 didn't know sb did that Jan 30 11:44:31 sorry! Jan 30 11:55:34 KNUBBIG is ther a way to update my project grandle to 1.9? Jan 30 12:09:30 Hello Jan 30 12:09:38 could anyone help me? Jan 30 12:09:58 I have a Samsung Galaxy S3 Jan 30 12:10:05 today I got the new update firmware Jan 30 12:10:24 I proceeded with the installation but after the Gear Updating Screen Jan 30 12:10:52 the phone changed to the SAMSUNG screen and it has been in that screen at least for 40 min Jan 30 12:10:56 what can i do? Jan 30 12:11:12 I didnt want to turn off or do something before to ask you guys Jan 30 12:11:15 anyone? Jan 30 12:11:18 Thanks! Jan 30 12:13:55 Hello, anyone around? Jan 30 12:18:13 no one in this channel can really help you with that, this is an app dev channel Jan 30 12:18:48 hi guys Jan 30 12:19:47 should all methods that override call super.onxxxx() ? Jan 30 12:20:23 ting: this is for development, you'll have to ask in #android Jan 30 12:20:32 yes smallfoot- unless you dont want to call it for some reason but if its a framework override then yes Jan 30 12:20:44 I see Jan 30 12:21:05 I'm using actionbar sherlock to get a menu with tabs. every tab is supposed to add a fragment to the view. in the onTabSelected() method I therefore use FragmentTransaction's .replace() method. one fragment contains a supportmapfragment. it works on the first time when the fragment is loaded but on the second time I get duplicate id error. I understand that this is propably because it has loaded the fragment already but what can I do about it? Jan 30 12:21:22 shall I remove the fragment from the xml and do it all in the code? Jan 30 12:21:29 AsyncTask.onPostExecute() should call super.onPostExecute() too? Jan 30 12:22:41 i dont call it Jan 30 12:22:43 why do you ask? Jan 30 12:23:23 smallfoot-: http://stackoverflow.com/questions/20637355/should-i-call-super-onpostexecuteresult-in-android-asynctask :) so no need to call it Jan 30 12:27:01 thanks Jan 30 12:28:29 So how can I know when I should call super.*() in my overrides, and when is it unneascesary? Jan 30 12:30:36 smallfoot- you could look at the AsyncTask code ;) Jan 30 12:30:55 for 150 lines, its sure caused lots of problems Jan 30 12:31:17 i'm happy to say that i've never used it :D Jan 30 12:32:19 lol Jan 30 12:32:53 I wish Android had a JSONAdapter, but I know there is a third-party one Jan 30 12:33:39 GSON is fairly easy to use Jan 30 12:33:41 for me at least Jan 30 12:56:18 Does anyone know of a library that enables a footer in a GridView? as seen in ListView... Jan 30 13:01:16 MroiZo: i've written my own, its not perfect but it works https://github.com/scruffyfox/GridListView/tree/develop Jan 30 13:01:42 still in development though Jan 30 13:09:13 I have an SDK which I believe utilizes the MediaPlayer api, is there anyway I can globally set a listener on finished playing? The SDK doesn't appear to give me direct access to its MediaPlayer instance Jan 30 13:11:11 Zypho: yes, setOnCompletionListener(... Jan 30 13:11:46 shmoooz: but in order for to use that I need access to the mediaPlayer instance right? Jan 30 13:11:52 *android/java newb here Jan 30 13:12:12 yeah I guess Jan 30 13:13:14 myMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { ... Jan 30 13:14:44 but where does mMediaPlayer get defined Jan 30 13:16:40 declare it before onCreate() in MainActivity, MediaPlayer myMediaPlayer; Jan 30 13:16:48 and initialize it in onCreate() Jan 30 13:18:47 CallumTaylor: really nice, i'll look at it :-D Jan 30 13:19:42 Zypho: initialize in onCreate() like this .. myMediaPlayer = (MediaPlayer) findViewById(R.id.myVideoView); Jan 30 13:20:15 or whatever Jan 30 13:22:05 Zypho: you would need to put in your main.xml hello people , i use motionEvent for move a viewA with finger, depending on the position of this viewA I add a new viewB. when View B is coming my MotionEvent coordinate is reset. i think the draw/redraw of the view create this. is there a function or event to Detected when view is redraw into fragment ? thanks for your help Jan 30 13:23:12 shmoooz: thanks ill try that Jan 30 13:26:11 Okay Guys, so apparently the AsyncTask will stay alive even if you activity is closed, right ? Jan 30 13:26:17 yes Jan 30 13:26:21 it runs in the background Jan 30 13:26:50 I thought AsyncTask doesn't run if your MainActivity stops Jan 30 13:27:02 you need service for that Jan 30 13:27:19 maybe I'm wrong Jan 30 13:29:08 no asynctask runs even if your app is closed Jan 30 13:29:16 if the app is stopped then it will stop Jan 30 13:29:29 i.e force stopped or killed by android Jan 30 13:29:39 but it probably won't be killed by android if its still doing stuff Jan 30 13:29:47 I see Jan 30 13:29:58 closed meaning paused Jan 30 13:30:04 yeah Jan 30 13:30:05 not stopped Jan 30 13:30:32 well stopped != killed Jan 30 13:30:41 your app could be paused from clicking home Jan 30 13:30:46 but stopped from clicking back until the app closes Jan 30 13:30:52 the async task will still be running Jan 30 13:30:55 ok murdered Jan 30 13:31:19 slaughtered Jan 30 13:31:28 if you have finish() in your onBackPressed, it will be dead Jan 30 13:31:44 the activity will be, but not the app Jan 30 13:32:58 oh Jan 30 13:32:58 didn't know that Jan 30 13:37:33 oo guys thank you Jan 30 13:38:19 i have problem though, i have my app which uploads in asynctask images on ftp , but when i lock the screen by pressing start button on my smartphone, and then unlocki the screen , my app crashes :{ Jan 30 13:38:40 and i am totally finnished with my project, only this little thing is worryng me, how to fix htat ? Jan 30 13:38:41 that ? Jan 30 13:44:12 how can i make sure that my activity will be alright when closed or overlayed by call e.,t.c. ? thanks Jan 30 13:44:26 DOSP: maybe you need some stuff in onPause() and onResume() to stop it from crashing Jan 30 13:44:26 not sure what Jan 30 13:45:30 wow GTA SA for android is out ! :) Jan 30 13:45:43 DOSP: stack traces are, in most crashes, and in this case I'm sure as well, enlightening Jan 30 13:47:16 ok i try Jan 30 13:48:46 Here you go guys, this is error when activity is closed (with home button or when screen is locked and i believe if the activity is overlayed by call it will do the same); http://pastebin.com/UcsS52eZ Jan 30 13:52:25 DOSP: it says because your db cursor is closed Jan 30 13:53:05 i see but i dont quite understand the db cursor thing Jan 30 13:54:11 wait by db you mean databse or what ? because iam sure i am not using any database Jan 30 13:54:19 DOSP: https://www.google.ca/search?q=android+Attempted+to+access+a+cursor+after+it+has+been+closed&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a&gfe_rd=cr&ei=VlnqUvD2N8GC8QfKxYDQAQ Jan 30 13:55:29 thank you very much mister Jan 30 13:56:26 Does the MediaPlayer api support SMIL files? Jan 30 13:58:20 no. Jan 30 14:03:23 A quick question, I want my app to ignore device rotation - so I've added android:configChanges="orientation|keyboardHidden|keyboard" to my activity in the manifest - but that doesn't seem to work. Any ideas? Jan 30 14:03:51 schmooz , but i dont understand should i create new cursor e.t.c. ? or is there way to instantiate the currect one which is somwhere hiddne like getCursor or what ? Jan 30 14:04:56 KNUBBIG just add to your manifest under specific activity this " " Jan 30 14:05:21 KNUBBIG, you just told Android your app will handle the change itself, not that it won't rotate Jan 30 14:05:26 use what DOSP said. Jan 30 14:05:57 DOSP: Mavrik I know, thanks Jan 30 14:06:44 The only thing I basically wanted is onCreate() not to be called because I'm checking for google play services and root availabity here Jan 30 14:07:22 DOSP: not sure, did you post your code ? Jan 30 14:08:27 shmoooz well iam using this http://pastebin.com/aqW3f8HE Jan 30 14:09:08 * zinx hopes KNUBBIG isn't one of those people who thinks 'busybox' is root Jan 30 14:09:31 DOSP: I think you need to define onPause and onResume as well Jan 30 14:09:46 zinx: no, I'm quite sure using chainfire's libsuperuser and Shell.SU.available() doesn't have much to do with BusyBox ;) Jan 30 14:09:48 when you lock your screen, I think onPause is getting called Jan 30 14:09:48 Morning Jan 30 14:09:59 KNUBBIG: yes, this is correct :) Jan 30 14:09:59 morning :) Jan 30 14:11:25 schmooz what should be called onResume ? when onClose e.t.c. are calling cursor.close but cursor.open or something like that isnt there Jan 30 14:12:41 DOSP: are you using MediaStore to find photos or something ? Jan 30 14:13:08 yes Jan 30 14:13:17 they say make sure not to cursor.close() and leave that to android Jan 30 14:13:38 ah noo, Jan 30 14:13:38 so if you have a line with cursor.close() comment that out Jan 30 14:14:18 okay done, Jan 30 14:14:32 I have two android projects, the core and the app, (the app corresponds to the v in the MVC pattern). In the core I have a static class that's supposed to read plist files from the core resources, for that i need the core context. any recommendation on how I can get the context? Jan 30 14:14:33 gm Jan 30 14:15:01 and that static class is only called from the app Jan 30 14:18:59 http://pastebin.com/YfZksQ7P what is wrong? :{ Jan 30 14:19:33 I mean i added all onPause,resume,destroy,stop , and still it crashes when i lock the screen and reopen it Jan 30 14:20:15 DOSP: remove cursor.close() from onPause and onResume Jan 30 14:20:30 and I guess leave it in onStop and onDestroy Jan 30 14:21:13 if(!cursor.isClosed()cursor.close(); Jan 30 14:22:08 and if its still crashing, remove it from everywhere ;) Jan 30 14:22:20 shmoooz i dont have it anywhere now and it crashed Jan 30 14:22:39 DOSP: follow the stacktrace... Jan 30 14:23:09 schmoooz http://pastebin.com/p2WFxXEY Jan 30 14:25:57 DOSP: not sure but I do use MediaStore to find files and I have no such problem Jan 30 14:26:46 When I get the user's mail address that belongs to his google account via the AccountManager, can I be sure that it is the same I'd get after an OAuth-process via the userinfo.email scope? Jan 30 14:28:50 is new Activity(); a good way to get the context of the application in a static class? Jan 30 14:29:50 you should never call new Activity(), and its context would never be valid. Jan 30 14:30:25 For a static class you would have to use a setter of some sorts Jan 30 14:30:30 why oh why does android 4.4 only support 4 BLE connections Jan 30 14:30:44 hi all Jan 30 14:30:46 4.3* Jan 30 14:31:05 jonc-1: as it its the only one to support BLE connections, or thats all it will accept Jan 30 14:31:33 is there a way to check if an app is still in the memory? Jan 30 14:31:34 4.4.2 supports up to 7 Jan 30 14:31:57 Which we are testing on galaxy S4's, so we should get it shortly Jan 30 14:31:59 I dunno if my question arrived (had a network hiccup), so sorry if this is a double post: When I get the user's mail address that belongs to his google account via the AccountManager, can I be sure that it is the same I'd get after an OAuth-process via the userinfo.email scope? Jan 30 14:32:06 jonc-1: oh nm, i miss understood your statement Jan 30 14:32:11 XspeedPL: from what Jan 30 14:32:23 and I believe we are moving to Nexus 5s here shortly (much cheaper to buy without a contract) Jan 30 14:32:24 a service? broadcast receiver? Jan 30 14:32:29 from another app Jan 30 14:33:09 * jug6-mbl can only guess Jan 30 14:33:15 can be anywhere Jan 30 14:33:48 XspeedPL, I doubt it, at least it won't be easy Jan 30 14:34:10 no official way, eh? Jan 30 14:34:47 google is your friend Jan 30 14:35:30 I'm trying to build someone else's project with dependencies libraries using Android Studio. I cloned my dependencies to a root/libraries directory, and created respective build.gradle files Jan 30 14:35:37 i checked it first, then asked here Jan 30 14:35:47 always should :P Jan 30 14:36:08 The projects build successfully on their own, but I am getting 'missing symbol' errors when assembling the main project. The external library is not being recognized Jan 30 14:36:16 What should I be looking for? Jan 30 14:36:34 i always google first Jan 30 14:36:49 okay so apprently i should remove cursor.close from my code and then this will stop showing ": Attempted to access a cursor after it has been closed. " my problem is i dont even have it there ... Jan 30 14:36:56 then ask here, and if theres no answer, i look through the whole APIs Jan 30 14:37:33 XspeedPL: http://stackoverflow.com/questions/3278895/how-to-check-current-running-applications-in-android Jan 30 14:37:43 first result, seems to show all packages running. Jan 30 14:38:18 Mornin'! Jan 30 14:38:21 second answer even shows processes Jan 30 14:38:35 ActivityManager! why didn't i think of that Jan 30 14:38:42 thanks man Jan 30 14:38:56 does anyone have a script for turning json output into gson models? Jan 30 14:38:58 np Jan 30 14:40:21 Ankhwatcher: http://stackoverflow.com/questions/1957406/generate-java-class-from-json Jan 30 14:42:03 jug6-mbl: thanks, good find Jan 30 14:43:05 for anyone who prefers intellij's keymap but has to use eclipse for things:http://www.jroller.com/santhosh/entry/intellij_idea_key_scheme_for Jan 30 14:45:17 Doesn't look like the IAP example from Google is updated to show the simplifications available in 3.0; that's one hell of an example! ;-0 Jan 30 14:46:06 3.0 was a pretty huge simplification also Jan 30 14:46:15 b4 that i was a royal PITA Jan 30 14:46:23 still annoying, but not nearly as much so Jan 30 14:46:26 Yeah, that's what I've gathered, but that sample. Well.. Jan 30 14:46:43 lol Jan 30 14:47:58 Hey guys, why is 'tempNumber' null in the second log? https://gist.github.com/anonymous/3b6c24be2fa4ec1db40f Jan 30 14:48:03 2512 lines of java code. "Helper" class is almost a 1000 source lines long. Jan 30 14:49:25 kjeldahl, ouch Jan 30 14:50:38 CocoStorm: because your logging tempNumber when you are setting tempCode Jan 30 14:52:32 jug6-mbl, I've set tempNumber when I clicked the other button, and I need that number in checkCode(); Jan 30 14:53:35 so when I click button 1 tempNumber is set and I can see the log, then I click other button and tempNumber is null and checkCode is called and posts a null string Jan 30 14:53:41 causing havockz Jan 30 14:53:45 Ah, now I get it. Their "3.0 overhaul" consist of simply requiring me to import 2k lines of java source "helper classes" into my own source tree. Thanks, I guess. Jan 30 14:54:59 kjeldahl: the do work well tho lol Jan 30 14:55:07 anyone? :) Jan 30 14:55:53 jug6-mbl: I hope. :-) Jan 30 14:55:56 it is strange right? Jan 30 14:56:10 CocoStorm: who knows, with your check code function you might be running into concurrency issues Jan 30 14:56:15 why is it bad to use startManagingCursor(cursor); ? (it is deprecated e.t.c. but what to use instead ?) Jan 30 14:56:46 jug6-mbl, but tempNumber is null before checkCode is called Jan 30 14:57:18 well you are calling check code in your first button Jan 30 14:57:29 so it is possibly still running while you press the second button Jan 30 14:57:59 oh Jan 30 14:58:01 maybe Jan 30 14:58:13 How can I request that a certain portion of my native app to run as root? Jan 30 14:58:36 ivali: jni? Jan 30 14:58:42 jug6-mbl, yes Jan 30 14:59:10 Does anyone have or know of a tutorial where I can change pictures of apps or games? Jan 30 14:59:15 i need to acces /dev/net/tun from my app. but i can't do that even if i set 777 on it Jan 30 14:59:27 ivali: idk if it can be done through jni Jan 30 14:59:44 only way ive seen to access root is through su Jan 30 15:00:49 Hi all, does somebody know how to manage city names in multiple languages? example: Brussel = Brussels etc. (in own database) Jan 30 15:01:01 ugh Jan 30 15:01:07 now you opened a can of worms :D Jan 30 15:01:30 FrancescoV: do strings.xml based on locale Jan 30 15:02:05 yes Jan 30 15:02:20 and then the user will look for Munchen and won't find it because you have Munich Jan 30 15:02:27 or like... Vienna has at least 10 different names :) Jan 30 15:02:50 Well Munchen is wrong in every language :> Jan 30 15:02:53 localized strings are neat for simple use case though Jan 30 15:02:53 nature of the beast Jan 30 15:03:06 KNUBBIG, yeah, dumb Apple keyboard layout without umlauts :) Jan 30 15:03:39 KNUBBIG, also, people will type in Mu and expect Mü to be a match ;) Jan 30 15:03:47 * Mavrik has developed a ride sharing app. Jan 30 15:03:54 * Mavrik still has nightmares handling international rides. Jan 30 15:04:06 create a database for each localization supported with the proper names and select based on localization Jan 30 15:04:40 yeah internationalization is ... uggh Jan 30 15:05:37 I hate the noClassDefException you get after adding a library and need to clean and then rebuild Jan 30 15:06:32 i hate eclipse Jan 30 15:06:49 this is android studio Jan 30 15:07:01 AS doesnt have a clean, but meh gradle. Jan 30 15:07:21 AS has a clean that it tells gradle to clean Jan 30 15:07:32 Build->Clean Project Jan 30 15:07:38 as i said, meh gradle. Jan 30 15:08:00 In an inner class is it ok to call OuterClass.this or should I pass it via the constructor? Jan 30 15:08:53 * jug6-mbl does it Jan 30 15:09:18 if its not a static class idky it would make much of a difference Jan 30 15:09:34 different ways of accessing the same object Jan 30 15:09:37 No, it's a 'normal' class of course Jan 30 15:09:53 it just saves me using anything but the default constructor Jan 30 15:11:06 constructor should be used for something that need to be specific to the class, if its not, then why. Jan 30 15:12:28 (for an inner class at least) Jan 30 15:33:29 hello Jan 30 15:33:45 I finally finished my first Android app. Jan 30 15:34:00 congrats Jan 30 15:34:01 what do I do to export and sign it? Jan 30 15:34:08 in eclips Jan 30 15:34:12 eclipse Jan 30 15:34:22 http://developer.android.com/tools/publishing/app-signing.html Jan 30 15:34:28 I went to export, selected the keystore Jan 30 15:34:59 but, on the next screen it is asking for a key alias, what is this? Jan 30 15:35:19 the name of the key in the key store Jan 30 15:35:55 keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 Jan 30 15:36:04 It is the alias_name part of that command Jan 30 15:36:15 It should show up in a drop-down Jan 30 15:36:21 In the export wizard Jan 30 15:36:47 oh, so it is just a name basically Jan 30 15:36:57 I can chose whatever I want Jan 30 15:36:59 Yes Jan 30 15:37:11 you choose when you create the keystore Jan 30 15:39:24 I selected 100 years validity peirod. lol Jan 30 15:50:12 I there any hacks i can use to open my aplication as root? Jan 30 15:50:56 application itself? No. You can run console binaries with su on rooted devices, but that's all Jan 30 15:51:19 well, maybe by some SElinux/capability trickery that might hard to achieve Jan 30 15:57:01 How do you get a "close button" on the video MediaPlayer? Jan 30 16:00:13 hey, im making an android app atm which i want to run a background service which takes random photos on phone activity, eg, when phone is resumed it takes a photo in the background. So far I have created a background service and I am now trying to add a camera instance, i am starting with check the hardware to see if there is a camera, would this be in the main activity with the service Jan 30 16:00:14 that I am running? Jan 30 16:00:34 ivali, no Jan 30 16:00:46 is there an alternative to using Context where i can parse fragments AND activities ? Jan 30 16:00:47 p_l, selinux trickery can't make an app run as root Jan 30 16:00:57 you can't setuid mid-execution without having root in the first place Jan 30 16:01:41 and zygote is never root Jan 30 16:02:00 well, it starts as root, but apps it spawns are never root Jan 30 16:02:29 pfn: I'd need to check if spawned applications get their own context. If they do, it should be possible (if you have access to SELinux settings) to give that context ability to use setuid call Jan 30 16:03:11 dunno much about selinux, but I imagine they don't get their own context Jan 30 16:03:37 I guess I could try checking on my phone Jan 30 16:03:57 check zygote source to see if it spawns apps in a new context Jan 30 16:04:09 if I call getSharedPreferences, will it be created if it doesn't exist? Jan 30 16:05:11 nvm api says so Jan 30 16:05:22 /export/home/pfnguyen/android/src/dalvik/vm/native/dalvik_system_Zygote.cpp:forkAndSpecializeCommon Jan 30 16:06:10 too lazy to read Jan 30 16:06:12 * pfn wanders off for a bit Jan 30 16:07:27 How can my app ignore a Log.e(...) but after that just continue executing the following commands Jan 30 16:09:01 i got this code, i want it to show if there is a camera present. http://pastebin.com/0B8UJj6D anyone got any idea how i can add a toast or something? Jan 30 16:10:26 Toast.makeText(context, "hi", Toast.LENGTH_LONG).show(); ? Jan 30 16:12:09 KNUBBIG i tried that before, where in the code would i put it in? I put it in under return Jan 30 16:13:50 amazwon: you can't put code behind a return, the method will exit after return; Jan 30 16:13:57 you have to put it before the return Jan 30 16:14:17 well i put it before the return, however nothing happens Jan 30 16:15:24 ah hm i guess the context is wrong Jan 30 16:15:38 tried this instead of context? Jan 30 16:16:38 well when i typd it in, it said import context Jan 30 16:16:44 so i clicked that Jan 30 16:17:38 Toast.makeText(this, "asdf", Toast.LENGTH_LONG).show(); ? Jan 30 16:18:33 still no toast Jan 30 16:18:41 do i need to change the other context to this? Jan 30 16:19:33 uhm? The context for the toast needs to be the Activity in which the toast should be shown Jan 30 16:20:57 this is my whole code, http://pastebin.com/ch7pYPmM , im probs way off? Jan 30 16:22:36 you don't call checkCameraHardware anywhere if I'm not mistaken? Jan 30 16:24:06 im reading this http://developer.android.com/guide/topics/media/camera.html#custom-camera , and it tells me to do this Jan 30 16:25:01 yea but the checkCameraHardware function never gets executed because your code doesn't call it anywhere Jan 30 16:28:00 oh, so i need to call it? didnt say on the tutorial Jan 30 16:28:17 should i put it in a seperate class? then call it ? Jan 30 16:29:18 depends, probably not but idk what you want to do with the app :) Jan 30 16:30:43 How on earth can my application ignore a Log.e call?? Jan 30 16:30:47 how to pass an object from an activity to a fragment?, seems like Bundle is just for primitives Jan 30 16:31:34 nebiros: use a class with static methods/members or extend Application for a 'storage' class Jan 30 16:31:35 Hey guys, I have an SMS Verification activity which when entered correctly, starts the main activity. What's the best way to go about starting mainactivity each time when opening the app? Should I pass a boolean from the SMS verification activity to the main and in on resume check the boolean? Jan 30 16:34:00 KNUBBIG, I was thinking to create a getter/setter in the fragment class and new ChallengeMatchesListFragment().setParseObject(someObject); Jan 30 16:34:08 KNUBBIG what would be a good way to call my method then? Jan 30 16:35:25 nebiros: I asked the same once and was told to use MyApplication myApp = (MyApplication) getApplication(); and use setters and getters there Jan 30 16:35:49 amazwon: just call it in the onCreate() and react appropriately I guess Jan 30 16:37:33 How can i provide my app with special permisions? Like android.permission.NET_TUNNELING Jan 30 16:40:57 OK. I did some digging. I need to sing my app with the platform key. Jan 30 16:46:18 where should I keep track of the login state? Jan 30 16:46:26 in the register activity or what? Jan 30 16:47:05 ahoy p/ Jan 30 16:49:14 how can i parse either an activity or fragment and then in the recieving method do something different for each ? Jan 30 16:49:18 should i use Object ? Jan 30 16:55:04 anyone ? Jan 30 16:55:14 you could check if (obj instanceof Fragment){do fragment stuff here} Jan 30 16:55:23 ok cool Jan 30 16:55:42 but in terms if useing Object frag/acti its perfectly fine ? Jan 30 16:55:56 aloah Jan 30 16:55:59 grrr Jan 30 16:56:55 stuck again.. i have a button in mainactivity. i press it, load a file and want to change image. image wont update unless i do "recreate()" but that makes my display flash :( any idea? Jan 30 16:57:09 how can I figure out what the text height would be when it's rendered but without the dangling parts of g, p, ,, etc? :) Jan 30 16:57:14 positioning text on a canvas is hard... Jan 30 16:57:19 well, tedious at least Jan 30 17:00:34 jaDule: could you post some code? Jan 30 17:01:23 mh... maybe I could try to solve this by drawing the text from bottom to top... Jan 30 17:01:33 Zharf: Paint.getTextBounds Jan 30 17:01:40 is that what you're looking for? Jan 30 17:01:49 alexfu, doesn't help much, my text gets offset because of g, p, comma, etc Jan 30 17:02:04 because they dangle Jan 30 17:02:05 :) Jan 30 17:02:20 Zharf: huh? Jan 30 17:03:59 alexfu: http://codepad.org/9WdTTLRx Jan 30 17:04:21 Zharf: you just want to measure the text height right? Jan 30 17:04:23 alexfu, apparently canvas draws text as if 0,0 is on the bottom left corner in the text and I want to draw it x dp below something, which would mean x + bounds.height(), but it the position varies by about 6 pixels depending on what the text is Jan 30 17:04:42 (line 84 should be updated) Jan 30 17:08:10 jaDule: when does updateUI gets triggered? Jan 30 17:08:25 jaDule: besides in onCreate Jan 30 17:08:58 hello all (^_^) Jan 30 17:09:29 Zharf: have you considered looking @ the source of TextView? Jan 30 17:10:07 onClick() Jan 30 17:10:19 now i am doing recreate() Jan 30 17:10:27 which makes it flash.. Jan 30 17:10:52 jaDule: theres your problem... how does the Activity know when your service is done? Jan 30 17:11:47 who used webview and chromewebview ? chromewebview support getprogress for progress bar but opens links in browser where webview have no getprogress function for progressbar but opens links in itself....can i use webView.setOnTouchListener(this) to detect when user clicks link in webview and display loader / progress indicator? (^_^) ty all Jan 30 17:11:56 mh.. i stopService() before Jan 30 17:12:41 and the service does not change the UI Jan 30 17:12:51 or set chromwebview to not open links in browser Jan 30 17:12:54 it just creates some data which is used in "updateUI" Jan 30 17:13:43 jaDule: the reason your UI isnt updateing, is because you're not updating it Jan 30 17:14:29 well i tried putting "updateUI()" instead of recreate but that did not have any effect Jan 30 17:14:31 alexfu, I solved my case by drawing the bottom text first and then aligning the top one based on the bottom one's height Jan 30 17:14:43 (in updateUI() i change textviews e.g.) Jan 30 17:14:45 jaDule: did you click the button again? Jan 30 17:15:10 if i click it again i would start my service again this i dont want Jan 30 17:16:19 jaDule: your Service needs to notify the activity that it's done. then when your activity receives that message, you update the UI. currently you're launching the service and not doing anythign with the UI. Jan 30 17:17:10 when i launch the service i do not want to change the UI. After i stop the service i want to update the UI Jan 30 17:17:43 jaDule: thats basically what i said.. your service needs to tell your activity when it's finished so it can update... Jan 30 17:18:00 why? Jan 30 17:18:14 i know that the service is done.. i close it Jan 30 17:18:59 then what you are saying, recreate also would not work or? Jan 30 17:19:58 and in addition: after i close the service i launch an AsyncTask to take care of the collected data. Then i wait for the async to finish: Jan 30 17:19:59 (new ProcessSensorDataTask().execute()).get(1000, TimeUnit.MILLISECONDS) Jan 30 17:20:06 and THEN i trigger my update.. Jan 30 17:21:03 jaDule: what does the code for ProcessSensorDataTask look like? Jan 30 17:21:35 just does something in doInBackground() then returns Jan 30 17:21:42 jaDule: nothing else? Jan 30 17:21:46 no Jan 30 17:22:01 jaDule: thats why Jan 30 17:22:07 :< Jan 30 17:22:15 trying something new, can someone just help me get this toast working please? http://pastebin.com/AZfpNfn6 Jan 30 17:22:41 jaDule: you run the task. task runs in background and you call updateUI immediately. your UI isnt going to update because the task hasnt finished yet Jan 30 17:23:04 i thought: (new ProcessSensorDataTask().execute()).get(1000, TimeUnit.MILLISECONDS) Jan 30 17:23:07 this makes it wait Jan 30 17:23:40 (again if i call recreate everything is fine so cant be a timeissue) Jan 30 17:24:37 jaDule: for starters, thats a terrible idea because you cant predict how fast code will run Jan 30 17:25:03 ok Jan 30 17:25:18 so you think it should work like this, given the task finishes? Jan 30 17:25:31 jaDule: you should remove that get method and update your UI in onPostExecute Jan 30 17:25:55 what do i have to provide to the asynctask? Jan 30 17:26:18 or just via getActivity() Jan 30 17:26:49 jaDule: make the task a private inner class Jan 30 17:27:14 isnt that dirty? Jan 30 17:28:01 jaDule: as a POC, i think it's fine. you could also setup a callback Jan 30 17:28:58 trying something new, can someone just help me get this toast working please? http://pastebin.com/AZfpNfn6 Jan 30 17:29:13 just want it to say camera detected ya know Jan 30 17:30:19 amazwon: ? your code isnt doing anything Jan 30 17:30:28 your not calling it anywhere.. Jan 30 17:30:36 i thought i am? Jan 30 17:30:44 void checkCameraHardware() { Jan 30 17:30:53 amazwon: where are you calling checkCameraHardware? Jan 30 17:30:56 ^^^ Jan 30 17:31:05 amazwon: uh.. Jan 30 17:31:13 amazwon: you are defining a method there Jan 30 17:32:10 amazwon Android Activity: http://developer.android.com/reference/android/app/Activity.html Jan 30 17:33:03 burmat: if he/she cant distinguish the difference between method creating and method invocation, they have bigger problems. Jan 30 17:34:10 il have a look, i did have this, http://pastebin.com/3iVpKXrH this is what i want to call and make a toast, just wondering if anyone can give me an indication on calling it and where to put the toast? Jan 30 17:34:21 touché Jan 30 17:34:56 amazwon: depends on your need. but for starters, call it on onCreate Jan 30 17:36:52 It is not going into my onPostExecute() :< Jan 30 17:37:03 and it also cannot be overriden.. odd Jan 30 17:37:10 Has anyone had issues with an app crashing when you do something when not attached to a computer, but when it is (and looking at logs) it will not? Jan 30 17:40:58 Would it fine to let users enter their country code for their mobile numbers or do I really need to implement a spinner? Jan 30 17:44:05 alexfu: now my postexecute is triggered and i call updateUI there.. still no change in my UI Jan 30 17:46:03 jaDule: how are you updating your data? Jan 30 17:47:03 i use objects i created in onCreate Jan 30 17:47:47 TextViews etc. Jan 30 17:47:56 am i correct in saying that: because android doesnt come with a default email app there is no way to query (using content provider) email account settings (smtp etc) for email accounts on the device? Jan 30 17:48:43 jaDule: show me the AsyncTask you've got Jan 30 17:49:15 it just returns null after writing new data to a file Jan 30 17:49:22 (this file is OK i checked the FS) Jan 30 17:49:53 jaDule: so, do you read from that same file when you update UI? Jan 30 17:50:01 yes Jan 30 17:50:10 where? Jan 30 17:50:44 damn.. Jan 30 17:50:53 i think i was just reading the files in oncreate :( Jan 30 17:52:22 android-svg, the drawable is fuzzy when the canvas is scaled Jan 30 17:52:59 the picturedrawable it creates draws a picture with is a recorded path, set to anti-alias Jan 30 17:53:12 this should mean that no matter how scaled it is still a path Jan 30 17:53:26 or, still a vector drawing Jan 30 17:55:24 alexfu: That was the problem. Thank you very much! appreciate it Jan 30 18:03:14 How can I see to what servers an application is trying to connect? Jan 30 18:08:49 Does anyone know how to install development apps wirelessly? Jan 30 18:09:28 Instead of using ADB Jan 30 18:10:13 Wireless adb Jan 30 18:11:06 download from a webserver and install Jan 30 18:11:09 so many options Jan 30 18:11:49 publish beta/alpha to play store Jan 30 18:12:03 hockeykit Jan 30 18:12:15 email the apk to yourself Jan 30 18:13:55 Eric_Loves_You: I LOVE YOU Jan 30 18:14:42 jug6-mbl, Thanks! Jan 30 18:15:07 Does anyone know where I could get a tutorial on how to change pictures inside of apps Jan 30 18:16:47 How can I tell my app to connect to a proxy server? Jan 30 18:16:48 Terminator275, you mean of an app already created? Jan 30 18:16:56 Withouy modifying the source code. Jan 30 18:17:01 Yes Jan 30 18:17:06 Jonc-1 Jan 30 18:17:42 Terminator275, probably not very easy, you'd have to be able to get into the APK, but since it is signed etc, it will be more difficult to get into Jan 30 18:18:22 Cuz I tried decompiling with apktool and editing then recon pilling didn't work wouldn't parse error Jan 30 18:18:34 Recompiling Jan 30 18:19:14 <|0xD34D|> to preserve the signature you should copy the compiled resources and back into the original apk using zip Jan 30 18:19:38 <|0xD34D|> if you are messing with code then you would add the classes.dex back into the original apk Jan 30 18:19:54 <|0xD34D|> if you use the compiled apk that apktool spits out it will not be signed at all Jan 30 18:22:13 So what your saying is copy the res folder or the folder with the pictures instead of just the picture then insert back into the apk Jan 30 18:26:03 <|0xD34D|> Terminator275: use apktool to build your changes then put those back into the original apk Jan 30 18:30:24 Ohh I gotchuu Jan 30 18:33:06 I am using a jpg file for a splashscreen in my app, its 1920*1080, it is working on all devices I have tested nexus 7, nexus 4, S3, S4 but not on the Nexus 5 Jan 30 18:33:56 Zypho, make sure to put the image in the /drawable-nodpi folder Jan 30 18:34:33 if you want to use the same image for all devices Jan 30 18:35:13 is it currently in /drawable or /drawable-xxhdpi? Jan 30 18:35:46 jonc-1: its currently in /drawable Jan 30 18:35:55 ok, I had this issue with some other images Jan 30 18:36:08 jjnye: ILU2 Jan 30 18:36:29 Does someone know why I'm getting the following Gradle error in IntelliJ when trying to use Gradle? I'm getting the same error with Gradle 10, 9 and 8. Jan 30 18:36:30 Gradle version 1.8 is required. Current version is 1.9. If using the gradle wrapper, try editing the distributionUrl in C:\Users\Andre\AppData\Roaming\JetBrains\IntelliJ IDEA 13.0\jre\jre\bin\gradle\wrapper\gradle-wrapper.properties to gradle-1.8-all.zip. Jan 30 18:36:35 the problem is that /drawable is actually the same as /drawable-mdpi Jan 30 18:36:55 so when it loads it on an xxhdpi it actually scales the dimensions by ~4 Jan 30 18:37:04 by ~3* Jan 30 18:37:28 which makes it roughly 8-9 times as many pixels, which can easily be a memory issue Jan 30 18:38:01 a 1.7mb (uncompressed) jpg I was loading was actually being blown up to ~16MB Jan 30 18:38:02 guys, why my ftp trasnfer on local network is so slow ? approx 140 bytes/s ? upload speed in my ftp server is set to unlimited Jan 30 18:38:09 Dreeass: make sure you have the latest build tools from the android SDK manager and make sure you're set up to use them in your build.gradle? Jan 30 18:38:39 putting it in drawable-nodpi makes it so it loads it at the given resolution, nothing more / less Jan 30 18:40:11 jjnye, my build tools are all up to date. What do I need to set-up these are auto-generated files. Jan 30 18:40:31 DOSP: using wifi? Jan 30 18:40:51 yup its from android to ftp server Jan 30 18:41:13 Dreeass: eyeball the build.gradle in your project (not the outer one that's part of the wrapper) and tell me what buildToolsVersion is in there Jan 30 18:41:35 Dreeass: or even better, put the whole thing on pastebin Jan 30 18:41:39 jjnye, 18.1.0 Jan 30 18:42:14 jjnye, http://pastie.org/private/dp38on1wn8vbmqd91xqtg Jan 30 18:42:59 Zypho, did that help? Jan 30 18:43:08 Dreeass: thanks. are you using the gradle wrapper on this project? Jan 30 18:43:11 jonc-1: yes it did, thanks Jan 30 18:43:51 took me several days of playing with it for a few minutes at the end of the day to figure out why loading 4 500x900 images would eat all of my heap Jan 30 18:44:25 and it was only because someone telling me that /drawable is why my image was ballooning Jan 30 18:44:58 jjnye, this actually first wasn't a gradle project. I moved it to Gradle because I couldn't use appcompat for some weird reason. I did so by creating a new Android Gradle project and module inside it. Then I copied everything over (src and res) Jan 30 18:45:44 Dreeass: so it's _probably_ a wrapper project. you can tell because you'll have an outer folder containing a "gradle" folder along with your actual project in a subfolder Jan 30 18:45:56 seriously why my ftp upload of files goes so freakin slow ? :D from android to pc on local trhough wifi Jan 30 18:46:19 jjnye, yes there it's like this MainProject/gradle and MainProject/APPNAME Jan 30 18:46:19 DOSP: how slow is slow? Jan 30 18:48:09 Dreeass: nice. okay, so first we want to tell your project to use the latest and greatest stuff. modify buildToolsVersion to be "19.0.1" and the buildscript classpath from "0.6.+" to "0.8.+" Jan 30 18:48:20 DOSP, is it a bottleneck in the app that causes only a few bytes to go out at a time? Jan 30 18:48:49 jjnye, done. Jan 30 18:49:37 Dreeass: next, in the outer folder, open gradle/wrapper/gradle-wrapper.properties and look for the distributionUrl property. make it point at gradle-1.10-bin.zip Jan 30 18:50:36 jjnye, the gradle folder only contains the folder wrapper which only contains gradle-wrapper.jar Jan 30 18:52:18 it is 140bytes /s .freaking slow Jan 30 18:52:26 Dreeass: okay next to gradle-wrapper.jar, make a file called gradle-wrapper.properties and set its contents to this: http://pastie.org/8683048 Jan 30 18:52:36 ---> Bytes Jan 30 18:53:07 jjnye, done. Jan 30 18:53:08 not even kb, just b :{ can really find out what's wrong, can someone advise, please ? Jan 30 18:53:50 Dreeass: okay, assuming android studio is properly set up to use the gradle wrapper, you should be using gradle 1.10 with android built tools 19.0.1 and android gradle plugin 0.8.0 which is all the latest stuff and should all work together :) Jan 30 18:54:21 Dreeass: o Jan 30 18:54:23 DOSP: what are you using to upload on the device? Jan 30 18:54:37 Dreeass: i'm not sure why the properties file was missing, though, it should've been put there for you Jan 30 18:54:38 some code you wrote? if so, pastebin? Jan 30 18:54:51 jjnye, I'm using IntelliJ Jan 30 18:54:56 Jesusfreke yes i'll post you the code Jan 30 18:55:38 http://pastebin.com/ZCnSgavk Jan 30 18:55:41 Dreeass: i'm actually using intellij here at work too so that should be fine Jan 30 18:55:58 jjnye, how do I delete a gradle module btw? Jan 30 18:56:24 Dreeass: right-click, delete? Jan 30 18:56:26 jjnye, it keeps coming back when I delete it. Jan 30 18:56:38 Dreeass: oh... uhhh... :-| Jan 30 18:56:45 jjnye, with only the iml file inside of it. Jan 30 18:57:04 I have a customRelative layout, but it;s not redrawing correctly when I add/remove views to it. Jan 30 18:57:05 Dreeass: are you deleting it through a file manager or through the IDE? Jan 30 18:57:12 jjnye, IDE Jan 30 18:57:35 Dreeass: wonky. not sure on that, then Jan 30 18:57:44 jjnye, it isn't used anywhere Jan 30 18:58:22 jjnye, I excluded it for the time being then. Jan 30 18:59:01 jjnye, but it still gets picked up by gradle: Unsupported Modules Detected: Compilation is not supported for following modules: APPNAME, untitled. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project. Jan 30 18:59:13 working with eclipse is really frustrating Jan 30 18:59:20 so many crashes Jan 30 18:59:28 or it just freezes up Jan 30 18:59:51 there must be better tooling for all of it Jan 30 19:00:02 increase ram Jan 30 19:00:07 solved all my problems Jan 30 19:00:10 Dreeass: ah, "APPNAME" is the one you're trying to get rid of? Jan 30 19:00:17 Increase ram to eclipse H1FuelCell Jan 30 19:00:26 jjnye, It's the untitled one. I created it for testing. Jan 30 19:00:28 I have 6GB... and just one emulator running Jan 30 19:00:38 Dreeass: i have no idea, i guess try to make sure no other modules depend on it but otherwise i'm not sure Jan 30 19:01:05 jjnye, I'm using the check usages thing but it says it's unused. Jan 30 19:01:31 JesusFreke Please could you take a look at my code why it is running so slow when uploading ? perhaps the setfiletype or something .. please take a look http://pastebin.com/ZCnSgavk thank s Jan 30 19:01:51 jjnye, I'll try to create a new project. Jan 30 19:02:04 Dreeass: good call XD Jan 30 19:04:25 I'm creating a custom view extending relativeLayout, but it's not redrawing correctly when I add or remove a view. ANY IDEAS? Jan 30 19:05:00 H1FuelCell: you have to tell eclipse how much ram it can use. Jan 30 19:05:10 I bumped mine up to 2gb and eclipse runs fine. Jan 30 19:05:19 * H1FuelCell starts googling about *that* Jan 30 19:05:32 H1FuelCell: what kind of os are you running? Jan 30 19:05:36 osx? Jan 30 19:05:38 Ubuntu Jan 30 19:05:55 yeah just google increase eclipse memory ubuntu Jan 30 19:06:35 You have to add a flag like this somewhere: -Xmx2048m Jan 30 19:07:20 yes, found this: http://wiki.eclipse.org/Eclipse.ini Jan 30 19:07:26 now looking for that file Jan 30 19:07:38 /etc/eclipse maybe Jan 30 19:07:50 :/ no Jan 30 19:09:22 I was mistaken, it is there Jan 30 19:10:06 yep, crazy there's a flag saying -Xmx384m over there Jan 30 19:10:14 no wonder it whinnies so much Jan 30 19:12:36 freaking logcat Jan 30 19:12:45 it's default filter is 'verbose' Jan 30 19:12:54 and the emulator usually crashes it immediately Jan 30 19:13:14 logcat crashes? Jan 30 19:13:17 ListView with headers crashes randomly. anyone had the same? Jan 30 19:13:34 girishr, stack trace? Jan 30 19:14:19 jonc-1: http://pastebin.com/G6cjkUyi Jan 30 19:14:31 lots of people on the web reporting the same but i don't see what the problem is Jan 30 19:15:08 yes it does Jan 30 19:15:14 it looks like the adapter wrapper (the headerviewadapter) thinks my list has more items Jan 30 19:15:30 i have tried attaching android sources. for some reason it doesn't break at the crash Jan 30 19:16:10 which is strange because it does break for other crashes in android code Jan 30 19:17:38 yep I closed logcat and eclipse no longer dies; I think I'll run it separately from the shell when I need it Jan 30 19:20:51 H1FuelCell: glad you could find it. Jan 30 19:20:56 ah, the crash is somehow related to setListShown() Jan 30 19:21:08 =] Jan 30 19:23:42 where are my manners... thanks eghdk Jan 30 19:24:37 DOSP: not enough info in the pastebin. e.g. where's the implementation of .storeFile()? Jan 30 19:24:40 with the honeycomb drag apis, is there a way to cancel a drag operation in progress? Jan 30 19:25:54 DOSP: one thing that you might try is wrapping the FileInputStream in a BufferedInputStream Jan 30 19:26:40 JesusFreke well the storefile is get from commons library from Apache Jan 30 19:26:55 but i heard the commons is pretty slow library, i try to use anotherone Jan 30 19:27:53 DOSP: try the BufferedInputStream first. That will almost certainly increase the speed, but I don't know how much Jan 30 19:28:01 okay i try Jan 30 19:28:01 wow https://github.com/BoltsFramework/Bolts-Android Jan 30 19:28:24 so many open source libs these days, good time to be an android dev ^^ Jan 30 19:29:10 i am showing a listview that shows the file system. this is a listfragment. what's the best way to handle back navigation. should i reload the list with new contents or create a new fragment when user enters a directory? Jan 30 19:31:06 haha Bolts looks so much like JavaScript Jan 30 19:31:19 the JS infection apocalypse :P Jan 30 19:32:24 JesusFreke okay, it certainly increased the speed but still 14kbps is really slow Jan 30 19:32:28 well - with sundar pichai coming from the chrome side [eg: cordova] I would be rather surprised if there isn't some effort to merge those things Jan 30 19:35:32 hmm Jan 30 19:35:52 aloah Jan 30 19:36:26 H1FuelCell: :-) ie, get ready for JS to become an inceasingly 'native' citizen on android Jan 30 19:36:41 * H1FuelCell rubs hands excitedly Jan 30 19:37:20 JS is terrible Jan 30 19:37:34 yes but there are good parts to it Jan 30 19:38:01 and I'm only a few days into Java and it's really crazy how much you need to write to do simple things Jan 30 19:38:09 it was great for its time Jan 30 19:38:31 I'm originally from Web-alia, so expect heretical speech Jan 30 19:38:56 the async chaining stuff looks pretty cool Jan 30 19:38:57 anyone has a tip how i can overshadow an Activity with an imagine? Lets say a linear layout Jan 30 19:39:00 ive always struggled with chaining asynctasks Jan 30 19:39:04 javascript promotes so many bad coding practices that it just makes things really terrible to look at most of the time Jan 30 19:39:29 How could it be that LogCat would not display a helpful "caused by" message even when my application died with a NullPointerException? Jan 30 19:39:39 okay, yes JavaScript is Satan himself, you win Jan 30 19:39:47 trindaz: thats what i asked myself today :> Jan 30 19:40:03 plain oddness Jan 30 19:40:08 I've done things like - make sure LogCat will display up to 5000 messages, turned off filtering, ran `adb logcat` from terminal to bypass any possible eclipse problems + a few other checks Jan 30 19:40:11 none to any avail Jan 30 19:40:14 just discovered the wtf() method in LogCat.. haha Jan 30 19:40:17 jaDule - what did you find? Jan 30 19:40:34 I've had this problem about 5 times in the last week - I usually end up finding the problem anyway and moving on, but this is really slowing me down Jan 30 19:40:44 that logcat sucks Jan 30 19:40:55 ^^ Jan 30 19:41:09 System.out.println("A") ("B") Jan 30 19:41:24 ("Z") Jan 30 19:41:56 is that what you resorted to? Jan 30 19:41:57 crazy Jan 30 19:42:15 is this a common problem that you know others have had? and that no solution or real understanding of why it's happening exists? Jan 30 19:42:36 * pfn never has those common problems Jan 30 19:42:39 mycustom relative layout bugs out whenever onSizeChanged gets called. any ideas? Jan 30 19:42:40 except in closed source crap Jan 30 19:43:29 so how you get the information what called the nullpointer Jan 30 19:44:35 currently my process is to put breakpoints around the place where i think the error probably happened Jan 30 19:44:54 and I get there pretty quickly. but it's way slower than just seeing the exact line and realizing what happened right away, which is a much nicer workflow Jan 30 19:46:57 anyone has an idea on the image overshadowing UI (besides one button on the bottom) Jan 30 19:54:07 i'm using repo the first time and i want to sync one of the android projects, let's say platform/tools/swt then i have to run repo sync platform/tools/swt Jan 30 19:54:09 right? Jan 30 19:54:54 Anyone got a tip as to why my thumbnail is super shitty? http://imgur.com/rrid34D,Sx7FMM4#1 (click First Image to see original) // Bitmap scaled = Bitmap.createScaledBitmap(bmp, width, height, true); thumb format: PNG original format JPG 95% Jan 30 19:56:50 explodes: you could try scaling it using BitmapFactory Jan 30 19:58:02 BitmapFactory doesn't have a scaled thing Jan 30 19:58:09 er, a scaling method Jan 30 19:58:17 text does not handle being scaled well Jan 30 19:58:27 never has Jan 30 19:58:56 text in an image* Jan 30 19:58:56 explodes: sure it does.. you just have to use the correct method that accepts BitmapFactory.Options Jan 30 19:59:10 and specify inSampleSize Jan 30 19:59:14 hey jaDule i might have fixed it Jan 30 19:59:24 I already know the input size… i uh Jan 30 19:59:38 let me do some research Jan 30 19:59:39 trindaz: shoot Jan 30 19:59:50 inSample size just divides it by 1/(2^inSampleSize) correct? Jan 30 19:59:52 explodes: inSampleSize tells it how to scale Jan 30 20:00:04 multiples* Jan 30 20:00:15 I had a faulty assumption - Debug was just suspending when it first detected the error - hit play a few more times until the app actually crashes on the phone/VM (I'm using a physical phone) then you get the logcat message to explain the exception (NullPointerException in my case) Jan 30 20:00:46 explodes: plus, it's the preferred way to scale images because you dont end up with two bitmaps unlike with Bitmap.createScaleBitmap Jan 30 20:00:51 I am confused, I have a bitmap (already decoded) and need to scale it… Jan 30 20:01:04 I am scaling an image I already have Jan 30 20:01:10 explodes: yes. i know Jan 30 20:01:11 scaling an image with text will a lot of times make the text look funy Jan 30 20:01:13 funny* Jan 30 20:01:19 *already have in memory Jan 30 20:01:54 So to use BitmapFactory.decodeStream I'd need to turn my 1st bitmap into a stream and decode it with the correct options Jan 30 20:02:25 explodes: you can use decodeResources as well Jan 30 20:02:31 if its a resource Jan 30 20:02:39 :I Jan 30 20:02:46 It is a bitmap in memory Jan 30 20:02:58 explodes: where are you getting it in the first place Jan 30 20:03:11 explodes: it has to come from somewhere Jan 30 20:03:14 It is rendered Jan 30 20:03:22 from photo editing software Jan 30 20:03:33 explodes: ok.. so from another app? Jan 30 20:03:38 no. Jan 30 20:03:40 explodes: or disk? Jan 30 20:03:41 nevermind Jan 30 20:04:18 explodes: bitmaps dont just appear into memory. you consume it from disk, network, or resources Jan 30 20:04:40 I have a ToggleButton and I would like to have the drawableLeft change when its checked.. so I created a selecto with selected,checked and active set to "true" but it never updates Jan 30 20:04:50 either that, or you create them on the fly Jan 30 20:04:50 alexfu: it is rendered in the application Jan 30 20:05:07 explodes: ok, so you app generates the bitmap itself? Jan 30 20:05:12 :I Jan 30 20:05:19 yes Jan 30 20:05:27 why are you rendering it at the wrong size Jan 30 20:05:27 explodes: then why not render it at the size you need instead of scaling? Jan 30 20:05:36 Well I could render it twice Jan 30 20:05:44 1 for the original image, and 1 for the thumbnail Jan 30 20:06:05 The process I am generating the image for is when I go to save the image, I save the original and a thumb Jan 30 20:06:19 So, as a "shortcut" I generate the thumb by scaling down the original Jan 30 20:08:59 explodes: i should scale it but not by much and do a center crop on the thumbnail Jan 30 20:09:02 *i would Jan 30 20:09:26 explodes: unless you REALLY want the thumbnail to show the whole content Jan 30 20:09:49 explodes: either that or make the thumbnail larger Jan 30 20:18:08 Hey guys, what kind of File type should i use when sending photos over ftp with Apache commons library ? Jan 30 20:18:20 so i get best performance out of the uploading Jan 30 20:19:37 jpg would be the smallest image sizes while maintaining decent quality Jan 30 20:19:43 as long as they don't require tranparency Jan 30 20:19:49 transparency* Jan 30 20:20:28 How to I create an intent for an activity? Jan 30 20:20:57 http://developer.android.com/training/basics/firstapp/starting-activity.html Jan 30 20:21:06 first hit from google when I copy and paste your exact question Jan 30 20:22:04 I saw that already Jan 30 20:22:13 It doesn't explain it well Jan 30 20:22:27 PeterBoy: what are you confused about Jan 30 20:23:03 I want to start ActivityTwo from ActivityOne Jan 30 20:23:21 I can't do Intent activityTwo = new Intent(this, ActivityTwo.class); Jan 30 20:23:21 1/4 down the page: Intent intent = new Intent(this, DisplayMessageActivity.class) Jan 30 20:23:35 PeterBoy: why not Jan 30 20:24:19 and there is even an entire section labeled "Start the Second Activity", which has the lines to create an intent (then add stuff to the extras which you can ignore) and then how to start the intent Jan 30 20:24:31 start the activity using the intent* Jan 30 20:25:26 It says "Cannot resolve constructor Intent(android.view.View.OnClickListener, java.lang.class) Jan 30 20:25:45 because you can't pass an on click listener to an intent Jan 30 20:25:46 new Intent(ActivityOne.this, ActivityTwo.class); Jan 30 20:25:47 PeterBoy: well there you go. you're using "this" in the wrong context Jan 30 20:26:02 <|0xD34D|> PeterBoy: the first param needs to be a Context Jan 30 20:26:13 you "this" that you are passing to new Intent() is the onclicklistener Jan 30 20:26:43 do "ActivityOne.this" (if the onclick listener is made inside of ActivityOne) Jan 30 20:27:08 PeterBoy: "Cannot resolve constructor Intent(android.view.View.OnClickListener, ..." this usually means that you passing the parameters of the wrong type to a function Jan 30 20:27:16 take that as a hint that you should check the types of your parameters Jan 30 20:27:56 and compare that to the method signature Jan 30 20:30:12 I'm trying to use the play services for getting the users current location, but its always returning null for the last location Jan 30 20:33:28 Intent (String action, Uri uri) Jan 30 20:33:38 Can't find an example for that Jan 30 20:33:43 Intent(Context, class) Jan 30 20:33:48 oh Jan 30 20:33:56 we've already told you exactly what to do Jan 30 20:34:04 Didn't know which one to use Jan 30 20:34:12 ok Jan 30 20:35:38 what do I put for Context? Jan 30 20:36:11 a context Jan 30 20:36:19 which an Activity is also a context Jan 30 20:36:29 so an instance of your current Activity Jan 30 20:37:07 so "this" Jan 30 20:37:35 not if you are inside an inner class Jan 30 20:37:52 if you are doing this in an OnClickListener, this is the instance of the OnClickListener Jan 30 20:39:26 I don't get this.... Jan 30 20:40:08 launchActivityTwoButton.setOnClickListener Jan 30 20:40:12 If you are inside another class and you use "this" you get the instance of the class that you are in Jan 30 20:41:31 IF you have declared a class inside another ie: ClassA, and you declare ClassB inside of ClassA, then you CAN inside of ClassB do ClassA.this to get the instance of ClassA (there are some more rules to this but you need not worry right now) Jan 30 20:44:10 I love the blah.new BlahInnerClass() Jan 30 20:44:12 syntax Jan 30 20:44:46 Inner classes are evil Jan 30 20:44:49 eeeeevil Jan 30 20:45:00 JesusFreke: don't give people ideas Jan 30 20:45:25 well the code in the homework is like that :) Jan 30 20:45:56 evanc: did you know you can have functions named $ Jan 30 20:46:04 I avoid doing them inline, but I will create private class OnClickListener at the bottom of my file Jan 30 20:46:05 * JesusFreke ducks Jan 30 20:46:33 like at the bottom of a fragment, I'll add classes for listeners Jan 30 20:46:39 (https://bitbucket.org/adamldavis/dollar/wiki/Home) Jan 30 20:46:50 still can use FragmentBlah.this inside of them, and keeps code cleaner Jan 30 20:52:07 Greetings Jan 30 20:52:50 i have written some code to keep track of download progress, but im not sure how efficient it is. it seems to slow the actual download down quite a bit. Jan 30 20:53:08 well not that much its hardly noticable Jan 30 20:53:55 here is code: http://pastebin.com/TyyCwWAS its only 20 lines, is there anything i can improve ? Jan 30 20:55:00 I'd want to see your publishProgress( per ); Jan 30 20:55:23 I'd also read in more than 1 byte at a time Jan 30 20:55:24 its one line Jan 30 20:55:24 progressBar.setProgress(i[0]); Jan 30 20:55:52 read a block of like 1024 bytes at a time Jan 30 20:56:05 jonc-1, how do i that? Jan 30 20:56:12 http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html Jan 30 20:56:18 :p Jan 30 20:56:24 ok thanks Jan 30 20:56:39 you give it a buffer, an offset, and a length Jan 30 20:57:17 but for you, the offset would be zero probably Jan 30 20:58:45 it returns how many characters were read (in case it is smaller than your buffer size) Jan 30 21:02:23 If I create an EditTextPreference dynamically (trying to create a ListPreference that will launch another dialog if one of the list items is selected), what is the best way to actually show it? Jan 30 21:02:54 Zylinx, http://pastebin.com/zLmMaj74 I believe this would work (might be a little off just did it in pastebin) Jan 30 21:03:06 is this the proper channel to be asking for help with writing apps? Jan 30 21:03:25 GadonJ, yes Jan 30 21:03:42 perfect, thanks Jan 30 21:03:58 awesome! thanks jonv-1 Jan 30 21:04:03 I think I went into the wrong channel before and someone ragged on me for asking for help lol Jan 30 21:05:59 Guys how do i instantiate NotificationCompat ? This is really wierd question but what do i do like, private NotificationCompat ? or how ? Jan 30 21:06:00 If you see DialogPreference, it has a showDialog method. But it is protected, and EditTextPreference doesn't seem to have anything to show it programatically. Jan 30 21:06:36 Can I make a scrollview only scroll when the sides of it (let's say 50px on each side) are swiped and not scroll when the middle area is touched? Jan 30 21:07:25 GadonJ, yes, and I would say the simplest way Jan 30 21:07:34 would be to put the scrollview inside of a relativelayout Jan 30 21:08:30 and then overlay an empty view centered in the relative layout horizontally, fill parent, clickable, and with 50px margins on left and right Jan 30 21:10:04 oh so it like blocks the scrolling in the center area? Jan 30 21:10:13 yup Jan 30 21:10:28 would it block clicks to the center? Jan 30 21:10:33 although if you needed something inside the scrollview to be clickable this solution may be an issue Jan 30 21:10:42 yeaaahhh I do lol Jan 30 21:11:58 you may have to extend scrollview and in the onTouchEvent check to make sure that the MotionEvent coords are where you want them to be Jan 30 21:12:23 DOSP I don't know what that class is, but from a quick google it looks like you'd write: NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this); Jan 30 21:12:28 onInterceptTouchEvent possibly Jan 30 21:12:37 Zylinx, did that help? Jan 30 21:12:59 oh ok that makes sense, just manually only allow scrolling when touching from certain areas Jan 30 21:13:04 yeah Jan 30 21:13:12 more work than I wanted to do, but it sounds like it should work fine Jan 30 21:13:14 thanks Jan 30 21:14:20 SimonVT: helped me with this once, ideas? Jan 30 21:14:22 http://stackoverflow.com/questions/21466834/custom-relativelayout-doesnt-resize-redraw-properly-after-onsizechanged Jan 30 21:16:39 jonc-1 what if the view in the center needs to be able to receive swipes for other purposes? if I nullify the swipes in the scrollview that are in the center then they wont make it through, right? Jan 30 21:17:04 I believe so Jan 30 21:18:36 I phrased that question terribly lol. Will the middle area be able to receive swipes? Jan 30 21:20:18 as long as you return false I believe it will propogate the touch events to children Jan 30 21:21:38 Is there a way to track drag events on a view when the drag leaves the bounds of the view? Jan 30 21:23:16 someone can tell me where i can drop a suggestion for a feature? Jan 30 21:23:40 for a specific app or for android itself? Jan 30 21:24:12 for android itself Jan 30 21:26:58 I would look for the google group for android kernel / os dev Jan 30 21:27:07 so im building some new ndk stuff in asm with a c wrapper. inside the c wrapper i use strcpy() this is giving me an illegal opcode crash but strcat() is not Jan 30 21:27:38 so im building some new ndk stuff in asm with a c wrapper. inside the c wrapper i use strcpy() this is giving me an illegal opcode crash but strcat() is not Jan 30 21:27:55 Does anyone make their own Activity for preferences rather than using PreferenceActivity? Jan 30 21:28:05 wtf i didnt do that lol. i typed out a second sentence not repeated the first! Jan 30 21:28:09 conspiracy! Jan 30 21:28:28 haha Jan 30 21:29:04 when building NDK code for a specific arm architecture does the linker ever link it versions of library functions that are WRONG from the selected arch? Jan 30 21:29:12 because i think thats whats happening to me Jan 30 21:29:37 something like a context oriented keyboard for autoselecting the input lenguage. I have some examples. Jan 30 21:29:38 honestly couldn't tell you, haven't done any NDK work (haven't had the need) Jan 30 21:30:01 although we may here shortly Jan 30 21:30:11 need to do realtime analysis of biometric data Jan 30 21:30:16 i replaced my strcpy() with while(*s1 = *s2); Jan 30 21:30:23 and doing it in C would be more efficient and save more battery Jan 30 21:30:49 theblang: I did on one of my apps Jan 30 21:30:58 the flexibility to do whatever you want is nice Jan 30 21:31:00 my use of NDK is not for efficiency exactly Jan 30 21:31:13 But you don't get anything for free Jan 30 21:31:15 its so i dont have to have 50000 map data/AI loaded 100% of the time Jan 30 21:31:36 i want to be able to load the AI code for each map on demand and unload it on change of map Jan 30 21:31:43 cant do tht if the AI is coded in java Jan 30 21:31:45 Joker_Da_man yeah i know, I've been so hesitant to do it. but jeez, I feel like the Preference API is so limiting. Jan 30 21:31:49 why not? Jan 30 21:31:52 CAN if its coded in forth :) Jan 30 21:32:06 jonc was the why not at me? Jan 30 21:32:23 Yeah and overriding PreferenceActivity gets to be a big hassle when you just want to change something small Jan 30 21:32:37 the class definitions will be loaded, but you don't have to have active objects Jan 30 21:32:58 Joker_Da_Man How did rolling your own go? All I really have to handle is making sure I persist the settings and set defaults right? Jan 30 21:33:01 tell me how to dynamically load the specific java code associated with each specific map on demand Jan 30 21:33:19 there will be megabytes of code. not data, CODE Jan 30 21:34:07 Are you coding the AI for each one by hand or creating a template and just duplicating it a bunch? Jan 30 21:34:09 by building in a scripting engine i can load and unload the code for each map on demand Jan 30 21:34:12 http://pastebin.com/dJaSMRbq This layout is showing up all scrunched up into a single column. Anyone got any idea why? Jan 30 21:34:29 Yeah you will end up doing a decent amount of retreiving and saving preferences. I used tabs to organize all the settings and basically just built whatever UI I felt was appropriate in each tab. Jan 30 21:34:30 a little of both - there are similarities between what each map needs Jan 30 21:34:57 but for exampel, there will be THOUSANDS of NPC's and each one will need its own AI Jan 30 21:35:32 i have the solution already, it will work :) Jan 30 21:35:35 http://stackoverflow.com/questions/3022454/how-to-load-a-java-class-dynamically-on-android-dalvik Jan 30 21:35:38 when its debugged :) Jan 30 21:36:31 ! Jan 30 21:36:44 ok that i didnt know. but is still prefer my solution, Jan 30 21:36:51 FORTH!! lol Jan 30 21:36:57 haha Jan 30 21:36:59 Barring use of Robolectric and/or Mockito for testing, what are some other ways of test-driving application behavior based on network communication? Jan 30 21:37:15 I knew java supported dynamically loading classes, just wasn't sure about the capabilities on android Jan 30 21:37:27 you may even be able to send a patch by downloading a new jar Jan 30 21:37:41 except. this example would still be impractical for me, theres almost NO other language in existance that is as space efficient as forth Jan 30 21:37:42 but they may not like that Jan 30 21:37:58 jonc-1, That sounds like a bad idea (TM) Jan 30 21:38:05 Auv, I agree :P Jan 30 21:38:13 but doesn't mean you couldn't Jan 30 21:38:38 auv bad idea? lets implement it!... SHIP IT!! Jan 30 21:38:52 and charge for the fix! Jan 30 21:38:56 I hate layouts >.> Jan 30 21:39:14 only layout i trust is relative Jan 30 21:39:39 I use whatever fits for the job. Jan 30 21:39:53 Same Jan 30 21:40:03 ive not seen any interface that woud not be easier with relative Jan 30 21:40:08 I try to stick to linearlayout's if I can, but use quite a few relatives also Jan 30 21:40:11 but im a noob :) Jan 30 21:42:01 got bored at work today so I added graphs to visualize the biometric data Jan 30 21:42:16 what bio data? Jan 30 21:42:25 who do u work for Jan 30 21:42:26 ? Jan 30 21:42:35 and can i haz a job? Jan 30 21:42:37 and it just so happened that we had people coming in today and my bosses really wanted to show it off Jan 30 21:43:16 We are working with a $2k biometric watch that gets blood volume pressure, heart rate, skin temp, skin conductivity and has a gyroscope in it Jan 30 21:43:29 hooked it up through bluetooth and I need to store / send the data to a server Jan 30 21:43:43 and do realtime analysis of it to see what "state" someone is in Jan 30 21:43:57 aava technology in texas is working on something similar Jan 30 21:44:27 our app isn't planned commerically yet, it is meant for treating of certain mental illness Jan 30 21:44:46 ya theirs is no where near as powerful as yours Jan 30 21:45:02 its basically a pedometer with some of the above bio Jan 30 21:45:21 http://pastebin.com/dJaSMRbq http://imgur.com/N7didsl (in layout preview in Android Studio) vs http://imgur.com/kApw3uB (actually on the emulator with layout bounds turned on) Jan 30 21:45:28 the angel sensor supposedly comes out in April, and it does what the current sensor does, but for $100 Jan 30 21:45:35 so we will probably change to that if possible Jan 30 21:46:03 anyway, back to debugging Jan 30 21:46:05 bbl Jan 30 21:46:31 Auv: haha wtf? you sure that's the same code? Jan 30 21:47:52 bankai_, Yup. Unfortunately. Jan 30 21:49:02 angel sensor! so finally we will know, scientifically and accurately, just exactly how many angels can dance on the head of a pin! Jan 30 21:49:42 Auv: but the text is different on the action bar there Jan 30 21:50:25 and that P and N isn't on both Jan 30 21:50:37 bankai_, It's put dynamically into a LinearLayout. Jan 30 21:51:13 comment that all out and make sure it is being loaded correctly first Jan 30 21:52:10 also, if you are addin that layout to another layout(layoutB), if layoutB has a weightSum also then you can run into issues if I remember right, nested weightedSums are bad Jan 30 21:52:52 jonc-1, The dynamic loading code works. It loads other layouts fine. Jan 30 21:53:35 maybe this is a stupid question: what is the purpose of an index in SQL Jan 30 21:53:43 If I have a ViewPager inside of a Fragment, and that Fragment is an element inside of another ViewPager, how can I update the Fragment element for the outermost ViewPager, when the innermost ViewPager changes Jan 30 21:54:03 i'm using activeandroid, and I can optionally set index = true, but i'm not sure what that can be useful for Jan 30 21:55:03 hephaestus_rg: sounds like a guaranteed way to id any row in a table, just in case each rows may have similar content Jan 30 21:55:44 what do you mean? yiati? Jan 30 21:56:44 hephaestus_rg: If you have two rows in a table with the exact same content, but you want to treat them as different rows how can you id each row based off the contents? You can't without an index for each row Jan 30 21:57:11 don't most DBs automatically add an ID column Jan 30 21:57:36 g00s: C# under Android? Who does that? Jan 30 21:58:48 capella huh, what ? Jan 30 21:58:50 hephaestus_rg, an index in an SQL table allows for a fast lookup of that row Jan 30 21:59:19 hephaestus_rg: it speeds up sql queries that can make use of it Jan 30 21:59:20 Hehe - got an email from a recriuter with a client doing embeded Android systems ... they want a C# programmer Jan 30 21:59:22 is there some hypothetical example that could explain this? Jan 30 21:59:31 yes, consider a simple list of n items Jan 30 21:59:35 different SQL db's implement how they do indices differently (or let you choose), but one way is to keep a binary sorted array of the index to the table row Jan 30 21:59:36 capella oh maybe using Zamarin Jan 30 21:59:40 *Xamarin Jan 30 21:59:41 it will take on average n/2 operations to find an item Jan 30 21:59:49 with an index that drops to log n Jan 30 21:59:57 ohhhh i see so it's sorted is that what makes it faster Jan 30 22:00:03 so if you need to look up based on an indexed column, it doesn't need to look at each row, it goes to the index and finds the correct row Jan 30 22:00:04 for n in the hundreds of thousands or millions, that's a huge difference in speed Jan 30 22:00:15 Ah.... Mono ! Jan 30 22:00:39 hephaestus_rg this is a good tutorial on indexes http://use-the-index-luke.com/ Jan 30 22:00:46 thanks Jan 30 22:00:53 having too many indicies though is bad (indexing each column) if you intend on doing lots of insertions Jan 30 22:00:55 hephaestus_rg: it uses a separate data structure to find the rows, which can be significantly faster than the naive linear search Jan 30 22:01:15 "Native" C# under Android ... who'd a thunk Jan 30 22:01:21 you can't index everything, you can still write inefficient queries with indexes, and sometimes indexes slow things down, so gotta know :) Jan 30 22:01:26 i thiknk i get it now, my algorithms class is coming back to me Jan 30 22:01:34 g00s++ Jan 30 22:02:07 for example the clueless web devs that made the new site at work keep having to spend more and more money on our hosting...because they have no idea how to fix their slow queries...just throw hardware at it! Jan 30 22:02:13 so let's say i'm storing news articles in a DB, what kinds of things would i want to index? would indexing the title field make LIKE queries against the title faster? Jan 30 22:02:45 hephaestus_rg, that depends Jan 30 22:02:58 hephaestus_rg: possibly, in mysql you can do an explain... to get more insight into use of indices Jan 30 22:03:01 what would it depend on? Jan 30 22:03:11 if it was Like "%" and it was a binary index, then it would help Jan 30 22:03:16 (in this context it's an android app with sqlite i assume) Jan 30 22:03:29 but if it is LIKE "%%"; then it can't help really Jan 30 22:03:39 oh i see jonc-1 Jan 30 22:03:50 so probably it won't help Jan 30 22:04:01 it can use the Beginning part to narrow down the wildcard part Jan 30 22:04:13 but it can't narrow down if there is a wildcard in the beginning Jan 30 22:04:35 so then it would make sense to index for example the published date Jan 30 22:05:21 if i want to query a range of articles it should make the query faster than without an index right Jan 30 22:05:29 jonc-1, There are nested weights in it. Jan 30 22:05:43 But I need to have each section be one-third of the space. Jan 30 22:06:22 generic question cuz idk: picturedrawable draws nothing pls halp Jan 30 22:06:39 stack trace or gtfo? Jan 30 22:06:53 no stack trace halp Jan 30 22:07:02 just kidding, what are you trying to draw Jan 30 22:07:07 and how do you know it's not working Jan 30 22:07:20 PictureDrawable created by svg-android Jan 30 22:07:37 did it ever work? Jan 30 22:07:41 hephaestus_rg: proper db design is nontrivial Jan 30 22:07:44 I can draw the SVG's picture into a separate bitmap and draw the bitmap, but i mean, seriously Jan 30 22:07:54 hephaestus_rg: only with the above workaround Jan 30 22:07:55 sometimes you have to denormalize, like copying the same data in multiple tables Jan 30 22:08:34 it's worth your time to load up some sample data and challenge yourself to write queries to do various things, examine their performance, examine alternative approaches Jan 30 22:08:56 you can get dramatic improvements in performance with the right schema, indices, and queries Jan 30 22:10:20 this is one of the few times where just changing those things will allow you to change the asymptotic performance ("big O") of your queries Jan 30 22:10:34 where are good documentation for android Jan 30 22:11:45 Is there a way to load only part of a bitmap from a remote server? All the examples I see for loading only part of a bitmap are from a local file Jan 30 22:12:12 yiati no siree Jan 30 22:12:22 unless the server serves up only part of the file Jan 30 22:13:05 w/ or w/o software rendering, picturedrawable is bork Jan 30 22:13:06 :P Jan 30 22:13:10 :P Jan 30 22:14:23 im trying to find documentatino for android besides developer.android.com Jan 30 22:14:34 looks like Parse released some free low/level libraries that work with Android and ios. here are the Android ones https://github.com/BoltsFramework/Bolts-Android Jan 30 22:15:07 the example looks kinda like the space RxJava would fit Jan 30 22:15:20 also looks similar to Spring Reactor Jan 30 22:15:35 When I try to add this dependency to my gradle file, Android studio gets stuck on compiling dependencies. any idea why? https://github.com/BoD/android-switch-backport Jan 30 22:15:38 Where can I see the stock icons included in android? Jan 30 22:16:20 thanks myke: i think what i'll do is start with no indexing, and then add indexing to fields associated with slow queries Jan 30 22:20:26 hephaestus_rg: that's a good approach, not sure how to do it in sqlite but in mysql you can specify a log just for slow queries (and the cutoff time for what's considered slow in the config file) Jan 30 22:20:53 i'll eyeball it ;) myke Jan 30 22:21:09 you can also create indexes on more than one column, if that makes sense for what you're doing Jan 30 22:22:01 i would advise that nearly every table has as its first field a unique integer key that's the primary index...you'll end up needing it more often than not Jan 30 22:22:27 integer indexes are always going to be faster than string indexes Jan 30 22:23:22 keep in mind that database and query design is its own discipline just like programming, not quite as expansive and varied, but still a nontrivial discipline Jan 30 22:24:38 and sql can do a HUGE amount of work, much more than most people realize, it's usually relegated to just simple CRUD (create/retrieve/update/delete) but in fact you can do most of your coding in sql rather than java Jan 30 22:26:07 also, every database got its idiosyncracies Jan 30 22:26:48 hephaestus_rg: the most basic thing to remember is that SQL operates on *sets* of data Jan 30 22:27:03 and that a query returns a set, not a list, and takes sets as input Jan 30 22:28:08 cool, new genymotion. seems like most of the features are for paying customers. 4.4 image seems final Jan 30 22:29:37 I have a scroll view, I want it to scroll to the bottom whenever I append text to the textview view inside of it. It'll scroll if I put in onClick but no matter what (already rolling it a runnable) it'll not scroll otherwise... anyone know if I am missing an xml attribute or something? Jan 30 22:37:29 I have a ViewPager with Fragments that have ImageViews inside of them. With each of the images there are sub images defined by coordinates I have that I want to "cut out" and treat as independent pages. Would the best approach to this be to put a ViewPager inside of Fragment of the outermost ViewPager Jan 30 22:41:16 INTRIGUING Jan 30 22:41:30 canvas.drawPicture(picture); // appears to draw nothing Jan 30 22:41:40 picture.draw(canvas); // SIGSEGV BRO Jan 30 22:42:33 what are you trying to do? Jan 30 22:43:00 now i'm just trying to draw an svg as created by svg-android Jan 30 22:43:31 using pictures, instead of rasterizations Jan 30 22:44:51 ok canvas.drawPicture(picture) works when hardware accel is disabled Jan 30 22:45:37 and picture.draw(canvas) works also Jan 30 23:04:43 how do I have a fragment reload it self when the orientation changes? Jan 30 23:12:09 it should automatically if you don't setRetainInstance Jan 30 23:32:11 There's an onAttach method in fragments...but is there something similar in the activity that is called when a fragment gets attached? onFragmentAttached or somethign? Jan 30 23:36:44 not that I know of, could be wrong... what do you need it for though? Jan 30 23:39:19 apparently there is Jan 30 23:39:53 http://developer.android.com/reference/android/app/Activity.html#onAttachFragment(android.app.Fragment) Jan 30 23:49:28 all I've got is a PC. How long will it take until I have my first hello world program, if I start like, right now? :3 Jan 30 23:55:47 in sqlite there is LIKE and = Jan 30 23:55:52 is there a != Jan 30 23:56:54 <|0xD34D|> != or <> Jan 31 00:00:02 in sql you can do NOT ( ... ) Jan 31 00:04:09 Is there an irc channel for those who build/modify the kernel, as opposed to app development? Jan 31 00:07:03 yes I think Jan 31 00:07:04 #android-root or #cyanogenmod or something probably Jan 31 00:09:36 hello world takes like 5 minutes to do.. Jan 31 00:18:10 any opinions on Facebook/parse's new lib Bolts Jan 31 00:18:28 i saw it this morning, but haven't tried it out. looks similar to RxJava Jan 31 00:19:09 yeah, looks a lot simpler then RxJava, only 4 source files :| Jan 31 00:25:55 im using a multi choice listview. if i use an anonymous ArrayAdapter as the adapterfor the listview, can i programatically check all the rows? Jan 31 00:28:25 e.g: new ArrayAdapter(getActivity(), Jan 31 00:28:26 android.R.layout.simple_list_item_multiple_choice, contactNames) Jan 31 00:31:51 ahh forgot setItemChecked() Jan 31 00:36:21 personal opinion vis-a-vis bolt - I believe a simpler/better framework would decouple the spawn-a-background-task from what-happens-after. Right now (as far as I can see) the code creating the background task is also creating the what-happens-after Jan 31 00:37:18 what do you mean by "what-happens-after" Jan 31 00:37:33 do you mean what happens after the thread is done, or what happens when the thread is running? Jan 31 00:37:47 what happens in the thread* Jan 31 00:37:51 after the thread is done. Jan 31 00:38:30 typically, some set of people are interested in the results of some async task [usually, though not always] the creator of the task. It's the though-not-always that ends up being tricky to manage with such frameworks Jan 31 00:38:45 the way I design most things (if I can) is that I do not wait for the thread to finish to continue Jan 31 00:39:20 I don't use AsyncTask Jan 31 00:39:41 ExecutorService + Runnables Jan 31 00:41:46 let me take a concrete example :-) let's say you have many activities that all need (a) fetch, (b) make a bitmap thumbnail (c) update an image view. Does the runnable itself do (a), (b) and (c)? Jan 31 00:42:03 yup Jan 31 00:42:15 boo Jan 31 00:42:20 so, that's an example of coupling the "what-happens-after" with the async task Jan 31 00:42:41 making it not is actually fairly complex since you'd have to signal a thread that is waiting / checking every so often that the runnable has completed Jan 31 00:43:36 one alternate approach [which I've found pretty handy] is to do at least (c) via what SimonVT would probably call an "event bus" Jan 31 00:43:59 once (b) is done, it simply pushes an event Jan 31 00:44:11 you could Jan 31 00:44:11 if there's someone interested in it, they pick it up and do the right thing Jan 31 00:44:22 but then you'd have to have the main thread checking for events Jan 31 00:45:08 not exactly - any interested party(ies) simply register/unregister depending on whether they happen to care at any particular moment in time Jan 31 00:45:55 yes, but then they'd have to either wait until it's ready, or poll every so often to make sure it gets the event Jan 31 00:46:07 nope - nobody ever polls Jan 31 00:46:42 you've gotto show some 'loading/etc' UI anyway while something is going on. An event with interesting stuff just updates appropriate bits of the UI Jan 31 00:46:53 you poll by checking that the event is finished, because even if you had a listener saying "hey your shit is ready" that is going to be A) handled on the spawned thread anyways, or B) have to access the thread Jan 31 00:47:27 access to the thread that the event will be handled on* Jan 31 00:47:36 :-) no - the Handler/Message framework takes care of all that grunt work; and without polling either... Jan 31 00:47:55 it takes care of the gruntwork yes :P Jan 31 00:48:20 but it is essentially the same thing, just adding a level of obsurity to it Jan 31 00:48:24 heh Jan 31 00:49:16 It'd basically be like making an EventRunnable(Handle eventReceiverThreadhandle, EventListener) implements Runnable Jan 31 00:49:21 and extending that Jan 31 00:49:44 if you're curious how it does it, take a look at MessageQueue/Handler Jan 31 00:50:58 which like I said, sits and waits Jan 31 00:51:14 you guys might find this interesting; also there is a link there to netflix training material i think http://www.infoq.com/interviews/jafar-husain-netflix-reactive-programming-rx Jan 31 00:51:56 jonc: yes, though waiting != polling [or maybe we have a different understanding of polling I guess] Jan 31 00:52:04 waiting is worse than polling to me Jan 31 00:52:13 * kbs chuckles Jan 31 00:52:16 gotcha Jan 31 00:52:17 I said it'd either have to wait or have to poll Jan 31 00:52:46 I'd rather check every so often to see if results came back. I don't want to have a thread sitting and waiting doing nothing until it's told to continue Jan 31 00:52:59 nonblocking is the way to go Jan 31 00:55:39 I could understand creating an extension of Runnable that takes the Handle of the thread you want the "Event" on and making it so that your event gets sent to whatever listener you added Jan 31 00:55:40 g00s: interesting, thanks Jan 31 00:56:00 i guess he's talking more about js than java version :( Jan 31 00:58:43 guess I found rolling a small event-bus + thread-pool-in-service easy enough with the available android hooks; the ability to query the event stream sounds like an interesting idea, hm. Jan 31 01:13:13 hm, trying to do a repo init ... Jan 31 01:13:29 but i get this error message Jan 31 01:13:38 Users/xx/bin/repo: line 1: `AccessDeniedAccess denied.' Jan 31 01:13:43 wtf? Jan 31 01:16:04 can anyone test this url for me ? http://commondatastorage.googleapis.com/git-repo-downloads/repo Jan 31 01:16:29 so basically, curl is failing and writing junk into the repo command on curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo Jan 31 01:17:59 that's the same I see Jan 31 01:18:11 or rather, that's what the server is giving me Jan 31 01:18:23 Penultimate thank you Jan 31 01:18:42 the next to last time you'll ever thank someone? Jan 31 01:24:32 hm, what other legit place could i get the repo command from Jan 31 01:36:30 It's been a long time since I got the source - but my repo command seems to come from here: https://gerrit.googlesource.com/git-repo/+/refs/heads/stable/repo - maybe that'll work, dunno Jan 31 01:38:20 kbs cool thanks Jan 31 01:49:54 fatal: unable to connect to android.git.kernel.org Jan 31 01:50:54 repo init failed :( Jan 31 01:51:11 how strange, hm Jan 31 01:51:36 android.git.kernel.org? Jan 31 01:51:36 I actually ran the init command, and it seemed to be happy enough, let me check... Jan 31 01:51:38 you got wrong repo Jan 31 01:51:48 bad manifest Jan 31 01:51:56 android sources haven't been at kernel.org for over a year Jan 31 01:52:00 hm, i just did $ $ repo init -u https://android.googlesource.com/platform/manifest Jan 31 01:53:28 oh crap, i got repo 1.10 from git Jan 31 01:54:23 ok, http://commondatastorage.googleapis.com seems to be back up \o/ Jan 31 01:54:24 $ shasum repo -> b8bd1804f432ecf1bab730949c82b93b0fc5fede - "works for me (tm)" Jan 31 01:55:28 Hi guys, I'm trying to pass in a value when starting another activity. So I've done this -> i.putExtra("number", tempNumber); Jan 31 01:55:29 startActivity(i); and in the following activity, i'm trying to get that string like so -> mPhoneNumber = getIntent().getExtras().getString("mobile"); but log says mPhoneNumber is null.. why is this? Jan 31 01:57:18 is that just a typo? "number" != "mobile" Jan 31 01:57:32 oh, how embarrasing Jan 31 01:57:33 lol Jan 31 01:57:43 kbs, thanks Jan 31 01:58:10 yep, been there done that etc - constants ftw, or something :-) Jan 31 01:58:50 haha yup Jan 31 01:59:21 it's best to set that string in onResume or onCreate? Jan 31 01:59:34 set mPhoneNumber I mean? or does it not matter Jan 31 02:02:52 I don't think it matters, I would do onCreate so it only gets called the one time Jan 31 02:05:24 TheCM, yeah true I'll do that Jan 31 02:05:30 cheers Jan 31 02:05:38 Interesting event http://www.meetup.com/SF-ANDROID-LIVE-CODE/events/161883002/ Jan 31 02:08:31 heh. "Job Manager" + "Event Bus" Jan 31 02:08:34 Hi, I'm saving images on to the internal storage but I notice that they don't appear in the gallery app until i reboot. is this a known issue? Jan 31 02:08:45 (saving images programatically, through my app) Jan 31 02:09:01 * kbs is glad someone else has the same wacko idea Jan 31 02:09:56 ir7466: yes - you likely want to update MediaStore directly if you save images and want them to be accessible to apps that use MediaStore [like gallery...] Jan 31 02:11:08 something like MediaScannerConnection.scanFile is what I've used, it's not too bad Jan 31 02:11:36 kbs: yeah, I thought the way I was doing it was with media store - I'm passing a new file to the camera app like this: takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photo)); Jan 31 02:12:46 Not too sure about the interaction with the camera app; that's not necessarily connected with the MediaStore [rather confusingly.] Jan 31 02:12:54 hmm okay Jan 31 02:12:57 CocoStorm, https://gist.github.com/alex-richards/8725484 Jan 31 02:12:59 It's not a huge deal Jan 31 02:13:06 that's how I create intents Jan 31 02:13:15 stops you messing it up easily Jan 31 02:13:31 Is there potentially a way programatically I can "refresh" the media store? Jan 31 02:13:36 To avoid having to reboot Jan 31 02:13:50 if I could just clear a cache or something in my app, that would be fine Jan 31 02:13:54 ir7466: that's just what I mean. If you eventually have a publicly accessible file that you want to add to the MediaStore [regardless of how it was created - via camera, downloaded, generated etc] look at the above api Jan 31 02:13:58 oh sweet thats handy, thanks alex_PP Jan 31 02:14:58 no worries Jan 31 02:15:21 ir7466: it's best to think of the MediaStore as rather like the contacts manager - it's no more or no less than a glorified database that contains pointers to files on the device. On reboot, it runs a task that sweeps the filesystem that [I believe] is also triggered on a usb remount broadcast request Jan 31 02:16:06 but you don't want to do something funky like that - just tickle it with a file as above and in theory it will update its database; etc. Jan 31 02:17:25 "Archos Announces A Trio Of Low-End Tablets You Probably Won't Want To Use"; hehe androidpolice doesn't have much good to say about them Jan 31 02:18:19 oh perfect Jan 31 02:18:29 so I can just run MediaScannerConnection.scanFile on the file I created and it should update Jan 31 02:18:37 thats exactly what I was looking for Jan 31 02:19:09 sorry, I mistinterpreted what you mentioned above - i thought this function would replace the way I was creating the file and sending it to the camera Jan 31 02:19:42 yep - no worries, hopefully it works for you :-) Jan 31 02:22:24 In theory doing it this way it has some benefits - apps that are hanging off the mediastore content provider auto-update themselves as well, though I've noticed the gallery app doesn't always do that consistently... but that's a whole 'nother story; and half the "photo" apps just poke around the filesystem. Jan 31 02:22:35 * kbs stops gabbing Jan 31 02:24:28 Anyone ever encountered an issue with Animations where they stall, then suddenly all start at the same time? It's wierd, as these are totaly unrelated animations, and nothing happens until an animation of a large ImageView starts below the animations that have stalled Jan 31 02:24:50 This is with Android 4.1.1 Jan 31 02:28:11 sounds like the imageview is taking a long time to render itself - animations still all run on the ui-thread, don't they? Jan 31 02:28:40 adb tcpip ftw Jan 31 02:29:41 having issues getting https://github.com/chrisbanes/ActionBar-PullToRefresh up and running in my project Jan 31 02:30:26 https://gist.github.com/akatreyt/8725631 is my gradle and when I sync my gralde i get :app:prepareComGithubChrisbanesActionbarpulltorefreshLibrary093Library UP-TO-DATE Jan 31 02:30:29 kbs: I don't think it's anything to do with that, I've added a Timer to wait 5seconds before starting the animations, and they still stall. Going to file it as a bug, although I guess as it's an older version they won't care too much Jan 31 02:30:38 so it has unresolved symbol when I try to import it Jan 31 02:30:57 any thougts? Jan 31 02:31:51 kbs: Weird thing is, I can wait any amount of time, and as soon as I start the animation for the large ImageView, all the others start immediately, as though it's suddenly realised it needs to draw them over it! Jan 31 02:32:33 Smashcat: weird. Be surprised if it's a framework bug; but hard to tell without looking at code, etc. Jan 31 02:34:18 kbs: Yep, don't know what else it could be - I've added logging to the animationListeners, and the onAnimationStart for them all fire at once, straight after the big one starts. I'm going to try turning off hardware acceleration, to see if it fixes it... Jan 31 02:34:31 anyone, thoughts, been fighting this for days Jan 31 02:36:41 Hmm, disabling HW acceleration didn't work. Have noticed that clicking anywhere on the screen starts all the animations though - haha. Definitely a bug. Jan 31 02:44:47 Ah I see, the small views were all positioned off screen, then I was positioning them on screen in onAnimationStart(). This didn't work. However moving them onscreen just before calling startAnimation(), even though they had visibility set to View.GONE fixed the problem. Weird! Jan 31 02:49:14 well - glad you have a foothold on the issue; and thanks for helping me stumble on this easter egg I didn't know about - https://www.google.com/search?q=android+timer :-) Jan 31 02:49:40 kbs: heh :) Jan 31 02:50:44 kbs: I did find other people had exactly the same issue - all seemed to solve it in different ways, but I suspect each way triggered something to re-layout the view **** ENDING LOGGING AT Fri Jan 31 02:59:58 2014