**** BEGIN LOGGING AT Tue Feb 26 02:59:58 2013 Feb 26 03:01:47 and what does your app do when it starts? Feb 26 03:02:20 lots of things. i suspect something it's doing is tickling some bug in ActivityManager, and that causes ActivityManager to crash. Feb 26 03:02:38 well if you can narrow it down... :P Feb 26 03:02:50 and then ActivityManager removes the record of the app, which causes further interactions between my app and ActivityManager to kill my app. Feb 26 03:03:01 i just don't know how reliably i can repro the bug. Feb 26 03:03:01 you won't get much help with part of the system crashing when your app does "lots of things" :P Feb 26 03:03:22 just wondering if i can turn on some extra debugging output from ActivityManager before i start mucking around. Feb 26 03:04:34 not sure Feb 26 03:04:42 it's open source, so you can check if there's extra debugging :) Feb 26 03:09:03 often these kind of classes in Android have a private static final boolean DEBUG = false; that you can change to public, but it requires recompiling the whole framework which is probably more work than it's worth Feb 26 03:10:51 what are some 3d libraries you guys recommend? <- anyone? Feb 26 03:12:59 for? Feb 26 03:13:18 TheBunny, a 3d game Feb 26 03:13:20 mant of the standard C++ engines work on android frankdrey Feb 26 03:13:25 hmm? Feb 26 03:13:25 OR buy unity… etc Feb 26 03:13:55 unity is not a library, it's an obnoxious drag and drop game maker Feb 26 03:13:56 :p Feb 26 03:14:10 we've tried min3d but it seems to be horribly outdated Feb 26 03:14:37 huh Feb 26 03:14:53 Unity is not a drag and drop game maker Feb 26 03:15:06 close enough Feb 26 03:15:13 i've used the free version Feb 26 03:15:17 and? Feb 26 03:15:40 SIO2? Feb 26 03:15:48 how about that one? Feb 26 03:15:53 or http://gitorious.org/irrlichtandroid Feb 26 03:15:54 most work Feb 26 03:15:55 Well first of all, it barely ran on my PC :P due to the available drag and drop game maker part of it :p Feb 26 03:16:04 OMG Feb 26 03:16:09 hmm will check those out :p thanks Feb 26 03:16:11 your PC sucks? Feb 26 03:16:15 it does Feb 26 03:16:34 I mean unity ran find on machines 7 years ago Feb 26 03:17:05 http://sio2interactive.com Feb 26 03:17:11 you could just learn OpenGL :) Feb 26 03:17:19 2005 and was low end i think back then Feb 26 03:17:38 ah, SIO2 is like Unity Feb 26 03:17:45 I'm on Linux Feb 26 03:17:58 http://gfx.sio2interactive.com Feb 26 03:18:03 free code for this Feb 26 03:18:11 No SIO2 is not like unity Feb 26 03:18:15 its source based Feb 26 03:18:19 and no editors etc Feb 26 03:18:32 anyhow teh code above from the book is free Feb 26 03:18:36 and runs on ios / android Feb 26 03:18:37 etc Feb 26 03:19:02 i see i see Feb 26 03:19:02 http://irrlicht.sourceforge.net Feb 26 03:19:04 is free also Feb 26 03:19:22 would like some opengl 1.0 backwards compatibility but I should stop being picky xD Feb 26 03:19:24 Theres a cocos 3D project also Feb 26 03:19:35 why thd fuck would you want that? Feb 26 03:19:39 whats license for sio2 gfx Feb 26 03:19:41 don't ask ._. Feb 26 03:19:52 Nothing worth supporting has GL 1 on it Feb 26 03:20:22 The books code is free I linked to Feb 26 03:20:27 SIO2 you pay for etc Feb 26 03:21:04 hmm, just the smaller sio2 gfx is free? Feb 26 03:21:30 http://gfx.sio2interactive.com Feb 26 03:21:32 BOOK Feb 26 03:21:39 noting to really do with SIO2 Feb 26 03:21:45 its a nice clean simple code base Feb 26 03:22:04 shows how to set up and use a lot of standard open source game libs Feb 26 03:22:45 I'm looking at "GFX Engine Source Code" :P probably should download to see what it's about Feb 26 03:23:33 note to every dev: test your apps with "Don't keep activities" turned on Feb 26 03:23:59 ok, so it's basically a really bare implementation of gles 2.0 Feb 26 03:24:04 eh, i might as well learn opengl :p Feb 26 03:24:47 <_< Feb 26 03:24:50 do the most beautiful apps use gradients or not? i notice with desktop websites, over the years too many shiny 3d-wannabe looking gradients have lost its cool and now most pro designers go by flat interfaces except for buttons. is this likely to happen to mobile too? Feb 26 03:25:00 really frankdrey what on earth do you want? Feb 26 03:25:20 hell if i know :P Feb 26 03:25:57 GLES 2 book is good get that Feb 26 03:26:06 alright Feb 26 03:26:19 then you can hack around with what ever Feb 26 03:27:33 my friend found some "Rajawali" if that is as buggy as min3d, i guess opengl all the way :p Feb 26 03:28:18 all the ones I pointed you are are mature Feb 26 03:28:34 and have been used in plenty of commercial games Feb 26 03:28:48 i got 30m before bed Feb 26 03:28:52 time to read about GCM Feb 26 03:30:25 Cocos 3d is iOS Feb 26 03:30:52 and the others are paid? irrlicht seems to be one option, not sure what my partner would think about C++ though :P Feb 26 03:31:11 oh god Feb 26 03:31:13 GIVE UP THEN Feb 26 03:31:18 here is what I am curious about. Can I use GCM to do Push Notifications on Android, or is it used for something entirely different? Feb 26 03:31:20 no one does real games in Java Feb 26 03:31:32 lol i'm all for C++ :p Feb 26 03:31:59 what do people write games in on Android? Feb 26 03:32:14 simple games… java... Feb 26 03:32:22 his response: Noooooooooooooo Feb 26 03:32:26 :p Feb 26 03:32:30 Professional games mostly C++ like most of the game industry Feb 26 03:33:15 I mean I realize Microsoft has XNA, Apple has OpenGL. What does Google have? Feb 26 03:33:25 no no Feb 26 03:33:32 MS has Direct X Feb 26 03:33:40 TheBunny I mean phone platforms Feb 26 03:33:42 XNA on the phone Feb 26 03:33:47 the rest of the world is pretty much GL Feb 26 03:33:56 we are in a mobile OS chat after all ;) Feb 26 03:33:56 when i asked him to join this channel: I don't need you getting your idols to criticize me Feb 26 03:34:10 ohh idols. Thats high praise Feb 26 03:34:14 xximjasonxx, XNA is Direct X essentially :p Feb 26 03:34:17 xximjasonxx: er, no - we're in an Android channel Feb 26 03:34:22 Apple does not give you game APIs really Feb 26 03:34:23 frankdrey, correct Feb 26 03:34:33 they mostly just give you low level APIs to use Feb 26 03:34:47 same with android.. unless something has changed. Feb 26 03:34:49 Leeds, and Android is a mobile OS, though perhaps a Portable OS is more appropriate Feb 26 03:35:15 the point is that this isn't an appropriate channel for comparative analysis of frameworks on every platform in the world Feb 26 03:35:35 how do I convince this kid to use C++?:P Feb 26 03:35:40 Leeds, I was just enumerating the alternatives on the other platforms, since I wasnt sure (honestly) what Android developers write games in Feb 26 03:36:19 frankdrey, games like Halo and Call of Duty are written using C++ cause they have to get every once of power out of the hardware they can. Frankly, it really depends on what the complexity of the game you are writing Feb 26 03:36:55 not too complex, I guess Feb 26 03:37:00 writing any software program is never black and white Feb 26 03:37:12 we have a PSP version in Lua Dev Feb 26 03:37:12 there is no rule that says: "if thou is writing a game, thou must use C++" Feb 26 03:37:25 although the Android version is planned to be more complex Feb 26 03:37:45 frankdrey, I am speaking abstractly, I focus mostly on LOB apps, I dont do game dev Feb 26 03:37:56 I commonly use C++ game engined an Lua scripting on mobile. Feb 26 03:38:03 https://www.youtube.com/watch?v=x1k2lLYdjN8 Feb 26 03:38:16 yeah, it was crappy, but we have (hopefully) gotten better :p Feb 26 03:38:31 I do AAA MMO for a day job… all engine coding Feb 26 03:38:37 it really does look like GCM is designed to do push notifications Feb 26 03:38:47 Ahhhhh Feb 26 03:38:52 he uses AIDE on his tablet Feb 26 03:38:52 where you really want all the low level control you can get… aka C++. Feb 26 03:38:57 which means no NDK :P Feb 26 03:39:17 he doesn't want to use his PC because it requires a horrendous download of about 100 mb xD Feb 26 03:39:36 i wonder if 20m is enough time to go through this GCM demo app Feb 26 03:39:46 frankdrey, do it overnight Feb 26 03:40:03 and 100mb isnt even that big anymore Feb 26 03:40:05 xximjasonxx, eh, i've tried convincing him Feb 26 03:40:10 try downloading VS off MSDN Feb 26 03:40:10 "AIDE is good enough" Feb 26 03:40:14 he's quite stubborn Feb 26 03:40:18 fire him Feb 26 03:40:20 try downloading VS off MSDN <- I have :D Feb 26 03:40:27 eh, it's not really a business :P Feb 26 03:40:29 he's a friend Feb 26 03:40:40 stubborn programmers are rarely good programmers Feb 26 03:40:49 so go play with that and learn GL and make some simple games :) Feb 26 03:40:57 nothing wrong with that Feb 26 03:41:09 hmm? Feb 26 03:41:13 play with what? Feb 26 03:41:27 ok i gtg eat Feb 26 03:41:53 i agree with TheBunny, it cant be worse than trying to teach a designer to use command line git Feb 26 03:42:09 I would not even try :) Feb 26 03:42:17 I would get them a nice GUI client Feb 26 03:42:28 yeah he did that, but he still cant get it to work Feb 26 03:42:31 heck I won't even touch command line source control unless I have to Feb 26 03:42:33 so i promised i would help me tomorrow Feb 26 03:42:45 * xximjasonxx is an old Linux guy. CLI is my home Feb 26 03:42:55 well GCM is a fail, unless Azure supports Tomcat Feb 26 03:43:06 whats the designer on? Feb 26 03:43:12 Mac Feb 26 03:43:25 so am I, its an iOS project Feb 26 03:43:27 least to start Feb 26 03:43:35 Theres some really freindly mac clients.. some might cost 20$ Feb 26 03:43:45 he got the one off GitHub Feb 26 03:43:47 Im using SourceTree Feb 26 03:43:52 its free in the mac app store Feb 26 03:43:59 it seems pretty nice, he even got it to connect to Visual Studio Git, which I found remarkable Feb 26 03:44:00 and works with almost everything' Feb 26 03:44:10 nice, ill have him give it a try Feb 26 03:44:25 http://www.sourcetreeapp.com Feb 26 03:44:29 is one good one Feb 26 03:44:34 I like GitHub and all, but it is really lacking any project management features Feb 26 03:44:37 Windows version I hear is coming Feb 26 03:44:45 especially if you intend to do something like Scrum for development Feb 26 03:45:16 can't you just combine it with one of the systems thats made for that? Feb 26 03:45:21 BaseCamp etc Feb 26 03:45:40 maybe, but VS has the best, bar none, scrum interface Feb 26 03:45:53 Visual STudio? Feb 26 03:46:03 yeah, Microsoft really got behind Scrum in 2012 Feb 26 03:46:09 really nice template for Scrum projects Feb 26 03:46:09 oh I have not seen it then Feb 26 03:46:15 I had no idea they did anything at all Feb 26 03:46:20 www.visualstudio.com Feb 26 03:46:25 I think we use VS 2010 at work Feb 26 03:46:26 you can get free accounts, TFS or Git Feb 26 03:46:28 and thats it etc Feb 26 03:46:49 wait a second Feb 26 03:46:58 doesnt google have a cloud thing, like Amazon and Microsoft? Feb 26 03:47:11 drive? Feb 26 03:47:12 they did Feb 26 03:47:25 naw, drive is different, i mean something analogous to Azure and EC2 Feb 26 03:47:44 google drive is one of them Feb 26 03:47:46 ok Feb 26 03:47:54 I don't remember Feb 26 03:48:12 cloud.google.com Feb 26 03:48:15 i think this might be it Feb 26 03:48:25 i want to know if i can spin up a tomcat server or something Feb 26 03:50:08 here is the thing. from what I remember about Services, they exist as long as the application is still in memory. which means if the OS kills the process, the service stops. And if it is the service which is handling pulling an API to check for updates, would you not effectively lose that check if the process was terminated? Feb 26 03:50:49 both Microsoft and Apple support Push, natively. I am trying to figure out what Android supports natively for Push, if anything Feb 26 03:52:53 ugh, dad cooked. potato pancakes LITERALLY FLOATING in butter Feb 26 03:53:00 I'm gonna be sick later :P Feb 26 03:53:02 anyway Feb 26 03:53:04 I convinced him Feb 26 03:53:29 "Ok, I'll try to download this SDK and NDK over the next few days and have it running by the weekend." Feb 26 03:53:33 o.o must have slow internet Feb 26 03:53:34 romainguy, you around Feb 26 03:54:03 I love CLI. So much simpler than being forced to use shit-buggy GUIs Feb 26 03:55:34 enough of this. bed time Feb 26 04:00:48 ok, enough of this, guitar time :P Feb 26 04:12:24 "But what if you could have Android on your router? We all know how powerful and customizable Android is, as well as how limitless the possibilities really are, so why not?" bwahahaha, yeah fuck that Feb 26 04:13:37 i dont want/need a full OS on my router :P Feb 26 04:13:49 the linksys software already has way more features than i need Feb 26 04:18:38 its inevitable somebody will port android to hearing aids and cardiac pacemakers ;) Feb 26 04:23:16 canadiancow: unless you have a really really bad one based on vx, you have a full linux. It's just not usefully exposed to you. Feb 26 04:23:31 i suppose that's true Feb 26 04:23:47 canadiancow: I say really bad not out of any significant hate of vx, but because they took out too much router power/functionality on those models, I think they have 2 meg of ram. Maybe 4. Not enough for conntracking or proper shaping Feb 26 04:33:14 an android dev who has purchased my app keeps asking me questions on how its designed :| Feb 26 04:33:32 how was it designed? Feb 26 04:33:39 heh Feb 26 04:34:51 what app is it Feb 26 04:35:20 i dont discuss my app here :) Feb 26 04:35:25 pm me? Feb 26 04:39:40 just make all your apps open-source, problem solved Feb 26 04:41:38 if i could protect my moat by giving the app and source away for free, i would :) Feb 26 04:48:23 i was talking to one of the devs of Androidify soon after they open sourced their SVG library and some other parts of Androidify and I asked them why they decided to open source some components but not the whole app (I think I prefixed it by saying it was awesome they open sourced even part of it and i was just curious on the reasoning). they said one of the reasons is that they just wanted their to be one Androidify, rather than seeing Feb 26 04:48:23 countless forks and republications of it on the market Feb 26 04:49:35 which makes sense. The dev culture on linux is very much about getting your changes into the main project, but on Android there is a lot more independent forking which can be frustrating. Part of that is due to Apache I guess. Feb 26 04:56:09 kevinb: independent forking of 3rd party open source android libraries ? Feb 26 04:57:19 of the apps themselves, not the libraries Feb 26 04:57:49 ah, so the app was open source and instead of making it better, people ran with it and made different versions Feb 26 04:57:56 i remember that happened to … romainguy :) Feb 26 04:58:01 (Shelves) Feb 26 04:58:08 oh yeah and they took the name of his app too Feb 26 04:58:23 in the case of Androidify they just didn't release the source for the app itself, to avoid the situation. Feb 26 04:59:02 but they released the live wallpaper so like if you wanted to draw androids that way or incorporate them into a game or whatever you had the rendering code to do so. and if you did want to make a full clone you'd be writing enough yourself that you'd probably differentiate it a bit. Feb 26 04:59:43 yeah, over time useful bits of the app which are reusable and not secret sauce can be spun off as open source things Feb 26 05:05:53 was this made only of java? any idea what they used for ai? http://www.youtube.com/watch?v=A_irIFVI1x0#t=2m48s Feb 26 05:36:38 hey guys. I have a concept for an app, it is bascially a server-client app. THe thing is I want one of the clients to run a service in the background of the android device and it would not have an activity or anything that the user can interact with...can someone maybe provide me with a link on how I could Feb 26 05:37:48 there's pretty extensive service documentation on the android developer site. Note that if you don't have at least a notification, you will be at the top of the list for being killed if there is a ram shortage Feb 26 05:40:19 thank you dragorn. Feb 26 05:43:27 the new dev console does not show all my crashes Feb 26 05:44:13 when i switch bak to the old, they are there again ;) Feb 26 05:45:58 i wonder that Feb 26 05:47:08 can we run a compiled code (in c++) on android Feb 26 05:47:30 or other language Feb 26 05:48:20 (i'm using NDK) Feb 26 05:59:23 er, that's exactly what the NDK does Feb 26 06:04:10 the docs only show you how to build libraries with the ndk Feb 26 06:04:22 the magic to build an executable is not documented anywhere Feb 26 06:05:01 and they even suggest that you shouldn't use the ndk to do such a thing, then they go on to mention using the ndk as a stand-alone cross-compiler -- a bit contradictory Feb 26 06:06:01 in any case, the secret incantion to build an executable is include $(BUILD_EXECUTABLE) Feb 26 06:06:07 peckaz Feb 26 06:09:28 ron_frown: wut are you up to (beside jerking off) Feb 26 06:09:41 I cleaned my bike Feb 26 06:09:46 havent done much android shit lately Feb 26 06:10:14 well, thats unacceptable Feb 26 06:10:37 cleaning a bike goes against everything i hold dear Feb 26 06:11:03 yeah, it looks best when it resembles something from Mad Max Feb 26 06:11:11 "... I'm an evolutionary.... .sleeeeeeper...." Feb 26 06:11:30 g00s my bike looks like that a bit when clean even Feb 26 06:11:41 a bit of sexy, a lot of brute Feb 26 06:12:07 is this the ducatti? Feb 26 06:12:13 si Feb 26 06:12:27 makes me all warm and fuzzy inside Feb 26 06:13:27 ron_frown: wut tech stuff you been doing lately? Feb 26 06:13:56 html5+mvc4+knockout+bootstrap+crossfilter+d3 Feb 26 06:20:52 dialog.setOnDismissListener(new OnDismissListener() { Feb 26 06:20:52 @Override public void onDismiss(DialogInterface dialog) { Feb 26 06:21:05 how to set same listener to multiple dialogs? Feb 26 06:21:27 I mean how to make a method inside activity which conforms to onDismiss Feb 26 06:49:35 Hi! Does someone use Android-Universal-Image-Loader? How to be sure when image loads to imageView in ListView for right row? Feb 26 07:18:09 Udmurt: dou you have any problems with it or just interesting? Feb 26 07:44:01 birbeck you're on late Feb 26 07:48:09 any of you use lint + xml + vim? Feb 26 07:49:55 i use lint + json + vim, does that count :P Feb 26 07:50:30 actually, i felt like vim was too extravagant - who needs all that anyhow? so i'm using pico Feb 26 07:50:51 I just use vim - lint is for wimps Feb 26 07:51:16 lov is on late too Feb 26 07:52:48 Can someone help me with adding use permissions? Feb 26 07:55:09 Konst: what's the problem? Feb 26 07:55:15 I am not sure which permissions I need to add. Feb 26 07:55:31 All my app does is takes some text and parses it, and outputs information about that text. Feb 26 07:55:44 none at all? Feb 26 07:56:07 I thought you needed at least one? Feb 26 07:56:18 what do you think you need permission for? Feb 26 07:56:22 not if you don't do anything that would need a permission :D Feb 26 07:56:28 the MyLocationOverlay doesn't say anything about which location providers are used in the doc. Do i assume right that it just uses the most accurate available? Feb 26 07:56:47 I don't know. I was reading through publishing tutorials and they said that permissions are needed. Feb 26 07:57:02 yeah if you do sutff that requires a permission Feb 26 07:57:07 permissions are only needed if you want to do something which requires a permission Feb 26 07:57:09 so you cannot communicate with the internet without permission Feb 26 07:57:18 or retrieve location of the phone Feb 26 07:57:24 or brick the phone Feb 26 07:57:29 Okay. So if all my app does is the user inputs some text into the TextEdit box Feb 26 07:57:40 and presses a button Feb 26 07:57:50 which parses the text and outputs information in a text view box. Feb 26 07:58:09 no permission needed for that Feb 26 07:58:13 none at all Feb 26 07:58:16 Okay. Thank you. Feb 26 07:58:22 mainly you need permissions, if you do stuff that could influence the user in some way Feb 26 07:58:30 e.g. location getting -> intrusion into private sphere Feb 26 07:58:40 internet -> he might havbe limited data access and also private sphere Feb 26 07:58:48 and so on Feb 26 08:05:10 g00s: you too getting daily java patches from apple this last week ? Feb 26 08:05:25 or something wrong with my updater ? Feb 26 08:05:41 timroes, hey, how do you do ? :) Feb 26 08:06:03 StingRay_: wait, wut? Feb 26 08:06:22 well seems that in the last 6 days I have had 4 java updates Feb 26 08:06:31 checking Feb 26 08:06:33 from apple Feb 26 08:06:35 squ: yeah i am tired but fine and you? :) Feb 26 08:06:53 StingRay_: I check every day, being OCD, and I only got one Java 6 update Feb 26 08:07:23 my oracle java 7 install is build 1.7.0_15-b03 Feb 26 08:07:32 g00s: ok something maybe wrong with updater then .... hmmm unless they are just for 10.8 Feb 26 08:07:50 i have 10.7. They updated 10.7 and 10.8 first Feb 26 08:08:01 sorry, they updated 10.6 and 10.8 first Feb 26 08:08:10 but there was only 1 update for 10.7 Feb 26 08:08:13 oh your on oracle maintained ? Feb 26 08:08:17 2 updates for the others Feb 26 08:08:21 i have 2 jvms Feb 26 08:08:41 one ancient POS for android dev, and Java 7 for JavaFX Feb 26 08:08:44 java version "1.6.0_41" Feb 26 08:09:20 timroes, great :) Feb 26 08:10:06 StingRay_: yeah, thats what i have Feb 26 08:10:47 btw, Oracle said they aren't updating Java 6 any more past this month. So … thats all you'll probably see as far as java 6 updates go … forever Feb 26 08:11:00 hope you have it disabled in your browser ;0 Feb 26 08:11:37 so when is android switching to java 7 then :) Feb 26 08:11:50 xgear, when I call displayImage from getView of my adapter I see potential problem. When it finish background task to load image, row of my list view can show different position from adapter. Feb 26 08:11:59 i wonder what google's endgame is with android. maybe they'll just replace it with Glasses Feb 26 08:12:27 xgear, so it place wrong image in row Feb 26 08:15:21 damn new adt :( Feb 26 08:15:32 i have custom stuff in my xml layouts Feb 26 08:15:38 and google claims that this is an issue Feb 26 08:18:24 monsti: i dont see a new adt. some of the sdk tools were updated today though Feb 26 08:18:49 new support lib, etc Feb 26 08:23:50 g00s: ADT-21.1.0 Feb 26 08:24:02 g00s: how can i stop lint being stupid? Feb 26 08:26:17 got it Feb 26 08:26:33 there is a "lint is stupid, and in this tab you can stop it!" Feb 26 08:41:30 what's the fastest CPU that is available compiling android source? Feb 26 08:41:35 i think i need an update :( Feb 26 08:41:48 12 core xeon setup Feb 26 08:42:04 sum may do quad x octo's now Feb 26 08:42:21 but your looking at about 1.5k per cpu Feb 26 08:42:28 * p_l was considering getting a 64 core opteron machine some time ago Feb 26 08:42:46 was around 1k per cpu, with 4 cpus Feb 26 08:42:53 i have a i7 with 3.2ghz and 16gb ram (laptop) Feb 26 08:42:58 i think this is too slow ;( Feb 26 08:43:01 anyway, fastest config is at google, and it involves a cluster ;) Feb 26 08:43:50 fastest is always a cluster :) Feb 26 08:44:16 i always thought google should let us run our emus on their environment and VNC the results back to our desktops or something Feb 26 08:44:22 but i using a Core i7-3820 with 32gig ram in my desktop compiling from RAID1 and wouldn't consider it too slow Feb 26 08:44:44 first compile takes a little bit less i guess then chromium :) Feb 26 08:44:48 it's too slow ;( Feb 26 08:45:05 monsti: dont forget laptops are low power Feb 26 08:45:07 or eclipse is too bad ;) Feb 26 08:45:09 and every further compile is (depending on how much changed) less then 5 mins Feb 26 08:45:53 hey does anyone know where to find a simple text of this list http://en.wikipedia.org/wiki/List_of_colors:_N-Z#Colors_in_alphabetical_order_N-Z or something like it? (with 0-1 parameterization) Feb 26 08:46:27 lasserix: you mean normalized color swatches Feb 26 08:47:00 o.O http://en.wikipedia.org/wiki/List_of_fictional_colors Feb 26 08:47:44 i have a value.xml file with all M$ colors Feb 26 08:48:02 e.g.@color/ms_royal_blue Feb 26 08:48:32 stingray: thanks Feb 26 08:48:59 monsti: problem with that is to do wide UI color changes your doing lots of editing Feb 26 08:49:16 amazing how the right set of keywords gets you just what you need :) Feb 26 08:49:18 where if you just called it ui_color_main or something you can ref what you want Feb 26 08:49:28 lasserix: <--- artist Feb 26 08:49:34 so I should be expected to know Feb 26 08:49:45 if I didnt wouldn't show much at all Feb 26 08:50:54 depending on CLUT/source you can have unit normalized too Feb 26 08:50:57 :) Feb 26 08:51:35 one of the biggest android issues is the missing ICS support Feb 26 08:51:48 you can create briliant colors on one device Feb 26 08:51:55 and it looks like shit on 100 other devices Feb 26 08:53:03 wo http://techcrunch.com/2013/02/25/visa-samsung-ink-nfc-deal-galaxy-s-iv-first-in-line-for-deep-integration-roam-is-visas-first-ready-mobile-payment-partner/ Feb 26 08:53:27 am i correct in thinking a cursorAdapter does adaptive/progressive loading and arrayAdapter needs it's full data source before drawing ? Feb 26 08:57:44 g00s: well i am very disapointed of the S4 specs :( Feb 26 08:58:51 samsungs SAP system told them "hey guys you make equal money, if you use the inferiour display and the slower 4 core cpu - so wait until apple crates their iphone 6/5S" Feb 26 08:59:40 monsti: i'm still using a droid-1 Feb 26 08:59:46 i'm sure it will be fine ;) Feb 26 09:00:24 StingRay_: you are right, a cursor adapter moves the cursor to the position and reads an item when requestes Feb 26 09:01:03 so it doesnt read everything in the beginning. an arrayadapter stores all its data inside a list at the beinning, so it must be there from the beginning (or insert somehow by you dynamically, but the adapter itself doesn't do profressive loading) Feb 26 09:02:15 timroes: cheers Feb 26 09:02:41 Hi! Is it possible to exclude certain times from a timepicker? E.g. I only want to display open hours for a given store Feb 26 09:02:50 looks like I want dynamic loading on my arrayAdapter Feb 26 09:02:52 :) Feb 26 09:03:10 StingRay_: i geuss you are better with extending baseadapter in that case :) Feb 26 09:03:38 you can then load the items requested, when you get the getItem call (and do caching or hording) Feb 26 09:04:04 hmm easy to convert ? Feb 26 09:04:31 sorry? Feb 26 09:04:51 i mean my arrayAdapter > baseAdapter Feb 26 09:05:06 yeah base adapter isn't so hard if you hgave a collection :) Feb 26 09:05:08 looks like it Feb 26 09:05:14 and you have more flexibility for dynamically loading Feb 26 09:06:09 oh I maintain .add etc Feb 26 09:06:37 CursorAdapter and BaseAdapter are all you need; the rest are stupid Feb 26 09:07:30 Morning all, does anyone know where the docs are for installing an apk as a system app using the INSTALL_PACKAGES permission? Feb 26 09:08:11 well I have to convert the data to visible/readable so looks like I should not be using array adapter Feb 26 09:08:45 StingRay_: http://pastebin.com/BLQ2hEk0 Feb 26 09:08:57 thats a pretty minimal baseadapter implementation using a list of objects to store data Feb 26 09:09:19 with some errors like it should be objects.get(position) in #23 :) Feb 26 09:09:43 and perhaps you want to have some method that refreshes your obejcts list with your new data Feb 26 09:09:55 and you need to pass a context to the class (if you don't use it as inner class) Feb 26 09:10:07 and from that on you can extend lazy loading and stuff like that Feb 26 09:10:30 well at the moment datasource(sqlite/mysql) > convert data > list > adapter Feb 26 09:10:50 but then I also have some thing on the adapter to alter visuals Feb 26 09:11:07 value conditions etc Feb 26 09:11:49 so you are using a cursor? Feb 26 09:12:08 well yes but not to supply the arraylist Feb 26 09:12:09 to access your db? Feb 26 09:12:17 tis in a service Feb 26 09:12:49 is there a way to make screenshots from an app running on my real device (in debugmode)? Feb 26 09:13:27 Stummi: the screen shot button ? Feb 26 09:13:45 oups.. erm, nvm :) Feb 26 09:18:24 hi, I can not bind to my own service in which use google location service? what can I do? Feb 26 09:19:12 luoluoluo: http://developer.android.com/guide/components/services.html Feb 26 09:22:30 Is it possible to customize the available times in a TimePickerDialog ? Feb 26 09:43:56 hi, android newbie here, requesting assistance. Feb 26 09:44:12 was going throu an autocomplete tutorial, here: https://developers.google.com/places/training/autocomplete-android Feb 26 09:45:10 managed to figure out a way to insert a custom list element that said, "Search for '[USER_QUERY]'..." Feb 26 09:46:05 The problem is, clicking that element returns the whole string - "Search for '[USER_QUERY]'..." and I want it to return only [USER QUERY]... Feb 26 09:46:15 What am I missing? Feb 26 09:55:03 no answers. :( *okay.jpg* Feb 26 10:01:13 Hello *, ive an app which uses the camera and a custom surfaceview. It works on all devices (Frontcamera) but not in Nexus. Its only black. Is there a bug in Nexus (and Android 4.21/4.22)? I dont have a nexus for testing.. Feb 26 10:08:59 dan00b_river: ask one more time please, I didn't see the question Feb 26 10:09:33 Hi, the upbutton in the actionbar opens the wrong activity. In the manifest, the parent activity is correctly set. What can be the cause? Feb 26 10:12:23 Probably you've finish()ed your parent Activity or opened the current activity with intents which overrites it? Feb 26 10:15:45 Just found the problem, I opened the wrong details activity. I forgot to change the name after copy/pasting my own code. Thanks for helping ;) Feb 26 10:31:52 Why are my GL circles crashing the X86 AVD :| Feb 26 10:34:00 must be wrong display aspect ratio Feb 26 10:35:14 wtf, this is retarded http://appleinsider.com/articles/13/02/26/apple-patent-allows-smartphones-to-swap-location-data-with-an-accessory-device Feb 26 10:37:24 Anyone here worked with Samsung Apps in app purchases? Do I need to have Samsung Apps app installed for it to work? Feb 26 10:38:45 how has that patent been allowed? Feb 26 10:39:07 the way all stupid patents are allowed Feb 26 10:39:09 surely pushing location data over network is no different than pushing to a device Feb 26 10:39:23 how about pushing over network to a device ? Feb 26 10:40:31 depends what you want to do with the GPS Data. Just sending lat/long is not a problem. You can use Geocoder to get the Addressdetails. But setting the GPS requires (fakeGPS) which can be enabled in Debugsettings in your Device Feb 26 10:43:27 Ge0rG: looks like it was me calling glEnable with 0xFFFF Feb 26 10:43:30 AVD crash :S Feb 26 10:43:39 Morning, question: Is it possible to stream an mp3 song, and write file to ext memmory at the same time? Feb 26 10:44:51 ESphynx: ... my question is where you got the bright idea to call glEnable with a magic number Feb 26 10:45:33 p_l I like magic numbers. My question is why a whole virtual machine process would crash as a result. Feb 26 10:45:47 cause it reminds me of "why Windows is so fucked, by the poor sods responsible for application compatibility between OS versions at Microsoft" Feb 26 10:45:55 there are so many layers that could have properly ignored that invalid number Feb 26 10:46:43 (FYI I use 0xFFFF for things that GLES do not support, so that I can test it in regular OpenGL with those calls 'not working') Feb 26 10:47:11 ESphynx: except if you were running with hw acceleration support you could have corrupted something in path between emulator and the real GPU Feb 26 10:47:27 I am running with HW accel on. Feb 26 10:48:30 sooo... you probably caused the emulator to experience the equivalent of crashed GPU Feb 26 10:48:45 interesting. Feb 26 10:49:04 but wouldn't the GL driver have caught that before even sending something bad to the GPU? ;) Feb 26 10:49:04 every time you use a numeric constant this way, Murphy prepares something evil for you to haunt you more Feb 26 10:49:20 my and Murphy are old friends. Feb 26 10:49:57 ESphynx: GL driver is not your babysitter and is not going to hand-hold you. Feb 26 10:50:22 On a real device the crash (should) would be local to your app Feb 26 10:51:25 right. well at least I have a clue now that the AVD is easily crashed from GL :P Feb 26 10:51:51 ESphynx: AVD is frankenstein version of HTC Dream ;) Feb 26 10:52:26 I know GL drivers tend not to hand-hold you, but usually that only happens at the time of issuing a drawing call Feb 26 10:53:50 ESphynx: in GL passthrough like with emulator, I'd expect to deal with something similar to classic GL - assume every call is sent direct to device's GPU, and it just happens to have been conveniently packed into a c-callable function :> Feb 26 10:54:23 to device's driver you mean? Feb 26 10:54:50 p_l: still using firefox :) ? Feb 26 10:54:51 ESphynx: from the pov of emulator, to device itself :> Feb 26 10:54:53 g00s: yes Feb 26 10:55:10 g00s: I don't trust Chrome to not kill me with OOM when it opens 250 tabs Feb 26 10:55:10 i keep going back between ff & chrome, but chrome usually uses too much memory :( Feb 26 10:55:16 hehe, yeah Feb 26 10:55:19 g00s: and Chrome sucks in UI Feb 26 10:55:58 p_l: which add-ons do you have loaded ? Feb 26 10:56:01 (for ff) Feb 26 10:58:03 adblock, firebug+autocompleter+firefinder+codeburner+inline code finder, suspend background tabs, lastpass, *TreeStyleTabs*, *Vimperator*, vacuum places improved, greasemonkey. Starred are the things I can't live without :) Feb 26 10:59:13 that must be pretty slow haha Feb 26 10:59:46 holy crap. all i have is adblock+, DoNotTrackMe, and noscript :) Feb 26 11:00:05 only have flashblock Feb 26 11:00:57 MDijkstra: the slowness was only when I found Firefox trying to launch PulseAudio on every opening of menu Feb 26 11:01:54 this TreeStyleTabs thing reminds me of another project - which keeps a DAG of sites visited Feb 26 11:02:07 i always wonder how the heck i got somewhere Feb 26 11:11:57 hi, someone that could tell me how i get the barcode type in Zxing like "product" or vcard Feb 26 11:19:37 elec29a: I don't think you can Feb 26 11:19:46 elec29a: ie, you'll just have to guess based on the content Feb 26 11:19:55 ok thx anyway Feb 26 11:49:18 weird - when you make changes to an app, like promo graphic - how long does it take for that to show up? its been … a little while now :| Feb 26 11:49:37 g00s: take at least 24h? :P Feb 26 11:49:50 holy shit, a promo graphic ? Feb 26 11:50:18 g00s: well, I assume you talk about Play store ;P Feb 26 11:50:36 do I have to remind you that Google tends to be a bit... distributed? :P Feb 26 11:50:47 yeah, eventually consistent and all that Feb 26 11:51:15 i still think Play is powered by hamsters Feb 26 11:51:23 ssssh Feb 26 11:51:30 shouldn't be as long as 24h, I think Feb 26 11:52:15 HEllo Feb 26 11:52:25 anyone around to help me out here Feb 26 11:52:26 http://pastie.org/private/zmisuw5oan0ajgep2oapg Feb 26 11:53:17 ikillcypher: try #cyanogenmod, if that's what you're trying to build... Feb 26 11:53:38 ikillcypher: you keep asking non-android-dev questions. please read the topic :) Feb 26 11:55:52 dang, wish this wasn't behind a paywall http://professional.wsj.com/article/SB10001424127887323699704578324220017879796.html Feb 26 11:56:43 BUY HTC, SAVE ANDROID :)_ Feb 26 11:59:42 :) Feb 26 12:02:09 buy Sony Feb 26 12:02:17 buy samsung Feb 26 12:02:18 screw Samsung Feb 26 12:02:30 lol selfish koreans Feb 26 12:02:31 buy GOOG stock? ;P Feb 26 12:02:32 buy nexus Feb 26 12:02:40 T_T Feb 26 12:02:45 * ikillcypher going to study Feb 26 12:02:46 I just have ;) Feb 26 12:02:48 i wouldn't buy Sony bubble gum, after that root kit fiasco a few years ago Feb 26 12:07:42 they need to make a 1080p qwerty Feb 26 12:08:40 touchscreens are only good for typing plain english. but even that is faster on a hard keyboard. and typing anything else like shorthand or code or commands on a touchscreen is painful Feb 26 12:09:00 but thats just my opinion Feb 26 12:10:08 DR01D-Engineer: but have you seen how fast most women can type ? some of them on a touch keyboard, I cant see their thumbs move Feb 26 12:11:54 StingRay_: it's scary Feb 26 12:15:15 lol Feb 26 12:15:24 DR01D-Engineer: there is a microfluidics keyboard that might be out soon, that gives haptic feedback Feb 26 12:15:35 it rises out of the touch screen O.o Feb 26 12:15:55 hmmmmmm Feb 26 12:17:38 hi guys, having issues installing the ADT to eclipse, using archlinux http://pastie.org/6340621 Feb 26 12:19:59 weird Feb 26 12:23:05 cHarNe2: did you install eclipse through arch's package manager or something ? Feb 26 12:23:13 g00s: ye Feb 26 12:23:22 yeah, fuck that - alwats Feb 26 12:23:23 pacman -S eclipse Feb 26 12:23:25 *always Feb 26 12:23:48 i made a bad move? Feb 26 12:23:49 its just a zip file to download, no pacman needed. just get the official version Feb 26 12:23:55 ok Feb 26 12:24:02 hold on Feb 26 12:24:49 get the Platform Runtime Binary from here http://download.eclipse.org/eclipse/downloads/drops/R-3.8.1-201209141540/ Feb 26 12:24:58 yes, version 3.8.1 ;) Feb 26 12:25:17 once youhave that, install the ADT. it will drag in the JDT as a dep Feb 26 12:26:36 already ahead of you ;) Feb 26 12:26:49 installed and the ADT installed w/o any issues :P Feb 26 12:28:55 :) Feb 26 12:35:36 ad that my xfce-theme makes it impossible to see stuff.. Feb 26 12:38:18 is it possible to have EditText and TextView on the same baseline? Feb 26 12:40:01 horizontal layout? Feb 26 12:46:08 I mean text inside EditText and inside TextView Feb 26 12:46:14 have same baseline Feb 26 12:46:33 g00s: lov is not on late. lov is on from 9AM-5PM, generally. Feb 26 12:47:12 just reading about falcon pro and the token limit - does anyone explain what the token limit is all about to explain it to me? Feb 26 12:47:26 g00s: I use screen + irssi, so that's why I'm connected all day long. Feb 26 12:48:42 devswap: quite simple: twitter doesn't want people to make new client apps - they want people to use the official client/webpage... so they limit the number of users a client can have to 100,000 or 2x(existing users) for clients which were already in the market Feb 26 12:49:37 leeds: i thought it would be that but on ios you have tweetbot which I may be wrong but I would think has 100 or 1000 times more users than falcon and continues to operate and hence I was confused how this could be? Feb 26 12:50:39 devswap: if it had - say - 5 million users when the new rules came into effect, they can register up to 5 million more before they're limited... *new* clients which have only existed under the new rules get a fixed ceiling of 100k users Feb 26 12:51:28 leeds: oh ok - that will probably be it then Feb 26 12:51:48 leeds: i feel a boycott of twitter is going to be happening soon Feb 26 12:51:54 unlikely Feb 26 12:53:05 anyway, it is what it is, and Twitter are looking pretty hardline when it comes to enforcing it Feb 26 12:53:32 well it cant continue that we use bad apps - hopefully they will find a new way to have third party apps and still maintain advertising or whatever they need to keep the service profitable Feb 26 12:54:28 leeds: whats there reasoning for the low limit then - why not just say no new clients regardless - allowing 100,000k and then blocking them with no way to get more seems daft Feb 26 12:54:43 anyone else remember when Twitter and Google on stage together promised to release the Android app as open source? /me afk Feb 26 12:54:53 * g00s raises hand Feb 26 12:55:34 remember last year when they said the google actionbar was coming soon :) Feb 26 12:56:13 during this years i/o i think we should bet on what announced things come to pass Feb 26 12:56:52 and the hamsters that run the Play store need to do a Fireside chat Feb 26 13:02:29 Hey guys, you should use new Thread() / AsyncTask instead of Handler.post to download data right? Feb 26 13:08:02 generally one uses asynctask Feb 26 13:09:12 Is it bad practice to use new Thread? Feb 26 13:10:23 it depends.. Feb 26 13:11:46 Okay, last question, can using handler.post cause lag? Or the screen to freeze? Feb 26 13:13:15 Xerixe: yeah if your handler is linked to the UI thread (what I guess is what you want to do) and the runnable you post to it needs long time it will be laggy Feb 26 13:17:49 Because before this I used Handler.post to get my data then update it directly. I changed it to use a new Thread / asynctask to download, then use post to update the UI. Is this way advisable? Feb 26 13:20:10 if you use asynctask you don';t need to post back to ui thread, there is a method in async task executed in UI thread you should use to show your results Feb 26 13:22:05 oh yeah, but if I were to use a new thread, I would have to right? Feb 26 13:22:38 if you use thread and not async task, yeah you need some way (e.g. View.runOnUiThread or Handler.post) to propagate your results to the ui thread Feb 26 13:23:30 so is it better to use an asynctask or to use a new thread, then use handler.post, is there any benefits performance wise between these two choices? Feb 26 13:24:24 asynctask is meant to be used for short running operations, (doc states: a few seconds at the most) Feb 26 13:24:47 if you have it running longer docs recommend the use of some of the concurrent stuff Feb 26 13:24:52 also read here: http://developer.android.com/reference/android/os/AsyncTask.html Feb 26 13:28:31 Hmm, okay! Will read more about them first. Thanks a bunch! Feb 26 13:30:03 according the documentation, mapsv2 needs OpenGL ES version 2 and an app using the map api v2 cannot be installed on devices which does not support this version. But I don't find something about how much devices this will affect exactly. Is OpenGL ES 2 something which is present on most end-devices or will I exclude a notable part of them with that? Feb 26 13:30:58 Stummi: http://developer.android.com/about/dashboards/index.html#OpenGL Feb 26 13:31:01 I am not sure if i shall use MapsV2 if i want to make the app available to the most of the android user Feb 26 13:31:03 *s Feb 26 13:31:43 for whatever reaon that data is still from october 2012 Feb 26 13:32:24 so assume there are a bit less gl 1.1 devices out there Feb 26 13:35:10 hey Feb 26 13:36:18 Stummi: it's probably a safe decision to require GLES 2.0 at this point. Feb 26 13:37:11 Stummi: GLES 2.0 support was added as a requirement as of like froyo or gingerbread or something. If you're targetting a reasonably modern API level, you should be fine. Feb 26 13:37:46 When my app launches a notification the icon that shows with setTicker() is too big. It's back to normal size when the ticker is complete. Any ideas? Feb 26 13:37:53 It cuts the top and bottom of my icon Feb 26 13:39:23 yeah just use mapsv2 Feb 26 13:40:57 I've set the icon to be the ic_launcher icon Feb 26 13:43:58 hm, i don't get the mapsv2 example from google ( https://developers.google.com/maps/documentation/android/start ) working on my device (cyanogenmod, android 2.3.7) Feb 26 13:44:26 in logcat i see a ClassNotFoundException for com.google.android.gms.maps.MapFragment Feb 26 13:44:43 Stummi: you do have the android service framework installed in your cyanogen mod? Feb 26 13:47:24 do you mean the "Google Services Framework"? Feb 26 13:47:41 yeah Feb 26 13:47:44 Any suggestions for drawing charts? Feb 26 13:48:40 yeh use a lib Feb 26 13:48:51 Kennethos: https://github.com/nadavfima/ChartView/ Feb 26 13:49:19 always give www.androidviews.net for that kind of questions a look :) Feb 26 13:50:37 ChartView looks nice! Thanks for the tip ;) Feb 26 13:50:41 timroes, hm, i think it is. but it should be installed when i can use g+, google maps, etc with my smartphone now, doesn't it? Feb 26 13:51:06 i guess so yeah, but try your app on an unrootet device to see if its something with cyanogenmod Feb 26 13:51:34 thats why i don't use that kind ofdevices for development, so I don't run into such problems and you don't know if its yor code or something else Feb 26 13:52:06 I have the correct sizes for my icon in the drawables hdpi,ldpi,mdpi,xhdpi, but for some reason setTicker displays a larger icon in the notification bar for a few seconds. What do I do? Feb 26 13:52:22 Stummi: do you have this installed on your phone? https://play.google.com/store/apps/details?id=com.google.android.gms&hl=en Feb 26 13:53:22 yep Feb 26 13:53:28 mom i will try it to run in an AVD Feb 26 13:53:36 don't call me mom :) Feb 26 13:54:25 Stummi: won't success unless you have all the google stuff installed in your avd :) Feb 26 13:54:32 Mornin' everyone,... I'm still in my quest for learning how to use Fragments... and I've added an animation where my fragment will slide in, add to back stack (null), and it works fine. When the back key is pressed, my "back out" (slide_out_right.xml) animation doesn't work. It just returns to the previous fragment as it should. Is this due to not catching the back key and not calling some Feb 26 13:54:32 kind of pop back stack? Feb 26 13:54:47 * ChestCardChance didn't mean to have this name. Feb 26 13:55:25 Morning, timroes :) Feb 26 13:55:34 morninig is good :D Feb 26 13:55:35 I mean... afternoon, timroes :) Feb 26 13:55:39 i am just leaving work Feb 26 13:56:20 I'm all turned around. I forgot you are... 7 hours in the future :p Feb 26 13:56:32 almost 10pm... Feb 26 13:56:50 hey guys Feb 26 13:56:51 and gals Feb 26 13:57:01 Leeds: alright.. I stand corrected. I'll never say good morning 'all' again :) Feb 26 13:57:08 so see you later everyone :) on my way home :) Feb 26 13:57:15 wait a couple of hours and say it again :) Feb 26 13:57:21 timroes: have a good one ! Feb 26 13:57:41 haha Leeds Feb 26 13:58:27 Then it'd be morning for both of us. 10am, and 12am. :) That's no short trip! Where are you located? Feb 26 13:58:41 hm, i also don't have the package "com.google.android.gms" available in eclipse. In which lib should this be? Feb 26 13:59:10 when an activity is destroyed by the os, but then recreated again when it takes focus, and the views states are loaded from savedInstanceBundle, where does the OS store that savedInstanceBundle data? Feb 26 13:59:46 i mean where is it saved while the activity is dead Feb 26 13:59:52 Stummi: the auth package... hmm... not sure, but I'm trying to find out. Feb 26 14:00:22 erdos: either in memory or on disk. It's an implementation detail that shouldn't matter to you. Feb 26 14:00:41 Stummi: you might need some sort of Google Services API package? Feb 26 14:00:41 heh ok that's good enough for me! Feb 26 14:01:53 gah why the hell isn't my galaxy 10.1 charging? it's damn plugged in to the wall Feb 26 14:01:55 Stummi: read http://developer.android.com/google/play-services/setup.html Feb 26 14:03:28 Stummi: in other words, you need to get the package and install it, and the com.google.android.gms package will be availble to you. Feb 26 14:07:30 I hate it when people ask a question and then disappear. Feb 26 14:09:01 pierpark, i am still here. Sorry for not responding i still to try to understand what to do. I already have the play services installed via the sdk manager Feb 26 14:09:07 erdos: Your 10.1 may be using power as fast or faster than the charger can supply it. Feb 26 14:09:19 erdos: the big memory hog is the screen; turn the screen off and you should see it charge. Feb 26 14:09:23 s/memory/energy/ Feb 26 14:09:51 Stummi: it's fine... I thought you'd left. Okay let's see... Feb 26 14:10:04 but it seems i still have to copy the google-play-services.jar manually to the lib-directory of my project, right? Feb 26 14:10:36 Stummi: I don't think so.. let me see if I can get some steps for you.. one second Feb 26 14:11:05 Stummi: what operating system are you on? Windows/Linux/Mac ? Feb 26 14:11:28 debian linux Feb 26 14:11:58 Hello *, ive an app which uses the camera and a custom surfaceview. It works on all devices (Frontcamera) but not in Nexus. Its only black. Is there a bug in Nexus (and Android 4.21/4.22)? I dont have a nexus for testing.. Feb 26 14:12:49 Stummi: do you at least know how to get into your SDK manager? Feb 26 14:13:07 misterli: nexus what ?? Feb 26 14:13:12 galaxy nex ? Feb 26 14:13:16 nex7, nex4 ? Feb 26 14:13:22 pierpark, yes, i know Feb 26 14:14:03 Stummi: okay go into there and then go to the bottom of the package list.. then go into the Extras > Google play services, and download the SDK. Feb 26 14:14:10 nex7 Feb 26 14:14:21 lov: hehe, but then how do i know it's charging! Feb 26 14:14:34 pierpark, it is already installed. Feb 26 14:14:35 misterli: is the app somewhere i can download, will test it for ya Feb 26 14:15:15 that's a bit of a bummer if i can't use it and have it charging at the same time, the charge give out 2.1A! Feb 26 14:15:24 how many freaking amps does it need?! Feb 26 14:15:25 Stummi: okay, then you need to File>Import>Android Existing Code Feb 26 14:15:40 okay Feb 26 14:16:15 Stummi: And then from YOUR app project, right click and go to Properties, then the "Android" area in the left navigation list, then at the BOTTOM, add the project as a library. Feb 26 14:16:31 hello Feb 26 14:17:01 anyone knows if it's possible to run OpenGL ES 2.0 apps in Android emulator, when the host (which runs the emu) has no GPU? Feb 26 14:17:06 setTicker for my Notification displays a larger and cropped icon in the notification bar for a few seconds and when the ticker is complete, notification bar icon is normal size. What could be wrong? Feb 26 14:17:06 moment, i am in the "import existing code" dialog now. Or did you mean i shall import my project? Feb 26 14:17:33 Chain|Q: ig gpu acceleration is disabled, it will emulate everything in the cpu Feb 26 14:17:36 if* Feb 26 14:17:39 StingRay_: www.TheftSpy.com Feb 26 14:18:16 Stummi: that's right. now, you go find the /extras/google/google_play_services/libproject/google-play-services_lib folder. Feb 26 14:18:38 misterli: not compat with nex7 ? Feb 26 14:18:42 pictures (and im pretty sure its the preview) is black. takePicture() will take it, but everything is black (seems just to be on nexus7 and android 4.2.2) Feb 26 14:18:51 Should be? Feb 26 14:19:04 Requires Android: 2.3 and up Feb 26 14:19:14 Stummi: after finding that folder to "import", then the library will be in your working area... and then you'll right click on com.stumnis.app, then click the "Android" category, then scroll to the very bottom of that big version list, and click "Add"... then the library will be there to add to your project. Feb 26 14:19:17 no i mean I went to playstore link Feb 26 14:19:26 and not compat with nex7 Feb 26 14:19:31 its annoying Feb 26 14:19:51 so cant install it on a nex7 from play Feb 26 14:19:53 :) Feb 26 14:20:37 clever: thanks for the answer Feb 26 14:20:45 pierpark, ah, now its there. I have google-play-services.jar and google-play-services_lib.jar ass additional android dependencies in my project, is this correct? Feb 26 14:20:52 Stummi: in brief, you've installed the Google Play Services SDK... second, you're importing that SDK into your workspace (where your com.stumni.app is located to work with), and third, you are going into com.stumni.app Properties and telling it "hey, this app uses the Google Play Services library I just imported". Feb 26 14:21:19 its really annoying. I cannot even enable it in the compatible devices in Publisher Console Feb 26 14:21:45 Stummi: if it added it there, yes.. you need that full reference to the SDK in order to use it. Give it a shot and see if now you have access to: com.google.android.gms Feb 26 14:22:07 yeah i have Feb 26 14:22:12 erdos: Catch 22! Feb 26 14:22:14 when streaming audio via "MediaPlayerService/NEXTREAMING", my http session is lost, and I end up getting a 302 Error redirecting me to login.php instead of the audio stream. is there a known work-around for this? Feb 26 14:22:20 Stummi: Then that solves your problem, right? Feb 26 14:22:29 erdos: If you enable ADB over Wifi, you can always use adb shell dumpsys power and look at the battery level there Feb 26 14:22:36 misterli: sorry pal, cant test it for ya :( Feb 26 14:22:49 clever: I can't seem to make it work tho'… with -gpu off, my GL ES app refuses to start because it can't find a mode with required properties, and when I start the emulator with -gpu on on a host with no HW OpenGL it crashes. Feb 26 14:22:50 pierpark, lets see Feb 26 14:22:58 Stummi: sounds good. Feb 26 14:23:08 www.Theftspy.com/TheftSpy.apk its the latest APK (signed and same like in google play) Probably you can try this one out? Feb 26 14:23:11 clever: even if I force GL to software mode. (Ubuntu 12.04) Feb 26 14:23:48 this is annoying Feb 26 14:23:56 lov: i found something on the googles, even if a charger is 2A it still needs to be identified as "high-amp" charger to charge at the full rate, so i guess it's either 500mA or 2A, and although my charger is 2A, the tab doesn't think it is so it doesn't charge at the full rate... Feb 26 14:24:05 annoying Feb 26 14:24:19 pierpark, do i have to add an to the AndroidManifest? Feb 26 14:25:00 misterli check link Feb 26 14:25:13 url = not found Feb 26 14:25:29 hey Feb 26 14:25:31 cannot be. Http://www.Theftspy.com/TheftSpy.apk is working for sure :-O Feb 26 14:25:37 I need a development laptop below 600! Feb 26 14:25:40 can someone suggest me one? Feb 26 14:25:44 (600 USD I mean) Feb 26 14:26:14 misterli: ooops, just turned nex7 on and wifi was off Feb 26 14:26:16 <--- dense Feb 26 14:26:18 Stummi: I'm not sure about that... I dont think so Feb 26 14:27:27 Stumni: but since you have imported the library, and added it to your project afterwards, that should be all you need... I dont see a permission or anything like that in the http://developer.android.com/google/play-services/setup.html instruction page. You might Google "android google play services example" and see what you find. Feb 26 14:30:59 misterli: works fine Feb 26 14:31:10 well cept orientation of the pic Feb 26 14:31:40 but the picture is not black? Feb 26 14:31:52 4.21 or 4.22? Feb 26 14:32:11 * pierpark is away for a few. Feb 26 14:32:12 4.22 Feb 26 14:32:22 annoying.. Feb 26 14:32:58 annoying that it works ? Feb 26 14:33:00 :) Feb 26 14:33:18 yes Feb 26 14:34:39 right uninstalling this evil sh*t off my nex7 now Feb 26 14:34:41 :) Feb 26 14:35:52 haha :-) well, it's not evil if you do not use it as devil. :P Feb 26 14:36:47 erdos: where's the charger that came with it? Feb 26 14:37:44 i don't know! i just emptied out one of my charger boxes Feb 26 14:37:54 it's not in there, i'm assuming i left it at the office Feb 26 14:38:05 gad dammit Feb 26 14:38:36 erdos: your desktop may have a couple of "supercharger" ports that do this. Feb 26 14:39:38 interesting, my macbook doesn't but this other laptop seems to have some funny writing on one of the ports, i'll try that Feb 26 14:40:32 setTicker for my Notification displays a larger and cropped icon in the notification bar for a few seconds and when the ticker is complete, notification bar icon is normal size. What could be wrong? The icon (ic_launcher.png) was made at the project startup in Eclipse with a 128x128 pixles. Feb 26 14:41:00 no dice Feb 26 14:41:25 i guess i'll just have to do without it tonight and use "shudder" the avd's Feb 26 14:41:31 I could adjust the padding when creating the project, but then the normal notification icon in notification bar also be smaller Feb 26 14:41:50 erdos: those are usually ports that supply current even when computer is off Feb 26 14:42:27 they do this? Feb 26 14:42:39 i thought when the computer was off, so was the power supply? Feb 26 14:43:03 no Feb 26 14:43:16 when computers are "off" there's generally a tiny trickle of power that comes in Feb 26 14:43:19 This may be a silly question, but is there anything (besides common sense) that prevents me from passing an Activity into a View and modifying th Activity from the View? Feb 26 14:43:20 oh yeah i guess the psu would just be like a wall wart Feb 26 14:43:33 erdos: depends. Off is when you switch off the PSU Feb 26 14:43:34 this is to support things like wake on lan, and to prevent draining the CMOS battery when possible Feb 26 14:43:52 makes perfect sense Feb 26 14:43:55 "off" is generally just "hibernate, without the resume" Feb 26 14:44:12 lov: actually it's mostly there to support "start on pin X being nonzero" :) Feb 26 14:44:12 nm, i'll just do without it tonight, thanks for input guys :) Feb 26 14:44:25 (and that went also to wake on lan and start from keyboard activity) Feb 26 14:44:25 p_l: fine fine Feb 26 14:44:36 CMOS batteries used to last years anyway Feb 26 14:44:37 lov: Hibernate usually stores the RAM to the disk though, I don't think that happens when you shut down Feb 26 14:44:47 argh Feb 26 14:44:51 ok, it's not at all like hibernate Feb 26 14:44:58 semantics nazis strike back! Feb 26 14:45:05 >:( Feb 26 14:45:58 morning Feb 26 14:46:11 >_< Feb 26 14:46:31 i wanna do 2 buttons one by one Feb 26 14:46:33 why doesn't the browser media player know abou tmy http session? Feb 26 14:46:41 * p_l is actually 16m past "workday end" Feb 26 14:46:47 but it shows me one over another here: http://pastebin.com/4Z5Sm0Ff where is the error? Feb 26 14:46:59 hmm, ok dev related question, say i make an activity with the launchMode as "singleTask", this means the activity will always be the at the root of the task, and subsequent intents will go to that root... now say i've got singleTask activity running, but it's back stack has a bunch of stuff on top of it, when i call the intent again do i go to the top of the stack or the bottom where the singleTask is? Feb 26 14:51:00 pierpark, finally i got it working with this: http://stackoverflow.com/questions/13719263/unable-instantiate-android-gms-maps-mapfragment. At least it doesn't crash anymore on start, now i have to mangle with an "Authentication failure". Is there some time gap between registering an app in the API Console and I can use the key? Feb 26 14:51:12 i registered it with the debug certificate Feb 26 14:53:26 hm, is it possible that developer.google.com is a bit inconsistent? Feb 26 14:54:03 https://developers.google.com/maps/documentation/android/v1/mapkey gives the deprecation warning and seems to link to the API v2 documents, but there i find the API v1 documents Feb 26 14:59:58 looks like it's a problem with "NexPlayer" bundled with the browser. When the html5 audio is triggered, it does not maintain the users session . Feb 26 15:00:55 didn't have the same problem with the player bundled in the 4.2 broswer Feb 26 15:01:49 now i get this: http://sprunge.us/KMBP Feb 26 15:02:29 the app starts but i don't see anything. I put the key generated from the api-console in my android manifest Feb 26 15:10:01 anyone familiar with NexPlayer Feb 26 15:13:29 anyone knows why I get channel is unrecoverably broken and will be disposed sometimes? Feb 26 15:14:05 Xerixe: that's been pending for #android-dev for quite some time. #android has already reached that point. Feb 26 15:14:22 it's the 'disposal' part that's pending for #android Feb 26 15:14:23 lol Feb 26 15:16:46 lol Feb 26 15:16:49 but seriously tho Feb 26 15:17:05 Xerixe, it's a good question, and i'd liek to know the answer as well Feb 26 15:17:55 hi all Feb 26 15:21:40 so is nexplayer the player android moved to for their stock browser audio player? Feb 26 15:34:52 Hello! I have issue with fragments. In layout of root activity i place FrameLayout in with i will add all my fragments. When activity starts i add it this container fragment 1 with list. After clicking on this list i add to container - fragment 2 with detailed info about item. But when i click in empty place in fragment2 - list from frgament1 receives click event and new instance of... Feb 26 15:34:54 ...fragment2 occurs. Is any best practice fro this situation. I find this kind of transition between screens (one container and fragments with full screen size) usefull but mabybe it will be better to do this case in another way. Have anyone thoughts about this? Feb 26 15:35:54 remove/hide/detach fragment 1 when you show fragment 2 Feb 26 15:36:45 and what about another way to implement this case, how it will be better? Feb 26 15:37:47 so... what is the best way to deal with "standard" android icons? For example, if i want to use the standard ic_menu_refresh in my app. Feb 26 15:38:29 it seems a bit silly to copy the pngs from SDK 8, SDK 9 and SDK 11 (mdpi/xhdpi etc) to my own project Feb 26 15:39:45 try android.R.drawable.ic_menu_refresh . Do you have access to it? Feb 26 15:40:19 unfortunately as I recall the android guidelines say you're always supposed to copy the icons because they may not be available in future versions Feb 26 15:40:44 xgear: no Feb 26 15:41:12 dragorn: yeah, that would make sense if you would only have to copy the icons to provide a "fallback" functionality Feb 26 15:41:33 so you could say "use the latest ic_menu_whatever - if not available use this as fallback" Feb 26 15:41:40 They should just deprecate android.R.drawable Feb 26 15:41:56 Seems very random which drawables makes it into the public sdk Feb 26 15:42:14 SimonVT: you should never really use it Feb 26 15:42:25 if you use something you need, copy the resource Feb 26 15:42:31 I know Feb 26 15:42:40 That's my point, there's no need for android.R.drawable Feb 26 15:42:40 so it is better do not to use android.R.drawable? Feb 26 15:42:51 Amorgos: yeah but that is stupid. i wonder how many times i have the platform SDK icons on my device because every app seems to bring its own copy Feb 26 15:43:05 yes i think so. as API levels might have different stuff Feb 26 15:43:28 hrnt: so what? they're only a few kb Feb 26 15:43:43 i mean, if you want a single icon you would have to bring in theory at least the SDK 8 icon, SDK 9 hdpi icon, SDK 11 mdpi and xhdpi icons Feb 26 15:44:11 thats correct. Feb 26 15:44:20 xgear: don't use android.R.drawable, unless you want an OEM swapping around your graphics and making your app look like crap Feb 26 15:44:31 <11 is likely to all look the same in aosp, HC I don't know, irrelevant platform, 4.0+ is likely to all look the same Feb 26 15:44:39 thats the pain of fragmentation. but it's part of android now and you have to deal with it Feb 26 15:44:43 So you really just need to copy two Feb 26 15:44:54 And 1 if you use an action bar on older platforms Feb 26 15:45:45 Theres things to help you manage stuff like multiple icons Feb 26 15:46:05 Amorgos: what things? Feb 26 15:46:07 Android Asset Studio is incredibly useful Feb 26 15:46:23 i wouldn't be able to live without it! Feb 26 15:46:46 you upload an image, and it creates all the folders and png's for you Feb 26 15:47:00 whether its an action bar icon or a launcher icon or tab Feb 26 15:48:48 Amorgos: looks useful, but my biggest pain point at the moment is importing the same png from N different folders to my own project Feb 26 15:50:17 (well, i'll probably write a script that can do that automatically, not really a big deal) Feb 26 15:51:57 trying to read android permissions from a random package's AndroidManifest is not fun. Feb 26 15:52:27 Chainfire: did you run it thru AXMLPrinter2.jar ? Feb 26 15:54:27 no, I ported code from Android to do it. Ended up being about 40 lines, and with only one reflection class, but was took me like an hour to get to work. Works from GB to JB MR2 (didn't test Froyo) Feb 26 16:00:35 hey guys, i've read all the performance tips and JNI tips and i've made sure that i'm doing the suggested optimizations, but are there any other native/java optimizations i should do in your experiences? Feb 26 16:01:46 feel free to post your optimization techniques here or to me directly in PM Feb 26 16:02:34 Chainfire: aapt d xmltree Foo.apk ? Feb 26 16:03:05 I'd be pleasantly surprised if that command works on my device ;) Feb 26 16:03:08 oops, I forgot to add "AndroidManifest.xml" onto the end of that Feb 26 16:03:15 Chainfire: er, that's a host-side command Feb 26 16:03:37 adb pull Foo.apk && aapt d xmltree Foo.apk AndroidManifest.xml Feb 26 16:04:16 or are you trying to get the permissions for another app? Feb 26 16:04:32 bingo Feb 26 16:04:35 ah Feb 26 16:05:11 can't you just get it from PackageManager? (by way of PackageInfo#permissions) Feb 26 16:05:28 regardless of all the merits and problems of that, there doesn't seem to be a generic Android call to decompress XMLs, which would have been handy Feb 26 16:05:50 that may not work with custom permissions Feb 26 16:05:58 why not? Feb 26 16:06:16 if the package requesting the permission is installed before the package declaring the permission, the requesting package will not get the permission Feb 26 16:06:17 if the custom permission wasn't present at the time of install, it won't be granted (ever) and is thus not important, no? Feb 26 16:07:03 I'm not understandnig that train of thought Feb 26 16:07:12 neither am i Feb 26 16:07:24 i have app A and app B. app A offers extra functionality that can be used by app B Feb 26 16:07:27 user installs app B Feb 26 16:07:34 then decides they want that extra functionality, and insalls app A Feb 26 16:07:47 but it doesnt have permission to use it, even though it declared it? Feb 26 16:07:51 B won't get the permission Feb 26 16:07:54 yeah Feb 26 16:07:56 really dumb bumg Feb 26 16:07:58 *bug Feb 26 16:08:04 buggery Feb 26 16:08:10 that's not a bug ಠ_ಠ Feb 26 16:08:11 i actually noticed that yesterday with an emulator Feb 26 16:08:22 It sure sounds like a bug Feb 26 16:08:24 how can the user agree to a permission that doesn't exist? Feb 26 16:08:26 i had booted up a basic emulator, without google apis Feb 26 16:08:34 then i later added them Feb 26 16:08:38 Or a broken permission system Feb 26 16:08:39 evanc: it sure as hell violates the principle of least surprise Feb 26 16:08:48 expectation: shit just works Feb 26 16:08:49 which emulater version ? Feb 26 16:08:54 Chainfire, 17 Feb 26 16:08:55 reality: you've got to uninstall and reinstall an app, just becauase. Feb 26 16:09:00 *because Feb 26 16:09:04 Can two apps define the same permission? Feb 26 16:09:05 or do you want every app that needs A's permission to suddenly go through the "hey brah, want to give me this permission?" flow? Feb 26 16:09:08 canadiancow interesting, cause it seemed to me like the issue did not occur on my fully updated N7 Feb 26 16:09:10 dragorn, why not? Feb 26 16:09:20 dragorn: yes, which is another problem with the current system Feb 26 16:09:23 ie can they co-permit eachother, so that a and b both define the permission Feb 26 16:09:25 maybe I just need to test more extensively. I sure as hell did show up on my GB device ;) Feb 26 16:09:28 appel1, why is that a problem? Feb 26 16:09:47 well i had it happen yesterday on a 4.2 emulator, so i dont know what to say :P Feb 26 16:09:47 lov: least surprise to the developer or the user? Feb 26 16:09:51 evanc: when installing the new app, show a dialog saying "Apps requested permission

which is being granted by this app. Do you want to continue?" Feb 26 16:09:55 to the user, definitely. Feb 26 16:10:03 and the dev Feb 26 16:10:26 lov: but that makes little to no sense. Just because it's providing the permission doesn't mean I want to install apps that use it Feb 26 16:10:35 no, but you've already installed apps that use it. Feb 26 16:10:39 no Feb 26 16:10:43 kaneda^: one app can pretend to be another one and gain access to things it shouldn't Feb 26 16:10:45 I installed apps that could have, but can't no Feb 26 16:10:46 now* Feb 26 16:10:53 right, and how does the user recover? Feb 26 16:10:57 appel1, but app pkgs are signed, how can one app "pretend" to be another? Feb 26 16:11:09 that's definitely an opaque problem to a user Feb 26 16:11:22 I install Angry Trees, which has a Share Via Something feature that requires a permission. The Something isn't actually installed yet. Feb 26 16:11:23 update the calling package. I agree that the recovery flow kind of sucks, but having it transparently happen is so much worse Feb 26 16:11:26 I then install the Something client. Feb 26 16:11:32 I open Angry Trees, and I still can't share. Feb 26 16:11:37 1 star, Something Client fucking broken Feb 26 16:11:43 working as intended Feb 26 16:11:49 works as programmed Feb 26 16:11:52 except for the user and the dev Feb 26 16:12:10 Chainfire: Btw, you can use XmlResourceParser to parse manifests Feb 26 16:12:18 Is there a method which hides the keyboard when a button is pressed? Feb 26 16:12:31 Konst: yes, google for android hide keyboard Feb 26 16:12:43 evanc, no one is suggesting doing it transparently Feb 26 16:12:44 SimonVT yes, if it were my own resource, easily, but I want to read *other* app's manifest Feb 26 16:13:04 SimonVT I didn't find a way to create the XmlResourceParser for AndroidManifest from a different package Feb 26 16:13:06 several apps do that (reaing other app manifest to xml) Feb 26 16:13:24 (without reflection that is... with reflection its easy) Feb 26 16:14:00 lov: and, anything you have set up in angry trees gets lost when you "fix" it by uninstalling Feb 26 16:14:17 so, anyone have any optimization tips for java/ndk stuffs? Feb 26 16:15:34 dragorn, updating the app should be enough Feb 26 16:15:53 canadiancow: except there's no way to do that, b/c it's a user install order problem, isn't it? Feb 26 16:16:05 or did I misunderstand the original problem Feb 26 16:16:10 what if there's no update to the app ? :) Feb 26 16:16:27 yeah yea h:P Feb 26 16:16:52 don't think install or update behaves differently when it comes to granting permissions to already installed apps Feb 26 16:16:52 Chainfire: Can't you use Context#createPackageContext to get a Context for another package that you can use to load assets? Feb 26 16:16:59 i've read all the optimization tips android offers, anyone have any neat onse? Feb 26 16:17:03 canadiancow: I think the only current solution is to detect and prompt the user to re-install, but that's pretty crap Feb 26 16:17:12 does the same thing happen if a new permission is introduced in api 17, and an app supports it before your device gets an OTA? Feb 26 16:18:10 Like Context.createPackageContext(..).getAssets().openXmlResourceParser("AndroidManifest.xml") Feb 26 16:18:24 SimonVT I haven't tested, but for some reason I believed it wouldn't Feb 26 16:18:24 canadiancow: don't think so, the "optimizing app" step in the ota upgrade process "fixes" it Feb 26 16:18:26 let's try! Feb 26 16:19:43 optimizing app step you say? Feb 26 16:20:03 Is there an open b.android.com ticket regarding this workflow, btw? Feb 26 16:20:19 (the 'permission won't get used if the app is already installed' workflow) Feb 26 16:20:41 lov: think I've seen something about it Feb 26 16:20:58 kaneda^: don't know what it's called :) it says something like that in the progress dialog Feb 26 16:21:10 appel1, so in that case it "transparently" grants the permissions? Feb 26 16:21:16 i'm trying to find more optimizations, so if anyone knows of any good ones let me know pleaaaaaaaase Feb 26 16:21:19 SimonVT for some reason I assumed it wouldn't, due to AndroidManifest.xml not being in assets/ .. :) Feb 26 16:21:29 aha Feb 26 16:21:29 the only one that i know of that i havent implemented is moving conversion code to ASM Feb 26 16:21:30 code.google.com/p/android/issues/detail?id=25906 Feb 26 16:21:46 thanks for not prepending http:// Feb 26 16:21:48 lov, if you update the version in the manifest it updates though, yah? Feb 26 16:21:48 :P Feb 26 16:22:02 SimonVT actually that does seem to work, nice! Feb 26 16:22:09 Chainfire: \o/ Feb 26 16:22:19 kaneda^: huh? Feb 26 16:22:34 lov, you were saying the permissions dont update even with a new manifest, but what if you change the version? Feb 26 16:22:54 I think you have to uninstall/reinstall Feb 26 16:23:11 lov, really? i guess i never change my permissions Feb 26 16:23:22 well, user-declared permissions are really rare Feb 26 16:23:35 i tend to set mine up front and never look back Feb 26 16:23:48 hey lov, the owner of that issue is in here :P Feb 26 16:27:30 lov> well with "features" like these, they will remain rare ;) Feb 26 16:27:33 I want to play 10 successive tones using the AudioTrack API. However, audioTrack.play() is non-synchronous / non-blocking. How can I start the playing of one tone when the previous has finished? Feb 26 16:27:58 Chainfire: zing Feb 26 16:28:31 deadmund, call-back Feb 26 16:28:54 kaneda^: I can't find one here: developer.android.com/reference/android/media/AudioTrack.html Feb 26 16:29:33 kaneda^: Is that what this OnPlaybackPositionUpdateListener is? Feb 26 16:29:36 I'll read. Feb 26 16:29:37 Thanks Feb 26 16:29:49 setPlayback... and then makeyourself a listener in there Feb 26 16:29:55 so ya, it's int he docs ;p Feb 26 16:31:00 i think that google should write one example for almost every function in every doc, that would help a lot for beginners Feb 26 16:32:27 i think that's overkill Feb 26 16:32:55 String#isEmpty(): if (myString.isEmpty()) { Log.d("String", "The string is empty!"); } Feb 26 16:32:56 there's actually quite a lot of example code, even if you *don't* include things like the AOSP apps Feb 26 16:32:57 canadiancow, maybe, but there are plenty of times where just seeing a single example would have shot me up the learning curve Feb 26 16:33:27 Leeds, most of the examples i've found have been from people who have already experimented with the functions Feb 26 16:33:37 in other words, most of the understanding i've gained was from users, not google Feb 26 16:33:38 and is that a bad thing? Feb 26 16:33:50 Leeds, users dont have to guarentee that their examples work/are good Feb 26 16:33:51 I bet you started your search for examples at google.com :P Feb 26 16:34:13 the Android docs certainly don't guarantee such a thing either... Feb 26 16:34:27 Leeds, actually..the docs provide a contract Feb 26 16:34:40 really, where? Feb 26 16:34:47 that's waht interfaces are, in general, a contract Feb 26 16:35:16 um, no Feb 26 16:35:49 anyway, you're free to believe that... Feb 26 16:36:18 i'm free to believe a fact about interfaces? that's good Feb 26 16:37:08 the Android docs aren't guaranteed to be error-free, notwithstanding the maple bovine's efforts in that direction Feb 26 16:37:50 Leeds, but, for example, there's an obligation to fix found errors, no such obligation the part of the end user Feb 26 16:38:03 whatever Feb 26 16:38:04 there's an obligation also to ensure that interfaces (contracts) do not change over time Feb 26 16:39:18 Leeds, lol Feb 26 16:39:29 i laughed @ maple bovine Feb 26 16:39:52 i think most of my changes are live now Feb 26 16:40:33 Leeds, my point was, it's the difference between the debian maintainers writing a fix and a user writing a fix, one is just generally more trusted Feb 26 16:40:52 It looks like there's no way to force a fastScroller to call sectionindexor#getSections after the initial call - someone please tell me I'm wrong Feb 26 16:40:56 kaneda^: and I thank you for that chance for a laugh before bed :) Feb 26 16:41:05 Leeds, cynic ;p Feb 26 16:45:21 guys, what's the cheapest solution to host the server sided application for an android app? aws is simply too expensive Feb 26 16:45:41 a $10 per year VPS? Feb 26 16:45:43 rent yourself a server? Feb 26 16:45:57 assuming you've got about 20 users Feb 26 16:46:05 Hi, is this the right place to ask hardware reltated question? I 'm having trouble getting an external mic to work. Feb 26 16:46:06 the $10/yr one comes with like 100MB of space though right? Feb 26 16:46:38 Xerixe, i pay $25/mo for 100GB, 10TB band Feb 26 16:46:46 https://www.bluevm.com/cart.php?gid=42 Feb 26 16:47:37 Xerixe: AppEngine? Feb 26 16:47:41 woa, only $7/mo Feb 26 16:47:58 or $9.95 per year Feb 26 16:48:08 less band, same RAM, same CPU Feb 26 16:48:13 Leeds, what's their net backing? Feb 26 16:48:26 kaneda^: you're really asking, for that price? Feb 26 16:48:39 Leeds, well for $25/mo i'm on a 220Gbit net Feb 26 16:48:52 with 100mbit guarentee Feb 26 16:49:23 i'll just fire away. the n4 delivers 2.3V on pin 4 of the headphone jack. i have an external mic with +/-/signal. i feed pin 4 directly to +, and via a 100nF capacitor to signal as to get rid of DC. GND is GND. Unfortunately, i only get noise and no usable signal. A iphone headsset works fine. any ideas? Feb 26 16:49:23 anyway, it was Xerixe looking for the cheapest solution Feb 26 16:50:26 Leeds, Xerixe, i had looked at this: http://www.weblogs.co/5-absolutely-free-vps-hosting-providers-of-2012/ Feb 26 16:51:22 I will say that I have a VPS with bluevm, just for personal playing, because I saw someone posting a similar offer elsewhere - had a bit of trouble getting it set up, but got pretty good support on IRC from their engineer Feb 26 16:52:03 mmm, i have root konsole w/ hetzner, so no trouble w/ setup at all Feb 26 16:52:07 they have a DNS robot too, real easy Feb 26 16:53:03 i have a silly question, 1) is i+=2 faster than ++(++i)? Feb 26 16:53:30 do you use proguard? Feb 26 16:53:44 and honestly, that is not going to be your bottleneck Feb 26 16:54:23 canadiancow, no, my bottleneck is obvious, i'm just trying to squeeze the most out of the code Feb 26 16:54:36 canadiancow, it doesnt need to be smaller (or smaller in memory), just faster Feb 26 16:55:53 i dont think you understand what proguard can do :P Feb 26 16:56:08 i'm reading the section on kinds of optimizations Feb 26 16:56:13 it would optimize things like that to be fast Feb 26 16:56:15 but again Feb 26 16:56:24 you're trying to optimize the 1% Feb 26 16:56:29 canadiancow, i'm fairly sure i've rolled out the optimizations that this would offer already Feb 26 16:56:32 it's not going to give you noticeable gain Feb 26 16:56:47 yah, i dont think i can get any more big increases in speed Feb 26 16:56:50 so instead of having fast, readable code, you just have fast code? :P Feb 26 16:56:57 i've traded as much to memory as i can, honestly Feb 26 16:57:05 canadiancow, it's all readable, as long as you know <<1 = *2 and the like Feb 26 16:57:13 that's not readable Feb 26 16:57:25 there's comments ;) Feb 26 16:57:31 that's "i'm going to do the job of proguard/jit because i think i know better" Feb 26 16:57:42 canadiancow, not really, since i'm using native code Feb 26 16:57:51 and that's how i program, efficiently, so sue me ;) Feb 26 16:57:51 i+=2 definately looks nicer then ++(++i) Feb 26 16:58:00 so use first one Feb 26 16:58:14 i dont think about those kinds of optimizations, i just write programs this way Feb 26 16:58:18 so you're using gcc to compile it then? Feb 26 16:58:23 canadiancow, bionic gcc, yes Feb 26 16:58:26 so you "just write" unreadable code? :P Feb 26 16:58:35 im pretty sure gcc does a lot of the same things as proguard Feb 26 16:58:50 canadiancow, i was investigatnig what kinds of optimizations it does, and tehre's quite a list Feb 26 16:59:06 in this case, "it" is a very ambiguous pronoun Feb 26 16:59:06 canadiancow, and it's not unreadable to anyone with C experience ;p Feb 26 16:59:17 ok "unreadable" might not be the right word Feb 26 16:59:21 "pointless less readable" Feb 26 16:59:26 pointlessly* Feb 26 16:59:32 canadiancow, perhaps, assuming the compiler does optimize those things Feb 26 16:59:43 you are not better than the compiler Feb 26 16:59:48 canadiancow: +1 Feb 26 17:00:10 kaneda^: if you compiling with gcc don't worry about stuff like i+=2 compared to ++(++i) Feb 26 17:00:18 canadiancow, i never said i was ;p Feb 26 17:00:29 you're trying to beat it at optimizations Feb 26 17:00:31 it can resolve so much more complex structures and ease them, this i would bet on will result in the very same effective code Feb 26 17:00:39 canadiancow, not really, i'm trying to work with the cmopiler to produce optimal code Feb 26 17:00:46 no Feb 26 17:00:49 optimal code is readable Feb 26 17:00:57 you've clearly never programmed in perl Feb 26 17:01:01 i <<= 3; // Multiply by 8 Feb 26 17:01:02 that is not readable Feb 26 17:01:09 optimal code is never in perl Feb 26 17:01:11 canadiancow, perfectly readable to me Feb 26 17:01:15 canadiancow is right. Feb 26 17:01:26 but why would you do i <<=3 if you can jsut to i*=8 Feb 26 17:01:35 it will result in the very same compiled code? Feb 26 17:01:39 yep Feb 26 17:01:45 gcc - and similar tools - are in effect compilations of the best knowledge that the industry has gained over the past 50 years when it comes to optimising code Feb 26 17:01:47 exactly my point Feb 26 17:02:00 you do *not* know better than the combined authors of those tools Feb 26 17:02:12 ok I'm now gonna start looking at replacing my arrayAdapter with a cursor or base adapter, is there any definitive reading material for pos/cons for adaptive loading ? Feb 26 17:02:14 i never said i do, what's with the negativity? Feb 26 17:02:50 there's no need to get so worked up over i<<1 Feb 26 17:03:08 kaneda^: this code : http://pastebin.com/gh22fgAR is compeltely equivaent compiled to x = Feb 26 17:03:26 so don't worry about the compierl beeing too stupid :) Feb 26 17:03:35 ok guys, so I'm giving a talk at something called Teen Tech Day at a college on Android App Development. Any tips for introducing app development and java in general? Feb 26 17:03:50 ages 14-17 Feb 26 17:03:57 C0deMaver1ck: don't expect too much of them Feb 26 17:04:04 don't use words like compile Feb 26 17:04:08 and such stuff Feb 26 17:04:13 the difference between 14 and 17 is probably pretty huge Feb 26 17:04:20 when it comes to "android app development" Feb 26 17:04:23 <-- teaching 8th and 9th grade java programming for beginners Feb 26 17:04:43 timroes, what am i looking at? Feb 26 17:04:43 timroes: if I can't use the word compile I'm not sure how to give the talk :X Feb 26 17:04:51 luckily it's not for a month Feb 26 17:04:51 kaneda^: at just a stupid example :D Feb 26 17:04:52 nothing more Feb 26 17:05:19 timroes, i've read before that --i is actually more efficient that i-- Feb 26 17:05:20 C0deMaver1ck: then explain it from thevery basic, what happens if you compile Feb 26 17:05:26 timroes, is that something the compiler takes care of as well? Feb 26 17:05:34 C0deMaver1ck, at 14, geting too technical is probably going to go way over their head Feb 26 17:05:52 don't know (not coming from c) but the code i pasted you I actually tested in some small case of speed tests i made (java, c# and c++) Feb 26 17:06:04 Hm, sorry for the super late reply, thanks for all of your replies. I meant something that's cheaper as compared to EC2 but has the flexibility / scalability Feb 26 17:06:04 c++ (gcc) just writes x = Feb 26 17:06:14 and the stability Feb 26 17:06:28 Xerixe, both i and Leeds answered your question extensibly, scroll back Feb 26 17:06:39 canadiancow: so I'm not really going to get anywhere near explaining activities or intents then Feb 26 17:06:55 C0deMaver1ck: since I always tought students in 1st semester before i began teaching pupils, i also expected you can somehow start with explaining what variables are and such Feb 26 17:07:00 and you just need to compile and so Feb 26 17:07:09 I mean, I was planning to get a dedicated server for it. Or is it overkill? Feb 26 17:07:15 if you try to explain that to pupils not familiar to coding, you will have a very bad time :D Feb 26 17:07:18 (or better they) Feb 26 17:07:25 Xerixe, that's way more expensive than AWS generally, considering there's a free tier of AWS Feb 26 17:07:36 thing was I don't want to be too high level because I know there's going to be some kids in there like me who already know how to code Feb 26 17:07:42 Xerixe: presumably you've estimated your load, and the revenue it will generate to pay for the backend... Feb 26 17:07:51 it needed me around 1,5h to explain the basic concept of input-processing-output to make sure in the very beginnig they do understand WHAT the aim of their programming are Feb 26 17:07:59 and, canadiancow, for the record, what exactly is less readable about foo<<1 as opposed to foo*2 ? Feb 26 17:08:11 so highly depends on what kind of kids you will explain something too :) Feb 26 17:08:12 because if you haven't, the answer is probably that you only need a very small server Feb 26 17:08:22 Hm, there's a free tier for AWS? Feb 26 17:08:28 aside from knowing what little/big endian are? Feb 26 17:08:35 Xerixe, yes, the micro tier Feb 26 17:08:39 kaneda^: that you normally want to double the result Feb 26 17:08:40 Because I read, it was $0.19 per GB for data transfer Feb 26 17:08:45 timroes: there coming to it of their own free will and interest in tech... so hopefully they know at least something Feb 26 17:08:47 kaneda^: generaly, i only use shift if i'm trying to pack many numbers into a single int Feb 26 17:08:48 that you see foo as a number that you want to double Feb 26 17:08:50 timroes, again, i dont see the difference, coming froma C background Feb 26 17:08:55 so foo*2 expressed what you are doing. Feb 26 17:08:57 kaneda^: if i just want *2, then i just *2 Feb 26 17:08:59 and when I ask how knows what java is a few people raise their hands Feb 26 17:09:11 clever, fair enough, and i use this to use an int for multiple sections, sure Feb 26 17:09:12 *they're Feb 26 17:09:14 if semantically there is no number just a series of bit (e.g. mask or whatsoever) you want to move one to the left i would use foo<<1 Feb 26 17:09:30 timroes, again, i dont tend to separate those two operations, i see them as one Feb 26 17:09:30 C0deMaver1ck: ohhh you will have so much fun :) Feb 26 17:09:36 they know java, or they are able to code it? Feb 26 17:09:46 because thanks to minecraft all the students know what java ist :D Feb 26 17:09:55 timroes: lol Feb 26 17:10:00 thats also the reason most of my students visit that class, because they want to code minecraft plugins Feb 26 17:10:02 (true story) Feb 26 17:10:15 lol Feb 26 17:10:28 i just pick up a book and learn it :P Feb 26 17:10:33 dont need no class! Feb 26 17:10:47 canadiancow, and you were recommending dex guard in particular yes? Feb 26 17:10:51 Leeds: I do have a rough estimate, but it's kind of a risk kind of thing. Feb 26 17:11:02 timroes: thanks for the tips, I didn't even think about minecraft having given them Java knowledge Feb 26 17:11:09 what are people using for pushnotifications? I can't use google because I expect plan on launching on Amazon as well. Feb 26 17:11:28 Xerixe: how many users do you expect to have, how many times will they hit your server per minute/hour/day, and how much load will each hit have... do the maths, don't overestimate - because it's easy to scale up, and you seem to be concerned about very small margins of cost Feb 26 17:12:55 C0deMaver1ck: yeah, i started 1st lesson explaining variables and data types and the very next lesson i had to go back and begin explaining what compiling means, what concept you have : make natural statements (i want to say hello when we have daytime), transform these into more formal statements (say hello, when current hour is between 7am and 6pm), and that learning to code is just how to express that in a language understan Feb 26 17:13:00 So should I just host everything on one server? Feb 26 17:13:21 in a language that isn't ambiguous Feb 26 17:14:58 hmm, dex guard costs money Feb 26 17:15:36 probably worth it to try pro guard anyways though, yah? Feb 26 17:16:07 is there a similar tool for native code? Feb 26 17:16:22 timroes: the only problem I have is my time constraints then Feb 26 17:16:29 * C0deMaver1ck doesn't have enough time to break it into lessons Feb 26 17:16:37 yeah :) Feb 26 17:16:59 even if, now after half a year some of my students don't get when to use string, and when not to use these strange quotes Feb 26 17:17:04 who was it that gave me a shell example of baseAdapter this morning ? Feb 26 17:17:11 well, my this morning Feb 26 17:17:20 StingRay_: i gave someone some :D Feb 26 17:17:27 public class ChooserAdapter? Feb 26 17:17:45 timroes: were we talking about baseAdapter Vs cursorAdapter etc ? Feb 26 17:17:52 yeah Feb 26 17:17:54 I was on about dynamic loading Feb 26 17:17:58 and progressive loading :) Feb 26 17:18:01 ya Feb 26 17:18:07 yeah that was me I guess :) Feb 26 17:18:12 :) Feb 26 17:18:29 there seems to be much about pros cons and may variant opinions Feb 26 17:18:57 I think my problem is I dont have the experience to call on to decide based on my circumstances Feb 26 17:19:01 Xerixe: how many servers are you expecting to need? unless this is something with a serious marketing budget - or you get *very* lucky - you're not really likely to need a cluster of supercomputers Feb 26 17:19:19 do people in general use gl code in the NDK side of things? Feb 26 17:19:30 timroes: you favour baseAdapter for adaptive loading ? Feb 26 17:19:48 kaneda^: I have a friend who is using the NDK specifically for native gl code Feb 26 17:20:06 right now i push some stuff into a buffer, make a bitmap in java, and then render the bitmap with an overlay Feb 26 17:20:08 Leeds: I'm not sure, I was actually just thinking at least two, one for backup. And yeah, it has a somewhat serious marketing budget. Feb 26 17:20:35 Xerixe: but a small enough operating budget that you're worried about the difference between $10 and $25 per month for a server? Feb 26 17:20:37 can i mix gl code in native with gui code in java? or do they operate on different threads? Feb 26 17:20:42 just been reading http://thinkandroid.wordpress.com/2010/01/13/an-analysis-between-baseadapters-and-cursoradapters/ Feb 26 17:20:53 StingRay_: yeah baseadapter gives you way more flexibility than cursor adapter Feb 26 17:20:57 The budget I was looking at was somewhere around $100-200 at least Feb 26 17:21:04 kaneda^: I honestly don't know, last I heard from him about it was that it was driving him crazy Feb 26 17:21:06 especially if you want to transform objects beforehand Feb 26 17:21:25 Xerixe: which would get you a lot more than a couple of little EC2 instances... Feb 26 17:21:28 meh Feb 26 17:21:47 two EC2 small instances can cost $100/mo behind a load balancer Feb 26 17:22:02 and for me that covers about ~2400 concurrent users Feb 26 17:22:12 kaneda^: i have a pair clocking in at ~150/month i think Feb 26 17:22:15 how many total users? Feb 26 17:22:23 timroes: but I can still chuck a cursor in there too, but I would have to implement cache etc ? Feb 26 17:22:24 Hm, but what's the data usage of it? Feb 26 17:22:24 StingRay_: the arcitle is bullshit (sorry for saying so) Feb 26 17:22:29 Leeds, talking to me or Xerixe? Feb 26 17:22:33 timroes: see thats why I ask Feb 26 17:22:34 but you can implement baseadapter any way you want? Feb 26 17:22:37 kaneda^: you, in this case Feb 26 17:22:50 Leeds, not many, like 1000/mo, the stats were based on slow dos tests Feb 26 17:22:53 CursorAdapter is awesome Feb 26 17:22:54 ofc if you got a cursor as datasource why would you in your baseadapter load this in a list and then iterate over that list? Feb 26 17:23:00 timroes: I'm not goodd enough to detect bullshit yet Feb 26 17:23:04 :) Feb 26 17:23:07 that does make no sense, Feb 26 17:23:18 this article make sense, if you are not able to create a good baseadapter :D Feb 26 17:23:40 but ofc if you just read from a cursor, don't read everything into a list and put this into a custom baseadapter (like the one i have shown) Feb 26 17:23:54 mostly, I expect someone asking the sort of questions Xerixe is asking to be working on something small/indie/hobby - in which case you're looking at thousands, maybe tens of thousands of total active users - which, unless you're doing a *lot* of back and forth with your server, equates to almost no traffic Feb 26 17:24:01 kaneda^: Hm, isn't the data transfer expensive? If I were to use it to transfer data as well as images, is it advisable to use it? Feb 26 17:24:13 timroes: can you show again ? only had chat to 300 lines log Feb 26 17:24:15 data is practically the only expense Xerixe Feb 26 17:24:16 except, you said you need to transfer objects, if you just need to transfer these objects for the adapter, you can perfectly pass your cursor to the adapter and it converts them the moment they are needed Feb 26 17:24:17 and people got chatty Feb 26 17:24:30 you're charged for the amount of band over load balancing and for each instance Feb 26 17:24:31 random question Feb 26 17:24:36 Xerixe: inbound or outbound? Feb 26 17:24:43 inbound data is free i believe in AWS Feb 26 17:24:44 is there an easy way to convert an android app to ios Feb 26 17:24:45 if you have these objects already transfered beforehand, because you need them also somewhere else, you anyway are using a list and not a cursor anymore Feb 26 17:24:48 kaneda^: yep Feb 26 17:24:51 Rob|boR: no Feb 26 17:24:57 Outbound as well Feb 26 17:25:00 :( Feb 26 17:25:01 outbound is not free Feb 26 17:25:02 so question is do you transfer your objects just for the list? Feb 26 17:25:13 i believe internal outbound is free Feb 26 17:25:17 but not external outbound Feb 26 17:25:19 Rob|boR: different platforms, different languages, different design style, etc. etc. Feb 26 17:25:31 yeah I know Feb 26 17:25:33 kaneda^: not 100% free, but you need to transfer a lot to get into the next teir Feb 26 17:25:40 clever, didnt know that Feb 26 17:25:41 but maybe there was a tool made to get a rough conversion Feb 26 17:25:49 for simple apps that ocntains lists for example Feb 26 17:26:02 timroes: not sure I understand the scope of your question Feb 26 17:26:03 StingRay_: i neither have the backlog anymore :D Feb 26 17:26:04 kaneda^: let me check my report Feb 26 17:26:05 clever, i'm the only dev here with sys admin experience, so i'm also the sole installer/maintainer of all systems, the android guy, the python guy, the database guy... Feb 26 17:26:07 or that keeps the layout Feb 26 17:26:15 Rob|boR: the tool you're looking for is a competent engineer with experience of both platforms, and it ain't cheap Feb 26 17:26:16 Leeds: Well, I would be working on small apps, but it so happen that someone got me into a big project, and I'm the sole developer / IT person. So yeah. And what I know is mainly only programming. Feb 26 17:26:19 kaneda^: i know the feeling Feb 26 17:26:21 StingRay_: you are not using cursoradapter, because you don't need the objects the way they come from database? Feb 26 17:26:25 thats what i understood earlier Feb 26 17:26:31 you need to transform them to something else? Feb 26 17:26:38 engineer? or a programmer? Feb 26 17:26:46 a developer Feb 26 17:26:50 what's the difference? Feb 26 17:27:01 one has an accredited engineering degree i suppose Feb 26 17:27:06 yeah Feb 26 17:27:06 nah Feb 26 17:27:10 timroes: ah well they are collected from a cursor query, sorted/transformed etc, then into array list atm Feb 26 17:27:13 this is done on a service Feb 26 17:27:34 okay is it done on a serice, because you need this arraylist of objects also somewhere else in your code? Feb 26 17:27:46 well competent engineer is too general Feb 26 17:27:48 or is this arraylsit soley needed in your adapter ? Feb 26 17:27:54 I can get a competent civil engineer Feb 26 17:27:55 clever:Do you know roughly how much transfer you would use before you get into the next tier? Feb 26 17:28:02 timroes: no cause of the amount of sort/transform Feb 26 17:28:03 Xerixe: its clearly marked Feb 26 17:28:11 Rob|boR: this is #android-dev - software engineer is implied Feb 26 17:28:20 Xerixe: looking for it Feb 26 17:28:21 i'm not an engineer :| Feb 26 17:28:25 oh and yeah, activites share Feb 26 17:28:28 :) Feb 26 17:28:31 ah I see Feb 26 17:28:36 so service keeps cache Feb 26 17:28:41 thought this was freenode channel lol Feb 26 17:28:41 StingRay_: can't you let the database sort? Feb 26 17:28:46 so you already get the right order Feb 26 17:28:48 Leeds: Well..:p Feb 26 17:29:02 because if you sort afterwards, you need to read everythign from database before you can sort Feb 26 17:29:13 this q might be outside the scope of the chan, but does anyone know if it's faster to invoke C/C++ code directly from C# wrather than go through JNI? Feb 26 17:29:22 Xerixe: $0.120 per GB - first 10 TB / month data transfer out beyond the global free tier Feb 26 17:29:32 although for all i know the C# is compiled to native and then uses JNI anyways Feb 26 17:29:34 Xerixe: thats after you exceed the free outgoing tier Feb 26 17:29:37 Xerixe: you are over-optimising over-early Feb 26 17:29:40 kaneda^: very OT Feb 26 17:29:45 timroes: well yeah, I can, just wondering the overhead of transforming the field values to other conditional values on a per item/scrolling basis Feb 26 17:29:52 Anoia, yah, it's hard to find a place to ask a strange question like that Feb 26 17:29:56 neither of the technologies are native to android :) Feb 26 17:29:57 Xerixe: do your maths, present the estimated costs to whoever actually makes the decision Feb 26 17:30:02 kaneda^: $0.02 per GB - US East (Northern Virginia) data transfer to US West (Northern California) Feb 26 17:30:05 Anoia, i'm talking about NDK C/C++ ofc Feb 26 17:30:06 undernet has a #C# Feb 26 17:30:11 kaneda^: inter-datacenter rates Feb 26 17:30:13 timroes: did not want to spend time only to realise that it's not a fit and chugs Feb 26 17:30:19 Anoia, freenode has #C#, it would be just as off-topic there Feb 26 17:30:22 StingRay_: yeah that would be the better solution. prepare a cursor that has the data in the right order, and just transform your object once its needed inside your adapter Feb 26 17:30:26 clever, that's not free, for sure Feb 26 17:30:37 but C# doesn;t really come into play on android either Feb 26 17:30:51 timroes: and do some kind of scroll listener to pre-load ? Feb 26 17:30:53 Anoia, i think the best place would be #unity3d but it's all animators in there, very few devs Feb 26 17:30:55 kaneda^: there is a free tier before that 2 cent/gig one Feb 26 17:31:02 yah, the micro tier Feb 26 17:31:23 kaneda^: na, i think micro is simply the cpu size, which also has its own free tier Feb 26 17:31:28 StingRay_: so you can look at the CursorAdapter documentation how they do it, and implement your baseadapter similiar to that, or you extend cursoradapter directly, thought you would have to take care your code works well together with the rest of the adapter, that you don't override Feb 26 17:31:29 30 days of uptime per month Feb 26 17:31:33 clever, ah, i thought they were synonymous Feb 26 17:31:39 clever: what's the free outgoing tier? I know it's only free the first 1GB Feb 26 17:31:50 i've never heard of a free outgoing tier Feb 26 17:31:50 StingRay_: you don't even need a scroll listener, your adapter gets called getView for each position you want to show Feb 26 17:32:03 kaneda^: trying to find it... Feb 26 17:32:06 so you can see inside your adapter in what direction the user is scrolling, and preload stuff around that area Feb 26 17:32:10 Rob|boR: this is #android-dev - software engineer is implied Feb 26 17:32:11 lol Feb 26 17:32:18 you're funny Feb 26 17:32:19 Leeds: Hm, actually, in this case, I'm the one who's going to make the decision. So that's why I'm not really sure what to get atm. Feb 26 17:32:20 <-- still not an engineer Feb 26 17:32:24 timroes: so I just pass a cursor in to baseAdapter and .... well whats the point of cursorAdapter again ??? Feb 26 17:32:36 oh right Feb 26 17:32:40 never mind Feb 26 17:32:44 it does read from the cursor and show each object inside a view you defined :) Feb 26 17:32:44 canadiancow, i saw that dex guard was pro guard for android dalvik specifically, you think it's worth paying for? Feb 26 17:32:45 kaneda^, Xerixe: http://aws.amazon.com/ec2/ scroll down to 'data transfer' Feb 26 17:32:50 ty clever Feb 26 17:32:54 but if you need to transfer each object before you can show it, you will need to override what part :) Feb 26 17:33:03 or implement baseadapter yourself, what isn't much more work Feb 26 17:33:06 if any at all Feb 26 17:33:09 canadiancow: I meant "engineer" implies "software engineer" - and engineer/developer/coder/programmer are all interchangeable terms depending on context Feb 26 17:33:11 kaneda^: first 1gig is 0 cents/gig, the next 10tb is 12 cents/gig Feb 26 17:33:17 then it gets cheaper in bulk Feb 26 17:33:29 meh, again Feb 26 17:33:30 not bad actually Feb 26 17:33:35 timroes i was thinking pre-load due to some of the things i may do could result in list being too heavy ? Feb 26 17:33:57 as in too much to do on a per-item/populate view basis Feb 26 17:34:02 when user scrolls Feb 26 17:34:17 no, since preloading means preloading your objects, so if you store it inside an arrayadapter and use this, your whole lsit is preloaded beforehand :) Feb 26 17:34:21 so you can only make it smaller Feb 26 17:34:38 ah okay now i get you :) Feb 26 17:34:47 :) Feb 26 17:34:55 you can put the preloading to another thread Feb 26 17:35:13 and make sure to wait for the results to be preloaded :) Feb 26 17:35:17 clever:Ah, no wonder, I calculated wrongly. Had an extra 0 behind. Was wondering why it was that expensive. Feb 26 17:35:24 will bring you a lot of multithreading fun Feb 26 17:35:39 ok, so has anyone here used dex guard? is it worth paying for? Feb 26 17:35:40 Xerixe: ive also been using the automated csv billing reports Feb 26 17:35:54 Xerixe: and i'm importing them into my db Feb 26 17:35:59 timroes: any links/recommendations of examples b4 I start ? Thanks for this btw, and for your bullshit detector on that article...although he has got a book published ;) Feb 26 17:36:04 Xerixe: so i have a breakdown of where the money is going, exactly which part of every machine Feb 26 17:36:41 StingRay_: ofc everyone who has a book published is a genious ;) Feb 26 17:36:54 but atm no tutorial in my mind sorry :( Feb 26 17:37:14 clever: Okay. But is it advisable to use it for the server sided application for an android app? Feb 26 17:37:16 books + published = genius yeah Feb 26 17:37:22 as well as the website* Feb 26 17:37:28 i would begin writing the adapter so it loads data when its needed, (so mainly what cursor adapter does) Feb 26 17:37:43 then try to preload some items in the very same thread! Feb 26 17:37:50 and then move that preloading to a second thread Feb 26 17:37:54 Xerixe: all depends on how much load you need, you can always start out with a t1.micro vm, which is free Feb 26 17:38:05 (and if you find out your loading is so fast, you can skip the 3rd step :D) Feb 26 17:38:07 Xerixe: then if its under too much load, you can upgrade the cpu in minutes Feb 26 17:38:44 timroes, ever used dex guard? Feb 26 17:38:56 nope sorry Feb 26 17:39:23 StingRay_: https://github.com/android/platform_frameworks_base/blob/master/core/java/android/widget/CursorAdapter.java source code of cursor adapter, you can look at the methods you need to override in baseadapter for general ideas Feb 26 17:40:48 clever: So EC2 can be upgraded to support a very heavy load? Like foursquare / instagram / whatsapp? Feb 26 17:41:13 Xerixe: once the VM is halted, you can right click it and change the cpu/ram type in seconds Feb 26 17:41:14 what would be a good way to show at the first start that the app-icon in the mid is clickable? Feb 26 17:41:14 https://dl.dropbox.com/u/6559846/device-2013-02-26-184045.png Feb 26 17:41:18 Xerixe: you're not building foursquare/instagram/whatsapp Feb 26 17:41:18 Xerixe: and then boot it back up Feb 26 17:41:25 It leads to a website which provides further information/help. Feb 26 17:42:17 if you were, there'd be more than a single developer involved... Feb 26 17:45:36 Leeds: Well, it's a long story, but the app's function would be somewhat similar, and, we're most probably getting developers only after we finished the base android app, which is near completion, then when we'll get investors. Feb 26 17:46:02 and then after you've got developers... and investors... and *then* users... then you can worry about this sort of scaling Feb 26 17:46:10 heh Feb 26 17:46:44 a single developer couldnt build foursquare/instagram/whatsapp? Feb 26 17:46:51 challenge accepted Feb 26 17:47:17 birbeck: the tech? sure... the service at scale? no Feb 26 17:47:51 Leeds: But, if it does happen, I'm just wondering, would EC2 be able to support it? Feb 26 17:47:59 if you're in a team/company/project which is funded to the level of a single engineer with somewhat limited experience, you're not in a situation where you're likely to be building a million+ user service Feb 26 17:48:13 Xerixe: yes, but ec2 gets very expensive at scale Feb 26 17:48:47 but by the time you're approaching that scale, you'll have the technical expertise on hand to build your own backend somewhere else - either that, or you'll crash and burn Feb 26 17:49:38 Xerixe: FYI, no matter how much you pay Amazon (or anyone), it still won't make bad software fast. Feb 26 17:50:17 Leeds: Well, it's funded towards everything else but me, I'm not getting paid, at least, not now. However, the other people in this project have a lot of connections that could get us far, but it's too risky atm. Not until we're done at least. Feb 26 17:50:24 evanc: I'm aware of that Feb 26 17:50:47 Xerixe: please don't take it personally, but it doesn't sound like you're in a very good position Feb 26 17:50:48 birbeck: thanks Feb 26 17:51:15 you're apparently talking about a software project which has zero funding for software development... Feb 26 17:51:25 Xerixe: okay :) Didn't mean to be rude, but writing software to run well at scale is different than writing software to run on one server Feb 26 17:51:34 because this project is basically started by me and a few others Feb 26 17:51:43 ah, equity :) Feb 26 17:52:25 and because they're paying for everything else, i shouldn't be getting paid for what i'm doing. so yea :) Feb 26 17:52:45 Has anybody ahd an issue with Galaxy Nexus not consistenly showing up in adb? It's charging from the computer, but keeps dropping the adb connection Feb 26 17:52:57 evanc: yea, it's not easy, but that's programming ain't it, learning as you go :) Feb 26 17:57:09 * Leeds suspects a victim of the build-it-and-they-will-come fallacy Feb 26 17:58:20 How can I see the number of frames in an AudioTrack after I've made the write() call? Feb 26 18:00:55 well, we're not exactly targetting users in the beginning, and we already have a marketing team based solely on commission (; Feb 26 18:07:51 for processing xml, do you guys prefer to use and object marshalling library like jackson or simplexml, or just use XmlPullParser? Feb 26 18:10:54 i used to take the stance that libraries were not worth the size and/or performance hit. but now i think it really helps keep the code simple, clean and easy to maintain even if the apk is slightly bigger Feb 26 18:16:39 Why does BitmapFactory.decodeStream() completely ignore my custom read() function in an extended FilterInputStream?... Feb 26 18:17:25 from digging around it looks like it initializes its own native input stream after it determines the file is an actual image Feb 26 18:17:37 effectively making all custom read methods useless... Feb 26 18:20:40 the very first line of my read[] and read functions is a log command, and that log command is only executed once, although the buffer size is 16kb and the file size is 3mb :| Feb 26 18:23:38 Pyuruku: hmmm Feb 26 18:25:25 I'm trying to avoid overloading native functions, if possible Feb 26 18:25:33 if it comes to that, then so be it :( Feb 26 18:26:14 Pyuruku: let me read https://github.com/android/platform_frameworks_base/blob/master/graphics/java/android/graphics/BitmapFactory.java Feb 26 18:26:37 clever: sure :) Feb 26 18:27:30 simpsons! simpsons!!! Feb 26 18:28:24 Pyuruku: https://github.com/android/platform_frameworks_base/blob/master/graphics/java/android/graphics/BitmapFactory.java#L509 Feb 26 18:28:46 Pyuruku: it appears to do a single 1024 byte read, then process that to figure out what format the image is Feb 26 18:28:59 Pyuruku: can you pastebin your code? Feb 26 18:29:03 sure Feb 26 18:30:08 http://pastebin.com/JN9bckgC is the class Feb 26 18:30:14 ois = new ObfuscatedInputStream(new FileInputStream(Environment.getExternalStorageDirectory().getAbsolutePath() + "/test.jpg")); is the initialization Feb 26 18:30:26 bm = BitmapFactory.decodeStream(ois, null, null); is the call Feb 26 18:30:52 effectively, the first 8kb of data are reversed in the image Feb 26 18:31:00 i just need to reverse those bytes on the fly Feb 26 18:31:04 Pyuruku: hmmm, just as a guess, try copying your ois stream back to test2.jpg Feb 26 18:31:10 do you get a valid image out? Feb 26 18:31:13 no Feb 26 18:31:25 i get a null bitmap Feb 26 18:31:36 i mean copy it back to a file, ignore the bitmap factory Feb 26 18:31:41 ah Feb 26 18:31:43 just read the stream and write it back out to a normal file Feb 26 18:31:45 ok, one sec Feb 26 18:32:01 how do I unset a view animation? Feb 26 18:37:30 I start an AlarmManager in my MainActivity that launches PlayAlarmService when countdown is complete. On my phone with 4.2 it works fine, but on a HTC with 2.3 it will not play if screen is off. It waits till I wake the screen before it sounds the alarm. Any ideas? http://pastebin.com/EQyCwS9w Feb 26 18:39:28 Quacked: there is an extra flag you need to set, for it to bring the device out of sleep mode Feb 26 18:39:55 * clever opens docs Feb 26 18:40:13 clever: it outputs a valid image, and there are numerous calls that are logged, all works as expected Feb 26 18:40:18 Quacked: hmm, yeah you have it set right Feb 26 18:40:40 Pyuruku: not sure then, only thing i can think of is how mark interacts with your read calls Feb 26 18:41:13 Pyuruku: maybe you could override markSupported and return false? Feb 26 18:41:17 i mean, its only calling my read once Feb 26 18:41:18 thats it Feb 26 18:41:20 :( Feb 26 18:41:32 filterinputstream already returns false for that Feb 26 18:41:50 and in the source, if it detects no mark support it wraps your inputstream in a buffered input stream Feb 26 18:41:55 ah Feb 26 18:41:56 yep Feb 26 18:42:00 extending a buffered input stream has the same result Feb 26 18:42:58 Wait a sec.. I just realized that I in the code show an AlertDialog BEFORE the alarm sounds Feb 26 18:43:07 And there I have http://pastebin.com/rXgVJq8Q Feb 26 18:43:33 am i breaking some design choice? or shouldn't this be easy to do... Feb 26 18:43:50 That combo works for my 4.2, but maybe I need that KeyguardManager also for 2.3 Feb 26 18:44:00 Pyuruku: i havent done anything like that, i only used FilterInputStream to sniff some html as tagsoup read it Feb 26 18:44:14 I read somewhere that flags should be enough for earlier builds Feb 26 18:46:37 how to hide the panels with the appname, the clock, batterycharge... in an app? Feb 26 18:49:01 the status bar? Feb 26 18:49:09 but that doesnt have the app name Feb 26 18:49:13 i'm a hedgehog Feb 26 18:49:13 the_gamer: something related to this maybe: http://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_HIDE_NAVIGATION Feb 26 18:49:19 i dont think anything has the app name and the battery Feb 26 18:50:01 mikedg: you still not replaced those play store shots ? Feb 26 18:50:06 tut Feb 26 18:50:16 StingRay_: you sent me the wrong size i think Feb 26 18:50:30 I just copied ones of the site Feb 26 18:50:34 there was a reason i never did it Feb 26 18:50:39 i forget but i think it was that Feb 26 18:50:46 stop stalking my Melon Feb 26 18:50:57 is it possible to make the scale pivot the horizontal center of the screen? Feb 26 18:51:01 well it was a 45 second job so if you have orig, I can do it again Feb 26 18:51:16 maybe do it in 44 seconds this time round Feb 26 18:51:20 lol Feb 26 18:51:30 i dont have the originals with me, on my work laptop now Feb 26 18:51:34 the problem is.. Feb 26 18:51:36 id have to find my repo, download Feb 26 18:51:43 how can I make a scale from 0 0 to 1 1 here? Feb 26 18:51:43 https://dl.dropbox.com/u/6559846/Capture.PNG Feb 26 18:51:55 or better said: how should I set the pivot? Feb 26 18:52:06 Hi folks, I have a button and a webview within a relative layout. the webview seems to appear in front of the button by default, how can I have the button sit on top of the webview with a greater z-index? Feb 26 18:52:08 because if I set it to 50% 50% the image will be totally right aligned and zoom in from there Feb 26 18:52:31 its with should for this purpose be match_parent, but then it looks as it shouldn't Feb 26 18:54:43 the_jeebster: move it further down the hierarchy Feb 26 18:56:58 StingRay_: strange. I wonder why that is Feb 26 18:57:14 cause it draws them in order ? Feb 26 18:57:21 hmm I'm getting an error now, android.widget.Button cannot be cast to android.webkit.WebView Feb 26 18:57:32 that seems to make sense Feb 26 18:57:32 ha Feb 26 19:02:52 the_jeebster, try cleaning Feb 26 19:03:00 sometimes resource ids get mangled Feb 26 19:03:16 the best is when they get mangled in such as way as to not cause a crash, and your app looks ridiculous Feb 26 19:03:49 canadiancow, how does that happen? Feb 26 19:04:04 my guess is there is some bug in aapt Feb 26 19:04:10 i havent seen it lately though Feb 26 19:04:16 so it's also possible it was fixed Feb 26 19:04:25 i've had to clean because R wasnt being regenerated, still not sure why that happens either Feb 26 19:05:10 how do I clean in eclipse? Feb 26 19:05:24 project > clean Feb 26 19:05:59 does anyoone else have experience with filterinputstream and bitmapfactory.decodestream? Feb 26 19:06:39 canadiancow, i wasn't trying to be flippant before, but if you wanna be fair about it i've already done all the big logic optimizations Feb 26 19:08:52 Or how about this.... would it be possible to instantiate an inputstream to part of a file? Feb 26 19:08:55 Anyone knows how to get alarm time shown on lock screen? Feb 26 19:09:12 preferably without taking that portion of the file and saving it in either memory or on the disk Feb 26 19:10:01 which channel would be for android development? Feb 26 19:10:05 for ROMs and stuff like that Feb 26 19:10:14 Rob|boR: read title Feb 26 19:10:22 I know this is application development Feb 26 19:10:27 oh Feb 26 19:10:28 nvm Feb 26 19:10:29 found it Feb 26 19:10:32 #android-root Feb 26 19:10:44 or cynogen or xda Feb 26 19:10:54 says if you search in the title Feb 26 19:10:55 <\monster\> hey guys, what can be causing a WebView that's inside a dialog not to be able to focus on input elements within the WebView? I can see that webview itself is receiving touch events but the html fields in it aren't focusing Feb 26 19:11:00 or search including title rather Feb 26 19:11:08 <\monster\> this only started happening as of JB Feb 26 19:15:33 clever: the problem... fixed itself?.. ???...... Feb 26 19:15:51 I just launched the test app again, and it loaded the image in fine Feb 26 19:15:56 what the fuck Feb 26 19:18:33 hey people Feb 26 19:21:07 \monster\: probably because of a change in your base theme, windows (dialogs) have a focusable and touchable properties Feb 26 19:23:01 Pyuruku: why cant you open the InputStream and seek to the part of the file you want to read? Feb 26 19:26:05 Got a question about MediaPlaer. Feb 26 19:26:10 MediaPlayer* Feb 26 19:26:32 Napalm: all is well, ive figured it out apparently :/ Feb 26 19:26:35 Is there a way to buffer a file locally, on the device, while it is being played by mediaPlyer? Feb 26 19:27:12 Such that if playback stops for some reason, the buffered file can then be used? Feb 26 19:27:55 rynojvr: yes, but you wouldn't like it Feb 26 19:28:02 :/ Feb 26 19:28:15 I'll give it a shot. What'cha thinking? Feb 26 19:28:41 Manually download the bytes using a byte[] buffer from the inputStream, and then feed a FileDescriptor to the MediaPlayer? Feb 26 19:29:22 rynojvr: yes, although a ContentProvider might be better Feb 26 19:29:52 rynojvr: with the ContentProvider you can hand back the InputStream and that can be a end-point of the pipe where you feed in the data Feb 26 19:29:53 M'kay. One sec. Looking up what 'ContentProvider' is. Feb 26 19:31:17 rynojvr: http://developer.android.com/reference/android/os/ParcelFileDescriptor.html#createPipe%28%29 Feb 26 19:31:41 that would probably be better Feb 26 19:32:02 Napalm: You're right. This is looking pretty icky. Feb 26 19:32:14 one moment Feb 26 19:32:21 if you can create a pipe Feb 26 19:32:29 then you can just hand the fileDescriptor to mediaplayer Feb 26 19:32:43 then you can have a background thread that buffers and pushes the content into the mediaplayer Feb 26 19:35:01 How do I show the next alarm on the lock screen underneath the clock? Feb 26 19:35:09 Most alarm clock apps do that Feb 26 19:35:31 setup a standard system alrm Feb 26 19:35:33 alarm Feb 26 19:35:46 Quacked: http://developer.android.com/reference/android/app/AlarmManager.html Feb 26 19:36:09 Napalm, I think you mean http://developer.android.com/reference/android/provider/AlarmClock.html Feb 26 19:36:15 AlarmManager is for background services :) Feb 26 19:36:20 oopsy yes Feb 26 19:36:31 actually i think it's a Settings.System value. it's just a string so you can format it however you want Feb 26 19:36:37 Quacked: see https://android.googlesource.com/platform/packages/apps/AlarmClock/+/master/src/com/android/alarmclock Feb 26 19:36:52 I'm using AlarmManager to play sound Feb 26 19:36:53 thanks Feb 26 19:37:03 Quacked: its not AlarmManager Feb 26 19:37:31 Settings.System.NEXT_ALARM_FORMATTED Feb 26 19:37:42 Is it possible to launch All apps view from adb - e.g lige "adb shell am start com.android.launcher/com.android.launcher2" ? Feb 26 19:38:12 Napalm: I understand, thanks Feb 26 19:38:27 kevinb: thanks Feb 26 19:38:29 gimme that fish Feb 26 19:39:43 hey mikedg Feb 26 19:39:46 hows it going Feb 26 19:39:47 aerligebent: no, the AOSP launcher doesn't expose an intent for the all apps view Feb 26 19:39:48 hey napalm Feb 26 19:39:56 it's poop Feb 26 19:39:58 lots of poop Feb 26 19:40:01 :( Feb 26 19:40:13 ive got a bloody bug and its giving me hell Feb 26 19:40:19 i need a flucking io ticket Feb 26 19:40:32 VideoView in ViewPager causing flickering of UI components Feb 26 19:40:39 very weird Feb 26 19:40:48 turn off hardware acceleration? Feb 26 19:40:50 infact the entire thing goes black every now and then Feb 26 19:41:14 will look into it, but that might also give issues Feb 26 19:41:19 why cant this stuff just work Feb 26 19:41:20 :( Feb 26 19:41:22 it definitely will Feb 26 19:41:27 but at least it'll help you narrow down the problem Feb 26 19:41:44 lov: agreed Feb 26 19:41:51 lov: hows it going? Feb 26 19:42:02 Napalm: Try android:layerType="software" on the videoview Feb 26 19:42:18 grr, why cant the nio system give you FileDescriptor objects Feb 26 19:43:11 kevinb: hmm so the only way to do this from shell is using touch event ? Feb 26 19:44:06 aerligebent: yeah, or use a different launcher or modify the AOSP one Feb 26 19:44:52 kevinb : Okay thx Feb 26 19:45:35 SimonVT: have you seen the MediaController controls anchor to the bottom of the screen rather than the VideoView Feb 26 19:47:22 I have not Feb 26 19:47:44 in onPause() I save the current position of a MediaPlayer in shared prefs, and refresh it in onResume() and then seekTo(mCurrentPosition) and pause there... when the MediaPlayer shows back up, it looks fine but once I hit play, it skips ahead ~3-4 seconds Feb 26 19:47:48 is this common? Feb 26 19:48:19 i have never run into it Feb 26 19:48:43 i have never done decent testing of any use of MediaPlayer though Feb 26 19:48:53 Napalm: It turns out that I'm dramatically underestimating how long it takes to test things. Feb 26 19:49:58 hehe Feb 26 19:50:33 hey guys... E/emuglGLESv1_enc( 1547): sdk/emulator/opengl/system/GLESv1_enc/GLEncoder.cpp:s_glBufferData:365 GL error 0x502 -- what's this about? Feb 26 19:50:39 Should I just forget about the emulator? Feb 26 19:50:51 yes Feb 26 19:50:53 mikedg: THANKS Feb 26 19:50:55 tnzr: audio or video+audio? Feb 26 19:50:56 err thanks Feb 26 19:50:58 or could that be an actual problem? Feb 26 19:51:03 tnzr: how about onSaveInstanceState? Feb 26 19:51:06 clever: its streaming video Feb 26 19:51:16 tnzr: video can only seek to the keyframes Feb 26 19:51:22 ah ofc Feb 26 19:51:32 Napalm: I thought about that but what about for cases when the app isn't destroyed so onCreate() never runs again? Feb 26 19:51:38 err when you come back to it Feb 26 19:51:41 clever: ahh that's it! Feb 26 19:51:50 the first call to glBufferData with a smaller value for 'size', and a pointer works fine... the second call, with bigger size, same pointer ( I changed the values in it ) gives this error? Feb 26 19:52:31 i can probably rig something up so that I can hit the previous keyframe instead of the next one Feb 26 19:53:04 tnzr: depending on the video lib, you can go to the previous frame, then decode&skip every frame up to point X Feb 26 19:53:08 and get exact seeking Feb 26 19:53:15 tnzr: you are a gentlemen Feb 26 19:53:25 but that might not play nice with all hardware decoders Feb 26 19:53:46 ahhh cool, I will try something like that Feb 26 19:54:04 mikedg: haha thanks..nobody has ever called me a gentleman on irc before Feb 26 19:54:17 it will chew thru tons of cpu as it decodes things as fast as possible, until it gets back to the previous point Feb 26 19:54:44 well ideally if it could all happen within a few seconds it won't be a very big deal Feb 26 19:55:03 but, worst-case scenario, it's not that big of a deal anyway if I can just back up a second or two and hit the previous keyframe Feb 26 19:55:24 I would just rather the user see a second or two of something (s)he has already seen, rather than skip something that hasn't been seen Feb 26 19:55:55 tnzr: if possible, you should try to keep the entire state of the player, and not do any seek on resume Feb 26 19:56:02 then it wont have any issues at all Feb 26 19:56:13 clever: ooh, how would I do that? and how would you store it? Feb 26 19:56:13 maybe throw the state out after a few minutes Feb 26 19:56:31 clever: know of any examples or things I could google? Feb 26 19:56:31 you would need to simply not unload the decoding stuff Feb 26 19:56:38 no idea how to do that under android Feb 26 19:56:43 oh well I'm not releasing the player if that's what you mean Feb 26 19:57:01 internaly, the player may release things when onstop gets called Feb 26 19:57:32 it all happens really smoothly it seems, and it seeks back to the position just fine and sits there paused..until I hit play and it jumps ahead to the next keyframe Feb 26 19:57:33 oh I see Feb 26 19:58:34 clever: I take it you've had some significant experience with the media player? Feb 26 19:59:30 tnzr: not much, but on any sane desktop player, ive paused it and left it like that for a week Feb 26 19:59:41 tnzr: and it resumed perfectly, without any skipping ahead Feb 26 20:00:08 yeah Feb 26 20:00:32 I think you're right... when I hit Home at 0 <= t <= 7 seconds, it skips to 8 next time I hit play Feb 26 20:00:37 So, my project was building fine. I had added abs-search-view and integrated it. Worked good, after some googling about other stuff. Feb 26 20:00:41 but if I hit it at 8 <= t <= 15, it skips to 16, etc Feb 26 20:01:00 I rebuilt the project, then ever since when running on this gingerbread device, I get a ClassNotFoundException when trying to start my main activity. Feb 26 20:01:01 the location of the keyframes is entirely up to the program that encoded the video Feb 26 20:01:21 No idea where to begin troubleshooting. I've rebuilt everything at least 10 times and tried with different versions of actionbar sherlock as well Feb 26 20:01:39 tnzr: you could re-encode the video to have more keyframes Feb 26 20:01:41 the only version that works though, is the one that came with the abs-search-view plugin. Feb 26 20:01:44 but that would also increase file-size Feb 26 20:02:27 anyone know why I might get ClassNotFound on my activity as a result of a build issue? AndroidManifest is correct, and the class is public. Feb 26 20:04:40 Check logcat for verifyerrors, see if it mentions your activity Feb 26 20:04:45 ^^ Feb 26 20:04:53 you might be trying to use APIs that aren't present at that level Feb 26 20:05:07 SimonVT, lov: thanks Feb 26 20:13:32 SimonVT, lov: I think that was it. I accidentally imported the wrong SearcHView interfaces. Feb 26 20:13:37 hopefully this fixes it Feb 26 20:15:25 i just dumped the view hierarchy for the first time in DDMS, why do i see like a dozen more levels than i've written? Feb 26 20:17:18 Napalm: I gave it a think, and was wondering about the pipes... Feb 26 20:18:46 kaneda^: that is the window decor Feb 26 20:18:49 (probably) Feb 26 20:18:56 ok Feb 26 20:19:22 Napalm: Would I open up a Connection to the file, download it, and then pass the fileDescriptor to the mediaplayer? Feb 26 20:19:33 Where would the pipe come in? Feb 26 20:20:50 come in? Feb 26 20:21:02 how can i see with what density works my phone ? Feb 26 20:21:11 (Samsung Google Nexus) Feb 26 20:21:13 Where would the pipe factor into that chain? Feb 26 20:21:40 ech0s7: depends on what exactly you want Feb 26 20:21:50 the exact density in each directions Feb 26 20:21:54 ech0s7: getResources().getDisplayMetrics() Feb 26 20:22:03 or the resource classifier it falls to? Feb 26 20:22:20 rynojvr: you write to one end of the pipe while mediaplayer reads from the other Feb 26 20:22:25 does android have support for ble/bluetooth smart? Feb 26 20:22:32 timroes: no, how to classify the resources… under hdpi, ldpi, smallscreen, large-screen etc… Feb 26 20:23:48 getResources().getDisplayMetrics().densityDpi Feb 26 20:24:00 anyone happen to know where i can find info on bionic c? Feb 26 20:24:04 its one of the constants defined in DisplayMetrics http://developer.android.com/reference/android/util/DisplayMetrics.html Feb 26 20:24:24 follow-up question, does anyone know why i can't have two inline functions in one file in bionic c? Feb 26 20:24:29 but for samsung galaxy nexus in specific its xhdpi :) Feb 26 20:26:02 timroes: and to determine if it is large-screen, small-screen ? Feb 26 20:28:09 getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK Feb 26 20:28:24 http://developer.android.com/reference/android/content/res/Configuration.html#screenLayout Feb 26 20:30:35 timroes: thanks Feb 26 20:37:16 Napalm: Do you mean straight joining the PipedOutputStream from the download to the PipedInputStream that I would give to the mediaplayer? or PipedOutputStream to a File, then PipedInputStream from the file to the MediaPlayer? Feb 26 20:38:32 rynojvr: you cant use inputstreams directly with mediaplayer Feb 26 20:39:51 what about PipeDreams? Feb 26 20:42:55 http://stackoverflow.com/questions/15096049/super-dispatchtoucheventev-return-action-cancel Feb 26 20:42:58 see this Feb 26 20:43:31 rynojvr: i see no way to get a FileDescriptor from a stream so use the ParcleFileDescriptor.createPipe then on each one call getFileDescriptor() and you can pass the read end to mediaplayer and the write-end you can pump your cached Feb 26 20:43:43 rynojvr: or buffered or whatever content into Feb 26 20:46:02 Napalm: Ah. I see. That makes sense... Feb 26 20:47:15 hi i hate that fucking extenstions sorry me for that words.. now the QUESTION : coul i convert dz files to kfz ? its only cab its all a fake HELP me Feb 26 20:47:53 howdy folks, anyone around who knows about MediaRecorder/Camera died errors, specifically the dreaded "Error 100"? Feb 26 20:48:04 they are only different zips Feb 26 20:48:06 what in the fuck Feb 26 20:48:17 elec29a: are you sure you're in the right channel? Feb 26 20:48:43 no where i should go ? its about reversing LG ! Feb 26 20:48:52 ... Feb 26 20:48:55 go to #android-root Feb 26 20:49:03 ok thx Feb 26 20:54:00 man i did take 10 mins lession today from our turtor that getiing 1800E a day and introduce mirc to the class als helper.. i was on the projektor young ones only know fb and skype whatsup Feb 26 20:54:36 state me that we are in mirc the old hackers Feb 26 20:55:10 I'm curious - what's your first language? Feb 26 20:55:16 I have a weird problem on a 2.3 device. I have AlarmManager start a Service that plays an alarm and shows an AlertDialog. However, if I lock the device just seconds before the AlarmManager is supposed to start the Service, nothing happens. If I then wake the device it will start the Service and play the alarm. Feb 26 20:55:19 Any ideas? Feb 26 20:55:20 italian german Feb 26 20:55:28 It works fine on another device with 4.2 Feb 26 20:55:58 read it 10 times thats a reverser ! Feb 26 20:56:00 You probably fucked up your wakelocks Feb 26 20:56:30 i wanna make that keygen today ! Feb 26 20:56:32 elec29a: mirc is a client. you're thinking of irc. Feb 26 20:56:43 15:56:41 < elec29a> i wanna make that keygen today ! Feb 26 20:56:52 elec29a: this is an official channel. consider this your first and only warning. Feb 26 20:57:14 but i di only find chatzilla on mac do you know better ? Feb 26 20:57:37 elec29a: this is off topic. Go join #freenode or something. Feb 26 20:57:41 thats crap i hate it i did want do show a vm Feb 26 20:59:07 lov off topic is only ya know it better say me that Feb 26 20:59:47 what the hell is that for a dialect? Feb 26 20:59:48 ok sorry i stop Feb 26 20:59:57 SimonVT: doesnt the AlarmManager hold a wakelock by iteself? Feb 26 21:00:32 Until your receiver is called, sure Feb 26 21:01:38 do you know a better zxing its chrashing on VCARD,, and rest its PAYMENT so i love opensource half things Feb 26 21:02:53 adb devices Feb 26 21:02:53 List of devices attached Feb 26 21:02:53 0A3C2D8F1800F004 offline Feb 26 21:03:18 why ? i have enabled usb dbug on my phone Feb 26 21:03:24 i have a Samsung Galaxy Nexus Feb 26 21:03:39 and i'm on MacOs Feb 26 21:04:21 SimonVT: http://pastebin.com/SN14RivK Feb 26 21:04:52 Isn't that correct? Feb 26 21:05:06 I don't know, is it? Feb 26 21:05:12 Hehe, it should be Feb 26 21:05:28 Is your service being created when the alarmmanager fires? Feb 26 21:06:09 note that wakeup alarms don't help much for service pendingintents Feb 26 21:06:29 the device wakes up, calls startservice, goes immediatelyi back to sleep Feb 26 21:06:31 Normally, yes, but if I lock the 2.3 device 3 seconds before AlarmManager fires, the Service is not created Feb 26 21:06:41 then eventually the device wakes up for some other reason and *theN* your service gets a chance to run Feb 26 21:06:58 Quacked: i'm explaining why your service isn't running when you expect :) Feb 26 21:07:37 uhm Feb 26 21:07:44 I don't understand :) Feb 26 21:07:50 okay, so Feb 26 21:07:59 heads up! Feb 26 21:08:20 when a wakeup alarm fires, the alarm manager service wakes up and grabs a wakelock Feb 26 21:08:25 for purposes of doing its work Feb 26 21:08:55 yeah Feb 26 21:09:29 it then goes through everything that needs to be delivered Feb 26 21:09:45 calls startService on your intent Feb 26 21:09:49 then releases its wakelock Feb 26 21:10:00 with no wakelock currently being held, the device goes immediately back to sleep Feb 26 21:10:08 now Feb 26 21:10:12 there is one exception to this Feb 26 21:10:20 a *broadcast* pending intent is handled differently Feb 26 21:10:53 in that case, the alarm manager continues to hold its wakelock until after the broadcast has been delivered to your code and your receiver's onReceive() method has returned Feb 26 21:11:08 aha Feb 26 21:11:16 that's currently the only way to be guaranteed that your app *will* get a chance to run at the moment the alarm fires Feb 26 21:11:22 the pattern people use, then Feb 26 21:11:25 is to have a broadcast receiver Feb 26 21:11:32 and in the broadcast receiver, acquire your own wakelock Feb 26 21:11:34 ctate: can I ask a stupid question: why, to this day, despite the fact "the wakelock handoff" has been a known issue/technique/gotcha since the /beginning/ … do the damn APIDemos *STILL* show how to do it wrong (AlarmService.java) Feb 26 21:11:37 then start your service Feb 26 21:11:43 g00s: it's in the works Feb 26 21:12:09 ctate: thank you Feb 26 21:12:15 ctate: fixing the ApiDemos or the issue at the framework level ? Feb 26 21:12:28 I'll try to get it to work :) Feb 26 21:13:18 Quacked: remember to release the wakelock from your service once you're done! :) Feb 26 21:13:34 Hey, after somes tutorials, samples, docs, etc... I still need help about fragments. I still don't understand if each fragment must have is own unique activity. Like in the google sample there is : ListFragment and ListActivity AND detailActivity and detailFragment, so if I want to add a third fragment who will sometimes take the place of detailFragment, does I need to do boringFragment and boringActivity? Feb 26 21:13:35 it's that wakelock chaining that is the "hard" part, people often get it wrong Feb 26 21:13:39 g00s: framework Feb 26 21:14:09 i think ther eis a component called CWAC-WakefulIntentService you can view for inspiration Feb 26 21:14:34 i'm sick of this and i want to make service alarms hold the wakelock for you through your onStartCommand() callback. Feb 26 21:14:39 nic007, there wouldn't be much point of having fragments if they'd need each their own activity Feb 26 21:15:40 Yeah, but I still don't understand how to use them.... I'm really confused and I don't like the doc.... Feb 26 21:16:20 nic007: no, fragments/activities are not a one-to-one mapping. Feb 26 21:16:28 the idea is that you can actually have multiple fragments in one activity. Feb 26 21:16:35 nic007, do you HAVE to use them? Feb 26 21:17:05 yes he does Feb 26 21:17:06 and yes, you can have multiple fragments in one activity or reuse a same fragment across activities Feb 26 21:17:49 Mavrik, my app is mainly a menu, so I think it would be a good way to use and learn fragments Feb 26 21:18:28 ah ok Feb 26 21:18:42 nic007, basically, on a phone you usually have one fragment visible in an activity Feb 26 21:18:54 while on a tabled you usually stack them to show more data Feb 26 21:19:51 Mavrik, Ok, so we need to use more than one activity when we want multiple fragments at the same time? Feb 26 21:20:16 hi all Feb 26 21:20:48 holy crap, i haven't looked at ApiDemos since Froyo - lots more stuff now :O Feb 26 21:20:49 someone know how to use listview adapter with sqlite database ? Feb 26 21:21:07 Worlor: thats vodoo deep magic for sure Feb 26 21:21:12 :/ Feb 26 21:21:18 Worlor: look in the ApiDemos :) Feb 26 21:21:58 nic007: no. Feb 26 21:22:06 g00s: not since *Froyo*? Yeah, uh, you've missed a lot :) Feb 26 21:22:13 nic007: generally, activites -> fragments is a one to many mapping Feb 26 21:22:16 ctate: i still have a droid-1 :D Feb 26 21:22:20 however, for phones it may be one to one Feb 26 21:22:28 this is because you'll have more screen real estate on tablets, etc. Feb 26 21:23:06 Ok, so I really don't understand why they use more than one activity on the sample Feb 26 21:23:27 I don't think there is a listview populated by database in Api demos Feb 26 21:23:39 nic007, no, you can't really have more than one activity active on screen Feb 26 21:23:57 nic007, they have one version for phones where they only use one fragment in activity (Since there's no screen space for more) Feb 26 21:24:05 and they have another where they have two fragments Feb 26 21:24:08 ^^ Feb 26 21:24:20 what lov said ;) Feb 26 21:25:33 oh jeese, here we go again, more oracle 7 vulnerabilities. get your updates ready :) Feb 26 21:26:36 still running java 6 :P Feb 26 21:26:42 ok, thanks for the help. I will try again :P Feb 26 21:26:51 g00s: must be tuesday. Feb 26 21:27:04 Mavrik: oracle isn't updating that any more though x.x Feb 26 21:27:07 is it another vulnerability in something no one cares about - applets ? Feb 26 21:27:24 its in the reflection mechanism Feb 26 21:27:34 reflection *is* a vulnerability =] Feb 26 21:27:44 heh Feb 26 21:28:00 well, getting out of the sandbox isn't a normal reflection feature, is it ? Feb 26 21:28:02 :/ Feb 26 21:28:41 http://www.h-online.com/security/news/item/New-holes-discovered-in-latest-Java-versions-1810990.html Feb 26 21:29:05 who needs sandboxes anyway? Feb 26 21:29:08 oracle lost all credibility re:java when they bundled a browser toolbar with the windows installer Feb 26 21:29:15 we are all friends on the interwebs! Feb 26 21:30:43 why is latest zxing closing on vcard codes an requesting permissions in manifest ? Feb 26 21:35:55 ctate: quick q: noticing that the x86 images are often revisions behind the arm ones, do you know why this is ? Feb 26 21:36:17 i do not know, sorry. Feb 26 21:36:28 k, thx Feb 26 21:37:16 g00s: I seem to recall reading that intel provides the x86 images Feb 26 21:37:28 aw, crap Feb 26 21:37:48 maybe they aren't getting the memo there are updates Feb 26 21:37:55 porting guice to spring is a f'n nightmare Feb 26 21:38:01 hello; I'm having some link issue when I try to use a static lib with ndk, I get unresolved external symbols such as "__aeabi_fcmplt", does that speak to anyone? is there a lib I'm missing ? Feb 26 21:38:03 i really wish i could be doing android dev right now Feb 26 21:38:09 bankai_: applet security policy's are just useless Feb 26 21:38:25 birbeck: juice to spring? wut? Feb 26 21:38:35 bankai_: if i want to open a tcp socket to another server (irc client for ex), it outright refuses Feb 26 21:38:44 * g00s remembers the day when spring was there to make life easy, simpler than JEE … now , bwahahaha Feb 26 21:38:46 bankai_: if i sign the applet, it gives a small warning, and allows EVERYTHING Feb 26 21:39:13 bankai_: the policy to define what i want, cant be included in the applet Feb 26 21:39:21 g00s: spring is nice, it has lots of benefits. but porting legacy guice code to spring while keeping everything functional really sucks Feb 26 21:39:51 isn't there a JSR for IoC ? Feb 26 21:40:27 i thought the latest spring conformed to it. you should be able to swap IoC impls in and out Feb 26 21:40:32 like javax.inject? Feb 26 21:40:44 that might be it … Feb 26 21:41:07 nah, that doesnt work with spring. spring doesnt use @Inject Feb 26 21:42:32 initialize guice, load spring context, pass spring context to a guice module and use tons of factories to get guice objects in spring and vise versa Feb 26 21:45:53 whats the BESt image manipulating lib on android ? Feb 26 21:46:05 with plugins ? Feb 26 21:46:28 dont say http://marvinproject.sourceforge.net/en/plugins.html Feb 26 21:46:29 birbeck: have you looked at Apache Isis ? Feb 26 21:46:45 i'm still trying to understand it, but looks interesting Feb 26 21:46:52 no. only isis i know is nfc wallet Feb 26 21:47:09 Can anyone recommend any documentation/examples related to okhttp ? Feb 26 21:47:17 birbeck: its for DDD, http://isis.apache.org/ Feb 26 21:47:38 http://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215 Feb 26 21:48:38 ok, so i think i've really finished the optimization now, no more function overhead of sqrt, pow, etc Feb 26 21:49:13 i've shifted a lot into memory, which the android optimization tips says is bad, but has improved the speed considerably Feb 26 21:49:40 lookup tables? Feb 26 21:54:20 jrr, look up tables and then pre-allocating resources with a cap instead of letting them grow forever Feb 26 21:54:48 i also optimized all branch flow, separated conditions, removed the overhead of function calls, etc Feb 26 21:55:00 from beginning to end i have a 40x speed increase :) Feb 26 21:55:46 wow Feb 26 21:55:55 is this all java? Feb 26 21:56:02 very little java, mostly c/c++ Feb 26 21:56:21 I assume you're already at -O3 Feb 26 21:56:28 kaneda^: ive watched an hour long video on how to get the best performance out of pure 'java' (in the dalvik vm) Feb 26 21:56:34 same yourself some time and get a better compiler :) Feb 26 21:56:36 kaneda^: one of the key things, is to never trigger the GC Feb 26 21:56:47 clever: got a link? Feb 26 21:56:47 clever, you should never HAVE to trigger GC Feb 26 21:56:55 clever, if you're triggering GC you're doing something wrong Feb 26 21:56:58 kaneda^: yep Feb 26 21:57:11 birbeck: let me see if i can find it Feb 26 21:57:11 <_genuser_> GC one of the worst idea.... Feb 26 21:57:14 i actually have a stronger background in java than anything Feb 26 21:57:30 but then c, python, c++, so this has beenf un Feb 26 21:57:31 the robot invader guy had a really good talk about building a game engine in java Feb 26 21:59:04 jrr, one of my TAs from university wrote a game engine, and for our games project we used it, it was not great Feb 26 21:59:15 Is it impossible to populate listview with a cursorloader and have section indexer ? Feb 26 21:59:28 birbeck: http://www.youtube.com/watch?v=U4Bk5rmIpic Feb 26 21:59:34 http://minueto.cs.mcgill.ca/<-- this Feb 26 21:59:36 clever: thanks Feb 26 21:59:55 kaneda^: the other key part of the video, is all the things that can trigger gc, that you may not be aware of Feb 26 22:00:01 I have searched on the web and I just find find simplecursoradapter who is deprecated ... Feb 26 22:00:02 kaneda^: enum's, and other stuff Feb 26 22:00:04 ah. i/o. ive probably seen it Feb 26 22:00:14 clever, enum's can trigger GC? Feb 26 22:00:24 kaneda^: enum's are objects, which must be allocated on the heap Feb 26 22:00:30 clever, ofc Feb 26 22:00:31 kaneda^: and eventualy, cleaned up Feb 26 22:00:41 clever, yes, this should be obvious if you've seen an expanded enum example Feb 26 22:00:42 more garbage for the garbage man to get rid of Feb 26 22:01:07 BUT, enum's are static Feb 26 22:01:13 so when are they cleaned up? Feb 26 22:01:40 i didnt look into the details, but it sounds like an enum argument/variable behaves the same as any object reference Feb 26 22:02:21 another surprise can be invisible stringbuilders, "foo "+"bar" in onDraw == bad! Feb 26 22:02:37 that's compiler magic that people need to know about Feb 26 22:02:58 kaneda^: i find it helps to dump the dex code after compiling, and look at what the compiler did Feb 26 22:03:32 is there a better way to profile native code than downloading the only google code project that does this? Feb 26 22:03:36 enums are mainly just classes with a single instance in java, so yeah passing it as argument is passing a reference around Feb 26 22:03:53 timroes, arent they considered static? Feb 26 22:04:00 who would ever pass an enum ref? Feb 26 22:04:06 ^^ Feb 26 22:04:27 birbeck: from what ive seen so far, java cant pass by objects by value, only primitives Feb 26 22:04:28 kaneda^: yeah each instance is hold static if you mean this Feb 26 22:04:48 clever, actually, technically, java is ONLY pass by value Feb 26 22:04:56 so enum MyEnum { VAL1, VAL2 } and if you now pass as argument MyEnum.VAL1 thats a reference to the VAL1 of enum Feb 26 22:05:00 sorry, but ref i didnt mean be reference Feb 26 22:05:05 it's just that vars are reference varaibles, and therefore their value is a reference Feb 26 22:05:06 i just meant as an argument Feb 26 22:05:09 kaneda^: ah Feb 26 22:05:30 timroes, right, that makes sense Feb 26 22:06:09 enums are initialized at some time (like static classes), as far as i remeber not necessarly at vm start Feb 26 22:06:26 timroes: ive run into problems related to that Feb 26 22:06:28 e.g., enum AnimalEnum { Dog("woof"), Cat("meow"); String s; AnimalEnum(String s) { this.s = s; }; }; Feb 26 22:06:33 timroes, something like that work? Feb 26 22:06:40 timroes: i had a loger, that was supposed to init itself with static foo = init(); Feb 26 22:06:53 kaneda^: yeah Feb 26 22:06:55 timroes: but it turns out, it doesnt run until something tries to reference it elsewhere Feb 26 22:07:05 until the vm needs the class, it doesnt run anything Feb 26 22:07:06 timroes, and then Dog/Cat are refs of type AnimalEnum or something Feb 26 22:07:28 refs = reference variables Feb 26 22:07:35 clever: if i remebver right thats a common implementation, but specification just says it will be innitialized some time before it will be used the first time Feb 26 22:08:00 timroes: yeah, it doesnt really matter how early most of the time Feb 26 22:08:05 what would keep it open to initialize it just for fun, but ofc that doesnt make much sense :D Feb 26 22:08:18 timroes: but in my case, i have a Log class in my lib, which simply forwards things to a class in the android app Feb 26 22:08:18 so most surly it will initialize it when it is needed Feb 26 22:08:22 timroes, i thought it was at the same time as the static initializer of the class Feb 26 22:08:26 and it cant reference the android code directly Feb 26 22:09:04 timroes: i'm using Log.v and friends in a non-android (pure desktop java) lib Feb 26 22:09:10 kaneda^: what you wrote above it right and work like you described, but i didn't get your last 'question' Feb 26 22:09:49 i'm just curious if it's initialized as though it's in the static initializer list Feb 26 22:10:19 ah you mean if any object is initialize as soon as the enum is initialized? Feb 26 22:14:32 kaneda^: ive wanted to use enum's in a few places where i get an int from the network Feb 26 22:14:39 timroes, i would assume Dog/Cat in my example are initialized at the same time as the static stuff in the class Feb 26 22:14:42 but ive not found any simple way to convert an int to an enum Feb 26 22:14:56 java-language enums aren't integers in any meaningful sense Feb 26 22:15:03 it turns into a switch/case mess, which is exactly what i was trying to avoid :P Feb 26 22:15:03 they're objects Feb 26 22:15:05 clever, that sounds silly, enum IntEnum { int i; IntEnum(int i) { this.i = i; }; }; Feb 26 22:15:10 just use an int :) Feb 26 22:15:10 lol Feb 26 22:15:14 just use an int Feb 26 22:15:14 kaneda^: yeah they are Feb 26 22:15:21 timroes, cool Feb 26 22:15:21 ctate: yeah, i just use static final int's Feb 26 22:15:29 lower overhead too! :) Feb 26 22:15:32 as soon as you access the enum the first time (though specification allows it any time before) all instances of the enum gets initialized Feb 26 22:15:43 clever, what's wrong with IntEnum.values()[i] ? Feb 26 22:16:08 but yeah, static final ints are actually noticably faster when using alot of them ;) Feb 26 22:16:24 its simply not typed Feb 26 22:16:33 though cleaner code should be useing enums Feb 26 22:17:04 static final int on android is the fastest way, according to the docs Feb 26 22:17:10 and in contrast to regular classes, there are some datastructures like enumset, to sore several flags like you would to with ints Feb 26 22:17:19 use the wrong static final easily Feb 26 22:17:21 timroes, taht's all i use ENUMs for, flags Feb 26 22:17:40 i just want to put a label to an int, realy Feb 26 22:17:41 if you have less then 64 elements in your enum EnumSet just uses a long to store it Feb 26 22:17:52 that's cool, good to know timroes Feb 26 22:18:16 and if you have more i guess it uses BigInteger or something like that, that itself works again as most efficient as possible Feb 26 22:19:00 timroes, iwould hope not Feb 26 22:19:00 id prefer to have c style enum's Feb 26 22:19:11 that are strictly typed, so you use the right one, but internaly, just ints Feb 26 22:19:17 timroes, i'm not a fan of BigInteger Feb 26 22:19:18 in C, enum is spelled "int" Feb 26 22:19:26 no mistakes, and all the speed Feb 26 22:19:31 ctate, i prefer to think of enum as union or struct Feb 26 22:19:38 not in C :) Feb 26 22:19:59 i mean, i see a java enum as a c union or struct ;p Feb 26 22:19:59 clever: in java its efficiency is not so much worse Feb 26 22:19:59 in C, enums are almost literally just named ints; the underlying representaiton type is required to be 'int' and type checking is weak at best, etc Feb 26 22:20:12 java enums are first-class classes Feb 26 22:20:20 if you don't stick anything to it its just an empty class, that has around 6-8 byte in java Feb 26 22:20:22 they're basically just so you can have a class you can 'switch' on. Feb 26 22:20:25 ctate: thats why i prefer the c style Feb 26 22:20:25 ctate, what about macros :D Feb 26 22:20:42 macros are programmatic copy/paste, essentially. Feb 26 22:20:51 yeh, where's that in java? Feb 26 22:20:59 and for passing around and switching and the stuff you use it for, you anyway only pass around the reference and compare it, so you have also again not more then passing around logns Feb 26 22:21:18 oh yeah macros are lovely for errors :D Feb 26 22:21:33 macros are super, super dangerous, and should not be used except for assignments IMO :D Feb 26 22:21:52 my favort example we had some days ago already #define quad(x) (x*x) Feb 26 22:21:56 so many errors in that :D Feb 26 22:21:58 timroes, undefined behavior Feb 26 22:22:01 not an error, exactly Feb 26 22:22:18 okay then lets say so many unexpected behavior Feb 26 22:22:29 yes, and good for a laugh when someone doesnt know why :D Feb 26 22:22:48 since i've seen lots of ppl expecting that kind of stuff to quadra..whatsoever the english word is a number Feb 26 22:22:49 timroes: ogod Feb 26 22:22:52 i've had fun with #define private public Feb 26 22:23:02 kevinb: lol Feb 26 22:23:05 square timroes Feb 26 22:23:13 no, let's say errors :) Feb 26 22:23:16 to square? Feb 26 22:23:26 timroes, quad = square Feb 26 22:23:30 square(x) = x*x Feb 26 22:23:34 protip: never forget the extra parenthesization Feb 26 22:23:45 ctate, indeed, that fixes a lot of it Feb 26 22:23:54 yeah but #define square(x) ((x)*(X)) still is error prone :) Feb 26 22:23:56 even better would be to use c++ and make it a simple inline templatized method Feb 26 22:23:58 function Feb 26 22:24:08 kaneda^: but still leaves so much error :) Feb 26 22:24:13 timroes: yeah, if the expression 'x' has side effects Feb 26 22:24:29 my favorite is #define incr(x) x++ Feb 26 22:24:36 or something like this Feb 26 22:24:50 static int _tmp; Feb 26 22:24:51 #define square(x) (_tmp = x, _tmp * _tmp) Feb 26 22:24:59 timroes, and now it's safe Feb 26 22:25:03 :D Feb 26 22:25:04 and i guess that still can break when using heavy multithreading? Feb 26 22:25:18 timroes, no one said it had to be synchronized, since there's no mechanism in #define for this :D Feb 26 22:25:38 ive been reverse engineering a javascript project lately, and ive run into things like this Feb 26 22:25:41 cripe Feb 26 22:25:41 this.Points = (d.$r = $I.CQ.QQ(b, c, d), e = d.c, d.$r); Feb 26 22:25:45 template T& square(const T& x) { return x*x; } Feb 26 22:25:50 muuuuuuuuuuuch better Feb 26 22:25:55 as best as i can tell, they are using macro's in javascript Feb 26 22:25:59 err, add 'inline' at the beginning there Feb 26 22:26:12 if (!(c.$r = this.YDD.arrayContainsGet(a, c), d = c.b, c.$r)) { Feb 26 22:26:15 ctate, beat me to it! Feb 26 22:26:18 ctate: look at the insanity of this! Feb 26 22:26:20 ctate, i was about to say, inline that lil function! Feb 26 22:26:21 clever: looks lovely :) Feb 26 22:26:22 clever: looks like they've run the code through a javascript proguard equiv Feb 26 22:26:33 ctate: no, thats a seperate layer Feb 26 22:26:36 there's lots of js minifiers Feb 26 22:26:54 ctate: the last example, is trying to return 2 values at once from a function Feb 26 22:27:04 i personal like the ones obfuscating then base64 everythign and eval it... Feb 26 22:27:07 ugh yeah neither java nor c nor c++ are good at tuples Feb 26 22:27:08 ctate, oh man, i have a q for you, why is it that i get an error trying to put two inline functions inside the same cpp file? Feb 26 22:27:10 it stores the real return value in c.$r, then copies the 2nd one from d.c to e Feb 26 22:27:14 though i hear that's coming in java8 or something Feb 26 22:27:14 then returns c.$r to if Feb 26 22:27:22 ctate, tuples would be nice Feb 26 22:27:22 ctate: at least android has its Pair :) Feb 26 22:27:24 kaneda^: depends on what they are Feb 26 22:27:28 all of that, could simply be done inside the if block Feb 26 22:27:32 (re the inline errors) Feb 26 22:27:33 but a macro doesnt allow for that Feb 26 22:27:33 ctate, it does? Feb 26 22:27:36 of course Feb 26 22:27:39 ctate, how so? Feb 26 22:27:50 what's the error you're getting, and what's the source file? Feb 26 22:28:08 timroes: that pattern comes up all over the place Feb 26 22:28:14 ctate, i have a header (h) and a cpp file, if i define any two functions with the inline keyword the second one tells me it hasnt been implemented Feb 26 22:28:15 timroes: in many places, the 2nd return value is of no use Feb 26 22:28:32 kaneda^: need to see a concrete example and the error messages Feb 26 22:28:32 ctate, i can do this with any two functions with the same result Feb 26 22:28:50 ctate, are the headers enough, knowing that i've implemented them? Feb 26 22:29:04 does the thread running the doInBackground() method for an AsyncTask itself have an associated MessageQueue? [or, any guarantees that one is _not_ automatically created?] Feb 26 22:29:11 again, need to see how you've written the header & the cpp file. Feb 26 22:29:17 kbs, no message queue Feb 26 22:29:31 kbs: no. it's a free-running vanilla thread. Feb 26 22:29:32 why would one be automatically created Feb 26 22:29:40 ctate, i cant exactly post this to the web, for a couple of reasons, what about the structure do you need to know so i can put it with the paste? Feb 26 22:29:44 Howdy guys - quick question - I want my application to be able to attach a photograph or a voice recording to an object - do I have to code it from scratch (e.g. taking a photo with the camera) or is there some service I can use to say "Get me a picture"? I've done a few google searches but I haven't figured out what to search for yet if there is a service :/ Feb 26 22:29:48 pfn and ctate: ok -- thanks. Feb 26 22:29:48 if you want a separate Looper/Handler thread, use HandlerThread instead of AsyncTask. Feb 26 22:30:11 kaneda^: there are so many things that can go wrong i can't be any more specifically, really. Feb 26 22:30:16 ctate: the reason for my question is that Camera doesn't like to be opened in a thread (outside the main thread) that has a MessageQueue Feb 26 22:30:23 ctate, fair enough, i'll post what i can, one sec Feb 26 22:30:50 basically: for inlines, you declare the inline function and its implementation in the header file (also make it static, typically). you do *not* redeclare the same function in the c++ files. Feb 26 22:32:11 remember to think of headers as being *literally* just part of your source files. Feb 26 22:32:28 ctate, http://pastie.org/private/3zdbznm7dn9fprjsmxr2q Feb 26 22:32:30 if you're debugging problems like this it can help to look at the preprocessor output, too. Feb 26 22:32:48 when i add inline to those two, for instance, the second one tells me it hasnt been implemented and is used (fromt he header file) Feb 26 22:33:03 ctate: ive worked with a compiler before, that didnt support #include Feb 26 22:33:08 that was a PAIN to use Feb 26 22:33:14 well, your cpp needs to #include your header :) Feb 26 22:33:39 kaneda^: in the header, declare them "static inline", not just "inline" Feb 26 22:33:51 ctate, do you mind explaining why? Feb 26 22:33:51 i suspect what's happening is that your compiler is deciding that they're too complex to inline Feb 26 22:33:56 woudln't an external in the header file also solve that? Feb 26 22:34:02 long time ago since i last did some c Feb 26 22:34:03 ctate, i inline a far more complex function Feb 26 22:34:12 you can't just add inline Feb 26 22:34:16 arghhhhh... So I join, ask the question, and _THEN_ figure out the magic word "intent"... I've found the action image capture intent which is probably what I want. I'll investigate more. Feb 26 22:34:20 you need to actually move the implementation into the header file Feb 26 22:35:04 (basically, if you declare a function 'inline' you need to also supply its implementation right there. otherwise, the 'inline' does nothing.) Feb 26 22:36:20 ctate, i'm a bit confused, because i specify inline for one and then implement inline, and it seems to work as inline Feb 26 22:36:24 ctate, why would it break for two? Feb 26 22:37:23 ctate, followup q, the solution is to mark it as static in the header? implement it in the header? both? Feb 26 22:37:58 kaneda^: you should simply implement it in the header, never declare it Feb 26 22:38:19 declaring is for when the code exists in another compile unit Feb 26 22:38:21 kaneda^: backing of on 'static' Feb 26 22:38:42 if you are going to use 'inline' at all, you must inline the *implementation*, not just a forward decl. Feb 26 22:38:50 ctate, i inlined both, i swaer! Feb 26 22:39:16 what error did you get? method not found? Feb 26 22:39:19 i dont see a need to even have a forward decl for inlines Feb 26 22:39:25 what clever said Feb 26 22:39:31 ctate, yah, undefined method that is used or smoething Feb 26 22:39:32 don't ever inline a forward decl Feb 26 22:39:46 ctate, ok, so in other words move the implementation of inline functions to the header file Feb 26 22:39:53 in some other .cpp file, it'll see that and tghink "okay i'm going to see the actual declaration inline herer somewhere, great" Feb 26 22:39:54 ctate, in that case, do i still need the static keyword? what would it do for me? Feb 26 22:40:01 kaneda^: forget static Feb 26 22:40:05 inline functions must be in the header, so every compile unit can get the code Feb 26 22:40:07 that's for a different kind of problem Feb 26 22:40:08 ctate, what does static do in c/cpp again? Feb 26 22:40:17 it limits the name scope of the function to that compilation unit Feb 26 22:40:27 ctate: ahhh Feb 26 22:40:40 ctate, that's interesing, so like the default or protected modifier, kind of? Feb 26 22:40:46 err, no? Feb 26 22:40:56 i'm thinking of a compilatino unit as a package, mind you Feb 26 22:41:06 a function declared 'static' cannot be called from outside that compilation unit Feb 26 22:41:13 kaneda^: each .c and .cpp file is a seperate compile unit Feb 26 22:41:21 a compilation unit, in C/C++, is one .c / .cpp file plus all its includes. Feb 26 22:41:22 oh, ok Feb 26 22:41:41 (remember, #include is just copy/paste in the preprocessor) Feb 26 22:42:20 right Feb 26 22:42:32 is there somewhere an overview of the android source code, because in my opinion the folder structure related to the git projects isn't very helpful.. Feb 26 22:42:36 so yah, the obvious solution is to move inline functions into the header Feb 26 22:42:37 if i understand cstate right, a static function's symbol simply wont exist in the output .o, so other CU's cant reference it Feb 26 22:42:41 and they cant collide with it Feb 26 22:42:57 lookind at the gradle stuff it tells 'the git project is tools/build.git' but where the heck is this now in my sources? Feb 26 22:42:59 kaneda^: that isn't just "the obvious solution," that is *mandatory* when using inline Feb 26 22:43:11 ctate, no need to be pedantic ;p Feb 26 22:43:17 in tools it isn't, int framework/base/tools neither, .. Feb 26 22:43:22 i didn't grasp at first that you were just putting in an 'inline' forward decl in the header Feb 26 22:43:39 ctate, i'm not very fluent in c++ Feb 26 22:43:44 timroes: it isn't projects/tools/build.git from the top level? Feb 26 22:43:45 becoming more fluent, day by day Feb 26 22:44:05 ctate: i don't have a projects in my source dir? :D Feb 26 22:44:19 oh okay, i was thinking in terms of the github / gerrit ui Feb 26 22:44:19 i mean the sources I checked out with repo Feb 26 22:44:37 yeah the problem is, that these termonology somehow doesn't map to the folder structure Feb 26 22:44:55 ctate, what's the limit of inline? my understanding is that i shouldnt make a lot of stuff inline Feb 26 22:45:01 should be in tools/build/... from the top level Feb 26 22:45:07 kaneda^: it's up to the compiler Feb 26 22:45:18 ctate, interestnig, so i request inline and then it does what it can to keep it handy? Feb 26 22:45:23 ctate: tools only has a folder external/fat32lib in my checkout Feb 26 22:45:39 ctate, if i inline 2 simple functions and a more complex one, will the compiler decide to drop the more complex one from inlining? Feb 26 22:45:40 err, what branch did you check out? Feb 26 22:45:48 master Feb 26 22:45:55 because e.g. see https://android.googlesource.com/?format=HTML Feb 26 22:46:06 tools/build right there Feb 26 22:46:15 kaneda^: or it may not. Feb 26 22:46:21 you basically can't tell :) Feb 26 22:46:33 it may also depend on optimization level Feb 26 22:46:43 ctate, hmm, so do you think it's wise to try to inline the function where the algo spends most of its time, rather than the two smaller functions it often calls? Feb 26 22:47:18 definitely inline the two smaller often-called functions Feb 26 22:47:18 hmm okay i did it like it was described here: http://source.android.com/source/downloading.html Feb 26 22:47:24 profile it to see where it's spending time Feb 26 22:47:27 so i guess i only checkout out very small part of the android sources Feb 26 22:47:34 small often-called things are ideal candidates for inlining Feb 26 22:47:38 larger functions tend not to be Feb 26 22:47:44 (and inside this the structure is already more than confusing :D) Feb 26 22:47:49 ctate, is there an easier way to profile ndk stuff rather than use the google code project? Feb 26 22:47:59 kaneda^: that i can't help you with, sorry Feb 26 22:48:17 ok, the google code implementation supposedly works, but i'd hate to waste a day with it and find out it isnt supported Feb 26 22:49:00 hmm there is an own project platform/tools/adt/eclipse but yet i have under /sdk/eclipse/plugins the adt stuff, i don't get it at all how that is mixed up :D Feb 26 22:53:36 ctate, ok, so i inlined three small functions instead, gonna measure the benchmark now, thanks a lot! Feb 26 22:54:59 ctate: hmm okay as it seem that platform/manifest that holds the information of all the submodules that should be initialized hasn't been updated for me. So repo sync doesn't update that "meta project"? how can I update it? since repo sync says everything fine, but there is stuff missing and just looked in the hirsoty of platform/manifest and missing is the stuff that has been added lately Feb 26 22:54:59 timroes: i *suspect* that the sdk/eclipse/... stuff is older, and new work has migrated to a separate package in tools/... Feb 26 22:55:03 dunno for sure, of course Feb 26 22:55:20 timroes: hmm. redo the "repo init -b master" step, and then sync again? Feb 26 22:55:37 ctate, it's definitely faster, i think that about finishes off the optimizations Feb 26 22:55:42 ctate, thanks again for your help Feb 26 22:57:16 hmm more then weird, my .repo/manifest.xml shows the current manifest file, still repo sync doesn't check out all the new stuff.. Feb 26 22:57:40 weird Feb 26 22:58:21 also `repo list` does only show the old state Feb 26 23:01:49 what if you do 'repo sync tools/build' from the top level? Feb 26 23:02:19 error.InvalidProjectGroupsError Feb 26 23:02:56 is repo v1.12.1 the most recent version? Feb 26 23:03:32 (though i always copied the repo command to bin when he told me to ) Feb 26 23:03:59 timroes, i sure hope that's the latest version :) Feb 26 23:04:29 look our team just won the dutch android code puzzlers contest at our meetup :) http://photos2.meetupstatic.com/photos/event/a/f/3/4/600_209084852.jpeg Feb 26 23:04:35 can i somehow safly delte the .repo folder, do a repo init again and repo sync should detect all the checkout projects? Feb 26 23:04:55 i am not so eager to downlaod 12gb again now :D and i have still uncommited changes in several projects Feb 26 23:05:45 (35gb ... ) Feb 26 23:05:48 ctate: regarding the wakelock for AlarmManager broadcastreceiver we talked about: http://pastebin.com/wJxgSbEf Feb 26 23:05:52 you meant something like that? Feb 26 23:06:12 yes Feb 26 23:06:13 however Feb 26 23:06:21 there's no release yet Feb 26 23:06:22 the wakelock variable needs to be accessible from your Service as well Feb 26 23:06:33 in order to release it you mean? Feb 26 23:06:36 right Feb 26 23:06:48 as you wrote it here, it's a local instance variable of the broadcast receiver component Feb 26 23:06:51 that's not gonna work right :) Feb 26 23:06:57 Yeah, I know Feb 26 23:07:09 but that's the front half of hte pattern, yes Feb 26 23:07:11 that was my follow-up question. How do you suggest I do it? :) Feb 26 23:07:32 effectively, you want it to be a global variable Feb 26 23:08:00 there are a few ways to achieve that semantic in the Java language Feb 26 23:08:10 the easiest is to declare the variable public and static Feb 26 23:08:11 Yeah, its ok with public static? Feb 26 23:08:14 :) Feb 26 23:08:29 I can never understand when its a bad thing to use those Feb 26 23:08:36 So I tend to use it a bit too much I think Feb 26 23:08:40 dont do it ever Feb 26 23:08:43 unless ctate says so Feb 26 23:08:48 haha Feb 26 23:09:03 i think i actually have a warning turned on in intellij along the lines of "variable declared public static but not final" Feb 26 23:09:14 canadiancow: good to know, always wondered who i have to ask about that kind of stuff :) Feb 26 23:10:07 ahh screw it i will download the whole android sources again, something is really broken with my repo :D Feb 26 23:10:24 it doesnt take long anyway Feb 26 23:10:34 haha .. Feb 26 23:10:54 perhaps not for you using a 1gbit up/down fiber to the home experimental google lane :'( Feb 26 23:10:55 Line 20 here a good place to release the WL? http://pastebin.com/2krpg9yn Feb 26 23:11:20 After I've played sound, vibrated and shown dialog :P Feb 26 23:11:28 yeah, basically Feb 26 23:11:51 you need to understand the concurrent-access possibilities any time you use that sort of thing Feb 26 23:12:18 timroes, i'll race you Feb 26 23:12:27 Will try it out tomorrow when my wife is back from work with her 2.3 android Feb 26 23:13:13 Btw, how do you test for cases where Android kills your app to free memory? Feb 26 23:13:43 Atm I have Service.START_NOT_STICKY and I think that is probably not a good thing for a countdown timer app Feb 26 23:14:13 canadiancow: i am using 16mb down/1mb up what is still common home internet connection here in germany and pay 30€ a month. if I see some cities get the fiber to the home from google for 70$ i must cry Feb 26 23:14:20 I've got a native 'C' routine I hacked to eat all memory faster than Android can release it ... kills active apps >:) Feb 26 23:14:22 oh no.. must ... hold... tears Feb 26 23:14:26 ctate, thanks again for yuor help, bbl Feb 26 23:14:45 capella: hehe.. funny Feb 26 23:14:53 "Rubin understands that Android has evolved into a beast of a mobile operating system, and that the world still needs something to fill out the category of devices that have limited specs." , hm. now you know one reason why GB is still popular :) Feb 26 23:15:10 Serious ... use it to crash Firefox and test re-start logic :D Feb 26 23:15:12 capella: he was talking about FirefoxOS :) Feb 26 23:15:37 Oh ! Didnt scroll back far enough Feb 26 23:17:01 though I still dont see the FirefoxOS mention ... hmmm Feb 26 23:17:32 Should I use Service.START_STICKY for an countdown timer app? Feb 26 23:17:37 hey g00s Feb 26 23:17:43 hey Napalm :) Feb 26 23:17:43 so i am off , good night everybody Feb 26 23:17:50 g'nite Feb 26 23:18:10 anyone know if the tools namespace allows you to put placeholder text into your layouts but not then compiled into your app Feb 26 23:18:16 like example text Feb 26 23:18:19 that would be handy Feb 26 23:22:39 how would you have example text... Feb 26 23:22:56 placeholder Feb 26 23:23:00 just for looking at it in the layout? Feb 26 23:23:11 xml sucks in this regard, can't have comments in the middle of tags and attributes Feb 26 23:23:23 pfn: the tools namespace Feb 26 23:23:35 xmlns:tools="http://schemas.android.com/tools" Feb 26 23:24:03 pfn: would be nice if we had a attribute like tools:layoutOnlyText="This is where the title would be" Feb 26 23:24:08 or somesuch Feb 26 23:24:42 make up a bogus xmlns and stick your attributes there if you want Feb 26 23:24:46 would be helpful for people that have to maintain your code base aswell Feb 26 23:24:51 I don't think aapt processes unrecognized xmlns Feb 26 23:24:53 pfn: you miss my point Feb 26 23:24:57 Can I shorten this somehow? :) http://pastebin.com/nTyvrQHG Feb 26 23:25:27 lol Feb 26 23:25:29 yeah make a loop Feb 26 23:25:31 Quacked: yeah Feb 26 23:25:33 for fake "commenting" seems like that's what you want and it works Feb 26 23:25:35 you can use one signle onClickListener, too Feb 26 23:25:41 just use a switch statement on the view's id Feb 26 23:25:46 what is in the tools, namespace outside of lint? Feb 26 23:25:49 pfn: i mean that in the graphical layout for example a TextView would then display that text Feb 26 23:26:03 tdignan: yeah, I've seen examples using switch Feb 26 23:26:04 pfn: tools namespace is used internally by the graphical layout Feb 26 23:26:25 is it? interesting Feb 26 23:26:26 Quacked: so, like. when xorgate says make a loop, you're still lacking a collection of ids to loop over Feb 26 23:26:33 Quacked: so make a static array of ids Feb 26 23:26:41 then loop over that, and set it all to one signle onClickListener instance Feb 26 23:26:45 inside that, switch on the id. Feb 26 23:27:01 as far as I understood, tools: is ignored by aapt Feb 26 23:27:09 urk Feb 26 23:27:09 indeed Feb 26 23:27:13 thats the point im making Feb 26 23:27:20 and not stored into the res apk Feb 26 23:27:24 tdignan, Quacked or instead of switching on the ID in the listener, set a tag on each view with some metadata Feb 26 23:27:24 pfn: its just example text for editing that would not be stored in apk Feb 26 23:27:29 tdignan: is it needed performance wise ? :P Feb 26 23:27:39 new idea quacked Feb 26 23:27:44 Napalm, I still don't see what you're trying to accomplish with that Feb 26 23:27:45 you could use a gridview of buttons instead Feb 26 23:27:50 and do it all in the adapter Feb 26 23:28:05 pfn: exactly.. but im not talking about comments.. im talking about the graphical layout engine using the text in an attribute for display purposes only Feb 26 23:28:21 yeah, more than likely this should be in some kind of AdapterView Feb 26 23:28:28 pfn: with me? Feb 26 23:28:29 but the graphical engine won't use that attribute Feb 26 23:28:35 because it's not packaged into the apk Feb 26 23:28:35 OMG!!! Feb 26 23:28:40 noooo Feb 26 23:28:45 not familiar with Adapter yet Feb 26 23:28:49 im talking about the Eclipse graphical layout view Feb 26 23:28:51 lol Feb 26 23:28:51 I'm missing some context here Feb 26 23:29:04 sounds like it's time to hack on adt :p Feb 26 23:29:09 yup Feb 26 23:29:13 hi all Feb 26 23:29:27 i might pull the repo fix it and submit a pull Feb 26 23:29:27 what is better json or xml ? Feb 26 23:29:31 json Feb 26 23:29:33 Quacked: well, go with the array for now then Feb 26 23:29:47 Nemanjaa: what's better, a screwdriver or a hammer? Feb 26 23:29:51 lol Feb 26 23:29:53 Napalm, sounds doable, though, check to see if any attribute names match under other namespaces, then apply that value to said attribute in the other namespace Feb 26 23:30:09 ofc Feb 26 23:30:16 pfn: hows things btw? Feb 26 23:30:18 if you had a screw, I would use the screwdriver Feb 26 23:30:34 tdignan: I'll add it to the bottom of my todo list. I'll get all the bugs out first :) Feb 26 23:30:52 i found on this site better xml with sax ... http://ubikapps.net/?p=268 Feb 26 23:30:52 tdignan: since this part works fine Feb 26 23:32:02 Quacked: good choice. Feb 26 23:32:19 man, that renewed my faith in the world just now hearing that. Feb 26 23:32:31 hehe Feb 26 23:50:19 http://developer.android.com/design/building-blocks/seek-bars.html -- anybody know of any existing projects like this? Feb 26 23:51:53 boytoy: ApiDemos Feb 26 23:58:25 hi Feb 26 23:59:36 capella: why muck with all that burning-memory stuff instead of just calling exit(0)? :) Feb 26 23:59:44 or sending yourself a SIGKILL Feb 27 00:01:02 I just installed downloaded the android SDK and NDK for windows and was trying the san-anegles example but I get an exception UnsatisfiedLinkError when I try to run it Feb 27 00:01:10 to crash an app? Feb 27 00:02:13 capella: yeah. i mean, this is Firefox crashing itself, right? Feb 27 00:02:36 or are you saying you run some *other* app in order to get the OS to kill Firefox? or what? Feb 27 00:03:25 I ran a stand alone native-C routine to hog memory and force the OS to stop Firefox from the "outside" Feb 27 00:03:45 "standalone" meaning what, from adb shell? Feb 27 00:04:29 well, from terminal Emulator Feb 27 00:04:43 hmm, why is Nexus 10 getting this weird pastel tint? Feb 27 00:04:46 sometimes I think @annotation abuse might be handy in android. for example, @ParcelableExport, and then Parcelable automatically reads/writes that field when parceling that class Feb 27 00:05:10 capella: i see. so yeah, killing background stuff is easy. just run the browser. :) Feb 27 00:05:15 …maybe that's not how java works though, never actually looked at how annotation work Feb 27 00:05:23 ouch dude ! Feb 27 00:05:32 has anyone seen this problem before, or similar? Feb 27 00:05:36 all my colors look like they've been Google'ified Feb 27 00:05:45 :D Feb 27 00:05:46 is that normal behavior by default on the N10 ? Feb 27 00:06:05 um, no? Feb 27 00:06:24 I glClear with RGB 255,0,0 but it looks more like 255, 50,50 Feb 27 00:08:58 oh, just in your app. whew. Feb 27 00:09:20 well I don't know, I imagine it's everything ;P Feb 27 00:09:55 it just looks very different than on the emulator and my monitor... so much I thought my royal blue (255,0,0) I thought it was a whole different color Feb 27 00:22:52 evening gents Feb 27 00:26:06 what is the general recommendation for dpi specific image resources....if you're lazy. Feb 27 00:26:18 can I just put everything in xhdpi and it will downscale appropriately? Feb 27 00:26:22 just incur a memory penalty? Feb 27 00:28:49 etcetera: you can generally get away with half-assing your resources, but you're going to find that you need to at least fix the sizing on some things. Feb 27 00:29:17 tdignan: what do those edge cases lookl like? Feb 27 00:29:27 things that need to be smaller because, hey, they just do Feb 27 00:29:47 in general, I'm not sure anything will actually scale down Feb 27 00:29:55 oh? Feb 27 00:29:59 but in an application, I typically only have a couple icons that matter Feb 27 00:30:08 like, you can make some nine patches Feb 27 00:30:14 you'll probably only need one size, for those. Feb 27 00:30:17 your launcher icon Feb 27 00:30:22 you should definitely make all the sizes for. Feb 27 00:30:45 use shape drawables defined in xml, too Feb 27 00:31:09 I'm just trying to put things into buckets: stuff where I can be lazy, stuff where I can't be lazy, stuff where I can be lazy *MOST* of the time. Feb 27 00:31:37 I just add the images as I go, and fix it later if it doesn't look appropriate. Feb 27 00:31:50 usually it's not that many that need to change. Feb 27 00:32:00 because I am able to use tiles, or 9patches for most, or xml Feb 27 00:32:10 how can I qualify things for "most of the time" Feb 27 00:32:24 is it use case specific, size specific, etc? Feb 27 00:32:42 use cases like background gradients vs icons. those are easy to separate. Feb 27 00:33:10 thanks zhobbs Feb 27 00:34:45 you can make your backgrounds and skins generally usable on all sizes without having to create multiple sizes. Feb 27 00:34:49 everything else, not really Feb 27 00:35:12 but when I'm developing, I usually just put hdpi in Feb 27 00:35:16 then later Feb 27 00:35:32 maybe with all the big screens, xhdpi is better Feb 27 00:59:01 is there a way to send system logs (shown by logcat) to the host (adb)? Feb 27 01:00:48 Hmm, can I access my big 32 gb of storage on my Nexus 10 without rooting it? Feb 27 01:00:53 yazdmich: elaborate Feb 27 01:00:57 I want to adb push to it Feb 27 01:01:12 adb logcat? Feb 27 01:01:29 i want to send the logfile to my laptop Feb 27 01:01:52 im trying to see what's going wrong with gingerbreak Feb 27 01:02:23 yazdmich: you can read the logs and email them Feb 27 01:02:24 ESphynx: what do you want to put there? just write to /sdcard if it's generic file content Feb 27 01:02:34 ctate: I do not have an sdcard Feb 27 01:02:36 on Nexus devices internal storage is all unified these days Feb 27 01:02:38 I want to put huge stuff. Feb 27 01:02:41 it isn't a physical sdcard Feb 27 01:02:56 it's a single 32GB volume that is dynamically shared between private data and shared ("external") storage Feb 27 01:03:12 ah ok. sO i can just push there? thanks. exactly what I wanted to know :P Feb 27 01:03:16 so when you write to /sdcard it's that same 32 gb volume Feb 27 01:03:20 great Feb 27 01:03:44 [specifically, the FAT filesystem shared/external storage view is provided through a FUSE filesystem overlay] Feb 27 01:04:15 cool Feb 27 01:04:24 getting somewhere here :P Feb 27 01:05:32 ctate: i thought - you guys got rid of fat, wasn't that the whole point of MTB ? Feb 27 01:06:06 *mtp Feb 27 01:06:32 so, everything is ext4 but then exposed over MTP Feb 27 01:07:20 mtp sucks by the way Feb 27 01:07:21 i guess if you have an external sdcard it has to be fat32 or exfat or something Feb 27 01:07:27 <\monster\> can't find a solution to my JB webview issue ..when a webview is inside a dialog it won't focus on html input elements, it only started happening in JB ..has anyone seen this before? Feb 27 01:07:37 <\monster\> I've tried everything from googling Feb 27 01:07:51 g00s: shared storage is still FAT Feb 27 01:08:01 oh crap Feb 27 01:08:04 on account of it being an identical view to actual /sdcard Feb 27 01:08:22 it's not really formatted FAT underneath; it's just that the FUSE layer provides that view of it Feb 27 01:08:42 oh, ok Feb 27 01:08:42 [if you're talking about physical sdcard external storage, of course it's real FAT.] Feb 27 01:09:21 i'd *love* to get away from FAT but removable media make that hard :( Feb 27 01:09:48 After suffering on it for 30 minutes, I just discovered that I can't use the camera preview without a surface holder (i.e. can't just have a callback function), does anybody know a way around that? Feb 27 01:10:13 err, how would that even work? you need somewhere for it to actually put the pixels. Feb 27 01:10:27 the pixels can be passed to a registered callback Feb 27 01:10:37 also, what's wrong with SurfaceHolder? Feb 27 01:11:03 i want to turn the camera image into a texture and operate on it Feb 27 01:11:41 so i've implemented Camera.PreviewCallback but the onPreviewFrame doesn't get called without registering a surface holder Feb 27 01:12:08 so register one? Feb 27 01:12:12 what I want to do is apply some effect to the current camera image then display it on a GLSurfaceView or something... Feb 27 01:15:54 maybe I can just make a SurfaceView and call setVisibility to INVISIBLE... Feb 27 01:18:30 antitau, http://imrannazar.com/Augmented-Reality-with-the-Android-NDK%3a-Part-1 Feb 27 01:18:51 antitau, he gives an example that shows the entirety of getting the frame, modifying it, and pasting it back ontot he overlay Feb 27 01:19:48 closely related to my own stuff ;p Feb 27 01:20:49 kaneda^: thanks, looks good. What are you working on? Feb 27 01:21:38 antitau, a new augmented reality SDK Feb 27 01:25:45 guys, where to start looking when the app just lags behind and get stuck? Feb 27 01:26:36 In particular, the 2560 x 1600 res of the Nexus 10 is just killing it... somehow if I restrict this to a smaller area... it's a lot faster Feb 27 01:27:03 ot, but i was playing with chrome on a N10 the other day, and it was very janky Feb 27 01:27:04 <\monster\> damn you webview Feb 27 01:27:09 <\monster\> why do you hate me Feb 27 01:27:15 ESphynx, what's the context? Feb 27 01:27:23 shouldn't the GPU power goes with the native resolution? I find this ridiculous that it can't handle rendering a simple layer of stuff to fill it Feb 27 01:27:38 simple layer stuff? Feb 27 01:27:40 just use lower reso and upscale it Feb 27 01:27:44 kaneda^: my apps are super slow on the Nexus 10. they get jammed " not responding . Do you want to close it" Feb 27 01:27:47 what api level is it? Feb 27 01:27:51 zard: how to do that ? Feb 27 01:28:02 he's probably running cyanogen or whatnot Feb 27 01:28:15 zard: but again my question is. what's the point of having 2560x1600 if the GPU can't handle the simplest rendering to fill it up? Feb 27 01:28:28 ESphynx, what version of android is it running? Feb 27 01:28:35 kaneda^: 4.1.2 I think Feb 27 01:28:55 ah no, 4.2 Feb 27 01:29:00 kernel 3.4.5 Feb 27 01:29:06 ESphynx, eh, late enough to have hardware accel enabled by default Feb 27 01:29:24 kaneda^: well it's so slow I sometimes doubt it does lol Feb 27 01:29:24 ESphynx, did you root it? Feb 27 01:29:29 kaneda^: I did not Feb 27 01:30:32 i'd try something like: http://www.javachartingandroid.com/2011/04/android-top-command-to-get-cpu-usage-and-memory-usage/ Feb 27 01:30:39 curious to see what's actually eating up your resources Feb 27 01:31:06 the first thing to see is if it's processing on the UI thread, a memory problem, or what Feb 27 01:31:08 Are there things I can set to speed things up? Feb 27 01:31:19 gotta know what the problem is first Feb 27 01:31:33 btw this is all native code Feb 27 01:31:41 ESphynx, Ecere ;)? Feb 27 01:31:46 yes , all Ecere :) Feb 27 01:32:20 but like I said, if I make the window slightly smaller... 10% from each edge of the screen, I can actually drag around and the app doesn't lock up Feb 27 01:32:23 but at 100% it just dies Feb 27 01:32:57 ESphynx, this is all your native gles code? Feb 27 01:33:01 yes Feb 27 01:33:12 i have to say, i was looking through it and it looks like quite a nightmare Feb 27 01:33:20 lol Feb 27 01:33:55 Could it be possible that I don't get HW accel with GLES 1.1 ? Feb 27 01:34:02 or otherwise get cheated Feb 27 01:34:22 ESphynx, this is mostly unrelated: http://www.codexperiments.com/android/2010/05/android-introduction-part-2-setting-up-your-environment/ Feb 27 01:34:44 if you just grab the project you can see his gles native stuff Feb 27 01:34:50 GLES 1.1? how very seven-years-ago Feb 27 01:35:09 ctate 7 years ago that's like last night for me man. Feb 27 01:35:19 greybeards unite! Feb 27 01:35:28 hmm, these guys use gles 2 Feb 27 01:35:30 an Activity holding on a Fragment, will that prevent things from being cleaned up properly? Feb 27 01:35:43 * kaneda^ strokes his brown beard thoughtfully Feb 27 01:35:53 ctate, and yet android didn't support 2 until... :P Feb 27 01:35:54 hehe. thing is it's all working. Feb 27 01:35:58 just slow like hell. Feb 27 01:36:09 canadiancow: until Android 2.0 Feb 27 01:36:13 Wavesonics, unlikely Feb 27 01:36:19 If I enable Debug->Don't keep activities is that just for apps transferred with adb, or all apps? Feb 27 01:36:21 and after all the hard work I put on it and the $$$ i put on this Nexus 10, it's a tad depressing. Feb 27 01:36:24 well 2.3 if you want true working real support :P Feb 27 01:36:29 2.2 for java bindings Feb 27 01:36:33 Improv: all apps Feb 27 01:36:36 2.2 was missing a couple java bindings Feb 27 01:36:43 mhm Feb 27 01:36:49 but 9.2% of users in the market don't have 2.0 support! Feb 27 01:36:54 Improv: it's an option to debug activity lifecycles Feb 27 01:37:05 or, well, didn't when the dashboard last updated in *October* Feb 27 01:37:12 damn, i'll have to not use GLES 2 in my app :P Feb 27 01:37:22 damned peer Feb 27 01:37:28 ie, whether your code handles low memory situations where activities get cleaned up well Feb 27 01:37:39 MDijstra: Oh, wait, haha, I completely misunderstood what it does. Feb 27 01:37:42 kaneda^: so if I run this, and run top, that would give me a clue you think? Feb 27 01:37:50 one of my speed improvements came from removing practically all dynamic memory allocations Feb 27 01:37:59 and that was a huge improvement Feb 27 01:38:08 ESphynx, nah, top is for processes Feb 27 01:38:14 it's definitely your GUI stuff Feb 27 01:38:26 kaneda^: well yeah, that should make it faster ;) Feb 27 01:38:30 hold on. The FPS counter display is saying it's updating at 18 fps Feb 27 01:38:35 kaneda^: NDK I suppose? Feb 27 01:38:38 Ordinarily, when I transfer an app to the phone via adb (as invoked by eclipse), it won't nuke its existing settings, will it? Feb 27 01:38:42 MDijkstra, i had hoped to just allow it to gobble up resources forever ;) Feb 27 01:38:45 it's just not responding to my input events :| Feb 27 01:38:46 MDijkstra, yep, NDK Feb 27 01:39:00 Is there a way to ask eclipse to do a completely fresh install in that case? Feb 27 01:39:02 MDijkstra, i'm strongest in java, python, then c, so NDK is a nice environment Feb 27 01:39:35 same here, although probably with java and python swapped Feb 27 01:39:53 (and with the addition of objective c) Feb 27 01:39:57 MDijkstra, python at home, java/c at work for me Feb 27 01:40:05 `ask @ kaneda^ Feb 27 01:40:14 lol Feb 27 01:40:18 java all the way! Feb 27 01:40:19 doesn't work here Feb 27 01:40:21 Rob|boR, you should know by now the bot won't reprimand me Feb 27 01:40:28 :( Feb 27 01:40:29 it loves me more than you Feb 27 01:40:33 :(( Feb 27 01:40:37 I'm going to go sit in my corner then Feb 27 01:41:00 Rob|boR, don't feel bad, i taught it that love was not reprimanding me, it's just a bot Feb 27 01:41:08 what bot is this? Feb 27 01:41:16 `ask @ Rob|boR Feb 27 01:41:20 canadiancow, the imaginary one Rob|boR thought was in here Feb 27 01:41:27 it loves me too! Feb 27 01:42:13 ctate, ESphynx raised a good question: if he uses gles 1.1 will he get hw accel? Feb 27 01:42:28 i do not know. Feb 27 01:42:40 ctate, and my own question, if i use gles 2 will i get it? Feb 27 01:42:51 i would certainly expect so Feb 27 01:43:00 what hw are you running on ESphynx ? Feb 27 01:43:07 <\monster\> what can be causing the keyboard not to pop up when touching input fields in a webview ..it seems like touch is working since I can uncheck/check a checkbox ..but I can't get the keyboard to popup Feb 27 01:43:25 ctate, and lastly, when is hardware going to be available in the NDK? i want direct access to all cameras Feb 27 01:43:42 ctate, Nexus 10 on android 4.2 Feb 27 01:43:57 and you're getting 18 fps/ Feb 27 01:43:59 ? Feb 27 01:44:05 that sounds likely to be hw accelerated Feb 27 01:44:09 the screen is HUGE. Feb 27 01:44:16 profile it! Feb 27 01:47:44 18fps is good, depending on what you're doing, especially at that size Feb 27 01:50:06 Does anyone know about the user of Android 4.2 Presentation class to drive secondary displays? Feb 27 01:51:17 Typo correction: Does anyone know about the use of Android 4.2 Presentation class to drive secondary displays? Feb 27 01:52:06 I have it mostly working, but am hitting a problem related to the fact that Presentation class is extended from Dialog, which is tied to a single Activity. Feb 27 01:52:38 and you want what architecture? Feb 27 01:53:39 I am using the Android MediaRouter (API 16) and Presentation (API 17) classes to generate & manage a secondary display. I followed the example in ApiDemos to create unique non-mirrored output, and so far it works fine (testing with Nexus 10 connected to HDTV via HDMI cable). Feb 27 01:53:48 However ... Feb 27 01:54:06 non mirrored, so yhou have a second display that yuo can put anything on Feb 27 01:54:16 Now, I have a situation where I want the Presentation object created in Activity X to continue running on the secondary display, even if Activity X invokes another Activity Y. In this situation, Activity X is still on the stack, but Activity Y is now on top of it. Feb 27 01:54:44 The problem is that when Activity Y starts, the physical secondary display reverts to mirroring. When I exit Activity Y, the content of Activity X's Presentation goes back (since I never called dismiss() on it). Feb 27 01:54:52 ctate: Nexus 10 Feb 27 01:55:10 So the question is: How can I keep a Presentation attached to a secondary display running on that display, even if a subordinate Activity is running on the local device? Feb 27 01:55:12 scroll back, ESphynx :) at 18fps on a N10, you're certainly hw accelerated Feb 27 01:55:15 Yes, it is Nexus 10 Feb 27 01:55:27 (and for example the Camera/Gallery app is GLES 1.1) Feb 27 01:55:42 spent all day trying to address problems brought up by MAT. with only minor success. Whats the change that the issues it sees are false positives? Feb 27 01:55:52 ctate: yeah but there is very little being drawn right now... The problem is that I think my event processing is not getting its time slices.. Feb 27 01:56:04 I'm using weak refrences, or not holding onto refrences at all. No context. I cant see HOW it could be leaking these things Feb 27 01:56:09 ctate, i can haz the code? Feb 27 01:56:10 ctate: however I'd hope for more than 18 FPS on this crazy res. Also -- I'd really like to know how to upscale ? Feb 27 01:56:17 kaneda^: source.android.com Feb 27 01:56:44 anyone can help why http://pastebin.com/Xnx0fdeN didnt bring the keyboard in ? Feb 27 01:56:46 ESphynx: like i said, profile it Feb 27 01:56:55 since you seem to be saying that 18 FPS is the best I can hope for for drawing simple stuff Feb 27 01:56:59 ctate: profile what? Feb 27 01:57:06 your app, to see where it's hogging time Feb 27 01:57:08 and why it's slow Feb 27 01:57:10 and stuff like that Feb 27 01:57:18 ctate yeah I'm trying to think how to do that right now :P Feb 27 01:57:54 ctate: but like I mentionned, what seems to be taking time is the pixel filling. Feb 27 01:58:14 a smaller screen estate is a lot faster... Feb 27 01:58:15 you're drawing approximately a bajillion pixels every frame. the N10 screen is *huge* Feb 27 01:58:22 it is huge. Feb 27 01:58:35 but I bought the device thinking the GPU could handle it. Feb 27 01:58:36 ESphynx, you can change the resolution of the overlay Feb 27 01:58:44 kaneda^ : how? Feb 27 01:58:44 i.e., render it more poorly Feb 27 01:58:56 i've tried to do that before, couldn't figure it out? Feb 27 01:58:59 i dunno, i'm using a preview callback specifically from webcam, where i can change the size Feb 27 01:59:00 ESphynx: it *can* handle it, but you don't have much headroom for overdraw Feb 27 01:59:19 ESphynx, honesly i'm still way back at double bufferring Feb 27 01:59:21 so you need to be careful about how you draw Feb 27 01:59:37 ctate: can I render complex 3D scenes at the native res? Feb 27 01:59:51 sure. at what frame rate? :) Feb 27 01:59:58 ctate: say 30fps Feb 27 02:00:00 btw, use teh googles: http://developer.android.com/tools/help/gltracer.html Feb 27 02:00:00 no Feb 27 02:00:03 hell no Feb 27 02:00:04 and othe rprofiling tools Feb 27 02:00:20 thanks. Feb 27 02:00:26 ESphynx, check out unity3d Feb 27 02:00:54 So if no... 1. that's sad, but ok. 2. what res can it *really* handle? nad how to set up a native activity/GLES to render at that res? Feb 27 02:01:11 we dont have a nexus 10 to test on Feb 27 02:01:21 I guess the huge res is just for crisp text when reading eBooks Feb 27 02:01:28 what do you mean by "really handle"? Feb 27 02:01:30 but that's still appreciable Feb 27 02:01:37 ctate: rendering 3D dynamic scenes Feb 27 02:01:40 it depends on the complexity of the scene Feb 27 02:01:42 not just static graphics. Feb 27 02:01:45 there is no 3d hardware that is capable of handling arbitrarily complex scenes at 60fps Feb 27 02:01:49 we have some really complex ones and it struggles on nice hardware Feb 27 02:01:53 not even on desktops, where the gpus are 10x+ faster than mobile Feb 27 02:01:54 64 bit Feb 27 02:02:01 I'm thinking Skyrim type stuff =) Feb 27 02:02:04 no Feb 27 02:02:07 think angry birds Feb 27 02:02:10 doom Feb 27 02:02:11 lol Feb 27 02:02:16 counterstrike 1.6 Feb 27 02:02:24 skyrim overloads even medium-range desktop hardware Feb 27 02:02:27 well CS 1.6, that's already something :P Feb 27 02:02:30 at N10 type resolutions Feb 27 02:02:40 ESphynx, from what i've seen i think cs 1.6 is possible on the new phones Feb 27 02:02:41 ok ok :) Feb 27 02:02:47 but the scne I have right now Feb 27 02:02:47 and you want to do similarly complex graphics on mobile? it is to laugh. Feb 27 02:02:49 is really simple Feb 27 02:02:55 it's basically just a sphere Feb 27 02:02:59 "really simple" means 12 triangles. Feb 27 02:03:04 lmao Feb 27 02:03:08 what's your tri count? Feb 27 02:03:13 i'm struggling just to do some relatively simple operations across the entire frame at a reasonable framerate Feb 27 02:03:15 Angry birds HD with ultra high resolution Feb 27 02:03:20 I could check. maybe around 200. Feb 27 02:03:29 and are you doing anything that causes overdraw? what kidn of shaders? etc Feb 27 02:03:31 ctate: but my worry. is that it's not the tri count taht seem to matter, but the pixel count. Feb 27 02:03:46 ctate: fixed pipeline. GLES 1.1 Feb 27 02:03:47 ESphynx: all of our apps run with OpenGL Feb 27 02:03:51 e.g., the sobel code i posted earlier (w/ native conversion) runs at ~18FPS on the htc one x Feb 27 02:03:59 ESphynx: you should be able to draw a sphere at full resolution without any problem Feb 27 02:04:04 and that's literally just taking chroma and performing a tiny bit of math Feb 27 02:04:07 romainguy: I'm thinking so. Feb 27 02:04:09 "fixed pipeline" means you don't know how the shaders are rewritten for the GPU Feb 27 02:04:18 ctate: right. Feb 27 02:04:19 ESphynx, 18fps just to do simple math on every pixel Feb 27 02:04:22 ctate: on some GPUs there won't even be shaders Feb 27 02:04:35 romainguy: he's specifically getting 18fps on his N10, and is unhappy :) Feb 27 02:05:00 (with the caveat that the N10 is a *HUGE* number of pixels to draw on every frame) Feb 27 02:05:01 ctate: my unhappiness right now stems from the fact that at 18 fps the GUI thread is not processing at all. i'm gonna look into that. Feb 27 02:05:13 N10 runs Dead Trigger at full resolution with MSAA 4x at 30 to 60 fps :p Feb 27 02:05:22 ESphynx: profile it! :) Feb 27 02:05:31 but what I find strange is that by reduing the screen size just a bit (similar triangles count being pushed) I get a big difference Feb 27 02:05:34 ESphynx, romainguy, you should be able to draw a bit more than a sphere on any res :D Feb 27 02:05:38 but maybe I'm lying there again. Feb 27 02:05:45 kaneda^: that's my point exactly Feb 27 02:05:54 well my point also Feb 27 02:06:05 ESphynx, could it be locking up because it's hiding a sigabort/sigsegv from yuo? Feb 27 02:06:07 what I'm getting at is there must be something else causing this issue Feb 27 02:06:37 sigsegv? no? lol Feb 27 02:06:44 if reducing your pixel count helps enormously that suggests that your code is written in a heavily fill-bound way Feb 27 02:06:46 i see the frames being re-rendered Feb 27 02:06:47 hey man, it's an honest question ;p Feb 27 02:06:52 ok Feb 27 02:06:54 overdraw is bad. Feb 27 02:07:03 ctate: heavily fill-bound yes Feb 27 02:07:04 ctate, fill-bound? Feb 27 02:07:09 that's my concern. why is it fill bound? Feb 27 02:07:31 ESphynx: can you explain more about what you're drawing exactly? Feb 27 02:07:55 ESphynx, fill-bound? Feb 27 02:07:57 romainguy the earth as a sphere Feb 27 02:08:08 what about textures, lights, etc.? Feb 27 02:08:14 yah, textures Feb 27 02:08:25 what's this thing about overdraw ctate ? Feb 27 02:08:34 and what's fill-bound? Feb 27 02:08:37 "overdraw" is when you draw a pixel more than once Feb 27 02:08:38 romainguy: 2 simple light and textures, yeah Feb 27 02:08:45 do you have a depth buffer, do you cull triangles...? Feb 27 02:08:56 how many textures? what sizes? romainguy's other questions too... Feb 27 02:09:01 ctate: i just tried something off... there was some overdraw in there with alpha blending involved as well Feb 27 02:09:02 it's going to take a long time if you're not going to say more about what you're doing... Feb 27 02:09:26 but what's fill-bound? Feb 27 02:09:50 kaneda^: "fill" is writing pixels to the screen. if the sheer ability to push pixels to the screen is the limiting factor, you're fill bound. Feb 27 02:09:57 http://docs.unity3d.com/Documentation/Manual/MobileOptimisation.html <-- is this it? Feb 27 02:09:58 typicalliy this means you're drawing each pixel several times Feb 27 02:10:09 or just doing too much work per pixel Feb 27 02:10:15 (with lighting or shaders) Feb 27 02:10:31 are mobile shaders really slow? Feb 27 02:10:32 ctate, i have an inbound buffer and an outbound buffer, each pixel touched once-per render, does that make sense? Feb 27 02:10:58 just trying to feel this here. Feb 27 02:11:08 mobile GPUs are much much MUCH slower than desktop GPUs in all ways. Feb 27 02:11:13 so I think if I fix my processing... even if the thing runs at 30 fps it's still not responsive, so I got something to fix there Feb 27 02:11:16 internalize that fact. Feb 27 02:11:26 ctate, umad? Feb 27 02:11:29 responsiveness is a different issue Feb 27 02:11:32 then if I can have an option to lower the res, it's going to both fix my crazy DPI and fix performance , and I'll be happy. Feb 27 02:11:44 from what you guys are saying these GPU are still shit. Feb 27 02:11:46 ctate, dont worry, give it a few years Feb 27 02:12:01 ESphynx: they are quite capable Feb 27 02:12:02 kaneda^: err, why the "umad?" Feb 27 02:12:04 so it's probably normal that things are slow. Feb 27 02:12:16 ctate, you sounded angry, it's my meme way of pointing it out Feb 27 02:12:18 romainguy: they're still still slower than say hottest GPUs from 2 years ago Feb 27 02:12:20 ESphynx: like he said, there are 3D games that run at 30fps - 60fps on N10 hardware Feb 27 02:12:32 ctate: in native res though? Feb 27 02:12:36 yes Feb 27 02:12:37 ESphynx: yes Feb 27 02:12:55 if you're drawing a 200-triangle scene and only getting 18fps, you're doing things inefficiently Feb 27 02:13:03 ctate, i just got the first phone i've ever owned that can play angry birds Feb 27 02:13:06 ctate: 18 was actually the update rate I was asking. Feb 27 02:13:07 so again, please tell more about what you're doing exactly Feb 27 02:13:29 let me crank it up Feb 27 02:13:44 main problem rioght now is responsiveness Feb 27 02:13:53 responsiveness is not necessarily related to drawing speed Feb 27 02:13:59 that's why I lowered it down to 18 Feb 27 02:14:01 that suggests you're handling input wrong Feb 27 02:14:04 right. I definitely see that. Feb 27 02:14:07 you are probably right. Feb 27 02:14:12 crank it back up to 60 and see how fast it draws Feb 27 02:14:51 28 seems to be the max right now Feb 27 02:15:05 definitely high for that res Feb 27 02:15:14 kaneda^: no it's not Feb 27 02:15:20 28fps? Feb 27 02:15:42 60fps is high for that hw :) Feb 27 02:15:53 60fps is probably the max for that hardware ;p Feb 27 02:16:00 200 tris is nothing Feb 27 02:16:07 should be able to hit 60fps no problem Feb 27 02:16:12 unless there's something really inefficient going on Feb 27 02:16:12 it's the max because it's the refresh rate of the display and we're always vsync'd Feb 27 02:16:15 profile it! Feb 27 02:16:27 i havent tested the nexus 10, but on my phone i've definitely never run any kind of 3d stuff at 60 :D Feb 27 02:16:31 Getting a tri count Feb 27 02:16:40 30 is good for most of the stuff we do Feb 27 02:16:42 again the tris isn't the problem, it's the pixels Feb 27 02:16:43 at 60 fps you have 15-16 milliseconds to draw each frame Feb 27 02:16:53 15 ms is a pretty long time for a gigahertz cpu Feb 27 02:17:25 but again, overdraw or winding up with shaders doing a lot of work will kill you Feb 27 02:17:31 or if e.g. you wind up thrashing textures Feb 27 02:17:34 ctate, on the flip side of that if you're doing a per-pixel operation at that res and it's of any sort of complexity you're looking at single digit fps Feb 27 02:17:44 kaneda^: as i just said :) Feb 27 02:17:53 kaneda^: it depends Feb 27 02:17:57 For SQLiteDatabase, is it kosher to pass null as SelectionArgs if there are no ?s to bind? Feb 27 02:18:16 Or do I need to make an empty String[] to pass in? Feb 27 02:18:28 ctate: I'm sure this is all GPU bound here Feb 27 02:18:52 SQLiteDatabase.rawQuery() I mean Feb 27 02:18:55 ESphynx: again, please explain exactly what you are drawing and how Feb 27 02:18:59 (fwiw, also note http://developer.android.com/tools/help/systrace.html ) Feb 27 02:19:22 yeah I don't know the tri count Feb 27 02:21:15 romainguy: the earth with textures aiming for 1for1 pixel, and enoguh detail to appear smooth Feb 27 02:22:08 that does mean around 4MP of textures Feb 27 02:22:36 romainguy: http://ecere.com/tmp/ohoh.png Feb 27 02:23:08 that was in 1280x752 ... now think 2560x1600 =) Feb 27 02:23:25 the textures are 2x bigger in each dimensions Feb 27 02:26:33 ESphynx, what's done on models typically to improve that is you bake the model with the lighting, so it appears dynamic, and you can see the whole thing in 3d, but it's all pre-rendered and the texture optimized Feb 27 02:26:58 i know unity3d locks the resolution Feb 27 02:30:50 Hey guys. I was working with windows and I have a SSD as my main drive so I am really conservative on disk space and I tried cutting things down but when I rebooted it wouldn't start up (BSOD) (WIndows) So I booted up in my live CD (Ubuntu) and I have all my project files recovered... should I stick with ubuntu or switch back to windows. Which one would be less of a hastle? Thanks. Feb 27 02:31:25 I'm on my live CD now by the way Feb 27 02:32:36 agy2154, not really the right place for this, try #linux Feb 27 02:32:47 we're always up for a random ass discussion in there Feb 27 02:32:48 I recommend BeOS Feb 27 02:32:57 BeOS? Feb 27 02:33:10 I'm not a Intermediate Linux user Feb 27 02:33:13 lol Feb 27 02:33:45 according to wiki BeOS is discontinued Feb 27 02:34:38 Idk Feb 27 02:34:45 kaneda^: what Os are you on? Feb 27 02:34:50 Leeds: What about you? Feb 27 02:35:54 slackware, of course Feb 27 02:37:08 Anyone got a moment for a question on Android 4.2 secondary displays? Feb 27 02:37:27 anyone can help why http://pastebin.com/Xnx0fdeN didnt bring the soft keyboard in ? Feb 27 02:40:32 well, damn. For every display update I'm rendering 4 times! Feb 27 02:41:38 ESphynx, that's bad Feb 27 02:42:21 ctate, out of curiosity, you happen to know how large the source is if i wanted to get the whole thing? Feb 27 02:42:37 kaneda^ very bad. Feb 27 02:43:06 ESphynx, why? Feb 27 02:44:44 kaneda^ I don't know man!! i'm trying to find out :P Feb 27 02:45:03 this is very encouraging though :P Feb 27 02:45:06 does anyone use IntelliJ instead of Eclipse? Feb 27 02:45:08 hey RustyShackleford =) Feb 27 02:45:22 RustyShackleford: sure. Feb 27 02:45:32 it seems like Eclipse would be better supported Feb 27 02:45:39 at least, Google wants you to use Eclipse Feb 27 02:45:43 RustyShackleford: there's support for both. Feb 27 02:53:42 I ask because I tried PyCharm today Feb 27 02:53:49 it's pretty slick Feb 27 02:54:12 I wonder if IntelliJ is any faster than Eclipse Feb 27 02:56:58 kaneda^: figured it out... I was rendering around a window on top in 4 extents =) Feb 27 02:57:09 ? how'd that happen? Feb 27 02:58:36 kaneda^ : well, there's a floating window on top for saturation / brightness , and the GUI engine was asking for 4 separate refreshes for the areas around it (not to render under the floating window) Feb 27 02:59:15 I get horrible performance even in desktop mode when there's a lot of controls doing that... and it obviously looks like a bad idea in OpenGL almost always. Feb 27 02:59:40 that does explain why it was going faster when the window was smaller... it wasn't overlapping the said window :) **** ENDING LOGGING AT Wed Feb 27 02:59:58 2013