**** BEGIN LOGGING AT Tue Jun 12 02:59:58 2012 Jun 12 03:02:12 I'm using this : https://gist.github.com/2909001 code to set a custom title to my app. I then extend this base activity for my normal activities. But I get an exception says : http://stackoverflow.com/questions/5788420/error-regarding-the-title Jun 12 03:11:12 I'm using this : https://gist.github.com/2909001 code to set a custom title to my app. I then extend this base activity for my normal activities. But I get an exception says : http://stackoverflow.com/questions/5788420/error-regarding-the-title Jun 12 03:38:59 How would I go about just getting the current hour in military time? Jun 12 03:44:39 Mavvok: http://developer.android.com/reference/java/util/Calendar.html#HOUR_OF_DAY Jun 12 03:52:44 Hey I am having a hard time with this function. Jun 12 03:52:44 http://pastebin.com/ihg0MutR Jun 12 03:52:57 I want it to delete one row of my tablelayout Jun 12 03:53:04 But I cant figure out how to do that Jun 12 03:54:36 Any Ideas? Jun 12 05:47:16 does anyone have a link on what requirements there are to get the 'editors choice' tag on the play store? Jun 12 05:52:01 so after working on this for two days i still cant figure out why this layout acts weird http://bit.ly/MFjHXR. it works fine in the preview but not on the emulator or device. i'm trying to get the elements to take 80% and 20% of the screen repectively. Heres a screenshot of the view in the preview and emulator http://bit.ly/LptvVu Jun 12 05:57:30 looks like the picture for me Jun 12 05:57:45 2.3.3 Jun 12 05:59:37 I am testing my own server Jun 12 05:59:37 http://184.169.163.164:9092/ Jun 12 05:59:51 everyone is welcome to go in~ the chatroom and say something Jun 12 06:01:15 @f2prateek try wrapping the pick and button in another layout and set the weight on the layout Jun 12 06:01:22 augh, why does my build break every time the SDK updates!? Jun 12 06:03:36 p_l: how do those screens look ? Jun 12 06:03:45 tmho:each in a linear layout? k i'll try that, but nested layouts are bad for performance right? Jun 12 06:04:06 hi all Jun 12 06:04:33 I am running android emulator under linux , how can I compile software for android? Jun 12 06:04:38 g00s whats up bish Jun 12 06:04:41 Is it preferable to utilize AsyncTask over Thread? Jun 12 06:04:53 Mavvok it does a decent bit of the work for you Jun 12 06:04:55 * ron_frown shrugs Jun 12 06:04:57 ron_frown: i think p_l was looking at retina displays Jun 12 06:05:07 new macbook pros Jun 12 06:05:09 yeah Jun 12 06:05:29 I'm due for a new mbp Jun 12 06:05:31 rather laptop Jun 12 06:05:36 havent decided if it'll be a mbp Jun 12 06:05:52 dont most of them still have optical drives ? i thought they would get rid of those Jun 12 06:06:01 I dont know Jun 12 06:06:09 I have a unibody mbp Jun 12 06:06:10 ron_frown: why would it not be a mbp! they're awesome :) Jun 12 06:06:12 and it still has slot load Jun 12 06:06:21 apple is going nazi wth osx Jun 12 06:06:30 ron_frown: going? Jun 12 06:06:32 and the price premium you pay, doesnt really pay anymore Jun 12 06:06:53 Mavvok - word has it, to release software for mac in next os, its all through their market Jun 12 06:07:04 g00s: good Jun 12 06:07:10 if they want to pull that, I'll buy something else =0 Jun 12 06:07:13 Hello guys Jun 12 06:07:22 Has anyone used ASync tasks before? Jun 12 06:07:27 tmho: no still the same problem Jun 12 06:07:28 I think it's just the retinas that don't have an optical drive Jun 12 06:07:30 g00s: http://pc.watch.impress.co.jp/img/pcw/docs/536/948/html/12.jpg.html <--- the 13.5" screen displaying a PDF about some of the tech used inside :) Jun 12 06:07:32 If so, would anyone happen to know how to execute it? Jun 12 06:07:35 the reality is my like for mbp is its a unixlike os with a nice efficient window server Jun 12 06:07:46 when wayland hits stable releases on linuxe Jun 12 06:07:54 osx go bye bye anyway Jun 12 06:08:15 do I need to compile under android or I can compile it under linux? Jun 12 06:08:29 ron_frown: i was suggesting that they were there four score and seven years ago. Jun 12 06:08:47 more so as of late Jun 12 06:08:52 and the prob is Jun 12 06:08:59 their app store for desktops sucks hugest balls ever Jun 12 06:09:10 every god damn trillian update it notifies me there are updates Jun 12 06:09:21 ron_frown: my problem, is i want to use lightroom … maybe sometime in the future photoshop Jun 12 06:09:28 so that rules out linux Jun 12 06:09:35 so I go to update, it wants me to log in, I log in, it says it was downloaded with a diff acount (I only have one and its a free app anyway?) Jun 12 06:09:43 so I completely uninstall Jun 12 06:09:48 relogin with appropriate account Jun 12 06:09:51 redownload Jun 12 06:09:54 it works... Jun 12 06:09:56 g00s: given the way Apple is kicking Adobe out, I suspect you might see Lightroom on Linux in some future :) Jun 12 06:09:58 until the next version of trillian =) Jun 12 06:10:11 p_l: heh, that would be the day Jun 12 06:10:33 actually, i have a friend who works at adobe. a core engineer that works on iec colorspace profiles, code, or something Jun 12 06:10:44 i have no idea tf that even is, anyhow Jun 12 06:10:47 *wtf Jun 12 06:11:05 turns out that they outsourced almost everything Jun 12 06:11:15 and a ton of domain knowledge went out the window Jun 12 06:11:23 incidentally I know for a fact thats the same with apple as well Jun 12 06:11:26 maybe they'll actually produce a product that works this time /snicker Jun 12 06:11:27 they outsource a *LOT* Jun 12 06:11:28 and that now, they are really struggling with code quality, etc Jun 12 06:11:51 not that I really wanted to go there tonight... but that osunds like my work exactly Jun 12 06:11:56 notice, i didn't say /offshore/ , but they did offshore Jun 12 06:12:10 shitstorms have become a lot more frequent, and closer between Jun 12 06:12:12 they just did what everyone thinks they can do, get work done faster for cheaper Jun 12 06:12:17 ron_frown: I wonder if they outsourced enough people to lose anyone who might have an idea how to fix some of the Mach bugs Jun 12 06:12:26 anyhow, now most of their core engineers have left Jun 12 06:12:28 and then my boss calls me in... "how can we speed things up, its not getting done fast enough?" Jun 12 06:12:39 the people who were working ps for years and years Jun 12 06:12:53 WTF!?!? I can speak for myself and the other dudes on the team, everyone has been going like 1mil miles an hour since they started Jun 12 06:12:53 ron_frown: or maybe that's why they are pushing for some new limited APIs that are frankly a bit crappy... they bypass the bugs so OSX has to be restarted less often ;) Jun 12 06:13:03 they need to get with fucking reality Jun 12 06:13:04 interestingly, LR has a different lineage than the rest of their code Jun 12 06:13:05 software takes time Jun 12 06:13:09 quality takes a bit longer Jun 12 06:13:31 and offshoring usually is done on the basis of cost, not quality of the team Jun 12 06:13:53 well, in this case they lost domain expertise. you can't just take a generic dipshit coder, apparently, to have them do special transforms and effects Jun 12 06:14:00 (you can find *great* teams to outsource to... it's just that they aren't the usual offshoring target, because they *cost*) Jun 12 06:14:39 g00s - we were moving to slow, so we were told to investigate Jun 12 06:14:39 http://www.basic4ppc.com/?gclid=COrAz4SGyLACFYcZQgodXiq5WA Jun 12 06:15:11 lol Jun 12 06:15:19 writing exact code with different syntax and shittier tools isnt going to speed things up Jun 12 06:15:25 a god damn time machine is going to speed things up Jun 12 06:15:31 Quickly need help to convince someone in the company, that BLOCKING the BACK KEY is a BAD IDEA. The design rules actually talk about it, but it is too long for my japanese colleague to understand. Need a official ONE sentence statement where it says: BACK KEY SHOULD ALLOW TO GO BACK TO THE HOME. Jun 12 06:15:33 or shit, buy me a bunch of speed Jun 12 06:16:01 pboos: looks to me like you already have one Jun 12 06:16:06 pboos - there are legitimate cases, but those cases would be custom hardware/ custom .Launcher intents Jun 12 06:16:54 pboos: tell him it's for system services only Jun 12 06:17:01 doclhome: it seemed not to be enough. The response I got after showing the examples on the design guidelines was: I will think about it. (which for a japanese is: no) Jun 12 06:18:03 pboos - I back ported the entire bottom statusbar from ics tablet into gingerbread because I was told to Jun 12 06:18:04 * ron_frown shrugs Jun 12 06:18:25 Biggest problem: he does not believe me, can't read english. That is why I look for a simple, short but CLEAR statement. Jun 12 06:18:44 if it is short he might spend time translating it word by word with a dictionary.. Jun 12 06:18:55 ron_frown: ouch :( Jun 12 06:19:08 it was an interesting challenge =) Jun 12 06:19:46 ron_frown: :) Jun 12 06:20:20 thats about the only thing about software business that interests me at all anymore Jun 12 06:20:58 there are way way way way too many complete and utter dumbshits in the business with no real skills to speak of Jun 12 06:21:10 just ruins it for me Jun 12 06:22:13 so, i guess adobe is really floundering in many areas though. steve was right, they are lazy Jun 12 06:22:16 I dont think I'm even super advanced at all with shit, but frankly I'm sick of not being able to use modern technology because those around me arent willing to learn anything new =) Jun 12 06:22:17 pboos: are you his client? Jun 12 06:22:24 ron_frown: yes. it is too sad :( that is why i hope my next android app will make enough money to start my own business, where i am my own boss Jun 12 06:22:55 if I have android.mk , how can I build it? Jun 12 06:23:02 any tip ? Jun 12 06:23:03 pboos: good luck with that :) Jun 12 06:23:04 doc|home: he is the boss of another team. and i am just a android dev (even one of the leaders). but since he is top of the project, he decides... Jun 12 06:23:09 as a part of the team, we're only as strong as our weakest links, and we have lots of em Jun 12 06:23:13 drcode - ndkbuild Jun 12 06:23:41 ron_frown: too many :( Jun 12 06:23:43 or if its part of android os build and its an app Jun 12 06:23:55 hi ron_frown Jun 12 06:24:04 you include in product_config.xml or whatever Jun 12 06:24:08 not .xml Jun 12 06:24:09 .mk Jun 12 06:24:15 ndkbuild under linux or I need to copy it into android emulator? Jun 12 06:24:25 where did you get ti from first of all Jun 12 06:24:44 ndkbuild is used to build native code for jni interop Jun 12 06:24:52 ok Jun 12 06:24:54 thankyou Jun 12 06:24:56 .mk files are pretty much used for that Jun 12 06:25:03 so you need to install ndk toools Jun 12 06:25:07 then one of the apps is ndkbuild Jun 12 06:25:22 the os makefiles automatically process .mk files as well Jun 12 06:26:29 you really should see the shit I get to deal with Jun 12 06:26:40 today I am fucking around trying to fix code from one of our hardware vendors Jun 12 06:26:52 the backlight shit is just broke in our hardware, so I start digging into it Jun 12 06:27:33 there was some crazy fucking case where if you happened to be compiling a specific wifi driver into the kernel, the board config would basically repurpose the the PWM driver for something in wifi Jun 12 06:27:49 so basically backlight would never work if wifi was compiled in Jun 12 06:27:54 whether it was used or not Jun 12 06:28:40 people make mistakes... but god damn, I'm relatively new to the embedded development stuff, and I was able to see that as a problem real fast Jun 12 06:29:16 sounds to me like something that might require a hardware errata :D Jun 12 06:29:45 they are the fucking hardware guys! Jun 12 06:29:45 haha Jun 12 06:29:47 thats the point Jun 12 06:30:12 g00s: are you doing this sensordrone thing? ;p Jun 12 06:30:24 before they had it setup where the HDMI medialink i2c address was tied to same address that handled touch screen shit Jun 12 06:30:27 wabz: what sensordrone ? Jun 12 06:30:30 an extra PWM chip for the backlight, attached over I²C/SPI Jun 12 06:30:45 so if you happened to boot device with hdmi plugged in... shit would seriously go bannanas when it got into gui Jun 12 06:30:57 clicking 50x/sec in random locations Jun 12 06:31:16 p_l - the thing has several pwm drivers... only one being used for pwm backlight Jun 12 06:31:23 g00s: http://www.kickstarter.com/projects/453951341/sensordrone-the-6th-sense-of-your-smartphoneand-be Jun 12 06:31:32 they probably just mistyped PWM1 with PWM0 Jun 12 06:32:11 ron_frown: heh. So it's mistyping, or do they need to reroute something on the board? :) Jun 12 06:32:15 (Jumper cables!) Jun 12 06:32:23 I dont think they need to reroute Jun 12 06:32:31 wabz: cool, i never heard of that Jun 12 06:32:38 that would be one awesome mod for released phone...open, and you see jumper cables ;) Jun 12 06:32:53 p_l - I've seen that in production hardware I got for evaluation Jun 12 06:32:57 :D Jun 12 06:33:08 a dvi->lvds transmitter Jun 12 06:33:27 wabz: i really want some good personal air pollution data though, like the air quality egg Jun 12 06:33:56 hello Jun 12 06:34:07 anyway Jun 12 06:34:18 I wish I could do more of this shit for a company thats not arsebackwards Jun 12 06:34:25 (and I actually think its pretty much just my boss) Jun 12 06:34:44 Does anyone know how to implement PTP for the USB Host? Jun 12 06:35:02 ron_frown: I think people that aren't arsebackwards get kicked out by board ;) Jun 12 06:35:17 i'm trying to control a camera from an android device Jun 12 06:35:21 p_l - thats what I'm finding... sad as shit too Jun 12 06:35:25 i got some working code but stuck at the moment Jun 12 06:36:00 I'm an entrepreneur myself... and I always wanted people that would do the best that they could do, people that could shine, and likewise make me look good as well (not taking credit, just proud of a quality, qualified team) Jun 12 06:36:27 seems like that is by far definitely *NOT* what other companies are looking for at all Jun 12 06:36:39 I dont do the lemming thing, or the kiss ass thing Jun 12 06:36:55 testlol Jun 12 06:37:15 ron_frown: and i thought that is only the case here in japan.. :( where are you at? Jun 12 06:37:38 sooo... anyone able to help me? :X Jun 12 06:37:48 california Jun 12 06:38:01 surprised to hear that about japan... seems like a place that would have pride in what they did Jun 12 06:38:15 pboos: do you speak japanese? Jun 12 06:38:15 and we'd expect things to be different around the valley Jun 12 06:38:25 ron_frown: they do.. but you do what the boss says.. even if he is stupid. Jun 12 06:38:27 ron_frown: yeah, but there's also a lot of "class system" still in place Jun 12 06:38:44 and gaming *that* might be hard Jun 12 06:38:45 hwrd|work: only some japanese, but enough to get through. Jun 12 06:38:50 pboos: where in Japan? Jun 12 06:39:05 Leeds: Living in Saitama, working in Shibuya, Tokyo Jun 12 06:39:40 went to Tokyo last year for the first time... just booked flights this week to go back this Christmas, planning to go to Nagano and Kyoto or Osaka Jun 12 06:39:55 so i take it there's no one who can help? Jun 12 06:40:08 AshCoder: not many people with hardware experience around, unfortunately Jun 12 06:40:18 please don't take it personally :) Jun 12 06:40:21 well, it's more on software to control the hardware Jun 12 06:40:36 ash I've got a lot of android hardware experience Jun 12 06:40:42 but not specifically with what you are trying to do Jun 12 06:40:47 AshCoder: yeah, but with USB that's not really a differnce... bloody PIO crap ;) Jun 12 06:40:47 lol Jun 12 06:40:55 Leeds: nice :) coming to Tokyo too? Jun 12 06:41:20 I've never messed with the usb to control arduino or anything Jun 12 06:41:28 pboos: for a day or two, yeah... flying in and out of NRT, and my (HK Chinese) gf wants to go to a Namie Amuro concert, if she can get a ticket Jun 12 06:41:37 Leeds: I've spent christmas in osaka for the last 3 or 4 years Jun 12 06:41:41 hmmm... Jun 12 06:41:44 DallaRosa: how is it? Jun 12 06:41:56 nice, don't expect any snow though Jun 12 06:41:59 anyone familiar with Picture Transfer Protocols then? Jun 12 06:42:18 should be plenty of snow around Nagano though Jun 12 06:42:29 I just realized a jedi-mind trick to increase app sales Jun 12 06:42:34 i'm fairly certain its working, too Jun 12 06:42:52 ready? Jun 12 06:42:54 readme: put the price up, then drop it again and say your app is on sale? Jun 12 06:43:03 that's a good idea, I did only half of that. Jun 12 06:43:05 AshCoder: http://forum.xda-developers.com/showthread.php?p=27294191 Jun 12 06:43:11 I put text in my copy that says "On sale" but I never changed the price Jun 12 06:43:14 * readme evil grin Jun 12 06:43:14 this guy seems to be working on that Jun 12 06:43:15 heh Jun 12 06:43:37 DallaRosa: so you'd recommend Osaka over Kyoto? Jun 12 06:43:58 readme: Jun 12 06:44:02 whats ya app? Jun 12 06:44:21 I lived for 4 years in kansai region (studied in nara, lived in tokyo and worked in Kyoto) Jun 12 06:44:25 wabz: are you working on the sensordrone thing ? Jun 12 06:44:27 tmho dunno if I wanna say it right after I shared with you my lack of moral integrity Jun 12 06:44:29 if you're after temples Jun 12 06:44:33 you go to kyoto Jun 12 06:44:43 the traditional japan is there Jun 12 06:44:55 haha Jun 12 06:45:18 personally, I'm mainly after sushi :) Jun 12 06:45:18 but I find osaka better for fun in general Jun 12 06:45:36 lol Jun 12 06:45:36 they have great sushi places for relatively cheap price Jun 12 06:45:37 that link Jun 12 06:45:40 is my thread! Jun 12 06:45:41 hahaha Jun 12 06:45:41 is yours Jun 12 06:45:42 lol Jun 12 06:45:48 plenty of time to decide, anyway Jun 12 06:45:50 you /think/ you're eating sushi :) Jun 12 06:45:52 I considered that possibility ;) Jun 12 06:46:38 ya. pretty much stuck. there's an implementation of it for the arduino as well as on the linux Jun 12 06:46:45 but none in Java Jun 12 06:47:02 i'm trying to use the USB Host api to do it Jun 12 06:47:18 i got friends who took the linux code from gphoto and wrapped it or smthing to make it work Jun 12 06:47:26 but their method requires rooting the device Jun 12 06:48:24 I use an eye-fi Jun 12 06:49:47 AshCoder: Chainfire afaik uses some tricks to get access to libusb, using the official API only for establishing device access. You could probably use similar approach to port some code from gphoto Jun 12 06:50:27 a/wc Jun 12 06:51:11 mmm Jun 12 06:51:35 but his isn't really opensource Jun 12 06:52:03 AshCoder: yes, but I only described the method Jun 12 06:52:49 p_l: i'll try to take a look at it Jun 12 06:53:55 p_l:u refering to the libusb from gphoto? Jun 12 06:59:39 g00s: nah, just wondering since it's hardware + bluetooth and I had a vague recollection that you were doing something like that Jun 12 07:00:00 I'm doing a silly app using the samsung s-pen sdk atm for their competition :p Jun 12 07:01:43 wabz: good luck with the competition :) Jun 12 07:04:32 Hi, do I need to do something special in eclispe when building an apk for Google Play distribution? Jun 12 07:04:47 Or is it just to copy the .apk file that is compiled for me and upload that to google play? Jun 12 07:05:51 granden: as long as you've built and signed it for release, you shouldn't need to do anything else with it Jun 12 07:07:32 Can I setup eclipse to sign it for release? Jun 12 07:07:45 yeah just the keystore Jun 12 07:07:49 *just use Jun 12 07:07:56 keystore? Jun 12 07:08:01 New to android development. Jun 12 07:08:08 right lcik project Jun 12 07:08:12 select android tools Jun 12 07:08:35 export signed applicaiton package Jun 12 07:08:42 should walk you through it Jun 12 07:08:47 let me know if it doesnt Jun 12 07:09:13 f2prateek: Could I just create a new keystore? Jun 12 07:09:20 remarkable how much which outlet I plug my phone in effects whether it will actually charge. Jun 12 07:09:55 readme: Some computer have low power usb-ports. That is only for mice etc. Jun 12 07:10:00 mouse* Jun 12 07:10:09 yeah use a new keystore, just remember where you keep it, since you cant use a different one to realse updates Jun 12 07:10:22 *release Jun 12 07:10:24 Hmm, sounds like I should put it on the nas :) Jun 12 07:10:27 for the same app Jun 12 07:10:40 granden: apparently my house also has some low-power wall sockets.. only for lulz Jun 12 07:10:43 can I move the keystore after cerating it? Jun 12 07:10:49 yeah Jun 12 07:10:56 readme: Oh you meant those. Haha :) Jun 12 07:11:27 my rear usb ports usually can charge th device Jun 12 07:11:33 the front ones, never Jun 12 07:11:45 but when the device is dead, they don't suffice at all Jun 12 07:11:56 it died because i left it turned off all day to concentrate on working Jun 12 07:12:44 yeah front ones are generally not powered Jun 12 07:12:45 not sure how that works, though Jun 12 07:15:29 f2prateek: The Alias Jun 12 07:15:36 What is that, and where is it used. Jun 12 07:18:27 granden: http://lmgtfy.com/?q=android+keystore+alias Jun 12 07:18:58 AshCoder> http://forum.xda-developers.com/showthread.php?t=1202082 Jun 12 07:19:38 granden: i dont know exactly, but i remember reading how the alias can be used a clone an existing keystore, probably on stackoverflow Jun 12 07:20:06 it just asks for a password in eclipse, and seems to be stored with the keystore Jun 12 07:23:12 aliases reference individual keys inside the keystore Jun 12 07:23:19 the keystore is a container for multiple keys Jun 12 07:24:18 https://github.com/tom-dignan/notes/blob/master/Android/building_release.rst Jun 12 07:29:11 readme: f2prateek Thanks alot. Easy to sign and build for android. Thanks for the help though. Jun 12 07:29:36 read,e:wow thanks for the link, that was good to know Jun 12 07:43:54 AshCoder: basically, to port the ptp code using libusb, in C Jun 12 07:45:55 I have written a libusb-based ptp thingy actually, in java Jun 12 07:46:03 oh Jun 12 07:46:07 i need it in java Jun 12 07:46:12 but it wasn't in android, just a desktop application Jun 12 07:46:20 it should work Jun 12 07:46:23 multiplatform no less, worked in windows and os x simultaneously Jun 12 07:46:29 i used jphoto as a base for my code Jun 12 07:46:47 the hard part for me was making the correct usb host code link to the usb part of the jphoto code Jun 12 07:47:12 alankila: is ur code opensource? :) Jun 12 07:47:39 no, technically not Jun 12 07:48:00 :X anyway to help me then? haha.. Jun 12 07:48:31 or u can help me understand the usb protocol for ptp Jun 12 07:48:46 i mean the implementation of ptp using ussb Jun 12 07:48:48 usb* Jun 12 07:50:14 well the code is mine so I can do whatever I want with it. http://bel.fi/~alankila/EosPtpImageSource.txt Jun 12 07:50:53 ahhhh. thanks a bunch Jun 12 07:51:10 anyone know if you can write apps which modify the behavior of parrot ar drones ? Jun 12 07:54:45 JakeWharton: are you here? Jun 12 07:54:58 AshCoder: there are some classes which you don't know about, like AsyncLoadingInputStream. This is basically a ByteArrayInputStream with overridden read() that waits if portions of stream are requested which aren't available yet Jun 12 07:55:06 this design allowed overlapping image decoding with the USB data transfer Jun 12 07:55:20 barely Jun 12 07:55:24 so that's the point of the snapshot taking mechanism Jun 12 07:55:43 The code has been tested against exactly one type of camera, the Canon EOS 1100D Jun 12 07:56:02 It will likely not work against a model that differs greatly from that Jun 12 07:56:08 ah Jun 12 07:56:11 JakeWharton: was gonna ask you about the "jar mismatch" issue with ActionBarSherlock, but then decided to search google instead Jun 12 07:56:17 i'm working with a canon EOS 600d Jun 12 07:57:31 anyway it is designed to show viewfinder preview and listen to UI thread requesting snapshots in a method you don't see because it's in the abstract superclass Jun 12 07:58:16 okay noted. Jun 12 07:58:25 there's some code to set up the preview window, the viewfinder preview goes there, if the snapshot request arrives, the camera stops viewfinder mode, acquires snapshot and waits for action. Jun 12 07:58:35 you can see these parts on the stableCopyRequested AtomicBoolean Jun 12 07:58:50 JakeWharton: maybe I still need your help. I removed the support jar from the root of buildpath but now it doesn't recognize the SherlockActivity in one of the java classes Jun 12 07:58:52 :S Jun 12 07:59:37 actually it just calls onSnapshotReady method, but that method is in UI thread so it can do whatever. I designed it to pop up a dialog that waits user confirmation Jun 12 08:00:00 a bit messy/not-reusable design, but not hard to fix Jun 12 08:00:20 JakeWharton: ? Jun 12 08:01:05 AshCoder: also I used USB snooping utility on windows xp to capture the canon eos utility's usb messages for this. Jun 12 08:01:32 alankila: thanks alot. i'll start reading it. my only problem now is actually opening a proper session to the camera Jun 12 08:01:38 I'm basically replicating a minimal subset of commands it sends to the camera to perform the work and nothing more Jun 12 08:01:55 anybody else with history using ActionbarSherlock? Jun 12 08:02:02 alankila: what kind of project did you do with PTP where you used that code? Jun 12 08:02:14 alankila: just asking, for the usb portion, theres 3 endpoints, bulk in, bulk out and interrupt/event Jun 12 08:02:15 hrnt: it's a small industrial automation project Jun 12 08:02:27 AshCoder: bulk in and bulk out are only things I care about Jun 12 08:02:45 alankila: the interrupt and events dont need to bother? Jun 12 08:03:00 AshCoder: never needed them, don't even know enough of USB to understand what I could do with them Jun 12 08:03:21 alankila: what kind of things can you do with the camera with PTP? newbie question, but i am curious as i have the same camera as you (except mine is the US model) Jun 12 08:03:24 AshCoder: if you read the code that sets up CaptureRunnable it basically does some busywork to find the read and write enpoints in bulk mode and uses them Jun 12 08:03:54 hrnt: well, you can technically change settings, request snapshots, download images, and show the viewfinder, fire the flash, ... uh Jun 12 08:04:13 hrnt: I think most of the functions exposed in the camera can also be done over the USB protocol Jun 12 08:04:29 ah, cool. didn't know that ptp was that versatile. Jun 12 08:04:39 every manufacturer has their own extensions to it Jun 12 08:04:39 alankila: so far for my code, i can send the GetDevice info which doesnt need a session id. the rest of the commands i cant do yet Jun 12 08:04:41 it's a giant mess Jun 12 08:04:41 meh why does everybody need to replicate what I earn my living with :P Jun 12 08:04:45 i thought it was just a replacement for USB disk support + DCF : Jun 12 08:04:46 :P Jun 12 08:04:57 Chainfire: It's my fyp :P Jun 12 08:05:12 Chainfire: Plus, an opensource lib should help loads of people Jun 12 08:05:21 Chainfire: No offence :) Jun 12 08:05:31 hrnt: but there's no proper design in the cameras, really. Jun 12 08:05:52 hrnt: you have to know what commands it expects, if there are errors it rarely tells you what they are, you have to make intelligent guess Jun 12 08:06:14 sounds like fun :P Jun 12 08:06:22 only thing missing is that it is bricked if you send a wrong command :P Jun 12 08:06:23 alankila: when you get back the bulkout, how do u read? as in, how do u know how much to readin Jun 12 08:06:24 and for instance if you tell the camera to capture a snapshot, and it turns out it can't get a focus, it might eventually give up or enter infinite autofocus loop depending on the scene it tries to bring into focus Jun 12 08:06:53 AshCoder: I try to read as much as possible in general terms :-p but the first 4 bytes are the little-endian encoding of the packet length in bytes Jun 12 08:07:25 AshCoder: read the method response() Jun 12 08:07:27 i think soon, many cameras are going to come with smartphone / tablet apps to control them; i just noticed the panasonic fx90; and its not even an expensive camera Jun 12 08:07:45 also the PTP spec Jun 12 08:07:48 Chainfire: better make your bucks while you can :) Jun 12 08:07:54 Or my implementation of the PTP message, it's straightforward enough Jun 12 08:09:14 alankila: "checkResponseSuccess" this method? Jun 12 08:09:20 no, response(). Jun 12 08:09:21 i can't find a response() method Jun 12 08:09:36 * Chainfire sighs Jun 12 08:10:02 should've chosen a career where 90% of the people also want to get paid isntead of work for free. But such is life. Off to sell my wares to Australia! Jun 12 08:10:46 Chainfire: nah, its called don't build your house on another's platform :) Jun 12 08:11:06 i'm sure you'll come up with more cool stuff Jun 12 08:11:06 Chainfire: :X I'm not going to make an app that's going to be better than yours. Your's is really really good. I'm just a student doing a project to graduate. Jun 12 08:11:10 Chainfire: build something no one can replicate Jun 12 08:11:21 AshCoder: you must be blind, it's a few pages down from that checkResponseSuccess Jun 12 08:11:34 Chainfire / AshCoder ahh, i didn't understand what was going on here Jun 12 08:11:39 now i do Jun 12 08:12:36 alankila: I'm blind indeed :X sorry Jun 12 08:12:57 oh well good luck with it Jun 12 08:13:38 Chainfire: Thanks! When I'm done, perhaps you might want to look at it too. :) Jun 12 08:17:28 hiya folks, i've got a newbie question. i made a little opengl app and now i want to enable and program the 'settings' button but i dunno how its called in the developer guide Jun 12 08:18:29 you know the little three dots thing thats besides the back, home and task button Jun 12 08:19:11 Younos: http://developer.android.com/guide/topics/ui/menus.html this might help you Jun 12 08:19:12 once again, hello all Jun 12 08:20:22 ah got it. ty pboos Jun 12 08:20:31 anyone here with ActionbarSherlock knowledge? Jun 12 08:26:06 no actionbar sherlock knowledge at all? Jun 12 08:28:15 i tested it yesterday :) Jun 12 08:28:31 hi. is it possible to make an out-of-tree build of an app? i.e. to have build.xml in the sources directory, but to have all the produced files located somewhere else, w/o hardcoding this into the build.xml Jun 12 08:29:22 dent: library project? Jun 12 08:29:48 ixc: actually a native app, using native activity; does that matter? Jun 12 08:30:29 library project has them self own xmls, but its made for use them from a normal project Jun 12 08:32:02 i'm off. thanks for the help! Jun 12 08:38:26 dent: as ixc said, it works with library projects. doing the same here with 5 library projects. built with ant using build.xml. each library project needs its own build.xml Jun 12 08:41:01 pboos, ixc: thanks Jun 12 08:41:19 I realized I'm ants-clueless, but at least I know what to look for Jun 12 08:41:30 s/ants/ant/ :) Jun 12 08:47:47 can i make a row clickable and a button within it clickable using an arrayadpater or does it neeed to be baseadapter Jun 12 08:49:56 hello Jun 12 08:50:54 gaz`: you mean with onItemClickedListener ? Jun 12 08:51:45 i do not think it matters which adapter, but if you have a button, make sure to setFocusable(false) on the button. If you don't, your row won't be clickable anymore (onItemClickedListener won't fire) Jun 12 08:51:58 well onitemclicked works fine but i also want to add a button to each row that can be pressed Jun 12 08:52:07 aha Jun 12 08:52:09 thanks Jun 12 08:52:24 add the button, but make sure it is NOT focusable. Jun 12 08:52:39 ok Jun 12 08:54:39 hi, I have a timer and I do timer.stop, but the timer didn't stop, any ideas why? Jun 12 09:08:18 works great thanks pboos Jun 12 09:19:15 Leeds properly flooded out here check my fb wall lol Jun 12 09:19:33 water if above cars Jun 12 09:19:35 is* Jun 12 09:20:23 it wont stop me getting to burger king Jun 12 09:37:13 hi all Jun 12 09:37:19 Hey Jun 12 09:37:28 any idea about: jpeglib.h: No such file or directory ? I want to compile some android project Jun 12 09:37:30 Just wondering, what is context and how can i get it in my android software? Jun 12 09:41:16 iSnap: http://developer.android.com/reference/android/content/Context.html Jun 12 09:41:30 gaz`: yeah, seen a bunch of pics today Jun 12 09:42:12 hey guys, i get PANIC: Could not open: ~/android-sdks/tools/.android/avd/tablet.ini error when I try to start emulator. It looks wrong place for tablet.ini it is in ~/.android/avd/ in my system Jun 12 09:42:22 how can I say that look there instead? Jun 12 09:43:50 btw i am running linux mint 13 and working with eclipse latest adt Jun 12 09:46:51 i googled it but it looks like it is a windows problem but i m on linux Jun 12 09:57:39 appel1, im still fairly new to the way android works. I couldnt see how to find context Jun 12 09:57:57 hi everyone, is it possible to add Preferences from an xml file that is located externally? Jun 12 09:58:05 iSnap: perhaps you should start with http://developer.android.com/guide/basics/what-is-android.html then :) Jun 12 09:58:49 Dog. Jun 12 09:59:35 I thought this was a friendly community Jun 12 10:00:19 iSnap: I thought I was being friendly Jun 12 10:00:28 lol Jun 12 10:00:46 Um , have you used context before by any chance? Jun 12 10:01:06 iSnap: it's a very fundamental part of any android app so yes Jun 12 10:01:17 So how would you first use it? :x Jun 12 10:02:05 iSnap: in the first link I sent you it tells you that for example Activity inherits from Context. Jun 12 10:02:30 iSnap: do you know Java well enough to understand the concept of inheritance? Jun 12 10:02:58 Yeah fairly Jun 12 10:03:35 Just not sure what method to use Jun 12 10:04:23 iSnap: perhaps if you explained a bit what you're trying to do someone can help you Jun 12 10:05:20 Sure, Basically i am creating something that refreshes the layout of the page, for example., i add 1 to the value in the textview. Jun 12 10:05:22 I need it to update. Jun 12 10:05:40 So, im using AppWidgetManager manager = AppWidgetManager.getInstance(context); Jun 12 10:05:58 and updating it like so Jun 12 10:05:58 manager.updateAppWidget(R.id.label, views); Jun 12 10:07:09 anyone awake at this hour? Jun 12 10:07:44 your "this hour" isn't everybodys "this hour" :) Jun 12 10:07:47 :P Jun 12 10:07:50 it's lunchtime for me Jun 12 10:08:11 this channel never sleeps Jun 12 10:08:18 IRC never sleeps Jun 12 10:08:20 iSnap: and how did you get the 'context'? Jun 12 10:08:30 I didnt, thats the point, i have no idea how Jun 12 10:08:32 lol. Jun 12 10:08:36 well anyways. I have an app with a database that has five fields. My app creates the db fine and I can insert rows into it just fine. When I pull the db and view it in sqlite browser, it shows as having all 5 fields Jun 12 10:08:45 well, an activity is also a context Jun 12 10:08:55 problem is, when I go to access some of those fields with Cursor, it cant find two of the fields Jun 12 10:09:06 if you're doing that in an activity, you can use the activity as context Jun 12 10:09:23 Oh, its in an external class Jun 12 10:09:28 I have checked the names and they're correct Jun 12 10:09:49 I've also uninstalled the app and made sure the db was deleted but its still not able to find two of the columns Jun 12 10:10:00 then you need to pass a context to the external class Jun 12 10:10:49 And how would that be done? Sorry.. im fairly new to this :x Jun 12 10:11:12 now, I did initially have the db with only 3 fields, but that was a while ago. And like I said, inserting into those fields works just fine as they are correctly populated Jun 12 10:11:50 iSnap: are you calling the external class from an activity? Jun 12 10:12:14 Sure am Jun 12 10:12:25 so anyone have any idea? Jun 12 10:12:37 then pass the activity as a parameter and save it as a field in the class Jun 12 10:13:31 Alright ill give it a go thanks. Jun 12 10:17:26 hi, #android-dev! At GrepCode/android.widget.TextView, I found out that TextView overrides onSaveInstanceState() and onRestoreInstanceState(). I want to do this with my custom classes extending LinearLayout and similar. First of all, how do I ensure that the functions onSaveInstanceState and onRestoreInstanceState() get called? do I need to do that in my activity's on...() for every instance of my custom classes, or is there a nicer Jun 12 10:17:26 way? Jun 12 10:18:27 ? Jun 12 10:23:57 hey guys, i get PANIC: Could not open: ~/android-sdks/tools/.android/avd/tablet.ini error when I try to start emulator. It looks wrong place for tablet.ini it is in ~/.android/avd/ in my system Jun 12 10:24:03 how can I say that look there instead? Jun 12 10:24:07 btw i am running linux mint 13 and working with eclipse latest adt Jun 12 10:30:01 erkangur: use a link Jun 12 10:31:24 but there is also a folder, can i link folders? Jun 12 10:31:48 erkangur: issue "ln -s $HOME/.android/avd/tablet.ini $HOME/android-sdks/tools/.android/avd/tablet.ini" Jun 12 10:32:29 joel135: thanks for that! (: Jun 12 10:32:51 Are there any better packages for parsing XML than DocumentBuilder? It's really naff Jun 12 10:33:15 erkangur: for the entire folder, just remove tablet.ini from the command Jun 12 10:35:08 joel135: yes i think i need that way thanks Jun 12 10:38:50 any solution to this error?? http://pastie.org/4072804 Jun 12 10:52:50 ctate: sorry this got caught in my back-buffer and wanted to ask, you said that hitting 30 fps 'reliably' is better than waffling between 35 - 55 fps Jun 12 10:53:18 ctate: but if you're waffling at above 35 fps doesn't that mean you're hitting 30 fps reliably? Jun 12 10:56:34 ahmedammar_: 30-30-30-30 Jun 12 10:56:40 not 35-40-35-50-30 Jun 12 10:56:59 ctate probably isn't awake for a few hours Jun 12 10:57:16 mikedg: but what's wrong with 35-40-35-50-30 ? Jun 12 10:57:28 the more the better right? Jun 12 10:57:44 the fps should be sync'd to vsync anyway Jun 12 10:58:04 (ah but you're below vsync) Jun 12 11:03:10 hey all Jun 12 11:03:16 Hi Jun 12 11:03:30 i'd like to enable the stock wifi tether programatically Jun 12 11:03:32 any ideas Jun 12 11:03:43 anyone have experience with the codeigniter rest server? Jun 12 11:08:26 hi there Jun 12 11:09:01 what's the difference between dir /sdcard/ and /mnt/sdcard/? Jun 12 11:09:24 is sdcard just an alias of mnt/sdcard/? Jun 12 11:09:35 no Jun 12 11:09:44 they can put mountpoint everywhere Jun 12 11:09:50 dont hardcode directory Jun 12 11:10:01 get external storage from context Jun 12 11:10:08 what? Jun 12 11:10:40 the mountpoint not means nothing Jun 12 11:11:00 you mean the mnt/sdcard folder? Jun 12 11:11:07 many company make on device /mnt/sdcard or /sdcard it also can be /whatever Jun 12 11:13:22 so in apps u always need ask context about where is external directory Jun 12 11:14:38 gocha , thx Jun 12 11:15:18 how can i see my battery capacity from the os? Jun 12 11:17:33 What want this error say to me: http://pastebin.com/H0KnHjsv ? Jun 12 11:18:28 java.lang.NullPointerException Jun 12 11:18:28 06-12 11:10:49.283: E/AndroidRuntime(267): at de.bodprod.rettinfo.AntidotList$loadStoreSites$1.run(AntidotList.java:74) Jun 12 11:18:35 check it yourself Jun 12 11:23:14 I replace a fragment with a fragmenttransaction. According to the manual, replace() should remove all previous fragments in the same container. However, after replacing the fragment I call findFragmentByTag("thetag"); and it can still find the previous fragment. How can this be? Jun 12 11:23:42 got my smart watch last night Jun 12 11:23:42 woo Jun 12 11:27:01 I dont find the error in my code. This ist the code: http://pastebin.com/qMPkFFji and this is the error: http://pastebin.com/H0KnHjsv Jun 12 11:29:32 sukramTM, there are times you feel like it's the systems error...but at last you'll find out it's yourselves' wrong Jun 12 11:29:52 I'm looking through the dev-docs on how to add navigation-tabs to the ActionBar (Android 3.0/API 11).. However, the TabListener example says to use fragmentTransaction.attach , but the method attach is NOT defined for FragmentTransaction ... what gives? Jun 12 11:29:56 Did I miss something? Jun 12 11:29:57 sukramTM: what part of the error did you not read? Jun 12 11:30:16 it says nullpointerexception at (AntidotList.java:74) Jun 12 11:30:35 74: lv.setAdapter(adapter); Jun 12 11:30:41 perhaps lv is null? Jun 12 11:30:55 hence the null pointer exception Jun 12 11:31:55 i will check it Jun 12 11:33:00 why would you come ask for help without reading the error stacktrace :[ Jun 12 11:34:13 anyone around got experience with the codeigniter rest service and rest client? Jun 12 11:38:49 Is there some open source address book android app? Jun 12 11:39:41 sukramTM: google the last line Jun 12 11:42:41 I replace a fragment with a fragmenttransaction. According to the manual, replace() should remove all previous fragments in the same container. However, after replacing the fragment I call findFragmentByTag("thetag"); and it can still find the previous fragment. How can this be? I don't want this to happen Jun 12 11:43:03 who let the dogs out Jun 12 11:44:42 niles11_: did you add your original fragment into the container using a fragmenttransaction? Jun 12 11:45:40 yes, I did. With fragmenttransaction's add() method Jun 12 11:46:29 when i use "adb push" to push sth. to /system/framework , it says "permission denied " why? Jun 12 11:58:19 zhangxaochen: ro mount Jun 12 12:13:43 I want three fragments to be next to each other, where each of them will use all available height and 1/3 of the width Jun 12 12:13:52 how can I do this ? Jun 12 12:16:02 toradam what do you mean "ro mount"? Jun 12 12:19:38 XeruX: i believe a linear layout with layout_weight will work for your purpose Jun 12 12:23:42 made my first extension for my smart watch on the way to work this morning Jun 12 12:23:44 booyah! Jun 12 12:23:51 wifi access point toggle FTW Jun 12 12:24:21 anyone got experience in the codeigniter restful service and client? Jun 12 12:29:32 wongk: ty, exactly what I needed. Jun 12 12:30:31 alankila: I managed to take send the command to take photos to the camera! :) I can now push a button on an android phone to get the camera to take photo Jun 12 12:39:21 ctate: ping http://review.cyanogenmod.com/#/c/11278/ Jun 12 12:39:50 failed to copy 'calc.apk' to '/system/app/calc.apk': Permission denied Jun 12 12:39:55 what should i do Jun 12 12:39:59 zhangxaochen: adb root Jun 12 12:40:01 adb remount Jun 12 12:40:09 adb push calc.apk /system/app Jun 12 12:40:26 adbd cannot run as root in production builds Jun 12 12:40:33 remount failed: Operation not permitted Jun 12 12:40:38 Hey guys, how would you rebound an object from a wall? Jun 12 12:40:43 i already have colision detected. Jun 12 12:41:01 nebkat|beer what should i do? Jun 12 12:41:06 zhangxaochen: you cant do that Jun 12 12:41:11 zhangxaochen: you need root Jun 12 12:41:15 zhangxaochen: what app is it? Jun 12 12:41:22 why not just adb install calc.apk? Jun 12 12:41:25 it's a calculator Jun 12 12:41:37 zhangxaochen: adb install calc.apk Jun 12 12:41:44 i'm just trying this trick Jun 12 12:42:07 could you help me nebkat|beer Jun 12 12:42:14 when i input adb root, Jun 12 12:42:14 zhangxaochen: what trick Jun 12 12:42:26 it says adbd cannot run as root in production builds Jun 12 12:42:30 yes Jun 12 12:42:33 there is nothing you can do Jun 12 12:42:41 what trick? without install isnt has the user id, permissions for application Jun 12 12:43:22 ixc: ??? Jun 12 12:43:49 Hey guys , after your done look at my message Jun 12 12:43:49 :) Jun 12 12:44:14 ? ixc, no trick, I mean i'm trying the adb push method Jun 12 12:44:25 its bad idea to _copy_ a package into application folders Jun 12 12:44:44 oh if u just want try, use cache folders or tmp Jun 12 12:45:23 or sdcard if it is mounted for rw Jun 12 12:46:31 yes, i used to push a file into sdcard, and then copy it into system/app Jun 12 12:46:32 btw this topic is not android-dev; root channel for it Jun 12 12:46:48 AshCoder: oh good Jun 12 12:46:52 but it's a bit troublesome Jun 12 12:47:09 ixc,ok thx Jun 12 12:50:14 alankila: thanks a bunch. i was overthinking it and that's where it messed up. instead, i just sent the opensession and capture image commands and it worked. Jun 12 12:51:49 yeh it's pretty simple Jun 12 13:06:21 This changes everything. Again. http://cl.ly/0e2k15181u2v2B2e281C Thanks Apple! Jun 12 13:07:01 msch, i agree Jun 12 13:07:05 iOS6 is just a couple app updates Jun 12 13:07:14 but because those apps are built into the OS, it's "new" Jun 12 13:07:24 to be fair about maps though, it is a HUGE improvement for iOS Jun 12 13:07:37 it's all a huge improvement for ios Jun 12 13:07:51 mikedg its stupid Jun 12 13:07:52 none of those things could reallybe done via 3rd party apps, except maps Jun 12 13:07:53 also hw upgrades was only chipset upgrades; only the new mbp 15" model changed really Jun 12 13:07:53 they updated maps and siri Jun 12 13:07:57 and called it a new version Jun 12 13:08:00 and integrated facebook Jun 12 13:08:09 oooo integrated facebook Jun 12 13:08:11 and didnt they open up a siri api? Jun 12 13:08:12 MY DREAM COME TRUE Jun 12 13:08:22 you arent a fucking iphone user Jun 12 13:08:24 siri could be done by a third party if the OS wasnt so locked down Jun 12 13:08:32 i own an iphone 4s... Jun 12 13:08:36 i use it every day Jun 12 13:08:41 canadiancow|work: no, it's worse than before, the quality of the map data is horrible (for .eu at least) Jun 12 13:08:42 it ahs my RSA token to get on vpn! Jun 12 13:08:52 everything could be done by a 3rd party in that case Jun 12 13:09:00 ah msch, i wasnt aware. it's definitely not as good as google in canada either. i havent played around too much Jun 12 13:09:03 theres no 3d in canada :( Jun 12 13:09:08 im ignoring you, pragma is my new best friend Jun 12 13:09:15 canadians dont see in 3d Jun 12 13:09:17 mikedg canadiancow|work: compare the images. it's seriously useless now. Jun 12 13:09:19 that would be a waste of resources Jun 12 13:09:26 OH THAT'S THE SAME AREA Jun 12 13:09:29 LOLOLOL Jun 12 13:09:33 new best friend Jun 12 13:09:33 15:09:15 < mikedg> canadians dont see in 3d Jun 12 13:09:33 15:09:16 < canadiancow|work> mikedg bah Jun 12 13:09:40 oh wait Jun 12 13:09:41 wtf, sorry Jun 12 13:09:49 is it just missing the names? Jun 12 13:09:59 or are you talking about the transit stuff Jun 12 13:10:07 but i'll agree those streets arent easy to see Jun 12 13:10:35 canadiancow|work: no, it's missing nearly all street names and highlights, so orienting is next to impossible, it doesn't have the traffic stuff and it doesn't have the one-way-street info. it's really worthless Jun 12 13:10:36 mouse is a hell made device Jun 12 13:10:43 also touchscreen Jun 12 13:10:48 oh yea no traffic in canada either Jun 12 13:10:54 or at least there wasnt last night Jun 12 13:11:00 oh and no public transport stuff Jun 12 13:11:22 but it's fully-apple now Jun 12 13:11:22 so if i use it for walking like i do i can't orient myself on any landmarks (also there are nearly no POIs in .at) Jun 12 13:11:24 so it's better Jun 12 13:11:31 yes exactly. "this is the best maps app we've ever made" Jun 12 13:11:39 (paraphrasing from their mac intro) Jun 12 13:14:31 for me this picture was best in new ios+maps: http://i.imgur.com/zQqzj.jpg Jun 12 13:14:51 turn left on overpass! Jun 12 13:15:01 ixc: ahahah didn't notice that Jun 12 13:15:05 haha Jun 12 13:15:52 I feel sorry for the people living right next to that thing.. :P Jun 12 13:15:59 I have a data object which has an instance value "Double value" it can have a double value or it can be null. I need to pass that data object to another Activity so I've implemented the Parcelable interface. When I say writeDouble it will crash when I pass the "null". What can I do about this? Jun 12 13:16:35 btw u can turn left, just looks funny without checks :) Jun 12 13:16:59 I'm considering using enums in place of int constants for Bundle/Intent extras as enum implements Serializable. Anyone have any good reasons for me NOT to do this? Jun 12 13:17:16 lots of objects Jun 12 13:17:26 ...in cases where the actual value of the integer is irrelevant. Jun 12 13:17:31 09:14:51] turn left on overpass! Jun 12 13:17:32 lol Jun 12 13:18:03 the dev docs used to say not to use enums Jun 12 13:18:07 but they took that out Jun 12 13:18:20 "Avoid Enums Where You Only Need Ints" was what it used to say Jun 12 13:18:23 yea Jun 12 13:18:27 that was the worst mistake ever Jun 12 13:18:30 enums >> ints Jun 12 13:18:36 (in cases where that makes sense) Jun 12 13:19:45 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { Jun 12 13:19:45 asyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params); Jun 12 13:19:48 lint is giving me a hard time about that Jun 12 13:19:50 like for serious? Jun 12 13:19:58 I DO THE CHECK THE _LINE_ BEFORE Jun 12 13:20:45 hey guys does anyone know why the submit button of my site in a webview brings up the keyboard instead of submitting Jun 12 13:21:28 becuase webviews suck :( Jun 12 13:21:39 yeh they do Jun 12 13:21:45 i was in love with them for a month or so Jun 12 13:21:55 gaz`: is the submit button validating anything, finding an issue and putting the cursor in a form field? Jun 12 13:23:26 its just a form with POST and 3 textfields and a submit button Jun 12 13:23:45 doesnt appear to do anything more Jun 12 13:49:32 any other ideas jere Jun 12 13:49:44 oh hes gone Jun 12 13:59:12 anyone else got any ideas? Jun 12 13:59:21 why the submit button of my site in a webview brings up the keyboard instead of submitting Jun 12 14:01:24 gaz`: sorry this channel is for idling only ;) Jun 12 14:01:34 hehe Jun 12 14:02:22 Hello, searching a good example for making a list view searchable,like in Contacts Jun 12 14:03:12 gaz`: I can speculate... Jun 12 14:03:58 maybe a setting does not allow empty submit Jun 12 14:04:34 sukramTM: uhm, how about using Contacts as your example? Jun 12 14:05:50 toradam thats it, i entered data and it worked, weird! Jun 12 14:07:52 I've been tracing the android docs for a while now but I'm having trouble finding where the skia interfacing occurs for rendering Jun 12 14:08:02 specifically for widget backgrounds, i.e. setBackgroundDrawable Jun 12 14:08:12 I realize this is a noob question but I"m hoping someone can save me some hassle Jun 12 14:08:16 hmm now it wont Jun 12 14:08:18 what a paiN!! Jun 12 14:09:42 W00t, where is my sqlite3 gone? Got a new Samsung Galaxy S3. Did adb shell and then sqlite3 --version. Yields error: /system/bin/sh: sqlite3: not found Jun 12 14:10:01 mabbe it's called sqlite now? Jun 12 14:11:29 nope, i's not something starting with an s: http://pastie.org/4073741 Jun 12 14:12:14 sebastiandeutsch: I don't think you are supposed to use sqlite on device Jun 12 14:12:46 sebastiandeutsch: pull the db from the device and run sqlite3 on your computer Jun 12 14:13:04 dada: Probably, but it works on an emulator (2.3.3). Yeah I'll do that or test on sim again. thx. Jun 12 14:21:18 Hi there Jun 12 14:21:43 I will paste same question I did in #android (they sent me here) :) Jun 12 14:21:46 I want to ask some questions, but I think they're very embarassing . I'm very new to android development. I've been reading a bit here and there, but I have one big question unanswered: What version of Android SDK should I install? I've been reading the more extended android version nowadays is 2.3, but don't know if I should use that SDK version for the base or use a higher version and check for incompatibilities on the future. Jun 12 14:22:27 just install all of them Jun 12 14:22:31 anyone could guide me in that please? Jun 12 14:22:35 all? Jun 12 14:22:38 yes Jun 12 14:23:03 then I develop for the latest and do checking for incompatibility on older devices? Jun 12 14:23:17 that's the idea Jun 12 14:23:18 hi Jun 12 14:23:24 ok Jun 12 14:23:48 I thought to do that, but thought it was some rough too :P Jun 12 14:23:53 sometimes it won't be practical to use newer APIs Jun 12 14:24:09 install them all Jun 12 14:24:13 I'm adding libraries to my project but when I clean it, they are not generated (I can's see them in the gen folder), did I forget something ? Jun 12 14:24:30 clean doesn't generate Jun 12 14:24:34 clean removes files Jun 12 14:24:45 +1 Jun 12 14:24:51 +3 Jun 12 14:24:54 and libraries are already there Jun 12 14:25:00 they are not regenerated Jun 12 14:25:01 libraries aren't generated anyway Jun 12 14:25:02 maybe copied Jun 12 14:25:13 they're in the source tree or they're not Jun 12 14:25:13 and gen folder shouldn't have libraries in it Jun 12 14:25:25 ok. From any specific version like 1.5 or should start by the first one (that for there are not devices nowadays? Jun 12 14:25:34 oops Jun 12 14:25:40 wanted to say 2.3 Jun 12 14:25:50 1.5 is the first one of the sdk Jun 12 14:26:04 2.2 is a good minimum these days Jun 12 14:27:14 oki. and last question: should I have to install sources for SDKs or is better to read the docs and not directly on the code? Jun 12 14:27:59 you shouldn't have to, but it doesn't hurt Jun 12 14:28:08 i'd cross that bridge when you get there Jun 12 14:29:38 how do you cross a bridge before you get there Jun 12 14:29:40 i've never understood that one Jun 12 14:29:42 thanks wong Jun 12 14:30:00 but yea.... minSdkVersion="8" targetSdkVersin="15" :) Jun 12 14:30:35 oki canadian. Just installing now Jun 12 14:38:45 hello Jun 12 14:39:38 hey all I am looking to do pagination on a number of static html pages using buttons and a footer bar, and on the last one launch an activity. I was using the ViewPager class before, but I realized that since the last page is goingg to launch the new activity on swipe, the user might have wanted to go back and check out the last couple pages... Anyway, anybody have a good way of going about this? I am currently trying to use a relativ Jun 12 14:39:38 layout + linear layout footer filled with pagination button (prev, next, continue on last page) and a webview that is 'layout_above' the footer, but I am running into problems with inflating the view, and am not sure what is going on there. Jun 12 14:39:47 Wow that wasa mouthful. Jun 12 14:39:58 I am having problems with my application, sending strings from 1 activity to another. Can anyone check my code? (will pastebin it) Jun 12 14:40:13 YBinnenweg post it Jun 12 14:40:16 ok Jun 12 14:42:02 Main.java: http://pastebin.com/x2SavJ8M ; GetData.java: http://pastebin.com/Mq3Qtk2W Jun 12 14:42:17 [10:39:47] Wow that wasa mouthful. Jun 12 14:42:18 twss Jun 12 14:42:40 canadiancow, lol Jun 12 14:43:12 twss? Jun 12 14:43:18 thats what she said Jun 12 14:43:36 gowie, app compiles and runs fine, it only doesn´t get the data Jun 12 14:44:23 As far as I can telll you're not passing any data in the intent. Jun 12 14:44:34 * YBinnenweg facepalms Jun 12 14:44:35 lol Jun 12 14:44:42 I solved the problem with my libraries (after: android update project -p ./ -t 8), but I still have this error: R cannot be resolved to a variable. And google didn't help. Jun 12 14:45:13 gowie, how would I put data in it? Jun 12 14:45:46 basically, it's on a project created by copy-pasting another one and refactoring what needed to be refactored Jun 12 14:45:58 YBinnenweg intent.put(String key, OBject o) Jun 12 14:46:23 so just get rid of the bundle? Jun 12 14:46:45 ybinnenweg You can use the bunlde, it doesn't much matter. works out the same way. Jun 12 14:47:08 if you could please tell me what to do, I´d rather use your method Jun 12 14:47:13 ybinnenweg It doesn't look like you're calling that function either. The one that creates the bundle and adds data Jun 12 14:47:24 method* Jun 12 14:47:27 * YBinnenweg is a noob Jun 12 14:48:45 ybinnenweg Just start reading more man. This isn't much a complicated question if you had read more about this then it never woulda been a problem. Jun 12 14:49:30 Okay Jun 12 14:52:27 ybinnenweg: https://gist.github.com/2917996 Jun 12 14:52:47 Is it possible to activate android.deviceadmin.cts.* rights required for CTS/CtsDeviceAdmin.apk with some adb/shell magic (read, without having to touch manually within the settings dialog :-)? Jun 12 14:52:52 That should be able to get you started, but make sure to go read the android documentation. You'll be good. Jun 12 14:53:08 gowie, tyvm! Have a nice day! Jun 12 15:21:28 I have two projects, one is the copy of the other done in eclipse with changed names, the second has errors than I can't solve, why ? Jun 12 15:22:12 I mean, do I need to do something special after copy-pasting a project in eclipse ? Jun 12 15:22:28 (except from refactoring some name) Jun 12 15:23:05 check the imports Jun 12 15:23:12 it prob moved over from old project Jun 12 15:24:20 gaz`: which imports ? Jun 12 15:24:54 in the file u pasted in Jun 12 15:24:57 yes sorry, the imports are all okay, I checked it Jun 12 15:24:57 just a guiess Jun 12 15:25:00 ah Jun 12 15:25:01 :) Jun 12 15:27:34 hi, any solution for this error?? http://pastie.org/4072804 Jun 12 15:29:11 himansudas: this looks related http://code.google.com/p/android/issues/detail?id=26566 Jun 12 15:33:55 appel1, i m running only one instance of eclipse Jun 12 15:34:28 himansudas: then I have no idea Jun 12 15:37:19 appel1, any idea if what is that error triggered due to, is it the problem in the coding or some software related issue?? Jun 12 15:38:14 never experienced it myself so I don't know Jun 12 15:40:15 appel1, any idea creating a new AVD does help, is it an issue with AVD? Jun 12 15:40:41 himansudas: why not try? it's not like it takes much time to create a new avd. Jun 12 15:41:09 yup checking, i m really frustrated with the issue, did reinstalled eclipse twice, and no help yet Jun 12 15:41:40 hi Jun 12 15:42:18 does anyone know how i can use the indeterminate progress spinner as the source image for an imageview? Jun 12 15:42:34 How do I make the layout start below the actionbar instead of at the very top of the screen? I forgot.. :s Jun 12 15:42:47 I know I changed it once, but can't remember how Jun 12 15:42:55 i need the drawable to animate, not the entire imageview Jun 12 15:43:42 @Xerux: iirc there's a property that lets you define whether the actionbar overlays the content area of the window Jun 12 15:44:29 gowie, doesn´t seem to work :S Jun 12 15:44:38 karakuri: how do you do it programmatically? Jun 12 15:44:55 not sure how to do it programmatically Jun 12 15:45:03 i think the style attr is actionBarOverlay Jun 12 15:45:16 so check if there's a method with a similar name Jun 12 15:45:47 Main.java: http://pastebin.com/QKdfNWin ; GetData.java: http://pastebin.com/VEQgmmEP Jun 12 15:46:37 is there a reason you need to do it programmatically and not define it in your app theme / style? Jun 12 15:47:24 http://www.zdnet.com/blog/cell-phones/android-ics-already-offers-more-than-what-is-coming-in-ios-6/7769?tag=nl.e539 Jun 12 15:47:37 : Jun 12 15:47:48 :) this whole article put a massive smile on my face :D Jun 12 15:48:14 lol Napalm Jun 12 15:48:18 ios6 is a couple app updates Jun 12 15:48:19 nothing more Jun 12 15:48:55 +1 ^ Jun 12 15:48:57 don't forget making their maps worse but prettier Jun 12 15:49:08 that's an "app update" :P Jun 12 15:49:17 karakuri, XeruX: requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY); Jun 12 15:49:21 a downgrade :) Jun 12 15:49:41 Service sharing / Facebook and Twitter / Virtually all cloud and social services Jun 12 15:49:42 lol Jun 12 15:49:46 oh apple... Jun 12 15:50:21 There doesn’t appear to be any offline navigation support, which is something that Google just recently announced for Android devices. Jun 12 15:50:35 google has had "offline navigation" to varying degrees since fall 2009 Jun 12 15:50:43 and no street view, since nobody else has been mad enough to send camera cars worldwide Jun 12 15:50:47 lol Jun 12 15:50:58 It also appears iOS owners will lose bicycle, pedestrian, and transit functions seen in Google Maps on iOS 5. Jun 12 15:51:03 that's a big one Jun 12 15:51:06 they've actually removed features Jun 12 15:51:25 yup Jun 12 15:51:41 what if bicycle directions was an "essential feature" of your phone? Jun 12 15:51:51 I've used the transit and offline stuff in various places around the world Jun 12 15:51:55 canadiancow|work: time for class action Jun 12 15:52:06 heh Jun 12 15:52:10 ¨I almost fell on the floor laughing when I saw how excited people were about multiple email signatures coming to iOS.¨ XD Jun 12 15:52:12 so passbook...i cant even get it to work Jun 12 15:52:14 it OPENS Jun 12 15:52:31 so can anyone help me with getting a progress drawable into an imageview? Jun 12 15:52:37 You can also now finally add attachments from within the email client rather than having to go to the Photos app and then create an email. Jun 12 15:52:38 HOLY BALLS Jun 12 15:52:44 ive been bitching aobut that since forever Jun 12 15:52:49 it was the most unintuitive interface Jun 12 15:53:03 genuinely, and not in a fanboyish way, Android's sharing stuff is just... obviously better Jun 12 15:53:04 canadiancow, you use android.. right? Jun 12 15:53:14 then why bitch :P Jun 12 15:53:19 just laugh at them Jun 12 15:53:47 well my work phone is an iphone Jun 12 15:53:52 i use it for the RSA token app Jun 12 15:53:53 karakuri: can you layer it? Jun 12 15:53:55 and email Jun 12 15:54:02 O.O Jun 12 15:54:14 your life sucks. Jun 12 15:54:14 wasted 2 hrs trying to work somethign ridiculous out, for some reason my listview has just GONE and i cant see it no matter what i do Jun 12 15:54:18 visibility is visible Jun 12 15:54:34 Leeds: layer it? Jun 12 15:54:39 i'm not sure how that woul dhelp Jun 12 15:54:45 karakuri: draw the progress spinner on top of your image Jun 12 15:55:12 so use a framelayout with two chilren Jun 12 15:55:16 why do these inexplanable thing shappen just at deadline time Jun 12 15:55:28 that could work actually Jun 12 15:55:36 karakuri: yeah, that's what I meant :) Jun 12 15:55:53 thats actually probably simpler Jun 12 15:56:21 i was hoping i could actuall have the spinner in the imageview and switch it out when the image loads Jun 12 15:56:45 but life's all about compromises ;p Jun 12 15:57:06 simple is good Jun 12 15:57:38 Are there any more good Android dev channels? Jun 12 15:57:59 I'm actually shopping for a toolchain, so if there are any tool-specific ones I should probably lurk on those, too. Jun 12 15:58:13 this is *the* android dev channel, AFAIK Jun 12 15:59:34 damn this shit Jun 12 15:59:40 why has my listview vanished Jun 12 15:59:49 in the eclipse gui editor it doesnt even show the rows as it does with my other ones Jun 12 16:01:25 gaz`: what's it's layout_height? Jun 12 16:02:06 i often do layout_height=0dp when using layout_weights, then i move them out of linearlayout and they disappear Jun 12 16:02:31 hmm Jun 12 16:02:35 no its fillparent Jun 12 16:02:37 im going mad here Jun 12 16:03:16 Leeds: Cool. Thanks Jun 12 16:03:21 is it or any of it's parent invisibile or gone? Jun 12 16:03:35 oh Jun 12 16:03:37 got it! Jun 12 16:05:34 ah i had a layout below thing set Jun 12 16:05:36 jesus Jun 12 16:06:21 another question.. TableLayout, how do I make the edit-texts which I've got in column nr2 to stretch all the way (in width)? Jun 12 16:06:49 don't put them in a tablerow Jun 12 16:07:14 any direct child of tablelayout that isnt a tablerow will automatically ake the whole width Jun 12 16:07:37 I only have tablerows in the tablelayout Jun 12 16:07:58 yes, but you can put an edit text in between two tablerows Jun 12 16:08:00 try it Jun 12 16:08:38 what I want is to have textviews on left side, and edittexts on right side of the textviews Jun 12 16:08:52 oh Jun 12 16:09:10 if it absolutely has to be in a tablerow, try layout_span Jun 12 16:09:30 its a layout param provided by tablerow Jun 12 16:10:45 damn eclipse can get real slow Jun 12 16:11:58 bah, but that won't do me any good Jun 12 16:13:34 gaz`, can get? I thought that was the default :P Jun 12 16:15:01 how can i find functions that need particular permission? Jun 12 16:15:23 why are google recruiters emailing me about wwdc Jun 12 16:15:49 Xerux: what are you trying to do exactly? Jun 12 16:16:32 karakuri: I'm trying to create some sort of a form with text + text-fields, where the text-fields need to be lined up Jun 12 16:16:38 and each row has a textview + edittext Jun 12 16:17:05 i see Jun 12 16:18:12 can you use GridLayout? Jun 12 16:18:18 http://android-developers.blogspot.com/2011/11/new-layout-widgets-space-and-gridlayout.html Jun 12 16:19:40 yup, I guess =) Jun 12 16:23:14 is there any way to have an app which uses gpu rendering on >3 devices but will still work on ~2 devices with cpu rendering? Jun 12 16:24:19 ... yes? Jun 12 16:24:22 like...every app ever? Jun 12 16:26:00 russfrank: in manifest, use "hardwareAccelerated=true" Jun 12 16:26:17 it will only apply it to 3.0 and later Jun 12 16:26:21 canadiancow: you fail at snark Jun 12 16:26:52 or just dont include it and it applies to 4.0 and later anyway Jun 12 16:28:50 you need an API key for hardware acceleration Jun 12 16:29:02 so they know the appropriate hardware encoding licenses were paid Jun 12 16:29:19 paypal $55 to encoderapikeys@mikedg.com Jun 12 16:30:19 apikeys.google.com@canadiancow.com, you mean Jun 12 16:33:40 fuck samsung Jun 12 16:35:18 mhmm... having sex with 350000 koreans is... challenging.. Jun 12 16:35:27 the internet tells me it isn't possible and i have to specify minsdkversion 11 Jun 12 16:35:36 anyone got a root Sprint S2 with touchwiz still and can pull off the camera APK for me? Jun 12 16:35:59 oh hmmmaybe i dont need root Jun 12 16:37:13 mikedg: you don't need root to pull apks, haha Jun 12 16:42:18 * Ge0rG wonders if it is possible to reliably detect root on a device from in-app Jun 12 16:43:43 Ge0rG: hahah Jun 12 16:43:47 depends on what kind of device you've got Jun 12 16:43:48 Ge0rG: right now? yes. Jun 12 16:43:55 my droid3 was rootable with simple shell commands Jun 12 16:43:55 Ge0rG: good luck with that :) Jun 12 16:44:06 for non-creative rooting Jun 12 16:44:17 there's no reason why an app couldn't have done the root procedure on my droid3 Jun 12 16:44:32 but it's an arms race; as soon as it becomes inconvenient for people with rooted phones because of detection, detection will stop working Jun 12 16:44:58 * Ge0rG was surprised when google wallet asked for permissions to obtain root :> Jun 12 16:45:24 OEM should pull their heads out of their asses and ship devices with a root password in the manual Jun 12 16:45:44 there's not a single carrier that would allow that Jun 12 16:45:48 you can search the filesystem for suid-root binaries. You can search the filesystem for known apk names. You can search the list of installed apps for know APK names. You can search for apps which handle the su intent Jun 12 16:45:57 carrier should pull their head out of their arses too Jun 12 16:46:04 and none of that will work as soon as a proper rootkit cloaks them :P Jun 12 16:46:12 why is everyone so stupid :( world of morons./ Jun 12 16:46:29 dragorn: wait, what? there is a su intent? Jun 12 16:46:42 Ge0rG: well, there's an intent that the 'su' binary generates to present the GUI to allow it Jun 12 16:46:49 dragorn: aaah! Jun 12 16:47:05 Ge0rG: so if a su handler presents that as something it handles, you can look for it Jun 12 16:48:28 * Ge0rG really wonders why carriers do not pull a stunt with mobile payment. they have all the tools needed to do so without credit card companies, but they are waiting. too greedy? Jun 12 16:49:34 there are a lot of risks and concernd associated with payment Jun 12 16:49:39 concerns Jun 12 16:50:59 wongk: carriers get paid all the time, they have a full financial infrastructure and even support payment for premium services... Jun 12 16:51:37 they get paid for their services, they don't oay 3rd parties on behalf of others Jun 12 16:51:38 but instead of binding the mobile wallet to your contract, they are letting in the CC companies Jun 12 16:51:43 it's a whole new ball game Jun 12 16:51:50 wongk: its not. look at premium sms Jun 12 16:52:03 or ringtones, or j2me apps Jun 12 16:52:16 what is premium sms Jun 12 16:52:40 I'm trying to use httpclient and stuff to insert things into my mySQL database. So far, no problems: I can put things in fine. How would I go about returning the ID (primary key) of the newly inserted row? Jun 12 16:53:13 wongk: you send an overpaid sms to some third party to use their service, and the carrier gives a certain part of the sms price to that party Jun 12 16:54:09 yeah, that's a step in that direction Jun 12 16:54:22 jpstevans: return the ID on the response? Jun 12 16:55:28 wongk: how? Jun 12 16:55:34 I'm kind of new to the whole android dev thing Jun 12 16:55:55 jpstevans: i assume you're using some kind of web service? Jun 12 16:56:28 I'm running a WAMP server off my computer right now with a PHP file and using posts in my android activity to write to my MySQL database Jun 12 16:56:57 so write the PHP to return the ID Jun 12 17:03:06 wongk: that would just be print(json_encode($query)), right? and then in my activity, use an inputstream? Jun 12 17:03:31 I'm really not sure that I'm getting what I'm reading... Jun 12 17:03:33 i don't PHP, but the answer to your second question is ys Jun 12 17:03:41 Alright, thanks :) Jun 12 17:04:00 but i hope you're not doing that on the main thread Jun 12 17:04:12 and it would be a great thing to encapsulate Jun 12 17:04:43 i infer this by you stating "in my activity" Jun 12 17:06:04 JSONObject also sounds relevant, though it doesn't support streams Jun 12 17:06:27 which you will need if you plan to select through this web service Jun 12 17:07:27 Does anyone know what to toggle in DDMS to make the emulator run ONLY with 3g? Jun 12 17:09:16 wongk: I'm doing it in a submit button; this is just a test project for me :) Jun 12 17:09:44 I'm inserting a username, password, and email address into a database directly, and I want to be able to output the user's ID as a Toast Jun 12 17:10:22 if you're just playing around that's fine... but that wouldn't even run on ICS Jun 12 17:11:21 Why not? Jun 12 17:11:41 it would throw a NetworkOnMainTheadException Jun 12 17:11:54 ? Jun 12 17:15:43 jpstevans: it's bad practice to run non-UI code on UI thread Jun 12 17:16:51 Ah Jun 12 17:27:23 http://a45.se/andreas/mall.html - How do I center the white div in this page? It should be vertical centered to the grey div. Jun 12 17:28:12 granden: you seem to be lost. Try #html or #css Jun 12 17:28:26 do we look like HTML Jun 12 17:28:30 buddahs Jun 12 17:28:36 i am no html buddah Jun 12 17:28:59 did you try
white div
Jun 12 17:29:26 hi Jun 12 17:30:09 mikedg: I'm no html buddah, I'm an html magi Jun 12 17:30:35 evancharlton: Sorry! Jun 12 17:30:56 mikedg: Sorry ! Jun 12 17:31:02 Thought I was in the #css channel :) Jun 12 17:31:05 granden: Try left: 50%; margin-left: (half-width-of-div)px; :P Jun 12 17:31:17 lol mikedg Jun 12 17:31:34 granden: margin: 0 auto; Jun 12 17:31:52 Ah, vertically Jun 12 17:32:25 thanks for all the tips, think I have accomplish what I wanted. Thanks everyone. Jun 12 17:35:41 AlertDialog.Builder - setMultiChoiceItems with a cursor shows the items in a list but the when you select an item, it is not checked? :( Jun 12 17:36:35 so I put this on the onclick listener for the mulichoice items: ((AlertDialog) dialog).getListView().setItemChecked(position, isChecked); Jun 12 17:36:51 and it still will not check an item when its selected Jun 12 17:36:56 please help :( Jun 12 17:37:06 does anyone know if you can do custom paging animations with FragmentViewPager? Jun 12 17:37:37 test shows onClick is called for me (I put a LOG there) Jun 12 17:40:42 ... *tumbleweed* Jun 12 17:41:04 ouch! Tunbleweed Jun 12 17:41:08 chamomile: is 'isChecked' the correct final argument there? Should that be !isChecked [toggle] or just true ? Jun 12 17:41:39 hello karakuri Jun 12 17:41:55 hi Jun 12 17:42:10 i thought the cleaning service took care of those Jun 12 17:42:15 haha Jun 12 17:42:29 so yeah, does FragmentViewPager support custom animations? Jun 12 17:42:58 or am i stuck with just the slide in/out? Jun 12 17:43:50 if it makes you feel better i can give you an answer: no clue Jun 12 17:44:19 nt4cats, thank you, the onclick() function passes the variable "isChecked" - java doc says: isChecked - True if the click checked the item, else false. Jun 12 17:44:50 shoot. where's a romain guy when you need one? Jun 12 17:45:15 google should totally make romain guy merchandise Jun 12 17:45:18 all the devs would buy Jun 12 17:47:28 I am looking for recommendations for a budget phone running with OpenGL ES 2.0 Jun 12 17:48:34 I assumed 2.3 would have it. But, on returning home, I discovered it only implemented OpenGL ES 1.1. Seriously my bad! Jun 12 17:49:04 (return home with a newly purchased Samsumg Galaxy Y) Jun 12 17:49:49 So - how to find a budget OpenGL ES 2.0 phone??? Jun 12 17:50:06 hi all Jun 12 17:50:08 whats up Jun 12 17:50:14 help Jun 12 17:50:18 drcode Jun 12 17:50:21 droidboi: #android Jun 12 17:50:29 this isn't #android-shopping Jun 12 17:50:35 I am trying to compile some project that is looking for libjpeg.h , any idea how I can add it? Jun 12 17:50:39 ndk-build Jun 12 17:51:27 evancharlton - not sure #android can help regrading versions of graphics libraries Jun 12 17:52:32 As a noob dev - I need advice - as I just made a huge mistake Jun 12 17:55:19 drcode: do you have libjpeg.h? Jun 12 17:56:42 I have it in linux /usr/lib/libjpeg.h Jun 12 17:57:03 whoa ios added permissions Jun 12 17:57:03 but it can't find it when I use android build Jun 12 17:57:12 droidboi: Define 'budget'. Jun 12 17:57:13 access contacts, access photos, etc Jun 12 17:57:22 £100 Jun 12 17:57:25 And I only know like 2 devices which don't have 2.0 Jun 12 17:57:42 Wildfire and G1 iirc. But then again, I don't concern myself with anything in that range :x Jun 12 17:58:04 but you like to mention it though eh ;o) Jun 12 17:58:23 If you're lucky, you can try the 4.x Emulator with Open GL ES 2.0 support. Works on some graphics cards. Not mine, though. Jun 12 17:59:02 Otherwise, try to get a used HTC Desire. Jun 12 17:59:26 kakazza: Thanks Jun 12 17:59:27 Those can be one-click rooted quite easily and are really fast with a custom ROM. (Cyanogen or AOSP). Jun 12 18:00:27 Also the HTC Desire has a resoltion of 800x480 and 1GHz. So it's a good phone to test on imo. It's a very popular resoltion and it's really smooth with a custom ROM. Jun 12 18:00:39 kakazza: BTW: I wouldn't concern myself with anything in this range - but times are hard Jun 12 18:01:07 They are, but before I'd use something like an HTC Wildfire, I'd stick with my old phone :) Jun 12 18:02:18 Bottom line - I can't properly run my OpenGL ES 2.0 code Jun 12 18:02:31 It's a game I guess/ Jun 12 18:02:33 ?* Jun 12 18:02:42 Yes Jun 12 18:03:16 Does anyone more reliable than appbrain have android version share numbers? Jun 12 18:03:29 Hmm, well, as I mentioned, 4.x Emulator. Though you might not get the same performance as on an actual device. Jun 12 18:03:31 appbrain only has numbers for devices that have their app installed Jun 12 18:04:21 droidboi: http://android-developers.blogspot.co.at/2012/04/faster-emulator-with-better-hardware.html Jun 12 18:04:43 rabid, have you seen googles figures? Jun 12 18:04:48 iirc, GPU acceleration is not enabled by default when you create a new AVD. Jun 12 18:04:59 rabid, http://developer.android.com/resources/dashboard/platform-versions.html Jun 12 18:05:00 I have a 1Gig machine - that's about 1G too small for 4.0 isn't it??? Jun 12 18:05:12 aha, excellent Jun 12 18:05:21 thanks Jun 12 18:05:29 np Jun 12 18:05:30 This channel needs an infobot with !triggers Jun 12 18:05:44 If it doesn't already. Jun 12 18:06:06 TimRiker's infobot (which #gsoc uses too) can do that. Jun 12 18:06:14 kakazza: yes it does, let us know when you get that setup ;) Jun 12 18:06:17 Would be useful for these kind of questions that arise often. Jun 12 18:06:26 wongk: ;p Jun 12 18:06:30 i saw someone with a bot that jumped in a few days ago, trigged by "xy" to explain how people try and solve X using Y, and ask for support for Y which is strange and obscure, when they should really be asking for help doing X Jun 12 18:06:52 That's also useful. XY problems occur so often. Jun 12 18:07:08 droidboi: Define 1Gig machine. Jun 12 18:07:12 found it in the log Jun 12 18:07:18 IGig RAM Jun 12 18:07:22 1G Jun 12 18:07:30 Oh, you really are on a budget :x Jun 12 18:07:33 what is perhaps more annoying than the XY problem Jun 12 18:07:34 pragma- brought in a bot called candide, (10:45:10 PM) candide: The XY problem: You want to do X, but don't know how. You think you can solve it using Y, but don't know how to do that, either. You ask about Y, which is a strange thing to want to do. Just ask about X. Jun 12 18:07:41 is the arrogant prick problem Jun 12 18:07:55 I don't know used prices for Desires, but might be worht to check out. Jun 12 18:08:01 readme: Tell me about it! Jun 12 18:08:22 Ah, figures. pragma- is also in ##C. It's his bot afaik. It's used a lot there. Jun 12 18:08:24 you ask how to do X, and he doesn't know the answer so he insinuates that you have an XY problem and then acts like a dick. Jun 12 18:08:25 so far i dont see any way to override the transition animation fro viewpager Jun 12 18:08:37 can anyone weigh in on whether this is possible? Jun 12 18:08:47 lol @ that Jun 12 18:09:14 it's sadly common for people who just DON'T KNOW the answer to try and field a question Jun 12 18:09:50 it's not that bad here Jun 12 18:09:56 because most of the questions are very easy Jun 12 18:11:18 kakazza: thanks for that link Jun 12 18:11:26 is there a JakeWharton in the house Jun 12 18:11:39 * JakeWharton runs Jun 12 18:11:40 i got to the bottom of the ab.setBackgroundDrawable issue Jun 12 18:11:54 i'm calling the method from a Handler off of a Thread... Jun 12 18:12:09 i don't see a particular reason why this would be bad practice? Jun 12 18:12:16 Rockmaninoff: where did you create the ahndler Jun 12 18:12:21 in the Activity Jun 12 18:12:25 private var Jun 12 18:12:44 you instantiated it right there, too Jun 12 18:12:55 http://pastie.org/4075153 Jun 12 18:13:24 yes readme Jun 12 18:13:26 what happens when you try this Jun 12 18:13:39 Hello again, someone in here who wants to help me? Jun 12 18:13:56 "Ask your question, don't ask to ask." Jun 12 18:14:06 ah yeah Jun 12 18:14:45 The problem is, that my GetData.java is nulling somehow Jun 12 18:14:48 let me pastebin my code Jun 12 18:15:26 your source file is nulling? impressive Jun 12 18:15:29 readme: the end goal is to pass the Handler to an AsyncTask (is that bad practice too?) Jun 12 18:15:34 i don't even know what that means Jun 12 18:15:40 wongk, lol Jun 12 18:15:59 This is my Main.java: http://pastebin.com/yAD9h8xp ; And this is my GetData.java: http://pastebin.com/9ut5tBnJ Jun 12 18:16:20 post a log YBinnenweg Jun 12 18:16:35 Rockmaninoff, there are failsaves in there Jun 12 18:16:51 basically it doesn´t display anything if null Jun 12 18:16:58 Rockmaninoff: it wouldn't make sense to do that Jun 12 18:17:05 because the AsyncTask already does that for you Jun 12 18:17:13 just put the code in onPostExecute Jun 12 18:17:27 readme: i'm trying to do a bit of encapsulation...the AsyncTask is its own class... Jun 12 18:17:36 for reuse Jun 12 18:17:37 YBinnenweg: what ar we supposed to be looking for? Jun 12 18:17:48 YBinnenweg: maybe try optString() instead of getString() Jun 12 18:17:52 wongk, the data from my JSON doesn´t showup Jun 12 18:17:55 also optJsonArray() Jun 12 18:17:58 because it´s nulling somehow Jun 12 18:18:07 YBinnenweg: do you know how to use the debugger? Jun 12 18:18:10 what IDE? Jun 12 18:18:10 yes Jun 12 18:18:14 Eclipse Jun 12 18:18:15 Rockmaninoff: it only matters where you create the AsyncTask Jun 12 18:18:21 don't use an extra handler for no reason Jun 12 18:18:33 onPostExecute will run on the thread you created the AsyncTask on Jun 12 18:18:56 (it uses a handler) Jun 12 18:18:58 ah but readme what if i want to have different code run in onPostExecute() Jun 12 18:19:04 provide a callback? Jun 12 18:19:06 yeah Jun 12 18:19:08 i'll read up on that Jun 12 18:19:13 but that still doesn't explain the problem...? Jun 12 18:19:14 just define some interface Jun 12 18:19:24 I don't know the answer to your problem nor did I ever hear what it was Jun 12 18:19:27 oh Jun 12 18:19:29 sorry Jun 12 18:19:33 but thats my 2c on architecture Jun 12 18:19:38 in short, setActionBarBackground() is getting called and run Jun 12 18:19:44 but nothing is happening to the ActionBar background Jun 12 18:19:51 in fact, the default ActionBar background actually _disappears_ Jun 12 18:20:05 then when i focus again on the EditText, the correct and proper background does appear Jun 12 18:20:19 this only occurs on the Thread, if i were to just call mHandler.sendMessage() it would set the background just fine Jun 12 18:20:32 YBinnenweg: have you verified the JSON data coming from your web server is correct? Jun 12 18:20:39 wongk, yep Jun 12 18:20:49 it was working yesterday in minsdkversion 4 Jun 12 18:20:59 when I changed it to 14 it crashed Jun 12 18:21:13 so I came here, and they told me to move the networking stuff out of the mainactivity Jun 12 18:21:17 so I did that Jun 12 18:21:23 YBinnenweg: set break point at 27 in GetData, inspect the Extras Jun 12 18:21:49 also what is the JSONfunctions class Jun 12 18:22:21 http://pastebin.com/umQB5aCf Jun 12 18:22:58 so when you instantiate GetData, you're blocking the UI thread Jun 12 18:23:01 that's a problem in and of itself Jun 12 18:23:08 it crashed on 14 because you're doing network operations on the main thread Jun 12 18:23:16 wongk, yeah Jun 12 18:23:17 oh yeah derp Jun 12 18:23:18 it won't like that Jun 12 18:23:20 so Jun 12 18:23:21 so I moved it to another class Jun 12 18:23:21 refactor Jun 12 18:23:28 that's not fixing the problem though Jun 12 18:23:32 you need to run it on another thread Jun 12 18:23:36 YBinnenweg: what doies a class have to do with a thread> Jun 12 18:23:48 and now your just catching the exception Jun 12 18:23:58 so your JSON data is in fact empty Jun 12 18:23:59 AsyncTasks are your friend Jun 12 18:24:52 okay will try the AsyncTasks Jun 12 18:25:48 wow, new season of true blood, its incredibly how forgettable the last season was Jun 12 18:26:04 YBinnenweg: this would all be very clear if you ran this in the debugger Jun 12 18:27:26 wongk, sorry I am very new to this Jun 12 18:27:42 YBinnenweg: no reason to apologize, better to learn Jun 12 18:27:50 true that Jun 12 18:41:31 ha readme Interface no worky either Jun 12 18:41:38 this is seriously bizarre Jun 12 18:42:26 god do i really want to use a BroadcastReceiver/Intent combo? Jun 12 18:46:12 readme: just to be clear, i would pass TestActivity.this in as my Callback argument, correct? Jun 12 18:46:47 why do you want to pass the activity instance Jun 12 18:46:50 if that's what you want, then sure Jun 12 18:46:54 i'm not psychic :) Jun 12 18:47:15 Hey everybody. Is there a way to indicate the "current package" in this preferences intent xml instead of hard-coding com.blah.android.test? http://pastie.org/4075329 Jun 12 18:59:52 Anybody? Jun 12 18:59:55 Chronax: pretty sure you cannot indicate that, but you could define the package as a string resource and reference it that way: android:targetPackage="@string/package" /> Jun 12 19:00:12 Thing is, my test and prod package names are different. Jun 12 19:00:23 And I don't want to have to manually change them when cutting a production build. Jun 12 19:01:33 you could use a java properties file in your assets directory with the name of the class Jun 12 19:01:44 use your build tool to replace the properties file Jun 12 19:01:57 Have you thought of customizing your build scripts? What I sometimes to is have a resource file for config stuff (e.g. qa.xml, test.xml, prod.xml) and...just like birbeck said. Jun 12 19:05:10 Yeah, I've got an Ant script that does exactly this. Jun 12 19:05:32 Just didn't really want to add any more complexity to that process. Thought maybe there was a way to indicate "the current package" in XML. Jun 12 19:06:16 if you already have the build set up to do that, how is it added complexity? its adding another key Jun 12 19:07:07 oh, you need to access it from the xml :/ Jun 12 19:12:01 Chronax: are your build scripts modifying java properties or Android XML resources? Jun 12 19:15:13 Properties. Jun 12 19:18:07 One thing the resource files give you vs. properties is what birbeck referred to: the ability to reference the variable from the XML. So you could leave the intent definition the same and only have to worry about the resource it refers to copied at build time (e.g. prod.xml -> res/values/config.xml). Jun 12 19:31:10 nice, got a kotlin hello world going. Jun 12 19:36:33 hi, i ve got a problem with the countdown timer... Jun 12 19:37:40 i am handling a list of countdowntimers but "ontick" the special textview dont refresh... Jun 12 19:38:38 Hi guys I have a question about my apps googplay's webpages [g+] button Jun 12 19:38:48 is it possible for me to find out who has g+'d my app? Jun 12 19:42:09 anyone know? Jun 12 19:43:38 that would be a privacy issue Jun 12 19:44:17 okay, thats what i figured Jun 12 19:44:30 part of me thought it might have been public Jun 12 19:44:54 http://productforums.google.com/forum/#!topic/google-plus-discuss/_NSX1dYn3nQ Jun 12 19:45:48 thank you readme Jun 12 19:53:56 its been so quiet in here the past few days, wtf Jun 12 20:11:04 is there any easy way to verify you've stored all your fields in a parcel, short of some complicated reflection? Jun 12 20:11:09 is anyone here a boss at opengl es 2.0? Jun 12 20:11:19 like a baws Jun 12 20:11:23 Bakis what's your question? Jun 12 20:12:08 haha i'm 1) trying to implement pinch to zoom, and 2) trying to translate my camera along the xy plane but my object/camera keeps recentering after moving a bit. Jun 12 20:13:46 Does anyone know if its supported to limit network speed in android? Jun 12 20:13:56 Like programatically Jun 12 20:13:58 Not from ddms Jun 12 20:14:36 canadiancow|work: unparcel them :P Jun 12 20:14:39 Bakis: are you using any kind of engine? Jun 12 20:14:43 wongk how does that tell me? Jun 12 20:14:49 :P Jun 12 20:15:01 whether or not they have the original values Jun 12 20:15:08 canadiancow|work: not sure what you're after here. if you write things to a parcel, they're there. Jun 12 20:15:16 yea i mean though Jun 12 20:15:19 why would you suspect a problem there? Jun 12 20:15:24 if someone else ocmes along and adds a field to my class Jun 12 20:15:28 but doesnt updating the parceling operation Jun 12 20:15:28 how do you mean? just using java/eclipse with android 4.0.3 Jun 12 20:15:33 uhhh Jun 12 20:15:46 please say you are not trying to persist parcels Jun 12 20:15:51 no Jun 12 20:15:53 well Jun 12 20:15:54 because that will end in tears Jun 12 20:16:00 Fragment#setArguments Jun 12 20:16:06 im "persisting" it in there Jun 12 20:16:15 Parcel is *not* guaranteed to retain its internal format or marshalled representation across reboots. Jun 12 20:16:21 correct Jun 12 20:16:23 that's fine Jun 12 20:16:23 i wrote a system that generates my resource files as an ant task Jun 12 20:16:36 you're worried about across app updates? Jun 12 20:16:42 managing drawables and styles for different ?dpi was dragging me down Jun 12 20:16:51 canadiancow|work: are you writing unit tests or something? Jun 12 20:16:56 no Jun 12 20:17:08 * ctate | if someone else ocmes along and adds a field to my class Jun 12 20:17:17 im worried that i have but if i have class X { int a, b; } where a and b get parcelled, but then joe goes and updates class X to also have a String c;, but doesnt update the parcelling operations Jun 12 20:17:21 who is "someone" here? a human at your company? another app on the same device? Jun 12 20:17:26 human Jun 12 20:17:53 there's no in-Parcel support for detecting this kind of bug, no. Jun 12 20:18:02 so it would just require some fancy reflection Jun 12 20:18:09 canadiancow|work: so do you have any ideas? has anyone here made a pinch to zoom function with es 2.0? Jun 12 20:18:11 for each field, ensure it exists in the parcel Jun 12 20:18:21 Bakis, i use AndEngine, which has suppor for a lot of gestures Jun 12 20:18:28 reflection won't help; Parcels are basically a thin wrapper around a C++ implementation Jun 12 20:18:36 AndEngine? Jun 12 20:18:49 where all the actual data storage & marshalling is done Jun 12 20:19:07 ok well then :P Jun 12 20:19:28 thats whats always scared me away from parcelable Jun 12 20:19:51 some random person adding a field that they expect to get parcelled, but they dont update the parcelable methods Jun 12 20:20:14 For what it's worth, I serialize and deserialize a lot with Jackson, seems to result in much nicer patterns and maintainability than parcelable. Jun 12 20:20:37 and that just serializes it into a string? Jun 12 20:20:41 Yes Jun 12 20:20:50 interesting Jun 12 20:20:57 but im also worried about adding complexity Jun 12 20:20:57 :P Jun 12 20:21:00 Can easily be stored in preferences, passed around in intents. Jun 12 20:21:10 yea i dont need persistent storage Jun 12 20:21:16 this is literally just for fragment arguments Jun 12 20:21:36 for if the fragment (and activity) are destroyed (for memory reasons) and then recreated Jun 12 20:21:49 It's not very complex, basically mapper.readValue(Object o) and mapper.writeValueAsString(Object o).. some configuration for the mapper (which I inject / singleton) and a try / catch. Jun 12 20:22:49 i'll stick with parcelable :) Jun 12 20:23:38 Sure.. but you don't know what you're missing :P Jun 12 20:23:51 just teach your coworkers how to Parcelable and call it a day =] Jun 12 20:24:02 try/catch, injection, singletons, everything's an Object...i can deal with missing that Jun 12 20:24:02 :) Jun 12 20:25:15 canadiancow|work: eh the try catch is just for the serialization / deserialization, and it pretty much can't fail if you deserialize and serialize your own objects (it throws on bad json which it will never generate), you can unsingleton the mapper if you wish but that means you'll instantiate it a lot (boilerplate), and Object was just an example, it takes any type and is fully type-safe. Jun 12 20:25:24 Doesn't parcelable throw as well? Jun 12 20:25:56 well that also seems to require the same thing Jun 12 20:26:04 will that automatically serialize every field in my class? Jun 12 20:26:12 or do i have to do mapper.WriteValueAsString(field1); Jun 12 20:26:16 mapper.WVAS(f2); Jun 12 20:26:16 etc Jun 12 20:26:26 No, you serialize the entire object at once. Jun 12 20:26:43 so then why did you mention mapper.readValue(Object o) and mapper.writeValueAsString(Object o) Jun 12 20:26:47 And for most types it's pretty much configuration-free. Jun 12 20:27:09 canadiancow|work: I wanted to show it could take anything, I dunno, I guess it was ambiguous. Jun 12 20:27:17 how do I test to see if something was posted to my localhost server? Jun 12 20:27:24 i'm not sure how you can expect to get to automatically do something for every member w/o taking reflection ave :P Jun 12 20:27:27 does Jackson rely on Serializable or some such? Jun 12 20:27:36 wongk: Jackson uses reflection Jun 12 20:27:39 i mean, how does it handle complex non-Serializable types like Bundle / Intent? Jun 12 20:28:21 ctate: it has its magic, it's probably quite complex under the hood but it works very well :) Jun 12 20:28:35 It doesn't require Serializable. Jun 12 20:28:38 spiffy Jun 12 20:28:57 NB of course that Parcel is largely about speed Jun 12 20:29:14 and support for special types like file descriptors and binders Jun 12 20:29:21 you could easily add something on top of Parcelable that reflected as well Jun 12 20:29:30 What's an efficient way to print out an intent's extras? I just wanna see all the k/v pairs…intent.getExtras().toString() should gimme the map but doesnt seem to print what im looking for Jun 12 20:29:54 wongk: or you could easily drop the jar into it and let the Jackson guys do the heavy lifting :) they've dealt with the edge cases. Jun 12 20:30:19 ctate: true, but IMO it can be considered a premature optimization resulting in pretty fragile code. Jun 12 20:30:42 luxurymode: public static void dumpIntentExtras(Intent intent) { Bundle b = intent.getExtras(); if(b != null) { for(String key : b.keySet()) { log.info(String.format("%s: %s", key, b.get(key))); } } } Jun 12 20:30:43 options, options Jun 12 20:30:52 enh. there's a school of thought that says if you forget to update your parcelling code when you update the data structure, it's your own damn fault. Jun 12 20:31:14 bubbleguuum, hehe thanks Jun 12 20:31:19 got QA? ;) Jun 12 20:31:30 luxurymode: toString works, but you need to do something like size() on the object first Jun 12 20:31:35 There's another school of thought that says your coworkers WILL break stuff (if not you yourself) :) Jun 12 20:32:15 get new coworkers Jun 12 20:32:17 If I wanted non-typesafe badly refactorable code I wouldn't use java :) Jun 12 20:32:35 evancharlton: not that easy in this market (and not being as cool as Google) Jun 12 20:32:54 EuroTrash: get a decent code-review system then Jun 12 20:33:08 evancharlton: I did, it's called a compiler :) Jun 12 20:33:57 i had an orker once who occasionally wore a t-shirt that read, in big letters Jun 12 20:34:00 I said a decent one Jun 12 20:34:06 "of course i don't look busy. i did it right the first time." Jun 12 20:34:12 an orker? Jun 12 20:34:19 you should know this, canadiancow|work Jun 12 20:34:23 he was pretty much the *only* person i have ever worked with who could get away with that. Jun 12 20:35:43 canadiancow|work: since ctate isn't going to explain it, then I will: "cow-orker" Jun 12 20:35:55 ctate: would you like to do a code review on asynctask, dialogs and screen rotation? Jun 12 20:36:06 hehe Jun 12 20:36:13 its short, 168 lines, half is comments and white lines Jun 12 20:36:28 how many bugs can there be in 84 lines of code? Jun 12 20:36:36 it pays $2.79 Jun 12 20:36:45 well, there are lots of other classes involved Jun 12 20:36:59 defect density correlates to comment density, so if half it it is comments - its probably pretty buggy birbeck Jun 12 20:37:04 :) Jun 12 20:37:07 birbeck: not unless you're trying to contribute it to AOSP Jun 12 20:37:30 ctate: well not to aosp, but i was going to open source it and blog it Jun 12 20:37:40 no dice, then :) Jun 12 20:37:41 I say why not Jun 12 20:37:51 then you'll get lots of free code reviews :P Jun 12 20:37:56 well, or i could review it as a contribution to CM Jun 12 20:37:58 ctate: you seem to be the resident expert on the topic Jun 12 20:38:04 they're license compatible with us these days, yay Jun 12 20:38:04 cm? Jun 12 20:38:09 cyanogenmod Jun 12 20:38:25 its not framework code Jun 12 20:38:31 canadiancow: i think you will have to rely on unit test for your parceling test. its the same type of mistake as missing a member field for clone Jun 12 20:38:32 its an application fragment Jun 12 20:38:50 You could always try your luck on codereview.stackexchange.com Jun 12 20:38:58 yea exactly g00s Jun 12 20:39:15 but you think the person who fails to properly update the class is going to update the unit test? Jun 12 20:39:15 :) Jun 12 20:39:16 mgj: hmm, never heard of codereviews on stackexchange Jun 12 20:39:48 Ive never used it, and its apparently beta... but its better than nothing i guess Jun 12 20:40:07 canadiancow|work: :) Jun 12 20:41:43 canadiancow|work, Why is it such a big deal? If the person does not understand/know about parcelables, that extra field most likely does not need to be parcelled.... and if it does, that person will very quickly find out when he starts getting NPE Jun 12 20:42:28 Is there a way in preferences XML to insert the app's version number automatically? Jun 12 20:42:45 Without having to fetch it and update it in the Activity code? Jun 12 20:43:09 are you versioning your preferences? Jun 12 20:43:51 Naw, just have a preference for displaying the app version number and would like to not hard-code it or have to write Java to update it. ;) Jun 12 20:47:21 There must be a way to do it, right? Jun 12 20:47:37 would be nice Jun 12 20:51:18 how do you make it so that when you rotate an app it doesn't redraw everything? Jun 12 20:52:52 Bakis: your question doesn't make sense Jun 12 20:53:13 of course it has to redraw everything, otherwise you'd be looking at it all sideways. Jun 12 20:53:36 perhaps you mean to avoid tearing down the Activity instance and creating a new one; that's a rather different issue. Jun 12 20:55:38 i mean i rotating my screen and my screen is resest to the original setup Jun 12 21:03:32 te newest google maps is so laggy on my phone, its unusable. i think i should revert back to the factory/stock one Jun 12 21:03:42 really? Jun 12 21:03:43 what phone Jun 12 21:03:44 but my phone is old :) Jun 12 21:03:47 droid-1 XD Jun 12 21:03:54 wow Jun 12 21:04:01 know what else is laggy on that phone? Jun 12 21:04:03 everything Jun 12 21:04:11 when i press the icon in the upper left, for the menu, it takes like 2 seconds to show up Jun 12 21:04:17 that's pretty bad Jun 12 21:04:20 (the thing in the action bar) Jun 12 21:04:30 Inactionbar Jun 12 21:04:40 evancharlton: not really, my app works awesome on my phone. Jun 12 21:05:00 maybe the googlers should all be using droid-1 :D Jun 12 21:06:13 :) Jun 12 21:06:31 heh, I still use my old motorola milestone for testing Jun 12 21:06:43 i had to avoid a few things like ViewPager though; couldn't have adjacent cached fragments with loaders active w/o problems Jun 12 21:06:48 i occasionally test on my g1 Jun 12 21:07:04 I don't support lower than 2.2 though Jun 12 21:07:07 oh man, the Droid Jun 12 21:07:15 badly underpowered for the screen size Jun 12 21:07:17 i still support 1.6 on my released apps Jun 12 21:07:24 newer stuff is 2.1+ Jun 12 21:07:58 ctate: yeah, it was always kinda laggy. but i think writing my app on this phone made me consider a lot of things that i would not have if i had a great phone Jun 12 21:08:13 and it also has only 256mb or ram i think Jun 12 21:08:17 there's definitely something to be said for targetting midrange / low-end hardware Jun 12 21:08:19 android was pretty laggy until 2.3, and the droid is pretty much unable to run that Jun 12 21:08:25 So, for m first app, i would like something easy, and has potential... Something like Game Maker studio Jun 12 21:08:31 Anyone have it? Jun 12 21:16:20 Am I doing right to start learning Java programming directly with Android? Jun 12 21:16:21 MDijkstra, android added jit in 2.2, froyo performed quite well Jun 12 21:16:44 M36U574, you're better off knowing and understanding java beforehand imo Jun 12 21:17:33 I'm new to Android, and having a little hard time figuring out how to organize the project. Anyone know of a nice diagram that shows typically how you organize project files/features? Jun 12 21:17:57 pfn: I know, but imo the 2.3 low-latency garbage collector had a way bigger impact on performance Jun 12 21:18:00 2.2 was still laggy Jun 12 21:18:16 jit made a huge difference in 2.2 Jun 12 21:18:16 *on visible performance Jun 12 21:18:22 2.2 was when i stopped thinking "my iphone was faster" Jun 12 21:18:41 that happened on 4.0 for me Jun 12 21:18:43 [pfn]: can you send me some links about Java? Jun 12 21:19:03 i've never had an iphone, is it smoother? Jun 12 21:19:09 that seems to be the argument Jun 12 21:19:13 I went from an iPhone 3G to a Motorola Droid Jun 12 21:19:19 jeppy: iPhone is smooth like butter, so is Windows Phone 7 Jun 12 21:19:57 i went from iphone 3g to htc dream, then to nexus one, and it wasnt until 2.2 on n1 that i wasnt always thinking "my iphone was faster" Jun 12 21:20:00 M36U574, read the book thinking in java Jun 12 21:20:02 Android tends to smooth most of the time, but sometimes it just gets choppy. Maybe it is the garbage collector kicking in? Jun 12 21:20:11 M36U574, you can get 3e for free online, or borrow 4e from the library or something Jun 12 21:20:13 gamingdroid, the GC is negligible since 2.3 Jun 12 21:20:16 gamingdroid, some of it is gc Jun 12 21:20:17 it pauses for a couple ms Jun 12 21:20:18 and ICS on a recent phone as well, although it still kind of depends on the homescreen configuration Jun 12 21:20:25 gamingdroid: you can look at the iosched project for best practives Jun 12 21:20:45 gamingdroid: I personally think it's because android tries to do more graphically intensive things Jun 12 21:20:59 canadiancow|work: well, it's a lot better, but that's still not quite true Jun 12 21:21:10 there is overhead to those 2-3ms numbers that is not reported Jun 12 21:21:17 gamingdroid: ie, when you scroll the homescreen it both scrolls the background and the homescreen page Jun 12 21:21:20 pfn thanks a lot man :D Jun 12 21:21:40 with lots of transparency Jun 12 21:22:14 (which is also why WP7 is so smooth) Jun 12 21:22:34 g00s: iosched is the Google I/O App? Jun 12 21:22:44 gamingdroid: yeah Jun 12 21:22:56 man, apple really foobarred the mac pro update (or non-update) Jun 12 21:23:08 that was negligent Jun 12 21:23:09 MDijkstra: why is the WP7 so smooth? Jun 12 21:23:33 gamingdroid: because it hardly does any transparency or other visual effects Jun 12 21:24:11 android is optimized for something like 3 or 4 layers of compositing Jun 12 21:24:27 as for smoothness there, outside of gc, it animates quite smoothly Jun 12 21:24:29 I'm surprised that my WP7 with a single core 800MHz processor runs buttery smooth compared to my Kindle Fire's dual-core 1GHz. Even games perform better.... Jun 12 21:24:48 dual core doesn't really make much of a difference Jun 12 21:24:59 gamingdroid, and are you comparing apples to apples for games? i.e. ports of the same games? Jun 12 21:25:09 (as close to apples-to-apples as can be) Jun 12 21:25:17 pfn: yeah, Fruit Ninja Jun 12 21:26:36 You can tell the most on Fruit Ninja, because if get's stuck just a tiny bit, it affects the swipes (or the cutting!) Jun 12 21:27:10 whats that, processes from different product lines cant be compared directly in terms of clock cycles and core numbers? :O Jun 12 21:27:35 processors ^ :/ sarcasm is better whith gud spelling Jun 12 21:28:26 Well, I have no clue what magic sauce Apple or MS did... Jun 12 21:28:43 im sure the OS has a part to play but its not a simple comparison to make Jun 12 21:30:31 What I do notice is that Android tends to behave a little like how eclipse does (or a lot of Java apps), kind of sluggish. Maybe all the overhead of second guessing the programmer, which is good for me. :D Jun 12 21:31:15 That said, the carousel on my Kindle Fire is pretty darn cool. Except for the occassional hickup, it's pretty smooth like butter. Jun 12 21:32:06 i havent had many issues with javas speed recently, use it for discrete event simulation Jun 12 21:35:31 my dad has a WP7 actually, he hates it, MS really turned their back on Windows Mobile users Jun 12 21:36:09 robb_www: why does your dad hate WP7? I love it, but the app selection is poor. Jun 12 21:36:32 compared with windows mobile its.. crap for business users Jun 12 21:36:34 ohh, and some of the items cost more just like on Android. Thinking of getting an iPhone. Jun 12 21:37:17 robb_www: what is missing? Jun 12 21:37:24 he was used to being able to sync his emails and contacts easily with outlook, gets a WP7 phone, and finds that he has to pay extra for 3rd party apps to do the same thing Jun 12 21:38:23 I use gmail, and Outlook and WP7 syncs directly with gmail. Can he do something like that? Jun 12 21:38:26 robb_www: i'm guessing (i think correctly) that wp8 will have much stronger enterprise tie-in. ms just had ot get something out the door for consumers Jun 12 21:38:47 gaming, you can do the same with hotmail, its an ugly solution Jun 12 21:38:55 I agree with g00s, feature wise, WP7 was incomplete compared to Android/iOS Jun 12 21:39:10 when you consider they started from scratch in nov 2009, i think they made good progress. Jun 12 21:39:21 g00s, you would hope so, when I was looking for solutions to various issues he was coming across there was plenty poor feedback from previous windows mobile users Jun 12 21:39:45 of course, even the carriers say so - what ms offers for wp8 will be an inflection point. Jun 12 21:39:55 g00s, as a shiny-shiny device with flashy colours for browsing the web and playing angry birds im sure its fine Jun 12 21:40:23 fingers crossed for wp8, as you said Jun 12 21:40:37 I think it all depends on what Windows 8 does for enterprise. Why wouldn't MS just repurpose Windows 8 as Windows Phone 8? Jun 12 21:40:48 *I mean Windows RT Jun 12 21:41:20 hp and dell are investing heavily in windows 8 tablets & such; i'm guessing they see something there Jun 12 21:42:04 proviidng its the full win8 OS, thats something I could get behind Jun 12 21:42:36 No, full Desktop Windows 8 OS is unlikely to get to WP8, just because of the ARM constraint. Jun 12 21:43:00 WinRT without the desktop part, made for ARM makes perfect sense. Jun 12 21:43:34 i mean on tablets Jun 12 21:45:12 robb_www: I think there are some coming, even AMD showed a prototype recently manufactured by Compal I think. It's big, and has low battery life I'm sure. Jun 12 21:45:28 lol, amd Jun 12 21:48:01 is the android:id tag in xml layout just used so Java can create an object? Jun 12 21:48:14 *instantiate Jun 12 21:48:29 no Jun 12 21:48:37 it's not used for that at all, actually Jun 12 21:50:49 Isn't that why you do Activity.findViewById()? Jun 12 21:50:59 that's to find a view, not to create one Jun 12 21:52:02 ah, my wording was wrong. The android:id is used to locate the instantiated object? Jun 12 21:52:18 Otherwise, there is no way to uniquely identify it. Jun 12 21:52:39 correct Jun 12 21:53:18 evancharlton: thanks. Jun 12 21:59:07 so if I create a view using the application context, does that view stick around through orientation changes (i.e. leak memory)? Jun 12 21:59:21 that appears to be what I'm seeing Jun 12 21:59:45 probably depends on whether you keep references around Jun 12 22:00:49 hey guys Jun 12 22:01:33 has anyone ever created a listview like the new google+ stream listview with the animations? Jun 12 22:02:17 HI , what are some good android tutorial videos ? Jun 12 22:02:39 tomvolek: this is a dev channel Jun 12 22:03:22 that is why I am asking , looking for dev android tutorial videos, like IOS at stanford videos Jun 12 22:03:56 tomvolek try this: http://thenewboston.org/list.php?cat=6 Jun 12 22:04:03 I know , i can find some on Youtube, want the rooms opinion as what is a good series Jun 12 22:04:15 thanks kareypowell Jun 12 22:04:34 no problem Jun 12 22:05:02 thanks kareypowell , ah good, i had forgotten the newboston dude :) Jun 12 22:09:47 windows 8 is so terrible, I don't understand ms is trying to do Jun 12 22:09:56 touch experience on pc is so shitty... Jun 12 22:10:13 pc does not need touch UI Jun 12 22:12:06 certainly doesn't, it's not ergonomic Jun 12 22:12:11 and I have an hp touchsmart Jun 12 22:12:54 Hi. For a NDK library, if I have a .jar file and a list of .so files and c++ headers, how do I use this library in another Android project Jun 12 22:13:25 pfn: which one? some seem to have gotten really good reviews Jun 12 22:13:43 I have an older iq504 that we bought back before win7 was announced Jun 12 22:14:18 I wish it had better discrete graphics, but for its time, I guess it's reasonable Jun 12 22:14:26 it doesn't quite have enough juice to play d3 on it :-( Jun 12 22:33:22 hm, so abs uses nineoldandroids internally ? Jun 12 22:33:26 Hey guys, I have an Acitivity variable statically initialized in a seperate class to hold it statically between activities. However when I try to access it, it says its null. Even though I have it set to the default activity. Jun 12 22:34:32 yikes. that sounds like a desperately bad idea. Jun 12 22:34:38 never, ever cache Activity pointers. Jun 12 22:34:54 why are you doing that? Jun 12 22:35:17 I have to access it in a static function. Jun 12 22:35:56 I bet you don't :) Jun 12 22:36:04 seriously, what are you trying to do int he larger sense? Jun 12 22:36:32 there is probably a much better way to approach the situation Jun 12 22:37:23 I am using JNI to access a function. (forcing it to be static in my case.) Then I have to access the activity so I can runinui Jun 12 22:37:28 ctate, would using the application context to inflate a view cause it to leak on orientation change? Jun 12 22:37:47 no, but it might not work right Jun 12 22:38:04 the application context is not necessarily the same as the activity's own context. why aren't you just using the activity's? Jun 12 22:38:32 i will have to Jun 12 22:38:33 ZettaZete: just pass the activity/context pointer as a parameter the JNI method Jun 12 22:38:58 it crashes. when I do that. However, never hurts to try that again. Jun 12 22:39:43 i have a class with several views inflated with the application context. on each rotation, another instance of that class is added to the heap Jun 12 22:40:24 are you caching activity pointers? :) Jun 12 22:40:31 no Jun 12 22:40:40 at least not that i know of Jun 12 22:41:33 I think that's just what I get for trying to use the app context as much as possible instead of sticking to the guidelines :\ Jun 12 22:41:35 also i don't know what you mean by "inflated with the application context" Jun 12 22:41:42 setContentView() is a method of Activity, not of Context Jun 12 22:41:59 View.inflate(Context, rId Jun 12 22:42:10 jeppy: don't use application context Jun 12 22:42:12 or LayoutInflater.from(context).inflate() Jun 12 22:43:10 hm. it doesnt' look from teh code like it should make a difference Jun 12 22:43:38 ctate: the way he's doing it, he'll lose whatever themes the activity should have Jun 12 22:43:44 jeppy, where does it say "use the app context for everything" ? Jun 12 22:43:44 i.e., it's wrong Jun 12 22:44:02 canadiancow|work: "instead of sticking to the guidelines" Jun 12 22:44:04 evancharlton: oh fair enough Jun 12 22:44:17 that's more "don't use View.inflate(...)" though :) Jun 12 22:44:24 ctate: no it's not Jun 12 22:44:27 oh whoops Jun 12 22:44:28 mm? Jun 12 22:44:29 View.inflate(..) is fine Jun 12 22:44:50 you just need to pass in a themed Context Jun 12 22:44:50 okay then i'm off in my own personal weeds here :) Jun 12 22:45:02 did i ever tell you about the code i saw? it was someMethod(Context context) { mContext = context.getApplicationContext().getApplicationContext(); } Jun 12 22:45:58 * jeppy goes off to replace contexts Jun 12 22:46:26 personal weeds :) Jun 12 22:46:39 ah, yes; doing it that way means that each View is pinned to the application context Jun 12 22:46:44 each view you inflate, that is Jun 12 22:47:01 yeah, dont' do that. Jun 12 22:47:12 so that would explain the large retained heaps :) Jun 12 22:47:19 i mean, right? Jun 12 22:47:31 possibly; i haven't traced out all the references that implies Jun 12 22:47:59 stepping back a moment, what were you THINKING re using a non-UI context for building your UI? :) Jun 12 22:48:24 but if a view is pinned to the application context then the view instance sticks around as long as the app instance? Jun 12 22:48:32 yeah, who told you to do that, jeppy? Jun 12 22:48:55 evancharlton, this crazy guy in my head Jun 12 22:49:08 jeppy: that is not obviously the case, but like i said i haven't bothered tracing all the code involved Jun 12 22:49:16 dig into it with hat/mat and see where the refs are being held Jun 12 22:49:17 ok Jun 12 22:49:28 i've been using mat Jun 12 22:49:28 and stop using the application context for UI :) Jun 12 22:50:47 BUT APPLICATION CONTEXT IS BETTER Jun 12 22:50:53 BECUASE IT DOESN'T LEAK YOUR ACTIVITY Jun 12 22:51:01 *thwap* Jun 12 22:51:10 this is just like the "relativelayout is faster than linearlayout" bullshit that people spew Jun 12 22:51:22 and "NEVER USE LINEARLAYOUT" Jun 12 22:51:31 * ctate <3 RelativeLayout Jun 12 22:51:39 and then you see people doing ridiculous things to try to lay things out linearly in a relativelayout Jun 12 22:51:49 using a relativelayout is certainly faster than using *nested* LinearLayouts Jun 12 22:51:59 depth matters. Jun 12 22:52:01 ctate never? Jun 12 22:52:04 but thats not what the noobs are shouting Jun 12 22:52:23 Jug6ernaut: never what? never use the application context for UI elements? Jun 12 22:52:23 all they know is romainguy made a blog post that said something like "here, relativelayout is faster" Jun 12 22:52:32 i'm hard pressed to think of when that would be appropriate Jun 12 22:52:46 sometimes it's a lot slower though :) Jun 12 22:53:01 :) Jun 12 22:53:16 romainguy: we really need to write some documentation on how to write your own layouts Jun 12 22:53:17 o sorry ctate, meant canadiancow|work Jun 12 22:53:33 ctate: I have a 1 hour talk on parleys.com you can refer people to Jun 12 22:53:42 and there was doc about it in 1.0 Jun 12 22:53:47 sure, but we need print on d.android.com Jun 12 22:53:49 :( Jun 12 22:53:52 ctate: add the new magic layout to the support library Jun 12 22:53:56 people are too scared of it Jun 12 22:53:56 +1 Jun 12 22:54:01 MagicLayout Jun 12 22:54:08 mMagicLayout.doWhatIWant(); Jun 12 22:54:10 DwimLayout Jun 12 22:54:10 MDijkstra: well… done Jun 12 22:54:13 GridLayout Jun 12 22:54:16 oh Jun 12 22:54:21 MDijkstra: :) Jun 12 22:54:33 I should actually be using that, then ;) Jun 12 22:55:03 GridLayout is pretty hip Jun 12 22:59:34 Does a method invocation on a sleeping thread wake it from its sleep? My surfaceview is set to sleep after a touch event, but another thread may need to set or get data from it during this time. Jun 12 23:01:36 themirror: i think you are getting confused about threads vs objects Jun 12 23:03:39 ctate: perhaps, but I've read in multiple places that after a touch event, one should call Thread.sleep(dt) Jun 12 23:03:55 themirror: which places? Jun 12 23:04:05 that's not right at all Jun 12 23:04:25 hi, is there a way to get the pids for package names? Jun 12 23:04:56 themirror: i'm sorry to hear that. Jun 12 23:05:24 the only reason they might be suggesting that is to throttle the app's rate of consumption of input events Jun 12 23:05:32 themirror: just to name a few things: 1) surfaceview isn't a thread 2) a method invocation will run on the thread calling it Jun 12 23:05:40 ==MDijkstra Jun 12 23:06:10 MDijkstra: There was a post on a google group by Diane Hackborn about this, I'm trying to find the link one sec :) Jun 12 23:06:42 themirror: you should think of objects as a combination of data and instructions, and threads as concurrent paths of executions Jun 12 23:06:52 *execution Jun 12 23:07:14 ie, objects provide what to do, threads do it Jun 12 23:10:11 MDijkstra this is the thread: https://groups.google.com/forum/?fromgroups#!topic/android-developers/Oe6k1_bm38o Jun 12 23:12:49 themirror: that post only shows half the picture Jun 12 23:13:02 because it assumes you've already got a dual-thread setup in your app Jun 12 23:13:34 it assumes you've got a main thread receiving touch events, and a background thread running the drawing loop Jun 12 23:13:51 and then proposes a solution to stop the touch events from impacting the performance of the drawing loop Jun 12 23:15:06 im about to work on integrating some geo-location functions into my app Jun 12 23:15:08 MDijkstra: maybe I'm missing something then - I have a Main class for drawing on the surface, a Game class for doing the logic, and a SurfaceView to register touch events. Now I just need a way to make sure Game tells the SurfaceView what's touchable Jun 12 23:15:35 say in an activity I want a listview to constantly keep refreshing itself based on geo location, each item in the listview has a geo location hard coded to it Jun 12 23:15:53 themirror: again, objects aren't threads Jun 12 23:16:08 themirror: threads are explicit constructs you create by subclassing thread Jun 12 23:16:10 whats a good method to poll? should i just a countdowntimer class and every n seconds call my geo-location code? Jun 12 23:16:31 then rearrange the list accordingly Jun 12 23:16:32 brx_: just register for location changes ... Jun 12 23:16:45 crap, this little-fluffy-location library wants me to overload the Application class. ick. Jun 12 23:17:02 ok i see Jun 12 23:17:23 themirror: in your case, the main class drawing to the surface should subclass Thread Jun 12 23:17:38 ahh i understand now evancharlton, forgot it worked like that Jun 12 23:17:52 so in my reciever I just call my code and then update listview Jun 12 23:18:13 brx_: just update your adapter, yes Jun 12 23:18:22 MDijkstra: I don't understand, why is that the solution? Jun 12 23:18:22 cool, thats gonna save me loads of time Jun 12 23:18:35 long time since i played with the geo stuff and it was nly a quick glance Jun 12 23:18:40 thanks for help as always Jun 12 23:18:53 themirror: because you need to be able to do two things at once Jun 12 23:19:02 themirror: if your app is busy doing its drawing loop Jun 12 23:19:24 themirror: it can't simultaneously receive input events unless that portion runs in a separate thread Jun 12 23:19:51 resulting in an unresponsive app at best Jun 12 23:20:10 MDijkstra: so then by that reasoning, the game logic needs to be in a separate thread as well Jun 12 23:20:26 yeah, generally you have at least two Jun 12 23:20:44 two background threads, I mean Jun 12 23:20:57 but it's not as easy as just spawning threads and be done with it Jun 12 23:21:10 you need to synchronize when they access and modify shared state Jun 12 23:21:19 (which is not trivial, to say the least) Jun 12 23:21:57 surface view ftw themirror Jun 12 23:22:22 MDijkstra: can't I just put all the relevant data in the Main thread as fields and call synchronized(surfaceHolder) to draw? Jun 12 23:23:18 MDijkstra: I currently have it such that if I don't wish to overwrite the field, I pass null from either the SurfaceView or the Game thread to the drawing (Main) thread Jun 12 23:23:27 themirror: well, no, not really Jun 12 23:23:43 themirror: you could put the loops of all your background threads in such a synchronized block Jun 12 23:23:52 but then you'd have the exact same problem you had before Jun 12 23:24:35 namely that because the thrad receiving input inputs is waiting to enter its synchronized block while it should really be handling input events Jun 12 23:27:19 MDijkstra: Right, which is why I planned to have the SurfaceView register a touch event, send the data to the drawing thread, and then sleep so that touch event don't monpolize CPU cycles if the user leaves his finger down. The Game thread will also be generating draw events and sending them to the drawing thread, sleeping as appropriate. The synchronized block would be in the drawing thread, right? Jun 12 23:27:45 no, it would be in every thread Jun 12 23:28:01 since you're synchronizing between every thread Jun 12 23:28:53 synchronize is essentially like saying 'no two threads should enter their blocks of code at the same time' Jun 12 23:28:55 MDijkstra: I must be confused about the synchronized block then. Jun 12 23:29:09 ie, when thread A is inside its synchronized block Jun 12 23:29:18 thread B is waiting to enter its synchronized block Jun 12 23:29:24 and vice versa Jun 12 23:31:20 MDijkstra: Then I don't think I need a synchronized block then, since what Game asks to draw and SurfaceView asks to draw are completely separable and happen at different times. Jun 12 23:31:35 no, they don't Jun 12 23:32:42 and even if that were true, you'd still have the problem that even the time at which you ask can cause problems Jun 12 23:33:08 ie, say you have a List in your drawing thrad Jun 12 23:33:10 *thread Jun 12 23:33:24 you certainly can't call that from other threads without synchronization Jun 12 23:33:37 such as queueing items into it Jun 12 23:35:14 no offense, but you should really take a step back and read up on the fundamental concept of thread programming Jun 12 23:35:26 or use a ready-made game engine Jun 12 23:35:35 MDijkstra: Okay, so because both Game and SurfaceView could be requesting a draw at the same time, I have to control this with a synchronized block? Jun 12 23:35:54 again, SurfaceView isn't a thread Jun 12 23:35:59 it can't request a draw Jun 12 23:36:25 it can be told to draw by a thread Jun 12 23:37:26 MDijstra: If I get a touchevent, I tell it to update Main's field and call Main's draw routine Jun 12 23:38:16 then that is running on the main thread Jun 12 23:38:24 ie, the thread android creates for you Jun 12 23:38:55 the same thread used to do all your UI stuff Jun 12 23:39:09 yes. all draws are done there Jun 12 23:39:26 requests are spawned by both Game and SurfaceView Jun 12 23:39:29 yes, and if you block it for too long android will kill your app Jun 12 23:39:38 I'm not blocking though Jun 12 23:40:07 all sleeps are done in Game or SurfaceView, right? Jun 12 23:40:20 because SurfaceView isnt' a thread Jun 12 23:40:35 but all i see is Thread.sleep(dt) for the ontocuhevent Jun 12 23:41:42 MDijkstra: If I'm missing something fundamental, please point me in the right direction. I appreciate all your help so far. Jun 12 23:42:04 themirror: you're missing the fundamental distinction between objects and threads... Jun 12 23:42:18 themirror: Thread.sleep() sleeps the thread it's being called from Jun 12 23:42:26 onTouchEvent is called from the UI thread Jun 12 23:42:33 thus Thread.sleep() sleeps the UI thread Jun 12 23:42:56 MDijkstra: I see. Jun 12 23:43:36 MDijkstra: But the code onTouchEvent(MotionEvent event) is handled in the SurfaceView. So you're saying all code executed in this method is being done on the UI Thread Jun 12 23:45:00 themirror: no, I'm saying a thread is like a line of execution across your program Jun 12 23:45:09 a path of execution Jun 12 23:45:23 ie, you can have multiple threads calling the same method Jun 12 23:45:36 each execution of that method will run in another thread Jun 12 23:45:52 but, because android calls onTouchEvent for you Jun 12 23:46:03 it's running on the UI thread Jun 12 23:46:24 because android manages the UI thread and delivers that event to you there Jun 12 23:46:42 MDijkstra: I think I get it. So there's no way to put a sleep in onTouchEvent without sleeping the UI Thread Jun 12 23:47:12 yeah, and it's not even solving the problem you're looking to solve Jun 12 23:47:31 this is purely performance tuning Jun 12 23:47:44 that entire thread on google groups you linked to Jun 12 23:49:16 themirror: fundamentally, there is nothing special about creating a thread B which calls onTouchEvent Jun 12 23:49:30 if called from thread B, Thread.sleep would sleep thread B Jun 12 23:50:24 MDijkstra: okay, so I need to make a new class extending Thread so that it may sleep instead? Jun 12 23:52:08 themirror: well, why do you want to do Thread.sleep at all? Jun 12 23:52:25 because he read somewhere that he should do that Jun 12 23:52:33 lol Jun 12 23:52:45 themirror: the person who it was suggested to had a working application with a specific issue that the Thread.sleep kind of fixes Jun 12 23:52:57 the reason for that is to attempt to limit the amount of time that a game spends handling touch input Jun 12 23:52:57 MDijkstra: Maybe that's a good question. I may not even need that haha. I just don't wait to register too many touch events and slow the framerate Jun 12 23:53:12 *dont want Jun 12 23:53:12 themirror: I'd suggest first getting a working game Jun 12 23:53:18 and then worrying about this kind of stuff Jun 12 23:54:00 MDijkstra: Okay, so you're saying I may not have a problem with touchEvent overload? Jun 12 23:54:32 the right answer is not to sleep your main thread, but to be more clever about handling the touch input you're getting Jun 12 23:54:48 you don't have to do all the work at 100 Hz or however fast the thing is spitting motion events at you Jun 12 23:55:00 you can batch them up and only do one chunk of work per frame Jun 12 23:55:11 ie, top-bottom half processing Jun 12 23:55:14 yay ;) Jun 12 23:55:41 I'm also guessing the event loop is blocking the drawing thread some way Jun 12 23:56:01 that performance drop seems a bit too dramatic, especially on a multicore device Jun 12 23:56:44 themirror: you certainly have a problem if you don't design this kind of stuff properly Jun 12 23:57:22 themirror: there are many potential problems with multithreading, it's not a 'just start a couple of thread and it magically works properly' kind of deal Jun 12 23:58:16 themirror: if you do background drawing (and you should), you do have to worry about hard problems like synchronizing between the UI and game threads Jun 12 23:58:30 multithreading is complex and subtle. MDijkstra is right that if you don't understand and design for it up front you're gonna have a bad time. Jun 12 23:58:30 *UI, game and drawing threads Jun 12 23:58:41 MDijkstra: Okay, so I'm thinking I'll need a synchronization block in the Game thread when I want to request a draw on the UI Thread Jun 12 23:59:10 so that onTouchEvent draw requests in the UI Thread don't leak with Game's Jun 12 23:59:24 ^ I didn't phrase that properl;y Jun 13 00:01:47 MDijkstra, ctate thanks for the help. I'm going to go draft out the orchestration for this. Much appreciated, take care. Jun 13 00:02:10 np, good luck :) Jun 13 00:05:04 http://www.waze.com/wiki/index.php/Source_code , i could use another set of eyes here . could someone see if 2.4 src is complete ? Jun 13 00:06:05 mikedg: you are the 6th result for my search "android jokes" for your post "Android needs more poop jokes" Jun 13 00:16:05 hey guys… anyone know the pwd of JNI? Jun 13 00:17:25 is it possible to attach the contact database to any other open db (using the SQLite statement) and is there any way to get the path to the contact db programatically? Jun 13 00:21:13 I'm asking becuase I am compiling OpenCV in the JNI, and need to load in external resources at runtime Jun 13 00:24:19 BeauJoh: don't rely on the cwd; use the standard APIs to look up your app's data directory and build the paths from there Jun 13 00:24:36 (or the external storage directories, if that's where you're finding the content) Jun 13 00:26:05 howdy all Jun 13 00:26:10 ctate: thanks for the advice, so simple and something I didn't think of! Jun 13 00:27:14 does anyone have experice deleting crap from an sd card? I'm trying to do it and i cant get r/w permissions on the sd card... and i have set r/w permissions (prolly not properly) in the androidmanifest.xml Jun 13 00:27:54 dynamite1985 did you add the permission Jun 13 00:28:58 through the androidmanifest? Jun 13 00:29:08 pastebin your manifest if you can Jun 13 00:29:16 sure... hold on a sex Jun 13 00:29:19 sec** Jun 13 00:30:13 http://pastebin.com/LstyTkQw Jun 13 00:30:40 dynamite1985: it is in the wrong place.. not in application. put it below Jun 13 00:31:16 so essentially the last line of the manifest? Jun 13 00:31:35 i would put it after Jun 13 00:32:11 anyone use ormlite and can share their experience? worthwhile the investment? Jun 13 00:32:24 all right... i'll give er a whirl and report back Jun 13 00:32:31 gamingdroid: ormlite is nice, BUT: it really is LITE Jun 13 00:32:48 pboos: how lite? like lacking joins? Jun 13 00:33:33 thanks guys... pboos advice worked =D Jun 13 00:33:48 gamingdroid: well joins work. but those kind of get complicated. it kind of depends on what you use it for. i do not remember the exact problem i had. but i in the end did end up not using it. Jun 13 00:34:50 it seems like it should make it slightly easier to do stuff, but this is another layer and I don't know if this will adversely affect performance Jun 13 00:35:41 hi all Jun 13 00:36:07 i have an activity using my app's default theme, Jun 13 00:36:16 and i need one of the fragments in it to use a different theme Jun 13 00:36:41 so far I'm trying to use a ContextThemeWrapper in onCreateView() with no luck Jun 13 00:36:59 anyone know what I should be doing? Jun 13 00:39:38 anyone? Jun 13 00:47:02 if my app violates a gpl license can it be taken down from google play ? Jun 13 00:53:32 can be taken down for less i would think Jun 13 01:05:58 any freelance android devs awake? :D Jun 13 01:07:51 im curious about rates, how much to charge for an app i have been asked to write Jun 13 01:12:48 brx_: 30 percent of sales Jun 13 01:35:11 brx_: you charge as most as the client is willing to pay Jun 13 01:35:15 the hard part is figuring that out Jun 13 01:35:45 say if the project isn't going to be valuable unless I overquote, I overquote Jun 13 01:36:00 if I feel they are unlikely to take my bid if I give a high estimate, I don't give a high estimate Jun 13 01:36:18 s/most/much/ Jun 13 01:36:53 last month I did one project that took 25% the time of another project I did but I got paid twice as much for that one. Jun 13 01:37:47 if the client pays more, I put more effort in. i write tests. I generally write better code and don't have to develop as fast. Jun 13 01:46:38 anyone know how to change teh color of the progress bar in abs? Jun 13 01:53:38 or what attribute to specify Jun 13 01:58:47 should abs work ok on a memory constrained device like a droid-1 ? Jun 13 02:00:59 i dont see why not Jun 13 02:01:32 hey all Jun 13 02:02:27 I have been trying to get my app to open gallery to select an image Jun 13 02:02:36 null pointer errors :( Jun 13 02:03:03 fixthem Jun 13 02:03:06 this happens at startActivityForResult(Intent.createChooser(intent, "Select Picture"), 0); Jun 13 02:03:29 XXCoder: maybe you need http://android-developers.blogspot.com/2009/01/can-i-use-this-intent.html ? Jun 13 02:03:45 looking Jun 13 02:03:53 g00s: your pic is still my wallpaper. Jun 13 02:04:12 readme: hehe … my powershot s95 died :( Jun 13 02:04:17 i am now camera-less Jun 13 02:04:21 I started to make an intellij color scheme to match it, but after much tweaking I realized I had picked the exact colors of a garbage can so I went back to the default Jun 13 02:04:24 XXCoder: how does your intent look like? Jun 13 02:04:24 I'm not very god at colors Jun 13 02:04:38 although I believe there is an app that can sample your picture and return me the right colors Jun 13 02:04:51 :( Jun 13 02:05:01 pboos: not short code to just return filename from intent Jun 13 02:05:02 how come your picture still works!? Jun 13 02:05:31 so my live wallpaper can load 2 pictures saved in settings Jun 13 02:05:49 readme: yeah, i think so. a few like http://99designs.com/tech-blog/blog/2012/05/11/color-analysis/ Jun 13 02:06:26 XXCoder: can you make a gist? Jun 13 02:07:09 g00s: i'd click that link but I don't advocate human labor farming via speculative work offers Jun 13 02:07:15 pboos: well what I need to do is a way for user to browse images and select one, and for my app to get full path/filename path of that said image Jun 13 02:08:42 XXCoder: kind of like the first answer here: http://stackoverflow.com/questions/5309190/android-pick-images-from-gallery ? Jun 13 02:08:48 orrr the marginalization of professional disciplines Jun 13 02:08:54 just wait until 99codes pops up Jun 13 02:09:00 you'll be pissed, i assure you Jun 13 02:09:34 pboos: yeah. I even added intent filter thing to manfest in same activity that calls this. Jun 13 02:09:34 XXCoder: better example here: http://stackoverflow.com/questions/2507898/how-to-pick-a-image-from-gallery-sd-card-for-my-app-in-android Jun 13 02:09:43 looking Jun 13 02:10:10 XXCoder: why do you need an intent filter? you want to call the external gallery, right? Jun 13 02:10:28 I thought it was required in order to call intent? Jun 13 02:10:38 sorry still novice on android. Jun 13 02:10:49 XXCoder: it is not required to call an intent. It is required to RECEIVE an intent. Jun 13 02:11:08 receive as in call from other app? Jun 13 02:11:15 if so I definitely dont need it. Jun 13 02:11:35 XXCoder: mainly yes. but there are times, when you want to do that even in your own app. But i am pretty sure you do not want that in your case. Jun 13 02:11:55 ok. now, what oermissions do I need to select gallery? Jun 13 02:12:50 add to AndroidManifest.xml Jun 13 02:12:55 XXCoder: no permission needed Jun 13 02:13:06 readme: cat.pics ? :D haha good one :D Jun 13 02:13:10 no worries then Jun 13 02:13:20 I was sure that was joke but wasnt 100% lol Jun 13 02:13:49 i'm serious actually Jun 13 02:14:35 you only need the perm if you're going to fill the gallery with cats though Jun 13 02:14:38 other pics willw ork ok Jun 13 02:15:10 sure lol Jun 13 02:20:47 06-13 02:20:34.373: ERROR/AndroidRuntime(2016): java.lang.NullPointerException Jun 13 02:20:47 06-13 02:20:34.373: ERROR/AndroidRuntime(2016): at android.app.Activity.startActivityForResult(Activity.java:2749) Jun 13 02:20:47 06-13 02:20:34.373: ERROR/AndroidRuntime(2016): at rolf.livewallpaper.acrossrealities.filechose.getFile(FileChooser.java:36) Jun 13 02:21:03 all examples so far causes that :( Jun 13 02:21:52 line 36: startActivityForResult(i, 2); Jun 13 02:23:01 example is ACTIVITY_SELECT_IMAGE im not sure where that come from Jun 13 02:25:37 XXCoder: as said before.. a gist of the file would help. (https://gist.github.com) Jun 13 02:26:36 ok. this is early prototype of pic selector so pretty messy. Jun 13 02:28:05 i need one fragment in my activity to have a different theme than the activity Jun 13 02:28:07 pm fine? Jun 13 02:28:17 anyone know a way to accomplish this? Jun 13 02:28:24 XXCoder: yes Jun 13 02:30:44 its a mess but you should see that its triggered by clicking button, it calls on private class filechose and it should load but nullpointer error. Jun 13 02:37:18 please, if anyone can help me Jun 13 02:37:25 ...i'll send you cookies Jun 13 02:40:13 can you have IndeterminateProgress and regular progress? Jun 13 02:40:40 @ same time Jun 13 02:51:31 http://maps.apple.com Jun 13 02:51:38 does that only redirect to google maps for canadian users? Jun 13 02:51:42 or did apply really fuck something up Jun 13 02:52:03 canadiancow: it redirects for US too Jun 13 02:52:07 saw an article about it today Jun 13 02:54:00 karakuri: you're better off enticing with bacon Jun 13 02:54:05 or maybe bacon cookies Jun 13 02:54:19 i will if i have to! Jun 13 02:54:40 but yeah, i'm sorta stuck on this Jun 13 02:55:01 damn it, so i was just about to sell a piece of guitar kit and learned one of my favorite guitar players is now using it ! Jun 13 02:55:17 * g00s rethinks Jun 13 02:58:10 yey, next itunes loses Ping \o/ Jun 13 02:59:39 damn JSON lib's damn you! **** ENDING LOGGING AT Wed Jun 13 02:59:58 2012