**** BEGIN LOGGING AT Thu Apr 26 03:00:00 2012 Apr 26 03:03:38 pragma- ? Apr 26 03:03:51 rick787, yournamespace.R, not android.R Apr 26 03:05:54 Rich787 does intellij have a gui previewer yet Apr 26 03:06:36 Rich787: Try doing an ant clean? Apr 26 03:08:11 Rich878 not android.R Apr 26 03:08:15 your.package.R Apr 26 03:09:14 gaz`: yes, it had it, for sometimes, viewer only, not drag-drop editable Apr 26 03:09:33 Rich787: not android.R, package.R Apr 26 03:10:05 im JUST getting to gripswith eclipse but its buggy for me, i nee dintellij to whoop its ass Apr 26 03:10:41 i wouldnt mind netbeans winning the war but it seems the "real" coders hate nb Apr 26 03:11:10 'real coders' use vim. Apr 26 03:11:12 * HacDan ducks Apr 26 03:11:27 yeh vimites can kiss my ass Apr 26 03:11:32 even tho i respect em Apr 26 03:11:58 REAL CODERS USE BUTTERFLIES Apr 26 03:12:00 ahh camp emacs eh? Apr 26 03:12:01 sorry to hear Apr 26 03:12:05 Apr 26 03:12:31 i was coding earlier with no ide, just ,java and .bat, within minutes i was confused and baffled, u forget how eagle eyed u have to be on tiny wee dos windows Apr 26 03:12:44 .bat? Apr 26 03:12:59 aye Apr 26 03:13:07 that's worse than the no IDE Apr 26 03:13:12 I like netbeans for C++ =) Apr 26 03:13:27 my latest android game im tryign to code it in j2me, i then use micro emulator to translate the code to an pak for me, basically a nightmare L) Apr 26 03:13:36 gaz` - welcome to android platform dev Apr 26 03:13:37 a script driven cray nightmare Apr 26 03:14:13 building shit for android platform / like os dev Apr 26 03:14:13 man Apr 26 03:14:19 its really just build deploy Apr 26 03:14:22 build deploy Apr 26 03:14:29 is it gonna work? Apr 26 03:14:31 build deploy Apr 26 03:15:10 i cant be fucked porting this Apr 26 03:15:20 im looking at microemu as a wrapper Apr 26 03:15:26 it basically is Apr 26 03:15:30 kinda funky Apr 26 03:16:06 so yeh now im contuing my new android game in j2me Apr 26 03:16:11 lol weirdness Apr 26 03:16:28 ive even hacked j2me emu to be 800x480 Apr 26 03:17:06 then to test i run a .bat it builds it runs thru microemu converts to apk uninstalls old one puts new one on then runs adb logcat :) seemless Apr 26 03:17:10 hey question Apr 26 03:17:17 no Apr 26 03:17:19 i got hardened cross toolchain going for android in gentoo Apr 26 03:17:25 and im wondering what is a good link Apr 26 03:17:30 so i can use that toolchain to build android source ?! Apr 26 03:18:10 u lost me at hardened Apr 26 03:18:20 stack smashing prevention Apr 26 03:18:23 for a multitude of reasons Apr 26 03:18:25 and independant position code Apr 26 03:18:26 he gave it a blue pill Apr 26 03:18:27 for building application Apr 26 03:18:39 gcc 4.6.0/bionic libc Apr 26 03:18:51 stack smashing prevention! Apr 26 03:18:52 basically want to use that cross toolchain Apr 26 03:18:54 to build the android env Apr 26 03:18:57 this guy is like dro who Apr 26 03:18:57 source Apr 26 03:19:03 he's extremely whoovian Apr 26 03:19:13 just gotta figure out how to link it against hte framework source Apr 26 03:19:25 everything youve said has been nonsensical to me Apr 26 03:19:36 we're app developers Apr 26 03:19:38 and i been involved in computers since i was a child Apr 26 03:19:41 SSP/PIE toolchain Apr 26 03:19:41 ahh Apr 26 03:19:43 ah ok Apr 26 03:19:50 ok how about this one Apr 26 03:19:54 how do i set an external cross toolchain Apr 26 03:19:56 android-platform mailing list perhaps Apr 26 03:19:57 to build android source :) Apr 26 03:20:31 "independant position code" whats that Apr 26 03:20:38 am i a newwwb Apr 26 03:21:18 very gallifrayen Apr 26 03:21:22 I installed Steam today on my Mac Apr 26 03:21:23 zPenguin: are you trying to build the complete android system or native code to run inside of android? Apr 26 03:21:31 the only game I own, Counter Strike (O.G.) wasn't available for it :( Apr 26 03:21:35 native code Apr 26 03:21:39 using cross external toolchain Apr 26 03:21:40 my ninth-grade self was disappointed Apr 26 03:21:42 ICS Apr 26 03:22:19 sorry missed your response zPenguin if you did, client crashed =/ Apr 26 03:22:22 zPenguin: https://groups.google.com/forum/?fromgroups#!forum/android-platform Apr 26 03:23:53 JakeWharton, CS 1.6 will run in steam, if you're feeling nostalgic Apr 26 03:24:03 on a Mac? Apr 26 03:24:03 *wine Apr 26 03:24:06 oh Apr 26 03:24:07 haha Apr 26 03:24:29 nah I didn't really care. just saw the Linux announcement and two of my coworkers and I wanted to see if we could recover our accounts Apr 26 03:24:32 more work than it's worth i feel though Apr 26 03:24:52 i installed osx steam a while back Apr 26 03:24:59 then i tried to download hl2 Apr 26 03:25:02 in cambodia Apr 26 03:25:05 garg Apr 26 03:26:00 thnx JakeWharton Apr 26 03:27:08 git branching strategies with gerrit anyone ?? Apr 26 03:39:57 Why do I get this.. I have a method that is setting the Adapter on a ListView. 1) can be called by OnSensorChange or 2) A Timer Object : android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. Apr 26 03:40:32 because you're calling from a background thread Apr 26 03:40:51 so a Timer runs natively on the background? Apr 26 03:41:36 depends Apr 26 03:41:45 before I spend another hour, can I even update a ListView from a background? Apr 26 03:41:58 define update Apr 26 03:42:10 anything UI-touching needs to be done from the UI thread Apr 26 03:42:16 but you should be doing network calls and such from a background thread Apr 26 03:42:28 this is not a network call Apr 26 03:42:54 then why are you doing it in the background Apr 26 03:43:53 JakeWharton refreshing the adapter from OnSensorChange to update compass needles for each list item.. then I have a Timer that runs every 60 seconds to compute the estimates X time Apr 26 03:44:19 JakeWharton I didn't implicitly start the Timer on a new thread. Apr 26 03:44:22 ok so once that's done and you have all the data you need to call to the UI thread and update the adapter Apr 26 03:44:42 Once the timer is done? Apr 26 03:44:57 if so.. got an example? Apr 26 03:45:05 uh Apr 26 03:45:36 Admob has all kinds of hardware to target, but not the Galaxy Tab 10.1 ... weird Apr 26 03:45:38 runOnUiThread(new Runnable() { public void run() { mAdpater.replaceWith(data); } }); Apr 26 03:46:55 http://android-developers.blogspot.com/2007/11/stitch-in-time.html Apr 26 03:48:22 JakeWharton >> I'm doing circles... there it is. thnx Apr 26 03:48:59 Does anyone have any experience with development for the ET1N0? Apr 26 03:58:17 <_Lucretia_> jesus! google's android download site for eclipse is really slow Apr 26 04:01:27 http://www.theverge.com/2012/4/25/2974909/google-wanted-to-sell-10m-android-tablets-a-year-in-2011-have-33-percent-marketshare Apr 26 04:01:45 i dont think android tablets are ever going to recover market share Apr 26 04:02:08 i'm kinda glad i never spent any time tablet-optimizing my app Apr 26 04:03:04 the iPad owns the world right now Apr 26 04:08:53 iWut? Apr 26 04:09:00 SimonVT: NOA 2.3.0 released Apr 26 04:11:29 D:< Apr 26 04:11:35 i like my tablet Apr 26 04:11:41 * hesperaux sad faces Apr 26 04:12:14 I do lazy tablet-optimization Apr 26 04:12:57 how's that? Apr 26 04:12:59 I make sure it doesn't look like complete garbage. I don't do the whole Fragment and ActionBar and backport that to phones with Jake's ABS thing though Apr 26 04:13:02 lol Apr 26 04:13:13 i'm starting off my app with ABS Apr 26 04:13:41 even though i'm realistically targeting 2.2, i expect it will be better on ICS Apr 26 04:13:43 I design with 2.3 as my target Apr 26 04:13:47 and on tablets even Apr 26 04:13:56 if it works on 3.x and 4.x, good for them Apr 26 04:13:57 i know way too many people still on 2.2, so eh Apr 26 04:14:01 the 1% Apr 26 04:14:01 i'm still designing with 2.2 as my target Apr 26 04:14:34 but i'll probably move to 2.3 around q1 Apr 26 04:15:06 most of the people this app is for have to spend money on wheelchairs and such lol, so i'm gonna keep 2.2 support for a while Apr 26 04:16:09 i have 1.6 as the min sdk target, and judging by the 10 or so 1.6 users who still have my app installed it seems to work Apr 26 04:16:42 lol Apr 26 04:16:58 my mom uses 1.6 Apr 26 04:23:01 yeah she does Apr 26 04:23:11 lol Apr 26 04:23:30 jake Apr 26 04:23:56 if i compile my app with ABS and run it on ICS, it doesn't automagically use ICS framework? Apr 26 04:25:38 yes Apr 26 04:25:50 with emphasis on "automagically" Apr 26 04:26:05 yes it does not? Apr 26 04:26:11 er Apr 26 04:26:16 it uses native Apr 26 04:26:18 on ICS+ Apr 26 04:26:19 hmm Apr 26 04:26:24 word your question less trickily! Apr 26 04:26:28 i pushed it to my kindle fire that has ICS Apr 26 04:26:42 and the debug crap was listing off v4 support stuff Apr 26 04:27:03 are you using SherlockFragmentActivity? Apr 26 04:27:12 yes sir Apr 26 04:27:21 that extends from FragmentActivity Apr 26 04:27:26 which exists in android.support.v4.app Apr 26 04:27:39 which is part of the support library Apr 26 04:27:56 right Apr 26 04:28:06 so I should not use SherlockFragmentActivity? Apr 26 04:28:51 well, if you want fragments that work on every API you need to use it Apr 26 04:29:00 but if you're not using fragments you can just use a normal SherlockActivity Apr 26 04:29:06 and I do, at least down to 2.2 that is Apr 26 04:29:16 I am using fragments Apr 26 04:29:25 ABS uses the native action bar Apr 26 04:29:32 the support library does not use native things on HC/ICS+ Apr 26 04:29:49 okay, so some of the features will switch to native, but not all Apr 26 04:29:56 if i'm using SherlockFragmentActivity Apr 26 04:30:20 the action bar will always use native on ICS+ no matter what base activity you are using Apr 26 04:30:28 everything else is either in the platform or in the support library Apr 26 04:30:33 gotcha Apr 26 04:30:55 that'll work fine i think; just wanted to know Apr 26 04:31:04 very nice library btw. thanks for writing it Apr 26 04:34:05 you are welcome, i'm glad you're getting good use out of it Apr 26 04:34:28 and with regard to the support library not using native: it's actually much simpler this way and it ends up doing exactly the same thing Apr 26 04:34:44 part of what makes ABS so complicated is having to shuffle between compatibility and native implementations based on what API level you're on Apr 26 04:35:29 i figured as much Apr 26 04:35:58 in the previous version you did it differently didn't you? Apr 26 04:36:09 and in 4+ you're using the support libraries? Apr 26 04:37:04 the previous version supported Android 1.6 and newer and used the native action bar on Android 3.0+ Apr 26 04:37:14 this version supports 2.1 and newer and uses the native action bar on 4.0+ Apr 26 04:37:23 oh ok Apr 26 04:43:55 they emailed a 30k px square image today at work to everyone detailing new office layouts Apr 26 04:44:02 effectively kills scrolling in Chrome Apr 26 04:44:11 it goes pixel by pixel every 5 seconds or so Apr 26 04:44:30 lol Apr 26 04:44:39 that's genius Apr 26 04:44:44 hi guys Apr 26 04:44:52 bipa de boppa Apr 26 04:45:04 hi Apr 26 04:45:52 i got a problem... if i try to set ?android:attr/listPreferredItemHeightSmall in a xml layout i get a Resource not found error in eclipse Apr 26 04:46:02 it's not public Apr 26 04:46:26 And what does that mean? Apr 26 04:46:58 that you cannot use it Apr 26 04:47:10 it's just a dp value though so just "steal" it Apr 26 04:47:19 fairly certain it's just 48dp Apr 26 04:47:34 ok... thank you, How to steal it? Apr 26 04:47:47 so open values/dimens.xml and add 48dp Apr 26 04:47:49 JakeWharton, is there a way to define your own values in XML to be used as constants and such? in the values/ folder perhaps? Apr 26 04:47:55 ignore my question. you answered it just now Apr 26 04:48:07 and then do @dimen/listPrefferedItemSmall Apr 26 04:48:13 +Height Apr 26 04:48:33 ok... thank you very much Jake Apr 26 04:49:19 JakeWharton, how long have you been coding for android? Apr 26 04:49:28 since 0.9 Apr 26 04:49:45 damn Apr 26 04:50:25 JakeWharton: do you do any iOS dev? Apr 26 04:50:29 I do not Apr 26 04:50:34 never had a Mac until now Apr 26 04:50:42 does it peak your curiosity? Apr 26 04:50:48 not really Apr 26 04:50:53 i've messed around with it Apr 26 04:51:03 there are some good things about ios Apr 26 04:51:15 that I attribute more to obj-c being a subset of c++ Apr 26 04:51:25 theres a lot that is just bullshit Apr 26 04:51:31 yeah like that fact that everything is a freaking layer with which you can do whatever the hell you want Apr 26 04:51:34 a lot of the UI stuff is just masochism Apr 26 04:51:44 im curious because after I get my app through the next 2 release cycles and where I want it to be functionality-wise, I'm thinking to port but not sure if I want to start the time to invest it yet Apr 26 04:52:06 QubeZ - the only real problems I found were Apr 26 04:52:10 Jake: where can i read about get this 48dp for listPreferredItemHeightSmall Apr 26 04:52:18 1) very little boilerplate code, no big class libraries Apr 26 04:52:35 2) overhead in understanding interfacebuilder Apr 26 04:52:43 3) apples bullshit regulations Apr 26 04:52:53 i mean how do you know that this constant has this value Apr 26 04:53:32 Hello, I need help debugging Apr 26 04:53:40 and then? Apr 26 04:53:41 How should I share the source code? Apr 26 04:53:47 LordBeppo, http://developer.android.com/reference/android/R.attr.html Apr 26 04:53:48 ron_frow_: I do enjoy Android quite a bit and want to work to get my app successful, especially with the web service we are building out. It's just so annoying right now at least when people thing the app is cool then ask "Do you have it out for iOS?" Apr 26 04:53:58 EternalMelody: pastebin.com Apr 26 04:54:06 Thanks QubeZ Apr 26 04:54:15 QubeZ is this the gps note thing? Apr 26 04:54:20 or was that someone else Apr 26 04:54:26 ron_frow_: ya Apr 26 04:54:38 I wouldnt think that would be terribly hard to build in ios Apr 26 04:54:42 QubeZ, user probably thinks if you can make it for android 5 minutes later you can put it through the Apple Android App Converter and have it for IOS Apr 26 04:54:49 not trying to minimize your efforts with the android counterpart Apr 26 04:55:02 hesperaux: haha Apr 26 04:55:14 ohdear Apr 26 04:55:25 honestly i could have seen Steve Jobs putting billions into something like that to get back app market share xD Apr 26 04:55:26 LordBeppo: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml#L943 Apr 26 04:55:40 ron_frow_: yea, thats why I'm trying to get the Android version through the next 2 release cycles then it will be featureful enough that I can sit down and start porting it. But still thinking and weighing the options. Apr 26 04:55:47 so if i add a "Close other tabs" option to the browser menu (which I'm done doing). Am I also supposed to translate it into all those languages?!!!?! Apr 26 04:56:00 QubeZ - if you ever decide to do it and have questions, I'd say I've got a pretty good understanding and if you have questions I'm happy to help Apr 26 04:56:12 not soliciting work, but offering help getting started Apr 26 04:56:16 thanks, whats the ios dev channel here on freenode? Apr 26 04:56:26 #iphonedev Apr 26 04:56:26 sorry to get off topic, i'll stop the iOS talk now Apr 26 04:56:36 just prepare yourself =) arrogance is abundance Apr 26 04:56:46 lol Apr 26 04:56:48 * Leeds goes to look Apr 26 04:56:54 its pretty bad Apr 26 04:56:55 ron_frow_: I bet Apr 26 04:56:55 Leeds, temped to myself Apr 26 04:57:06 you say I dont like how this works, can someone point me in the direction of x so i can fix it? Apr 26 04:57:09 i don't know if i want to spoil my good mood with rage Apr 26 04:57:11 Jake: Thank you once again Apr 26 04:57:16 or I could just go and ask how to jailbreak my iPod 5 Apr 26 04:57:29 lol Apr 26 04:57:33 "you must be a android dev it works fine as it is..." Apr 26 04:57:37 something along those lines Apr 26 04:58:07 is there anything like Guice for iOS? Apr 26 04:58:09 is it even needed? Apr 26 04:58:13 HAHAH Apr 26 04:58:21 not as far as I've found Apr 26 04:58:25 I see its need Apr 26 04:58:40 I couldn't imagine doing our apps without Guice Apr 26 04:58:41 but I don tthink its crossed into the apple bubble Apr 26 04:58:53 roboguice or jsut guice Apr 26 04:58:57 just Guice Apr 26 04:58:59 hmm Apr 26 04:59:41 http://pastebin.com/7ZEYmXPd Apr 26 04:59:55 I got NullPointerException Apr 26 05:00:05 JakeWharton, this: http://code.google.com/p/google-guice/ ? Apr 26 05:00:11 Guice? Apr 26 05:00:14 yes Apr 26 05:00:18 never heard of it Apr 26 05:00:23 I'm new Apr 26 05:00:26 right after "DEBUGAAA" Apr 26 05:01:14 EternalMelody, which line? Apr 26 05:01:23 fleend00d: it's dependency injection which inverts the relationship between classes Apr 26 05:01:31 oh nvm Apr 26 05:01:36 EternalMelody: inflater is probably null, try to figure out why Apr 26 05:01:37 105 Apr 26 05:01:37 rather than one class having a hard dependency on another you basically tell the class which other class it will use Apr 26 05:02:18 you can test that its null if you don't believe me. Assert.assertNotNull(inflater); Apr 26 05:02:19 hmmm, I'm considering it's usefulness Apr 26 05:02:20 Ok 1 sec Apr 26 05:02:51 i am guessing it's null because your context is null. might want to throw an assert in on that as well. Apr 26 05:03:00 fleend00d: read this: http://code.google.com/p/google-guice/wiki/Motivation Apr 26 05:03:03 or watch the presentation Apr 26 05:03:07 fyi, take the asserts out after. they are debug only. Apr 26 05:04:04 I am presently reading it Apr 26 05:06:40 the presentation is good too Apr 26 05:06:56 Bob Lee + Jesse Wilson Apr 26 05:06:58 can't go wrong Apr 26 05:08:09 JakeWharton I see usefulness. That could be really nice Apr 26 05:08:42 FYI make sure you grab the no_aop version if you're using it on Android Apr 26 05:09:00 thx Apr 26 05:10:19 apparently inflater is not null Apr 26 05:10:35 EternalMelody: what line is the NPE on Apr 26 05:11:02 105? Apr 26 05:11:12 105 looks fine, so i don't know what it would be otherwise. Apr 26 05:11:24 there is a null as the second param of the inflater, but that's usually fine Apr 26 05:12:05 maybe building clean will fix Apr 26 05:12:34 is there a good set of mock android objects for unit testing code on the jvm? Apr 26 05:12:50 O Apr 26 05:12:56 mt Apr 26 05:13:20 pfn: if you remove 'good' from that sentence, Robolectric Apr 26 05:14:57 hmm, why does the name pivotal labs sound familiar Apr 26 05:15:05 Tracker? Apr 26 05:15:38 romainguy, if someone submits a patch with a new menu item to Android source. Are they also expected to provide translations for that item label? Apr 26 05:15:59 if a button inside a fragment is clicked, will the host activity be responsible for that click first? Apr 26 05:16:13 depends on how you setup the listener Apr 26 05:16:46 the listener for the button is defined in XML using android:onClick="methodHandlerInTheActivity()" Apr 26 05:16:52 Ok readme, building clean prolly, because the exception is gone now.. (I didn't change anything), but I'm getting ClassCastException now, I don't know which line caused it yet, I'll try to figure it out Apr 26 05:17:03 hesperaux: it will look on the context (in this case, the activity) for that method Apr 26 05:17:09 it will never look in or at the fragments Apr 26 05:17:22 good, that's what i thought Apr 26 05:17:56 and yet the handler is either not being executed (unlikely) or it is not passing the event to the fragment (more likely) Apr 26 05:18:33 if the button is within a fragment, it would far more wise to add an on click handler in code which exists solely in the fragment Apr 26 05:18:35 defining listeners in xml is brittle and sucky Apr 26 05:18:37 don't do it Apr 26 05:18:38 that way it's an abstract thing Apr 26 05:18:43 and can be reused Apr 26 05:18:44 ahah. i know why now Apr 26 05:19:03 JakeWharton, that's a good point Apr 26 05:19:06 OK that very same line gave me ClassCastException Apr 26 05:19:18 EternalMelody, you're telling it it's a viewgroup Apr 26 05:19:27 that's what it's referring to Apr 26 05:20:33 what's a better name for the only tab in the list of tabs. lastTab or onlyTab ? Apr 26 05:20:35 JakeWharton, so the way you are suggesting is by getting the fragment's view from the ativity, getting the Button and then calling setOnClickListener() on the button? Apr 26 05:20:35 or loneTab? Apr 26 05:21:06 hesperaux: in onViewCreated inside your fragment call findViewById and set the listener in code Apr 26 05:21:20 oh, that makes sense Apr 26 05:21:52 so the next samsung galaxy smartphone will have quad core Apr 26 05:22:09 g00s, answer my question first >_< Apr 26 05:22:12 i wonder if someone could explain the very strange structure of code that only seems to present when defining callback functions? How can you pass a block of code into a constructor? =S Apr 26 05:22:48 g00s, tegra 3? Apr 26 05:23:03 hesperaux, I did that because it worked here http://pastebin.com/2KxD8VHp Apr 26 05:23:12 hesperaux: probably exynos Apr 26 05:23:18 line 35 Apr 26 05:24:13 apparently the first intel atom used in this android phone is not altogether shabby for a 1st gen product; the arm guys aren't going to be able to sit around Apr 26 05:24:18 EternalMelody, for some reason, i suspect what you are actually getting is not a viewgroup, but a view or something else, which cannot be cast to a ViewGroup Apr 26 05:24:36 okay what the fuck? xserver restarts when I close the emulator! Apr 26 05:24:37 >_< damnit Apr 26 05:24:46 g00s, well that's good. competition ftw Apr 26 05:24:56 Afzal, i find that very interesting Apr 26 05:25:08 hesperaux, I find that incredibly annoying Apr 26 05:25:11 lol Apr 26 05:25:33 sounds like a video driver problem to me Apr 26 05:25:49 the video driver's been the same since January Apr 26 05:25:51 check in dmesg/messages.log? Apr 26 05:26:01 or Xorg.0.log Apr 26 05:26:11 will do Apr 26 05:26:14 i should probably stick to #android-dev though lol Apr 26 05:26:25 hesperaux, you're correct, that solved my problem. Apr 26 05:26:29 where's the channel for android builders Apr 26 05:26:32 Thanks a lot! :) Apr 26 05:26:38 EternalMelody, good to hear Apr 26 05:27:01 readme, thanks to you as well Apr 26 05:27:49 I have a few Fragments that I implemented a constructor that sets data in but after a couple of bug reports I noticed the docs state that fragments require an empty constructor for resuming purposes Apr 26 05:28:16 if a fragment is resumed using an empty constructor.. then it won't have the member variables that have been set right? Apr 26 05:28:29 alright, need some advice. I decided to not go with recurring set alarm and opting for setting one-time alarm. User sets a recurring alarm, I calculate next iteration and set the alarm, once it goes off -- I catch in my receiver then set the next one etc... Any ideas on how to handle a case where user doesn't set the alarm initially? Should I register for notification say at midnight then see if the task is due that day then set ala Apr 26 05:28:58 hi i am an android beginner. I have setup an eclipse project that makes calls to jni using the android ndk. I have the android kernel source compiled separately. What are the steps that i need to take to make the jni method make a system call? Apr 26 05:28:59 preds_ i'm not sure about that. i think android framework automatically saves certain parts of every fragment/activity Apr 26 05:29:25 how can i include the android kernel source in the Android.mk file and how can i enable the jni method to make system calls? Apr 26 05:30:09 preds_, if you overrided the resume method (i forget the name of it right now) to not call super() then you might end up with no restoration of the variables Apr 26 05:32:02 right, I always call super first with those methods, I'm just wondering if I need to put the init stuff in a bundle or something in case of a resume Apr 26 05:33:26 hesperaux, what is the time format in Xorg logs? :/ [118780.101] Apr 26 05:33:47 probably seconds since kernel boot, but that's very strange Apr 26 05:34:00 i never really noticed it before, but i don't think mine uses that format Apr 26 05:34:09 i'd check for you but i'm in windows atm Apr 26 05:35:24 :( Apr 26 05:35:25 there's a seg fault somewhere here. >_< that is sad Apr 26 05:35:25 anyway Apr 26 05:35:25 thanks. I'll just continue what i was doing Apr 26 05:37:37 lol k Apr 26 05:38:35 Hello guys, i am facing trouble with Video Capture on Front facing camera for 2.3 and 4.0 devices. My current code is working alright on 4.0 but does not work on 2.3 o(GingerBread) or 3.2 (Honeycomb) Apr 26 05:38:46 anybody out there faced the same problem before ? Apr 26 05:39:25 i pretty much followed the dev guide on d.android.com for capturing video Apr 26 05:40:40 moreover if someone can lead me to an existing code, that works great on 2.3 and 4.0 platform that would be great. Apr 26 05:41:40 it has been throwing Runtime exception on 2.3 with start failed : -12, don't know how to decode the message. Apr 26 05:42:00 MichealBevan, the cricketer? Apr 26 05:42:35 yeah, named after him. Apr 26 05:42:47 hah, nice! Apr 26 05:43:07 Afzal any idea about my problem ? Apr 26 05:43:24 searching the d.android code Apr 26 05:44:43 used this link http://developer.android.com/guide/topics/media/camera.html Apr 26 05:45:29 "DigiTimes, the tech world's favorite science-fiction magazine, came out today with a report that HTC and Facebook are working together on a customized "Facebook Phone" due out later this year." <-- god help us Apr 26 05:45:44 anybody else faced any similar camera issue ? Apr 26 05:46:11 camera on android is pretty difficult to deal with Apr 26 05:46:25 MichealBevan: are you using the same hw with different os versions, or different hw ? Apr 26 05:46:54 its different hw, but all 2.3 fails to record Apr 26 05:46:59 MichealBevan, are you utilizing Camera.Lock and Camera.Unlock? Apr 26 05:47:03 yes Apr 26 05:47:40 it throws Runtime exception with message start failed : -12 on start method for mediaRecorder Apr 26 05:48:46 Maybe you can try compiling the project with API level 9 (2.3) and see if it works with on GB with the same code Apr 26 05:49:39 it is works then the API has changed for the same call...maybe you'll need two APKs then Apr 26 05:50:44 tried that, does not work great Apr 26 05:51:17 could you pastebin your mediarecorder part? Apr 26 05:51:21 ok Apr 26 05:58:36 http://pastebin.com/2YJKehcQ Apr 26 06:03:19 https://android-review.googlesource.com/#/c/35900/ :D YES! Apr 26 06:03:23 two patches, nice! Apr 26 06:07:20 Afzal, why not one for tablets at the same time? Apr 26 06:07:29 Afzal: any reason you're not looping from getCount() - 1 towards 0 Apr 26 06:07:36 it would save repeated calls to getCount() Apr 26 06:07:41 *getTabCount() Apr 26 06:08:22 and can't you just call getCurrentTab(), clear(), addTab() ? Apr 26 06:08:37 JakeWharton, will that take into account that the size of mTabControl is changing? Apr 26 06:08:47 if you're looping backwards it won't matter Apr 26 06:09:29 hmm..i should try that then Apr 26 06:09:39 saves a few cycles :P Apr 26 06:09:59 it also avoids the awkward index handling Apr 26 06:10:24 hmm. and i'm not sure clear() would work Apr 26 06:10:32 I tried destroy() and that failed Apr 26 06:10:42 i'm not familiar with the API so that was just a shot in the dark Apr 26 06:12:28 MattCatt, because more work, if this feature doesn't get approved then it's just time wasted Apr 26 06:15:32 just rewatched that Guice presentation Apr 26 06:15:37 makes me want to program shit Apr 26 06:16:03 lol i was gonna ask if that was good or bad, then realized what you meant Apr 26 06:17:05 I've never actually done a reverse traversal with an inverted for loop :/ Apr 26 06:17:06 wow Apr 26 06:18:37 it's good for when you are traversing a list and removing things Apr 26 06:18:55 because no matter what you're always moving backwards with the index regardless of whether you removed an item or not Apr 26 06:20:02 makes me want to program shit <-- lol Apr 26 06:20:22 haha Apr 26 06:20:23 i am too Apr 26 06:20:30 i have some AOSP patches that need updating Apr 26 06:20:37 so am I Apr 26 06:20:44 i'm slowly getting the hang of fragments here Apr 26 06:20:55 i did what you said about adding the listener in the fragment Apr 26 06:21:01 i agree with you, it feels much more cohesive Apr 26 06:21:14 and now i can use that fragment in other contexts Apr 26 06:21:19 precisely Apr 26 06:21:47 now i'm on to making a DBCursorAdapter Apr 26 06:22:24 i'm going to make two listview fragments to display database elements...any specific things I should avoid doing? I saw that google IO presentation about listview last week, for a start Apr 26 06:22:49 make sure you're using convertView if it's non-null Apr 26 06:22:59 that is, only create a new view when convertView IS null Apr 26 06:23:02 ah yes, i remember that one Apr 26 06:23:17 so as not to run findviewById() all the time, making my phone sad Apr 26 06:23:33 there's the ViewHolder pattern as well, but that's not always required Apr 26 06:23:44 yeah...i didn't really understand what that meant lol Apr 26 06:24:01 i bet i could use it cuz all of the elements in these lists will be identical in appearance and structure Apr 26 06:24:07 just different values of data for each Apr 26 06:24:21 basically it's a thin class that holds references to all the interesting views you would want to change if the view gets reused Apr 26 06:24:29 this way you avoid calling findViewById every time Apr 26 06:25:13 so you'd still inflate the view if necessary, but you'd never have to call findViewById prior to inflation if you use the ViewHolder? Apr 26 06:25:48 you call it after Apr 26 06:25:55 well, whenever you inflate the view you perform the findViewById lookups and cache them in a ViewHolder Apr 26 06:25:55 and only once per view Apr 26 06:26:08 then you set that ViewHolder as the view's tag Apr 26 06:26:24 that was the part where they lost me, the tag Apr 26 06:26:24 when the view is re-used, you call getTag() and then have a reference to all the views you'd ever want to change Apr 26 06:26:41 it's easier to see in practice than describe Apr 26 06:27:20 hello. I have a question. Apr 26 06:27:22 so there's a structure in the View objects within the list called a tag, which holds static references to XML view references? Apr 26 06:27:40 bastiaclly Apr 26 06:27:42 hesperaux here's the template i use https://gist.github.com/442665057be1d030c567 Apr 26 06:27:45 except they're not static references Apr 26 06:27:52 I have a BaseAdapter implementation that uses a AyncTaskLoader to load some data Apr 26 06:27:57 everything looks fine Apr 26 06:28:09 JakeWharton, is there anything going on under the hood with this? Apr 26 06:28:18 nope Apr 26 06:28:21 xorgate, thanks, checking it out Apr 26 06:28:23 just simple caching of slow calls Apr 26 06:28:31 except when notifyDataSetChanged() is called by onLoadFinished, my listview isn't updating Apr 26 06:29:53 does anyone know if onLoadFinished gets called on the ui thread ? Apr 26 06:30:24 i'd imagine that mechanism is similar to AsyncTask no? Apr 26 06:30:33 thanks guys, i'm gonna call it a night and pick this up tomorrow. you've been very instructive! Apr 26 06:32:14 hesperaux: http://codr.cc/287d3a/java Apr 26 06:32:23 that's about what I do Apr 26 06:32:53 JakeWharton, thanks. I'll leave it open for tomorrow. =) Apr 26 06:33:01 poo i know how I can optimize that too Apr 26 06:33:04 *ooo Apr 26 06:33:05 not poo Apr 26 06:33:08 lol Apr 26 06:33:29 beef, this is a live code editor? Apr 26 06:35:03 yes Apr 26 06:35:04 this website is awesome Apr 26 06:35:18 * hesperaux bookmarks Apr 26 06:35:44 JakeWharton, you're on UK time, right? Apr 26 06:36:12 california Apr 26 06:36:23 :O Apr 26 06:36:32 you're not british? Apr 26 06:36:48 haha no Apr 26 06:37:00 lol Apr 26 06:37:01 interesting. i'm dumb Apr 26 06:37:09 lol Apr 26 06:37:16 well that's good because i'm on CDT Apr 26 06:37:21 what's that Apr 26 06:37:26 central daylight time Apr 26 06:37:30 it's CST but with daylight adjust Apr 26 06:37:35 right Apr 26 06:37:42 in other words, it's 1:30AM Apr 26 06:37:48 i'm on GMT+2 or something Apr 26 06:37:58 ok, so you're 9 hours ahead of me i believe Apr 26 06:38:05 unless i'm thinking arizona time again (used to live there) Apr 26 06:38:14 it's 8.38 Apr 26 06:38:16 i think AZ might be GMT-7 Apr 26 06:38:17 so 7 hours Apr 26 06:38:27 yeah so here it's GMT-5 Apr 26 06:38:31 hi i am trying to run an android app over qemu. i have made a jni call using ndk, it works on the emulator in eclipse, but doesnt work with my system.img in qemu Apr 26 06:38:37 where could i be going wrong? Apr 26 06:38:43 alright, well off to bed I go Apr 26 06:38:48 you should Apr 26 06:38:51 i just started work Apr 26 06:38:55 class at 9am D: Apr 26 06:39:19 * hesperaux sleeps Apr 26 07:05:08 hello Apr 26 07:05:22 anyone around? Apr 26 07:06:00 hello? Apr 26 07:07:55 hi i just want to make sure my nick is ok.. can anyone see me talking? Apr 26 07:08:02 noslen_ramingo: yes :) Apr 26 07:08:04 gello Apr 26 07:08:06 *h Apr 26 07:08:18 hi, thanks Apr 26 07:08:44 hihihihihihihihihihi Apr 26 07:11:07 JakeWharton, https://android-review.googlesource.com/#/c/35900/ better? :) Apr 26 07:11:50 oh man, wrong comment >_< Apr 26 07:26:29 if i enable wifi from an alarm when phone is asleep, the phone doesn't attempt to connect to any wifi network until i switch it on (at least that's what i've observed). is there a way to let wifi try to connect even when the phone is asleep? Apr 26 07:27:55 i've tried wifi locks and so on but it doesn't seem to help. also searching on google/stackoverflow/etc. haven't really brought up a solution to this Apr 26 07:28:27 wreiner: after the alarm goes off, does the phone not just go back to sleep? maybe you need to put a wake lock around your wifi enable code. Apr 26 07:28:41 i'm not sure if enabling wifi should keep the phone up, or not Apr 26 07:29:02 as i said i've tried wifi lock Apr 26 07:29:12 is there some other lock i should use?! Apr 26 07:29:34 might as well try them all Apr 26 07:29:45 i've tried WIFI_MODE_FULL Apr 26 07:30:18 try FULL_WAKE_LOCK then work your way down from there. Apr 26 07:30:39 Hi Apr 26 07:30:58 readme: oh that's something to throw at google - thank you :) Apr 26 07:31:10 http://developer.android.com/reference/android/os/PowerManager.html Apr 26 07:31:31 i'm not saying what you're doing shouldn't work, but desperate times call for desperate measures. Apr 26 07:32:08 you might also try firing off your enable wifi code a few seconds later than the alarm fires Apr 26 07:33:23 maybe an idea too. i'll check it. thanks once more :) Apr 26 07:34:58 I am trying to extends ExpandableListView. I need to override the 'drawDivider' method because it's really annoying me that I can't change the dividerheight for children (it's always the same as the divider between parents). But Google put no modifier before that drawDivider method so I can't override it. That seems pretty strange to me. I just want to write my own (custom) component, which is only slightly different to Expandab Apr 26 07:41:16 I need to put an image into the layout by giving it fill_parent as width, max width should be the same as the result of "fill_parent" for width, so: max is square image, the image will be placed inside that square spot but keeping the aspect ration (i don't know how the image will be until I download it). Is there a way to do that by layout? Apr 26 08:02:48 mastroWork: ImageView won't scale your image, it will just center it Apr 26 08:02:56 you have to tell it to scale Apr 26 08:12:41 Hello, everyone! anybody wanna join my game project? It really attractive offer, the game is about to be released) Apr 26 08:12:51 i'm working on a calendar app and would like to add swipe views for week and day. i overwrote my gesturelistener for scrollview. but are there any experiences for values i put in my onFling() to make a smooth and user-controllable swipe? Apr 26 08:14:10 Do u use horisontalScrollView? Apr 26 08:15:12 no i overwrote standard ScrollView and overwrote onInterceptTouchEvent Apr 26 08:16:00 and then i made listener that extends SimpleOnGestureListener and overwrote onFling Apr 26 08:16:24 and tried with velocityX > 1000 or < -1000 Apr 26 08:16:27 that works Apr 26 08:16:34 but Apr 26 08:16:42 it doesnt feel 'good' Apr 26 08:17:23 Do u want to scroll from one month to another occuppy all the screen? Apr 26 08:17:50 * and occupy Apr 26 08:17:51 yeah. i got an layout and rewrite the data with onfling Apr 26 08:18:14 U can use gallery even so Apr 26 08:18:32 o.o Apr 26 08:18:47 dude Apr 26 08:18:50 just use a ViewPager Apr 26 08:19:54 ah damnit its in the support package right? :( Apr 26 08:19:58 yes Apr 26 08:20:00 Or u can use "snap", just like this http://blog.velir.com/index.php/2010/11/17/android-snapping-horizontal-scroll/ Apr 26 08:20:04 and it's the IDEAL tool :) Apr 26 08:20:08 readme, this doesn't result to me... it does not scale the Bitmap, but it zoom out to fit the bitmap into the imageview Apr 26 08:20:20 mastroWork: that is what i said Apr 26 08:20:23 I said "image view does not scale" Apr 26 08:20:31 you need to tell it to scale. yourself. Apr 26 08:21:14 readme, I don't need scaling, I already have that.. I need a way to tell: I want the imageview to be *at most* square with width "match_parent" Apr 26 08:21:25 oh, I see Apr 26 08:21:36 so you want it to take up a maximum of max parent, but take as little as possible Apr 26 08:21:46 use wrap_content and center it then Apr 26 08:22:08 readme, not really... I need to fix width and let the height adapt to be square Apr 26 08:22:11 you can put it inside a FrameLayout with layout_gravity="center" most likely Apr 26 08:22:13 thx for the ideas :) Apr 26 08:22:26 or even a relative layout with layout_alignParentCenter Apr 26 08:22:33 and simply use wrap_content on it Apr 26 08:23:00 readme, I implemented a lazy image loader that compute the imageview size at runtime and scale the bitmap to the required size. Issue with that is that the image view must already be of the size for the image Apr 26 08:23:13 readme, which means: wrap_content doesn't work Apr 26 08:23:14 no, it doesn't have to be the size of the image Apr 26 08:23:18 no, wrap content will work Apr 26 08:23:26 if you want me to help try my suggestions, otherwise good luck Apr 26 08:23:31 Sfiku, Np, if u need i can send u "snap" style decision Apr 26 08:23:54 morning! Apr 26 08:24:08 vietnam!!!!!!!! Apr 26 08:24:16 Defuera thank you i'll try on my own, if it wont work i'll be back! :) Apr 26 08:24:39 readme, it's not that I don't want your help, I'm trying to explain to you I have a lazy image loader that work like that... the imageview with wrap_content change it's size when you set an image to it... but I need to know the size BEFORE setting an image to it... so wrap_content will NOT work for me Apr 26 08:24:52 mastroWork: i've written this exact thing before and actually have the code to do it on my hard drive Apr 26 08:24:57 readme: how's it going? Apr 26 08:25:10 readme, can you share it? Apr 26 08:25:15 swamped Apr 26 08:25:24 mastroWork: hmmmmm, ok Apr 26 08:25:33 readme, if you don't mind, thanks Apr 26 08:28:16 http://pastebin.com/N64MHxmT Apr 26 08:28:18 here's how I did the layout Apr 26 08:28:40 not sharing the rest of the code, because it was pretty hard work and I don't feel very charitable right now. Apr 26 08:28:41 readme, let me see Apr 26 08:28:59 Where should i look for people interested in joining game-project? Apr 26 08:29:13 there's loads of game forums Apr 26 08:29:24 there's a subreddit as well Apr 26 08:29:30 mastroWork: that layout is meant to be an element in a GridView. Apr 26 08:29:34 also, gamejams are a good way to meet people Apr 26 08:29:35 readme, ah.. ok but you fixed both width and height to a specific value... I need layout_width="match_parent" and layout_height="same_as_width" Apr 26 08:29:37 but it should work in a ListView as well Apr 26 08:29:46 mastroWork: that's what wrap_content does! Apr 26 08:29:47 Defuera: if you're in the UK, there's a big gamejam this weekend Apr 26 08:29:58 readme, and I can't use wrap content as I told you before :P Apr 26 08:30:02 and why is that? Apr 26 08:30:25 Im from Russia -) Apr 26 08:30:58 because you don't know the size of the image in advance? Apr 26 08:31:46 Ok, RobinB, thank you) Apr 26 08:31:55 readme, because my collegue developed an Image lazy loader that 1) download the image in background, 2) cache it on disk, 3) see the imageView *current* width / height 4) decode the image with a subsampling to match that width/height 5) set the decoded bitmap to the imageview Apr 26 08:32:17 readme, if you follow that you see that at 3), if setting wrap_content, your height will be 1 pixel Apr 26 08:32:27 mastroWork: that's a really complicated explanation of a simple thing Apr 26 08:32:39 readme, it's not a simple thing Apr 26 08:32:40 lets pretend we have instead a "black box" of different sized images Apr 26 08:32:51 mastroWork: i don't need to know how the black box works, really. Apr 26 08:33:01 I only need to know the possible domain of images that you will attempt to display Apr 26 08:33:17 Hey, does anyone know if theres a way to set a layout's background to a certain color which is a reference attribute in XML? I am trying to do it like is described in this tutorial: <> but I always get the following error: < ...path): TypedValue{t=0x2/d=0x7f010002 a=-1}>>. Any thoughts? Apr 26 08:33:54 mastroWork: you know you can measure the size of the container of your imageview, getMeasuredWidth() Apr 26 08:33:57 getWidth() Apr 26 08:34:03 they work after onMeasure is called, only. Apr 26 08:34:10 you could use those values to set a max width on the ImageView Apr 26 08:34:12 if you must Apr 26 08:34:23 anyway I don't have all day to discuss this, so I hope that you are able to solve your problem. Good luck. Apr 26 08:36:43 technically getWidth() works after the first call to onDraw. Apr 26 08:39:16 readme, don't act like I'm a moron please... I really know my way around android :) and I know that's a design mistake on the library, but I have that and I have no time now to write a new images lazy loader that download+cache+scale-decode now.. so I was trying to find a way to avoid wrap_content BUT forcing the ImageView to use the height so that it's aspect ratio would make it square, looking for ideas here :) Apr 26 08:40:40 readme, and you told it anyway: getWidth() works after the first call to onDraw, exactly... and if you set wrap_content and you DON'T have an image yet (is being downloaded) the width() will return 1 px if you set wrap_content. Apr 26 08:40:46 it has no content Apr 26 08:41:18 readme, anyway thanks for your time Apr 26 08:49:37 mastroWork: when did I act like you were a moron? Apr 26 08:49:42 I'm actually just a very busy person. Apr 26 08:49:58 who happens to not entirely agree with you. It doesn't mean I think you're stupid. Apr 26 08:50:26 I was in your same position yesterday, in another channel, and I got *banned* for it. Apr 26 08:50:28 or if no one is sure how to solve the above issue any way I can use style theme dependent color constants will work. Apr 26 08:51:35 mastroWork: anyway, to get getWidth to work, create a custom view and override on draw, then create a hook that gets called after the first onDraw, and do your work in ther. voila. Apr 26 08:52:23 but really, this is a *real* lot of work when you could be using wrap_content if you changed the domain of possible images you're generating. Apr 26 08:54:09 readme, is there a performance hit using wrap_content instead of a fixed width? Apr 26 08:54:27 readme, I would need a way to make the imageview compute it's width/height "as if" I set it an image of the dimension of the images I have _before_ decoding it Apr 26 08:54:29 Afzal: I don't even know if every view implements that the same way Apr 26 08:54:40 ah okay Apr 26 08:55:05 mastroWork: you need to set the width & height of the ImageView, before the image is decoded? Apr 26 08:55:39 readme, well.. I would need to create a custom drawable with empty bitmap but same size as my bitmap, pass it to the view, wait it compute its new size and set the actual bitmap... Apr 26 08:55:56 that's lot of work :) but probably using a custom drawable I could be able to achieve that Apr 26 08:56:08 readme, yes Apr 26 08:56:09 I dont understand why the empty bitmap? Apr 26 08:56:37 as a way of causing the view to behave the way you want? Apr 26 08:57:22 readme, when you decode a big bitmap the decoding will fail if you use too much memory... so you need to decode with a sampling rate that reduce the decoded bitmap size, and the best way is to make your decoded bitmap fit the size it will use in the view... Apr 26 08:57:44 readme, but the view will not compute the size until you set the image to it... loop Apr 26 08:58:31 i like your drawable idea Apr 26 08:58:33 readme, things like that happens when you have a customer which provide you with too big images from their services Apr 26 08:58:55 so the drawable would be for example, a generated placeholder that is the size of the image that will be loaded after it is decoded Apr 26 08:59:04 readme, and you don't know the aspect ratio of those images before downloading them :) Apr 26 08:59:07 maybe it's a picture frame Apr 26 08:59:21 mastroWork: i find it unfortunate that you have to do the image processing on the device at all Apr 26 08:59:32 readme, yes something like that... and when you know the size you actually decode the image and set it Apr 26 09:00:04 better get cracking then Apr 26 09:00:17 readme, yes it sucks.. but it happen all the time when you are receiving images from a remote service on which you have no control Apr 26 09:02:49 Can you guys not see my text or are you just not sure about the above problem? Just wanna make sure I'm not talking to nothing. Apr 26 09:04:18 Chipmonkpyro: just bad timing. also most people in the US are asleep still which make up for a lot of people who come here, including googlers Apr 26 09:05:02 oh ok, just wanted to make sure I wasn't blocked somehow or something Apr 26 09:06:37 do you have any ideas as to what I can do to solve the problem? I just want to have certain color constants which are different depending on what the application's theme is. Apr 26 09:06:51 oh Apr 26 09:07:18 you've defined them in R.color, right? Apr 26 09:07:38 Chipmonkpyro, library projects, it's in my todo list, never tried sorry Apr 26 09:07:49 library projects are easier than you would think Apr 26 09:07:54 well if they're defined in R.color doesnt that mean they are always constant? Apr 26 09:08:00 you just right click a regular project and select library in the project properties Apr 26 09:08:12 right click another project in the same work space, and go to android, select the library to include it Apr 26 09:08:18 at least in eclipse, it's dead simple. Apr 26 09:08:20 Chipmonkpyro, anyway I suspect you should give some kind of namespace to reference a library drawable from your project layout Apr 26 09:08:49 Chipmonkpyro: yes, it does. Apr 26 09:08:51 Chipmonkpyro, like with @android.drawable..... Apr 26 09:09:01 how does one define resources within a namespace? Apr 26 09:09:11 xmlns in the root element? Apr 26 09:09:15 readme, would love to know :) Apr 26 09:09:27 I wonder if that can be done in a project, or only if you are developing the framework. Apr 26 09:09:40 next best thing is a pseudo namespace Apr 26 09:09:51 R.color.foo_light_blue, R.color.bar_light_blue Apr 26 09:10:06 i dont think thats quite what i mean though Apr 26 09:10:23 yeah, you want to have R.color.blue be red in one theme, and green in another? Apr 26 09:10:30 I don't know if that's going to work. Apr 26 09:10:38 like say you have R.color.light_color, and when you have the blue style set for your theme light_color will be light blue, etc Apr 26 09:10:45 ah Apr 26 09:11:02 or something that achieves the same result Apr 26 09:11:12 my guess is that you cannot do that. Apr 26 09:11:53 I think the reason is that the constants in R.color are supposed to define concrete colors, not abstract ones Apr 26 09:12:12 im not necessarily saying i need to use R.color to do it though Apr 26 09:12:22 do you want to do it from XML? Apr 26 09:12:54 the way I tried almost works, I set , then each style defines #444444 in a different way Apr 26 09:14:06 and you can then get that value using ?attr/darkColor, but the issue is you can only use that value to reassign other attributes, and not to define say a certain layout's background color Apr 26 09:14:25 Hi! I have a webview connecting to a website which requires basic authentication. How to show the login dialog? Apr 26 09:14:48 Chipmonkpyro, I'd try like this: xmlns:my="http://schemas.android.com/apk/res/my.r.package.here" Apr 26 09:15:02 Chipmonkpyro, then @my:drawable/... Apr 26 09:15:33 whats the end result of that though? Apr 26 09:15:41 Chipmonkpyro, also, stupid question maybe, did you tried cleaning both project and library project? Apr 26 09:15:48 yes Apr 26 09:15:51 Chipmonkpyro, was that for me? Apr 26 09:15:52 and its only one project Apr 26 09:16:11 mastroWork: yes, those were both for you Apr 26 09:17:01 mastroWork: I think your misunderstanding the requirement, its simply to have multiple application wide styles, sort of like a set of 5 colors that change depending on what the application style is Apr 26 09:17:39 mastroWork: It really doesn't matter to me how its done as long as it stays inside the project. Apr 26 09:17:55 Chipmonkpyro, you define a namespace for your R, suppose your library project has com.chipmonkpy.ro.R, you define in your layout, at the top, xmlns:chip="http://schemas.android.com/apk/res/com.chipmonkpy.ro" ... then where you need to reference your drawable you do: @chip:drawable/name_of_the_drawable_in_the_library_project Apr 26 09:18:40 ok, so that drawable can be a variable color for example? Apr 26 09:19:00 Chipmonkpyro, you were linking a tutorial about library project and error < Chipmonkpyro, I don't see why not Apr 26 09:20:27 mastroWork: The error was caused because I was using a color attribute where it was expecting a drawable object i believe Apr 26 09:21:01 Chipmonkpyro, the other way is to define themes for your app Apr 26 09:21:13 mastroWork: how do I use this namespace in a resources file? Apr 26 09:21:17 mastroWork: Thats what I'm trying to do Apr 26 09:21:24 mastroWork: i'm trying to test your theory here. Apr 26 09:21:37 the element doesn't even have an xmlns:android namespace Apr 26 09:21:53 should I be defining drawable instead Apr 26 09:21:59 Chipmonkpyro, well.. defining a them is a matter of creating a resource values file with attribute like: Apr 26 09:22:02 I'm trying to define themes where each theme has a different definition for one color which I can reference inside XML Apr 26 09:22:17 He's already got themes done mastroWork Apr 26 09:22:29 Chipmonkpyro, inside that you write something like: @style/MyThemeHeaderBarNotificationStyle Apr 26 09:22:37 essentially what he wants is R.color.foo to be able to have a different value conditional on which theme he uses. Apr 26 09:22:43 which is impossible, I think. Apr 26 09:22:48 Chipmonkpyro, you then have to define the style MyThemeHeaderBarNotificationStyle as usually Apr 26 09:22:48 mastroWork: Thats what I did: http://pastebin.com/kP3AMnqu Apr 26 09:23:09 readme, that's not possible but it can achieve it Apr 26 09:23:15 by using themes Apr 26 09:23:20 mastroWork: he's already using themes Apr 26 09:23:21 he wants more Apr 26 09:23:31 Chipmonkpyro, you are not defining the parent correctly Apr 26 09:23:38 Chipmonkpyro, parent="android:Theme" Apr 26 09:23:49 no, it's . Apr 26 09:24:14 take a look at the docs :) Apr 26 09:24:43 this is a wild goose chase, fyi guys Apr 26 09:25:04 I'm surprised its this hard lol Apr 26 09:25:04 readme, hum.. if you are absolutely sure that's correct than, the next step would be to associate the theme to your application Apr 26 09:25:22 readme, and the only way to change theme is programmatically Apr 26 09:25:27 ups.. Apr 26 09:25:27 the theme is associated with the application Apr 26 09:25:28 Chipmonkpyro, Apr 26 09:25:36 readme, those were for Chipmonkpyro Apr 26 09:25:46 mastroWork: I think what he wants: is for different themes, to have different values, for the same resources. Apr 26 09:25:56 lets just chalk it up to not happening. Apr 26 09:25:58 readme, which is what themes are for Apr 26 09:25:58 readme: exactly Apr 26 09:26:03 mastroWork: i agree Apr 26 09:26:06 he should use themes for this Apr 26 09:26:11 instead of trying to debauch resources. Apr 26 09:26:29 Chipmonkpyro, can you link the documentation that tells your paste is right? Apr 26 09:26:36 because it doesn't look right to me Apr 26 09:26:56 Chipmonkpyro: perhaps what you need is a good search and replace tool. Apr 26 09:27:03 and a pseudo namespace for your colors Apr 26 09:27:33 eclipse has a search and replace, but I usually copy paste stuff into vim if I'm going to do any serious search/replace. Apr 26 09:28:11 readme: Ok I know the style is getting assigned as the application theme properly, I just dont know how to reference those colors inside the project Apr 26 09:28:21 Chipmonkpyro, according to this: http://developer.android.com/guide/topics/ui/themes.html you are doing it wrong Apr 26 09:28:29 Chipmonkpyro: context.getResources() Apr 26 09:28:33 yes, you are *doing it wrong* Apr 26 09:28:39 2v1 Apr 26 09:28:45 Chipmonkpyro, I'm telling you it doesn't work like that Apr 26 09:28:59 Chipmonkpyro, use parent="android:Theme" Apr 26 09:29:02 THEN Apr 26 09:29:31 readme: I'm not saying you guys are wrong, I've been adding everything you tell me in :) Apr 26 09:29:45 Chipmonkpyro: oh Apr 26 09:29:47 define styles for you need Apr 26 09:29:56 readme: I just want to get the damn thing working lol Apr 26 09:30:08 and map different styles on themes Apr 26 09:30:16 Chipmonkpyro: basically it is the job of the theme to provide different values for attributes, not the job of the resources. Apr 26 09:31:08 * readme has had enough of the X-Y problem for the past 2 days. Apr 26 09:31:12 like: ThemeBlue -> BlueTitle, ThemeRed -> RedTitle... inside layout you use style "Title" and ThemeBlue map Title to BlueTitle Apr 26 09:31:51 like this? http://pastebin.com/t5Ep3yPU Apr 26 09:32:05 yes Apr 26 09:32:18 so how do i reference those colors now? Apr 26 09:32:28 Chipmonkpyro: the colors do not change. ever. Apr 26 09:32:47 just accept it. R.color.blue will always be blue if you define it to be blue. you can't make it blue in one theme, and red in another. Apr 26 09:33:06 Chipmonkpyro, hum... I don't think it will work you need to map styles, not colors Apr 26 09:33:22 anyone can have a look on this http://pastebin.com/EgcUHL6T i m trying to do a gallery test which fails, i m unable to find the solution Apr 26 09:33:34 the R.color constants should be named after what they are, rather than what their purpose is Apr 26 09:33:39 see the problem is I dont want to just map say the default color of text in the style Apr 26 09:33:44 R.color.magenta not R.color.titlebar_color Apr 26 09:35:02 so theres no way to fufill that basic requirement in android? Apr 26 09:36:34 Chipmonkpyro, look at this: http://pastebin.com/7pzjZY83 Apr 26 09:36:56 Chipmonkpyro, you map STYLES not resources Apr 26 09:37:07 anyone can have a look on this http://pastebin.com/EgcUHL6T i m trying to do a gallery test which fails, i m unable to find the solution Apr 26 09:37:42 oh i see Apr 26 09:37:53 I was just one level of indirection off? Apr 26 09:38:16 yes Apr 26 09:38:35 Chipmonkpyro, can you have a look on this http://pastebin.com/EgcUHL6T i m trying to do a gallery test which fails, i m unable to find the solution Apr 26 09:38:38 just let R.color.blue be the same shade of blue Apr 26 09:38:53 himansudas, repeating it in 3 minutes will probably make you ignored, anyway your issue is not android is java/programming skills... you have a null pointer, the most easiest exception to fix Apr 26 09:38:55 use R.color.light_blue, and R.color.dark_blue Apr 26 09:39:01 for your dark and light themes Apr 26 09:39:10 yes, you need to define them Apr 26 09:39:17 how would I reference darkColor in my application though? Apr 26 09:39:22 himansudas, look at the stack trace going back from com.android.gallery3d.data.DataManager to the null value, go in debug if necessary Apr 26 09:39:25 in the program code? Apr 26 09:39:26 or XML Apr 26 09:39:28 XML Apr 26 09:39:34 @color/blue, probably Apr 26 09:39:53 that defeats the entire purpose though... Apr 26 09:40:05 no it doesn't. the *purpose* is to define an alias for a color Apr 26 09:40:17 Chipmonkpyro, again, you don't reference R.color, you reference the style.. from your layout you set the style, the style will know which color to use Apr 26 09:40:18 it's not to define an abstract color that changes depending on where you use it. Apr 26 09:40:59 but how will it know where to use it? Apr 26 09:40:59 if I had two identical blue balls, would they be different shades of blue if one was in australia, and one was in mexico? Apr 26 09:41:06 with the theme Apr 26 09:41:11 this is what themes are for Apr 26 09:41:28 (no pun intended) Apr 26 09:41:39 no im saying im in mexico, and i want the funcolor to be red during siesta, and blue during dinner Apr 26 09:41:49 Chipmonkpyro: lets frame it a different way Apr 26 09:41:56 Chipmonkpyro: if you had a string @string/hello Apr 26 09:42:13 would you expect it, to say "goodbye" if you used it in another layout? Apr 26 09:42:24 the resources are for defining _constants_ not _variables_ Apr 26 09:42:36 how can I have variables in pure XML then? Apr 26 09:43:08 i'm sure I could think of a way if I wanted to, but the short answer is you don't. Apr 26 09:43:25 as an some XML value which gets rendered to one color when the program is in one state, or a different one when its in another Apr 26 09:44:02 Chipmonkpyro: these decisions are really not for app developers to make. They have already been made by the framework developers and we must live with them and use them. Apr 26 09:44:02 mastroWork, i m not getting how do i rectify this error "at com.android.gallery3d.data.DataManager.(DataManager.java:104)" Apr 26 09:44:17 that's not an error, that's a line number Apr 26 09:44:23 Chipmonkpyro: seems like a very basic requirement though... Apr 26 09:44:26 if you think that you have a better idea Apr 26 09:44:28 lol woops Apr 26 09:44:31 Chipmonkpyro: XML is not meant for that Apr 26 09:44:32 then submit a patch Apr 26 09:44:36 Chipmonkpyro: that's why you have code Apr 26 09:45:06 Chipmonkpyro: what you can do is of course define 2 color constants Apr 26 09:45:11 and switch between them in code Apr 26 09:45:13 yes, shouldnt styleistic aspects be kept out of the code though? Apr 26 09:45:19 they are Apr 26 09:45:35 ie, you set siesta_color, dinner_color Apr 26 09:45:36 mastroWork, this is the method at line 104 pastebin.com/3mztcYpqa Apr 26 09:45:37 thats fine, i just want to be able to do it ellegantly Apr 26 09:45:41 your problem is already solved by Themes Apr 26 09:45:44 do it by using them Apr 26 09:45:47 not 0xFFFFFF, 0xAAAAAAA Apr 26 09:46:31 but what you want to do is define program logic in XML, that's not done Apr 26 09:47:02 i just want to define certain markers for where a certain color group needs to be rendered in XML Apr 26 09:47:03 announcing cold fusion for android Apr 26 09:47:28 Chipmonkpyro: that's, as readme said, a theme Apr 26 09:47:44 you switch between themes in code, and everything should work Apr 26 09:48:02 himansudas, I'm not going to help you solve a null pointer Apr 26 09:48:32 heres a good way to think of it Apr 26 09:48:45 himansudas: that link was dead. Apr 26 09:48:52 you know how you can define a style in two different ways in two different themes? Apr 26 09:49:27 Chipmonkpyro: you can inherit Apr 26 09:49:35 and then assign that one style to a layout element? Apr 26 09:49:41 using the parent attribute. Apr 26 09:49:53 why cant you do that same thing except replaceing the word style with color Apr 26 09:50:27 Chipmonkpyro: we already told you. Please stop wasting time and get your work done by accepting the inevitable reality of the framework. Apr 26 09:50:42 accept your fate Apr 26 09:50:49 we literally told you this, several times. just save the log and read it later when you are more clear headed Apr 26 09:51:10 fair enough Apr 26 09:51:20 it just seems like there should be a way Apr 26 09:51:48 just because it's possible, doesn't mean it's a good idea Apr 26 09:51:59 and that is why, there is no implemented way to do this in android. Apr 26 09:52:21 LOL :D , NULL Pointer :( why did i got a null pointer exception at least make me realize it ?? Apr 26 09:52:44 ((( Apr 26 09:52:59 storkme: OFF TOPIC, #lisp is that way -> Apr 26 09:54:08 ok no moar time wasting for me Apr 26 09:55:22 mastroWork, asked a guy and he says me "null things is pass so .. you can get that error" :D LOL, thats really crazy :D :D Apr 26 09:58:28 himansudas, it's not crazy, it's basic programming skill Apr 26 09:59:16 mastroWork, at line 104 i have mDefaultMainHandler = new Handler(application.getMainLooper()); Apr 26 09:59:29 and i m getting a null pointer exception over here Apr 26 09:59:51 himansudas, isn't it obvious that "main looper" is null? Apr 26 10:00:03 himansudas, find out why it is and you solved the issue Apr 26 10:00:26 i'm wondering , if I allocate memory using PMEM in Android , would i be able to access it in chrooted ubuntu? Apr 26 10:00:34 mastroWork, okay checking line by line Apr 26 10:48:00 hi all Apr 26 10:49:06 I found something strange : the theme of my app @android:style/Theme.NoTitleBar changes on the screen orientation change Apr 26 10:49:37 it starts with ICS then on the first orientation change it switches to the 2.* theme Apr 26 10:50:13 * hoangtran will folk ksoap2-android and make it work with HttpClient Apr 26 11:32:16 <[SSP]Bojmaliev> hello Apr 26 11:33:08 any articles on methods of optimizing admob for the app etc? I'm not content with the results I'm seeing regarding clicks per impression.. :\ Apr 26 11:33:35 <[SSP]Bojmaliev> i want ask you something, who can help me :) Apr 26 11:34:02 [SSP]Bojmaliev: there's over 600 in here, state your question and someone will come along shortly Apr 26 11:34:45 over 600??? Apr 26 11:34:47 <[SSP]Bojmaliev> but my question is not small, if anyone tell me ask me , i will ask him in PM, or i should ask it on forums ? Apr 26 11:34:58 pastebin Apr 26 11:35:07 <[SSP]Bojmaliev> ok :) wait Apr 26 11:38:05 [SSP]Bojmaliev: IRC is a many-to-many chat, don't do PMs :) Apr 26 11:38:10 Ravenheart: 661 currently. Apr 26 11:38:56 <[SSP]Bojmaliev> http://pastebin.com/V6sb4tZs Apr 26 11:39:07 <[SSP]Bojmaliev> thats my problem , thanks :) Apr 26 11:40:14 Hm that's not really a development question. Apr 26 11:40:37 <[SSP]Bojmaliev> ah i joined android-dev , sorry Apr 26 12:02:51 hey Apr 26 12:03:20 I noticed that when I upload images to my apps external dir they get automagically used by mediaprovider and various photo and gallery apps Apr 26 12:03:36 is there a way to prevent this? I upload often quite a lot of them and it just slows the phone down Apr 26 12:04:23 Almindor: http://www.addictivetips.com/mobile/how-to-prevent-a-directory-from-being-scanned-by-android-gallery/ Apr 26 12:04:34 HDroid, thanks Apr 26 12:20:25 How can I run an activity inside another activity? I'm on api-10 Apr 26 12:21:27 napster: you can startActivity your activity from your activity. Apr 26 12:22:25 Ge0rG: not sure what you mean! I want to show an activity inside a layout in the parent activity and I cannot use fragments. Apr 26 12:23:36 napster: I am not sure it is even possible to embed an activity into another one. I think the tabactivity stuff used to have some workaround, maybe it would help Apr 26 12:24:12 yeah I'm looking for how tabhost does this. Someone would be able to help me around this. Apr 26 12:25:34 why can't you use fragments? Apr 26 12:28:00 you can also "include" one layout in another, if you need to share a part of a layout between two screens Apr 26 12:41:14 wongk: Not exactly layouts Apr 26 12:41:35 Is fragments available on api-10 wongk ? Apr 26 12:41:54 yes, with the support library Apr 26 12:42:10 it's available on 4+ Apr 26 12:42:18 wongk: ah these compatibility things looks pretty hackery Apr 26 12:42:34 so I don't use actionbar, fragments etc Apr 26 12:42:48 Just plain old android Apr 26 12:45:22 napster: well that's your decision, but you're just making it harder on yourself Apr 26 12:46:06 "i need exactly what fragments accomplish, but i won't use fragments, because i don't like them" Apr 26 12:54:10 lol wongk :D Apr 26 12:56:59 Let's go to the mall Apr 26 12:57:01 Today Apr 26 12:58:29 busy today Apr 26 12:58:31 how bout tomorrow! Apr 26 12:59:03 * wongk thinks of "how i met your mother" Apr 26 13:00:52 canadiancow: Yes! Yes! Apr 26 13:01:33 * n20 thinks canadiancow aughta know what wongk is thinking of. Apr 26 13:17:43 I need an example that uses an image map Apr 26 13:17:55 i have an image i want to use for multiple buttons Apr 26 13:20:13 What's up dudes Apr 26 13:21:53 is it possible? Apr 26 13:28:44 well, I guess everyone's asleep or they don't know Apr 26 13:29:24 WindowsNT, if only google codesearch still existed Apr 26 13:32:20 why might arguments to native methods get corrupted? My problem: an integer(1000) that I'm passing is turned into 1145615368, and the jfloatArray that I'm passing causes a segfault when dereferenced. Apr 26 13:35:52 o_O Apr 26 13:36:08 I have no idea, but it sounds like something fucked up in your library Apr 26 13:36:47 it's my first time using jni, and android for that matter. I'm somewhat lost Apr 26 13:37:16 also java... Apr 26 13:38:11 can anyone please point me in any direction how to call a service from within a service using alarms as of my service should perform a task x minutes later? Apr 26 13:39:01 doesn't service-service communication have to be done with intents? Apr 26 13:39:37 don't know?! :) Apr 26 13:40:10 that's what I found. It was very slow, so I used a thread insted. Apr 26 13:40:20 .......... huh? Apr 26 13:40:23 should i somehow create a pending intent to the service? or an external broadcast receiver which calls startService? Apr 26 13:40:25 wreiner: your question is confusing. Apr 26 13:40:29 wreiner: AlarmManager + PendingIntent Apr 26 13:40:32 You can communicate with services in many ways. Apr 26 13:40:49 wreiner: http://developer.android.com/guide/topics/fundamentals/bound-services.html Apr 26 13:40:57 read that, there's several methods there you can use. Apr 26 13:40:59 + BroadcastReceiver Apr 26 13:41:09 you can always have services bind to each other. Apr 26 13:41:25 lov: i don't quite understand what you mean sry Apr 26 13:41:36 wreiner: that makes two of us. Apr 26 13:41:40 :D Apr 26 13:41:41 perfect Apr 26 13:41:42 wreiner: You could use a thread on a timer Apr 26 13:41:47 you could use alarmmanager, if necessary Apr 26 13:41:51 you could do this several ways Apr 26 13:42:01 yeah i want to use an alarmmanager Apr 26 13:42:17 my question is what is the best way to implement this Apr 26 13:42:48 as wongk perhaps meant i create an external broadcast receiver in which i call the startService function? Apr 26 13:42:52 or is there a better way Apr 26 13:43:10 well Apr 26 13:43:14 you don't need a broadcast receiver Apr 26 13:43:19 you can create a pending intent for a service call directly Apr 26 13:43:46 http://developer.android.com/reference/android/app/PendingIntent.html#getService(android.content.Context, int, android.content.Intent, int) Apr 26 13:43:47 hmm how would i do that? Apr 26 13:43:58 oh Apr 26 13:44:02 link ftw Apr 26 13:44:02 by reading the documentation instead of random garbage blogs Apr 26 13:44:18 ah, nice Apr 26 13:44:59 i assume there are wake lock considerations there? Apr 26 13:45:03 i'm relativly new to android developing and the docu is quite big so sometimes i need some pointers where to check :D Apr 26 13:45:30 lov, found problem: native function wasn't taking 'this' as an argument. Apr 26 13:46:42 ah Apr 26 13:51:52 lov: thanks works like a charme - somehow Apr 26 13:52:40 wreiner: do your services run while the phone is sleeping? Apr 26 13:53:19 Someone familiar with the Bluetooth Chat from Android Dev willing to help ? :) Apr 26 13:54:02 http://developer.android.com/resources/samples/BluetoothChat/index.html Apr 26 13:54:35 wongk: this is what i wanna use the alarm manager for so they don't run the whole time. perhaps this is suffient enough. if not i have to use wake lock which i wanna avoid if possible Apr 26 13:55:15 if your services run while the phone is sleeping, you can't avoid a wake lock Apr 26 13:55:34 whether or not you actually aquire one yourself Apr 26 13:56:07 There should be an app that can tell me all the apps that are currently holding a wake lock Apr 26 13:56:14 so that I can uninstall offensive apps Apr 26 13:56:27 i am not sure how wake locks work when a pending intent starts the service directly Apr 26 13:56:37 i know how it works when you use a receiver Apr 26 13:56:43 i don't see why they would work any differently depending on how the service was started Apr 26 13:58:03 i start a normal service. as i mentioned earlier that day with readme i'm trying to get wifi to connect even when the phone is asleep. so i need to aquire a wifi lock. that's why i'm trying to use a service. Apr 26 13:58:46 because as i understand the docu a service-intent is stopped after the work is done so i would lose my wifi-lock Apr 26 13:59:23 readme: dumpsys power Apr 26 13:59:30 lol and if u understand what i'm typing all hail to you :D Apr 26 14:01:00 i believe ICS has wakelock information Apr 26 14:01:13 also honeycomb, but that doesn't count :P Apr 26 14:01:50 lov: thank you, that will come in handy for sure. Apr 26 14:03:41 hey Apr 26 14:08:13 i have a problem with the simpleCursorAdapter of the compability library and useing a custom Theme. Apr 26 14:20:22 can you manipulate the back stack? Apr 26 14:20:35 im showing a view, and i want the back button to remove it Apr 26 14:21:14 canadiancow|work: you can override the back button Apr 26 14:21:30 doesnt quite do what i want Apr 26 14:21:40 well it might...but it's more complicated Apr 26 14:21:56 because more stuff could go onto the back stack after i show my view Apr 26 14:22:01 and i want the back button to do things in order Apr 26 14:22:50 canadiancow|work: whatever you are doing, it sounds very wrong :) Apr 26 14:23:08 ive been fighting the design for a while Apr 26 14:23:15 but im trying to make the best technical implementation for this design Apr 26 14:23:29 in terms of the back button doing what the user would expect Apr 26 14:24:32 i could get the number of BackStackEntrys Apr 26 14:24:49 when the view is shown Apr 26 14:25:08 and override onBackPressed(), checking if that number is still the number of entries, and if so (and the view is showing), remove the view Apr 26 14:25:12 else, just call super Apr 26 14:26:22 oh q, should I try to jam everything in the top half of the screen in case the user needs the soft keyboard, or does scrolling work well enough that they won't mind? Apr 26 14:26:44 What is the best way to bytes coming from a device through Bluetooth in android? Apr 26 14:26:49 Inputstream?? Apr 26 14:26:56 to read bytes* Apr 26 14:27:04 Tsukaza: depends on the bluetooth device? Apr 26 14:27:21 HTC Phone communicating with a sensor Apr 26 14:27:23 freecandy, no, use the whole screen Apr 26 14:27:28 they communicate in Hexadecimal Apr 26 14:28:29 Tsukaza: Hexadecimal you say? You'll need to make a HexadecimalInputStream then! Apr 26 14:29:17 as i understand from reading the documentation broadcast receiver shouldn't to much work. if i now have a broadcast receiver within my service, is it safe to perform actions in this "embedded" broadcast receiver (for WifiManager.WIFI_STATE_CHANGED_ACTION) or should i better use a normal receiver and call the service from there? Apr 26 14:29:39 Ge0rG: HexadecimalInputStream? Can you help me out understading it? I dont use InputStream at all I dont know what we can do with it :P Apr 26 14:31:04 Tsukaza: have you read http://developer.android.com/guide/topics/wireless/bluetooth.html Apr 26 14:31:36 Tsukaza: you can use http://developer.android.com/reference/android/bluetooth/BluetoothSocket.html#getInputStream() to get data from a BT connection. Apr 26 14:31:37 Ge0rG: I did, but I maybe I missed something. Apr 26 14:32:00 Tsukaza: I was just kidding re HexadecimalInputStream. You can use a regular InputStream and just parse the data you receive manually Apr 26 14:32:03 I'm trying to share memory between Android and chrooted ubuntu on the same kernel. any idea how to proceed? Apr 26 14:32:39 Ge0rG: ah right, yeah thats somewhat what I do but when it comes to analyze the data, some data gets lost Apr 26 14:32:46 a few bytes missing Apr 26 14:33:15 I am using the Bluetooth Chat app from android dev btw, they use InputStrem to receive the data and sent it to the handler in another Java class Apr 26 14:33:19 Tsukaza: that might be a bug in your sensors Apr 26 14:33:27 Tsukaza: or in how you parse data. Apr 26 14:33:30 The sensor worked fine in Scala :/ Apr 26 14:34:16 Ge0rG: Right now the data is parsed using the arg1 variable that comes from the Message Class (arg1 is the number of data inserted on the byte[]) Apr 26 14:34:37 Ge0rG: So I parse "arg1" bytes into a queue to start analyzing them Apr 26 14:35:06 Ge0rG: but, when analyzing it, some bytes do not show up Apr 26 14:35:13 Tsukaza: maybe you should not use a demo app for your use case? Apr 26 14:35:20 or at least use less of it? Apr 26 14:35:52 Ge0rG: im just using the Connected and Connect Thread atm, and the handler from it, I reduced the most I could Apr 26 14:37:07 I'm trying to share memory between Android and chrooted ubuntu on the same kernel. any idea how to proceed? Apr 26 14:37:26 Tsukaza: sorry, I'm not that deep in the demo code; I know for sure that my BT app is receiving all the data it gets Apr 26 14:37:59 Ge0rG: probably mine is receiving too... But I dont know why or where I lose a few bytes... Dam Apr 26 14:38:42 Tsukaza: Log.d() your data as soon as possible? Apr 26 14:39:08 Ge0rG: lets say, if you want to receive multiple messages with a format (0xFC means Start of a packet and 0x0D meand end of packet), and process the received info to a Queue how would you do it? Apr 26 14:39:18 I did it, and the data is correct in every step Apr 26 14:40:09 Atm I receive the data in the InputStream, pass it to the Handler to a byte[] and pass that byte[] to another class that add is going to add each byte to a Queue Apr 26 14:40:23 Tsukaza: you could make a wrapping MessageInputStream that reads bytes from the stream until the end of packet, and then returns a Message Apr 26 14:40:53 Tsukaza: or you just add individual bytes to a buffer and get your stuff from there Apr 26 14:41:03 there are many possible ways Apr 26 14:41:27 The way I am doing seems to be perfect for this case but it is failing somewhere Apr 26 14:41:30 if you need ready-made code, I take only 59USD/hr... Apr 26 14:41:42 I have a thread working on the received data Apr 26 14:41:46 if you need your code debugged, its 89USD/hr ;) Apr 26 14:41:53 119USD for multi-threaded code :P Apr 26 14:42:00 lol Apr 26 14:42:40 there is always one more race condition Apr 26 14:43:14 lock and synchronize EVERYTHING! Apr 26 14:43:21 *insert meme picture* Apr 26 14:43:30 Mavrik I do it xD Apr 26 14:43:40 phasers are locked to target! -- FIRE! Apr 26 14:51:25 If you need your code to actually work, $200/hr Apr 26 14:52:33 : Apr 26 14:52:34 :D Apr 26 14:53:37 aahh Bitmap management is still as fn as ever to net get OOM Apr 26 14:53:54 dont hold bitmaps in memory if you arent displaying them? Apr 26 14:54:02 dont use a bitmap for a solid colour? Apr 26 14:54:18 don't worry I'm starting to be level +50 in Bitmap management :p Apr 26 14:55:18 still displaying a gallery of large images fetched over http can be challenging Apr 26 14:55:44 to not hit the dreaded OOM, even using all available tricks Apr 26 14:56:03 I dont code to work I need help? :P How much is that? :) Apr 26 14:56:25 I dont need code to work, I need help! :P How much is that? :) * Apr 26 14:57:08 RTFMing cost 0$ Apr 26 14:59:04 I will yell at you for free Apr 26 14:59:09 trust me on that one Apr 26 14:59:11 me too Apr 26 15:01:56 I like turtles´~ Apr 26 15:02:10 thats gay Apr 26 15:03:04 im gay then Apr 26 15:03:12 ... Apr 26 15:03:23 Tsukaza: wow, that was a really super thing to say Apr 26 15:03:47 what just happened? Apr 26 15:03:56 nothing spendipularly super Apr 26 15:04:10 soz, troll friend Apr 26 15:04:15 yeah, same here Apr 26 15:04:46 evancharlton: i've almost finished all my oauth for google drive Apr 26 15:04:52 such a pita Apr 26 15:04:53 cool Apr 26 15:05:09 i like pitas :) Apr 26 15:05:40 do you like poutine Apr 26 15:06:20 he's canadian; if the baby rejects the poutine test they leave it in the woods for the bears Apr 26 15:06:54 it's like sparta Apr 26 15:06:56 only not Apr 26 15:07:35 canadians are way too nice for that Apr 26 15:09:01 eh? Apr 26 15:10:01 i am dissapointed in canada, they are on the brink of having no representation in the 2nd round of the NHL playoffs :P Apr 26 15:12:53 poutine was on the menu at the brewery yesterday, but I was afraid to try it Apr 26 15:13:31 I ate way too many belgian fries. Apr 26 15:13:44 They then got in the way of my getting drunk. Apr 26 15:13:50 readme: poutine is a perfect brewery food Apr 26 15:20:08 guys, is it possible to manually register igo as a possible application for address links? ATM in (ICS) contacts, it only gives the option of Maps and Waze, not iGo. Apr 26 15:20:35 Bauer: igo has to do that. Apr 26 15:20:40 also, buy and install copilot Apr 26 15:20:41 don't be a scrub Apr 26 15:20:52 oh man, come to think of it... there was a bruins game on too Apr 26 15:21:04 also, are you a developer? If not, maybe you should be in #android or #android-root Apr 26 15:21:17 readme: they lost Apr 26 15:21:24 not surprised Apr 26 15:21:48 lov: well its not a normal user action, but more of a tweaking question so I thought people here would know how apps register for that specific action, and hence how to make it work Apr 26 15:22:07 Bauer: yes, via intent-filters. Apr 26 15:22:11 Do you work for igo? Yes/no Apr 26 15:22:17 if no, you cannot fix this, please don't try. Apr 26 15:22:23 also, go to #android-root or #android. Apr 26 15:22:44 this is not #android-iwannatweakthisfirmwarebuthowdoicompileguys Apr 26 15:22:55 #android-crackmyapk Apr 26 15:23:16 #android-winzipper Apr 26 15:24:34 lov: I sense a clear distaste for 'tweaking' things from you :) why do you recommend copilot anyway? Apr 26 15:24:45 I wrote the android port Apr 26 15:24:54 lov: is copilot really worth it over google nav? Apr 26 15:24:56 no. Apr 26 15:24:58 hahaha Apr 26 15:24:59 not imo Apr 26 15:25:09 but if he's gonna buy a turn by turn nav for w/e reason, copilot is decent Apr 26 15:25:16 also, onboard maps = no network connection necessary Apr 26 15:25:37 so if you have a super limited data connection plan, or no data plan, it's a decent option. Apr 26 15:25:50 also, "tweaking" is sort of like saying "hay guys i can code html" Apr 26 15:25:51 or if you're on an airplane! ;) Apr 26 15:25:58 you're not really a developer, get out. Apr 26 15:26:13 (if you are actually a developer please stay, just don't ask questions about how to modify other people's apps) Apr 26 15:27:43 onboard maps really has all the data on the phone? Apr 26 15:28:18 you're confusing terms, freecandy Apr 26 15:28:29 all the maps Apr 26 15:28:31 all of them Apr 26 15:28:44 all of the ones you actually download, that is. Apr 26 15:28:46 copilot has onboard maps, which means no data. Preloaded Maps does not. Apr 26 15:28:59 s/onboard maps/onboard map data/ Apr 26 15:29:10 yeah, to be clear Apr 26 15:29:24 like google maps? Apr 26 15:29:24 copilot has you download all of the map, routing, POI, etc. data beforehand Apr 26 15:29:38 and does route calculations and drawing based on the local data, rather than anything on the network Apr 26 15:29:50 i expect google will eventually support that Apr 26 15:29:57 Google Maps lets you cache some map tiling and such but still requires some network connection Apr 26 15:30:09 it also doesn't do local routing (yet) (I think) Apr 26 15:30:44 OK, I was confused. I thought you meant that I had a world's worth of maps in my pocket. That didn't really make sense with all the lag the app had given me. Apr 26 15:30:53 lov, it can do offline routing of minor correcetions to your route Apr 26 15:30:59 so if you take a wrong turn, it doesnt need the network Apr 26 15:31:05 but if you go far off, it needs network Apr 26 15:32:07 freecandy: it does map stitching now, so you could technically have the NA and EU data Apr 26 15:32:15 which I would consider the world wrt places I'd want to ever drive Apr 26 15:32:38 normally you just get a region, like US, or UK, or DE Apr 26 15:32:56 but if you buy multiple regions they'll get stitched together, so you can drive from DE to FR without having to reload the app Apr 26 15:33:14 lov: can I stitch NA and FR? Apr 26 15:33:31 I don't know if there's a "swim" route between NYC and Calais though. Apr 26 15:33:45 worst maps ever Apr 26 15:35:07 you're the worst maps ever Apr 26 15:35:09 gawd. Apr 26 15:35:16 everyone stop fighting!!! Apr 26 15:35:30 :'( Apr 26 15:35:39 he started it Apr 26 15:35:42 and/or is a jerkface Apr 26 15:35:46 true Apr 26 15:35:48 i'll allow it Apr 26 15:37:42 I am having such a strange problem. I am trying to create a JSONObject from a string I received from the server. Everytime the code in the catch statement is run. But as far as I can see the error is null Apr 26 15:37:54 its definitely a json object Apr 26 15:37:58 that I pass in Apr 26 15:38:09 I checked with an online parser and it showed no errors Apr 26 15:38:20 anybody have any ideas? Apr 26 15:38:41 bt? Apr 26 15:38:47 the exception argument to a catch block can never be null Apr 26 15:39:03 i should google that to make sure i'm not lying… but i'm like 99.999% sure Apr 26 15:39:17 that would make no sense :P Apr 26 15:39:20 it 100% is Apr 26 15:39:21 jiduvah: how about providing a stack trace and a test case Apr 26 15:39:23 i assumed he meant the error string Apr 26 15:39:26 instead of asking us to guess Apr 26 15:39:30 I try and log the error message but nothing shows Apr 26 15:39:39 I cannot printStackTrace() Apr 26 15:39:57 use ddms instead, or run adb logcat from the console. Apr 26 15:40:01 have you tried debugging it? Apr 26 15:40:29 JakeWharton: I have been trying to debug it for a few hours, but I don't get an error message so its a little difficult Apr 26 15:40:38 set a breakpoint Apr 26 15:40:41 with the debugger? Apr 26 15:41:10 jiduvah, the error is never null Apr 26 15:41:14 i stepped through the code and have a break point within the catch block, and the error message doesn't show Apr 26 15:41:22 jiduvah, always log the full exception trace Apr 26 15:41:24 lies Apr 26 15:41:27 you're doing it wrong Apr 26 15:41:40 i've seen a null error message on an exception Apr 26 15:41:50 not to mention i can easily throw one Apr 26 15:41:59 what's the guys name from A Clockwork Orange? Apr 26 15:42:04 main dude Apr 26 15:42:10 John Apr 26 15:42:15 real name or movie? Apr 26 15:42:19 movie name Apr 26 15:42:23 I am calling e.printStackTrae() within the block and it shows nothing in the log Apr 26 15:42:23 IMDB Apr 26 15:42:32 damn i can't remember Apr 26 15:42:37 jiduvah: and that leads you to conclude that "e" is null? Apr 26 15:42:42 i'm trying to fit in here and not Google things Apr 26 15:42:43 alex Apr 26 15:42:51 * wongk wins Apr 26 15:42:52 i like how the first assumption was to check who the protagonist was in the movie and not the book Apr 26 15:43:16 jiduvah: Try Log.e(String,String,Throwable) Apr 26 15:43:33 evancharlton: I also have looked in the variables when the app stopped on a break point within the block Apr 26 15:43:45 evancharlton: ok will do Apr 26 15:49:48 hmmm, so whats happening is the breakpoint is stopping within the catch block but its not actually running any code there. Apr 26 15:50:49 it returns the correct jsonObject but shows something different when stepping through Apr 26 15:55:55 how do i create a drawable (in xml) that renders N drawables in order? i have checked out http://developer.android.com/guide/topics/resources/drawable-resource.html, but none of the *Lists seem appropriate Apr 26 15:56:24 <36DAA6P0U> a layer-list Apr 26 15:57:06 romainguy_: i am playing around with that right now, but i would need to specify the exact dimensions, wouldn't io Apr 26 15:57:21 no you don't have to Apr 26 15:57:31 only on the layer list itself Apr 26 15:58:03 (and you can use the intrinsic width/height) Apr 26 15:58:26 romainguy_: currently, i don't provide offsets, resulting in all drawables drawn on top of each other (as described by the doc) Apr 26 15:59:14 i need the drawables to be rendered next to each other, not on top of each other :/ Apr 26 15:59:29 there's no drawable to do this Apr 26 15:59:34 just create several drawables Apr 26 16:00:26 romainguy_: ok, thanks for your help Apr 26 16:11:29 You can use this option to slow down the Monkey. Apr 26 16:15:53 isn't data from say, an EditText autosaved into the bundle on an orientation change? Apr 26 16:16:34 no Apr 26 16:16:37 o Apr 26 16:16:46 oh waIt, yes Apr 26 16:16:50 on an orientation change. Apr 26 16:17:09 so shouldn't it be auto restored as well? or am i screwing something up Apr 26 16:17:32 you've confused me, now I have to check. Apr 26 16:17:37 :P Apr 26 16:19:32 i'm on the Activity docs and it appears it *should* just work Apr 26 16:19:42 so im most likely doing something wrong w\ my Fragement here Apr 26 16:20:04 why can i not use G+ Messenger on the web Apr 26 16:20:05 fuck Apr 26 16:20:05 Wavesonics: appears it works fine, but only if the view has an id attr Apr 26 16:20:22 right, all of these do Apr 26 16:20:38 readme, so this should work for fragements as well correct? Apr 26 16:20:40 you should be saving the state in onPause anyway Apr 26 16:20:50 because if another activity takes over, yours can be killed. Apr 26 16:21:19 save in onPause, restore in onCreate, and be done with it Apr 26 16:22:13 readme, but what i'm reading here is, all Views w\ a proper ID, will be saved automagically Apr 26 16:22:25 and restored the same way? Apr 26 16:22:25 Wavesonics: show me that? Apr 26 16:22:35 readme, http://developer.android.com/reference/android/app/Activity.html#onSaveInstanceState%28android.os.Bundle%29 Apr 26 16:22:55 The default implementation takes care of most of the UI per-instance state for you by calling onSaveInstanceState() on each view in the hierarchy that has an id, and by saving the id of the currently focused view (all of which is restored by the default implementation of onRestoreInstanceState(Bundle)). Apr 26 16:23:11 Hi Apr 26 16:23:21 thats for Activities though, so maybe Fragments don't restore automatically? Apr 26 16:23:33 I was just wondering a quick question, what screen size would the HTC one X be classed as in the manifest? I would guess it's large? Apr 26 16:23:48 Wavesonics: well, lets see Apr 26 16:23:52 * readme opens his test Apr 26 16:23:53 NutterzUK, yes, Large Apr 26 16:23:58 XLarde is for tablets & TVs Apr 26 16:24:11 Thanks :) Apr 26 16:24:14 np Apr 26 16:24:42 no Wavesonics Apr 26 16:24:44 tvs are large Apr 26 16:24:50 canadiancow, what really? Apr 26 16:25:00 thats odd Apr 26 16:25:04 if you hold up a tablet at normal viewing distance, and a tv at normal viewing distance, tablet seems bigger Apr 26 16:25:07 appears bigger Apr 26 16:25:12 ah got ya Apr 26 16:25:13 Wavesonics: yeah, seems that way. Apr 26 16:25:21 * pragma- stares at canadiancow|work. Apr 26 16:25:23 i dont agree with how theyve done everything though Apr 26 16:25:29 ignore him, he has canadian eyesight Apr 26 16:25:50 readme, u verified it auto saves & restores Views in Activities? Apr 26 16:25:52 Wavesonics: although I didn't verify that my activity actually was killed. you can test this by pressing the home key and opening other apps. Apr 26 16:25:57 also, he has canadian tv's Apr 26 16:26:05 readme, rotate the screen Apr 26 16:26:09 that destroys it for sure Apr 26 16:26:10 Wavesonics: I believe so. you should do the same experiment as I did, except put Log statements in Apr 26 16:26:15 Wavesonics: yeah, I did that alread.y Apr 26 16:26:20 cool Apr 26 16:26:39 so thats cleared up, which is great :P But not what i'm working on. i'm trying to get the same functionality w\ Fragements Apr 26 16:26:43 onRetainLastConfigurationInstance ftw Apr 26 16:27:27 onCreateView() DOES get a savedInstanceBundle but... maybe u have to pull out and restore the values your self? that would ssuucckk Apr 26 16:27:59 aaww mmaann Apr 26 16:28:03 yeah, pulling out is no fun Apr 26 16:28:23 yeah Apr 26 16:28:31 keep it clean noobs Apr 26 16:28:45 why? Leeds is gone. Apr 26 16:28:48 ok mikedg wrap it up Apr 26 16:29:55 does admob in android work with an iphone admob id? because i keep getting onFailedToReceiveAd(No ad to show.) Apr 26 16:30:08 elye: excellent, and I hope it stays that way Apr 26 16:30:21 mikedg, lol Apr 26 16:30:27 whops Apr 26 16:31:03 ads are an eyesore and cheapen the android experience Apr 26 16:31:15 Hmm, I just put an app up on the google play.. it added it correctly, then I changed my manifest and updated it... but it's not showing on google play, it's been about 20 mins, does it usually take this long to update? Apr 26 16:31:25 NutterzUK: takes hours Apr 26 16:31:30 thanks Apr 26 16:32:02 unless you happened to submit it right before they're doing batch processing for your region Apr 26 16:32:16 I think I must have, but the update is taking some time Apr 26 16:32:27 I messed up on the supported screens :( Apr 26 16:32:40 just support them all Apr 26 16:32:41 ads are great for monetizing apps that are targeted at the lower end of the bell curve. Apr 26 16:32:59 pragma- as much as I'd love to, it seems to cause problems on the tablet devices Apr 26 16:33:05 and the "small" devices Apr 26 16:33:54 silly $20 devices Apr 26 16:34:21 Beats me why someone would plop $20 on a device and get a $90 monthly plan Apr 26 16:34:46 * pragma- went the opposite direction: $350 device, $29.99 monthly Apr 26 16:35:37 $90 a month for a year is about $1,080; $29.99 for a year is about $360 Apr 26 16:36:45 they talk a lot Apr 26 16:37:09 * pragma- has unlimited data and unlimited text. Apr 26 16:37:42 talking is overrated Apr 26 16:38:08 meat suits squeezing air through muscles in their throats to make gutteral sounds which resemble words Apr 26 16:43:49 hmmm Apr 26 16:44:00 This is going to drive me mad, i'm best just asking... Apr 26 16:44:35 In my manifest, I set minSdkVersion="7", and this for supports-screens: Apr 26 16:44:37 android:smallScreens="false" Apr 26 16:44:38 android:normalScreens="false" Apr 26 16:44:38 android:largeScreens="true" Apr 26 16:44:38 android:xlargeScreens="false" Apr 26 16:44:38 /> Apr 26 16:44:55 But then on the marketplace, two things are wrong.. when I upload it says it supports large and xlarge... Apr 26 16:44:57 1. dont paste Apr 26 16:44:58 2. why Apr 26 16:45:05 and, then it says it's not compatable with my HTC one X Apr 26 16:45:15 Sorry for pasting Apr 26 16:45:45 As in, why did I set those values? Apr 26 16:45:58 NutterzUK: your One X is probably "normal" Apr 26 16:46:26 yes, why did you set them Apr 26 16:46:40 so is there support for like... android:sw600dpScreens="false" Apr 26 16:46:53 I set the minSdk as there was as I believe it's needed by a library I use Apr 26 16:47:06 I set the Android sizes, as on tablets, and small screens I have problems with some of my images. Apr 26 16:47:24 On tablets they're too small, so I need to make new images I would think, on small devices they are cut off in places Apr 26 16:48:21 I haven't put any other items in the manifest other than the activity and application declarations Apr 26 16:48:42 canadiancow|work: no. Apr 26 16:49:21 readme, ah figured it out. The fragement element in your layoutout file must have it's own ID Apr 26 16:49:29 and then it does it auto-magically as expected Apr 26 16:49:52 I guess my first question is, why would it say on google play: "Supported screens: large-xlarge" Apr 26 16:50:19 NutterzUK: what's your targetSdkVersion? Apr 26 16:50:21 Wavesonics: cool Apr 26 16:50:36 7 Apr 26 16:50:40 maybe there should be a lint rule that warns about elements with no ids then Apr 26 16:50:44 NutterzUK: it's probably a compatibility thing--xlarge didn't exist until HC Apr 26 16:50:55 since they don't get their state saved Apr 26 16:51:17 NutterzUK: try bumping your targetSdkVersion to 13 and see what happens Apr 26 16:52:40 evancharlton: thanks, trying now Apr 26 16:56:57 Nice, was about to remove the configChange="" XML hack :) Apr 26 17:02:44 evancharlton: I added in "normal" screen sizes, and updated the targetSDK to 13... it still says x-large is supported Apr 26 17:04:00 NutterzUK: it's likely a compatibility thing. There have been 10" screens which were "large" simply because "xlarge" didn't exist at the time Apr 26 17:04:07 but I don't know that for certain Apr 26 17:04:16 Ah ok Apr 26 17:04:19 It now supports: normal-xlarge Apr 26 17:04:35 I mean.. the reason really is that it just doesn't look good on tablets, maybe I can try to fix that over the next few days Apr 26 17:04:44 but this is just a beta version i'm putting up for testing on large screens Apr 26 17:05:26 perhaps a better way would be to find a way to disallow android 3.x Apr 26 17:05:35 ( for now ) Apr 26 17:08:23 android 3.x is like the Windows Vista of android, I hear Apr 26 17:10:41 lol Apr 26 17:11:01 ya it's a wounder to me any devices are still running it, why havent all tablets been upgraded to ICS Apr 26 17:11:29 NutterzUK: that's a terrible idea :-/ Apr 26 17:11:52 hmmm Apr 26 17:12:36 I could add a compatible screens tag to the manifest... but I don't know how good an idea that is either Apr 26 17:12:44 as I would need one per screen Apr 26 17:12:58 Hey. I'm using the Contextual Actionbar, and I just need to style it with specific text colours. Can anyone point me to the correct documentation? Apr 26 17:12:59 http://developer.android.com/guide/topics/manifest/compatible-screens-element.html Apr 26 17:29:14 does roboelectric let me test loaders and asynctasks? Apr 26 17:29:15 hmm Apr 26 17:31:19 Has anyone any experience using the AppEngine connected android project pattern? Is it worth going down this route? Apr 26 17:31:35 if you're gonna have a webapp, why not Apr 26 17:33:02 pfn: I would like to re-use the GWT type RPC endpoints for not only Android (and possibly GWT), but also for iOS Apr 26 17:34:00 I'm not sure how easy this would be. I think it would require a separate set of endpoints for other platforms Apr 26 17:34:42 depends on what you're doing Apr 26 17:34:47 you can use a single endpoint... Apr 26 17:36:37 I guess I'll try out roboelectric later Apr 26 17:36:53 pfn: have you any recommendations based on personal experience for client / server transport for android? I'm looking for something that is easy to modify in terms of interface Apr 26 17:37:02 pfn: have you tried robotium? Apr 26 17:37:20 I haven't yet, haven't tried any of the test frameworks on android yet Apr 26 17:37:34 and I want to test on jvm Apr 26 17:37:36 not on-device Apr 26 17:37:50 ah, well let me know your thoughts on roboelectric anyhow, though i would like a users perspective on the diffs of both Apr 26 17:38:05 i use robotium right now and i hate it, although i consider it a necessary evil Apr 26 17:38:08 What's the best way to go about doing a drop down where values ar 1 - 5, i don't like the big modal dialog that pops up Apr 26 17:38:13 (or if it could be less wide thatd be nice) Apr 26 17:38:23 birbeck, robotium is on-device only, right? Apr 26 17:38:32 device or emulator Apr 26 17:38:50 yeah, I want a unit test that doesn't involve device stuff, roboelectric looks like it'll do it for me Apr 26 17:39:30 I used robotium a little while ago Apr 26 17:39:33 I liked it Apr 26 17:39:45 its slow and buggy Apr 26 17:39:58 its nothing like selenium Apr 26 17:40:04 findViewWithText("Click Me").click(); Apr 26 17:40:26 * pfn generally hates testing Apr 26 17:40:42 but for this particular project, I'm too lazy to build/deploy the entire app to test my code Apr 26 17:40:44 oh i love tests Apr 26 17:40:44 hire QA :D Apr 26 17:40:52 so I want to have tests that I can run on pc Apr 26 17:41:13 i love being able to refactor and have full confidence that my changes didnt break anything Apr 26 17:41:17 once it gets on-device, I want it to go through formal qa, not my own testing Apr 26 17:42:09 i hardly ever even test on device Apr 26 17:42:38 i test features in the emulator as im developing them, write why functional tests and pass the builds to qa who test on device Apr 26 17:42:54 write my* Apr 26 17:43:01 birbeck, have u always been using the emulator? or only since the vast improvements of late? Apr 26 17:43:29 Wavesonics: imho, there have been no vast improvements as of late, none i have noticed Apr 26 17:43:46 Wavesonics: once they added snapshots, the emulators became a reliable means of testing Apr 26 17:43:49 birbeck, does ur CPU not have the hardware virtualization extensions? Apr 26 17:44:08 yes it does, but i have noticed no improvements with r19 Apr 26 17:44:28 and i tried the intel atom x86 image, but it has no features Apr 26 17:44:47 why would CPU hardware virtualization extensions help any with qemu-arm? Apr 26 17:45:00 unless you compile for x86 Apr 26 17:45:39 ^ Apr 26 17:46:57 I've almost only used real devices for testing and debugging Apr 26 17:47:59 i used to, now i generally only but qa releases on my devices Apr 26 17:48:05 put* Apr 26 17:49:57 but for work we're doing opengl through the NDK anyway Apr 26 17:50:24 emulators not going to help you there Apr 26 17:50:26 and then we do all main dev and testing on the computer, running the stuff natively. Apr 26 17:51:58 I have just created my first simple app. How do I get it on the phone to test? Not just in the device emulator. Apr 26 17:52:36 http://developer.android.com/guide/developing/device.html Apr 26 18:13:33 guys, we use jdk 6 or jdk 7? Apr 26 18:13:40 6 Apr 26 18:13:57 k, 12.04 :D i forgot quite a lot it seems, thanks readme Apr 26 18:14:30 Afzal, how is it? Apr 26 18:14:35 clean install or upgrade? Apr 26 18:14:44 clean, migrated from Elementary OS Apr 26 18:14:46 * readme spent a day writing his own cool stuff to open oauth using a local browser launch etc and local webserver and then found it was already implemented in the oauth lib :| Apr 26 18:15:02 * readme just deleted like 5 of his files and replaced them with 1 20 line file. Apr 26 18:15:06 lol Apr 26 18:15:18 huh dont know it Apr 26 18:15:22 still setting up stuff and slowly migrating config files. unity's faster and this is coming from a true blue unity hater Apr 26 18:15:39 ha wow Apr 26 18:15:46 then again, maybe i'm liking it this time because I'm not using a mouse at this time Apr 26 18:15:50 i never hated Unity, but it sure had a ways to go Apr 26 18:16:06 looks like it may have made it though Apr 26 18:16:28 i have yet to install the graphics driver though, hsdpa is awfully slow in these parts Apr 26 18:16:49 v much looking forward to 12.10 though, i've wanted them to ditch their darkness for a long time Apr 26 18:16:53 and the alt-tab is kinda confusing because it's too big Apr 26 18:16:56 what darkness? Apr 26 18:17:00 12.10 is going to overhaul the UI colors Apr 26 18:17:15 just the over all darkness all over the UI, in the default backgrounds, ect Apr 26 18:17:18 WHOA! holy mother of god! Alt tab jjust got awesome! Apr 26 18:17:24 really? Apr 26 18:17:26 whats it do Apr 26 18:17:42 you press alt tab and it shows you the standard icons for opened apps Apr 26 18:17:48 but when you pause over one of the icons Apr 26 18:17:58 it animates, expands and shows you the windows for that app! Apr 26 18:18:15 and will show window previews if you have multople Apr 26 18:18:18 pretty slick animation tbh Apr 26 18:18:25 so its like win7 Apr 26 18:18:25 been using 12.04 since beta 1 went live Apr 26 18:18:30 it will show you previews regardless @ birbeck Apr 26 18:18:31 no Apr 26 18:18:40 nothing like win 7 Apr 26 18:18:48 haters gonna hate Apr 26 18:20:18 hmm, i havent updated today, but my server no longer says development branch Apr 26 18:20:20 ./want https://www.system76.com/laptops/model/panp9 Apr 26 18:20:37 I'm gonna wait a week ro so b4 i upgrade my servers Apr 26 18:20:54 my server is on beta also Apr 26 18:20:57 ugh, if I add android.jar to my classpath, it somehow gets resolved earlier than my xmlpullparser.jar Apr 26 18:20:59 its been rock solid Apr 26 18:21:02 ah mine is on the last LTS Apr 26 18:21:02 * pfn grumbles Apr 26 18:21:14 did a clean install of 12.04 b1 a while back Apr 26 18:21:57 why is skype 80mb Apr 26 18:21:59 damn Apr 26 18:22:05 man i wish SSDs would come down in price already Apr 26 18:23:04 friggign $799 for 500GB Apr 26 18:23:21 a Apr 26 18:23:28 finally i can send to the channel Apr 26 18:23:34 no u cant Apr 26 18:23:48 :O Apr 26 18:24:04 D: Apr 26 18:24:11 Wavesonics, if I won a lottery for $500+ Apr 26 18:24:21 I would save up for an SSD. lol Apr 26 18:24:26 lol Apr 26 18:24:44 every year i keep thinking they will fall, but they just keep inching down Apr 26 18:25:04 the thing is. When you think if buying a 512GB ssd will be worth it, it might not be Apr 26 18:25:21 What's the recommended approach for laying out a view where the buttons, background, etc are pre-made images? Do I use a lot of linear layouts and weights for percentage-style positioning? Apr 26 18:25:25 because the greater the size, the greater the number of writes you'll do to it and i believe there's a limit to that? Apr 26 18:25:33 i had a work lappy w\ an SSD, they are freaking worth it Apr 26 18:25:43 Afzal: no, it doesn't work like that Apr 26 18:25:44 wyvern`, relative layouts where possible and where easy Apr 26 18:25:48 the write limit is per block Apr 26 18:26:08 na, i mean theoretically yes. but w\ the trim command and moddern management in the SSDs them selves, they are just simply blazing fast. Apr 26 18:26:13 MDijkstra, oh. then sweet! Next time I have $5000 to burn, a 1TB ssd it is :D Apr 26 18:26:14 Afzal: yeah, but if I want some image to be about 60% of the width of the screen, horiz. centered, how do I do that with a relative layout... Apr 26 18:26:16 (write leveling) Apr 26 18:26:35 wyvern`, deal in dp? Apr 26 18:26:41 and the write limit is really high these days Apr 26 18:26:46 ya Apr 26 18:26:51 not something you'll reach easily even without wear leveling Apr 26 18:27:05 cool, didn't know in that much detail Apr 26 18:27:27 well, here's hoping the next laptop lineups for all companies will have a boot ssd in addition to the normal hdd Apr 26 18:27:30 i was doing MASSIVE builds on my SSD, full linux kernel + a huge stack on top of it. a truly insane # of temp writes during the process. and i did this several times a day for a year, and it was never a probem Apr 26 18:28:04 the SSD life estimator said i was less than 10% of the way through the life of the drive Apr 26 18:28:14 I tried to config a kernel once, couldn't understand a single word of that program with a billion options Apr 26 18:28:21 Afzal: How would I use dp to put something 40% of the way across the screen? Does this mean I would have to do layout from code instead of in xml? Apr 26 18:28:28 ya it wasnt fun :P Apr 26 18:29:06 wyvern`, Either you can use weights and deal in ratios. or you can use dps. You set if to say 50dp, it'll scale uniformly across resolutions Apr 26 18:29:15 wyvern`, no u dont have to do it from code, but not w\ dp either Apr 26 18:29:21 ah yup, listen to Afzal Apr 26 18:29:47 i guess my question is if I say 50dp isn't that going to be a different % of the way across the screen on different devices? Apr 26 18:29:57 * Afzal is gonna have two patches in :D Apr 26 18:30:37 April's been a high of sorts. Good exams, full-time co-op at RIM, Android patches being reviewed, life's good (well, except the missed flight 2 days ago) Apr 26 18:30:50 oh and a surprise birthday party Apr 26 18:31:10 My cat was sleeping like this, but woke up when i took the pic: http://dl.dropbox.com/u/10026158/IMG_20120426_060414.jpg Apr 26 18:31:46 :3 Apr 26 18:31:58 Wavesonics, you know where to post that photo buddy Apr 26 18:32:00 go get that karma Apr 26 18:32:05 lol Apr 26 18:32:12 http://ravenlabs.org/storage/HolyLord's%20Cat.jpg Apr 26 18:32:17 http://ravenlabs.org/storage/HolyLord's%20Cat%202.jpg Apr 26 18:32:31 how to heat a cat Apr 26 18:32:38 haha awesome\ Apr 26 18:32:47 super blurry Apr 26 18:36:30 hey, targeting SDK15 will enable hardware acceleration of later versions of Android by default right? Apr 26 18:38:02 yes Apr 26 18:38:33 cool Apr 26 18:40:52 yes it will Apr 26 18:40:56 and your users will love you Apr 26 18:41:02 and so will God Apr 26 18:41:07 How can I create a SyncAdapter with a fixed credential so the user won't have to enter any credentials? Apr 26 18:42:02 i think you still have to sign in no matter what Apr 26 18:42:14 ya Apr 26 18:42:17 whether you use that in anyway is not forced Apr 26 18:42:53 Elon Musk live: https://plus.google.com/u/0/112943946047332492941/posts/WFbSFRSw5ia Apr 26 18:45:40 Im using a AlarmManager to update my clock widget, in onUpdate and onEnable methods, I create a pending intent to launch alarm settings Apr 26 18:45:56 the pending intent works on touch, everything is ok Apr 26 18:46:16 except after some time, and unspecified reason, it stops responding to me tapping it :) Apr 26 18:46:28 any idea? Apr 26 18:46:32 ideas* Apr 26 18:48:05 okay i think i gave unity some time, still sucks Apr 26 18:49:09 Afzal: you need to appreciate the workflow of it :) Apr 26 18:49:42 nine times out of ten, the thing Im looking for is under the superkey, and three letters Apr 26 18:49:44 ironhalik, I can't appreciate the lack of launcher customization. I don't like that I can't even click the icon to minimize the app Apr 26 18:49:58 one word: synapse, it even has a calculator built in Apr 26 18:50:12 Have you tried CCSM? Apr 26 18:50:38 in the process of installing gfx drivers Apr 26 18:51:28 Afzal, maybe w\ proper drivers it will b good? Apr 26 18:51:30 what dont u like Apr 26 18:51:40 there's a lot of customization options in there, and if you need more, there's gconf-editor and dconf-tools Apr 26 18:51:42 is the android dev hangout thing every wednesday? Apr 26 18:51:55 canadiancow|work, ya Apr 26 18:52:04 and they now do a friday app review too Apr 26 18:52:08 to highlight apps they really like Apr 26 18:52:29 I don't like that skype doesn't show any icon whatsoever in unity. You can't click the icon on the launcher to minimize the window Apr 26 18:52:38 you can't reposition the panel widgets Apr 26 18:52:47 yea Wavesonics i dont need a review, i need a question answered! Apr 26 18:52:58 anyone pick up a Transformer TF300 yet? Apr 26 18:52:59 :P Apr 26 18:53:13 louielouie, no, Optimus Prime didn't wanna come :( Apr 26 18:53:54 it would be cool if hasbro gave homage to the Nexus Prime (Galaxy Nexus) Apr 26 18:54:15 but oh no, hasbro is just like any other corporation suing left and right Apr 26 18:54:22 hehe they sued Asus but Asus won on that front Apr 26 18:54:40 good on Asus, that was a ridiculous lawsuit Apr 26 18:54:53 ha ya Apr 26 18:55:16 we can still hope for the LG Optimus Prime Apr 26 18:55:55 Gnome sweet Gnome Apr 26 19:04:29 Hi, is it possible to pass an intent as an extra to an intent? Apr 26 19:05:09 I can clarify what I mean if necessary Apr 26 19:05:37 wilsoniya, you could pass a variable that determines the intent Apr 26 19:05:39 Did you try? Apr 26 19:06:07 wilsoniya: why do you want to? Apr 26 19:06:55 hi guys Apr 26 19:07:04 what is the best way to connect android to web services Apr 26 19:07:09 MDijkstra, I want to inform one activity that after it completes it's task that it should spawn an arbitrary activity Apr 26 19:07:10 like i want to trigger a php page Apr 26 19:07:16 and get the result Apr 26 19:07:48 Afzal, how would you resolve the variable into the correct class object? Apr 26 19:08:43 PendingIntent might work Apr 26 19:09:16 MDijkstra, interesting.. I'll look into it Apr 26 19:09:33 hi , can anyone help me to find some information related to "emulator -system -prop -kernet". i didn't find any information on documentation of emulator Apr 26 19:13:27 ocx: HttpUrlConnection? Apr 26 19:13:40 lov: my concern is with the parsing Apr 26 19:13:44 if i get a huge result Apr 26 19:13:56 any way to parse thatresponse in a fast way? Apr 26 19:13:57 use a streaming parser like inside of gson or jackson Apr 26 19:14:22 wilsoniya, switch case statements? Apr 26 19:14:27 I have no clue what your response is going to be so I don't know what to suggest for a parser Apr 26 19:14:27 ksoap? Apr 26 19:16:08 Afzal, that's an option, but that would mean that the possible launchable activities would need to be pre-specified Apr 26 19:16:31 Afzal, I'd like to be able to pass arbitrary activities Apr 26 19:16:41 without having to have them pre-specified Apr 26 19:16:57 looks like PendingIntent.getActivity() will do exactly what you want Apr 26 19:17:23 MDijkstra, Afzal, thanks bros Apr 26 19:25:46 oh man. i hope i can manage information like this one day: http://www.theverge.com/2012/4/26/2976870/xerox-alto-commercial-1972-personal-assistant Apr 26 19:29:50 can anyone help me to find some information related to "emulator -system -prop -kernet". i didn't find any information on documentation of emulator plz Apr 26 19:32:10 hello all Apr 26 19:33:18 Is there a way to change a project that isn't a test project into a test project? Apr 26 19:33:36 SO, apparently this photo was taken w\ a Google Glass Prototype and uploaded to G+: https://plus.google.com/101416274833608453021/posts/TG7rQ2Y9dqW Apr 26 19:33:48 sfw Apr 26 19:33:48 ? Apr 26 19:34:12 ya Apr 26 19:35:14 hm? i'm trying to lay out some ImageViews in a relative layout but I can't get alignParentTop to work Apr 26 19:35:29 Right now I just have one ImageView in the layout and for some reason it's being vertically centered Apr 26 19:35:31 lol nice Apr 26 19:35:58 gravity Apr 26 19:43:19 Hey I have a prime but verizon disabled my hotspot tethering. anyone knows if cynagenmod has a work around? Apr 26 19:43:37 ask in #cyanogenmod Apr 26 19:43:41 yese Apr 26 19:43:48 but I'd suggest you get the name of your device correct, first Apr 26 19:43:51 or better yet, beat your carrier people until the phone breaks Apr 26 19:44:06 so they won't do that bullshit to you anymore :P Apr 26 19:44:26 How do I reset (or dont loose) pending intents in my widget after screen change/rotation? Apr 26 19:45:13 everythingWorks, what's wrong with calling it prime? It is after all a nexus galaxy prime Apr 26 19:45:22 disappearedng: no, it's not. Apr 26 19:45:26 not at all Apr 26 19:45:32 ironhalik, maybe store your pendingintent at in a static variable? Apr 26 19:45:33 how did you buy a phone without knowing what it's called? Apr 26 19:45:40 I got it from work as a gift Apr 26 19:45:42 disappearedng: no such thing Apr 26 19:45:59 prime = transformer prime Apr 26 19:46:00 galaxy nexus = galaxy nexus Apr 26 19:46:12 disappearedng: I got a Galapagos Prime too Apr 26 19:46:15 nexus prime then Apr 26 19:46:16 turtle power mang Apr 26 19:46:16 Any way to get PRL version on the device? Apr 26 19:46:24 disappearedng: no, wrong again Apr 26 19:46:26 Google is being an ass. Apr 26 19:46:35 sha1sum: PRL? Apr 26 19:46:37 Or it doesn't know of anything. Apr 26 19:46:40 evancharlton, *what* is the correct name then? Apr 26 19:46:41 mikedg: kalabunga! Apr 26 19:46:50 the best part about Google Glasses are that you won't look as creepy taking a picture of a chicks ass Apr 26 19:46:54 disappearedng: Galaxy Nexus Apr 26 19:47:14 evancharlton: yeah. I know many PRL functions are carrier-specific, but I was just wondering if there was a way to get just the version that is maybe standard or at least semi-standard for CDMA. Apr 26 19:47:17 Jug6ernaut: you are correct Apr 26 19:47:21 Hm, weird. Why do we keep calling it the prime at work then/ Apr 26 19:47:32 good question Apr 26 19:47:33 ask your idiot coworkers Apr 26 19:47:36 disappearedng: you work with a bunch of idiots? Apr 26 19:47:37 and go to #android Apr 26 19:47:40 or #android-root Apr 26 19:47:42 or #cyanogenmod Apr 26 19:47:48 but really anywhere but here Apr 26 19:47:49 #android-offtopic too Apr 26 19:47:50 mikedg_, well I work with the people who made the phone Apr 26 19:47:52 lov #awayfromhere Apr 26 19:47:53 or #hell Apr 26 19:47:54 lol Apr 26 19:47:58 samsung? yes, idiots Apr 26 19:47:58 disappearedng: because you are a bunch of dumbasses Apr 26 19:48:03 disappearedng: I'm sorry Apr 26 19:48:06 I too worked at samsung Apr 26 19:48:13 I didn't say samsubng Apr 26 19:48:16 holy crap what a dog-pile on disappearedng Apr 26 19:48:23 lol Apr 26 19:48:31 twist, disappearedng is ctate Apr 26 19:48:31 disappearedng: what then GOOGLE? Apr 26 19:48:40 Anyone interested in actually answering a relevant question? Apr 26 19:48:41 lol Apr 26 19:48:44 not really Apr 26 19:48:45 sha1sum: sure Apr 26 19:48:46 this is much more fun Apr 26 19:48:52 dantheman__, can't you just whois me and check my ip? Apr 26 19:48:57 but lot is right Apr 26 19:49:06 disappearedng: why would I want to do that? Apr 26 19:49:14 dantheman__, cause it says google? Apr 26 19:49:16 15:52 --> disappearedng [vng@unaffiliated/disappearedng] Apr 26 19:49:20 disappearedng: :) Apr 26 19:49:26 lol Apr 26 19:49:30 15:48:37 [freenode] -!- ircname : Victor Ng Apr 26 19:49:31 i used to come in here with a google host all the time Apr 26 19:49:36 disappearedng: woooohooo you work at google Apr 26 19:49:49 disappearedng: I know lots of people who work at google…doesn't make you a smart dev Apr 26 19:49:56 I never said I am a smart dev Apr 26 19:49:58 Work with me here people! Apr 26 19:50:02 I am just saying we call it the prime internally here Apr 26 19:50:06 Maguro! Apr 26 19:50:06 lulz Apr 26 19:50:14 * Jug6ernaut yawns @ whole conversation Apr 26 19:50:18 disappearedng: and if you work at google get me a google io ticket Apr 26 19:50:29 yeah i need an ioio ticket too Apr 26 19:50:31 this is getting stupid. anyway yeah thanks for the reference to cyanogen mod Apr 26 19:50:40 lulz Apr 26 19:50:44 mikedg_: well done trolling this morning on G+ Apr 26 19:50:49 i laughed quite hard Apr 26 19:50:54 disappearedng: we like to trolll Apr 26 19:50:55 :) Apr 26 19:50:57 sha1sum: I highly doubt there'll be a CDMA version because a) it can't be sold unlocked and b) CDMA is all kinds of proprietary Apr 26 19:51:00 i'm glad i made your morning Apr 26 19:51:04 lol what's your fav custom mods btw Apr 26 19:51:11 AOKP is popular Apr 26 19:51:12 *roms Apr 26 19:51:13 sha1sum: but I really can't promise anything; just guesses Apr 26 19:51:17 i dontknow wtf it is though Apr 26 19:51:23 agreed, aokp is nice Apr 26 19:51:49 cdma is fail... Apr 26 19:51:51 disappearedng: can you refill my free $10 on google wallet for me? Apr 26 19:51:51 hey, can someone tell me how I can instantiate a Class object from a fully qualified class path? I want to be able to get a Class (not an object) only by knowing it's class path (e.g. "com.mycompany.app.ActivityClass") Apr 26 19:51:56 i already used most of it Apr 26 19:52:02 lol Apr 26 19:52:07 my question is more of a Java question than an android question Apr 26 19:52:09 mikedg_, just get a new phone Apr 26 19:52:32 wilsoniya: Class.forName Apr 26 19:52:36 alright gonna flash my Galaxy nexus Apr 26 19:52:37 pz Apr 26 19:52:45 disappearedng: what office do you work in? Apr 26 19:52:48 Jackneill, amazing, thank you! Apr 26 19:52:52 dantheman__, sfo Apr 26 19:52:57 disappearedng: can you give me a tour when i visit in june? Apr 26 19:53:04 evancharlton: thanks :) that's what I was thinking. Someone really should come up with some kind of standard API for this stuff. Ahhh, dreams. Apr 26 19:53:08 i want to see the secret shit like projectgl ass Apr 26 19:53:09 mikedg_, yeah sure Apr 26 19:53:11 disappearedng: you know any of the guys in network ops/security? Apr 26 19:53:13 just ping vng Apr 26 19:53:23 can you give me 10,000 shares of Google stock from 2004? Apr 26 19:53:27 dantheman__, I know a few in SRE Apr 26 19:53:43 JakeWharton: what would that do? Apr 26 19:53:45 JakeWharton, sure I will send it to you via G+ Apr 26 19:53:50 phreakmonkey, eater, or hatter ring a bell Apr 26 19:53:55 wilsoniya: when asking a java question, consider asking in #java Apr 26 19:53:55 * pfn kicks junit and its validation of test methods Apr 26 19:54:09 sha1sum: they did, and it was called GSM :P Apr 26 19:54:14 * Jug6ernaut hates #java Apr 26 19:54:22 wasnt it at its lowest in 2004? Apr 26 19:54:31 Jug6ernaut: fuck java and write it all as JNI Apr 26 19:54:34 mikedg_: that's when they went on market Apr 26 19:54:42 meh, can't use robolectric because it does some funky classloader magic :( Apr 26 19:54:46 mikedg_: if he retroactively got those... :P Apr 26 19:54:57 he'd have the same as if he had 10,000 stocks today Apr 26 19:55:00 it never split Apr 26 19:55:00 dantheman__ /me is talking abot the chan, but anyways jni is an interface...u mean c/c++ ;) Apr 26 19:55:13 yes Apr 26 19:55:19 and square lets you touch money Apr 26 19:55:24 evancharlton: well then everyone should merge their networks into TGCDMASM networks :D Apr 26 19:55:26 do the jni's then go write a real programming lang Apr 26 19:55:49 write in a Apr 26 19:55:49 * Jug6ernaut has no intention to ever write a programming langauge Apr 26 19:55:49 * pfn ponders resorting to java to write his robolectric tests :( Apr 26 19:55:59 sha1sum: the way things are heading, even the CDMA carriers in the US are moving to GSM Apr 26 19:56:03 evancharlton: CDMA is proprietary mainly because the networks that use it are rare and don't interoperate Apr 26 19:56:05 only a matter of time Apr 26 19:56:10 pfn ur what? Apr 26 19:56:18 EddieRingle: that's because LTE kicks it out Apr 26 19:56:38 p_l: indeed Apr 26 19:57:09 is it possible to run a VNC server app on an Android device *without* rooting it? Apr 26 19:57:23 (I'm guessing the API would disallow that) Apr 26 19:57:34 doubt it Apr 26 19:57:36 yes as it's a huge security concern Apr 26 19:57:52 agreed Apr 26 19:58:14 * Jug6ernaut wants to do someting that is generally a huge security concernt hehe... Apr 26 19:58:19 * Jug6ernaut will find a way tho :D Apr 26 19:58:26 :) Apr 26 19:58:57 mainly because i know other apps ahve done what i want to do...non like to speak of how tho Apr 26 19:58:59 * Jug6ernaut thinks he knows how hto Apr 26 19:59:16 yeah, it would be handy to help out my tech-illiterate family members without having to "explain" stuff to them Apr 26 19:59:34 mr_bono just tell them to mail u the phone Apr 26 19:59:36 :P Apr 26 19:59:39 hehe Apr 26 20:00:38 or mail them your hand Apr 26 20:00:51 that would be....painful Apr 26 20:01:06 and UPS would probably charge extra for that creativity Apr 26 20:01:20 * Jug6ernaut uses usps Apr 26 20:01:23 much cheaper Apr 26 20:01:38 they frown on packages dripping blood Apr 26 20:01:59 stupid regulations Apr 26 20:02:08 hehe Apr 26 20:02:42 stupid laptop battery Apr 26 20:02:47 * Jug6ernaut leaves Apr 26 20:02:50 JakeWharton: can i visit square and have some free money when im in sf, or at least discounted money Apr 26 20:02:58 sure Apr 26 20:03:31 has anyone been fired for swiping coworkers credit cards behind their backs? Apr 26 20:03:36 if not, i would like to be the first Apr 26 20:03:52 i can start on the 25th, and be fired by the 26th so i can attend io Apr 26 20:04:34 mikedg_: you already got a ticket Apr 26 20:04:45 yeah, but i can't make it rain Apr 26 20:04:57 I'll be in surgery during IO Apr 26 20:05:16 i want multiple tickets too, so i can have multiple Project Glass things Apr 26 20:05:33 cause they are going to give those out, along with a TV, and self driving cars to IONs Apr 26 20:06:17 I see tons of MEID-to-ESN converters but no ESN-to-MEID converters... Is this not possible? Apr 26 20:06:24 mikedg_ you're not an ION Apr 26 20:08:34 canadiancow|work: you can become one, but killing another Apr 26 20:08:41 via decapitation Apr 26 20:09:08 mr_bono: there's no proper API to do quick framebuffer access, or better, get your own driver into Skia path Apr 26 20:09:32 p_l: I can use it from any app, on a non-rooted device?? Apr 26 20:09:40 oh, nm, I read that wrong Apr 26 20:10:04 I would be shocked if there actually was Apr 26 20:10:41 there's support now for taking screenshots, and you can do screenshots through adb, but it won't help with rest and has horrible framerate Apr 26 20:10:56 how horrible? Apr 26 20:11:32 very Apr 26 20:11:51 have anyone faced the problems with "init: service 'console' requires console" Apr 26 20:12:53 people have been saying theres a screenshot api since gingerbread Apr 26 20:12:56 i have yet to see it Apr 26 20:13:06 it's called get another phone Apr 26 20:13:10 and take a picture of the screen Apr 26 20:13:18 been around since API 1 Apr 26 20:13:27 clever! Apr 26 20:15:08 not terribly elegant, though ;) Apr 26 20:15:25 it's extremely elegant Apr 26 20:15:32 if jake wharton recommends it, thats the best way Apr 26 20:16:13 i c Apr 26 20:19:14 mikedg_: there's a "screenshot library" that uses a hack with ddms and native code. it works on a ton of devices even without root Apr 26 20:19:24 the app screenshot ux uses it Apr 26 20:19:43 if you only want screenshots of your own app just copy the drawing cache Apr 26 20:19:52 it's like 4 lines of code Apr 26 20:20:26 or just go to ddms and acquire screenshot Apr 26 20:20:27 i thought he was talking about vnc style Apr 26 20:20:34 that is, unless you're capturing your user's screen Apr 26 20:20:35 ;P Apr 26 20:21:15 ugh at google drive, 15000 files of 120000 :/ Apr 26 20:21:21 less than a hundred in the past horu Apr 26 20:21:23 lame saaauce Apr 26 20:21:25 im out Apr 26 20:21:40 i'm working on a command line interface to google drive right now :) Apr 26 20:21:49 it already authenticates with oauth Apr 26 20:22:22 unfortunately it will be useless, because I believe drive apps can only get their own files. Apr 26 20:22:31 I guess it could be used for a backup script. Apr 26 20:25:23 does the new Xcode messed up the android source build? Apr 26 20:25:41 i am having problem now building the source Apr 26 20:25:51 it complains that there are too many warnings and erros Apr 26 20:27:00 using xcode for android? Apr 26 20:29:27 no Apr 26 20:29:52 it uses the gcc and command line tools that come with it Apr 26 20:29:54 i think Apr 26 20:30:06 and i use it for iphone as well Apr 26 20:35:52 hey guys - newbie android developer here. can anyone tell me why this isn't displaying anything on my screen? It shows the basic app window but no tabs or similar - http://pastebin.com/jBtBAK9r Apr 26 20:36:39 Hey, I'm getting a weird problem in eclipse where when I work with the XML of a certain layout it becomes very glitchy, words are displayed on the wrong line and switch back and forth between lines as I move my cursor, words disappear, etc... Does anyone know what causes this? Apr 26 20:37:19 Chipmonkpyro; sounds like a question for the eclipse support channel Apr 26 20:37:22 btw I found my answer for getting tethering on my verizon galaxy nexus Apr 26 20:37:32 I don't need to install cyanogenmod afterall Apr 26 20:37:34 Chipmonkpyro: I get the same thing. Just save your xml. If that doesn't work, close and reopen the glitchy file. Apr 26 20:38:18 Jonathan_Eyre: <3 Apr 26 20:38:25 Jonathan_Eyre: Worked like a charm, thanks Apr 26 20:38:35 Jonathan_Eyre: Was giving me a headache... Apr 26 20:38:47 It's usually a deal with copying XML data around the file, and eclipse no longer can keep track of witch element is supposed to end where. Apr 26 20:40:51 Can anybody tell me why this layout (http://pastebin.com/jBtBAK9r) produces this result: http://puu.sh/rDUZ Apr 26 20:43:08 chrizc: you have a stray FrameLayout that is consuming its parent Apr 26 20:43:53 http://developer.android.com/resources/tutorials/views/hello-tabwidget.html Apr 26 20:44:14 wongk; I do? I followed that tutorial nearly to the word (Except for swapping the tabwidget and the frame layout, so the tabs are on the bottom) Apr 26 20:44:26 yeah, it's not that easy Apr 26 20:44:38 ): Apr 26 20:44:45 how do I put tabs on the bottom then? ): Apr 26 20:45:39 Use RelativeLayout. Apr 26 20:45:41 i haven't used tabs so take this with a grain of salt, but you can use a layout_weight on the FrameLayout so that it consumes everything that isn't consumed by the TabWidget Apr 26 20:45:54 android:layout_alignParentBottom="true" Apr 26 20:46:20 wongk; how would I use layout_weight? Apr 26 20:46:26 Jonathan_Eyre; I thought you had to use linear with tabs? Apr 26 20:46:35 he would still have the same problem unless he changed the FrameLayout height to wrap_content Apr 26 20:46:54 which may be a workable solution Apr 26 20:47:09 Possibly. Apr 26 20:47:09 2 options to try Apr 26 20:47:27 okay, wongk, if it doesn't work, how would I use layout_weight? Apr 26 20:47:37 to the google! Apr 26 20:47:57 ): okay Apr 26 20:48:41 Hi, I'm trying to cancel an alarm that was created in another activity, but I need reference to the context of the activity it was created in for it to match the pending intents. How can I reference the other activity's context? Apr 26 20:49:02 maybe just use the global context Apr 26 20:49:07 just use the application context Apr 26 20:49:08 getApplicationContext() Apr 26 20:49:18 cool, yeah Apr 26 20:51:07 AUTOMATICALLY START AT BOOT Apr 26 20:51:07 Allows the app to have itself started as soon as the system has finished booting. This can make it take longer to start the tablet and allow the app to slow down the overall tablet by always running. Allows the app to have itself started as soon as the system has finished booting. This can make it take longer to start the phone and allow the app to slow down the overall phone by always Apr 26 20:51:07 running. Apr 26 20:51:17 i think google screwed something up in how they display messages like that Apr 26 20:51:38 canadiancow|work: also, this permission should be annoying to activate Apr 26 20:51:47 They just want to make sure you understand :p Apr 26 20:52:06 * p_l sometimes goes into manually removing permission bits from applications Apr 26 20:52:07 ...start the tablet...start the phone... Apr 26 20:52:13 lol p_l Apr 26 20:52:16 and intents Apr 26 20:52:24 they need to rework how they do permissions Apr 26 20:52:29 Guys, when I do new StatFs("/sdcard/dir1").getBlockCount() I always get the total number of block, regardless of which directory I use. Any idea why? Apr 26 20:52:31 right now its just "request everything, the users ignore it" Apr 26 20:52:32 canadiancow|work: the file is just a big annoying XML dump Apr 26 20:52:49 drop all permissions Apr 26 20:53:00 canadiancow|work: where's that being displayed with the duplication? Apr 26 20:53:06 https://play.google.com/store/apps/details?id=com.zynga.words Apr 26 20:53:07 there's this principle that if an animal senses danger, he'll be safer Apr 26 20:53:10 permissions tab Apr 26 20:53:12 and hi ctate! Apr 26 20:53:22 canadiancow|work: in Play Store? after install? Apr 26 20:53:27 on the web Apr 26 20:53:30 aha Apr 26 20:54:36 if someone hires you for a job, begins to pay you, then the next business day they still haven't sent you the source at 5pm, is it right to call and ask? Apr 26 20:55:10 yes Apr 26 20:55:20 yeah, probably Apr 26 20:55:23 * readme presses button Apr 26 20:55:25 it's funnier when it's across multiple timezones Apr 26 20:55:34 and the guy thinks you're busy Apr 26 20:55:38 i think the real questions is, is it right to *not* call and ask :P Apr 26 20:55:59 * p_l had that, ended up catching VP of sales near the end of workday... while it was 1am here :D Apr 26 20:56:09 wongk / Jonathan_Eyre; the relative layout idea worked - thanks! Apr 26 20:56:12 he must be a busy guy Apr 26 20:56:16 [16:55:38] i think the real questions is, is it right to *not* call and ask :P Apr 26 20:56:17 this Apr 26 20:56:25 I just called back the number I talked to him on yesterday and I got an operator for his company Apr 26 20:56:54 readme: the federales will be coming shortly, sit tight. Apr 26 20:57:09 readme: serious response: send an email. Apr 26 20:57:34 yeah I took 2 hours to work on a development plan that would save time so we didn't have to communicate as much since he is obviously busy and sent that to him Apr 26 20:57:40 I sent it in 4 formats Apr 26 20:58:28 was he a manager? you probably confused him Apr 26 20:58:31 now, next question, how do I stop the icons from being drawn too big? http://puu.sh/rE85 (that's originally a 50x50 image) Apr 26 20:58:46 wongk: hm, i think he's the ceo of a small comp. Apr 26 20:59:03 Hellu.. Apr 26 21:00:23 chrizc: you will likely want to make your FrameLayout into a ScrollView at some point, btw, in which case you may have to go with the layout_weight approach Apr 26 21:00:27 something to keep in minf Apr 26 21:00:29 mind Apr 26 21:00:31 wongk: nah, the guy who answered was just a switchboard operator or something. Apr 26 21:00:34 he said so Apr 26 21:00:46 i meant with the 4 formats :P Apr 26 21:00:47 wongk; I thought TabHost expected a FrameLayout? Apr 26 21:00:47 How can I get the number of bytes used in a particular directory? Apr 26 21:01:05 chrizc: i don't know, does it have built-in scrolling? Apr 26 21:01:14 wongk: ehh, i think pdf, html, csv, and xls should be easy enough to understand. I was afraid the xls wouldn't preserve text wrap. Apr 26 21:01:16 * chrizc shrugs Apr 26 21:01:26 I've only been developing for Android for... 2 days Apr 26 21:02:12 oh, looks like your activities will probably just need to have ScrollViews Apr 26 21:02:19 chrizc: there's not anything I can think of off the top of my head in android where one view works but another doesn't.. besides maybe inside adapters Apr 26 21:02:30 chrizc: oh god please don't use tabviews Apr 26 21:02:32 if a FrameLayout works somewhere, you can put a LolcatLayout there too. Apr 26 21:02:34 use a viewpager instead Apr 26 21:02:43 "The TabHost requires that a TabWidget and a FrameLayout both live somewhere within it." Apr 26 21:02:44 tabs are old and HORRIBLY broken Apr 26 21:02:53 .-. Apr 26 21:02:58 i hate tabs Apr 26 21:03:10 We just need to get ctate to remove all samples using TabHost on the website Apr 26 21:03:16 that's not a bad idea. Apr 26 21:03:45 then you've just got to wipe out the 5000 hello android blogs that the people who use tabs learn from Apr 26 21:03:58 What's even sadder is that one of their hello views samples uses tabhost with activities as content :( Apr 26 21:04:16 ViewPager looks like something you scroll left/right to change the page... I don't want that? Apr 26 21:04:24 chrizc: you do.. it's awesome Apr 26 21:04:29 chrizc: trust me, you do. Apr 26 21:04:30 look at the android market app Apr 26 21:04:48 swipe is natural to me now, I don't even think about it. it's like taking a whiz. Apr 26 21:04:52 readme; no, I don't, because my app will have it's own stuff to do on left/right swipe. Apr 26 21:05:05 chrizc: ..... Apr 26 21:05:07 chrizc: well, it's your app Apr 26 21:05:12 ok, up to you fella Apr 26 21:05:16 we can only tell you waht we would like to use Apr 26 21:05:24 but when you spend your 3rd day screaming at your tabs, don't blame us. Apr 26 21:05:59 the way you're asking me to do, would require buttons to go left/right pages inside my first activity. the second and third activities won't have scrollable stuff, so I wouldn't mind in them Apr 26 21:06:03 but it's the first activity Apr 26 21:06:21 you swipe to go forward/back a day, basically Apr 26 21:06:42 Hmm. Apr 26 21:06:47 Well, you definitely want the viewpager for THAT part. Apr 26 21:06:51 .-. Apr 26 21:06:52 why. Apr 26 21:06:54 How can I get the number of bytes used in a particular directory? Apr 26 21:06:58 because you get an animation out of it Apr 26 21:07:06 because that's going to be, by far, the simplest way to implement "swipe left/right to go forwards/back" Apr 26 21:07:11 when the user swipes it appears that the screen is rolling over Apr 26 21:07:22 which makes it obvious to him what is happening Apr 26 21:07:30 regarding different parts of your app, consider using the ActionBar Apr 26 21:07:33 rather than tabs Apr 26 21:07:35 ToFra: iterate through all files and add their sizes Apr 26 21:07:42 lov; actionbar? Apr 26 21:07:51 If you're targeting < 3.0, use a compatability library, like ActionBarSherlock Apr 26 21:08:31 @SimonVT: really? I hoped that there was another solution.. Apr 26 21:08:50 see http://actionbarsherlock.com/ Apr 26 21:08:53 @chrizc: use SherlockActionBar, it's amazing! Apr 26 21:08:54 :D Apr 26 21:09:04 anyone have a suggestion to disable people from making two accounts and logging in and out of my app to essentially cheat? Apr 26 21:09:13 don't Apr 26 21:09:15 chrizc: ALSO! http://developer.android.com/design/index.html Apr 26 21:09:21 how serious is cheating? Apr 26 21:09:21 I just updated my app with it, using tabs (and also fragments nows instead of activities) Apr 26 21:09:25 is it a financial loss? Apr 26 21:09:34 possibly Apr 26 21:09:38 lnxmad: you could technically tie the account to the device's serial number, but I honestly wouldn't bother trying. Apr 26 21:09:39 takes the fun out of it Apr 26 21:09:45 on the order of how much? Apr 26 21:09:57 readme: that's a question you need to talk about with your significant other Apr 26 21:09:57 you still have to deal with the possibility that the user factory resets the phone, or they sell it to someone else Apr 26 21:10:04 evancharlton: haha Apr 26 21:10:04 the trolls would take advantage Apr 26 21:10:07 ugh - i'm getting so frustrated with this stupid thing - i've flashed dozens of roms before, but for some reason, on a clean wipe and flash, i can't get my gapps to connect. i've cleared data on google accounts, i've removed and re-added all my accounts, but no dice Apr 26 21:10:08 if someone buys a used phone, buys your app, and then can't use it, well... Apr 26 21:10:12 lnxmad: you could verify phone numbers Apr 26 21:10:16 using twilio or something Apr 26 21:10:17 @lnxmad: when running your app for the first time, create an random ID. Apr 26 21:10:18 FrankDFixer: that's very sad. go to #android-root. Apr 26 21:10:19 hm Apr 26 21:10:37 that's what all the big corps do Apr 26 21:10:54 ToFra, problem with that is on a device reset Apr 26 21:11:08 readme, thats a pretty good idea. What about tablets? Apr 26 21:11:18 they can use a phone other than their android Apr 26 21:11:19 @lnxmad: yep true.. Apr 26 21:11:24 they just need to provide *a phone* Apr 26 21:11:37 hm Apr 26 21:12:34 how about Apr 26 21:12:43 account is linked to device by device id Apr 26 21:12:49 website offers unlock device Apr 26 21:13:00 lnxmad: user sells device. New owner can't use your whatever. Apr 26 21:13:15 also good luck finding a consistent unique id on android hardware Apr 26 21:13:17 How about.. user uninstalls app cus they have to go to some stupid website to "unlock" their device Apr 26 21:13:17 because there isn't one Apr 26 21:13:18 lol Apr 26 21:13:46 this is a tricky one Apr 26 21:14:01 what does your app unlock? a bikeshed Apr 26 21:14:13 hmm, how do I use IAndroidTarget to find the google apis? Apr 26 21:14:21 i was just saying it releases it from that phone Apr 26 21:14:21 17:13:27 < SimonVT> How about.. user uninstalls app cus they have to go to some stupid website to "unlock" their device Apr 26 21:14:48 and maybe a waiting period between unlocks Apr 26 21:15:05 if you really want to make a crappy application, but one that will get lots of download Apr 26 21:15:10 make a scratch/win lottery ticket Apr 26 21:15:17 SimonVT, Im sure I can put that feature in the app Apr 26 21:15:18 this unlock stuff is the pits Apr 26 21:15:21 SimonVT, good point though Apr 26 21:15:23 hmm, it's in IOptionalLibraries Apr 26 21:15:47 lov; ActionBarSherlock requires compiling for Android 4.0 or higher? Apr 26 21:16:05 chrizc: yes, and that's ok. Apr 26 21:16:07 chrizc: target, but not min. Apr 26 21:16:14 chrizc: you can target higher apis, but still run on lower apis. Apr 26 21:16:14 readme, how is it "in the pits"? Apr 26 21:16:21 * chrizc is confus Apr 26 21:16:26 see http://developer.android.com/training/basics/supporting-devices/platforms.html Apr 26 21:16:31 lnxmad: i dunno, it sounds vague and as if the details of it will not be realized any time soon Apr 26 21:16:35 android has a VERY strong emphasis on backwards compatability Apr 26 21:16:56 tell us more Apr 26 21:16:58 your project's compile api is what you're building against. Apr 26 21:17:06 your targetSdk is the highest level you've tested on. Apr 26 21:17:11 the minSdk is the lowest level you'll run on. Apr 26 21:17:16 that's the short version. Apr 26 21:17:31 so set your project's api level to 15, and set the minSdk in the manifest to whatever the lowest level you plan to support is Apr 26 21:24:24 so Amazon let my app through the first time no problems, then I tried uplading an update (bug fixes) and it went under review then denied because it Apr 26 21:24:34 doesn't load config changes on the youtube video screen Apr 26 21:24:36 even though it does Apr 26 21:24:49 lov; do you have a tutorial for ActionBarSherlock? They don't seem to have any useful tutorials. Apr 26 21:25:03 chrizc: I don't, but you can bug JakeWharton :> Apr 26 21:25:10 alternately, look at the docs for the ActionBar. Apr 26 21:25:18 chrizc: there are videos on youtube Apr 26 21:25:20 action bar sherlock exposes the native action bar API Apr 26 21:25:24 http://developer.android.com/guide/topics/ui/actionbar.html Apr 26 21:25:29 once it's set up, just look for normal action bar tutorials Apr 26 21:25:51 and call getSupportActionBar instead of getActionBar Apr 26 21:25:52 There's videos, samples included in the library, as well as a usage page on the website Apr 26 21:26:05 videos are a crappy resource to learn from Apr 26 21:26:26 anything is better than "you can bug JakeWharton" :D Apr 26 21:26:43 :D Apr 26 21:27:12 pragma-: better let sal khan and bill gates know about this Apr 26 21:27:19 Hi, does anyone know if much has changed in for networking between android 2.3 and android 4? I have some code that works on 2.3, it's fairly simple, but on Android 4 it's throwing an error. Apr 26 21:27:30 So with an ActionBar... I just need a singular Layout on my screen? or does the action bar require it's own Layout? Apr 26 21:27:44 the action bar is part of the window's decor view Apr 26 21:27:54 think of it like the title view on pre-Honeycomb Apr 26 21:27:58 The error 4 is throwing is... "Error in http connection android.os.NetworkOnMainThreadException", but the strange thing is.. it's in a handler, so... that shouldn't be the main thread if I understand correctly Apr 26 21:28:15 You didn't understand correctly Apr 26 21:28:20 a handler goes on whatever thread you make it on Apr 26 21:28:27 rats :( Apr 26 21:28:29 or you can pass one in its constructor Apr 26 21:28:35 What JakeWharton said Apr 26 21:28:52 I think I need to read up a little Apr 26 21:29:01 I need to make the handler a new thread, is there a super easy way to do that? Apr 26 21:29:13 HandlerThread Apr 26 21:29:21 Thanks, i'll google around that Apr 26 21:37:56 SimonVT, JakeWharton: Would I be as well using a AsyncTask rather than a handlerThread? Would an AsyncTask allow me to use http connections ( Be it's own thread )? Apr 26 21:38:09 yes, but it has its own pitfals Apr 26 21:38:31 I've actually never used HandlerThread Apr 26 21:38:35 me neither Apr 26 21:38:37 I should probably look into it Apr 26 21:38:43 see what the big deal is Apr 26 21:38:54 maybe it's an Android API that doesn't suck Apr 26 21:38:59 is onPause called when you display a dialog? Apr 26 21:39:08 no Apr 26 21:39:09 All it should be doing is pulling a JSON, decoding it, then adding rows to a tableview... perhaps AsyncTask would be better? Apr 26 21:39:19 I don't know if I would then have problems updating the UI from a different thread though Apr 26 21:39:19 NutterzUK: yes, just use AsyncTask Apr 26 21:39:30 <3 HandlerThread Apr 26 21:39:32 no, AsyncTask has callbacks that automatically go to the UI thread Apr 26 21:39:41 it's basically just a really easy way to spin off a new looper thread Apr 26 21:39:41 Awesome, thanks! Apr 26 21:39:43 ctate: what's the Twitter pitch for HandlerThread (i.e., 140 chars) Apr 26 21:39:56 hmm Apr 26 21:39:58 AsyncTask it is... and when i'm under less pressure.. i'll take a look further into the differences with HandlerThread Apr 26 21:40:06 "much easier than managing Looper.loop() by hand" Apr 26 21:41:44 seriously, the class doc comment describes it pretty well: Apr 26 21:41:51 me | Handy class for starting a new thread that has a looper. The looper can then be used to create handler classes. Note that start() must still be called. Apr 26 21:42:16 iswydt Apr 26 21:42:41 finally, I think I have robolectric ready to write tests with Apr 26 21:42:43 man, what a pita Apr 26 21:42:49 mm, pita Apr 26 21:42:53 and robolectric is so annoying when it complains that it can't find googleapis Apr 26 21:42:58 with felafel and tzatziki Apr 26 21:43:07 just stfu damnit, I don't care if you can't find googleapis Apr 26 21:44:32 * pfn updates his sbt plugin, yay Apr 26 21:46:48 Hi, is there any way to intercep an move event and transfer it to another view? The onInterceptTouchEvent method is called only at the touch DOWN, but after the LongClick that I need to change the view handling the touch move. Is it possible? Apr 26 21:48:32 Robolectric is a black box of horrors Apr 26 21:49:19 JakeWharton, I don't need it for UI tests so that's probably ok for me right now Apr 26 21:49:24 in ShadowListActivity they do a DFS casting everything to ViewGroup rather than just doing findViewById(android.R.id.list) Apr 26 21:49:48 it /seems/ to be useful for testing on jvm, which is what I *really* want Apr 26 21:50:01 yeah it's useful, until you do something they never needed Apr 26 21:50:22 that's how frameworks generally are if they're just contributed Apr 26 21:50:26 Hi! I have a couple of preference components in my app, e.g. two ListPreference components. I want to listen to onSharedPreferenceChanged(...) for both of them. But when I do so, when I want to manage the second ListPreference inside the method, I got a NullPointerException. Why?! How is it possible to listen to changes for more than one preference component? I have googled and googled but didn't found much of intere Apr 26 21:50:27 st. Apr 26 21:54:37 readme, http://android-developers.blogspot.com/2011/03/identifying-app-installations.html Apr 26 21:56:19 meck0: without any code pasted, I can only imagine at what gibberish you've constructed to manage to mess up something so simple. Apr 26 22:01:03 pragma-, pastebin.com/nd6KpCRe Apr 26 22:04:17 JakeWharton, evancharlton, ctate: Thanks for the pointers, has really helped me. I have it working now with an AsyncTask. I think I was overcomplicating things before Apr 26 22:04:49 \o/ Apr 26 22:05:04 does android support storing cookies? Apr 26 22:08:45 when it comes to recurring task/alarm, curious on people's opinions... is it better to set the next alarm after the current alarm goes off (and create the next task in DB) OR do all of this upon completion of the current task? Apr 26 22:09:02 what's it take to get a redonkulous credit card limit... Apr 26 22:09:23 there could be instances where the user never completed the current task but that shouldn't prevent the creation of the next one, so I'm thinking to just do it after current alarm triggers i.e. do this work in my alarm receiver Apr 26 22:10:21 I do not want to set the recurring alarm, would rather create one-time alarms. The Android built-in alarm clocks handles recurring this way too Apr 26 22:11:19 i do it after, but at the end of the day, it's not really a big deal Apr 26 22:11:35 unless your alarm time is realtively close to the time it takes to complete the action Apr 26 22:13:14 so for example, i have a recurring task like "take out the trash at 9pm" for example... once the alarm goes off at 855p (let's say I had 5 min reminder set), then once the alarm goes off... it makes sense to create the next day's task for the user at that time right? Apr 26 22:13:44 are you dealing in absolutes? Apr 26 22:13:46 if the old task remains uncompleted, i'll let the user deal with what to do with old tasks. I'll simply create the next iteration for them automatically. Apr 26 22:14:01 wongk-home: what do you mean by absolutes in this case? Apr 26 22:14:07 9:00 Apr 26 22:14:12 oh yes Apr 26 22:14:13 vs. 15 min from now Apr 26 22:14:24 the it really doesn't matter Apr 26 22:15:12 hi, does anyone have experience with the Drawview/custom view? Apr 26 22:15:40 the one use case I'm struggling with how to deal with is... a user creates a task where initially no alarm is set but they set it to recurring. Since no initial alarm will trigger, I'm not sure how to create the next task. Only thing, which is weird to do, would be to check if alarm is active and if not, create the next task right there since I know that will trigger. Apr 26 22:16:28 how do you have a recurring non-alarm Apr 26 22:16:40 I notice even popular apps like Any.DO have broken recurring alarms. I tested it last night and it doesn't work consistently. I'd like mine to be better designed. Apr 26 22:16:44 wongk-home: like this... Apr 26 22:16:53 I have implemented basic shapes and colours using it. Does anyone have suggestion for something else I could make with the DrawView? Something slightly more complicated? Apr 26 22:16:59 does that mean don't have an alarm go off every day at 9:00? :P Apr 26 22:17:21 User creates task "Take out trash at 9pm" and sets it for start date today but its already 8:59pm so no alarm will go off yet they set it to recurring daily. Apr 26 22:18:10 your logic to determined the next alarm should handle that Apr 26 22:18:29 so task is due at 9pm and its 859pm -- with alarm reminder set to 5 mins, I do not set a one-time alarm in my code because the current time MUST be less than task time - reminder. Apr 26 22:18:57 you should set the alarm Apr 26 22:19:07 for the next day at 8:55 Apr 26 22:19:15 this seems simple, am i missing something? Apr 26 22:19:54 wongk-home: true but that task they set as "start date 4/26/2012 9pm" would set alarm for the next day? Here's what I want to do in ideal case .... Apr 26 22:20:10 why wouldn't it? Apr 26 22:20:21 user creates task 4/26 9pm take out the trash, alarm gets set... when alarm goes off, I create a new task with date 4/27 9pm and set alarm for them. Apr 26 22:20:47 so they'll have old task plus the new one - 2 rows (tasks). They can mark the old (current) task completed and delete it... it's now independent. Apr 26 22:21:56 hmm maybe I shouldn't be using the verbage start date in this conversation, the task date label and logic is built around it being "due date" Apr 26 22:22:16 i still don't see the complication, you have a special case when time - reminder < now < time Apr 26 22:23:05 from a user's perspective, the app creating a 2nd instance of the task for them for the next iteration isn't annoying is it? Apr 26 22:23:22 i can Apr 26 22:23:23 er Apr 26 22:23:33 i can't say since i have no idea what your app is Apr 26 22:23:41 but i have to leave anyway :P Apr 26 22:23:49 ok thanks for the convo Apr 26 22:28:10 Question, I am running a 2.3.3 x86 image in the emulator with VM Acceleration. But no languages other than English is available. Apr 26 22:28:22 How can I access the other locales? Apr 26 22:29:01 I have implemented basic shapes and colours using it. Does anyone have suggestion for something else I could make with the DrawView? Something slightly more complicated? Apr 26 22:29:06 Hi, is there any way to intercep an move event and transfer it to another view? The onInterceptTouchEvent method is called only at the touch DOWN, but after the LongClick that I need to change the view handling the touch move. Is it possible? Apr 26 22:29:44 Is it possible to disable an scrollview scrolling without disabling the onTouch for it's children? Apr 26 22:30:16 viperfx: a racecar Apr 26 22:31:15 what? Apr 26 22:31:29 is there a sane way to take a row in a sqlite db and insert it back into the same table as a new row? Apr 26 22:31:36 Something sensible please :) Apr 26 22:31:47 viperfx: a star Apr 26 22:32:44 How can i convert from byte[2] to short? (the byte array is signed and with little endian). Apr 26 22:33:08 Is it possible to create a sin wave that is animated in the drawView/ Apr 26 22:33:11 ? Apr 26 22:33:42 Hmm, the 2.3.3 ARM image has all other locales, the x86 one only English... Apr 26 22:39:07 Guys, is it possible to have a news article with the text going around the picture? (like the float in css) Apr 26 22:39:40 Hello. I have a dozen ImageViews on a RelativeLayout. What's the best way to toggle their visibility in one swoop? I was hoping I could group them somehow, but I'm not sure how. Apr 26 22:40:05 Is there a better way than finding them one by one and toggling the visibility of each one? Apr 26 22:41:16 <18VAAH4HT> luis: change the visibility of the parent? Apr 26 22:41:41 18VAAH4HT: well, but what should the parent be? Apr 26 22:42:00 luis, the parent could be viewgroup Apr 26 22:42:12 luis: you just said you have a RelativeLayout Apr 26 22:42:34 ahoy Apr 26 22:42:39 romainguy: the RelativeLayout is the top-level layout, which contains other stuff (to which those images relate). Apr 26 22:42:50 then just loop over the images Apr 26 22:43:10 I guess that'll have to do. Thanks. :) Apr 26 22:43:31 yurakeshi: not sure what you mean :-/ Apr 26 22:44:40 luis, an RelativeLayout is a ViewGroup for example. Apr 26 22:45:03 you can create another layout that just have the images, so you can toggle it's visibility Apr 26 22:46:32 yurakeshi: problem is I want to relate those images to other views in the top-level RelativeLayout. Apr 26 22:48:02 yurakeshi, what do you mean by relate? Apr 26 22:49:08 yurakeshi: they use android:layout_toLeftOf="foo" and stuff like that. Apr 26 22:50:20 luis, uhm... so your best option is to loop the images i guess... create an array with all images and go trought it Apr 26 22:50:28 luis, where u from? Apr 26 22:51:40 yurakeshi: heh. Sou português! Apr 26 22:52:01 oh, sou brasileiro! =) Apr 26 22:53:43 Can animations of paths be done in DrawView? Apr 26 23:11:53 if anyone wants to have a look at my android port of libvisual, feel free to comment https://github.com/Libvisual/LibVisualAndroid (JESS, jakdaw and oinksie actors currently crash, mic input not working yet, just sine wave) Apr 26 23:12:40 and there are probably lots of bugs in the java code (and probably also the C++ code :) feel free to show some love Apr 26 23:14:46 rigid: ... you put JESS into Android? Apr 26 23:16:17 p_l: yes, but it's crashing currently Apr 26 23:16:27 but it will be fixed Apr 26 23:17:12 also blursk... Apr 26 23:17:42 hi Apr 26 23:18:35 rigid: I'm not sure if I should be impressed or hold my phone dearly to protect it Apr 26 23:19:06 p_l: lol, why? :) Apr 26 23:19:59 p_l: i guess there are multiple JESS projects out there... i'm talking about the audio visualization one Apr 26 23:20:00 rigid: probably because I had to use it together with Protege, and that can sour any relationship Apr 26 23:20:08 rigid: ah Apr 26 23:20:24 I'm used to JESS meaning a certain rule production language Apr 26 23:20:24 ah, the rules engine for java? Apr 26 23:20:25 for some reason my ListView is not getting "onItemTouch" events. The 2 sets of xml for the listview and the rows is here: http://pastebin.com/z252QgmVand this is the code where i attach the item listener to the view. http://pastebin.com/LKqWz031 --- I get no toast notifications and no log output at all. Help! Apr 26 23:20:52 that's not the same thing... libvisual is a framework to visualize audio like "winamp plugins" in the early days Apr 26 23:22:21 id love some support! It seems a lot of people have similar issues and its because something else is grabbing the touch events... Apr 26 23:22:28 but i have tried to use the notFocusable tag Apr 26 23:22:30 in the xml Apr 26 23:22:31 as you can all see Apr 26 23:23:14 yo dawg i heard you like listviews Apr 26 23:23:35 yes! Apr 26 23:23:54 ListView inside a ListView? That's a paddlin'. Apr 26 23:24:25 can somebody offer specific help? Apr 26 23:24:54 well, your pastes are gone Apr 26 23:24:59 !? Apr 26 23:25:00 woopsie Apr 26 23:25:10 oh i see, no space before "and" Apr 26 23:25:11 what on earth Apr 26 23:25:12 one sec Apr 26 23:25:23 http://pastebin.com/z252QgmV Apr 26 23:25:24 http://pastebin.com/z252QgmV Apr 26 23:25:26 is the resources Apr 26 23:25:26 thats the first one :) sorry Apr 26 23:28:06 any ideas? Apr 26 23:28:09 what's the difference between compability library v4 and v13? Apr 26 23:29:08 9? Apr 26 23:29:24 lol ctate can you help me mate? Apr 26 23:29:31 anyone here familiar with the contact manager? Apr 26 23:29:52 andywdc: i'm afraid i don't get along with ListView Apr 26 23:30:06 nm found it Apr 26 23:30:15 i'm interested in knowing in what situations the contact manager will create contacts for accounts that arent "phone-only" Apr 26 23:30:32 what's wrong with ListView? Apr 26 23:30:32 darn Apr 26 23:30:38 damccull can u help me? Apr 26 23:30:41 for some reason my ListView is not getting "onItemTouch" events. The 2 sets of xml for the listview andthe rows is here: http://pastebin.com/z252QgmV and this is the code where i attach the item listener to the view. http://pastebin.com/LKqWz031 --- I get no toast notifications and no log output at all. Help! Apr 26 23:30:41 dunon Apr 26 23:30:42 dunno Apr 26 23:31:00 lemm elook Apr 26 23:31:27 is getListView() returning the right thing? Apr 26 23:31:42 by onItemTouch do you mean onItemClick? Apr 26 23:32:33 I assume this code is encapsulated by a ListActivity or ListFragment, yes? Apr 26 23:32:49 oh huh, yeah, there is no onItemTouch() method Apr 26 23:32:53 damccull yes, and ctate yes Apr 26 23:33:01 why is that even compiling, given the @Override? Apr 26 23:33:11 which andywdc? fragment or activity? Apr 26 23:33:33 ListActivity Apr 26 23:33:44 andywdc, I usually do an in-line handler, tbh. Apr 26 23:34:15 getListView().setOnItemClickHandler(new OnItemClickHandler{etc...}); Apr 26 23:35:39 ive tried that Apr 26 23:35:43 Then i don't even have to implement onItemClickLIstener Apr 26 23:35:44 makes no difference Apr 26 23:36:35 oh i found your problem Apr 26 23:36:38 probably Apr 26 23:37:09 onItemClick() -> onListItemClick() Apr 26 23:37:25 ok...so waht are you saying mate? Apr 26 23:38:22 Well, put your code in the method on the right Apr 26 23:38:25 onListItemClick Apr 26 23:38:32 then you shouldn't have to register a listneer at all Apr 26 23:38:46 it's built into the actvitity to use that event Apr 26 23:39:03 You only have to register listeners on ListViews I think Apr 26 23:39:12 ListActivity has the functionality built in Apr 26 23:41:06 erm Apr 26 23:41:10 so i now have the following Apr 26 23:41:23 public void onListItemClick(AdapterView arg0, View arg1, int position, long arg3) { Apr 26 23:41:27 and its still not being called Apr 26 23:41:45 son of a bitch my debug cert expired Apr 26 23:41:45 T_T Apr 26 23:42:50 andywdc: this is a ListActivity? then aren't you supposed to just @Override onListItemClick(ListView l, View v, int position, long id) in your activity class? Apr 26 23:43:09 not AdapterView Apr 26 23:44:32 andywdc, http://pastebin.com/uxEirmk0 <-- this is working code. Apr 26 23:44:48 so far none of these suggestions are working for me, gona look at this paste Apr 26 23:46:07 neither does that work Apr 26 23:46:08 :@ Apr 26 23:46:12 w t f Apr 26 23:46:15 Now peeps, I have a question of my own: The following are in a SherlockListFragment: http://pastebin.com/BLR3syP8 Why does onActivityResult() never get called? In the child activity, a fragment calls getSherlockActivity().setResult, then finish(). Apr 26 23:46:17 time for a minimal test case & layout Apr 26 23:46:29 andywdc, paste entire class if possible Apr 26 23:47:23 canadiancow|work: I just generated a debug cert with the debug alias and password for 10,000 days Apr 26 23:47:28 SOLVED FOREVER. Apr 26 23:47:52 pretty much the way to do it Apr 26 23:48:01 evancharlton lol Apr 26 23:48:03 s/FOREVER/30 YEARS/ Apr 26 23:48:05 just don't release an app with it on accident Apr 26 23:48:06 ftfy Apr 26 23:48:11 is a debug cert a special kind? Apr 26 23:48:21 ctate: 30 years from now I'll have made my trillions and be drinking scotch in my cabin in the woods Apr 26 23:48:27 oh that's all right then Apr 26 23:48:58 Here is is mate : damccull http://pastebin.com/WczeFt37 Apr 26 23:51:43 andywdc, is your logcat showing that sc2 entry? Apr 26 23:51:50 from the on touch Apr 26 23:51:51 no Apr 26 23:53:52 its possible i suppose that the list is being populated after the activity assigns the handler to it...would that make a difference Apr 26 23:54:05 andywdc, your xml is now broken too Apr 26 23:54:09 change the listview id Apr 26 23:54:11 to: Apr 26 23:54:26 @android:id/list Apr 26 23:54:52 I bet this change makes it MAGICALLY WORK Apr 26 23:55:14 and no, the order of assign/populate doesn't matter. Apr 26 23:55:39 The listener is set on and handled by the listview, not the individual elements. Apr 26 23:56:18 It's not working because your onListItemClicked is using the listview that is built into ListActivity, and not your custom listview Apr 26 23:56:30 if you set the ID properly of yours, it will override the built in one and use yours Apr 26 23:56:35 android:id/list Apr 26 23:56:43 @android:id/list Apr 26 23:56:50 no difference :@ Apr 26 23:56:55 orly? Apr 26 23:57:18 On GoogleTV, anyone knows how a user would access files in the External Storage directory (returned by Environment.getExternalStorageDirectory()) for example to copy them on its PC ? Apr 26 23:57:48 damccull: did you read the startActivityForResult docs? Apr 26 23:57:52 andywdc, android:id="@android:id/list" yes? Apr 26 23:58:00 "requestCode If >= 0, this code will be returned in onActivityResult() when the activity exits." Apr 26 23:58:03 bubbleguuum adb Apr 26 23:58:12 oh wait you pass in zero Apr 26 23:58:17 JakeWharton, yes. And I did pass 0 ;) Apr 26 23:58:33 canadiancow|work: isn't there another way ? adb is for developers.. Apr 26 23:58:37 yep Apr 26 23:58:38 illshow u Apr 26 23:58:43 how else would they do it Apr 26 23:58:47 file a bug Apr 26 23:58:55 android:id="@android:id/list" Apr 26 23:58:55 android:layout_width="fill_parent" Apr 26 23:58:55 android:layout_height="fill_parent" Apr 26 23:58:55 /> Apr 26 23:59:06 JakeWharton, me? Apr 26 23:59:11 yeah Apr 26 23:59:13 canadiancow|work: only thing I can think of is emailing it from a 3rd party file manager through Intent Apr 26 23:59:15 if it truly doesn't work Apr 26 23:59:16 With you or google? Apr 26 23:59:18 google Apr 26 23:59:21 has nothing to do with ABS Apr 26 23:59:29 well I honestly think I'm just doing it wrong... Apr 26 23:59:52 i think Apr 26 23:59:53 lol Apr 27 00:00:20 read the docs, find examples, create small reproducible test cases Apr 27 00:01:04 this is madness damccull!! EVen with all this help! Apr 27 00:01:28 JakeWharton, k thanks :) Apr 27 00:01:38 it looks right to me Apr 27 00:01:43 so not sure what to tell you Apr 27 00:05:01 What's the best approach to make a button whose visual state is entirely an image (no other button chrome around it)? ImageButton seems to want to put other stuff *around* the image specified in src. I could use an ImageView, but then I don't see how to set a tapped state Apr 27 00:05:32 what are my next steps guys Apr 27 00:06:03 JakeWharton, thansk for looking at it :) Apr 27 00:06:16 wyvern`, use an imagebutton Apr 27 00:06:28 set background attribute to null, or in xml @null Apr 27 00:06:38 damccull: hm, thought I tried that -- I'll double check Apr 27 00:06:40 or set the background to your image Apr 27 00:06:58 there's probably default padding and margins on the different platforms though Apr 27 00:07:01 so i'd normalize those Apr 27 00:07:17 you should also use a state-list drawable ideally so that there are pressed and focused states Apr 27 00:08:13 andywdc, next step: Copy your class to a new one, remove ALL the code EXCEPT that affecting the operation of the list (ie. no dropbox etc) and fill it with junk data, then figure out what's wrong. When it works, make the mods to your main class :) Apr 27 00:10:23 JakeWharton, damccull: I'm using a state list, but I don't see how to size the ImageButton correctly. It shows a greatly zoomed in part of the src images Apr 27 00:11:03 that i don't know wyvern` Apr 27 00:16:08 damccull, its happening in returnres i think Apr 27 00:16:33 andywdc, what? Apr 27 00:16:56 this function Apr 27 00:18:01 private Runnable returnRes = new Runnable() { Apr 27 00:18:01 @Override Apr 27 00:18:01 public void run() { Apr 27 00:18:01 if(m_replays != null && m_replays.size() > 0){ Apr 27 00:18:01 m_adapter.notifyDataSetChanged(); Apr 27 00:18:01 for(int i=0;i m_adapter.add(m_replays.get(i)); Apr 27 00:18:02 } Apr 27 00:18:03 m_ProgressDialog.dismiss(); Apr 27 00:18:03 m_adapter.notifyDataSetChanged(); Apr 27 00:18:04 } Apr 27 00:18:05 **sorry Apr 27 00:18:12 i dont know, it might be inhere Apr 27 00:18:21 if i dont make any complicated calls, and just add 2 random entries, it all works fine Apr 27 00:18:38 if i make the scary calls to my other classes, they start other threads, and call back to this one when its done Apr 27 00:18:40 to call this method Apr 27 00:18:51 ahem. please don't paste code here in the channel if it's more than like 2 lines. Apr 27 00:19:03 i know, sorry Apr 27 00:24:53 andywdc, why are you notifying the adapter instead of the list that it changed? Apr 27 00:26:55 OH! JakeWharton it IS getting to onActivityresult...just my other code must be bugged up Apr 27 00:26:57 w00t Apr 27 00:33:42 sigh...i hate tracking down stupidity. Apr 27 00:33:46 i should stop coding tired. Apr 27 00:34:07 My ENTIRE PROBLEM that I just spent two days trying to fix: I didn't put .show() after my toast. Apr 27 00:34:44 you deserve it Apr 27 00:34:45 :p Apr 27 00:39:32 damccull,i fixed mine too Apr 27 00:39:41 not really sure what was wrong with what i did Apr 27 00:39:42 but basically, Apr 27 00:39:50 by keeping everything in one thread, it worked Apr 27 00:40:06 by trying to do list population in the backgrouind - visually it works, but events thereafter die Apr 27 00:40:45 Anyone set up Eclipse with the Android SDK today? Apr 27 00:40:55 I went to upgrade. Apr 27 00:41:41 And I can barely get a package list, let alone get a package to install. (three computers, four different internet connections) Apr 27 00:42:06 andywdc, yo uonly have 1 listview right? Apr 27 00:42:39 yeah damccull Apr 27 00:42:49 andywdc, then i dunno :) Apr 27 00:42:50 sorry man Apr 27 00:45:33 yeah - now its all working in the worst performing state **1 thread , populating list on ui thread** - i can gradually and properly get that bit running on the background thread Apr 27 00:46:22 When I specify src= for an ImageButton, I only see a tiny bit of the image that's been scaled way up to fill the button size, but it has at least been scaled properly (preserving aspect ratio), and the button respects the setMaxWidth that I set in code. Apr 27 00:46:52 If I set background= for the ImageButton, the button shows the whole image,but scaled so that it's too tall, and it is as wide as the screen Apr 27 00:46:58 thanks again Apr 27 00:46:59 nn Apr 27 00:48:01 wyvern` - look into setgravity Apr 27 00:48:05 andywdc, you weren't creating a new listview for updates right? Just updating the dataset? Apr 27 00:48:29 hey guys Apr 27 00:48:32 romainguy! Apr 27 00:48:36 ^_^ Apr 27 00:48:39 anywayz Apr 27 00:48:44 i have a headerview on my ListView Apr 27 00:48:59 but by using setEmptyView it gets rid of my HeaderView Apr 27 00:49:14 is there anyway to get setEmptyView and HeaderView to showup at the same time? Apr 27 00:49:20 meetoman, listview probably only needs a 'hearder' when it has content. Apr 27 00:49:36 you could create a custom xml layout with a view and a listview Apr 27 00:49:43 and setContentView to that Apr 27 00:49:59 just make sure to android:id="@android:id/list" on your listview Apr 27 00:50:14 orbiting: looking? do I set that on the ImageButton or what? Apr 27 00:50:36 or manually do it in FrameLayout then? Apr 27 00:50:48 So...is it better to access an sqlite database directly with SQL, or create a content provider that will do that for me? I need not offer this data to any other app. Apr 27 00:51:00 meetoman, i would use a vertical linearlayout Apr 27 00:51:07 with your view on top and the listview beneath Apr 27 00:51:45 orbiting: not seeing how gravity would affect the problems I'm having. Can you elaborate? Apr 27 00:51:50 ok Apr 27 00:52:05 but taht would pretty much get all the listview covering it Apr 27 00:52:44 meetoman, what? Apr 27 00:52:45 meetoman, if you give your listview the id i showed earlier, it'll use the listview in your xml layout exactly as it would the builtin listview. Apr 27 00:53:16 meetoman, use layout_weight to define size ratios between your view Apr 27 00:53:27 like... your view to 1, then listview to 4 Apr 27 00:53:40 gives your view 1/5th of the screenspace, and lsitview 4/5 Apr 27 00:55:29 i got it =) Apr 27 00:55:39 thanks damccull, i like tha tname Apr 27 00:55:40 name Apr 27 00:57:07 meetoman, what name? Apr 27 00:57:33 damccull Apr 27 00:57:39 is it possible to make logcats buffer be unlimited in eclipse? Apr 27 00:57:42 oic Apr 27 00:57:57 vadi2, you mean for exceptions? :) Apr 27 00:58:18 Just for scrolling as well Apr 27 00:59:14 gnome-terminal's scrollback can be set to unlimited, it's pretty handy. Apr 27 00:59:47 oh neato Apr 27 01:11:56 iFork: Whenever I boot android 4.0 for X86 it says "Unfortunately, System UI has stopped Apr 27 01:12:15 And the popup it says it in keeps reappearing after I click ok Apr 27 01:15:12 Help? Apr 27 01:19:41 what would be the easiest way to animate 3 dots after some text? Apr 27 01:20:09 something like this: waiting . waiting .. waiting ... and so on Apr 27 01:20:28 a finite state machine? Apr 27 01:22:15 Ginto8, with the logic I don't have a problem but my question is more on the UI side I guess Apr 27 01:22:39 one way I see is to post a runnable every 200 ms or so that would update the text Apr 27 01:25:23 etuleu, easiest way to do it Apr 27 01:25:49 pfn, updating the text using a runnable? Apr 27 01:25:55 etuleu, yes Apr 27 01:25:59 cool thanks Apr 27 01:26:08 hm? i'm getting java.lang.OutOfMemoryError: bitmap size exceeds VM budget. How should I go about debugging memory leaks on Android? Apr 27 01:27:01 use MAT Apr 27 01:28:49 ok, i'll look it up. I'm surprised what I'm doing is causing problems anyway? The first activity run (let's say 'A1') checks if it's the first run. If so, starts A2 and calls finish(). One button in A2 launches A1 again? taht's when it OOMEs Apr 27 01:29:03 seems odd that anything I could do in that little code could leak that much ram :) Apr 27 01:32:15 hm? the heap related buttons in DDMS are disabled for the emulator. Is that expected? Apr 27 01:36:42 for all apps including the one you're trying to debug? Apr 27 01:37:32 ah, never mind, got it working Apr 27 01:38:39 guys, how do you get java sdk in 12.,04? Apr 27 01:38:43 oracle >_< is not good >_< Apr 27 01:38:55 ubuntu? Apr 27 01:39:02 yeah Apr 27 01:39:03 :( Apr 27 01:39:18 download the java installer, run chmod +x on it, then execute it Apr 27 01:39:20 Afzal, download directly from oracle Apr 27 01:39:32 why make it more difficult by insisting it come from an apt repos Apr 27 01:39:46 ubuntu users are worse than windows users.... Apr 27 01:39:48 hm? I'm at 57% used of a 7.5MB heap right before it OOMEs Apr 27 01:39:50 upgrade to Ubuntu 10.04 Apr 27 01:40:00 >:) Apr 27 01:40:03 ctate: heh Apr 27 01:40:08 ctate, I thought it got removed from older versions' repos too Apr 27 01:40:16 wyvern`, you're doing one big allocation... Apr 27 01:40:23 wyvern`, that oome should be the cause then Apr 27 01:40:29 yeah i think the debian et fils people don't host the sun jvm any more Apr 27 01:40:49 pfn: it's when loading an activity whose background is a ~100k png Apr 27 01:41:11 wyvern`, too high res then Apr 27 01:41:26 100k *compressed*? Apr 27 01:41:27 wyvern`, memory usage of a bitmap is res * depth Apr 27 01:41:31 The client wants a full background image? :/ Apr 27 01:41:58 a 1280x720 png would be at least 3686400 Apr 27 01:42:01 in memory Apr 27 01:42:09 ctate, hahahaha Apr 27 01:42:11 it's 960x640 Apr 27 01:42:17 163k compressed Apr 27 01:42:20 so, 960 * 640 * 32 bpp Apr 27 01:42:20 960x640? who the hell came up with that figure Apr 27 01:42:30 2.5mb at minimum Apr 27 01:42:31 Originally an iphone 4 asset, I suppose. Apr 27 01:42:45 a paltry 2.5 megs Apr 27 01:42:54 shouldn't be enough to oome.... Apr 27 01:43:19 depends on what else is going on, how many of them you're actually allocating, etc. Apr 27 01:43:32 The activity I'm currently on ALSO has one of those images. Apr 27 01:43:42 Is there a way I can dealloc, or at least release pointers to, the current activity's background? Apr 27 01:44:01 bitmap.recycle() Apr 27 01:44:02 (not the exact same image, but another full-screen one) Apr 27 01:44:23 what kinda app wants a full-bleed background? Apr 27 01:44:23 yuck Apr 27 01:44:25 unless it's a game Apr 27 01:44:39 Client gets what client wants? :/ Apr 27 01:45:01 client needs to be educated on the platform Apr 27 01:45:44 If I call finish() on the current activity, that is apparently not enough to allow it to be GC'd before starting the next one. Is this intended to be the case? Apr 27 01:45:56 iOS apps that expect to use the entire half gig of ram themselves, that's who Apr 27 01:46:23 wyvern`: it's sort of expected; gc's are always asynchronous Apr 27 01:46:36 oh, sure, but it should try to gc before OOMEing Apr 27 01:46:36 you *could* explicitliy force a GC in the onCreate() of the following activity Apr 27 01:46:38 that shouldn't be a problem Apr 27 01:46:48 you have a memory leak in your previous activity then Apr 27 01:46:52 oh, it does a gc while trying to fulfil the allocation request Apr 27 01:46:57 at least on the jvm Apr 27 01:47:06 yeah thsi sounds like you may have other issues Apr 27 01:47:07 because gc always occurs before OOME Apr 27 01:47:22 Leaks, or just that I have several beefy images loaded? Apr 27 01:47:24 the vm only declares oom if it's unable to fulfil the request even after GCs Apr 27 01:47:32 it's literally an activity whose only job is to show two buttons Apr 27 01:47:33 how do you force a GC? Apr 27 01:47:40 wyvern`, take an hprof dump and jhat time Apr 27 01:47:41 seems hard to believe I could be leaking severely in that Apr 27 01:47:46 yeah Apr 27 01:47:49 wooo... Apr 27 01:48:12 there's System.gc() but it's technicnally allowed to just schedule the GC Apr 27 01:48:14 wyvern`, also turn on StrictMode and set a leaking objects vm policy Apr 27 01:48:14 but given that i have one full-screen image and a huge logo on top of that (why are these separate images? Who knows), there goes 3mb of ram right there Apr 27 01:48:18 yeah that won't force it Apr 27 01:48:35 hehe I like the java doc Apr 27 01:48:37 wyvern`, you'll at least get alerts that you're leaking the activity, or whatever Apr 27 01:48:43 yeah Apr 27 01:48:46 "Calling the gc method suggests that the Java Virtual Machine expend effort" Apr 27 01:48:47 ctate: and even then, gc() doesnt guarantee anything Apr 27 01:48:59 suggest to expend effort haha Apr 27 01:49:02 wyvern`, at that point, you can start using jhat to determine why you're leaking what it says you're leaking Apr 27 01:49:15 calling System.gc is generally worthless Apr 27 01:49:17 I will try explicitly recycling the bitmaps in the first activity right before finish() Apr 27 01:49:24 pfn: yeah jhat and I are old friends Apr 27 01:49:40 * pfn generally doesn't like jhat so much, but it's the most readily available tool Apr 27 01:49:53 * pfn go home & Apr 27 01:50:00 yourkit is pretty nice Apr 27 01:50:06 so just run the bin file on oracle's website? (for amd64?) Apr 27 01:50:19 sorry, i'm in an airport and i'm download the jdk :( lool Apr 27 01:50:19 yep, ubuntu users are worse than windows users :) Apr 27 01:50:32 Q: suppose my app launch an external activity in another app from another publisher. Is there any way for my app to terminate this activity without the user having to manually exit it with the back button ? Apr 27 01:50:37 if you download the .bin file; sh jdkblahblahblah.bin Apr 27 01:50:40 type yes Apr 27 01:50:41 hit enter Apr 27 01:50:42 done Apr 27 01:51:12 speaking of which, jdk7 is out for os x as of today, finally! Apr 27 01:51:16 well, I suppose you need to add it to your path, or move it to the right place Apr 27 01:51:25 boring :p Apr 27 01:51:28 yeah oracle's distribution of the jdk is amazingly sane Apr 27 01:51:35 you get a directory. Put its bin in $PATH. done. Apr 27 01:51:48 I guess set JAVA_HOME if you're feeling thorough Apr 27 01:53:55 pfn, I use ubuntu... though admittedly, not in the "I heard about this trendy linux thing and ubuntu looks pretty" way Apr 27 01:56:19 lol what about the jre?! LOL Apr 27 01:56:38 what about it Apr 27 01:56:51 Afzal, quit lolling, you have yet to say anything funny Apr 27 01:56:54 does the jdk installer include jre? Apr 27 01:56:59 yes i'm in a hurry Apr 27 01:57:11 yes Apr 27 01:57:28 oh okay Apr 27 01:57:48 Afzal, to verify, run "java". If you don't get a "command not found" or w/e, it's there Apr 27 01:58:03 thanks guys Apr 27 01:58:04 see you in 15 hours Apr 27 01:58:05 thanks Apr 27 01:58:08 is there a way to heapdump-on-OOME like with normal JRE Apr 27 01:58:27 jhat on quiescent heap is uninformative Apr 27 01:59:59 press the dump button when the force close dialogue appears Apr 27 02:00:12 ah. :) Apr 27 02:00:21 I didn't realize the vm was still running at that point Apr 27 02:00:58 I can start an activity with startActivity(). fine. why can't I stop it with stopActivity() ? Apr 27 02:01:10 bubbleguuum, u can finish with finish() Apr 27 02:01:32 gaz`: sure but suppose I start an activity in in app I did not write Apr 27 02:01:48 ah yeh i thin kits out of your control til it comes back Apr 27 02:02:25 gaz`: nope, the app is still running its main loop Apr 27 02:02:42 if you start an activity in another process of course Apr 27 02:03:03 yeh, why ewould uwant to end the new activity prematurely Apr 27 02:03:37 gaz`: suppoe I'm writing a remote control app that start a video player app (that I didn't write). I can remote control the start of the player but not the stop. Apr 27 02:03:44 bad user experience Apr 27 02:03:51 you can use broadcasts Apr 27 02:04:13 pfn: jhat is again uninformative, but until android 3 bitmaps aren't allocated on the heap anyway Apr 27 02:04:21 (this is on 2.3.3) Apr 27 02:04:22 the only thing I can think to stop the video player app is if it has a specific Intent that exits it. Apr 27 02:04:25 the app must provide you with an ati to do that Apr 27 02:04:43 anyway i gotta run; thanks for the pointers on recycle() etc Apr 27 02:04:54 that's kind of stupid you can spawn an external process with code but cannot shut it down with code Apr 27 02:04:56 wyvern` one more point Apr 27 02:05:01 wyvern` google unbinddrawables Apr 27 02:05:04 ok Apr 27 02:05:21 thanks again. :) cheers. Apr 27 02:15:24 yay Process.killProcess() Apr 27 02:15:27 evil Apr 27 02:16:23 Is it possible to move all of your Activities to a new "Activities" package? Apr 27 02:17:10 name has to be the full class name or your activity: com.blah.MainActivity Apr 27 02:20:38 Awesome! Thanks. When I moved them and it automatically changed the name, it musted have dropped the leading . Apr 27 02:22:10 it doesn't have to be a FQCN Apr 27 02:22:20 it can either be FQCN or relative to your declared package Apr 27 02:26:53 JakeWharton, we ended up fully qualifying them Apr 27 02:27:03 so we can add .paid to the package name :P Apr 27 02:27:10 ah, nice Apr 27 02:27:13 although we're going through and replacing all the R.java imports anyway... Apr 27 02:27:15 just have to worry about R's Apr 27 02:27:16 yeah Apr 27 02:27:21 and some other things Apr 27 02:27:26 in a simple app, its just R.java Apr 27 02:27:30 in a complicated app, theres more Apr 27 02:27:33 content provider shit Apr 27 02:27:35 bleh Apr 27 02:27:44 half the complications i deal with are ad-related Apr 27 02:27:46 and half the crashes Apr 27 02:27:53 half are canadian related Apr 27 02:28:07 and the other half are french Apr 27 02:28:21 oh you guys Apr 27 02:47:07 What are the icon sizes that my app's logo needs to be in? Apr 27 02:51:41 vadi2, http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html use this Apr 27 02:51:50 thanks! Apr 27 02:53:39 (though the gimp with unity's new HUD is pretty nice so far too, woo) Apr 27 02:54:37 who you callin' a gimp? Apr 27 02:55:05 i dont know what you heard about me **** ENDING LOGGING AT Fri Apr 27 03:00:00 2012