**** BEGIN LOGGING AT Sun Feb 17 02:59:57 2013 Feb 17 03:00:07 romainguy_: I'm not talking about logcat Feb 17 03:00:22 bugreports don't dump SQL databases Feb 17 03:00:27 Bugreport as in dev options, take bug report Feb 17 03:00:33 we know what you're talking about :P Feb 17 03:00:48 romainguy_: can I email you something? Feb 17 03:00:53 sure Feb 17 03:00:57 AlCapwn: ... could you post such a bugreport, *AFTER* removal of said PII (just put * or something in place)? Feb 17 03:00:58 romainguy@android.com Feb 17 03:01:09 a bugreport includes, among other things, all of logcat Feb 17 03:01:32 p_l: I took a lot of stuff out, but decided against posting it because I wasn't sure everything was removed Feb 17 03:01:45 Thanks romainguy_ ,I'll send something in a biy Feb 17 03:01:49 Bit* Feb 17 03:01:49 Ok thanks Feb 17 03:02:03 romainguy_: i dont suppose you looked any further into that issue i reported a while back about drawing a circle with an infinite radius silently halting the process. Feb 17 03:02:24 just curious if anyone ever found the reason Feb 17 03:02:24 I reported the issue to the Skia team Feb 17 03:02:24 AlCapwn: fair enough Feb 17 03:26:54 why when i deply my application always on my phone generate another icon Feb 17 03:27:32 how can i avoid it Feb 17 03:29:11 what do you mean Feb 17 03:30:37 ok i will try to explain i have one application called controles i have 8 icons calls controles on my android phone, i uninstall it aging and i deplo my application again but it generate 8 icons again in fact one when i deploy my application increase with another icon Feb 17 03:30:54 hmm httpost to something like domain.com/index.php?action=usersave&bla=bla&json={somejson} Feb 17 03:31:10 i get IllegalArgumentException in place of json Feb 17 03:31:13 icons on your launcher screen or in the app drawer Feb 17 03:32:13 app drawer Feb 17 03:32:20 can you pastebin your manifest Feb 17 03:32:25 ok Feb 17 03:32:30 and are you by any chance changing your package name Feb 17 03:34:28 here is my manifiest http://pastebin.ca/2314614 Feb 17 03:34:36 no Feb 17 03:34:45 i havent change my package name Feb 17 03:35:32 tona: all your activities have the launcher category Feb 17 03:36:02 tona: that intent-filter should only be used for the entry activity you wish your app to use when you launch it from start. Feb 17 03:37:16 how change that category no launcher Feb 17 03:37:56 tona: just remove the stuff for all the activities except your main entry activity. Feb 17 03:38:05 ok Feb 17 03:38:12 which in your case would appear to be MainActivity Feb 17 03:38:28 thats correct Feb 17 03:38:30 thanks Feb 17 03:39:15 np Feb 17 03:43:42 lol what? am i reading this right? the messaging app (packages/apps/Mms) doesn't use fragments?! surely this can't be the app that ships? Feb 17 03:49:55 * pragma- uses handcent Feb 17 03:50:50 jasta: I don't think the open source music one does either, but who knows how different the Google Music app is. Feb 17 03:50:57 * pragma- uses almost none of the stock apps. Feb 17 03:51:20 almost all of them are too lacking in features Feb 17 03:54:02 i'm just baffled because i am pretty sure (waiting to verify) that the shipping sms app is still the one in aosp Feb 17 03:54:11 i can see no reason why they would've forked it and closed source Feb 17 03:55:02 jasta: well I'm writing my version of a replacement Feb 17 03:55:08 with all the features I want Feb 17 03:55:26 jasta: yea, it probably is the open source one. Feb 17 03:55:59 I don't really know how those are managed internally. I submitted a patch to the open source email app, it is just sitting there. Feb 17 03:56:01 and if that's true (which i think it is), the UI was heavily modernized toward ics/jellybean Feb 17 03:56:13 im floored that they wouldnt have upgraded the code design along with it Feb 17 03:56:46 this is crazy :) Feb 17 03:57:12 the aosp phone i have sitting here... the mms app looking identical to my nexus phone running the google build. Feb 17 03:57:30 well, wow. Feb 17 03:57:58 i was going to submit a patch to fix a minor quality/polish issue, and i was just baffled that there were no loaders, no fragments, etc. Feb 17 03:58:01 old school! :) Feb 17 03:58:23 :) Feb 17 03:58:44 no idea who owns those apps inside Google Feb 17 04:00:39 well, git log / git blame probbaly do :) Feb 17 04:01:01 i mean they quite clearly maintain these apps closely Feb 17 04:01:15 theyre all updated with the latest design patterns Feb 17 04:01:21 UI design, that is Feb 17 04:01:56 jasta: you're often shocked and baffled, it's cute Feb 17 04:01:57 not really important to my needs at the moment though, i can easily patch this the old school way Feb 17 04:02:00 it's just so hilarious to me :) Feb 17 04:02:20 romainguy_: i would've imagined that it would've been really painful to keep stringing this app along with that old crud Feb 17 04:02:51 in the apps i've carried across the ics/jb line, i was really forced to just rework things along the loader/fragment lines to avoid the pain. Feb 17 04:03:05 Is there any way I can check if a checkbox in the previous activity is checked? Feb 17 04:03:07 not doing so felt like it would've cost me much more Feb 17 04:03:16 would I just do previousclassname.button.ischecked -- true? Feb 17 04:03:41 agy2154: uhh, don't do it like that. the checkbox should be linked to some state that can be queried. Feb 17 04:03:46 for example, with SharedPReferences. Feb 17 04:04:03 jasta: alright Ill look into it Feb 17 04:04:03 thanks Feb 17 04:04:30 romainguy_: any chance i'm not wasting my time patching aosp Mms btw? :) Feb 17 04:04:44 i just want to get rid of that annoying conversation reload when you power off and power on again. Feb 17 04:05:01 it's such a garbage old pattern and this app is used a LOT. Feb 17 04:05:07 in that very way, a LOT. Feb 17 04:06:17 no idea, I never use that app Feb 17 04:06:28 which do you use, just out of curiosity? or do you just not text? :) Feb 17 04:07:47 what would be a common mistake/reason that onConfig change the savedInstanceState in onCreateView in a fragment is null ? Feb 17 04:07:48 I don't text Feb 17 04:07:51 I use Gtalk Feb 17 04:07:54 and email Feb 17 04:08:07 jasta: for the SharedPReferences would I do the nameofsharedpreferences.putboolean? Feb 17 04:08:14 there are two things I don't understand/use/want to use/hate using: SMS and voicemails Feb 17 04:09:03 actually, i tend to use SMS in just two scenarios: communicating with iphone users, and when my service sucks. Feb 17 04:09:34 iphone users never seem to respond to gtalk. i guess maybe the notification flow sucks, i really don't know Feb 17 04:10:17 yeah it does Feb 17 04:10:26 it takes like 5 miuntes to show up Feb 17 04:10:39 talkatone sucks Feb 17 04:10:45 best gtalk app which im using now is gv phone Feb 17 04:10:48 for the iphone Feb 17 04:11:04 Yikes, my device seems to not connect for adb ... But it show up in the filesystem and the device itself says it is connected fod usb debugging Feb 17 04:11:43 Adb shell :error device offline Feb 17 04:11:57 is this maybe the new 4.2.2 security biting you :) Feb 17 04:12:20 Ah i have just updated Feb 17 04:12:41 there's a post about this on android developers blog Feb 17 04:13:00 Thanks Feb 17 04:14:17 Can you remember offhand what the fix is, while i am googling? Feb 17 04:14:34 nvm i got it with abstract boolean Feb 17 04:16:30 Grrrr this was all working this morning :( Feb 17 04:16:54 I'm using ubuntu linux Feb 17 04:17:24 I recall having to do something to enable viewing the filesystem, but that all works just fine still Feb 17 04:18:53 Adb devices lists something but says offline Feb 17 04:21:34 Hmmm . Jst trying to reboot device Feb 17 04:22:42 Grrr Feb 17 04:23:54 any IntelliJ users in the house? Feb 17 04:24:10 no, they're all outside. Feb 17 04:24:11 trying to figure out how to add an @author tag to the top of newly created classes with my name Feb 17 04:24:13 :P Feb 17 04:24:15 damn Feb 17 04:24:35 I'm seeing the ${USER} predefined variable that I can use Feb 17 04:24:53 but that gets filled in with my login username, whereas I wanna fill in my actual full name Feb 17 04:24:53 does IntelliJ offer any way to backup the database online Feb 17 04:24:56 join #intellij or something, why are you asking us? Feb 17 04:25:13 idk its sorta related to android Feb 17 04:25:15 matt9_: it's in the settings. There's templates in there somewhere. Feb 17 04:25:17 fine ill ask there Feb 17 04:25:21 Grrrr this was all going so well Feb 17 04:27:16 Trying to reboot pc now Feb 17 04:29:23 Grrrrrrrrrr still offline grrrrrrr Feb 17 04:30:12 Filesysteem openis fine though, device itself says usb debugging is connected Feb 17 04:30:40 wow that channel is empty. gkatsev I see the template in the settings, do you know if its possible to make custom variables? Feb 17 04:31:36 gkatsev nvm found some documentation online http://www.jetbrains.com/idea/webhelp/file-template-variables.html Feb 17 04:33:37 Ok seems i need adb version 1.0,31 Feb 17 04:36:11 matt9_: I've previously just hardcoded my name in there :) Feb 17 04:36:22 yeah I think thats what I'm gonna end up doing Feb 17 05:09:21 how long did it take you guys to perfect android Feb 17 05:10:02 perfect is an unattainable goal Feb 17 05:10:25 StingRay_: Yeah but I mean like get to know it real good.... Feb 17 05:10:40 real good is very subjective Feb 17 05:10:50 based on what you want and where you are Feb 17 05:10:52 ueaj Feb 17 05:10:55 like Feb 17 05:11:00 Ok Feb 17 05:11:14 One second let me explain Feb 17 05:12:33 So I kinda know the basics now and am understanding some new things on my own slowly but I still have to refer online for some basic things. I obviously don't know that much but am putting at least 5 hours of effort a day. How long do you think it would take me to become confident. Feb 17 05:13:33 agy2154: no offence but thats like me asking you, if I shoot at the clay range, how long before my DTL average on a day is above 24 Feb 17 05:14:08 how would you know ? Feb 17 05:14:17 impossible Feb 17 05:14:19 :) Feb 17 05:14:28 StingRay_: what do you mean how would I know? Feb 17 05:14:32 ohh Feb 17 05:14:36 so it differs Feb 17 05:15:02 I mean how would you know how long it would take me to achieve X and Y Feb 17 05:15:05 any developer on any platform who tells you they never need to refer to docs - or to source, maybe - is either lying to you or to themself Feb 17 05:15:31 anyone who claims to know something in an absolute sense is a fool Feb 17 05:16:22 So is it normal for me to refer to the internet for help? Feb 17 05:16:31 it would be abnormal not to Feb 17 05:16:38 Like on a regular basis? Feb 17 05:16:42 right Feb 17 05:16:46 thanks Feb 17 05:16:56 I was just wondering If I was heading on the right path Feb 17 05:18:07 is this any shortcut for this? Feb 17 05:18:08 dof.setOnCheckedChangeListener(this); iyv.setOnCheckedChangeListener(this); iv.setOnCheckedChangeListener(this); dxd.setOnCheckedChangeListener(this); ph.setOnCheckedChangeListener(this); ixv.setOnCheckedChangeListener(this); tof.setOnCheckedChangeListener(this); Feb 17 05:18:21 iyv are the name of my checkboxes Feb 17 05:18:39 use a checkbox group ? Feb 17 05:19:01 I thought there was only a radiobutton group Feb 17 05:19:11 maybe thats what I ment :) Feb 17 05:20:00 StingRay_: Ohh I can't use a radio button because there are 49 diffrent sinereos Feb 17 05:20:15 its alright Feb 17 05:20:20 its only a few lines Feb 17 05:21:23 well you could put them in an array Feb 17 05:21:27 and loop though Feb 17 05:24:06 Lol. Tap build number seven times and you are avdevelopper Feb 17 05:25:10 lol Feb 17 05:26:10 ah, if you tap it 71 you will realise something amazing though Feb 17 05:26:28 but on the 71st you have to hold it Feb 17 05:26:44 really? Feb 17 05:26:53 what willl happen? Feb 17 05:27:00 you will realise something Feb 17 05:27:20 that your a little too gullible :) Feb 17 05:27:20 In eclipse? Feb 17 05:27:25 damn Feb 17 05:27:26 presumably everyone knows what happens when you tap the OS version a few times? Feb 17 05:27:27 got m Feb 17 05:27:29 *got me Feb 17 05:27:38 yeah Feb 17 05:27:41 jellybean comes up Feb 17 05:31:52 Hmm. Just done a load of updating but adb version still tells me it is the older one 1.0.29 ... I need 1.0.31 aparently Feb 17 05:33:32 Ok i have it downloaded just not in usr bi Feb 17 05:33:36 silly me Feb 17 05:34:25 http://m.youtube.com/#/watch?feature=youtube_gdata_player&v=Vfpu2rBHj0o&desktop_uri=%2Fwatch%3Fv%3DVfpu2rBHj0o%26feature%3Dyoutube_gdata_player Feb 17 05:34:41 my bad Feb 17 05:34:42 http://www.youtube.com/watch?hl=en&gl=US&client=mv-google&v=Vfpu2rBHj0o&feature=youtube_gdata_player&nomobile=1 Feb 17 05:34:57 lol Feb 17 05:43:27 Ok i suspect i had adb installed in usr/bin by ubuntu apt get install adb .. An old version perhaps. Got it sorted now, i am happy again Feb 17 05:43:48 How do you guys handle all the different resolutions across android devices? Feb 17 05:44:38 hdpi Feb 17 05:44:40 all those Feb 17 05:44:45 kdpi Feb 17 05:44:47 ldpi Feb 17 05:45:58 apple741: make stuff adaptable Feb 17 05:46:24 xml based drawables, proper dimension sets, patch based bitmaps Feb 17 05:46:34 all the stuff stated in the dev site Feb 17 05:50:35 Does android automaticly manage where SharedPreferences are stored? Feb 17 05:51:21 well they are store in app data Feb 17 05:51:28 so I guess the answer is yes Feb 17 06:14:44 is there a testflight like service for android yet? :-/ Feb 17 06:17:29 Drakonite: https://testflightapp.com/envy/ Feb 17 06:18:13 doesn't help much if it isn't out yet :P Feb 17 06:18:19 :) Feb 17 06:18:27 I don't know of any that are very good. Feb 17 06:18:34 I did find a place, but it's $50/mo, which is a bit more than I want to spend for sending builds to 3 people. Feb 17 06:18:50 hockeyapp has something for distribution. i use it for crash reports, haven't tried their distribution Feb 17 06:20:03 is it worth setting up something for 3 people? why not just email it? Feb 17 06:20:20 there was a free thing you could host yourself I remember seeing a while back, but can't think of the name now Feb 17 06:20:30 it is worth it, though dropbox is probably 'good enough' Feb 17 06:20:41 I've had lots of issues with email and corrupt apks Feb 17 06:20:59 novie: does testflight have A/B testing? Feb 17 06:21:44 also, my APK will be in the 20MB+ range quickly Feb 17 06:21:44 g00s: not sure actually. Feb 17 06:21:57 Drakonite: Dropbox is also an option. Feb 17 06:22:21 novie: here is more info if you are interested http://www.fiercemobilecontent.com/story/amazon-appstore-introduces-ab-app-testing-android-developers/2012-12-06 Feb 17 06:23:00 ugh amazon appstore :) Feb 17 06:23:20 they are ahead in this respect, A/B testing is useful w/usability testing Feb 17 06:24:31 g00s: there's other ways to do a/b testing. I haven't been impressed with the amazon experience. Feb 17 06:24:42 the whole apk signing business feels sketchy. Feb 17 06:25:00 amazon is a pain Feb 17 06:25:11 i haven't used them at all for anything android; but its nice they offer this a/b testing service Feb 17 06:25:17 novie: it's because of their drm setup Feb 17 06:25:37 yea, it was one of the reasons I stopped dealing with them. Feb 17 06:25:56 the other was being rejected for some weird crap in widely popular libraries. Feb 17 06:26:08 just not worth the headache for me. Feb 17 06:28:07 if i change a view's status to visable will it cause anything to go wrong in a relative layout? Feb 17 06:28:29 Agy2154: try it :) Feb 17 06:28:48 g00s: Ill try... thanks... Feb 17 06:29:52 romainguy_: btw, colloquy 2.4.1 is coming - it isn't dead yet :) Feb 17 06:35:24 If I have a class that accesses a database, and this class is used by multiple threads, should I make it a singleton and/or make the database accesses synchronized? Feb 17 06:36:21 the database layer of android is thread safe Feb 17 06:37:16 but plenty else could go wrong depending on how you are managing state :) Feb 17 06:37:52 * g00s doesn't recommend eating 1/2 lb chocolate in one day Feb 17 06:39:50 novie: do they have certain libraries blacklisted or something ? Feb 17 06:45:14 g00s not sure. The library I had an issue with was the support library. Feb 17 06:45:43 novie: ok, but did amazon say, "you can't use the support library" ? Feb 17 06:47:05 No they claimed there was a bug in my code and pointed to something in the support library. Feb 17 06:48:04 O.O Feb 17 06:48:51 how is dropbox + eclipse? Feb 17 06:49:14 i … would not Feb 17 06:49:42 g00s: thanks.. yeah I used google drive last week and it messed some of my files up Feb 17 06:49:57 use git or something for your source code Feb 17 06:50:08 svn / hg / whatever Feb 17 06:53:40 i use hg/mecurial with bitbucket Feb 17 06:53:50 free, secure Feb 17 07:04:38 i am trying to import mysqlconnector in android i have mported my library into libs but logcat is telling me no suitable driver Feb 17 07:06:50 tona: sql connector would only work 'reasonably' well over lan Feb 17 07:07:03 forget about mobile connections Feb 17 07:08:02 then android dont work with mysql Feb 17 07:08:19 you have to create a service to expose your db Feb 17 07:08:32 what option do u have Feb 17 07:08:32 and then your android app will be one client that consumes that service Feb 17 07:09:08 but why this dont work Feb 17 07:09:23 jdbc was not meant for high latency conenctions Feb 17 07:09:50 *connections. thats just the way it is. you'll have to learn about service design, maybe REST, etc Feb 17 07:11:18 you wouldn't do that with iOS or WP either. Although, maybe someday, WP gets WinFS ;) Feb 17 07:12:52 ok Feb 17 07:15:10 how much time do you have for reading? i can suggest 2 books Feb 17 07:18:56 wich Feb 17 07:19:13 can you tell me Feb 17 07:21:11 this was good, http://www.amazon.com/REST-Practice-Hypermedia-Systems-Architecture/dp/0596805829 but its a high level overview Feb 17 07:21:43 the restful web services cookbook was more nuts + bolts Feb 17 07:21:58 i liked this also http://www.amazon.com/Service-Design-Patterns-Fundamental-Solutions/dp/032154420X Feb 17 07:22:17 although i mostly skipped the SOAP stuff ;) Feb 17 07:22:47 chances are, you'll have to create services again in the future. may as well know how to do it well :D Feb 17 07:23:33 anyone have experience with vuforia? Feb 17 07:32:56 GAHHH Feb 17 07:33:05 how do you turn off eclipse autocorrect/typo? Feb 17 07:33:09 the red underline thing Feb 17 07:39:24 hello all Feb 17 07:59:13 anyone else having trouble logging into their gmail account :| Feb 17 07:59:58 no, but I did just watch a penguin fighting a booby in the desert... Feb 17 08:12:23 Sigh, eclipse.... what a dissapointment... So i write this code and i ran it. a couple of graphical errors occurs.. i look back (oops i messed up there!!!). Feb 17 08:12:40 I fix the problem, test again same error. I run a bunch of different tests and re-read my code to make sure everything is correct Feb 17 08:12:55 clean the project app task kill on device Feb 17 08:13:22 it still doesnt work. I take a piss break and rerun doing some more tests and it just POOF works. Feb 17 08:29:28 Trinity: wait till things start getting really weird :P Feb 17 08:29:52 g00s: what do you use ? Feb 17 08:30:29 Eclipse at the moment Feb 17 08:32:42 g00s I thought you were an intelliJ convert :) Feb 17 08:35:12 oh, Eclipse Feb 17 08:35:59 Eclipse is the Hyundai of IDEs Feb 17 08:36:24 you mean cheap, simple and easy to maintain ? Feb 17 08:36:41 cheap parts and labour ? Feb 17 08:36:43 :) Feb 17 08:37:12 it's functional and easy to understand but isn't that powerful and it's not very exciting to use Feb 17 08:38:03 well i downloaded intellij and fired it up, looked a bit too difficult Feb 17 08:38:14 seems like it would be "nice" to use Feb 17 08:38:54 the ui didn't suit my 3-monitor spread too well Feb 17 08:39:00 or not that i could see how to make it Feb 17 08:43:00 is it easy to do this with intellij ? http://dl.dropbox.com/u/80096154/monitors.png Feb 17 09:09:28 omg.. this is too funny. https://www.youtube.com/watch?v=d_KOjaeCRI0 Feb 17 09:09:41 dont get "scr"googled Feb 17 09:10:11 it's scroogled Feb 17 09:10:13 not scrgoogled Feb 17 09:10:43 ahh, but thats fighting dirty Feb 17 09:11:06 sup all Feb 17 09:15:28 ehrm. good morning. is there a way to set the padding in dp in code? Feb 17 09:16:53 http://developer.android.com/reference/android/util/TypedValue.html Feb 17 09:21:08 I have a string that varies between these where X is a number: Xh Xm, XXh Xm, XXh XXm, Xh XXm, Xh, XXh, Xm, XXm. How can I get the "value" of h and m? Do I have to check indexOf and do a whole bunch of if-else? Or is it possible to do with regex somehow? Feb 17 09:25:42 Quacked: retrieving all the (\d+)([hm]) matches should do it? .group(2) would be "h" or "m", .group(1) the actual value Feb 17 09:27:24 Quacked, didnt you got it yesterday? :-/ Feb 17 09:28:10 Styler2go: I started with a bunch of indexOf but realized that was stupid Feb 17 09:28:18 why? Feb 17 09:28:26 so many ifs and elses Feb 17 09:28:35 yes, like a small parser Feb 17 09:28:36 figured regex would look nicer :) Feb 17 09:28:43 this of course Feb 17 09:28:54 but i am bad at regex .( Feb 17 09:29:15 tm604: can you elaborate how to use that? Feb 17 09:30:43 see the Matcher and Pattern docs Feb 17 09:30:49 basically something along the lines of Matcher m = Pattern.compile(...).matcher(string); while(m.find()) { if(m.group(2).equals("h") h = m.group(1); } Feb 17 09:33:05 capella: long ways up ^^^ but yeah, i have been kicking the tires on IntelliJ Feb 17 09:33:26 wow - time phase change Feb 17 09:33:31 :D Feb 17 09:33:36 took my dog for a walk :) Feb 17 09:34:14 I test drove eclipse for two days ... hated it :D Feb 17 09:34:27 javax.net.ssl.SSLPeerUnverifiedException: No peer certificate Feb 17 09:34:31 what does this mean? Feb 17 09:34:35 That whole "clean" button and how it can't find the 'R' class Feb 17 09:37:18 andd I swer there was a situation where the compiler generated error messages that I had to manually delete Feb 17 09:38:03 can i add a new ssl certificate to my app so that i dont have to extend this sslsocketfactory? Feb 17 09:38:28 capella: sometimes, there is a grey area … where its hard to tell if the suck is eclipse or ADT Feb 17 09:40:06 i wonder if Oracle is going to bring any tooling to the table wrt Java SE Compact/JavaFX for Android Feb 17 09:40:19 well find out soon ;) Feb 17 09:40:42 brrr... oracle Feb 17 09:40:56 oh man, i have the most epic oracle rant … hold on, SEO time Feb 17 09:40:57 that's like wondering if Mordor will make any new cool rings Feb 17 09:41:06 g00s: intelliJ has been good to me Feb 17 09:41:33 this is f'ing hilarious http://www.youtube.com/watch?feature=player_embedded&v=-zRN7XLCRhc#t=35m00s Feb 17 09:42:00 does IntelliJ comes with the complete android thing? Feb 17 09:42:08 * capella thinks the IDEs are trying to doo too much these days ... for example I hate the auto code completion stuff Feb 17 09:42:26 Styler2go: it includes an android plugin for the IDE. You still need to download the android sdk from google Feb 17 09:42:44 yes i have that Feb 17 09:42:49 si i just have to setup this? Feb 17 09:43:08 capella: what's wrong with code completiion? :) That's one of the best things imo, though obviously you still need to take care to write readable code Feb 17 09:43:38 sometimes people find it too easy to write lots of bloat because code completion lets you spew out tons of chained method calls Feb 17 09:44:05 Yah but when it start closing braces and Ihave to delete stuff it injects and auto indents screwing up my typing, etc Feb 17 09:44:31 yeah, closing braces is annoying if done badly. IMO eclipse does that well and intellij doesn't Feb 17 09:45:11 is github a svn? or just to share code / projects? Feb 17 09:45:17 if you type a '}' manually then it needs to replace the automatically inserted one Feb 17 09:45:24 It's a personal situation ... I'm a good typer and I'd just rather spell thinks out and think along as I go Feb 17 09:45:43 with the occasional typo Feb 17 09:45:47 capella: i don't mind typing much, but often it's hard to remember exactly what class members are named Feb 17 09:45:55 or what their parameters were Feb 17 09:46:16 anyway you can tweak much of that Feb 17 09:46:19 Then I need to learn more! :) Feb 17 09:47:12 intellij has an amazingly stupid default behavior wrt code completion Feb 17 09:47:43 e.g. if I'm typing "view = getView()" it will end up as "getView() = getView()" because it automatically completes when I press space after "view" Feb 17 09:47:51 in eclipse, i have that shut off unless i press . or something Feb 17 09:47:55 :D Feb 17 09:48:09 it needs an option to disable completion on space bar Feb 17 09:48:14 does anyone here have experience with json parsing and android? Feb 17 09:48:24 I turn off intelliJ completion Feb 17 09:48:41 but for now I've just disabled the behavior to automatically select the first completion, that way it doesn't get in my way unless I manually use the arrow keys to select a completion Feb 17 09:48:41 or is it shift-space, can't remember Feb 17 09:48:44 it has one - click the policemans head in the lower right Feb 17 10:02:12 there is no easy way to "easily" accept a ssl certifcate, or? Feb 17 10:03:03 Styler2go: prob not, there maybe easier ways to fix what your wanting Feb 17 10:03:31 so i have to continue woth the htaccess in every networking i am doing :D Feb 17 10:04:01 no i mean there are probably easier more efficient ways to get the solution your wanting Feb 17 10:04:16 what solution do you mean? Feb 17 10:04:27 well, I dont know what the problem is Feb 17 10:04:28 lol Feb 17 10:04:41 more security on my server Feb 17 10:05:02 avoid public access Feb 17 10:06:14 oh I thought this was an app thing Feb 17 10:06:21 not a server thing Feb 17 10:06:23 no Feb 17 10:06:31 the server is highly insecure Feb 17 10:06:51 or better: the scripts on the server Feb 17 10:07:55 tm604: something like this? http://pastebin.com/rqKy6jCF Only problem is that group(2) crashes with ArrayIndexOutOfBoundsException Feb 17 10:08:24 tm604: I can get the values like "24h" with group(), but not simply "24" Feb 17 10:08:38 Quacked: no Feb 17 10:08:42 you only have one group there. Feb 17 10:08:44 see original regex Feb 17 10:08:52 ah Feb 17 10:09:06 also, why do you have two matches? easier just to use a single regex and find. Feb 17 10:09:28 thanks Feb 17 10:14:02 I tried your version first, but it crashed. http://pastebin.com/j48L4g36 Feb 17 10:14:42 Quacked: you can only get group 0 and 1, the regex doesnt have a 3rd field Feb 17 10:14:53 0 is the entire thing, 1 is the 1st () Feb 17 10:14:54 aha Feb 17 10:14:55 2 is invalid Feb 17 10:15:42 thanks Feb 17 10:17:28 again, that's not the regex I suggested. Feb 17 10:17:45 It wasn't? :S Feb 17 10:17:49 I'll have a look Feb 17 10:17:52 two groups, two sets of (). one for value, one for type. Feb 17 10:30:39 Made it know, thanks Feb 17 10:30:53 I need to read regular expressions more carefully Feb 17 10:30:57 :) Feb 17 10:31:11 Couldn't see those parantheses Feb 17 10:43:45 s/know/now/ Feb 17 10:55:18 Load Average 0.8, 2.84, 2.42 Feb 17 10:55:24 do you guys know if this is high? Feb 17 10:59:15 high for what ? Feb 17 11:00:14 CPU load of my server Feb 17 11:01:48 it's not "high" -- is your server experiencing performance problems ? Feb 17 11:01:57 i dont know, i dont think so Feb 17 11:02:10 https://styler2go.de/munin/localdomain/localhost.localdomain/ everything seems ok , or? Feb 17 11:05:11 system isn't really doing all that much :) Feb 17 11:05:19 thank you :) Feb 17 11:05:41 Styler2go: it is a worry that you couldn't see that Feb 17 11:05:42 lol Feb 17 11:05:53 no i've seen its ok Feb 17 11:05:55 if your the sys admin that is Feb 17 11:06:15 yes i am :D Feb 17 11:06:15 then what was the question for ? Feb 17 11:06:31 i was not sure.. the munin control panel tells me the cpu usage is ok Feb 17 11:06:42 the cotnrol panel of my host tells its high Feb 17 11:06:51 i dont know what to trust more Feb 17 11:07:07 well one may only account for your vhost Feb 17 11:07:12 the other maybe the machine Feb 17 11:07:38 load average isn't a great way to measure performance Feb 17 11:08:05 then lets ignore my questions :D Feb 17 11:08:29 mysqld is taking the most load :D Feb 17 11:09:14 that's not always a bad thing Feb 17 11:10:14 oh... if we are already offtopic... do you guys know a tool which creates a diagrom from a mysql query? :) Feb 17 11:12:13 there's some bolt on providers for dtrace you can use for performance tracking Feb 17 12:18:25 hi all, i have been working on this for 2 days now i don't understand the cause. http://pastebin.com/zPiNr1nn the error i get is java.util.ConcurrentModificationException, the origin line is the next() on line #39, as far as i can tell i do not in any location modify statsMap that are returned from stats.getStats(). Feb 17 12:29:15 hello Feb 17 12:29:17 anyone here? Feb 17 12:29:26 Whats the best Horizontal ListView around, am using https://github.com/dinocore1/DevsmartLib-Android but this lib doesn't have setCurrent method implementation. Feb 17 12:29:45 from what i can gather with java.util.ConcurrentModificationException it can happen when using remove anything i dont even use statsMap insite the loop or the Iterator in any other way than to get next() Feb 17 12:30:06 use iteration. Feb 17 12:30:21 iterator.remove(); Feb 17 12:30:47 but i am not modifying the data Feb 17 12:30:52 so i dont understand i get the error Feb 17 12:31:30 as far as i gather i should be getting it if you try and modify it ? Feb 17 12:31:33 you have more than one thread/method access the same array while you are removing items from it. Feb 17 12:31:48 http://pastebin.com/zPiNr1nn Feb 17 12:32:08 "bumb" just so you can see it since you were not here when i typed it: Feb 17 12:32:09 hi all, i have been working on this for 2 days now i don't understand the cause. http://pastebin.com/zPiNr1nn the error i get is java.util.ConcurrentModificationException, the origin line is the next() on line #39, as far as i can tell i do not in any location modify statsMap that are returned from stats.getStats(). Feb 17 12:33:08 Stats passed to addStats is a new ... so i do not see how it can be modifyed Feb 17 12:33:52 fanno: too much indentation, could not read Feb 17 12:34:47 pragma-: sorry my english is not perfect =P Feb 17 12:36:29 how can i set the padding in dp? Feb 17 12:36:45 in code, not designer Feb 17 12:37:06 convert the dp to px in your code Feb 17 12:37:26 really? .. k ^^ Feb 17 12:37:42 Resources r = getResources(); Feb 17 12:37:42 float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 14, r.getDisplayMetrics()); Feb 17 12:38:03 14 is your dp value, the result will be the pixles values Feb 17 12:38:17 hmm Feb 17 12:38:20 ok Feb 17 12:38:23 thank you! Feb 17 12:38:26 welcome Feb 17 12:39:21 pragma-: is t his one better ? http://pastebin.com/qqY7C3kc Feb 17 12:40:15 does anyone know Horizontal ListView ??? Feb 17 12:40:32 than this https://github.com/dinocore1/DevsmartLib-Android Feb 17 12:40:35 ? Feb 17 12:41:40 i have read things like: http://www.journaldev.com/378/how-to-avoid-concurrentmodificationexception-when-using-an-iterator but u do not see how that apply, as i do not modify add or remove anything .. Feb 17 12:42:11 fanno: swap modifies Feb 17 12:42:37 fanno: and I'd rather see the whole source and the actual stacktrace rather than what you think is relevant Feb 17 12:42:51 sort also modifies Feb 17 12:44:12 you're also adding an item while using an iterator Feb 17 12:44:15 but i am not sorting the item in question am i ? Feb 17 12:45:06 why cant i simply start and stop a timer? why every task can only be started once? Feb 17 12:45:08 from all the i read it has to do with adding to the item you are looping Feb 17 12:45:50 I can't tell, you haven't passed the whole source nor an actual stacktrace. Feb 17 12:45:57 s/passed/pasted/ Feb 17 12:46:12 pragma-: sorce: http://pastebin.com/eQ2RtPmp trace: http://pastebin.com/jB933iHX Feb 17 12:47:23 fanno: and for ProjectActivity? Feb 17 12:48:01 http://pastebin.com/HivXzSNc Feb 17 12:52:17 i cant seem to recreate it constantly, it happens once in a while =( Feb 17 12:53:13 that's what happens when you have threads and race conditions Feb 17 12:55:28 could it be an issue from using Project.getInstance() ? where i share the project info across Activitys ? tho i still do not see how that can translate to this =P Feb 17 13:04:52 at best, you may only need to wrap some blocks with synchronized(statsMap), at worst you'll need to rewrite your application flow -- add some Log.d() messages to addStats(), updateStats(), updateUI(), etc, to track when they're being called Feb 17 13:07:39 pragma-: thanks, i just dont understand it happens as i do not understand when i am changing the statsMap =( but i will do as you suggest =) Feb 17 13:08:06 add a bunch of Log.d() messages throughout your app to trace its execution Feb 17 13:09:11 Logging is generally easier than using a debugging, especially when threads are involved Feb 17 13:09:20 s/debugging/debugger/ Feb 17 13:09:56 ok =) Feb 17 13:35:56 http://styler2go.de/apps/t/ do you guys need htauth for this link? Feb 17 13:44:49 Styler2go, no Feb 17 13:45:25 damn... Feb 17 14:44:23 so what is the preferred method to handle lifetime of opengl objects? Feb 17 15:11:51 uh, i'm confused by the BasicGLSurfaceView sample in the sdk Feb 17 15:12:04 nowhere does it generate or bind buffers? Feb 17 15:12:12 is that somehow implicit? Feb 17 15:37:05 At my SoundPool instance, if I call stop(x), it still takes about 1 second until it is really stopped. Feb 17 15:37:21 Funnily, this doesn't happen at the first time. (there it works as expected) Feb 17 15:37:30 I repeatedly use the same sound_id and call play and stop Feb 17 15:37:38 it is looping endlessly Feb 17 15:37:56 it's an mp Feb 17 15:37:57 3 Feb 17 15:41:22 is there any gain/benefit to someobject = null inside functions for local variables of that function? or should i not bother pehaps unless if it is a "big" object ? Feb 17 15:44:39 Aaargh, I'm getting so annoying with this Facebook SDK. Even when I make it into a singleton, I still have to provide context, activity and the bundle EVERY TIME. Feb 17 15:47:37 so the version with offset parameter of glVertexAttribPointer is only in api level 9... Feb 17 15:47:57 so how exactly is one supposed to use vbos in api level 8? Feb 17 15:50:56 can i somehow pass the offset packaged in a buffer or what? Feb 17 15:54:03 wwell Feb 17 15:56:01 same for glDrawElements Feb 17 15:56:09 those are the only two function that require level 9 Feb 17 15:56:55 what boggles my mind is that can't find anyone complaining about this with google so i must be doing something wrong? Feb 17 16:02:38 hi - what is the correct way to invalidate a preference view when another one changes ? Looks like an android:dependency decl is not enough ? Feb 17 16:04:18 I have setup an onSharedPreferenceChanged that adjusts global state after one pref changes, but the global state change is not applied to the dependent prefs instantly, I have to touch them to see the change Feb 17 16:06:09 is there a separate channel for android ogl? Feb 17 16:07:41 code.google.com = Spam City Feb 17 16:13:08 japro: doubt it. Feb 17 16:14:15 well i guess the correct answer then is either to not use vbos with api level 8 or use level 9... i'm going with the second option for now Feb 17 16:14:42 kinda looks like a screwup though... :D Feb 17 16:15:18 "lalala, implement GLES2 api... aand release" "dude you forgot offset arguments there" "whoops" Feb 17 16:18:08 GLES2 on API level 8 is a mess in general - libgdx wraps some of the worst parts. Feb 17 16:18:17 You could just not support api8 Feb 17 16:19:38 SimonVT, yep, i'm just mucking about with it anyway... but i was just really confused since it seems like a rather massive blunder to "forget" those functions Feb 17 16:19:43 so i figured i might be missing something Feb 17 16:22:19 hi guys Feb 17 16:28:08 basic programming question, i have a few adapters, that fill up 2,3,4 textviews within a list view. if i have 2 different adapters for 2 different object types, should i combine them, or keep one adapter for each object? Feb 17 16:34:33 libgdx <3 Feb 17 16:35:06 tm604: Any benefits if I'd ditch API9 when using libgdx? Feb 17 16:36:13 * japro doesn't like wrapping gl Feb 17 16:37:14 Hey Feb 17 16:37:29 Which view should I use when I just need it to use its background property? Feb 17 16:37:54 in my case, I have a TextView that I animate, however, I only want the text to animate, not it's background. Feb 17 16:38:11 kakazza: do you mean using libgdx if you're only supporting API10+? still worth it, I think - depends on what you're trying to do. Feb 17 16:38:11 So I thought I could wrap this TV into some other Layout, which then receives the TV's background Feb 17 16:38:19 what do you think? Feb 17 16:42:15 is there a more elegant way of writing this? http://ideone.com/gZOWKN Feb 17 16:45:04 Good morning! just got the hand of sharedpreferences! Feb 17 16:45:08 *hang Feb 17 17:06:39 I've been trying to create fragments, just don't understand it Feb 17 17:06:59 like I get the concept, just dunno how to implement it via code Feb 17 17:07:16 examples I look at create the tabs manually and use fragments that way Feb 17 17:07:35 but in the app I'm working on, I used the actionbar navigation (tab+swipe) Feb 17 17:07:59 and the dummy code they have there..I'm confused... Feb 17 17:09:24 Mornin everyone! Normally I stay within the cordova areas but I have a couple webview specific questions that native developers might know more about! Feb 17 17:10:10 Can one 'embed' a file reference link into the web view? I know Awesomium does something similar, and wasn't sure if it could be done with the android webview Feb 17 17:11:14 and/or if one loads a html page outside of the apk's assets folder via a window location url change, if file:///android_asset/ is still applicable? Feb 17 17:18:44 what's wrong with my regex? I want to remove anything that's not a-z but spaces are still in the result: String removeSpecialChars = original.replace("[^a-z]", ""); Feb 17 17:19:51 replaceAll? Feb 17 17:22:04 Rob|boR: basically you use the DummySectionFragment class to create your fragments, just as you would in any other fragment you create. Feb 17 17:22:08 doh.. thanks Feb 17 17:26:15 Might it be that LL doesn't render round-rect backgrounds? Feb 17 17:34:11 http://stackoverflow.com/questions/14923919/dont-weighted-linearlayouts-support-round-rect-backgrounds Feb 17 17:36:07 ok thank you Eppo Feb 17 17:36:29 I'm basically commenting out the textview Feb 17 17:36:47 gotta see if I can figure this out :/ Feb 17 17:37:11 Eppo, are you there? Feb 17 17:37:38 or anyone? Feb 17 17:49:21 could someone please help me with TranslateAnimation ive recreated the problem im having in a new Application and uploaded code to github https://github.com/nucwin/android-animation-test Feb 17 17:49:33 I'm trying to post a string and an array to a webserver from android...Up until now Ive been storing my strings I send with a NameValuePair list where I would add to the array, BasicNameValuePair's with a key and the required String. My question is Feb 17 17:49:49 How can I make a post request to send the webserver an array? Feb 17 17:51:30 MajorZero: depends on what format the webserver is expecting - json, xml, form-encoded post data...? Feb 17 17:52:00 the webserver is expecting JSON data Feb 17 17:52:13 (thank you for the response) Feb 17 17:52:16 try JSONArray then? Feb 17 17:52:33 How the heck can i test if SharedPrefrences works? Feb 17 17:52:58 I commit my data Feb 17 17:52:58 agy2154, retrieve the sharedpreference and just do a system.out.print of the sharedpreference value Feb 17 17:52:59 and everything Feb 17 17:53:07 MajorZero: Thanks Feb 17 17:53:48 and tm604, how would I post the JSON array? Normally i make requests to my server using jsonParser.makeHttpRequest(url,"POST",param) where param is a list Feb 17 17:54:03 canadiancow: I remember your post here http://android.skennedy.ca/?p=8 . Do you have a tip to set the view background? Inside android:background doesn't work. Feb 17 17:56:37 MajorZero: with JSONArray it'd be something like new JSONArray(String[] { "one", "two" }).toString(); for the POST body. Feb 17 17:56:42 not sure what jsonParser.makeHttpRequest is from but if that already handles the JSON conversion or can already take a collection then it sounds like you should be able to pass the array as-is. Feb 17 18:03:49 tm604 thank you very much, im going to try that Feb 17 18:05:09 Did someone say it is actually possible to have pure native code on android... Or does one always need that java stub to interact with the system Feb 17 18:05:23 Would a system out print be shown in the console? Feb 17 18:05:49 yes Feb 17 18:05:50 I presume the android os itself has native code under the hood Feb 17 18:05:54 ceti331_: you almost always need a java stub Feb 17 18:06:11 ceti331_: think of android as 'boot to wine' Feb 17 18:06:26 you can do almost nothing from the command line. Feb 17 18:06:31 mmm? You can hack c++ into native Feb 17 18:06:55 for example, if you configure a network interface, android may not use it, as it doesn't realise it's up. Feb 17 18:07:12 or android may immediately unconfigure it. Feb 17 18:07:31 I guess i need to read some overviews of how it all works.. Feb 17 18:07:43 ceti331_: why do you want pure C++ Feb 17 18:07:45 ? Feb 17 18:08:03 it won't make a lot of sense to use C++ Feb 17 18:08:24 basically, all programs that need to interact in any way normally with the user or system must have a java stub Feb 17 18:09:16 Crossplatform sourcebase Feb 17 18:09:32 ceti331_: that makes a lot of sense Feb 17 18:09:41 ceti331_: but not for UI stuff Feb 17 18:09:57 yes i realise cpp can be very clunky for ui Feb 17 18:10:09 ceti331_: it won't work on android Feb 17 18:10:24 ceti331_: for non ui stuff - e.g. a library with C++ code it makes sense Feb 17 18:10:29 but you have to add a java stub Feb 17 18:10:40 thats what ive done so far Feb 17 18:10:55 its the same story on ios, but with an objC stub Feb 17 18:11:10 well be happy that you can share code! Feb 17 18:11:43 its funny how it seems easier to make crossplatform 3d engine than ui Feb 17 18:11:59 ceti331_: makes sense Feb 17 18:12:03 is is good way to have global class to make Location Manager accessible to all activity? Feb 17 18:12:14 ceti331_: since OpenGL is standard, whilst UIs are not so much. Feb 17 18:12:21 i guess here the platform IS the ui Feb 17 18:12:48 ceti331_: the UI has a lot of if/else e.g. cell phone UI vs. tablet UI Feb 17 18:12:51 Wheras in the distant past, crossplatform graphics meant radically different hardware Feb 17 18:13:11 in my world the behaviour is very different (only talking about android) Feb 17 18:13:26 Yeah i am realizing even tablet to phone is a ui change, let alone tablet to desktop or game console Feb 17 18:13:35 i think there is no way to make live easier in coding that in C++ Feb 17 18:14:15 yes most ui coding in c++ involves something else eg lua, qml etc Feb 17 18:14:48 well that's astronaut design ;) Feb 17 18:14:49 java itself repels me alot... But some of the other jvm languages apeal to me Feb 17 18:15:59 The bit thats nicer in pure cpp is a crossplatform build, eg ifdefs , constsent logic for parsing the ui events Feb 17 18:16:25 but its tolerable at the minute for sure Feb 17 18:16:26 what do you get when you do this? Feb 17 18:17:34 supporting more devices seems worthwhile, i like the variety in android hardware Feb 17 18:17:42 uh, so in a GL app after an onSurfaceCreated i get a new gl context and all the old values are invalid right? but if something triggers that surface creation (such as a orientation change) is there also a "event" before? Feb 17 18:17:52 so i can clean up my opengl objects? Feb 17 18:18:24 ceti331_: when using c++ and ifdefs? Feb 17 18:18:28 ceti331_: sry i don't get it Feb 17 18:18:57 Well evrything in one place... But if its a different language for the stub... Its just a bit messier Feb 17 18:19:19 ceti331_: c++ and stubs? Feb 17 18:19:32 ceti331_: so what the "gain"? Feb 17 18:19:42 well as it isnt an option its pointless me thinking about it Feb 17 18:19:44 shouldn't there be a "onSurfaceDestroyed" or so? Feb 17 18:20:10 using 1language instead of 3 would be nicer :) Feb 17 18:20:29 ceti331_: i am 100% sure that i will rewrite my app in C# or in objC if there is a demand Feb 17 18:20:49 ceti331_: no reuse of any code (maybe the database script will be shared) Feb 17 18:21:25 ceti331_: the UI concepts of win8, iOS and android are so different - i will make my brain hurt if a try to combine them Feb 17 18:22:19 And all on the same underling hardware heh. Feb 17 18:22:33 Underlying^ Feb 17 18:22:55 you don't have access to the "hardware" on win8 phone and on iOS Feb 17 18:23:06 they should make phones dual boot Feb 17 18:23:18 so what was your problem? Feb 17 18:23:59 well. It works. It is just inelegant Feb 17 18:24:31 so am i supposed to simply leak opengl objects if the surface gets recreated? Feb 17 18:25:21 Japro, am i reading this right , you really do need to reinitialize everything on an orientation change? Feb 17 18:25:33 it seems so Feb 17 18:25:43 I thought that looked bizarre in the sample code Feb 17 18:25:48 the sample in the sdk reloads the texture Feb 17 18:25:58 That is insane Feb 17 18:26:04 and i just had my program crash because shader objects were invalidated Feb 17 18:26:36 and i cache shader objects so i don't recompile shared vertex shaders or so Feb 17 18:27:04 youd have to reload textures aswell? Feb 17 18:27:10 and now i'm unsure where/when to "uncache" then since i'm just presented with a new context without a chance to clean up the old one Feb 17 18:27:33 Unless you use some messy static or globaal flag Feb 17 18:27:51 well even then... i don't know about the change before it happens Feb 17 18:28:08 so by the time i see the new one i can't even delete the objects since they are not in the current context? Feb 17 18:28:22 does it destroy its conext and associated objects itself Feb 17 18:28:46 i'm really new to this, so i might miss something obvious Feb 17 18:28:46 Or maybe its uber retarded and has different context for each orientation persisting Feb 17 18:29:00 i really hope i am reading this wrong Feb 17 18:29:12 I assumed the ndk sample was simply bugged Feb 17 18:29:25 its actually supposed to do that... Wow Feb 17 18:29:39 so i guess ressources are deleted implicitly Feb 17 18:29:56 Will isChecked() not work if my checkbox is set to final? Feb 17 18:29:57 when the old context is destroyed, i hope Feb 17 18:30:15 says so explicitly in the docu of onSurfaceCreated Feb 17 18:30:19 Because i have been working on my sharedprefrence for hours now and can't get it to work Feb 17 18:31:48 ceti331_, i guess you probably want to set a preferred orientation for ogl stuff Feb 17 18:32:21 I already made it change camera Feb 17 18:32:45 still, i would have expected a orientation change to result in "onSurfaceChanged" Feb 17 18:32:47 but yeah that makes more sense Feb 17 18:33:09 it should just be like a window resize Feb 17 18:33:29 * agy2154 is going to eat lunch brb Feb 17 18:33:56 I get an error. Unfortunately, the process com.android.phone has stopped when I hit Run in eclipse Feb 17 18:34:26 especially recompiling all the shaders is brutal Feb 17 18:36:01 Yes i think i would rather lock landscape mode Feb 17 19:03:15 hi, anyone know how to disable animations on the 4.2 emulator to make it faster? Feb 17 19:05:35 settings Feb 17 19:06:54 Hey guys can anyone look over my code to see why my sharedpreferences arn't working? Feb 17 19:08:34 agy2154: Why don't you just paste a link to the code and someone will propably look at it... Can't expect that we will be able to solve your problem though Feb 17 19:08:49 Hi, maybe there's very good libs for downloading and caching images for imageview elements? Feb 17 19:09:21 http://pastebin.com/LRsgtFCF Feb 17 19:09:25 Thanks Feb 17 19:11:08 agy2154: just a comment.. I think sharedpreferences is async writing... Feb 17 19:11:22 On a headless machine, can I install android SDK WITHOUT installing every single sdk level? Feb 17 19:11:27 yes Feb 17 19:11:33 just noticed that update installed everything Feb 17 19:11:40 android update sdk --no-ui --filter number Feb 17 19:11:59 filter=exclude? or include? Feb 17 19:12:01 Savuud: So its happening after the new activity is being launched? Feb 17 19:12:07 filter is include Feb 17 19:12:31 agy2154: It's possible yes Feb 17 19:12:32 any of you done any deep fuckery with the apk installation process? Feb 17 19:13:04 agy2154: Perhaps you should look at using another storage method? Feb 17 19:13:04 JakeWharton: Is there any recommendation for the build target of ABS? Feb 17 19:13:20 kakazza: you have to build with 4.0 or newer Feb 17 19:13:30 As in, should I expect things to fail/go haywire if I up it to Level 17? Feb 17 19:13:30 Savuud: Yes I will look into other meathods. Feb 17 19:13:42 agy2154: Read here: http://developer.android.com/reference/android/content/SharedPreferences.Editor.html#commit() Feb 17 19:13:51 Yeah, I know about the minimum build target, but not if there is a recommended maximum. Feb 17 19:13:52 kakazza: no, anything above 4.0 will work Feb 17 19:14:01 Thanks. Feb 17 19:14:11 Savuud: Can't I do Nameofaplicationpackage.cb.ischecked() from another class? Feb 17 19:14:43 agy2154: I don't follow you Feb 17 19:15:03 agy2154: In theory yes.. the method needs to be static though Feb 17 19:15:37 any good alternatives to http://androidimageloader.com/ ? Feb 17 19:15:54 Savuud: Like in java, can't you do like classname.variable.ischecked() Feb 17 19:15:54 agy2154: My last answer is based on basic Java interpretation of your question.... Feb 17 19:16:04 yeah Feb 17 19:16:19 In general, do you guys always build against the latest sdk? From SimonVT's blog post I gathered that all it does is offering more/less APIs depending on what you build against. Feb 17 19:16:24 nkts: they all aren't very good Feb 17 19:16:31 Savuud: if the checkbox is static itself.... can the state be changed? Feb 17 19:16:38 For example, I currently build against API 17, even though I don't use any new APIs. Feb 17 19:16:42 Like checked or not? Feb 17 19:16:47 agy2154: no, you cannot do what you're asking Feb 17 19:17:06 JakeWharton, do you suggest to code everything by my self? Feb 17 19:17:12 agy2154: I think so.. however here I am on a very shaky ground.. since I'm a bit of a learner when it comes to Android Feb 17 19:17:40 JakeWharton: What can I use to carry the boolean state of a check box from one activity to another? Feb 17 19:17:45 nkts: no, just pick whichever you think is least-bad Feb 17 19:17:56 agy2154: pass it through the Intent as an extra Feb 17 19:18:20 JakeWharton: makes sense Feb 17 19:18:37 I'll try that... thanks for your help JakeWharton and Savuud ... I have been working on this all day Feb 17 19:18:54 agy2154: hehe... my pleasure :) Feb 17 19:19:29 JakeWharton: What do they lack to make them good? I never looked at any of those, but for future reference, if one wanted to contribute to one of them. Feb 17 19:19:29 thanks, JakeWharton Feb 17 19:20:00 kakazza: i've tried about 10 and they all lack something different, at least for the things i was using them for Feb 17 19:20:10 heh Feb 17 19:20:27 I think for one of my future projects I'll need one of those. Just for local instead of remote images. Feb 17 19:24:48 Just for my own knowledge... in what sinereo would you actually use a sharedpreference ? Feb 17 19:24:49 ah ... class loaders ... just a little light reading :P Feb 17 19:28:22 scenario* Feb 17 19:29:39 agy2154: The most basic use case would probably be settings of your app that persist across user sessions. Feb 17 19:30:05 kakazza: thanks again Feb 17 19:30:10 deed> Could someone, please, recommend me programming related books? Feb 17 19:30:23 -deed> Feb 17 19:31:56 Depends, any specific interests? Feb 17 19:32:15 Like, getting better at Java, algorithms, learning new languages...? Feb 17 19:34:01 Clean Code is one. Feb 17 19:34:12 The Da Vinci Code Feb 17 19:34:13 well java - game development or something related Feb 17 19:34:15 Oh, wait Feb 17 19:34:35 Algorithms by Robert Sedgewick is another Feb 17 19:35:00 ok I will check those thanks. Feb 17 19:35:21 The Pragmatic Programmer Feb 17 19:35:31 Books http://stackoverflow.com/a/1713 Feb 17 19:35:35 IndiumIndeed for game development try www.jmonkeyengine.com Feb 17 19:35:41 ^ that. Feb 17 19:35:41 pragmatic programmer I started recently, but did not get to point yet Feb 17 19:35:43 oops Feb 17 19:35:43 IndiumIndeed: It would help us if we knew what your goal is :) Feb 17 19:35:50 ^ that was in regards to the stackoverflow link Feb 17 19:36:03 well my goal to be better programmer Feb 17 19:36:14 IndiumIndeed: so you are a developer now? Feb 17 19:36:19 or graphic artist Feb 17 19:36:59 I am a developer, I make games and live wallpapers. I think I have quite good skill set already, so I am interested in more advanced stuff Feb 17 19:37:53 about that stackoverflow list: it is a quite long one, so bit difficult to decide where to start. I saw that list earlier though Feb 17 19:38:43 IndiumIndeed: Ok, then if you are already developing, the next step might be to look at how you work and how the code is written. Pragmatic Programmer or Clean Code could then be good alternatives Feb 17 19:39:14 thanks Feb 17 19:39:40 s/or/and\/or/gi Feb 17 19:39:49 i have an equation, x=[1-e^(-0.04 x T)]/4.15 how would i perform this in java? Feb 17 19:39:49 :p Feb 17 19:40:51 Eppo: Did you just use "x" as a variable and as the multiply operator? Feb 17 19:41:08 kakazza: was just about to ask the same thing Feb 17 19:41:13 x is a multiplier, the first x= is a variable Feb 17 19:41:18 sorry, should have used * Feb 17 19:42:05 Eppo: I guess also that ^ indicates "square"? Feb 17 19:42:20 pow(), I think Feb 17 19:42:25 ok Feb 17 19:44:30 Eppo: Is this what you're looking for? http://ideone.com/bYaCSf Feb 17 19:45:13 (don't blame me for the indention, it was different in the editor, I swear!) Feb 17 19:45:42 lol, yes, that is exactly what i'm looking for. i really appreciate your help. Feb 17 19:46:03 No problem. I didn't know what T was, so I just picked anything. Feb 17 19:46:41 You might find more useful methods here http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html Feb 17 19:46:54 kakazza: nice one! Feb 17 19:47:05 T is time in minutes , so 75 is fine. Feb 17 19:59:49 hey guys Feb 17 19:59:54 I have a question >_> Feb 17 20:00:02 I managed to create a fragment? O_o Feb 17 20:00:32 like I was able to assign different layout files to each tab in the tab+swipe Feb 17 20:01:02 but now, I need functionality for the layout files, so I need to create java files for each layout file right? Feb 17 20:01:47 Rob|boR: Yep, and then you need to inflate the xml view in the onCreateView() Feb 17 20:02:22 hmm Feb 17 20:02:37 is that how I link the java file to the appropriate layout file? Feb 17 20:05:40 you will need to @Override the OnCreateView() in the DummySectionFragment class. Feb 17 20:06:50 Rob|boR: then return your inflated layout: return inflater.inflate(R.layout.myLayout, container, false); Feb 17 20:07:08 ok let me try to do that Feb 17 20:10:32 Eppo, Feb 17 20:10:43 in the DummySectionFragment I have nothing Feb 17 20:11:00 in the public View onCreateView I have Feb 17 20:11:26 switches that return inflater.inflate(R.layout.name_of_layout, container, false); Feb 17 20:11:47 so I have switch, if tab 0, then shows this layout, if tab 1, shows this other layout etc Feb 17 20:17:42 Rob|boR: your using swipe? Feb 17 20:17:47 yup Feb 17 20:18:08 I did that in the onCreateView() Feb 17 20:18:29 yeah, that's where I have my switch Feb 17 20:18:33 in onCreateView Feb 17 20:24:44 hi all. I have strong java knowledge, and some basics about Android development. I'm looking for an up to date and easy to understand book. Any recommendations please? thank you in advance Feb 17 20:26:02 aksn: I would personally never learn from a book Feb 17 20:26:28 aksn: what do you mean you have Strong java knowlege Feb 17 20:26:59 agy2154, I mean I don't need any OOP nor Java introduction in the book Feb 17 20:27:22 aksn: cannot recommend any dev book right now. Have looked at several, and they all seemed to be already outdated (or not very good in general). But I can recommend http://d.android.com/training for basic trainings Feb 17 20:27:35 and reading the API Guides after the tranings for a depper understanding of the API Feb 17 20:27:54 aksn: I mean thats not going to be easy to find. and If you truly have "strong java knowlege" all you need is android's java doc Feb 17 20:28:10 + this irc Feb 17 20:28:13 aksn if it must be a book, I hear this one is ok-ish though I haven't read it myself: http://www.amazon.com/Professional-Android-4-Application-Development/dp/1118102274/ref=la_B002BMF4OC_1_1?ie=UTF8&qid=1361132810&sr=1-1 ... by Reto "I'll get back to you on that, really, I will" Meier :) Feb 17 20:28:14 lol Feb 17 20:28:26 just print out the developer documentation Feb 17 20:28:41 but as the others say, you're probably better off just by reading the docs, asking around, and looking at samples Feb 17 20:30:05 thank you I will take a look at it Feb 17 20:30:27 aksn: have you gave the training in the official doc already a look? and if so, what didn't satisfy you? Feb 17 20:30:33 I usually don't read books, but this time I want it for my spare and offline time :-) Feb 17 20:30:49 yeah offline sucks ;) Feb 17 20:31:03 If I use ActionBarSherlock 4.2 do I have the Support r11 library? Feb 17 20:31:07 JakeWharton: Feb 17 20:31:45 for abs you need support v11; if you only develop for 4.x, you no need to use abs Feb 17 20:32:59 aksn: i used this: http://www.kobobooks.com/ebook/Title/book-gEhcCYAzvU6_VyjOo8QfSA/page1.html?utm_source=productlistings&utm_medium=g&utm_campaign=title-Professional+Android+4+Application+Development&gclid=CNf5n5OYvrUCFY6e4AodehAAyg Feb 17 20:33:45 Support v4 r11 Feb 17 20:34:41 No, abs includes r7. You'll have to update it yourself Feb 17 20:38:24 * skwex hey Feb 17 20:51:26 thank you Eppo. It's the same Chainfire recommended. I think I'll give it a try Feb 17 20:54:30 hello all. can anyone tell me how to open a ringtone picker with "None" selected? i can pop a ringtone picker with "default ringtone" or any other alert name selected, but can't figure out how to have it open with "None" selected Feb 17 20:57:59 oh, i figured it out. you just don't pass RingtoneManager.EXTRA_RINGTONE_EXISTING_URI to the intent Feb 17 21:03:38 Is there any way to listener for an change in the current activity stack? (Internal class or non internal) Feb 17 21:03:58 The global activity stack* Feb 17 21:05:10 JakeWharton: I got the shared prefreneces working perfectly.... I didn't give up.... Feb 17 21:32:47 hey guys, can you tell me if there's a way to broadcast outside an activity? without access to the context Feb 17 21:33:12 or at least a way to start a service automatically Feb 17 21:35:19 hi.. how do I use ant to build with a different file inside libs/ depending if the build is debug or release? Feb 17 21:40:34 I want to create an application which "locks" the user using only my application, or applications which I allow the user to run. Like the browser.. An application which does this is Lockiosk.. Feb 17 21:41:32 What would be the best way to do this? Should I create a service which runs in the background, and monitors the started applications, and if it is not in my whitelist, kill it.. Feb 17 21:41:33 ? Feb 17 21:42:30 tofra: is this a device you open? Feb 17 21:42:31 own Feb 17 21:43:19 yes.. Why? Feb 17 21:43:34 I'd expect it needs to be rooted to do that Feb 17 21:43:57 well, Lockiosk does it without being rooted.. Feb 17 21:44:45 The idea is that I want to create something, for example for my kids, that they can run applications which I select they can run. Any attempt to run others should be killed.. Feb 17 21:45:27 tofra: android has user accounts nowadays Feb 17 21:45:38 i made a separate one for my kid Feb 17 21:46:05 True, but they can still go to the play store, and download anything.. (as an example) Feb 17 21:46:26 Or go to settings.. Feb 17 21:46:36 true, I'd focus on trying to limit use of the play store Feb 17 21:47:29 there's a pin code setting in the play store settings Feb 17 21:47:52 and a content filtering setting that lets you disable display of all apps Feb 17 21:48:26 Then I need to "build" something on every exception they should not be able to do. The best way is to create a whitelist, which contains apps which are allowed to run. Exactly what Lockiosk.. Feb 17 21:48:40 And if they can do it, I should be able to do it also :-) Feb 17 21:48:49 well, you'd blacklist everything Feb 17 21:48:53 just disable install of any app Feb 17 21:50:05 if you root the phone you could delete the play store apk from the kid's account :) Feb 17 21:50:11 phone/tablet Feb 17 21:50:53 I understand your point, but still I think my point stays, I need to code (and know upfront) all things they are not allowed to do.. Feb 17 21:51:23 Maybe I need to decomple Lockiosk, and see if I can find some useful hints.. Feb 17 21:56:25 Is there a way to get a cursor or Array of each string in a particular column in SQLite? Feb 17 21:56:59 SELECT column FROM table; Feb 17 21:57:12 or should I just get a cursor of all the strings in that column and step through them to pull out each individual string Feb 17 22:05:55 hello, am looking for Voice Recognition API for android (offline not online), do anyone know ? Feb 17 22:06:55 Hey does anyone know a way to make a reference to an object in an array directly? I calculate the id and then iterate through an array until the ids match and then return it. I was wondering if there's a more effective way Feb 17 22:07:25 use a Map, e.g. HashMap Feb 17 22:07:39 MoshDev: I was actually looking into this Idk if it would work though Feb 17 22:07:40 http://code.google.com/p/wami/ Feb 17 22:07:54 ohh but it uses a server Feb 17 22:07:55 my bad Feb 17 22:07:56 Hashmap eh Feb 17 22:08:21 Sounds like what I need Feb 17 22:08:33 Is there a max limit for the oncreate.... Feb 17 22:09:22 @agy2154 thanks, yeah am looking for offline lib Feb 17 22:13:10 how i can reply to specific user here? :D Feb 17 22:14:50 MoshDev: First couple of letters to their name.. type them... and then tap tab Feb 17 22:15:06 agy2154: oh thanks :) Feb 17 22:15:14 MoshDev: Your welcome Feb 17 22:16:21 Has ANYONE run into this? has no certificates at entry res/color/abs__primary_text_disable_only_holo_dark.xml; ignoring! Feb 17 22:16:27 ActionbarSherlock seems to be doing this Feb 17 22:16:39 There is 2 points on their mailing list, no answers at all Feb 17 22:18:19 It prevents from installing the signed app COMPLETELY Feb 17 22:18:23 absolutely no way of installing it Feb 17 22:19:39 agy2154: Max limit of what? Feb 17 22:20:25 kakazza: Like I quickly spotted once in my log cat that my OnCreate method can be handeling to many things. I think it might have just been a glitch in the emulator? Feb 17 22:21:19 Can you be more specific? Exactly what did you observe? Feb 17 22:25:43 kakazza: It told me that there may be to many things in my on create Feb 17 22:25:45 is that possilble? Feb 17 22:26:44 did it say you might be doing too much stuff and it was skipping frames? Feb 17 22:26:46 kakazza: I googled the problem online and they said it might have been a problem with the specific api level version of the emulator Feb 17 22:26:59 f2prateek: YES! Exatcly Feb 17 22:27:04 it skipped 61 frames Feb 17 22:27:04 or something Feb 17 22:27:46 it's not an onCreate thing, it means you were doing too much work on the main thread, Feb 17 22:27:54 hehe, good call Feb 17 22:28:36 the second part of the message Feb 17 22:29:58 f2prateek: I editied my code a bit and can't seem to get that error back does that mean im good? is there anyway I can avoid skipping frameS? Feb 17 22:30:11 Maybe making a thread to wait? Feb 17 22:31:40 it's not an error, just a warning. Basically it's warnign you of lag, so you should optimise your code, or move it to a background thread. Feb 17 22:32:10 considering how slow the emulator is though, you could get that message just from running the default framework onCreate() Feb 17 22:32:30 right, don't pay too much attention to it on the emulator Feb 17 22:33:57 argh, my Adapter.getView() is getting the wrong type of convertView Feb 17 22:34:25 I've spent an hour of debugging and still don't feel like I'm any closer to the cause Feb 17 22:34:56 thanks again guys... I always get so much support from you Feb 17 22:35:38 strike that, bindView() is getting the wrong type Feb 17 22:37:15 Yeah, I think getView() is guaranteed to get the correct type Feb 17 22:37:28 not according to the documentation Feb 17 22:37:40 but CursorAdapter.getView() sure treats it that way Feb 17 22:37:50 so not much I can do about it Feb 17 22:38:52 What the fuck Feb 17 22:39:06 time to butt the pillow Feb 17 22:39:08 Building the release jar and signing it with java6 installed instead of java7 worked Feb 17 22:40:10 flodin: You have multiple types I guess. Did you use getItemViewType and getViewTypeCount> Feb 17 22:40:18 yep Feb 17 22:40:50 i've been trying to debug whether there's some inconsistency between what getItemViewType returns and what bindView() gets Feb 17 22:40:53 and why that is Feb 17 22:41:07 but there are like 50 calls being made Feb 17 22:41:15 for varying positions Feb 17 22:42:23 Does VSync work on generic tablets? Feb 17 22:45:37 agy2154: VSync in general works, but not the advanced fun stuff of "project butter" (which just tries to keep everything in lockstep with VSync, afaik) Feb 17 22:50:18 p_l: do you use Go ? Feb 17 22:51:03 p_l: Is there any instance where the device can't identify the screen's framrate? Feb 17 22:58:45 agy2154: AFAIK no.... well, not on anything that's actually advanced beyond "here, have this 1:1 bitmap mapping each pixel on screen" Feb 17 22:59:00 g00s: no Feb 17 22:59:25 g00s: got pretty much turned off when I heard about the problems they have due to untagged pointers Feb 17 23:09:49 japro ,ping Feb 17 23:09:51 Re android gl context on orientation change, Feb 17 23:10:55 I checked my code and i did modify the sample GL2JNI to only recreate resources on the first call, using a local static flag (if not init) { init shaders tc} Feb 17 23:11:37 it quite happily swaps orientation , calling glViewport with the new dimensions Feb 17 23:18:40 can android handle like 30 back to back if statements? Feb 17 23:19:10 why wouldn't it? Feb 17 23:19:31 I wonder what you're doing that you'd end up with such a thing, though. Feb 17 23:19:35 Trinity: I was wonderingi if it can compute that many... Im worried that my code isn't efficent and it would crash Feb 17 23:19:41 kakazza: haha Feb 17 23:19:55 hey guys i'm trying to roota nexus 7 but everytime when i do a adb list i see my device as "offline" Feb 17 23:19:57 while it is online Feb 17 23:20:10 Icekiller: #android-root Feb 17 23:20:12 Icekiller: #android-root Feb 17 23:20:17 http://pastebin.com/sikLPmJU Feb 17 23:20:21 Icekiller: #xda-devs Feb 17 23:20:31 wanted to be different :) Feb 17 23:20:33 But it might be that you don't have the latest SDK and are hindered by Secure ADB Feb 17 23:20:38 all that code is scaring me Feb 17 23:20:50 agy2154: it should :D Feb 17 23:21:04 timroes: thanks for reassuring me Feb 17 23:21:07 you know what a fall through case is? :) Feb 17 23:21:07 thanks :P Feb 17 23:21:18 kakazza i downloaded the SDK today Feb 17 23:21:23 seeing i reinstalled and i'm deving an app xD Feb 17 23:21:40 switch(arg0.getId()) { Feb 17 23:21:40 case R.id.dof: Feb 17 23:21:40 case R.id.iyv: Feb 17 23:21:40 ... Feb 17 23:21:40 check(); break; Feb 17 23:21:40 } Feb 17 23:22:33 ohh Feb 17 23:22:38 ill fix that Feb 17 23:22:40 thanks timroes Feb 17 23:23:29 timroes: wait what can i do as an alternative? Feb 17 23:23:58 if(arg0.getId() == R.id.dof || arg-0.getId() == R.id.iyv ... ) { check() } Feb 17 23:24:16 timroes: thanks i feel stupid Feb 17 23:24:21 especially if you don't have any other case you want to check that might be cleaner Feb 17 23:24:28 Does anyone know if there is an easy way to make a glsurfaceview cate itself at some fraction of he native pixel resolution eg half each way..... I am looking at its context chooser interface and that seems to deal with bit depth options Feb 17 23:24:37 timroes: yeah thanks again... Im slowly forgetting my operators Feb 17 23:24:40 also you could put all ids in an array/list and check if the value is in there, but that might not be the best solution in java :) Feb 17 23:24:45 Create itself not cate itself^ Feb 17 23:24:50 but could do that in python :) Feb 17 23:25:10 agy2154, you might want to use some naming conventions, might be a hassle to maintain in the long run Feb 17 23:25:37 hi Feb 17 23:26:01 i've got a backstack-pop question Feb 17 23:26:27 because i currently to find out why, at a certain point in my app the backstack is being popped Feb 17 23:26:33 Trinity: yeah im going to recase and rename them if thats what you mean Feb 17 23:26:39 i have absolutely no idea why Feb 17 23:26:43 Once again thanks for your support! Feb 17 23:28:49 my basic question is, what are the usual reasons why the framework (in my case comapt lib 4 v11) does pop the backstack on it's own Feb 17 23:29:31 meaning without me calling popBackstack(Immediate) Feb 17 23:30:39 is there a speedpenalty for using "for (Object o : listObjects)" versus "for (int i ... )" and list.get(i) ? Feb 17 23:32:23 osxorgate: yeah a negative one :) Feb 17 23:32:45 ceti331_, hmm, i guess i'll try again but i was sure it at least called createSurface again (according to the log message i put there) and proceeded to choke on the cached shaders Feb 17 23:33:03 The penalty should be minimal at best. Feb 17 23:33:05 foreach can be faster, since .get(i) (depending on the underlaying datastructure) might have O(n) or even higher complexety Feb 17 23:33:24 since an iterator call next (what foreach basically does) should be in O(1) Feb 17 23:33:38 so I wouldn't count that a "minimal penalty" Feb 17 23:33:50 anyway what is the preferred method for creating game loops... with the renderer in its own thread an all Feb 17 23:34:08 timroes: name a data structure where that would apply. Feb 17 23:34:18 linkedlist? Feb 17 23:34:21 separate thread with a while(running) loop that syncs with the render thread? Feb 17 23:35:03 actually haven't looked in the implementation of linked list in java, but if it works like I would expect a Linked List to work, it would have O(n) for a get(i) Feb 17 23:35:09 For 99% of the cases, you can use either one, because real life data is usually very small. But of course I'd prefer foreach, because of the nicer syntax. Feb 17 23:35:34 nevermind i've just found my bug... Feb 17 23:38:03 But yeah, LinkedList would fit the bill of bad use cases of the normal for loop Feb 17 23:38:48 just searched something, and as it seem (though it wasn't the question :D) foreach compared to using iterators manually result in the same bytecode Feb 17 23:38:57 i'm iterating over arraylists Feb 17 23:39:04 http://stackoverflow.com/a/2113226/1044403 Feb 17 23:39:14 Yeah, I think if it's a simple for loop, the javac will optimize Feb 17 23:39:48 i ran a trace and i see iterator.hasNext() is 7% Feb 17 23:39:55 osxorgate: arraylist should have O(1) also for get, but since you might want to change it some time in the future, and I would bet a lot you won't remember to change the for loop that time too :) I would recommend just using foreach Feb 17 23:40:03 and as kakazza already mentioned, it just is nicer syntax :) Feb 17 23:40:53 And no off-by-one Feb 17 23:40:57 and listiterator.next() is 13% Feb 17 23:41:13 then again i am doing a lot of looping Feb 17 23:41:21 osxorgate: Just go for the for-each loop. Feb 17 23:41:54 Maybe you can reduce the number of loops or use "continue" more often rather than optimizing the way of looping. Feb 17 23:43:23 Is there an actual performance issue? Because people tend to optimize prematurely. Feb 17 23:44:24 well i traced the loops and i see the iterator taking up 20% of the time Feb 17 23:44:40 what else is done in the loops? Feb 17 23:45:09 i am trying to generate a puzzle with words stashed in a grid of letters Feb 17 23:45:21 Yeah, it's usually a safe bet that the actual work in the loop is taking longer than iterator vs for-each (which, as shown by timroes results in the same bytecode, at least on the desktop) Feb 17 23:45:24 and i'm bruteforcing all possibilities Feb 17 23:46:26 so what you actually do inside your loop might not be very time intensive? Feb 17 23:46:36 And how long does it take in numbers? Feb 17 23:47:00 As in, is there a noticable lag in the UI or waiting time? Feb 17 23:47:42 what i want is to run for n seconds and use the most optimal solution, so i want 1 iteration as fast as possible Feb 17 23:49:36 Makes sense Feb 17 23:50:19 1/3 of the time is spent in 'can i place a word at this position and direction' Feb 18 00:40:03 maybe i should be using NativeActivity instead of this java stub hacked out of GL2JNI sample... Feb 18 00:40:42 but i fear what i read that there are many things you can only access from java Feb 18 00:42:02 the native activity sample seems to give one a real c mainloop with events processing etc Feb 18 01:22:15 Um, so if SimpleCursorAdapter takes care of paging and all that, I'm wondering how I could use it to implement a collapsable listview, where similar rows are condensed into one parent. Feb 18 01:22:32 it's somewhat obvious to me how I could do a collapsable one with a hashmap and an arraylist, but not with a simplecursoradatper, and a cursor. Feb 18 01:23:17 tdignan: there's a simple cursor tree adapter Feb 18 01:23:30 oh, sweet nectar. Feb 18 01:23:36 sounds like what I need. thanks novie. Feb 18 01:24:40 np Feb 18 01:47:27 Do developers routinely create android apps in c++ or is java more common? Feb 18 01:48:18 you can do both Feb 18 01:48:42 spizzo: java's the most common, as the standard API is java Feb 18 01:50:04 Thank you Feb 18 01:51:25 spizzo: the Java APIs are what most apps are written in Feb 18 01:51:48 the native libraries do not contain all that the Java APIs do, so you won't be able to avoid Java. Feb 18 01:52:50 Ok. I've heard that java is not necessarily reliable for games, and yet there seem to be a high number of android games, presumably written in java. Is java not a bad language to develop games in? Feb 18 01:53:31 spizzo: some games use JNI, some don't, it depends on what kind of game and the performance you need, etc Feb 18 01:53:39 ^^ Feb 18 01:53:55 games are one of the use cases for native code. Feb 18 01:53:59 spizzo: note that if you do use JNI/native code (C++), you will have make sure you provide the native code for every processor Feb 18 01:54:03 zinx do you know a 3d game that is full blown java? Feb 18 01:54:07 for android Feb 18 01:54:17 linuxuz3r_: pretty sure a good number of them are Feb 18 01:54:41 All the games that use libgdx are written in "Java". As in, libgdx wraps everything for you. Feb 18 01:54:55 So you never really need to touch anything but Java. Feb 18 01:55:13 http://libgdx.badlogicgames.com/ Feb 18 01:55:45 pure Java is performant enough for 3D games for a large subset of games, too Feb 18 01:56:01 (using EGL via Java, of course) Feb 18 02:02:27 I have some basic android dev questions does anyone have a few minutes for PM so I don't have to flood the channel Feb 18 02:03:23 basic as in answered by reading? or basic as in "not quite understand" what you have read? Feb 18 02:03:29 best to ask in channel neways Feb 18 02:03:32 Sure Feb 18 02:03:38 No I think they are legit questions Feb 18 02:03:55 So I have worked pretty extensively with PHP, MySQL Feb 18 02:04:21 I do development for medical research projects that require data interfaces for data entry into MySQL Feb 18 02:05:30 This is a hobbie, so I obviously am not great at this, however I was able to get several Nexus 7s as a device for input of data in realtime in the hospital for these research projects Feb 18 02:05:42 I have looked at jQuery Mobile but I think native app development is the way to go Feb 18 02:06:34 However so is the correct direction to use the LAMP backend with the android sdk write a java app that does ajax calls to apache / php / mysql then return the data to android for java to deal with Feb 18 02:06:56 Or is there some better way to interact with the database Feb 18 02:06:59 more natively Feb 18 02:07:22 mfranz: they are more decision driven from connection types and speeds I think Feb 18 02:07:25 As the data contains patient information I don't want it stored on the device or at least as little as possible before being sent to the server Feb 18 02:08:49 Furthermore, I don't want to have to have people authenticate to the app / server, so I assume I need to use some sort of embedded api key for background authentication, the idea is NOT to deploy this in the android market but to install it on only the devices we use directly from USB to keep it a bit more secure Feb 18 02:09:19 These are not large data sets on the devices them selves most of it is actually just filling out some forms and pushing that form data to the MySQL database Feb 18 02:09:55 so I dont know connection wise that I need to find the most efficient, I would just want some direction on heading somewhere easy to use and quick to write Feb 18 02:10:37 The data would be in the 10K range per submit at 10 - 20 submits / hour, so we are not dealing with massive transfers Feb 18 02:12:12 I guess the other issue is that the MySQL server sits on a private network that can only be access via another linux server for additional security that sites on the public internet. THerefore in my current projects I have apache/php handling all the transactions to the backend, would there be another system better than this like native java ODBC connector or something Feb 18 02:12:57 i thought php is not a good program it is not good with security Feb 18 02:13:12 mfranz can you confirm this Feb 18 02:13:28 php programmers are most of the problem there Feb 18 02:13:51 php+mysql is not going to be incredibly efficient Feb 18 02:14:04 but it can handle the load you're expecting Feb 18 02:15:06 I think problems with its security are more the implementation rather than the code itself, I mean since it is all server side at least they can't look at your calls like they can if you are doing javascript or something Feb 18 02:15:28 obviously patching things that are discovered as well Feb 18 02:15:29 o_O Feb 18 02:16:04 zinx: where do you find most of the efficiency problem is with php+mysql? Feb 18 02:16:20 clever: php :/ Feb 18 02:16:24 but since I have never developed with android, but I have a Nexus S and a Nexus 7 myself, and obviously the vast majority of apps are database driven applications (imdb, urbanspoon, etc) Feb 18 02:16:30 what are these using for data connections? Feb 18 02:16:32 zinx: i mean cpu, network, memory Feb 18 02:16:34 just ODBC Feb 18 02:16:35 clever: mysql becomes a problem with large loads Feb 18 02:16:39 oh Feb 18 02:16:48 I think any relational database has issues scaling Feb 18 02:16:53 clever: php takes a ton of memory for things because of how it's designed Feb 18 02:17:07 We are talking here about research databases in the 100s - 1000s of MB not trillions of rows or anything Feb 18 02:17:22 zinx: most of my issues are with memory for mysql and sometimes cpu power Feb 18 02:17:28 clever: but it's not particularly fast at executing either, and generally the server has to do a lot of work loading all the code (there are ways to get around that, though) Feb 18 02:17:29 Well also I have the apache/php separate from the mysql server like 2 physically different computers Feb 18 02:17:51 zinx: yep, apc is already enabled, gave a noticable drop in cpu usgae Feb 18 02:17:54 right as the code is run line by line there are no precompile checks Feb 18 02:18:05 so yes I would think it would be much more inefficient than compiled code Feb 18 02:18:10 clever: yeah, if you're getting to mysql's limits you're fairly screwed, because it doesn't allow scaling out very well Feb 18 02:18:14 there are some php compilers but I have never done that Feb 18 02:18:23 right ... we are no where near the mysql limits Feb 18 02:18:30 Actually it is at Indiana University Feb 18 02:18:33 zinx: rewriting the querys and adding indexs help in some places Feb 18 02:18:39 our Research datacenter that runs the mysql Feb 18 02:18:41 has some nice machines Feb 18 02:18:47 clever: yeah, but this is before you hit the limits :) Feb 18 02:18:48 and 1.1 petabytes or available space Feb 18 02:19:02 the df -h is nice to see on those machines Feb 18 02:19:09 lol Feb 18 02:19:14 clever: there are some newer DB types (mostly non-SQL) that allow for better scaling Feb 18 02:19:42 zinx: innodb is showing ~123 reads/sec due to the buffer pool not being big enough Feb 18 02:19:52 but the disk can keep up on that box Feb 18 02:19:54 clever: lol that's terrible Feb 18 02:20:00 second one has plenty of ram, and sits at an avg of 4 reads/sec Feb 18 02:20:16 clever: if you have a big DB, you need a crapton of ram for decent performance, and/or very good indexes Feb 18 02:20:17 writes are more equal, 111writes/sec and 152writes/sec Feb 18 02:20:39 (optimally, you should be able to fit the entire DB in to ram) Feb 18 02:20:44 the ram is clearly giving a boost, lower reads/sec, but writes/sec is still oddly high Feb 18 02:20:54 the db is 40-50gig Feb 18 02:21:14 yeah, you're going to need indexes for that :/ Feb 18 02:21:24 oh wait, only 18gig on one system Feb 18 02:21:26 *looks* Feb 18 02:21:41 64GB is a common limit of a lot of systems right now Feb 18 02:21:45 for RAM Feb 18 02:22:09 i forget how big i made the second innodb disk, i did it as a dedicated partition Feb 18 02:22:12 screw the fs layer :P Feb 18 02:22:15 lol Feb 18 02:22:18 but now i cant df -h it Feb 18 02:24:15 ah heres the graph, i'm seeing 900 queryes being executed each second Feb 18 02:24:20 500 selects/sec Feb 18 02:24:55 yeah I think as long as everything is indexed Feb 18 02:25:02 you get pretty good performance Feb 18 02:25:07 or you could use like ram disk Feb 18 02:25:11 and 200 updates/sec Feb 18 02:26:03 on sqlite wut :p Feb 18 02:26:13 on mysql Feb 18 02:26:27 oh, mysqlol Feb 18 02:27:53 * clever tweaks graph Feb 18 02:29:09 there, 191 updates/sec average, 299/sec peak Feb 18 02:30:24 over a very short timeframe Feb 18 02:30:40 i'm seeing peaks of 683 updates/sec for a short point Feb 18 02:48:41 So Feb 18 02:48:42 then Feb 18 02:48:57 Is there some sort of native android way to interact with mysql Feb 18 02:49:08 nope! next? Feb 18 02:49:35 Leeds: we need a learning bot Feb 18 02:49:49 or an actual FAQ Feb 18 02:50:07 the bot could link to the faq :P Feb 18 02:50:12 but then a bot to tell everyone to go read it a few times a day Feb 18 02:50:20 :) Feb 18 02:50:40 but I could use a java based ODBC Feb 18 02:50:58 i guess my question is do people that do this think that's better Feb 18 02:51:01 than ajax Feb 18 02:51:26 given that ajax is a browser technology... what people do is put a (simple, or not) web service in front of their database Feb 18 02:51:29 that doesn't make much sense to me, mfranz what are you trying to do ? Feb 18 02:52:04 write a native android app for inserting research data into a mysql backend for later querying, mostly just form based data entry Feb 18 02:52:22 I have several nexus 7s and have looked at jQuery Mobile vs native app Feb 18 02:52:24 mfranz: what does the data look like ? Feb 18 02:52:26 I think native app might be better Feb 18 02:52:34 i find that giving the android app direct mysql access would be a security risk, and the round trip times will hurt some queries Feb 18 02:53:14 yeah, mysql APIs aren't really designed to be used with WAN latency Feb 18 02:53:25 g00s: The data are things like input patient MRN, --> mysql --> return row_id for mrn , then from row_id, input things like surgical procedure performed, amount of drug used, time, date, Feb 18 02:53:26 etc Feb 18 02:53:41 basically things that happen in an operating room, we want to track for research Feb 18 02:53:59 cool Feb 18 02:54:11 mfranz: 'oops, i dropped my android in the patient, can you fish it out?' Feb 18 02:54:26 'its under that organ over there' Feb 18 02:54:27 so in the past with PHP / apache that is obviously somewhat asyncronous since once the page loads you have effectively all data to fill out the from data then on submit send it back Feb 18 02:54:42 fortuantely I am in anesthesia so we don't do much of the operating Feb 18 02:55:08 actually we are wanting to store a lot of information on regional anesthesia like epidurals and limb blocks Feb 18 02:55:36 mfranz: well, given the gravity of your domain, you'll need a pro Feb 18 02:55:44 how do you mean Feb 18 02:56:03 will the FDA have to approve the app ? Feb 18 02:56:08 ah, your job is to put people to sleep? Feb 18 02:56:24 doesn't need fda approval, it is a research study app not for patient treatment or anything Feb 18 02:56:34 g00s: my dad repairs the cat-scans, and one problem ive seen, they have 4 desktop towers Feb 18 02:56:41 it does need to be hipaa compliant Feb 18 02:56:42 g00s: that must be turned on/off in a certain order, with delays Feb 18 02:57:05 g00s: with under $5 in parts, i could rig something up to do that with just a simple on and off button Feb 18 02:57:23 dad doesnt even let me try :P Feb 18 02:57:27 haha Feb 18 02:58:07 mfranz: is this just 'for fun' / research or will this be a product that needs FDA approval Feb 18 02:58:59 oh god, i just found a youtube video Feb 18 02:59:01 Well the research isn't FDA approved, it is move aligned for research publications, the device itself (app / nexus 7 ) doesn't interact with the patient so it doesn't go through FDA approval, but it must be secure Feb 18 02:59:05 an x86 emulator, writen in javascript Feb 18 02:59:06 and the data transacted securely Feb 18 02:59:13 doing ajax calls to an avr for every IO port request Feb 18 02:59:20 which then manipulates hardware Feb 18 02:59:32 running linux, on the js based emulator Feb 18 02:59:51 oh, and the avr is mounted on a microscope slide **** ENDING LOGGING AT Mon Feb 18 02:59:58 2013