**** BEGIN LOGGING AT Mon Oct 22 03:00:00 2012 Oct 22 03:00:12 you can write one in bash in about 4 lines Oct 22 03:00:16 using imagemagick convert Oct 22 03:00:16 maxagaz: paint :D Oct 22 03:00:37 if you don't actually have appropriate image sizes, however, you may as well just let them get downscaled at runtime. Oct 22 03:00:52 just shove all of your non-xml drawables in to res/drawable-xhdpi Oct 22 03:02:36 lov: that's what I said that earlier, but you said I misunderstood... I'm confused Oct 22 03:02:49 I was confused, sorry Oct 22 03:03:03 I thought that the assets you made you had made as mdpi assets Oct 22 03:03:25 lov: ok, thanks for your help! :) Oct 22 03:07:06 np Oct 22 03:07:08 lov you must have really good karma. Oct 22 03:07:14 You help out anyone and everyone. Oct 22 03:07:33 I try Oct 22 03:07:35 youre a great person Oct 22 03:07:39 thanks? Oct 22 03:07:54 ha you're modest too Oct 22 03:08:11 ok bye Oct 22 03:08:13 ta Oct 22 03:12:37 Need a new calculator. This one does a single operation only >_> Oct 22 03:13:09 * Leeds feels the lov-love Oct 22 03:13:42 lol i told you Oct 22 03:13:54 hmm? Oct 22 03:14:43 that the calculator you linked sucked Oct 22 03:14:50 it really did XD Oct 22 03:15:00 well, it worked enough for me to find a few bugs and fix them Oct 22 03:15:00 With regards to input, is motionEvent.getPointerCount() - 1 always the most recently pressed pointer? Oct 22 03:15:55 In other words, if I use want the x position of the finger that was just pressed on the screen, can I do event.getX(event.getPointerCount() - 1)? Oct 22 03:16:19 well, if the action was ACTION_DOWN, it is necessarily 0 Oct 22 03:16:25 Right Oct 22 03:16:31 But I'm checking in ACTION_POINTER_DOWN Oct 22 03:16:45 And there could be any number of fingers already down Oct 22 03:17:17 does android let you catch more than 2 touches at once? Oct 22 03:17:32 Hm, I assumed so. Maybe I'm wrong. Oct 22 03:18:43 Yes, it looks like you can catch more than 2 Oct 22 03:18:45 this might do it Oct 22 03:18:47 final int ptrInd = (action & MotionEvent.ACTION_POINTER_INDEX_MASK) Oct 22 03:18:47 >> MotionEvent.ACTION_POINTER_INDEX_SHIFT; Oct 22 03:19:06 Oh, right! I just saw that earlier.. hurr durr.. Oct 22 03:19:09 Thanks! :) Oct 22 03:20:59 sampullman: yes, you can have N gestures iirc Oct 22 03:21:13 I know 5 is supported, I think that up to 10 has been demonstrated Oct 22 03:21:17 that's cool, for some reason i had it in my head that 2 was the limit Oct 22 03:21:25 it used to be :) Oct 22 03:21:30 (I think) Oct 22 03:21:43 i've never thought about using more Oct 22 03:21:51 2 is the most common number for multigesture though; it's a little awkward. Oct 22 03:22:01 er Oct 22 03:22:05 more than 2 is a little awkward Oct 22 03:23:21 I could see more than 2 being used with perhaps a full-sized keyboard on a tablet to prevent missed keystrokes? Oct 22 03:23:42 or 4 with a 2 player, 1 phone game Oct 22 03:24:14 i think a few thousand would be cool for 2d object recognition Oct 22 03:25:27 o.O Oct 22 03:29:04 hi all Oct 22 03:29:12 I have a question about callback Oct 22 03:29:38 I have a MediaPlayer object and register onPreparedListener for it Oct 22 03:29:48 and then I call preparedAsync method Oct 22 03:29:55 to load media data Oct 22 03:30:23 I understand that after media data is ready, teh method is called Oct 22 03:31:03 but not quite sure how the main thread get notified about the event that the media data is loaded Oct 22 03:32:33 HII! Oct 22 03:33:23 I have a problem with buttons containing an images which a part is transparent, I have to click many times before it to work, is it due to the transparency ? Oct 22 03:33:59 Any game developers here?? Oct 22 03:36:24 Anyone familiar with SimpleOnGestureListener, and whether I can use it with multitouch? Oct 22 03:36:51 maxagax: check the opacity of your button. Oct 22 03:37:11 I'm trying to detect a scrolling gesture even if it's the second pointer in the MouseEvent Oct 22 03:39:46 maxagax: try defining this attr in your Button's layout, android:alpha="1" Oct 22 04:18:53 hi guys Oct 22 04:19:15 can someone take a look at my StackOverflow post regarding In-App-Billing? It has all the code inside Oct 22 04:19:16 http://stackoverflow.com/questions/13003692/unable-to-start-receiver-in-app-billing Oct 22 04:21:49 <[deXter]> Hi all, has the SDK been updated yet to work with JDK7? Oct 22 04:28:18 [deXter]: do you think oracle would break backwar compatibility between jdk 7 and 6? Oct 22 04:28:45 if you mean can you use xyz feature from jdk 7 in android: No Oct 22 04:28:51 how to manipulate audio trimming and cutting wich codecs should we use Oct 22 04:28:53 <[deXter]> No, that's not what I asked Oct 22 04:29:10 <[deXter]> tdignan, The Android Developer website still says to install jdk6 Oct 22 04:29:12 if you mean can you set your toolchain up and run eclipse and adt on jdk7 - yes Oct 22 04:29:16 I use jdk 7 Oct 22 04:29:41 <[deXter]> And you don't have to use any workarounds / fixes to get it running or did it work out of the box? Oct 22 04:29:50 not that I am consciously aware of. Oct 22 04:30:10 <[deXter]> Okay, because last year there were issues with the signing part of things, wouldn't work properly Oct 22 04:30:21 <[deXter]> there was a patch for ANT that fixed it but you had to apply it manually Oct 22 04:31:01 i'm fairly sure i've been using this setup on my system and signed stuff with it too Oct 22 04:31:11 but i'm kind of scatterbrained so take that with a grain of salt. Oct 22 04:31:19 hey tdignan Oct 22 04:31:26 could you take a look at my stackexchange post? Oct 22 04:32:04 android.os.NetworkOnMainThreadException Oct 22 04:32:12 ^ learn what that is and fix your code. Oct 22 04:32:23 you shouldn't be running network code on the main thread. Oct 22 04:32:23 so I should be calling it on a separate thread Oct 22 04:32:27 yea Oct 22 04:32:27 got it Oct 22 04:32:30 :) Oct 22 04:32:30 sorry didnt read that far Oct 22 04:32:32 np Oct 22 04:37:03 man, i knew in the back of my head that was the problem Oct 22 04:37:10 i really have a lack of trust in my debugging Oct 22 04:37:13 'default' is not a best match for any device/locale combination. Oct 22 04:37:13 [2012-10-22 13:02:48 - IRE Helper] Displaying it with 'Locale Language ___Region __, sw320dp, w320dp, h533dp, Normal Screen, Long screen aspect ratio, Portrait Orientation, High Density, Finger-based touchscreen, Soft keyboard, No keyboard, Exposed navigation, Trackball navigation, Screen resolution 800x480, API Level 16' Oct 22 04:37:18 ^ why is this an error? Oct 22 04:37:53 vadi2: looks like its just describing your device Oct 22 04:38:06 In angry red color every time I visit that xml... Oct 22 04:38:13 Peculiar! Oct 22 05:16:51 hey Guys Oct 22 05:17:15 so got these high resolution icons done, but they still look darn crappy on my listview Oct 22 05:19:39 oh currently I dumped all my images in /res/drawable Oct 22 05:19:54 anybody? Oct 22 05:22:15 i want to make an app to trim the audio. how to do it? Oct 22 05:25:46 brickhead : have you tried plaing them in their appropriate dpi folders? Oct 22 05:25:55 brickhead : also what resolution are the icons? Oct 22 05:26:15 i want to make an app to trim the audio. how to do it? Oct 22 05:26:57 arunkumar413 : http://stackoverflow.com/questions/278612/java-mp3-audio-editing-trimming-library Oct 22 05:33:22 Hey guys, I am having issues with installing the ADT Plugin on eclipse, can anyone help? Oct 22 05:40:35 wilornel Oct 22 05:40:39 what are you having problems with? Oct 22 05:41:38 Android 4.2 rumored to be released later this month Oct 22 05:42:04 sorry Oct 22 05:42:16 sooo my problem is... Oct 22 05:42:40 Unable to read repository at https://dl-ssl.google.com/android/eclipse/site.xml. Oct 22 05:42:40 + Oct 22 05:42:46 Cannot assign requested address: JVM_Bind Oct 22 05:43:42 it also says: org.eclipse.equinox.internal.provisional.p2.core.Provision Esxception, but all of that is on eclipse 3.5... which I chose to download because all of the newer versions do not work either Oct 22 05:44:17 So I do not think it is because of my eclipse version, it more about my internet connection, I guess.. Oct 22 05:44:55 i doub itt Oct 22 05:45:13 Do you guys know how to fix this problem? You must've seen it a lot... Some people suggest changing https:// for http://, but that does not fix it Oct 22 05:47:03 what i'd recommend Oct 22 05:47:10 is a full reinstallation Oct 22 05:47:14 based on the android docs Oct 22 05:47:22 and the key to installing ADT or SDK Oct 22 05:47:28 is to run it as administrator while installing Oct 22 05:47:34 otherwise a bunch of stupid errors occurs Oct 22 05:48:02 i've had my fair share of problems and all of them are fixed with a reinstallation + admin rights + proper JDK Oct 22 05:48:32 so if I were you, i'd delete everything that you installed and then follow this Oct 22 05:48:48 what do you mean by reinstallation? Its the first time I download these eclipse versions Oct 22 05:48:53 http://developer.android.com/sdk/installing/index.html Oct 22 05:49:06 It means I did not change any settings in the software Oct 22 05:49:32 three different eclipse versions, never touched then, followed that link you just gave and no results... Oct 22 05:49:33 We (Android developers) recommend the "Eclipse Classic" version. Otherwise, you should use a Java or RCP version of Eclipse. Oct 22 05:49:39 ADT 20.0.3 (August 2012) requires Eclipse Helios (Version 3.6.2) or higher. Oct 22 05:49:40 welll, I get a result, but its an error.. Oct 22 05:49:45 thats quoted from the android docs Oct 22 05:49:51 mhm Oct 22 05:50:02 it doesnt really matter Oct 22 05:50:02 Guys, can we use keystore for client based encryption Oct 22 05:50:06 yes Oct 22 05:50:06 I used eclispe classic 4.2, I'll try 3.6.2 then... Oct 22 05:50:13 basically I want to encrypt data with my key on device Oct 22 05:50:17 it states that anything higher than 3.6.2 Oct 22 05:50:18 works Oct 22 05:50:24 you dont need to Oct 22 05:50:25 well, not for me :/ Oct 22 05:50:40 downgrade your eclipse, just uninstall everything associated with android and do a clean install Oct 22 05:50:42 on eclipse classic 4.2.1 I cannot install their plugin Oct 22 05:50:44 what OS are you using? Oct 22 05:50:51 im on windows 32bit Oct 22 05:50:59 okay, have you installed their SDK? Oct 22 05:51:05 android's? yes Oct 22 05:52:04 okay have you installed anything through the manager? Oct 22 05:53:00 no Oct 22 05:53:25 well you need to install SDK Tools r20.0.3. through administrator Oct 22 05:53:39 it states in the android docs that ADT 20.0.3 is designed for use with SDK Tools r20.0.3. If you haven't already installed SDK Tools r20.0.3 into your SDK, use the Android SDK Manager to do so. Oct 22 05:54:02 right click Android SDK Manager and select run with administrator Oct 22 05:54:14 and you only need to install SDK Tools r20.0.3 Oct 22 05:54:23 oh Oct 22 05:54:26 yeah I see Oct 22 05:54:28 and also probably the highest API Oct 22 05:54:29 It's installed Oct 22 05:54:41 okay do you have any APIs installed? Oct 22 05:54:42 yeah the highest API too Oct 22 05:54:46 okay Oct 22 05:55:03 http://developer.android.com/sdk/installing/installing-adt.html Oct 22 05:55:10 follow the instructions there are Download the ADT Plugin Oct 22 05:55:13 yes Oct 22 05:55:21 I visited that link Oct 22 05:55:25 No help :/ Oct 22 05:55:37 okay well tell me something first Oct 22 05:55:39 when you installed the SDK Oct 22 05:55:46 and the SDK tolls Oct 22 05:55:50 yeah Oct 22 05:55:51 tools did you install it with administrator or not? Oct 22 05:55:55 no Oct 22 05:56:00 -.- then uninstall Oct 22 05:56:03 and reinstall as administrator Oct 22 05:56:03 what? Oct 22 05:56:06 why Oct 22 05:56:09 where does it say that? Oct 22 05:56:15 it doesn't state it Oct 22 05:56:19 but its a common flaw with windows systems Oct 22 05:56:20 ugh... Oct 22 05:56:52 so do I delete the packages or I reinstall android SDK manager? Oct 22 05:56:52 and even if you get it working without reinstalling it, you'll have major problems when youre trying to connect a device to Eclipse Oct 22 05:57:02 to be fairly honest Oct 22 05:57:10 i think youre installing all of the Android SDK packages Oct 22 05:57:27 thats why you dont want to uninstall because of the long time it takes to download all of androids sdks Oct 22 05:57:33 which you do not need, only the highest SDK is needed Oct 22 05:57:45 Any way to limit the number of IMAP connections with the native mail app? Oct 22 05:58:17 Alright then KaiKai I'll try that, let's see what'll happpen Oct 22 05:58:20 the solution to your problem and the solution to future problems would be to uninstall everything related to your previous install and reinstall with the instructions in android doc and make sure you have everything runned or installed with administrator Oct 22 05:58:52 also before you reinstall Oct 22 05:58:56 have you tried anything noted Oct 22 05:59:03 in the troubleshooting section in the docs? Oct 22 05:59:21 i believe there is a manual method to installing ADT Oct 22 06:00:05 yes, I tried that too Oct 22 06:00:28 okay then uninstall Oct 22 06:01:10 Alright im doing it right now, but how is that linked to eclipse? Oct 22 06:01:38 when you reinstall SDK Manager run it as administrator and install only, SDK Tools, SDK Platform-tools, SDK Platforms Android 2.2 and highest Android API. IN the future if you need anything else you can install them Oct 22 06:01:46 SDK Tools is used by Eclipse Oct 22 06:02:08 and if you installed it improperly it would cause an error for Eclipse when it is trying to access the ADT Oct 22 06:02:09 I see Oct 22 06:03:52 I have some really primitive problem, I am following the instructions at http://developer.android.com/sdk/installing/installing-adt.html and never get to the "Configure the ADT Plugin" Oct 22 06:04:09 that is to say, that I am sure that the ADT plugin is installed, I have a modern version of eclipse and java Oct 22 06:04:20 but I can't find where in the interface I can invoke Oct 22 06:04:25 the dialog Oct 22 06:05:41 my knowledge of eclipse is really near 0 Oct 22 06:06:38 kristopolous : Click Windows > Select Preferences > Select Android > Browse and select the SDK location Oct 22 06:06:57 it should be in Program Files/Android/android-sdk if you are using windows Oct 22 06:07:11 oh man, there's no android there Oct 22 06:07:48 I have 20.0.3.v20 installed according to eclipse Oct 22 06:07:59 I'm using eclipse 3.7.2 Oct 22 06:08:36 have you installed android SDK? Oct 22 06:08:42 or android SDK Manager? Oct 22 06:09:00 i believe you only downloaded the ADT and not the SDK Oct 22 06:09:01 yes Oct 22 06:09:15 are you using windows? Oct 22 06:09:16 I ran tools/android like the site said Oct 22 06:09:24 nope, linux Oct 22 06:09:39 do you know which directory you installed the sdk on? Oct 22 06:09:51 /usr/local/android-sdk-linux Oct 22 06:09:59 I open tools/android Oct 22 06:10:05 and youve checked that its there? Oct 22 06:10:11 I have the sdk tools, the platform-tools installed Oct 22 06:10:19 did you install it as Root? Oct 22 06:10:45 nope, I chgrp,chown'd things appropriately Oct 22 06:10:56 maybe it doesn't like that? Oct 22 06:11:06 iono, not much of a linux user Oct 22 06:11:26 I have API 16 installed supposedly Oct 22 06:11:27 but you should first make sure the sdk is there and the android API is there Oct 22 06:11:35 check it manually with file manager :) Oct 22 06:11:42 or through the GUI Oct 22 06:12:07 http://qaa.ath.cx/confirmation.txt Oct 22 06:12:10 kristo: are you using the eclipse from the debian repo? Oct 22 06:12:18 yes Oct 22 06:12:24 has anyone used ICS keychain for storing certs Oct 22 06:12:33 eclipse-jdt Oct 22 06:12:46 i vaguely remember having to install a separate version of eclipse to get adt to work in ubuntu Oct 22 06:12:53 that was a long time ago, though Oct 22 06:13:54 there's a post in 2009 I found Oct 22 06:14:08 that's about the last time i used eclipse Oct 22 06:14:33 sampullman: are you using intelliJ? Oct 22 06:14:40 no Oct 22 06:14:43 yeah, I'm not totally set on eclipse, I'm just trying to take the path of least resistance Oct 22 06:15:05 which IDE then? :) Oct 22 06:15:08 if you dont mind me asking Oct 22 06:15:30 im not bagging on eclipse, but i do recall having to download it separately (from the repo version) maybe try that? Oct 22 06:15:40 i use emacs Oct 22 06:15:51 well, xemacs, mostly Oct 22 06:17:57 have you tried intelliJ? Oct 22 06:18:21 no, i've never felt like emacs has held me back in any way Oct 22 06:18:50 high learning curve, but by far the most customizable Oct 22 06:19:25 intellij's keybindings are just ridiculous Oct 22 06:19:40 can't you change that? Oct 22 06:19:41 hmm Oct 22 06:19:48 i stopped using it for a month or so and I couldn't tell you a single one of them now Oct 22 06:20:03 change every default keybinding? what a painful and useless exercise Oct 22 06:20:20 is it possible to add your own scripts to keybindings? Oct 22 06:20:32 i have so many custom keybindings/keys bound to macros Oct 22 06:20:53 I have a couple keybindings in vim, but that's it. Oct 22 06:20:59 on xemacs? is that a linux only GUI? Oct 22 06:21:22 there are windows and os x builds, it's not 1991 any more. Oct 22 06:21:34 mac has aquamacs, which is pretty good Oct 22 06:21:44 windows has some crappy port, im sure Oct 22 06:22:12 well im pretty sure it was based on linux but was just wondering if the ports would be any good lol guess not Oct 22 06:22:33 unix* Oct 22 06:22:39 GNU is not unix Oct 22 06:22:54 but emacs was originally made for unix Oct 22 06:22:57 * tdignan checks his toejam Oct 22 06:22:59 ah Oct 22 06:23:25 or unix hahaha dont know my unix or linux stuff Oct 22 06:23:41 im just being pedantic Oct 22 06:23:42 hopefully can learn it after i finish my android proj. Oct 22 06:23:48 oh man ... emacs came to maturity to emulate the LISP-M machines after project Athena kicked them out of MIT for SUN workstations in the early 80s Oct 22 06:23:53 thats ok. some people can't handle linux/unix. better to just give up and watch tv. Oct 22 06:24:08 tdignan: no way to treat a hobby :) Oct 22 06:24:15 but yeah, it's 2012 ... basically 99% linux. Oct 22 06:24:43 in college we used sun workstations, heh Oct 22 06:25:02 (recently, it wasn't 20 years ago) Oct 22 06:26:13 if you dont mind me asking how old are you all? Oct 22 06:26:26 or answering Oct 22 06:26:37 1a Oct 22 06:27:05 hah, mine would be more confusing Oct 22 06:27:18 16 Oct 22 06:27:42 sam are you really 16? Oct 22 06:27:42 haha Oct 22 06:27:46 yes, he si Oct 22 06:28:11 he stated he was in college so im guessing early grad from highschool? Oct 22 06:28:17 or troll Oct 22 06:28:19 =[ Oct 22 06:28:20 im 16 as tdignan is 1a Oct 22 06:28:39 hahaha kk Oct 22 06:28:50 giving your age in base64 Oct 22 06:28:51 I see Oct 22 06:29:07 yea didnt learn any of that Oct 22 06:29:10 only really 17 Oct 22 06:29:16 base 16, silly Oct 22 06:29:49 KaiKai: if you plan on being a programmer, you should learn to be fluent in hex/binary Oct 22 06:30:51 mhmm well i just started a year ago Oct 22 06:30:57 eh, I've been programming for 16 years and I still use a calculator to convert that stuff Oct 22 06:31:11 whats 5b in decimal? I don't know. Oct 22 06:31:17 gotta look it up Oct 22 06:31:23 16*5 + 11 Oct 22 06:31:29 right Oct 22 06:31:35 wow, complicate maths, dude Oct 22 06:31:41 my brain, like, hurts, man Oct 22 06:31:53 but I haven't memorized 8 bit hex to dec Oct 22 06:31:57 like I memorized the times tables Oct 22 06:32:11 sampullman: anything else a beginner should be learning first? I sort of jumped the gun learned 3 lessons on python and jumped to java and started making android apps through looking at examples and samples Oct 22 06:32:22 nah, but i think 0-256 is useful for hex Oct 22 06:32:23 I don't instinctively know it by rote memorization Oct 22 06:33:36 KaiKai: you're probably doing fine.. just make sure you're doing things you enjoy, and don't shy away from complicated problems Oct 22 06:33:47 Sam = 22; tg = 26 :0 Oct 22 06:34:08 there's probably some nice trickery to memorize it though. Oct 22 06:34:28 found a chart for 0-256 Oct 22 06:34:29 http://www.naturalmath.com/mult/16mult.html Oct 22 06:34:35 man 7 ascii Oct 22 06:34:39 i don't actually have it memorized, i can just multiply by 16 in my head pretty fast Oct 22 06:34:56 that's the quickest lookup I know Oct 22 06:35:05 i'm just able to open python and type hex(26) Oct 22 06:35:12 you get octal for free too ... you know, just for kicks Oct 22 06:35:37 I could have done it in my head, but why bother Oct 22 06:36:08 sitting around and memorizing hex to decimal is something i'll do after I get rich and have time to care Oct 22 06:36:32 why would I manually do such calculation while sitting in front of a computation machine. Oct 22 06:36:56 would there be a difference in security if i changed all of my in-app-billing methods to static vs creating classes in my activity that hold the methods? Oct 22 06:37:04 becase your brain is a neural net processor, a learning computer Oct 22 06:37:31 far more than a mere nueral net Oct 22 06:37:40 i think my brain is mostly made of caffeine Oct 22 06:37:41 KaiKai: on an un-rooted device, i think they are identical as far as security is concered Oct 22 06:37:45 i was just quoting the terminator, but go on Oct 22 06:37:58 clever: and rooted? Oct 22 06:38:22 sure, ok, but if I had a processor that made 1/100 the errors of my brain Oct 22 06:38:23 KaiKai: if its been rooted, then i think they are equaly not secure Oct 22 06:38:29 I'd toss it in the garbage Oct 22 06:38:35 Clever: KK thanks. Oct 22 06:38:52 kristopolous: cpus make tons of errors per second Oct 22 06:39:24 tdignan: branch mis-prediction? Oct 22 06:39:29 I don't get exposed to them Oct 22 06:39:34 Clever which is more secure? Oct 22 06:40:05 anyway ... back to eclipse should I have the xml editor instgalled? Oct 22 06:40:08 lasserix: i dont think there is any real difference, if you mark the class as private, its imposible for other apps to access under normal conditions Oct 22 06:41:26 Other apps can in some conditions access public methods in some other app? Oct 22 06:41:53 not on android, afaik Oct 22 06:42:08 services are about the only exception, and only if your manifest allows it Oct 22 06:42:52 Hey, can somebody tell me what is happening here: http://youtu.be/v293Y0HPciw Oct 22 06:42:56 clever: couldn't reflection change private variables? Oct 22 06:43:08 KaiKai: never looked at reflection yet Oct 22 06:43:10 Ahh okay, by the way where do your bundles go after onsaveinstancestate is called? Oct 22 06:43:16 http://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array Oct 22 06:43:22 one of the best so questions i've read Oct 22 06:44:11 wow, almost 3k votes Oct 22 06:44:11 lol Oct 22 06:44:13 tdignan: ive seen some neat things to do with php before, for example, "one two" needs more cpu power then 'one two' Oct 22 06:44:29 php :| Oct 22 06:44:40 I'm actually brushing up on mine, as sad as it is. Oct 22 06:44:51 tdignan: stick to single quotes whenever posible Oct 22 06:45:01 tdignan: for more info, google 'how long is a piece of string' Oct 22 06:45:17 are you eclipse users using 3.7? Oct 22 06:46:48 tdignan: weird, i cant see any reason for that c code to run faster Oct 22 06:48:15 KaiKai: You're suggestion did not help... Oct 22 06:48:18 Anyone know how to swap to fragments on the backstack without invoking the fragment underneath? Ie, I have browse->content but content comes as either a list or a page (seperate fragments). The user can switch viewing mode via the action bar, but I have to pop the current content viewing fragment, which breifly shows/invokes the browsing fragment, before I can load the other content viewing Oct 22 06:48:18 fragment, which I'd like to avoid (for graphical and state reasons) Oct 22 06:48:22 I still get the error, what now?? Oct 22 06:48:32 *swap two Oct 22 06:48:33 clever: =o php strings are ridiculous Oct 22 06:49:03 tdignan: yeah, its to do with "$var in string" stuff, single quotes disable that, so they run faster Oct 22 06:49:21 i'm still going to use "foo {$bar}" probably with double quotes even. if I ever need something to hum I'll keep it in mind, though. Oct 22 06:49:40 tdignan: in the case you just typed, theres no real difference Oct 22 06:49:52 tdignan: but if you had a 2000 word essay, with 0 variables, in a double-quote string Oct 22 06:49:57 yeah Oct 22 06:49:59 your just throwing cpu power out the window Oct 22 06:50:27 i think you gave up all right to worry about efficiency when you chose to use php Oct 22 06:50:34 exactly Oct 22 06:50:36 tdignan: branch prediction also comes up often in the kernel, you know about LIKELY? Oct 22 06:50:52 what's that Oct 22 06:51:03 sampullman: i'm getting 15 hits/sec on my server, and mysql is the bottleneck, not php Oct 22 06:51:23 tdignan: you use it like this, if (LIKELY(x)) or if (UNLIKELY(x)) Oct 22 06:51:26 i didn't say mysql good Oct 22 06:51:30 tdignan: its a macro, which includes a compiler hint Oct 22 06:51:38 *was good Oct 22 06:51:45 tdignan: so the compiler will pick the right branch instruction Oct 22 06:52:04 tdignan: it will set it up to branch in the unlikely case, so the more likely case just continues normal Oct 22 06:52:24 then the cpu mis-predicts the if less often, making it faster Oct 22 06:52:38 i thought branch predictors were good enough these days for that sort of thing to be inconsequential Oct 22 06:52:58 for example, if (UNLIKELY(debug_print)) { ... } Oct 22 06:53:30 sampullman: depends on what cpu your on, and how complex the condition is Oct 22 06:53:54 I don't think PHP is the slowest language out there. People hate it because of its technological impurity and coarseness Oct 22 06:53:58 well, i'd expect the simplest predictors to get your example right 99% of the time Oct 22 06:54:15 after possibly missing the first time, i guess Oct 22 06:54:30 sampullman: more complex examples would be if (LIKELY(count(list) > 0)) { ... } Oct 22 06:54:52 has to do a function call and then compare things Oct 22 06:55:23 but all of that depends on the internals of the branch prediction, and rather then learn that for every arch linux may compile on Oct 22 06:55:35 you can just tell the compiler which is more likely, and let the gcc devs worry about it Oct 22 06:56:53 http://goo.gl/DZJlj Oct 22 06:57:24 php,ruby,python,perl, all tied for slow as molasses Oct 22 06:58:07 wilornel: sorry im back Oct 22 06:58:38 tdignan: most of my problems with php, have actualy been the zend lib (writen in php), rather then the engine itself Oct 22 06:58:48 just rewriting it to bare php makes it much faster Oct 22 06:58:59 though ive never compared it to raw c yet Oct 22 06:59:11 yeah... I was using zend gdata the other night. Not a very good lib. Oct 22 06:59:13 tdignan: and the chart lacks V8's javascript Oct 22 06:59:21 I would have been better just accessing the api directly. Oct 22 06:59:27 and it's old, and on a 1 core machine Oct 22 06:59:35 the main zend case, was the table accessor classes Oct 22 06:59:44 it made a seperate field object, for every column in the database Oct 22 06:59:53 and ate 120m of ram in no time flat Oct 22 07:00:03 and it turns out, the version of php i had, totaly lacked garbage collection Oct 22 07:00:06 wtf? Oct 22 07:00:48 on this multi-core machine, perl is a tad slower than php, ruby, and python. Oct 22 07:00:54 http://shootout.alioth.debian.org/u32q/benchmark.php?test=all&lang=all&lang2=java Oct 22 07:01:02 wilornel: take a look at this https://groups.google.com/forum/?fromgroups=#!topic/android-developers/Zr8Nz4dfExY Oct 22 07:01:06 tdignan: what exactly is it graphing? Oct 22 07:01:53 the fastest benchmark programs for each language they could find against each other, supposedly. Oct 22 07:02:01 how to set the layout of my widget for when the screen is in landscape mode ? Oct 22 07:02:03 not incredibly scienific, but we aren't exactly doing science. Oct 22 07:03:28 tdignan: the only other thing i can think of about php performance, you must get apc Oct 22 07:03:34 that massively improved performance Oct 22 07:05:56 when should I put my .xml in res/drawable and when should I put it in res/layout ? Oct 22 07:06:32 When you are using your .xml file to define a layout or a layout segment put in in layout Oct 22 07:06:34 when it's a layout, put it in res/layout Oct 22 07:06:45 when you are using it to define drawable resources, put it in drawable Oct 22 07:06:58 when it's a drawable descriptor (i.e. state list, etc) put it in drawable Oct 22 07:20:27 is the bundle in onSaveInstanceState retained indefinitely? Oct 22 07:22:41 clever: i'll keep it bookmarked Oct 22 07:22:54 i don't think this project is going to have any performance issues Oct 22 07:46:41 Should I set my pagerAdapter on my list view in a fragment in the onCreateView or onActivityCreated? Oct 22 07:47:09 I have it currently in onCreateView but I didn't know the lifecycle well enough to understand I can do a lot of initalization in onActivityCreated Oct 22 07:49:23 i think it's fine to do it in onCreateView, but i don't know much about onActivityCreated Oct 22 07:50:43 well the thing i was using a state object that I passed to each fragment with a callback i would call in onCreateView, but it's not as clean as I'd like so I did a little research and want to move the state into a vitals fragment, which I can findbytag in the onActivityCreated method Oct 22 07:51:06 also i heard you reference lists in the onCreateView but don't load/initialize data to be displayed until onactivity created Oct 22 07:51:49 ah, that could be Oct 22 07:52:15 Yeah the whole problem is this damn swapping two fragments on the backstack without invoking the fragment underneath Oct 22 07:52:17 i have populated lists in onCreateView, but i could have been doing it wrong Oct 22 07:52:26 I've been doing it that way too Oct 22 07:52:57 how would you populate a list, when the data source is async? Oct 22 07:53:15 whoever posted about Oct 22 07:53:18 how long a string is Oct 22 07:53:20 has blown my mind. Oct 22 07:53:23 KaiKai: i did Oct 22 07:53:27 14 minutes into the video Oct 22 07:53:29 clever: that is why you do it in onCreateActivity Oct 22 07:53:29 its insane how complex php can get Oct 22 07:53:35 lakd;laskdl;askd;lakf;lgtk;qkl Oct 22 07:53:39 its like saying Oct 22 07:53:39 KaiKai: video?, it was just an article when i saw it Oct 22 07:53:41 *er that was a question Oct 22 07:53:49 lasserix: ? Oct 22 07:53:50 http://www.youtube.com/watch?v=JLIwuWNOWBk Oct 22 07:53:58 how would you populate a list, when the data source is async? Oct 22 07:54:23 lasserix: how does that handle the source being async? Oct 22 07:54:25 Was that a rhertorical question ? Oct 22 07:54:38 KaiKai: ah, totaly unrelated Oct 22 07:55:33 lasserix: from what ive seen so far, you pass the list a cursor object or similar, right? Oct 22 07:55:55 KaiKai: looks like that video has nuked the google results Oct 22 07:56:04 clever: i took a look at the article i think the video is much more mind blowing though Oct 22 07:56:22 clever: it gave very mind blowing drawings of "how long a string is" Oct 22 07:56:33 KaiKai: my netbook can bearly handle youtube, need to re-allocate things Oct 22 07:56:51 http://blog.golemon.com/2006/06/how-long-is-piece-of-string.html was the php article, i should probly bookmark it this time Oct 22 07:57:44 ahh kk Oct 22 07:57:51 AHAHAHAHA Oct 22 07:57:58 one was about a piece of string vs a String Oct 22 07:58:28 i hate flash! Oct 22 07:58:38 its sitting here eating 100% cpu power, while paused Oct 22 07:59:21 clever: if you are using a laoder you pass it a null Oct 22 07:59:25 *null cursor Oct 22 07:59:57 lasserix: and programaticaly add the elements later, when i get the data? Oct 22 08:00:12 what kind of adapter are you using? Oct 22 08:00:42 if you are using a loader, in onfinishedloading you call mAdapter.swapcursor(arg) where arg is supplied by the method Oct 22 08:00:55 * clever looks Oct 22 08:01:20 cursorloader are nice because you can also instance a progress bar in oncreate and dematerialize it in onfinishedloading Oct 22 08:01:26 lasserix: ArrayAdapter adapter = new ArrayAdapter(this,R.layout.computer,computers); Oct 22 08:01:36 currently, which doesnt look like it would allow async Oct 22 08:01:52 I believe in that case you want to call notifyDataSetChanged Oct 22 08:02:01 when the new data is assigned Oct 22 08:02:23 * clever looks Oct 22 08:02:27 i've always had to call notifyDataSetChanged on adapter + invalidateviews on my listview to get that to work Oct 22 08:02:49 can you think of another adapter that would work better? Oct 22 08:04:26 umm how much data ? Oct 22 08:04:31 you can extend BaseAdapter Oct 22 08:04:53 lasserix: at most, 10 or 20 items, but usualy under 3 Oct 22 08:04:54 it's not really that much work to implement one. Oct 22 08:05:06 tdignan_: ah, i'll have a look at that too then Oct 22 08:05:07 I would try and use a asynctask loader, it has three method oncreate onfinishedloading and onreset, you can get the data through oncreate and then in onfinished call the methods to update your adapter/listview Oct 22 08:05:31 but for something of that size it might be overkill Oct 22 08:05:41 in my case, i get the data thru a query/response over a tcp socket Oct 22 08:05:51 so it needs to wait for the remote server to respond Oct 22 08:06:22 yeah you can do that with that, that's the whole point oncreate initializes the worker to get the data, when the worker is done it'll callback to onfinishedloading and you can reset your adapter/listview Oct 22 08:06:56 theres no need to create any worker or thread though Oct 22 08:07:12 the tcp lib already does that, and runs a callback when it gets the data Oct 22 08:07:34 Hey Guys, I've been asked to explore ICS KeyChain for app side data encryption http://android-developers.blogspot.in/2012/03/unifying-key-store-access-in-ics.html Oct 22 08:07:38 oh well in the callback you just have to call notifydatasetchanged on the adapter and (perhaps) invalidate the listview Oct 22 08:07:53 *reassign the data, then call notifydatasetchanged Oct 22 08:08:06 lasserix: ah, i'll try that and take a look at extending baseadapter, and see which is best/simplest Oct 22 08:08:48 so my question is.. is anyone using it for that purpose? Oct 22 08:08:48 KaiKai: hmmm, it wasnt flash eating my cpu, it was the html5 player this time Oct 22 08:13:02 Fragments must always contain an empty public constructor, correct? Oct 22 08:16:10 nah Oct 22 08:16:38 That's what I thought but it says they must on the dev website Oct 22 08:16:46 I've never had a problem, just curious Oct 22 08:24:13 KaiKai: neat video Oct 22 08:26:14 After more than 5 years I think I've finally found the perfect song to listen to while coding. Oct 22 08:26:27 call me maybe? Oct 22 08:27:03 Thankfully, no :p Oct 22 08:27:12 Tee_Pee what's that? Oct 22 08:27:13 bet it's sexy and i know it Oct 22 08:27:24 I like Philip Glass, long sets Oct 22 08:27:31 Wish You Were Here by Blackmore's Night... there's no frustration that that one can't calm. Oct 22 08:37:17 is an orientationchange a configuration change? Oct 22 08:37:45 or if I have setRetainInstance true in a fragment, do I still have to use onSaveInstance? Oct 22 08:45:26 it is a config change Oct 22 08:45:44 and no, i think setRetainInstance covers it Oct 22 08:46:19 if i'm not mistaken, fragmentmanager is not affected by the activity lifecycle Oct 22 08:47:10 okay Oct 22 08:47:52 hopefully that will behave as such, i'm just worried if I don't explicitly outstate.put and assume setRetain works, and it doesn't then the app will "break" Oct 22 08:49:19 i think it's fine Oct 22 08:49:24 just check for this case http://stackoverflow.com/questions/5164126/retain-the-fragment-object-while-rotating Oct 22 08:51:04 is there a way to check voltages in android? Oct 22 08:51:14 client wants an app that knows when its on battery or wall charger Oct 22 08:52:29 Good morning Android dev Oct 22 08:52:48 gaz' http://stackoverflow.com/questions/5547359/battery-charging-notification Oct 22 08:53:09 woot Oct 22 08:53:10 cheers Oct 22 08:55:28 I'm looking at using the otto bus (from square) with responcive ui and fragments. In the case where an app should resort to displaying 2 fragments on seperate pages (ie full screen) should I switch out the fragment using the fragment manager, or launch a new activity which hosts the second fragment(this would require pushing the object into an intent to transfer its data)? Oct 22 08:56:23 Goddamn out of memory errors... Oct 22 08:56:32 Hi all! I have something very strange when deploying an app into the store... That tell me that my app will be available for 0 devices... I don't really understand why. My app use ffmpeg and vuforia lib. Oct 22 08:58:13 ClockWorkAnt check dev website for fragments, the introduction/tutorial explains how to do what you are asking Oct 22 08:58:36 "Cursor finalized without prior close()" Oct 22 08:58:42 The cursor lingers in memory if this happens, right? Oct 22 09:00:29 lasserix, thanks, I'll read the tutorial again Oct 22 09:07:44 How would I go about diagnosing activatedBackgroundIndicator not triggering on 3.0+? Oct 22 09:20:43 This really is a love-hate relationship.... I keep getting out of memory errors in my asynctask for downloading bitmaps... I try a million different things, from recycling the bitmap object manually to completely rewriting it, nothing works. When I undo all of my changes and go back to how it was - it works. Oct 22 09:21:10 Ahh onActivityCreated is such a wonderful method Oct 22 09:21:49 Tee_Pee you could try a simple mod pool for the bitmaps Oct 22 09:22:00 nm Oct 22 09:27:07 The problem is that these aren't bitmap, it's A bitmap... it's an asynctask that takes a URL, downloads it, converts it into a bitmap and returns it to the adapter, which in turn passes it to the imageview. Oct 22 09:27:22 hello; when you're writing query calls in a class that inherits from SQLiteOpenHelper, are you supposed to close the db handle before you return the Cursor? i imagine not, since you can only read from the Cursor when the db handle's still open... Oct 22 09:27:34 on the other hand, is having the caller close the Cursor sufficient to close the db as well? Oct 22 09:27:46 Tee_Pee: can you downsample the bitmaps *while* converting them? (not after) Oct 22 09:27:55 aaand back to crashing again. Oct 22 09:29:42 'fraid not... they aren't really that large... 700x400 at most. Oct 22 09:29:54 how many? Oct 22 09:30:05 1 at a time lol Oct 22 09:30:09 total Oct 22 09:30:19 how many until you see a crash Oct 22 09:30:36 depends... sometimes it doesn't crash at all... but on average 5-6 it seems. Oct 22 09:30:37 http://pastebin.com/6BBLJwEv Oct 22 09:30:41 that's my asynctask Oct 22 09:30:58 it crashes at the Bitmap bm = BitmapFactory.decodeStream(bis); line Oct 22 09:33:48 700x400 can mean a range of different sizes Oct 22 09:34:06 are they 200k? 2mb? Oct 22 09:34:28 either way, you're going to have to downsample when calling decodeStream if you want to avoid a crash Oct 22 09:34:38 anywhere from on average 300kb Oct 22 09:34:42 but up to 700 Oct 22 09:36:06 The thing is... if the bitmap is returned in the end, all the methods finish properly... why isn't the bitmap cleared from memory? Oct 22 09:36:13 One of these alone can't cause a crash Oct 22 09:36:21 is it in a view? Oct 22 09:36:41 It's in a FragmentStatePagerAdapter Oct 22 09:36:48 (It's a slideshow gallery) Oct 22 09:36:54 ok, so why do you think they're getting cleared from memory? Oct 22 09:37:19 i suppose i'll just have the caller close the cursor and see what happens Oct 22 09:37:43 pity there's no way to "wrap" whatever the caller does in some kind of callback to ensure that things get closed properly when they're done Oct 22 09:37:55 (i guess i could accept a functor, but that's kind of clumsy) Oct 22 09:38:29 It's not my pager causing the memory crash, the StatePagerAdapter, as per android's own documentation, doesn't keep fragments in memory to avoid these leaks. The AsyncTask throws the OOM Exception, which is what I'm finding peculiar, because it shouldn't keep the bitmaps in the memory once it's finished with them. Oct 22 09:38:34 er, or whatever you call an object that's essentially just a glorified callback... Oct 22 09:39:46 How do you invalidate an options menu within a fragment? Oct 22 09:39:50 no, the AsyncTask isn't throwing it... the system is. The AsyncTask caused it. the buld of the memory being used could be anywhere Oct 22 09:40:01 lasserix: what do you mean by invalidate? Oct 22 09:40:50 Sorry, I meant caused by the asynctask Oct 22 09:40:51 I used to do all my actionbar stuff in the activity, but again code was getting unclean, so I set hasOptionsMenu(true) in my fragments, now I need the preparemethod called to update the rating icon Oct 22 09:41:18 hmm, you can't to it in onPrepareOptionsMenu? Oct 22 09:41:48 Tee_Pee: i'd profile your memory usage in MAT or equivalent Oct 22 09:41:56 can I just explicitly call onPrepareOptionsMenu? Oct 22 09:42:23 I'll do that after my lunch break, for now I want to try to use soft referencing on the bitmaps in the async task. Oct 22 09:42:28 err, no, but it's called whenever the menu button is pressed Oct 22 09:42:40 (im in the fragment, in the activity I did this with invalidateOptionsMenu but there is no correspoding method wtihin a fragment) Oct 22 09:42:48 ohh Oct 22 09:43:00 Tee_Pee is async task working as the view pages are being flipped? Oct 22 09:43:06 and getActivity().invalidateOptionsMenu doesnt work? Oct 22 09:43:10 yes Oct 22 09:43:28 override OnDestroyItem in your viewpager adapter and recycle the bitmaps used by the pager Oct 22 09:43:31 but it's not a case of multiple concurrent ones running, I tested for that already Oct 22 09:43:40 that I shall try Oct 22 09:43:43 time for lunch break though Oct 22 09:43:47 thanks for the advice Oct 22 09:43:57 I think its clogging memory so future asynch tasks don't have enough memory hence the OOM Oct 22 09:44:34 sigh. whoever invented the UI pattern of having separate "Next >" and "Finish" buttons in the eclipse wizards deserves to be shot. Oct 22 10:00:17 to answer the question its simply a matter of prefixing getActivity to invalidateoptionsmenu in a fragment Oct 22 10:21:45 How can I set my service to start when the device starts? Oct 22 10:25:57 I believe you need a permission that's called something like RECEIVE_BOOT_COMPLETED and have it receive the proper intent for it Oct 22 10:26:03 IIRC; google it :P Oct 22 11:05:40 Hello Oct 22 11:05:52 How do I set fullscreen for my Activity? Oct 22 11:07:19 kosc: in android manifest setup the fullscreen theme Oct 22 11:21:34 anyone had problems with ABS returning null from getSupportActionBar() - in OS 4.0+ Oct 22 11:23:31 no Oct 22 11:27:58 JakeWharton u there? i dont have any reference to windowNoTitle in my proj but getSupportActionBar() crashes on 4.0+ devices Oct 22 11:29:27 so... eclipse MAT has shown that my FragmentStatePagerAdapter, despite "not keeping destroyed fragments in memory" still grows to ludicrous sizes, eventually causing an OOM Exception. Oct 22 11:29:36 figuring this out shall be fun. Oct 22 11:29:57 Tee_Pee did you try calling recycle on the bitmaps in onDestroyItem of your Pager Adapter? Oct 22 11:30:24 no, because FragmentStatePagerAdapter doesn't seem to have a onDestroyItem method Oct 22 11:30:37 Quick question, ABS as git summodule y/n? Oct 22 11:30:58 uhh Oct 22 11:31:05 destroyItem Oct 22 11:31:37 you are on page 1, 0 and 2 pages are instantiated, if you move to page 2, the pager will instantiate 3 and destroyItem will be called on 0 Oct 22 11:31:47 in destroyitem try calling recycle on the bitmap Oct 22 11:34:45 ah, got it... but either way... there's not bitmap to call recycle on. The only time I have a bitmap around is retFragment.setBitmap(BitmapFactory.decodeFile(imagePath)); Oct 22 11:35:02 that being said Oct 22 11:35:07 I think I know what the issue might be Oct 22 11:35:11 cool Oct 22 11:35:43 the fragment itself keeps a Bitmap object around, even in its savestate. Oct 22 11:35:49 God I'm an idiot Oct 22 11:42:07 hi Oct 22 11:45:56 Is there a doc somewhere describing how to recompile libc from source with the NDK ? Oct 22 11:49:39 So, any ideas why android.content.res.Resources would be taking 6.3 megabytes of heap? Oct 22 12:01:08 zeeZ: thanks for the tip Oct 22 12:02:07 Ok... now MAT shows that I have 16 instances of FrameLayout (the layout used in my fragments) taking up 30MB of the heap... these are the images in the slideshow, despite the FragmentStatePageAdapter apparently not keeping them in memory, they're still there. Oct 22 12:03:23 in onDestroy set whatever is pointing to bitmap to null? Oct 22 12:03:59 Gonna try that, but I'm afraid that if I do that, whenever I slide from one fragment to the other the fragment will be empty Oct 22 12:04:05 or perhaps not Oct 22 12:04:11 since the adapter loads the next / previous automatically Oct 22 12:04:17 let's see... Oct 22 12:09:26 wait I'll check Oct 22 12:12:27 Tee_Pee everytime you swap the fragment more than 1 away is disposed of Oct 22 12:12:31 *swipe Oct 22 12:15:53 I know, but for some reason all fragments are still in memory, according to MAT. Oct 22 12:16:04 Hold on, about to test the deallocation in onDestroy() Oct 22 12:19:25 hm Oct 22 12:19:34 the fragment's onDestroy() wasn't called as I swiped Oct 22 12:19:45 no Oct 22 12:19:48 onDestroyItem Oct 22 12:19:53 in the pager Oct 22 12:19:59 err Oct 22 12:20:05 destroyItem Oct 22 12:20:05 yeah, yeah, switching to that, thought that this one would work as well Oct 22 12:27:41 http://stackoverflow.com/questions/11836468/fragmentpager-not-updating-views <---Overriding onDestroy() like this solved it. Oct 22 12:27:44 sexy. Oct 22 12:32:07 Hi all Oct 22 12:32:20 Hi Oct 22 12:32:28 Hello Oct 22 12:32:38 Im trying to write a command to my emulator to simulate the GPS, do you know how to do this in eclipse? Oct 22 12:32:41 hi lasserix Oct 22 12:33:01 http://stackoverflow.com/questions/1972895/testing-gps-in-android Oct 22 12:33:18 Did you decide to continue with android doing some personal projects? Oct 22 12:33:54 haha yeah well i chose an android related project for university Oct 22 12:34:23 Im trying to make an app that will determine the coefficients of aerodynamic drag and rolling resistance of your car based on the way it decelerates Oct 22 12:34:39 its called a coast down test Oct 22 12:34:43 ahh cool Oct 22 12:34:52 so that way you can see the effect of say, adding a spoiler or whatever Oct 22 12:35:07 Im glad you remembered me haha Oct 22 12:35:13 well you should just get a physical device to test on Oct 22 12:35:29 hahah yeah thats a good answer Oct 22 12:35:30 on ebay or something you know? makes life easier since emulator is so slow Oct 22 12:35:32 and I will in due time Oct 22 12:35:51 are you having problem getting the simulated gps to work? Oct 22 12:35:58 but lasserix say I wanted to artificially generate GPS noise then i'd have to do it programatically anyway Oct 22 12:36:30 yeah I am, im trying to follow this example http://hejp.co.uk/android/android-gps-example/ Oct 22 12:37:05 10-22 13:15:33.786: E/AndroidRuntime(629): java.lang.RuntimeException: Unable to resume activity {com.example.gps.example/com.example.gps.example.MainActivity}: java.lang.SecurityException: Provider gps requires ACCESS_FINE_LOCATION permission Oct 22 12:37:09 and thats the error I got Oct 22 12:37:41 umm Oct 22 12:37:48 did you try adding to your manifest? Oct 22 12:37:56 hahahahahahaha Oct 22 12:38:14 thats funny because I didnt and i knew i had to Oct 22 12:38:21 and because you guessed right Oct 22 12:38:28 permissions get you everytime Oct 22 12:38:48 Belacan: time to start reading ;) http://developer.android.com/guide/topics/security/permissions.html Oct 22 12:39:40 I had better read the whole fundamentals page too, thanks appel1 Oct 22 12:41:27 Thanks lasserix, that worked a charm ;) Oct 22 12:55:58 anyone familiar with android ndk build system and import-module? my dependency library does not get build when I invoke ndk-build, but the makefile gets included (tested with $(error wtf)) Oct 22 12:59:39 Stupid question - when the user logs out, I want to clear the database associated with my content provider... however, I seem to be missing something obvious on how to actually do this Oct 22 13:00:11 There's context.deleteDatabase(DBName), but.... and I feel silly for even asking this, how the hell do I get the name of the database? Oct 22 13:00:18 Is it the class name of the DB file? Oct 22 13:00:26 so MyDb.class.getName() Oct 22 13:04:15 you assign the database name Oct 22 13:04:31 somewhere you have a SQLiteDatabase mDatabase; Oct 22 13:04:38 DBname refers to DBName Oct 22 13:04:47 DBName refers to mDatabase Oct 22 13:05:50 actually you may be able to pass it a string along hte lines of /databases/mydatabase Oct 22 13:05:59 I've got public class MyDB extends SQLiteOpenHelper Oct 22 13:06:01 somewhere along the lines in the contentprovider you created a database Oct 22 13:06:12 in it I've got private static final String DB_NAME = "my_data"; Oct 22 13:06:25 and finally, in the constructor I've got super(context, DB_NAME, null, DB_VERSION); Oct 22 13:06:32 So I take it that I can use that DB_NAME? Oct 22 13:06:36 so probably /databases/my_data Oct 22 13:06:51 I think it is looking for a path Oct 22 13:07:12 Delete an existing private SQLiteDatabase associated with this Context's application package. name The name (unique in the application package) of the database. Oct 22 13:07:17 public abstract boolean deleteDatabase (String name) Oct 22 13:07:50 "/data/data/com.release.teepeesapp/databases/" + DB_NAME; Oct 22 13:07:59 i think is what you want to pass it Oct 22 13:08:15 you have to fill in com.release.teepeesapp to be your package Oct 22 13:27:10 ok... deleteDatabase() worked, the database is cleared... but only after I force stop my application. Until then, it still sees the DB as being there. Oct 22 13:28:29 Tee_Pee: probably because you have a open connection Oct 22 13:28:49 probably, checking up on it now Oct 22 13:31:23 fuck it, I'll just create a path in the content provider that will drop the tables. Oct 22 13:33:22 well you shouldn't leave open sqlitedb connections laying around Oct 22 13:33:27 never know when the os might trip up Oct 22 13:34:11 Well, I'm not too worried about that, as all this is is clearing user data when they log out. Oct 22 13:34:32 I delete my cache folder and I need to clear the database Oct 22 13:34:51 Which I hoped to achieve this way, but dropping the tables should be enough Oct 22 13:35:12 and besides Oct 22 13:35:16 "According to Dianne Hackborn (Android framework engineer) there is no need to close the database in a content provider." Oct 22 13:35:25 https://groups.google.com/forum/#!msg/android-developers/NwDRpHUXt0U/jIam4Q8-cqQJ Oct 22 13:35:32 do all of you statements go through the content provider? Oct 22 13:36:08 as far as user data is concerned? Most of them, yes Oct 22 13:36:14 I have one or two shared preferences Oct 22 13:36:26 but the bulk of it is in the DB, and by extension, the content provider. Oct 22 13:36:31 No just sqlite database stuff Oct 22 13:36:48 aye Oct 22 13:36:56 oh yeah then no problem Oct 22 13:36:59 there are no direct SQL statements Oct 22 13:37:06 then you haven't opened any Oct 22 13:53:49 hi there Oct 22 13:54:05 I'm trying to rescue a bricked xperia x10 phone Oct 22 13:54:42 a have a working JTAG connection, openOCD recognizes the ARM core, but I don't know what to do next Oct 22 14:09:52 I optionally hide one of the views inside my list item, by calling setvisibility() inside the getView() method of my custom adapter. But somehow, this does not work if I scroll through the list. It occurs randomly. Oct 22 14:11:26 position is not absolute it is relative Oct 22 14:12:00 you have to hide the views by some absolute id, if you are using cursors it's supplied but if you are not you have to add an id and then compare that id Oct 22 14:13:16 lasserix: is this ^^ to me? Oct 22 14:13:18 actually i could be wrong Oct 22 14:13:21 yeah Oct 22 14:13:39 just make sure whatever reference your using is actually mapping correctly Oct 22 14:14:30 hmm, but I think that is not the issue here Oct 22 14:19:24 lasserix: ok just figured it out. I'm using the convertview method. So when I scroll down, views for those items pushed up out of the screen get recycled, and somewhere down the line I reuse it and apply hide() on it. So when I return back to top, it stays hidden. Now I call setVisibility(View.VISIBLE) before hiding them, and it works. Oct 22 14:20:01 oh yeah Oct 22 14:20:21 its nice :) thanks anyway Oct 22 14:20:46 no problem, i should probably focus more on working and less time typing in here anyways Oct 22 14:20:47 ;p Oct 22 14:24:39 o/ Oct 22 14:27:55 Hey guys Oct 22 14:28:49 does anyone know how to create a crypto store on android Oct 22 14:31:12 brickhead: there's the keystore in the system, accessed with the keystore api in 4, and nothing in earlier versions (tho you can hack it a bit) Oct 22 14:31:53 brickhead: otherwise, you can use the bouncycastle libraries and make a crypto store and throw stuff in there, you'd have to prompt the user for the pw every time you open it if you really want to be secure about things Oct 22 14:32:12 write but that's for storing certs, what I would like is to store my passwords and auth keys Oct 22 14:32:19 brickhead: I found it far easier to get the bc libs from their site and link them into an android project than try to use the built in Oct 22 14:32:23 you can put just about anything in there Oct 22 14:32:58 ok only thing is I'll have to keep prompting user for password each time Oct 22 14:33:09 but if you have to prompt the user for the pw every time, why not just prompt them for their pw in the first place? And if you're using it to try to store that w/out prompting, then you're not really getting any more security Oct 22 14:33:48 b/c a rooted device would let you at whatever file you store the keystore pw in, just as easily as it would let you at whatever file you stored the direct creds in otherwise Oct 22 14:34:07 usually this is solved with something like oauth where you negotiate a token which contains no credentials itself Oct 22 14:34:09 what dragorn said Oct 22 14:34:39 and which can be managed on the remote site - for an example, look at Twitter. You can manage your auth tokens from the twitter settings page, and no twitter app stores your actual password Oct 22 14:34:50 see also, "security is hard" Oct 22 14:35:06 b/c getting all that working sucks, but it's one of the only real ways to solve the chicken and egg problem Oct 22 14:35:20 hi guys, i'm having a weird bug in camera intent, it rotates the image 90 degrees, doesn't say anything on android api Oct 22 14:35:40 if you're only targetting android 4+ you can use the system per-app keystore api and wedge whatever you want in there, and the unlock auth is managed by the keystore. However, this FORCES the user to have a pin or password Oct 22 14:35:56 I'm pretty sure lock patterns do not qualify, though I could be wrong Oct 22 14:36:32 the new keystore api is all wrapped up in the FDE layer and the pin unlock system, instead of the old model of having to unlock it manually (or hack the api to issue an unlock prompt) independent of the login/unlock creds Oct 22 14:36:43 well I recommended AccountManager, we need to provide offline access so that throws server out of the picture Oct 22 14:38:51 dragorn: is there any project I could look at to understand the keystore implementation Oct 22 14:39:41 openvpn non-root for android 4 is open source and uses the keystore api Oct 22 14:39:46 that's all that comes to mind Oct 22 14:40:00 it WILL limit you to android 4 and it WILL require users implement pins Oct 22 14:44:32 http://stackoverflow.com/questions/3647993/android-bitmaps-loaded-from-gallery-are-rotated-in-imageview Oct 22 14:44:37 i think this solves my issue Oct 22 14:44:42 just in case somebody was wondering Oct 22 14:46:15 propably stupid question, as I'm missing some core knowledge, but... I'm using Sherlock AB and I Extend SherlockFragment. Now, Facebook SDK in basic example uses Extend FacebookFragment, which is not Sherlock ... How do I use both, as I have SherlockFragments to use backward compatibility and would like to use Facebook too Oct 22 14:47:14 Balky: if the facebook fragment works on 2.x they're implementing their own compat layer on top of it, I'd *suspect* you can just mix them and see if it works. Oct 22 14:47:23 Balky: I haven't used the fb api at all, so I may be speaking rubbish Oct 22 14:47:40 Hi there Oct 22 14:47:53 I'm having a problem that is buging me for more than one day Oct 22 14:48:03 Balky: the only immediate problem I see is if you tried to make a high-level activity w/ the fb fragment, equivalent to SherlockFragmentActivity, I bet you'd have problems with getting the actionbar loaded Oct 22 14:48:10 dragorn: thanks I would look in it.. I don't seems to have any better option than to save stuff in shared preference Oct 22 14:48:36 I have a ViewPager that uses a Cursor adapter I did that basically creates Fragments from data in the Cursor Oct 22 14:48:36 brickhead: storing login creds in shared prefs is either fine if you don't care about user security, or HORRIBLE if it's something that can cost the user money/PII. Oct 22 14:48:55 when ever I rotate the device I get the onSaveInstanceState bla bla Oct 22 14:49:02 Well... I'm trying to avoid fb fragment at all, And I'd love to use it as it was possible before 3.0 API ... Oct 22 14:49:16 and the onCreateView and onViewCreated are called with the bundle that I saved Oct 22 14:49:24 Balky: I don't know anything about the fb api, i've just used abs Oct 22 14:49:28 :( Oct 22 14:49:33 Balky: but had good luck integrating fragments there Oct 22 14:49:52 I was hoping to keep the cipher creation logic in a c code, using ndk Oct 22 14:50:06 that would atleast add some barrier Oct 22 14:50:06 The problem is that the Cursor gets updated from the Acitivty and even if I call the notifiyDatasetChanged() in the adapter, the ViewPager still keeps the saved fragments Oct 22 14:50:11 brickhead: if the device is owned, no, it won't. Oct 22 14:50:16 same here :) and it all worked nice, but As new FB API is here, I decided to give it a go... they say it is simple and nice... Oct 22 14:50:25 not that I feel the nicenest so far :) Oct 22 14:50:26 so my question is Oct 22 14:50:30 well the person would still have to disassemble the c library right ? Oct 22 14:50:36 brickhead: actually even if it isn't. I can just back your app up, expand the apk, and pull out the so Oct 22 14:51:15 should I save the text I use in my fragment onSaveInstanceState and them use it if its being recreated Oct 22 14:51:16 OR Oct 22 14:51:34 home-spun crypto and "well they'd have to look in the library" is almost never a good path to take. If you're doing remote login to a web-ish service continually, you want to use tokens which aren't, themselves, privileged Oct 22 14:51:42 security is hard. Oct 22 14:51:47 should I just tell the ViewPager to invalidate all the Fragments and create them the normal way/ Oct 22 14:53:29 does the ViewPager recreates the Fragments when ever the adapter changes? Oct 22 14:55:06 dragorn: thanks, I'll see if I could understand the keystore code from openvpn Oct 22 15:37:29 hi Oct 22 15:54:01 hiya, is there a way of rooting a samsung galaxy mini, without downloading virus filled files? Oct 22 15:54:34 anyone Oct 22 15:54:51 x1_: #android-root Oct 22 15:54:54 x1_: try reading the channel topic... Oct 22 15:54:55 ^ Oct 22 15:55:32 ok Oct 22 15:57:56 You have to use virus filled files Oct 22 15:57:59 how else do you think you root it? Oct 22 15:58:00 duh Oct 22 15:58:11 be nice lov Oct 22 16:15:57 hey guys, so I got app billing to work via php Oct 22 16:16:01 the only problem i have now is Oct 22 16:16:09 when i echo signedData this is what i get Oct 22 16:17:10 {\"nonce\":4658477652655443541,\"orders\":[{\"notificationId\":\"android.test.purchased\",\"orderId\":\"transactionId.android.test.purchased\",\"packageName\":\"com.synaion.stackit\",\"productId\":\"android.test.purchased\",\"purchaseTime\":1350913071409,\"purchaseState\":0}]} Oct 22 16:17:19 how do I separate the variables in php? Oct 22 16:18:33 KaiKai: that looks like JSON, so use json_decode ? Oct 22 16:20:16 How can I add glow on TextView? Oct 22 16:20:58 radioactive isotopes Oct 22 16:22:09 Patches|Codeine: Where can I get it? Oct 22 16:22:17 libyans Oct 22 16:23:35 MagicPie73: Have you tried styles? Oct 22 16:23:52 Yes! It work! Thx Oct 22 16:24:17 Libyans helped me Oct 22 16:24:24 BigDecimal a = 10; BigDecimal b = 3; a.divide(b) = 0 and not 3.33, how come? Oct 22 16:24:58 Komak57: what language is this? Oct 22 16:25:09 oh Oct 22 16:25:10 java Oct 22 16:25:27 XD yep Oct 22 16:25:40 that's odd Oct 22 16:26:02 a.divide(b) = 0 is not a valid statement. Oct 22 16:26:02 lol Oct 22 16:26:07 hmm... what, that compiles? Oct 22 16:26:10 probably not Oct 22 16:26:11 googling, there seems to be a non-terminating decimal expansion error? Oct 22 16:26:17 maybe you are converting it to int, by accident? Oct 22 16:26:29 nono, it's a lot more complicated than that Oct 22 16:26:38 that's the summed up version. Oct 22 16:26:39 Komak57: perhaps the scaling? Oct 22 16:26:46 or the roundingMode Oct 22 16:27:04 even rounding, 10/3 = 3 (rounded to nearest digit) Oct 22 16:27:08 10/2 works just fine Oct 22 16:27:40 * alankila is not sure what komak is on about Oct 22 16:27:53 Komak57: well that's fucked. Oct 22 16:27:54 supposedly, scaling is the solution Patches|Codeine Oct 22 16:27:57 but in general terms you are probably either using the division wrong, or getting the result wrong Oct 22 16:28:39 also division is ugly operation for any supposedly big* class because it's necessarily just an approximation. Oct 22 16:28:41 anyone has null form getSuportActionBar ? Oct 22 16:30:12 a.divide(b, 2, RoundingMode.HALF_UP) Oct 22 16:31:26 Komak57: that do it? Oct 22 16:31:30 yep ^.^ Oct 22 16:31:34 right on Oct 22 16:31:46 half up probably isn't necessary Oct 22 16:31:53 2 just means 2 decimal places? Oct 22 16:32:00 mhmm Oct 22 16:32:17 Ok, so why does layout_gravity="right" work, but layout_gravity="bottom" does not? (inside a the root view, a vertical linear layout, with height="match_parent") Oct 22 16:32:22 only java could find a way to complicate division so thoroughly Oct 22 16:32:25 so 3.3333 would become 3.33, while 5.5555 would become 5.56 Oct 22 16:32:36 I want a text view on the bottom of the linear layout Oct 22 16:32:38 simple Oct 22 16:32:55 mrenouf|work: your parent view probably doesn't fill the space you think it does Oct 22 16:32:58 using JB? Oct 22 16:33:15 Because it places the views linearly Oct 22 16:33:51 If it honored it, there'd e.g. be a view at the top, nothing in the middle and a view at the bottom Oct 22 16:33:58 That's not how it works Oct 22 16:34:01 SimonVT, so why does right work? Oct 22 16:34:10 oh. cause it's "vertical" Oct 22 16:34:11 hmm Oct 22 16:34:15 Yes Oct 22 16:34:24 A horizontal linearlayout would ignore right Oct 22 16:34:28 And left Oct 22 16:34:35 sounds like you want a relative layout Oct 22 16:34:36 indeed it does Oct 22 16:34:37 or something Oct 22 16:34:39 And center_horizontal Oct 22 16:35:03 You can use gravity="bottom" on the linearlayout to put all the views at the bottom Oct 22 16:35:11 ooh Oct 22 16:35:14 thats it Oct 22 16:35:17 thanks Oct 22 16:35:36 I still cant keep this stuff straight ... *sigh* Oct 22 16:36:05 hey, does anyone happen to know what the easiest way to synchronize data between a Service and a few Activities would be? i was intending to use a sqlite database with a ContentProvider, but it's a ton of work for what's supposed to just be a one-off project Oct 22 16:36:26 can't I do `SharedPreferences formInfo = getSharedPreferences("MYFORM", 0);` in a method belonging to my own class? Oct 22 16:36:38 just..opening my sharedpreferences Oct 22 16:36:47 unfortunately, LoaderEx doesn't allow synchronization between different threads via the database :\ Oct 22 16:38:23 Sicp: Sure, if you have a method called getSharedPreferences(..) that calls through to Context#getSharedPreferences(..) Oct 22 16:38:42 my own getSharedPreferences you mean Oct 22 16:39:51 hey, thanks, here's what you said http://stackoverflow.com/questions/3357769/unable-to-use-shared-preference-within-class-extends-view Oct 22 16:39:56 I took your code literally. You need a Context to call getSharedPreferences on.. I figured that your own class wasn't a Context Oct 22 16:43:49 i'm so tempted to just throw in with an ORM at this point; writing all this boilerplate code just to use a database seems draconian Oct 22 16:47:22 is there any advantage of using juno over indigo for android dev? Oct 22 16:50:57 Is anyone can explain me the aim of "?" wildcards in ContentProvider? Oct 22 16:52:41 JulienDev do you mean "?" the character? Oct 22 16:54:29 I mean that "VALUES (?, ?, ?, ?, ?, ?)" Oct 22 16:54:42 yeah Oct 22 16:55:00 The idea is that a prepared statement is going to be made, and those values will be inserted at runtime Oct 22 16:55:18 rather than parsing an SQL statement wchich has parameters in it, you can just inject them as arguments Oct 22 16:56:10 lov: Do you have an example? Oct 22 16:56:28 they are properly called placeholders. I think most clients translate these to :p1 :p2 :p3 etc. and then assign values to each of the p1, p2, p3. The :xx is called host variable. Oct 22 16:58:45 JulienDev: http://en.wikipedia.org/wiki/Prepared_statement Oct 22 16:59:18 and yeah, they're called parameters or placeholders or bind values Oct 22 16:59:34 in my own SQL I used :pp syntax above the ? because it's more convenient Oct 22 16:59:44 no more counting the ?'s and working out which parameter corresponds to what. Oct 22 16:59:53 strange question, but then again..I don't know what I'm asking about. Can I do POST,PUT,DELETE, etc.. with AsyncTask? Oct 22 17:00:12 I want (after having a form filled) to send the data in JSON to the server, notifying it about a new user, updating an existing user, etc... Oct 22 17:00:15 Sicp: meaningless question. asynctask has no relevance. Oct 22 17:00:25 I know.. Oct 22 17:00:34 Ok thank you lov, alankila, it's clearer now :) Oct 22 17:00:38 but I'd say that you are forced to move networking off the main thread, or at least are strongly encouraged to Oct 22 17:00:40 I am definitely going to use AsyncTask for it, but what's what I said got to do with the means that I go out to the server with Oct 22 17:00:46 so asynctask is as good as any. Oct 22 17:01:02 on iOS the guy is doing what I mentioned through some method that they offer, was checking to see if we got that Oct 22 17:01:12 I..don't understand. Oct 22 17:01:28 We don't really understand what you're asking. Oct 22 17:01:35 Are you talking about PUT, DELETE, etc HTTP commands? Oct 22 17:01:42 they really have nothing to do with AsyncTask whatsoever. Oct 22 17:02:03 You can use these non-standard commands in your HTTP requests. You'll probably need to modify the parameter of whatever you're using to do your HTTP requests. Oct 22 17:02:27 You'll note the generics that the asynctask uses; you can provide parameters for it, so you can provide an array of values, etc. Oct 22 17:02:39 or even your own custom object that can encapsulate the request method, the url, the parameters, etc. Oct 22 17:02:52 er, why would you use non-standard HTTP commands? Oct 22 17:04:02 DELETE etc are actually standard commands Oct 22 17:04:06 they're just pretty much never ever used Oct 22 17:04:23 well, "standard" in that they're part of the standard Oct 22 17:04:44 http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9 Oct 22 17:05:28 yep, clear now Oct 22 17:05:31 SMTP had 'deliver direct to terminal' Oct 22 17:05:32 for example, any server that actually lets you use the TRACE command was configured by someone who should be shot, then shot again. Oct 22 17:05:56 of course they have nothing to do with one another, I just have to figure out how to send (along with my data) the intention that I'm going out to the server with (POST, GET, etc..) Oct 22 17:07:51 http://blog.apigee.com/detail/restful_api_design should help Oct 22 17:09:17 Idempotent Oct 22 17:09:20 now that's a nickname Oct 22 17:11:28 hello Oct 22 17:11:40 using a nine patch image in listview as background to textview Oct 22 17:11:49 but its not streching on being reused by listview Oct 22 17:12:27 that's odd. Can you please pastebin your relevant code/layout/etc? Oct 22 17:12:34 along with maybe a screenshot Oct 22 17:26:02 hey, my SQliteOpenHelper subclass is just supposed to handle creating and updating my database, correct? it's not supposed to have any CRUD methods in it, right? Oct 22 17:28:36 escherial correct Oct 22 17:28:50 heh, alright :) thanks for the sanity check Oct 22 17:29:04 i guess that, if i have a contentprovider, all the CRUD stuff should go through it, right? Oct 22 17:29:12 yeah Oct 22 17:29:17 do people generally have another layer on top of the contentprovider to ease working with it, too? Oct 22 17:29:44 cant speak for everyone but i try to avoid that Oct 22 17:29:54 agreed Oct 22 17:30:19 the level of "abstraction" that's implicitly recommended in the official android sample apps is insane Oct 22 17:30:53 for small projects, i typically dont even make a content provider Oct 22 17:31:06 i just use the crud methods on the sqlitedatabase object Oct 22 17:31:55 ^ Oct 22 17:32:18 hell, don't even use them for large projects. Use them only for projects that require you to share the data with other apps. Oct 22 17:34:03 the trouble is that i have a number of components (services, activities, etc.) that i need to synchronize somehow Oct 22 17:34:27 and why do you think you need a ContentProvider for that? Oct 22 17:34:30 can't use a cursorloader that syncs across multiple components without using a contentprovider, as far as i know Oct 22 17:34:39 the database is already threadsafe Oct 22 17:34:52 uh, yes you can use a cursorloader without a contentprovider. Oct 22 17:34:52 right, but i don't want to have to poll the database to keep my views up to date Oct 22 17:35:14 ah, sorry, i wasn't aware of that :) that's good news, then Oct 22 17:35:19 so you use the observer pattern Oct 22 17:35:39 i do remember having trouble trying to use cursorloaders without a contentprovider Oct 22 17:35:40 I am not sure about using the contentobservers without a contentprovider, but g00s says you can Oct 22 17:35:45 ah, and just publish to the observer when i do things in my SqliteOpenHelper subclass...? Oct 22 17:36:02 1 sec, I'm almost positive I have code using CursorLoade without a CP Oct 22 17:36:06 let me look Oct 22 17:36:19 if it's the commonsware stuff, it doesn't synchronize across multiple components Oct 22 17:37:40 Escherial: never mind -- I'm using a CursorLoader on a ContentProvider Oct 22 17:37:45 tdignan_ cursorloader needs to take in a uri, i dont know how you'd get around that Oct 22 17:37:48 it's just in a project where I also didn't implement one Oct 22 17:38:04 The ContentProvider happens to the the Contacts one, so I forgot Oct 22 17:38:14 still, I'd encourage you not to do this. Oct 22 17:38:30 there are workarounds http://stackoverflow.com/questions/7182485/usage-cursorloader-without-contentprovider Oct 22 17:38:32 you can notify yourself of changes without a ContentProvider. Oct 22 17:38:50 nice Oct 22 17:44:05 right, but you'll notice in the commentary that they don't refresh when the data is changed Oct 22 17:44:15 which is the reason i'm jumping through all these hoops in the first place Oct 22 17:44:51 all you need to change that is a little reference to some method at the end of your database code that updates you when stuff has changed. Oct 22 17:45:08 but if you want to use ContentProvider, I'm not going to stop you. Oct 22 17:45:41 my qualm with it is that if you are going to make changes to the database later, unless you are much smarter than me in the way you implemented the ContentProvider, you're not going to have fun. Oct 22 17:45:56 also it's a lot of boilerplate just to start. Oct 22 17:46:01 if I did one again I'd try to generate it. Oct 22 17:47:07 agreed :\ i've actually done it before, which is why i'm hesitant to do it again Oct 22 17:48:17 are you referring to some method that i'd write myself to update the rest of my list activities when something changes, or do you mean something different? Oct 22 17:49:19 sure. just make yourself a "listener" Oct 22 17:49:22 i'm not sure how i can alert any visible activities (or potentially ones on the back stack) that the content has been changed by a service Oct 22 17:49:43 you can use a broadcastreceiver for that, but I'm not sure if that's preferable for this. Oct 22 17:50:27 or each activity could bind to the service when it becomes visible, and pass a handle to itself in... probably not as clean of an idea Oct 22 17:50:28 it seems like i'd end up implementing some kind of ad-hoc IPC based on intents that does pretty much what a contentprovider (and contentobservers, cursorloaders, etc.) do Oct 22 17:50:58 yeah but it wouldn't have the problem of being a fractal pattern of expanding code whenever you make a schema change. Oct 22 17:52:15 true :\ Oct 22 17:52:46 it doesn't seem like it would be hard to write an orm to wrap all of this, and you could probably make it decently fast by generating code beforehand rather than using reflection Oct 22 17:53:02 even with reflection, you could probably do a lot of caching to make subsequent accesses fast enough Oct 22 17:53:59 all of the orms i've seen are either ridiculously complicated or just toy examples that can't interface with android's async components like cursorloaders, etc. Oct 22 17:59:05 I'm not sure why not interfacing with android stuff makes it a toy. I think ORMlite is pretty nice. Oct 22 17:59:29 I've fantasized before about just writing a script to generate the contentproviders Oct 22 17:59:50 but right now i'm working on something else. feel free to take the idea and run with it, and hopefully share it Oct 22 18:00:17 er, not that being unable to interface with android's stuff makes it a toy, just that they're coincidental Oct 22 18:00:42 meh, do you ever get the feeling that other people don't think english is your first language online? Oct 22 18:01:08 it's my first (in fact, my only) language, for the record Oct 22 18:01:46 i remember running into an eclipse plugin that generates contentproviders, actually...let me see if i can find it Oct 22 18:02:40 not sure if this is the one, but yeah: http://code.google.com/p/mdsd-android-content-provider/ Oct 22 18:03:21 if this works than this is incredibly awesome Oct 22 18:03:52 I'll have to give it a try when I have a free moment Oct 22 18:04:18 yeah, no pressure :) thanks for the advice and opinions so far Oct 22 18:04:22 it's nice not to be ignored, heh Oct 22 18:06:13 trying it out now, will let you know how it works out Oct 22 18:06:57 godspeed Oct 22 18:07:34 How do I stop the current animation of a ViewFlipper? Oct 22 18:07:54 I just want to immediately push it to the next view if the user does an action mid-animation Oct 22 18:13:05 guys, I'm doing a json request in my application. I'm using a handler, so it will do the request every 30 seconds.. Oct 22 18:13:34 sounds great tofra! Oct 22 18:13:38 But when I put the application in the background (and do other stuff on my phone/tablet) I want the handler to "pause". Oct 22 18:13:45 oh Oct 22 18:14:06 Right now it's still executing the handler, and sending the message which was scheduled.. Oct 22 18:14:35 Any hint where I should look, or what I should use? Oct 22 18:15:00 I don't want to use the onPause methods... :-) Oct 22 18:15:28 tofra: Handler#removeCallbacks(Runnable) Oct 22 18:15:45 oh yeah, i've been having that probs as well Oct 22 18:15:51 what if i'm using asynctask? Oct 22 18:16:00 hit cancel? Oct 22 18:17:15 evancharlton: when should the removeCallbacks being executed? Because I don't want to use the onPause of an activity.. Oct 22 18:17:35 chups: asynctask will still execute.. Oct 22 18:18:27 tofra: why not. Oct 22 18:18:34 AdMob for example is working like I wanted to work.. Oct 22 18:18:49 tofra: onPause is called when your activity is no longer in the foreground. Maybe you'd prefer onStop? Oct 22 18:18:58 I'm not sure why you "don't want to use onpause" Oct 22 18:19:09 It doesn't use the onPause/onStop etc, but only executes the request when your app is in the foreground.. Oct 22 18:19:34 onStart, send a handler to start a repeating task. Oct 22 18:19:37 onStop, cancel that message. Oct 22 18:19:43 I don't see the issue here. Oct 22 18:19:46 plus onPause is the only thing you're guaranteed to get Oct 22 18:19:50 eh Oct 22 18:19:54 isn't onStop optional? Oct 22 18:19:58 not getting onStop is a pathological case at this point Oct 22 18:20:04 I think that as of some version or other you're guaranteed onStop Oct 22 18:20:12 lov: in the end i'm creating a library, and don't want to overload the server because the "developer" didn't "paused" the timer.. Oct 22 18:20:26 tofra: well there's not a hell of a lot you can do. Oct 22 18:20:33 you need to hook into those callbacks somehow. Oct 22 18:20:45 any idea how AdMob did this? Oct 22 18:20:50 no. Oct 22 18:21:12 I'm assuming that the views are inspecting the parent activity or something Oct 22 18:21:47 lov: onStop is killable and may not complete, onPause will complete Oct 22 18:21:58 lov: seems ot be what I'm seeing Oct 22 18:22:08 lov: I thought onStop wasn't promised, but it seems like it will at least start Oct 22 18:22:28 Hmm, maybe I need to decompile it, and see if I can see how they did it.. Oct 22 18:23:03 dragorn: I think that the contract is basically that you might not get onStop, but if you don't the process is dying anyway Oct 22 18:23:49 yep, in my example onStop will also work.. Oct 22 18:23:52 lov: that said, if you don't unregister a callback for a system event and you don't get onstop, is it going to blow up when the system tries to call your nonexistent environment? (ie locationupdate, etc) Oct 22 18:24:11 dragorn: "no" Oct 22 18:24:24 generally the way the system handles callbacks from external processes involves using death listeners Oct 22 18:24:31 so that things don't get blotto if you force kill a process Oct 22 18:24:42 I mean you WANT to kindly unregister your stuff Oct 22 18:24:49 lov: hm. I was pretty sure it did, if it was a callback from a system thing, but maybe I'm confusing finish()ing my process vs killing it with, say, installing a new copy Oct 22 18:24:52 but relying on end developers to be competent for your device integrity is a losing idea Oct 22 18:25:01 now, that said Oct 22 18:25:01 lov: right, it doesn't crash the service Oct 22 18:25:12 it's possible that OEMs "fix" services and in doing so introduce issues like that Oct 22 18:25:13 lov: but I thought it threw up a crash of your activity Oct 22 18:25:16 oh Oct 22 18:25:18 yeah Oct 22 18:25:29 if we're talking about forgetting to unregister listeners or whatever yeah that can cause a crash of your activity Oct 22 18:25:33 lov: b/c it half-ass starts your activity when the callback triggers, your env is missing, and shit goes down Oct 22 18:25:52 lov: I don't know if that persists across an activity OOM kill or something tho. I think it does? Oct 22 18:25:54 basically, when you reach the point where onStop won't be called, your entire environment is FUBAR anyway Oct 22 18:26:11 yeah you're probably in no-ram thrash to death Oct 22 18:32:37 :( Oct 22 18:38:25 Hello, I am planning on a big cross platfor project, but have never developed for android, should I create separated project for android platform or can I run .jar on android? Oct 22 18:38:38 sorry my keyboard is in mess Oct 22 18:39:14 deximat: i recommend creating a java project for core and a separate android project Oct 22 18:39:41 What platforms are you crossing? Oct 22 18:40:07 Android uses most of J5SE, but you'll have to note that some things are missing or changed, especially the UI elements Oct 22 18:40:39 pc(Mac, Linux and Windows) which would all be addressed to java cross platformess, and what doesn't I will create my interface to system Oct 22 18:41:12 well I would do separate viewer componets of course Oct 22 18:46:22 Yeah, you can definitely have a core java codebase which you can then have device specific code hooked up to Oct 22 18:46:30 Take a look at libgdx as a great example of this in practice Oct 22 18:47:22 Nice Oct 22 18:47:26 thank you Oct 22 18:48:10 Again, just bear in mind that certain classes are available on J5SE that aren't availble on Android and vice versa. Oct 22 18:48:32 say that i want to do something more than just map db columns to text fields in my list item layout -- do i have to use something other than a SimpleCursorAdapter in that case? Oct 22 18:49:30 is it possible to launch a camera intent and at the same time somehow force the device's default camera app to stay in landscape mode? Oct 22 18:49:30 lov, how about networking things - sockets and datagrams? Oct 22 18:49:43 That's pretty much the same across platforms Oct 22 18:50:06 Bear in mind that there might be some quirks on android. Oct 22 18:50:07 dont think so tnzr Oct 22 18:50:10 that's most important for me, other things are pretty general Oct 22 18:50:14 For example, the default timeouts for sockets are set to 0 Oct 22 18:50:20 you have to vacate camera resource Oct 22 18:50:28 so it's possible that you'll end up in a situation where the network goes bonkers and you'll never possibly get a return on your socket. Oct 22 18:50:42 take a look at http://developer.android.com/reference/packages.html Oct 22 18:50:45 but thats my knowledge, do confirm with someone saner :-P Oct 22 18:50:58 i have an issue where if you keep a galaxy s2 in portrait orientation and take a pic, it auto-rotates to landscape (even as you keep the phone vertically oriented), you take the pic, and it rotates back after you clikc the "ok" check mark Oct 22 18:51:29 by take a pic I mean you launch the cam intent and you want to get at the image after you're done in onActivityResult() Oct 22 18:51:53 I think the image is getting hosed in the onPause()/onResume() that occurs when the screen re-orients itself Oct 22 18:52:18 I've done this before and I know it's pretty trivial but still difficult to really google for. I want to construct the resource name when accessing it, meaning I would end up with something like this: "R.id.voice00 + "rand"" Oct 22 18:53:03 I think that camera API allows you to force orientation or something of the sore Oct 22 18:53:08 *sort Oct 22 18:53:09 can I do (int) "R.raw.voice00 " + rand ? casting the...no Oct 22 18:53:19 but, not 100% sure Oct 22 18:53:25 lov, thank you I will check it Oct 22 18:56:37 rand = randomGenerator.nextInt(6) + 1; ---- mp = MediaPlayer.create(Main.this, R.raw.voice00)+rand; Oct 22 18:56:55 this is what I want to do, basically. on each click, play a different voice out of the voices I have in raw Oct 22 18:57:50 so it would select R.raw.voice001 then R.raw.voice005, etc... Oct 22 18:58:56 seems so simple :o Oct 22 19:00:20 is it possible to set a send email fonction in an xml ? Oct 22 19:00:28 like a web anchor Oct 22 19:00:38 Sicp: You can use reflection, or you can look for methods in Resources to do this. Oct 22 19:00:41 I do this with GPS Notification Oct 22 19:01:37 it isn't trivial, is it Oct 22 19:06:12 Sicp: if you are aware of the names of the resources, can't you just keep an array of their names and choose randomly from it? Oct 22 19:09:01 Sicp: of course it's trivial, I typically just use reflection. R.raw.class.getField("name" + n) or something Oct 22 19:09:22 I have no qualms about using reflection. It's the generic solution to the problem Oct 22 19:17:39 that isn't valid for the create(Context, URI), alankila Oct 22 19:17:49 what you get from doing R.raw.class.getField is a Field Oct 22 19:20:51 Sicp: which you then use reflection again to get the value of. Oct 22 19:20:53 quick sanity question, but when using SQLiteQueryBuilder to select a particular record by ID, is it sufficient to say builder.appendWhere("_id=" + recordID), where recordID is read from the argument to the contentprovider? Oct 22 19:21:10 i'd prefer to use a parameter, but i'm not sure how to do that without it being part of the initial selectionargs Oct 22 19:21:13 I see.. Oct 22 19:21:16 Sicp: example: https://code.google.com/p/android-scripting/source/browse/android/ScriptForAndroidTemplate/src/com/dummy/fooforandroid/ScriptService.java?r=14667d1ed999ae2645ab2afd189992e42468a0e1#189 Oct 22 19:22:27 it's not my fault if you don't know what to do with a Field object. Oct 22 19:22:35 but here's a hint: you call a method on it. Oct 22 19:22:53 I didn't blame you for not knowing :) Oct 22 19:24:28 lov: Another idea to solve my issue with the timer which should run every 60seconds when running in the foreground. Oct 22 19:25:13 tofra: set it on onResume, stop it on onPause. What's the problem? Oct 22 19:25:25 I have a custom view (extends View). Can I "attach/create" an activity to it? Then I'm able to use onpause/onstop to stop the timer.. Oct 22 19:26:20 The problem is I have a custom view, which should start the timer.. Oct 22 19:26:35 It should end it when the app is not in the foreground anymore.. Oct 22 19:27:36 so use your activity onresume/onpause Oct 22 19:27:56 either host the timer in the activity or call a function in the view Oct 22 19:28:36 Like I explained before, I'm creating a library, and the library should be the owner of the timer. not the activity who uses the library.. Oct 22 19:28:46 What do you mean with a function in the view? Oct 22 19:28:59 hi Oct 22 19:30:56 Hello I have a question concerning the ActionBarSherlock: How can I disable a tab? My goal is to disallow the user to switch the currently active tab (based on a condition). Oct 22 19:31:25 I already found a quetsion on stackoverflow on this but no satisfying answer http://stackoverflow.com/questions/9208787/does-actionbarsherlock-allow-to-enable-disable-an-actionbar-tab#_=_ Oct 22 19:32:05 tofra: Views have callbacks about whether they're visible or not. Oct 22 19:32:07 use those. Oct 22 19:34:06 Can you tell me more on this? I am searching because one of my employees is stuck. I am not close to android development yet (just reading the source at the moment). Oct 22 19:34:13 is a tab a menuItem? Oct 22 19:34:38 tokam: ABS is just a compatibility layer for the ActionBar. Oct 22 19:34:43 You should read documentation about the ActionBar Oct 22 19:34:49 in particular, you should be reading documentation on d.android.com Oct 22 19:35:08 does setCheckable help to solve the problem? https://github.com/UweTrottmann/SeriesGuide/blob/master/ActionBarSherlock/src/com/actionbarsherlock/view/MenuItem.java Oct 22 19:35:27 I don't know, does it? Oct 22 19:39:38 lov: the tab should be visible but not clickable. Oct 22 19:40:53 yeah, I get that. Oct 22 19:41:04 I was implying that you could try setCheckable yourself. Oct 22 19:42:57 I do not have the complete source in an eclipse project yet Oct 22 19:43:14 maybe this is the class he is working on Oct 22 19:43:15 http://www.jarvana.com/jarvana/view/com/google/android/android/4.0.1.2/android-4.0.1.2-javadoc.jar!/android/app/ActionBar.Tab.html Oct 22 19:44:26 Hello everyone, I'm getting an error off some code I picked up: http://pastebin.com/q25a8p0a I'm really new to this and don't really know what it means or how to fix it Oct 22 19:46:36 your guess is as good as ours if you're copying and pasting code; there's no way that we can help you with something that you don't understand Oct 22 19:47:51 it looks like you're trying to do something really odd Oct 22 19:50:46 docmur: ask in #java, provide a fuller dump of code. Oct 22 19:50:49 Yeah, found something.. I think I can use onVisibilityChanged Oct 22 19:52:50 for anyone with an app on the play market with many screenshots … is the web page rendered wrong with the slideshow arrows drawn in the wrong place? happens with both chrome and firefox. Oct 22 19:53:03 this just started happening last week i think Oct 22 19:53:11 how many is many? Oct 22 19:53:22 i have one with 5 that seems fine Oct 22 19:53:24 i have the max, 7 or 8 Oct 22 19:53:28 huh Oct 22 19:54:16 looks pretty stupid, i can see buyers thinking 'uh, weird' Oct 22 19:54:55 g00s: yeah, that happened to me Oct 22 19:54:56 yeah i noticed that recently too Oct 22 19:54:58 wait, i just checked and it is Oct 22 19:55:02 I just figured that market burped and went on with my life Oct 22 19:55:20 ok, its not just me .. thanks Oct 22 19:56:41 g00s: the same here with my app.. Oct 22 19:56:53 thx for checking tofra Oct 22 19:57:12 Let's hope we can soon "answer" reviews... Oct 22 19:57:14 :D Oct 22 19:57:21 Waiting for this a long time already.. Oct 22 20:05:15 is it common to use Uri.getPathSegments() to get the 'arguments' to a contentprovider URI? Oct 22 20:06:46 it's also kind of tricky to allow the user to pass in their where clause to the delete() method while at the same time making deletes on, say, restaurants/43 delete just the restaurant with ID #43 Oct 22 20:07:12 (i guess i could just stick " AND (_id=" + getPathSegments().get(1) + ")" in there, but that seems ripe for abuse) Oct 22 20:07:21 i could of course make sure it's an int Oct 22 20:09:26 Escherial: http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#compileStatement(java.lang.String) Oct 22 20:09:35 You really, really, really want to use parameterized queries Oct 22 20:09:44 sanitize your input you filthy developer Oct 22 20:10:24 it's much cleaner as well Oct 22 20:10:47 in addition to the advantage that people, you know, can't exploit your code Oct 22 20:11:10 and with prepared statements... faster Oct 22 20:14:51 lov: i know; as a long-time web developer, i knew that would pretty much instantly raise sql injection flags Oct 22 20:15:33 i guess this is going to be tricky to use with SQLiteQueryBuilder, though... Oct 22 20:16:23 Escherial: consider WHAT you want people to be able to do with your service. Oct 22 20:16:34 If you want them to be able to query anything and everything, ok, but you have to live with the consequences of that. Oct 22 20:16:45 nothing, actually; the only reason i'm using a contentprovider is so my services and activities can sync up on the database Oct 22 20:16:52 i'm not intending to export the contentprovider Oct 22 20:17:32 i guess it's common to only implement what you need on the contentprovider, then, rather than anticipate that someone may someday want to delete a particular record rather than all of them, for instance? Oct 22 20:17:34 you don't need a contentprovider for that Oct 22 20:18:12 people keep telling me this, but every solution i've seen that doesn't involve a contentprovider can't synchronize on the db between background and foreground things (i'm afraid of calling them "tasks", "activities", etc. since everything is overloaded) Oct 22 20:18:52 i just want my list of stuff that's populated from a broadcastreceiver and emptied by a service to be updated in real time Oct 22 20:19:30 while we're on the topic of contentproviders or whatever, do any of you have opinions about this?: http://code.google.com/p/mdsd-android-content-provider/ Oct 22 20:19:53 seems like solutions to the impedance of creating a contentprovider are quite common, but there's no consensus about which is best or even a clear statement of the tradeoffs between them Oct 22 20:21:15 Escherial: I'd also prefer a ContentProvider in this case, but why won't opening the database multiple times just work? Oct 22 20:21:34 SQLite isn't what you would call multithreading friendly. Oct 22 20:21:42 it won't be fast Oct 22 20:21:47 but it'd work Oct 22 20:21:50 Does anyone know of any solutions that allow peer-to-peer voip? Oct 22 20:22:07 Skype? :P Oct 22 20:22:20 or if that's even possible Oct 22 20:22:22 i mostly don't want to have to constantly poll the database, but yes, i'm concerned about the threading issues, too Oct 22 20:23:01 i mean, if i have to write a contentprovider, i'm fine with that; it just seems kind of unclear about what's expected in a "standard" implementation of it Oct 22 20:29:51 wow, and eInk android phone … i think thats pretty cool Oct 22 20:42:01 hey, how can I connect to a bluetooth device (headset) so that the phone will use it (just like in the bt settings menu)? Oct 22 20:44:01 I'm actually not sure how you bond to devices programatically Oct 22 20:44:06 You might want to take a look at the Settings app source Oct 22 20:44:17 definitely start at http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html Oct 22 20:44:29 you can only have one headset, all the interaction is through bluetoothmanager Oct 22 20:45:29 as far as actually bonding it in audio mode, I'm not sure you can, programatically Oct 22 20:45:39 my problem is that my headset wont autoconnect in my car. I'm already starting bluetooth on the cardock event. Oct 22 20:45:44 take a look at http://developer.android.com/guide/topics/connectivity/bluetooth.html too Oct 22 20:47:06 afaik there's no api to do what you want; you can query a2dp stuff and find out what supports it, but there's no a2dp bond api Oct 22 20:47:31 thx lov, but I've just found some informations on connecting with an bt device so I can communicate with it. I just want that the system will do it Oct 22 20:47:38 ah here you go, http://code.google.com/p/a2dp-connect/ Oct 22 20:48:26 It's a massive kluge Oct 22 20:48:34 but it's your best/only option Oct 22 20:49:25 it tries to force an a2dp connection by connecting to rfcomm Oct 22 20:50:51 anyone going to droidcon london? Oct 22 20:50:57 no Oct 22 20:51:33 Hi Oct 22 20:52:24 I've question about crash between two view using UI thread Oct 22 20:52:25 okay, thank you for your help lov & dragorn =) Oct 22 20:52:37 anyone can help me? Oct 22 20:52:40 * lov points to the topic Oct 22 20:52:54 choijuho: don't ask meta questions Oct 22 20:52:56 just ask Oct 22 20:53:34 ok Oct 22 20:53:57 I'm making music player :) Oct 22 20:54:08 congratulations. Oct 22 20:54:30 that's not a question Oct 22 20:54:35 I displayed timer for time display and coverflow for album jacket image Oct 22 20:55:43 when I touch moved coverflow, it freezed by time display Oct 22 20:55:53 by setText Oct 22 20:56:01 it's UI thread Oct 22 20:56:09 coverflow also UI thread Oct 22 20:56:13 I think so Oct 22 20:56:19 choijuho: hey Oct 22 20:56:23 can you do me a favor? Oct 22 20:56:27 consolidate your thoughts Oct 22 20:56:35 because this stream of consciousness Oct 22 20:56:37 is really annoying Oct 22 20:56:39 see what I mean? Oct 22 20:56:57 ok Oct 22 20:57:07 hmm Oct 22 20:57:29 I am using ABS with a Holo.Dark as parent, which is all fine and everything. Except on a phone with a physical hardware menu button, because the menu when it pops up pops up with that light grey background, which renders the holo.dark icons impossible to see. Is there anyway to set the color of the options menu for <3.0 devices? Oct 22 20:57:53 why can't setText method disturb moving of coverflow periodically? Oct 22 20:58:01 oops Oct 22 20:58:10 why does Oct 22 20:58:31 why does setText method disturb moving of coverflow periodically? Oct 22 20:58:39 lasserix: there are 4.0 devices with a hardware menu key too, it's not removed on upgrade :P Oct 22 20:59:03 Oh well, I assume they pop up their menu options as overflow Oct 22 20:59:31 evancharlton : I wanna hear your opninon about this problem Oct 22 20:59:39 but for phones that use the "older" style menu options, (ie panel on the bottom of the screen) is there a way to change that panel's background color? Oct 22 20:59:48 Otherwise it's pointless to use Holo.Dark Oct 22 21:00:11 why setText make stop coverflow periodically? :< Oct 22 21:00:29 choijuho: this isn't really a coherent question. Oct 22 21:00:34 When you say "coverflow", what do you mean? Oct 22 21:00:36 What is coverflow? Oct 22 21:00:59 its an itunes thing thing Oct 22 21:01:09 it's a kind of gallery Oct 22 21:01:23 ... Oct 22 21:01:28 Yeah, you're STILL NOT HELPING HERE. Oct 22 21:01:33 it's a custom gallery class Oct 22 21:01:35 Is it a view? Oct 22 21:01:38 ok Oct 22 21:02:02 When you say that it "freezes" your time display Oct 22 21:02:05 what do you mean? Oct 22 21:02:08 Are you blocking the UI thread? Oct 22 21:02:12 Are you somehow eliminating a callback? Oct 22 21:02:25 I'm getting a VERY strong suspicion that you're just copy/pasting code without any idea of what it does and then blindly asking for help Oct 22 21:03:02 no Oct 22 21:03:07 I didn't Oct 22 21:04:42 when I call setText to display time, move action(MotionEvent.ACTION_MOVE) of gallery(coverflow, it's same) freezed Oct 22 21:05:56 is it possible to change the value of android:panelFullBackground in code? Oct 22 21:06:20 in order to solve this problem, I've put setTExt into AsyncTask, runOnUIThread, handler Oct 22 21:06:31 hmm, so the ContentProvider delete method takes arguments that allow the caller to supposedly control what ends up getting deleted Oct 22 21:06:44 is it par for the course to just ignore these if you have your own idea about what your URIs mean? Oct 22 21:08:08 I want know why view(view's method) freeze another view Oct 22 21:09:19 it's possible that you're blocking the UI thread. Oct 22 21:09:19 choijuho: because they all run on the same thread Oct 22 21:09:45 evancharlton : yes Oct 22 21:09:48 lov : yes Oct 22 21:10:08 so... don't do that. Oct 22 21:10:22 but timer must be worked periodically Oct 22 21:10:51 can you image mp3 player without time display? Oct 22 21:10:55 oh my god Oct 22 21:11:23 do expensive operations in a thread, update ui in ui thread Oct 22 21:11:26 that's all there is to it Oct 22 21:11:31 maybe I had better remove coverflow Oct 22 21:13:20 ah... Oct 22 21:13:40 hy all! My problem is this: http://pastebin.com/jDagUGuD Can you help me? Oct 22 21:14:17 gregtom6: that's basic java Oct 22 21:14:29 "Circle" != "Circle" Oct 22 21:14:33 will be true Oct 22 21:15:25 hmmm anyway I will dig one more. okok Oct 22 21:15:26 gregtom6: try vmi.equals("Circle") Oct 22 21:15:36 it will be true Oct 22 21:15:46 the == operator compares object pointers, not their contents Oct 22 21:15:51 do what Patches said Oct 22 21:15:51 true Oct 22 21:15:57 wait until trying Oct 22 21:16:01 I forget to try that Oct 22 21:16:03 sampullman: "Circle" != "Circle" will be false Oct 22 21:16:05 because of string interning Oct 22 21:16:15 try it Oct 22 21:16:16 :D Oct 22 21:16:24 i hate java Oct 22 21:16:32 that's an expectable result btw Oct 22 21:16:59 stupid people tend to "hate" things they don't understand Oct 22 21:17:20 same result in C. Oct 22 21:17:35 i understand it just fine Oct 22 21:17:39 same result in python Oct 22 21:17:52 python == compares string contents Oct 22 21:17:57 erm i think python works fine Oct 22 21:18:00 totally different Oct 22 21:18:04 but in c, yes, pointers etc Oct 22 21:18:18 Patches|Codeine: no, I just ran it Oct 22 21:18:23 same result in python, same in C. Oct 22 21:18:23 c doesn't require "abc" and "abc" to be the same location. Oct 22 21:18:25 same in java. Oct 22 21:18:30 oh, ok Oct 22 21:18:34 so it's just my implementation of C Oct 22 21:18:35 or luck Oct 22 21:18:43 tdignan: python == is completely different Oct 22 21:18:53 tdignan: Oct 22 21:18:54 >>> c = "circle" Oct 22 21:18:54 >>> c == "circle" Oct 22 21:18:54 True Oct 22 21:18:59 in gcc, that particular optimization can be toggled with -fmerge-strings Oct 22 21:18:59 python works fine. Oct 22 21:19:00 oh, I should be using 'is' Oct 22 21:19:15 "foo" is not "foo" -- false Oct 22 21:19:24 is as to python as == is to java. Oct 22 21:19:30 yes, of course Oct 22 21:19:46 my point is the result that "foo" != "foo" is false in java shouldn't be surprising. Oct 22 21:20:01 but "foo" != "foo" in java is true Oct 22 21:20:01 it's not, i used a bad example Oct 22 21:20:04 because of the string interning Oct 22 21:20:08 erm Oct 22 21:20:09 false Oct 22 21:20:10 nevermind Oct 22 21:20:11 yeah Oct 22 21:20:15 python does do string interning Oct 22 21:20:16 sampullman: i didn't even catch your example, only codeine's Oct 22 21:20:17 spaz out less, thanks. Oct 22 21:20:19 and c does it in gcc Oct 22 21:20:21 you're right Oct 22 21:20:27 take more codeine' Oct 22 21:20:28 pragma-++ Oct 22 21:20:35 tdignan: 4 in already today Oct 22 21:22:50 sort of off topic: does java have a good reason for doing string interning? Oct 22 21:22:58 i always thought that was just a c thing Oct 22 21:23:35 i just can't imagine it ever saves much memory Oct 22 21:24:02 why is my random not random enough! Oct 22 21:24:14 it repeats the same number 5 times in a row sometimes! Oct 22 21:24:23 Sicp: I don't think you understand what random is Oct 22 21:24:34 I am angry and that's all I understand Oct 22 21:24:45 but pastebin your code if you actually want help Oct 22 21:24:46 if you don't want repeats, just test for them and generate a new random Oct 22 21:25:04 although, technically i suppose that could loop forever Oct 22 21:25:05 Sicp: sometimes when I flip a coin I get heads 5 times in a row! Oct 22 21:25:07 sampullman: string interning can save a lot of memory Oct 22 21:25:08 ... it is not a C thing; the C specification does not require this optimization, and some compilers may not do it and gcc has a flag to disable/enable it. Oct 22 21:25:09 now that's a good idea, sampullman Oct 22 21:25:19 I will paste, evan Oct 22 21:25:25 say you have 1k instances of a poorly designed class with a string constant in it Oct 22 21:25:27 1k strings Oct 22 21:25:28 or 1 string Oct 22 21:25:30 take your pick Oct 22 21:25:39 evancharlton, http://pastebin.com/FFWFesyf Oct 22 21:25:49 Is it anyWay to give fake sim card number to Android ? Oct 22 21:25:49 Is it anyWay to give fake sim card number to Android ? Oct 22 21:25:52 Is it anyWay to give fake sim card number to Android ? Oct 22 21:25:52 Is it anyWay to give fake sim card number to Android ? Oct 22 21:25:55 just ask more Oct 22 21:25:57 you'll get an answer Oct 22 21:25:59 poorly designed being the key, but i concede Oct 22 21:26:03 can we votekick? Oct 22 21:26:16 Sicp: rand = randomGenerator.nextInt(7) + 1; Oct 22 21:26:18 you don't need to worry. the ops here will take care of it. Oct 22 21:26:20 Sicp: .... Oct 22 21:26:20 sampullman: yeah, but it shouldn't hurt Oct 22 21:26:28 in java, it can also provide a significant performance boost if you intelligently take advantage of internal comparisons... Oct 22 21:26:28 rarely are you comparing string constants Oct 22 21:26:29 fAz4: wat. Oct 22 21:26:31 what.. Oct 22 21:26:33 and hopefully never with == Oct 22 21:26:52 I used to use this back in C++ days, all I did was give it a seed to be more random Oct 22 21:26:54 Hey guys, I have the Android SDK Manager, but I was told that the latest build is not always the one most people have; what build should I be installing at the current time? Oct 22 21:27:00 and it used to be just fine operating on something as small as 7 Oct 22 21:27:03 Sicp: you're given a range of 7 and you're surprised you get a lot of repeats? Go roll a die a bunch of times in a row and let me know how that works out at providing unique numbers. Oct 22 21:27:14 Patches: true, it just slightly bothers me that something so "low level" makes a difference in java Oct 22 21:28:26 Sicp: it seems like if you don't want repeats, you should be putting the choices in an array, shuffle that, and then loop through the array Oct 22 21:28:32 Sicp: look into SecureRandom also Oct 22 21:28:40 it's a better quality but apparently far slower random number generator Oct 22 21:28:57 that thing with the random voice files, it worked by the way Oct 22 21:29:14 ok, off to search Oct 22 21:29:33 these ordinary random number shits we got are typically all linear congruential generators. You shouldn't think of them as random at all, at best mildly unpredictable :-p Oct 22 21:29:55 lol, nice description Oct 22 21:30:17 their utility is that they are reproducible and very fast Oct 22 21:30:57 it's just single multiplication and addition usually, sometimes followed by some bit-shifting. Some use 64 bit values, some 32 bits. Those 64 bit versions are probably actually quite good in terms of quality of the numbers generated. Oct 22 21:31:17 especially if they only spit out 32-bit output Oct 22 21:31:24 yes, I saw a method that increased the randomness by XORing something with 64 Oct 22 21:31:52 because at best they return you half of the bits they track internally Oct 22 21:31:57 rather than most or all of them Oct 22 21:35:14 I've been facing a small problem for a while. I target 2.2 and up, however I want to enable the holo them IF and IF the device supports it, if not, use the default that the system provides. Oct 22 21:35:22 How would I go about doing this? Oct 22 21:35:37 values-vXX directories Oct 22 21:35:54 but I recommend using holoeverywhere and just using holo always! Oct 22 21:36:31 2.2/2.3 themes are not pretty Oct 22 21:37:07 android-developers.blogspot.com/2012/01/holo-everywhere.html Oct 22 21:47:02 any android native graphics hackers around? Oct 22 22:07:02 anyone happen to know of a tool like the android asset studio that'll resize generic image resources rather than specifically ones for the launcher, etc.? Oct 22 22:07:16 just looking to make a few icons for some list elements Oct 22 22:09:04 so, why is unit testing Android apps such a PITA? Oct 22 22:10:00 I do MVC development as my real job and I unit test the hell out of my classes Oct 22 22:10:17 but so far, none of the android devs I've asked unit test their code Oct 22 22:10:18 silly q, but: is there any practical diffeerence between blah and blah Oct 22 22:10:28 o/ I do! Oct 22 22:10:47 quadmasta: have you looked at roboelectric Oct 22 22:11:06 no Oct 22 22:11:46 theTerry: I'll give that a look Oct 22 22:12:12 it will answer your first question and provide a good testing framework Oct 22 22:12:15 Heya, I'm trying to use a MediaPlayer to play an icecast stream and it will spend an abnormal time preparing the stream using prepareAsync Oct 22 22:12:26 I get an error trying to load the color swatches from this page into both photoshop and illustrator. does this work for anyone else? http://developer.android.com/design/style/color.html Oct 22 22:12:31 Is there a way to work around this? Even if server changes are necessary Oct 22 22:12:33 ? Oct 22 22:13:20 hey Oct 22 22:13:31 anybody else have a buggy xml editorr in eclipse? Oct 22 22:13:38 in juno, yes Oct 22 22:14:05 it got better after I ran eclipse and adt updates Oct 22 22:14:40 theTerry: why not junit? Oct 22 22:16:01 that is explained on roboelectrics site. Oct 22 22:17:31 theTerry im using indigo, still very buggy Oct 22 22:23:35 so lets say I have supporting code that has nothing to do with my UI Oct 22 22:23:53 hy all Oct 22 22:23:54 so lets say I have supporting code that has nothing to do with my UI? Oct 22 22:24:07 or I can hit up and accidentally send that twice Oct 22 22:24:10 how can I send integer values throught bluetooth? Oct 22 22:24:25 is best practices to put that code into a jar and import it into the project? Oct 22 22:24:34 I used this to send string: myOutputStream.write(msg.getBytes()); Oct 22 22:24:44 where msg was a String variable Oct 22 22:25:35 gregtom6: well an int is 4 bytes Oct 22 22:25:48 but I would bet that your outputstream has a write(int) method Oct 22 22:26:04 http://docs.oracle.com/javase/1.4.2/docs/api/java/io/OutputStream.html#write(int) Oct 22 22:26:07 boom Oct 22 22:26:48 http://stackoverflow.com/questions/1436942/sending-int-through-socket-in-java Oct 22 22:26:53 that will be the answer Oct 22 22:27:02 I think Oct 22 22:32:40 anyone happen to know if there's a way to tell when an outgoing call has been completed? Oct 22 22:33:03 not sure Oct 22 22:33:06 good question Oct 22 22:33:17 heh, well, i could probably look it up, but thanks :) Oct 22 22:33:38 here's a more manageable one: can i expect static variables of a broadcastreceiver to persist between invocations of the receiver? Oct 22 23:10:44 howdy Oct 22 23:13:43 speakingcode: did you ever fix that flash problem ? Oct 22 23:17:16 I am using canvas to draw path of Arcs, I want to rotate the paths that I am drawing when the user rotates any idea how to do that ? https://www.dropbox.com/s/vpsqa2m2qqz21sw/MyKDEDesktop6.png Oct 22 23:51:01 anyidea ? Oct 23 00:11:13 Anyone interested in a library like GPUImage (iOS) for Android? Oct 23 00:11:50 If yes, what would be your requirements for it? Oct 23 00:12:04 pboos: renderscript? Oct 23 00:12:15 evancharlton: opengl Oct 23 00:12:55 pboos: is it per chance something like DevIL, i.e. image library targeted for use with OpenGL (loading textures etc.) Oct 23 00:13:01 evancharlton: i thought as well about using renderscript. but got it working with opengl es 2.0 and it works pretty well so far. Oct 23 00:13:33 p_l: link? Oct 23 00:14:17 pboos: just google DevIL image library Oct 23 00:14:27 it might be defunct now, though Oct 23 00:14:48 http://openil.sourceforge.net/ Oct 23 00:15:58 p_l: no looks a little different. basically it would be to apply filters to images (through opengl). could be something else than opengl, but with opengl it is a lot faster. Oct 23 00:17:00 pboos: well, how to do so with renderscript is explained in one of the android dev blog posts Oct 23 00:17:27 p_l: yes, with renderscript would be nice, if renderscript was available on 2.2 and 2.3 Oct 23 00:17:38 p_l: so i need something else anyway to support 2.2 and 2.3 Oct 23 00:18:12 p_l: so i was like, okay let us use opengl es 2.0. thought about writing renderscript for 3.0 and higher, but opengl works so fine, that i think i do not need it anymore :) Oct 23 00:18:41 well, there are books on how to do so, and probably some cross-platform libs Oct 23 00:19:26 p_l: about doing what? Oct 23 00:19:51 p_l: opengl? well, already figured that part out.. got sobel, sepia, contrast, ... working already Oct 23 00:22:26 Anybody know how to get the monkey utility to not open apps other than the one specified, and not to monkey with the volume controls? Almost every time I run it, it will open some other app capable of playing audio and turn the volume all the way up. And then the only way to get it to stop is to pull out the battery. Oct 23 00:22:28 Hey all - What's the best way to communicate a click of a checkbox from a SimpleCursorAdapter back to a fragment? Oct 23 00:22:48 I'm using the --pct-syskeys switch, which looks like it should do this: adb shell monkey -v -p com.blah.myapp.whatever --pct-syskeys 0 --throttle 100 50000 Oct 23 00:23:59 mrjeff: Depends on if this is something you're going to do repeatedly, but I'd probably use a nested interface with an accessor and mutator. Oct 23 00:29:00 0/quit Oct 23 00:30:12 Chromax: thanks I was trying a public interface and it was working fine until I changed to using a LoaderManager Oct 23 00:30:33 Unfortunatly I don't fully understand the process and got it working using other examples though Oct 23 00:38:18 hmm, did the Chromebook already sell out Oct 23 00:41:35 I'm trying to read android:textColor attribute for a custom view. I'm doing the exact same thing for android:icon and getting the drawable just fine but for some reason getColor always returns the default color I pass in. Is there some extra trick with getting a color attribute? Oct 23 00:43:00 Leeds: aha! https://plus.google.com/109993695638569781190/posts/b2fazijJppZ Oct 23 00:43:25 uggh spend an hour and as soon as I ask I figure out…I was creating the typed array with the wrong attribute array Oct 23 00:47:33 g00s: nice... incidentally, jon masters, comment #3 there, Fedora ARM guy, was in the same LUG as me in London back in the day, and was in HK for an ARM Linux conference a couple of months back Oct 23 00:47:48 cool :) Oct 23 01:10:04 anyone know a simple way to get an emulator with Gmail installed? Oct 23 01:10:29 Or Play App store for that matter? Oct 23 01:10:33 not sure, did you make your avd with google apis ? Oct 23 01:10:43 yeah, but it doesn't include it Oct 23 01:10:44 it wont have play, but might have gmail or maps Oct 23 01:10:46 ok Oct 23 01:11:04 there is a way. google is your friend. Oct 23 01:11:07 No. Maps but not Gmail Oct 23 01:11:16 okay... i will poke around Oct 23 01:11:25 trying to test sharing intents Oct 23 01:11:53 installing on a device is not really that easy at the moment Oct 23 01:12:16 mrenouf: one google search, top result: http://www.piotrbuda.eu/2012/05/installing-google-play-on-android-emulator.html Oct 23 01:12:26 mrenouf: I'd look for the packages that cyanogen installs Oct 23 01:12:29 you can send intents to your emulator from the command line with adb Oct 23 01:12:30 and wedge them into your emulator image Oct 23 01:15:16 https://gist.github.com/1148734 Oct 23 01:39:38 Success. Gmail in the emu. Oct 23 01:51:25 When I use loadermanager, should my listview be updated automatically the db changes? Oct 23 01:52:59 mrjeff not sure about loadermanager but usually with a listview with an adapter i call notifyDataSetChanged() on the listview to get it to refresh Oct 23 02:00:40 hey guys, i'm having trouble trying to implement an AsyncTask, its mostly because i dont know what i'm doing but i'm wondering if i can get some help Oct 23 02:02:16 there's a doc for it that will teach you what you're doing Oct 23 02:03:27 yea i spose, basically i'd like to get two variables passed into it so they can be used within doInBackgroud Oct 23 02:03:49 hi Oct 23 02:03:54 could someone help me? Oct 23 02:03:55 http://stackoverflow.com/questions/13017193/php-keeps-giving-me-an-incorrect-response-for-android-in-app-billing-server-veri#comment17668530_13017193 Oct 23 02:04:02 invisiblek, while someone helps me ill help you Oct 23 02:04:08 i just got AsyncTask to work :) Oct 23 02:04:14 nice Oct 23 02:04:19 what do you need help on Oct 23 02:05:19 k, well this is part of a patch i've submitted to cyanogenmod for group mms. i didnt write it but have been fixing it up as we go here Oct 23 02:05:28 http://review.cyanogenmod.com/#/c/24474/9/src/com/android/mms/ui/MessageItem.java Oct 23 02:05:49 the first part, i have it in a Thread but its been recommended to use an AsyncTask Oct 23 02:06:12 but i'm not really sure how to implement that, i know enough about java to get around but i'm by no means a pro Oct 23 02:06:56 in fact i'd consider my self less than amateur Oct 23 02:07:05 asynctask is part of android, not java Oct 23 02:08:09 yea, i realize that Oct 23 02:08:34 well i know the android docs recommend to not subclass Asynctask Oct 23 02:08:45 but thats what ive did specifically formy special circumstances and it works Oct 23 02:08:56 sorry i'm being a troll. watching this stupid debate. anyway, yeah, don't subclass it. use it as described in the docs. it's pretty straight forward, ask a specific question if you have one Oct 23 02:09:04 mhmm ^ Oct 23 02:09:22 speakingcode : do you know any bugs that can come from making it a class? Oct 23 02:09:30 ah, shit. you're not supposed to subclass AsyncTask? Oct 23 02:09:34 when did that happen? Oct 23 02:10:54 from making what a class? yuo mean from subclassing async task? Oct 23 02:11:23 i must have misunderstood the convo Oct 23 02:11:38 no no no Oct 23 02:11:39 it says right in the docs: "AsyncTask must be subclassed to be used." Oct 23 02:11:41 you NEED to subclass it Oct 23 02:12:10 ok, it sounded like someone said the opposite Oct 23 02:12:13 sampullman: do you know any errors that can occur if its not subclassed? Oct 23 02:12:18 oops Oct 23 02:12:44 how can you use it if you don't subclass it? Oct 23 02:12:50 it must be subclassed Oct 23 02:12:51 you can't Oct 23 02:12:52 hey sam, could you take a look at my SO? seems no one can figure it out Oct 23 02:12:53 http://stackoverflow.com/questions/13017193/php-keeps-giving-me-an-incorrect-response-for-android-in-app-billing-server-veri#comment17668530_13017193 Oct 23 02:12:57 I dont know Oct 23 02:13:00 but im using it Oct 23 02:13:01 O_o Oct 23 02:13:11 it's an abstract class, yeah? so yuo can't instantiate it. need a concrete subclass Oct 23 02:13:20 i usually subclass but I just tried in a new class Oct 23 02:13:54 speakingcode is correct Oct 23 02:14:43 and i can't help with that, there's not enough info and i've forgotten all the php i once knew Oct 23 02:15:24 ahh its fine Oct 23 02:16:19 somehow this is working Oct 23 02:16:19 HttpPostTask postTask = new HttpPostTask(); Oct 23 02:16:20 postTask.execute(signedData, signature); Oct 23 02:16:23 and ive checked the logs Oct 23 02:16:26 it is executing Oct 23 02:17:07 Is there any Php channel I can join? seems #php is invite only Oct 23 02:19:44 it' snot Oct 23 02:21:05 every channel seems to have it's daily "php sucks" 10 minutes, though Oct 23 02:21:22 Try ##php maybe Oct 23 02:21:43 so if what google is giving me, it would be appropriate to put a constructor in my AsyncTask if i want to pass multiple input parameters to it? Oct 23 02:22:07 invisiblek: android isn't constructing asynctasks for you so you can define your own constructors as you like Oct 23 02:24:39 buttaknife: thanks ##php worked Oct 23 02:28:53 invisiblek: its possible to pass as many parameters as you want into asynctask Oct 23 02:31:42 hmm, how exactly would one do that? Oct 23 02:31:45 final AsyncTask Oct 23 02:32:09 is what i see, i guess its showing Params as plural but there isnt really an example of how you'd pass more to it Oct 23 02:34:06 I need some help finding in the official documentation what I believe to be true. I used to be able to write to data/data/test.test.test/databases/ but no I cannot. Same code works with data/data/test.test.test/files/. I can't find anything that says that changed with 4.0? 4.1? Oct 23 02:34:52 invisiblek : you pass params in as an array Oct 23 02:35:19 for example I have... public class HttpPostTask extends AsyncTask { Oct 23 02:35:28 protected String doInBackground(String... data) { Oct 23 02:35:37 nameValuePairs.add(new BasicNameValuePair("signedData", data[0].toString())); Oct 23 02:35:38 nameValuePairs.add(new BasicNameValuePair("signature", data[1].toString())); Oct 23 02:36:19 sure, that would work if they were both of the same data type Oct 23 02:36:41 which is why i was thinking a constructor, at least thats what i read on a stackoverflow thread Oct 23 02:37:26 you can do that, or pass in an array of some objects you designed Oct 23 02:37:44 doInBackground(CustomObj... data) Oct 23 02:38:11 yea, i spose that'd work too Oct 23 02:41:17 hi i would like to ask fragments Oct 23 02:41:33 what would you like to ask them? Oct 23 02:41:58 uh oh Oct 23 02:42:03 i am capping screenshots Oct 23 02:42:08 please wait Oct 23 02:42:09 cap dat ass Oct 23 02:43:59 http://postimage.org/gallery/17dch8cm/137d21ff/ Oct 23 02:44:25 actually I wish to make a navigation toolbar with fragments Oct 23 02:44:57 pic.2 shows the first fragment Oct 23 02:45:01 pic.3 shows the 2nd fragment Oct 23 02:45:11 pic.4 shows the first frgment too Oct 23 02:45:35 but i am afraid that each time when I replace old frgment with new fragment Oct 23 02:45:42 the new fragment reloads its view Oct 23 02:46:02 so i cannot switch views while maintaining any changes Oct 23 02:46:10 Fragment.setRetainInstance(true) Oct 23 02:47:11 wow Oct 23 02:47:19 thats great! Oct 23 02:47:32 u saved my life Oct 23 02:47:35 and all was well in whoville Oct 23 02:48:08 any IDE altervatives are you using? Oct 23 02:48:20 i have been constantly having bugs & lags with eclipse Oct 23 02:48:27 sampullman uses xemac :) Oct 23 02:48:29 hehehe Oct 23 02:49:58 xemac Oct 23 02:50:48 xemacs Oct 23 02:51:19 but i wouldn't recommend it for the weak of heart, or sharp of mind Oct 23 02:51:20 what a choice, why are you using it? Oct 23 02:51:20 * grothendieck uses GNU Emacs Oct 23 02:51:32 because it is vastly superior to any IDE Oct 23 02:51:43 * sampullman high fives grothendieck Oct 23 02:52:02 the neckbeard is strong in this one Oct 23 02:52:10 lol Oct 23 02:52:18 Not even Oct 23 02:52:21 I just really hate IDEs Oct 23 02:52:28 This is probably the only thing I talk about in here Oct 23 02:52:35 is rant about how much Eclipse is a bloated mess Oct 23 02:52:44 i would call emacs the IDE-est of the IDEs Oct 23 02:52:54 Honestly, I'm a well-adjusted and reasonably well-groomed person! Oct 23 02:53:01 heh Oct 23 02:53:23 It is a meta-IDE Oct 23 02:53:34 LISP is a hell of a drug Oct 23 02:54:00 i don't like emacs-lisp :( i prefer scheme dialects... Oct 23 02:54:20 emacs lisp is good for what it does Oct 23 02:54:31 but yeah, Haskell is my favorite of the Lisp variants Oct 23 02:55:01 Though it is unfortunate how rarely I get to work with it Oct 23 02:55:09 * grothendieck needs to get back into academia... Oct 23 02:55:28 Haskell is influenced by list, sure..but a variant? Oct 23 02:55:33 *lisp Oct 23 02:57:42 eh Oct 23 02:57:50 functional programming language Oct 23 02:57:50 yeah Oct 23 02:57:55 * muhoo really, really wishes clojure worked better on android Oct 23 02:58:19 it is not in the same family as Common Lisp or Scheme, or their direct descendents Oct 23 02:58:40 I was thikning it would be practical for a web server to be written in Haskell Oct 23 02:59:01 xmonad is a pretty good window manager in haskell Oct 23 02:59:04 mainly from the perspective of security/robustness Oct 23 02:59:06 true Oct 23 02:59:23 monadic I/O would make stuff like XSS/XSRF basically impossible Oct 23 02:59:28 i think there are libraries for writing web servers in haskell Oct 23 02:59:31 there are Oct 23 02:59:34 probably not too mature Oct 23 02:59:37 yeah Oct 23 02:59:50 nothing that can really shake the ground apache is standing on **** ENDING LOGGING AT Tue Oct 23 03:00:00 2012