**** BEGIN LOGGING AT Sun Sep 23 02:59:59 2012 Sep 23 03:03:13 hey guys, i cannot add a library project to the eclipse workspace, when I try via "Android Project From Existing Code" and choose library folder, it says "select at least one project" but cannot select the lib folder. I tried with creating new project but couldnt see any field for choosing existing source. Any idea how to add library project to workspace? Sep 23 03:03:57 I am using eclipse 3.7.2 with the latest adt Sep 23 03:07:54 * Sep 23 03:07:56 ? Sep 23 03:23:11 I have a question. I am planning to create an application that must somehow gather information from a database server and load it in to a SQLite database on the device. What would be the best way to go about this? Sep 23 03:43:00 who's around this fine evening? Sep 23 03:47:07 Is there anyone around? Sep 23 03:48:19 hello mrenouf Sep 23 03:48:25 get your cache to work ? Sep 23 03:49:14 cache is fine, it was keeping it around for a little bit when the app went to the background for a second or two Sep 23 03:50:07 decided that the self-start in onBind is fine by itself. Leave it running, and also set stopWithTask so it goes away if the app goes away Sep 23 03:50:21 no playing games with timers and such, uneccesary. Sep 23 03:50:23 I'm starting development on an application that will load a SQLite database on the device with images and information from a database on a server. What is the best route to take? I've run in to web security issues in the past and am refocusing a bit... Sep 23 03:51:16 cpetersen4, use https. beyond that you need to ask more specific questions for more specific answers Sep 23 03:52:32 Alrighty, sounds good. Thanks mrenouf. Sep 23 03:54:05 mrenouf: ah, stopWithTask … interesting. i'm still stuck in android 2.x world. Sep 23 03:54:41 g00s, oh. crap is that 3+. ugh. Sep 23 03:54:47 api 14 Sep 23 03:54:55 oh wow. Sep 23 03:55:15 well regardless, if the system needs to the task will go away as needed Sep 23 03:55:33 and onTrimMemory and onLowMemory both do their job Sep 23 03:55:41 cool :) Sep 23 03:57:58 now what I need to do is bounce the user back to the home activity if their results are no longer available (cache expiration) Sep 23 03:58:24 I get confused by all the Intent flags, but I know there's one that will reset the task stack Sep 23 04:49:19 http://news.bbc.co.uk/2/hi/programmes/click_online/9753821.stm Sep 23 05:04:36 can someone help with a listview and checkboxes and the values Sep 23 05:08:34 g00s, I paid $190 for a translation to Portuguese and made it back in 4.5 months. I'm up like $50 now. Sep 23 05:09:05 Ologn: excellent! Sep 23 05:09:16 which service did you use? Sep 23 05:09:19 :( Sep 23 05:10:17 hkhalid: try a more specific question Sep 23 05:10:25 g00s: gototranslation.com Sep 23 05:11:06 cool, thx Sep 23 05:11:14 Portuguese is my #2 language now after Spanish - over 70,000 active user installs Sep 23 05:11:22 :O Sep 23 05:13:04 I have a listview, which is populated with email and name, via a contentresolver. it has multiple choice. http://pastie.org/4783848 When I hit "send email" button, I want it to get the values from the checked off items. But I am not sure how to query that, line 59 is my attempt where the variable isnt getting set right...ever Sep 23 05:13:30 im rusty in that Sep 23 05:14:05 * g00s is reading "Reconsidering the H, the C, and the I: Some Thoughts on Reading Suchman’s Human-Machine ReconfigurationsReconsidering the H, the C, and the I: Some Thoughts on Reading Suchman’s Human-Machine Reconfigurations" Sep 23 05:14:13 i've had it up to here with updateAppWidget() Sep 23 05:14:27 i cant use it it anywhere. always says it's undefined. Sep 23 05:14:36 * hkhalid gives g00s Sino Logic hardware Sep 23 05:17:00 hkhalid, what does line 63 day Sep 23 05:17:01 say Sep 23 05:17:56 Ologn, thats for just setting a box to checked off Sep 23 05:18:35 you mean iterate through like that or something else? Sep 23 05:19:39 Well what are you trying to do? On that line you say you're setting checks.... Sep 23 05:20:31 I am trying to go thru the listview, and get the values of whatever is checked off Sep 23 05:20:53 right now I know how to go thru the list, and toggle checked off boxes Sep 23 05:21:03 where are you trying to do that? Sep 23 05:22:06 I want to do that on line 77 Sep 23 05:22:20 I am guessing I need to reference the arrayadapter... Sep 23 05:32:29 I am scared Sep 23 06:35:10 hi, anyone here? Sep 23 06:35:50 an amateur is Sep 23 06:36:18 I mean me Sep 23 06:36:26 me too... i've rendered my phone useless Sep 23 06:36:45 sad Sep 23 06:36:53 tru Sep 23 06:37:28 which phone? Sep 23 06:37:28 nope..nobody here at all Sep 23 06:37:44 se xperia pro Sep 23 06:38:19 I am also just starting to develop Sep 23 06:38:30 what did you do? Sep 23 06:38:52 had cm 7 tried to flash 9, was almost successful, but setup wizard keeps crashing Sep 23 06:39:36 also have an md5 sum error so i can't restore my cm7 img Sep 23 06:41:15 I am a complete noob Sep 23 06:41:27 related to android dev Sep 23 06:41:36 np Sep 23 06:41:40 just learnt git Sep 23 06:41:55 btw, flashing orginal firmware won't help either? Sep 23 06:42:19 can you boot into recovery? Sep 23 06:43:00 yes Sep 23 06:43:10 well its not bricked then Sep 23 06:43:14 restore backup? Sep 23 06:43:17 then Sep 23 06:43:31 i no longer have the original firmware... no cuz of md5 sum error Sep 23 06:43:45 ju8st get the ight cm9 for your phone Sep 23 06:43:55 and make sure you use something like internet explorer or whatnot Sep 23 06:44:04 (so its not corrupt) Sep 23 06:44:42 on linux, have most current nightly Sep 23 06:45:03 w/ what i believe is most current gapp Sep 23 06:45:09 right well its as simple is getting with :) Sep 23 06:46:20 ? Sep 23 06:46:53 just download cm9 for your phone, while avoiding getting it corrupt Sep 23 06:48:23 any place in particular. been crawling websites all day... Sep 23 06:48:36 tried several different versions Sep 23 06:49:05 tigerlily: wrong channel for this. see the topic; try #android-root Sep 23 06:49:14 http://www.cyanogenmod.com/devices Sep 23 06:50:00 sry, g00s, thx Sep 23 06:53:55 How do I install 'repo'? Sep 23 06:54:16 Googled but did not find any guide useful Sep 23 06:54:38 isn't it just a script? Sep 23 06:55:02 yes, afaik Sep 23 06:55:09 a python script Sep 23 06:55:51 so there's no uninstall - just delete it? Sep 23 06:56:08 I want to install it Sep 23 06:56:56 oh, sorry, misread :) Sep 23 06:57:06 just download the script and run it then - there's no install either Sep 23 06:57:24 any link? Sep 23 06:57:31 I did not find any Sep 23 06:57:35 seriously? Sep 23 06:58:03 http://s.android.com/source/initializing.html Sep 23 06:59:30 where is repo in there? Sep 23 06:59:43 Neat. I just had a user thank me for not adding DRM to my application. Sep 23 07:00:37 neooo: you have to read the docs to find it... call it a 'test' Sep 23 07:02:04 Let me check then... thanks Sep 23 07:04:06 http://source.android.com/source/version-control.html Sep 23 07:04:15 http://source.android.com/source/using-repo.html Sep 23 07:04:21 got these Sep 23 07:04:34 but not the installation guide Sep 23 07:04:35 :/ Sep 23 07:04:55 then I'm sorry, you failed the test Sep 23 07:05:24 I have not given up yet Sep 23 07:05:38 why do you want repo? Sep 23 07:06:10 I want to try my hands with Android AOSP JB Sep 23 07:06:33 there is already a project going Sep 23 07:07:07 I will try to solve the bugs, if not the least Sep 23 07:07:31 yes, the project is AOSP Sep 23 07:07:42 but back up a moment Sep 23 07:07:51 what, specifically, do you want the repo tool for? Sep 23 07:08:06 See Sep 23 07:08:15 I am new to android Sep 23 07:08:24 so dont know much Sep 23 07:08:49 don't take it personally, but that's obvious Sep 23 07:08:55 https://github.com/cerebrum-android Sep 23 07:09:02 that^ Sep 23 07:09:05 so let me ask again... repo... what does repo do, why do you need it? Sep 23 07:09:34 afaik, Sep 23 07:09:54 repo is used in context of android Sep 23 07:09:56 to make Sep 23 07:10:12 the process easier Sep 23 07:10:21 which process? Sep 23 07:10:24 maybe I am wrong Sep 23 07:10:51 "Repo is a repository management tool that we built on top of Git. Repo unifies the many Git repositories when necessary, does the uploads to our revision control system, and automates parts of the Android development workflow." Sep 23 07:11:26 the process of working with android source files Sep 23 07:11:39 I'm not asking you to quote stuff, I'm trying to lead you to the answer here Sep 23 07:11:56 if the answer is "I don't know what repo does", say so Sep 23 07:12:25 I dont know Sep 23 07:13:26 ? Sep 23 07:13:29 do you know what git does? Sep 23 07:13:34 yes Sep 23 07:14:58 good Sep 23 07:16:56 oh, for fuck's sake Sep 23 07:17:05 read http://s.android.com/source/downloading.html Sep 23 07:17:56 yea.. doing that now Sep 23 07:21:10 have you found repo yet? Sep 23 07:21:16 Yes Sep 23 07:21:20 found Sep 23 07:21:24 yay! Sep 23 07:21:26 thanks Sep 23 07:21:34 Btw, are you a dev? Sep 23 07:23:15 a developer, yes Sep 23 07:24:14 umm dude, can i get you facebook or gtalk? Sep 23 07:26:28 that'd be a no Sep 23 07:26:59 mp Sep 23 07:27:02 **np Sep 23 07:27:17 So What i need to do now is Sep 23 07:27:29 you could circle me on G+, if you particularly feel the need... Sep 23 07:28:14 that would do as well Sep 23 07:29:13 incidentally, before you go much further - and as you know from reading the channel topic - this channel is for app development, not 'ROM's Sep 23 07:29:37 oh Sep 23 07:29:58 have you built ROM? Sep 23 07:30:29 no, of course not Sep 23 07:32:44 Is app development easy? Sep 23 07:33:09 do you know Java? Sep 23 07:33:34 yes Sep 23 07:33:59 then it shouldn't be particularly hard Sep 23 07:34:54 i had tried those Training courses Sep 23 07:35:04 on d.android.com Sep 23 07:35:42 I completed 3 apps Sep 23 07:35:56 upto passing the intent to another activity Sep 23 07:36:13 it was pretty smooth till then Sep 23 07:36:15 good start Sep 23 07:36:53 but it is been around a year since i have touched java Sep 23 07:37:11 so need to revise it now Sep 23 07:37:22 any good website you know of? Sep 23 07:38:01 d.android.com is the place to go Sep 23 07:38:39 for a quick revision of java i am asking Sep 23 07:39:05 oh, dunno - I sort of picked it up as I went along Sep 23 07:39:28 oh Sep 23 07:39:39 what apps have you created? Sep 23 07:40:38 oh, too many to list... Sep 23 07:41:17 still, one or two Sep 23 07:41:26 tell me open source ones Sep 23 07:41:28 are you interested in extreme weather in south China? Sep 23 07:41:53 noops why? in what regard? Sep 23 07:42:22 that's what my most popular app is about Sep 23 07:42:47 is it open source> Sep 23 07:43:09 when I can be bothered Sep 23 07:43:34 is it on Play? Sep 23 07:43:38 link? Sep 23 07:43:53 nah Sep 23 07:44:06 that is, yes it's on the market, but no need for a link Sep 23 07:44:29 * Leeds afk Sep 23 07:44:49 okay Sep 23 07:45:01 Imma be going now as well Sep 23 07:46:42 please do us all the favour of never using the 'word' imma again... Sep 23 07:47:13 sorry Sep 23 07:47:22 XD Sep 23 07:47:28 imma shoot myself Sep 23 07:54:43 imma = international monster magnet association Sep 23 07:57:21 is there any channel for ROM development? Sep 23 09:06:22 What's the conventional way to store application-wide constants? Sep 23 09:06:41 For instance, the PREFS_NAME in http://developer.android.com/guide/topics/data/data-storage.html#pref Sep 23 09:12:26 well, this may be over-engineered, but i have a final class Constants {} … which has inner classes (interfaces) which define the constants. For example, one interface I have is Prefs, which have the key values to the preferences Sep 23 09:13:44 if the prefs are private to an activity, i just make them static finals in that activity Sep 23 09:13:52 if i have a listview and some buttons in landscape orientation, should the listview be on the left or right of the screen? Sep 23 09:14:16 basically, do people prefer scrolling with their left and clicking with their right, or vice versa? Sep 23 09:24:36 g00s: sounds tidy Sep 23 09:26:26 so Constants.Blah.Whatever ? Sep 23 09:31:04 I guess that's also how R. works Sep 23 09:32:11 I wonder if it'd be too much if I copied R's structure and renamed it C Sep 23 09:32:51 I keep my preference keys in a file called Settings.. Which is also my PreferenceActivity Sep 23 09:38:27 xorgate: yeah, Constants.Prefs.foo Sep 23 09:45:26 I get class cast exception on line 16 in this code : https://gist.github.com/3769523 Sep 23 09:45:32 can someone help me out Sep 23 09:52:19 napster: i dunno, but menu is type com.actionbarsherlock.view.Menu Sep 23 09:52:30 and you are casting it to android.view.Menu Sep 23 09:53:26 g00s: thanks, but actually it got fixed with s/getMenuInflater()/getSupportMenuInflater() Sep 23 09:53:34 on line 15 Sep 23 09:53:40 cool Sep 23 10:06:15 hello. does anybody knows about zxing barcode scanner? Sep 23 10:06:54 i am trying to make application where that barcode scanner is in framelayout but i cannot succeed Sep 23 10:11:20 or how i can start zxing via fragment? Sep 23 10:15:28 what do I put in my activity_main.xml for an area which I'm going to put stuff in (i'm going to list several times (hh:mm) and some buttons to delete, etc.) Sep 23 10:41:00 morning Sep 23 10:46:32 Hi all! Sep 23 10:46:40 I enjoy watching http://developer.android.com/about/dashboards/index.html to see the historical development of Android platform version distribution, and I wonder if there is a way to get data further back than 6 months. Anybody know of a way to do this? Sep 23 10:57:41 I think someone once used one of those internet archives to get old graphs, and then combined them.. That's probably your best bet Sep 23 10:59:24 the cow is early Sep 23 10:59:44 is it coincidence that the moose left and the cow arrived ? Sep 23 11:27:15 SimonVT: Thanks for the suggestion. Sep 23 12:16:09 does anyone used zbar in android? Sep 23 12:17:01 how i can get beep sound for successful barcode scan? Sep 23 12:35:04 Hello Sep 23 12:35:40 I'm trying to build an app that will calculate the noise level in dB (much like sound meter in google play) Sep 23 12:36:01 so I'm recording sound and using http://developer.android.com/reference/android/media/MediaRecorder.html#getMaxAmplitude%28%29 Sep 23 12:36:55 to get the amplitude than ddoing dB = 20log(amplitude/ref) Sep 23 12:37:55 my big problem here is that amplitude is not returning correct values (ie when there is no noise it's increasing) Sep 23 12:38:17 hi wissem Sep 23 12:38:24 try to use iint powerDb = 20 * log10(getAmplitude() / referenceAmp); Sep 23 12:38:25 also it doesn't get +90dB values :( Sep 23 12:38:32 maybe you don't use the correct log function? Sep 23 12:38:40 formula is correct in maths though Sep 23 12:39:06 adq: i'm using this: double db = (20.0*Math.log10(amp / REFERENCE)) ; Sep 23 12:39:28 where REFERENCE is 0.1 mPa Sep 23 12:39:48 hmm Sep 23 12:41:17 I think I need to use something other than getMaxAmplitude Sep 23 12:41:35 do you guys have any idea how to get noise level from the mic in android? Sep 23 12:41:39 maybe you need to clip your sound signal (between -1 and +1 if it is double or float, or -32678 +32768 if short) Sep 23 12:41:41 in dB Sep 23 12:41:55 wissem, i used same formula with correct results on my side Sep 23 12:41:58 with getMaxAmplitude Sep 23 12:42:03 so it might come from elsewhere :p Sep 23 12:42:19 Oh Sep 23 12:42:41 it is just a guess though :/ not sure it will solve your trouble Sep 23 12:42:45 adq: when there is no sound and a sudden change in noise, do you get the current value? Sep 23 12:42:51 but it's always useful to clip a signal to avoid distorsion Sep 23 12:43:24 wissem, i cannot answer that now sorry :/ the snippet is totally out of a project Sep 23 12:43:33 what do you mean by clip a signal? Sep 23 12:43:37 but i'm clearly remember it was working well :) Sep 23 12:43:59 i meant, anti-clipping, you know when your signal is too high it becomes to distord Sep 23 12:44:12 to prevent that, you cap the values Sep 23 12:44:15 between min and max Sep 23 12:44:36 hmm, does your solution get values +90dB ? Sep 23 12:44:44 i'm guessing that, because getmaxamplitude with high noise (so above max level signal) Sep 23 12:44:51 might do crazy thing, but i cannot verified Sep 23 12:45:05 wissem, no +90db is extremly high Sep 23 12:45:19 normally ut's like between -100db and 0db Sep 23 12:45:31 few above or below 0db, depending. Sep 23 12:45:46 wissem, look also wikipedia page, because there are 2 kind of db Sep 23 12:45:52 one is absolute, the one we talk about Sep 23 12:46:04 and the other one is relative, need calibration based on samples, etc.. Sep 23 12:46:08 it's really tricky :/ Sep 23 12:46:20 so first, gain knowledge of what is exactly dB Sep 23 12:46:59 yes I've been trying to check my tests w/ dB wikipedia page :D Sep 23 12:47:05 your solution used the relative one? Sep 23 12:47:25 nop Sep 23 12:47:38 look my ridiculous snippet (explaining why i cannot run it :p) http://pastebin.com/adM0iPMS Sep 23 12:48:10 also, did you get an average in x seconds? which refereence did you use in the formulas. 1mPa or 20mPA? Sep 23 12:48:41 http://stackoverflow.com/questions/9597767/decibel-sound-meter-for-android that might help you Sep 23 12:50:26 also here; http://stackoverflow.com/questions/8252813/android-media-player-decibel-reading wissem, i really don't remember well what i did i'm sorry Sep 23 12:50:30 but believe me, it worked Sep 23 12:50:49 wissem, "It is common to choose the maximum signal magnitude as the reference amplitude. That is, we normalize the signal so that the maximum amplitude is defined as 1, or 0 dB" Sep 23 12:51:47 wissem, last thing (i cannot do more for you), i remember several open projects on google code using also power db ration Sep 23 12:53:23 I'm having trouble with actionbarsherlock and my phone. Sep 23 12:53:31 adq: thanks a lot, I will keep on looking. I'm trying to get this working the right way since two days :) Sep 23 12:53:40 Upon app startup I get: Sep 23 12:53:41 09-23 08:45:50.098: E/AndroidRuntime(1365): java.lang.NoClassDefFoundError: com.actionbarsherlock.R$styleable Sep 23 12:53:42 wissem, you're welcome :-) good luck Sep 23 12:54:16 Doesn't happen in the emulator only on my, Galaxy phone with Cyanogen mod 7 Sep 23 12:54:30 I just installed a fresh copy of Cyanogen mod 7.2 and that didn't fix it Sep 23 12:54:49 http://pastebin.com/fSYwjzKk Sep 23 13:19:59 Anyone use NavUtils from v4-support? Sep 23 13:20:54 MIG-, if you're still around I can help Sep 23 13:23:03 Hello - I'm trying to build an Android GPS client program that my business can use as a fleet tracking mechanism. We have a third party server product that accepts GPS devices using the "TAIP" protocol. Apparently this is fairly common for proprietary hardware GPS devices. Short of writing my own TAIP client from scratch on Android, I was just curious as to whether anyone knew of any existing software, libraries, etc that might m Sep 23 13:24:58 Google? search Github? Sep 23 13:25:19 It's not common, it's Trimble proprietary Sep 23 13:26:21 whats your plan? send raw gps data back to the server? Sep 23 13:26:46 Hi all Sep 23 13:26:48 Is there a set way to get and install diff drivers than the roms come with? Sep 23 13:26:51 I need to try some diff USB & GPS drivers for my crespo4g Sep 23 13:27:00 #android-root Sep 23 13:27:07 mrenouf: well, yeah, I tried Google. Sending the raw GPS data back would be my plan. The protocol is at least documented, so it shouldn't be too impossible, but was just wondering if anyone knew of any existing stuff that does this. Sep 23 13:28:27 lol nobody is chatting over @ #android-root Sep 23 13:28:59 https://www.google.com/webhp?sourceid=chrome-instant&ie=UTF-8&ion=1#hl=en&safe=off&sclient=psy-ab&q=TAIP+library+gps&oq=TAIP+library+gps&gs_l=serp.3...4528.6522.0.6684.10.8.2.0.0.0.218.1074.0j7j1.8.0.les%3B..0.0...1c.1.s1r8e30hAnQ&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&fp=cf8668d6158a36f4&ion=1&biw=1290&bih=1253 Sep 23 13:29:05 Doesn't matter, this isn't the right channel Sep 23 13:29:06 your google-fu is weak Sep 23 13:29:28 pm2, third link. you'll see Sep 23 13:30:25 mrenouf: please do :) Sep 23 13:30:54 mrenouf: Right I saw that. That implements a TAIP "server", doesn't have anything to do with an Android client, to my knowledge. There is another android project that can talk to OpenGTS, but it doesn't speak TAIP, as far as I know. Sep 23 13:30:56 mrenouf: from searching some, it feels like some R inclusion trouble with the new ADT plugin, but I can't think of how to test that theory Sep 23 13:32:08 MIG-: right. the actionbarsherlock R constants are not being included in your apk. Sep 23 13:32:22 mrenouf: Next step, getting them included in my apk. Sep 23 13:32:30 I get that error once in a while, clean project solves it for me Sep 23 13:32:47 I've scrubbed those projects so hard they are bleeding Sep 23 13:33:05 re-installed eclipse multiple times. Event re-installed cyanogen mod on my phone Sep 23 13:33:06 pm2, take a look at the code and reuse the parts that do TAIP Sep 23 13:33:24 MIG-, it has nothing to do with CM, so no more of that ;-) Sep 23 13:33:37 I do have that already, but it's mostly solving the wrong half of the problem :-) Sep 23 13:33:40 but you said it works in the emu? the *same* APK? Sep 23 13:34:13 pm2, obviously not as-is, but surely there's some code that can help anyway. Sep 23 13:34:27 sure Sep 23 13:34:33 mrenouf: How do I go about including the resources ? Sep 23 13:34:37 yes Sep 23 13:34:43 the same apk works in the emulator. Let me verify again Sep 23 13:34:57 that's really odd. Sep 23 13:35:12 is the emulator the same API level as your phone? Sep 23 13:35:27 SimonVT: Do you know of a good howto on installing drivers for android? Sep 23 13:35:31 ya, I can only wonder if with sherlock does it only fallback and use sherlock if the device doens't have the required libraries/code Sep 23 13:35:37 no, the emulator is much newer Sep 23 13:36:05 Just verified, it works in the emulator Sep 23 13:36:07 oh, try creating one of the same version. what's happening is on API14+ ABS just runs the native actionbar Sep 23 13:36:18 k Sep 23 13:36:30 anything special with your setup, re: eclipse, etc? Sep 23 13:36:51 no, brand new eclipse download Sep 23 13:37:14 Tried helios too Sep 23 13:39:10 So I read that the new ADT plugin includes all of the "needed" Resources from other libraries (i.e. libsherlock), so that there is no need to explicitly include resources from dependent libraries. Sep 23 13:39:27 Now, this new feature is the thing that doesn't seem to be working. Is that your thought too? Sep 23 13:39:41 and abs is a library project associated with your app? Sep 23 13:39:54 oh Sep 23 13:39:59 yeah, don't trust that Sep 23 13:40:15 you're using a lib that uses abs? Sep 23 13:40:26 thats not too common Sep 23 13:40:51 no Sep 23 13:41:00 using a project that includes abs, as a project Sep 23 13:41:16 The "normal" way Sep 23 13:41:25 um. k Sep 23 13:41:28 And you added abs as an android library project? Sep 23 13:41:50 yeah it sounds like you're simply compiling against the jar Sep 23 13:41:58 that doesnt work Sep 23 13:42:01 SimonVT: yes Sep 23 13:42:13 mrenouf: I never explicitly added abs jar Sep 23 13:42:59 It is crashing in the emulator, of the same version as my physical phone. Sep 23 13:44:21 http://i.imgur.com/87bbl.png Sep 23 13:44:52 I believe Eclipse auto-ads the highlighted .jar entry in the screenshot Sep 23 13:45:32 But it's added in the Android tab? Sep 23 13:45:38 Confirmed, I removed ABS as a dependent android library project and it removed that entry Sep 23 13:46:20 SimonVT: correct, I added it in the Android tab (list) and it created the highlighted entry in the screenshot Sep 23 13:47:34 I don't know, sounds weird.. I don't use eclipse, so can't really help you Sep 23 13:48:38 k Sep 23 13:54:44 i am trying to draw on top of camerapreview (surfaceview) but onDraw method is never invoked Sep 23 13:56:37 SimonVT: what do you use instead of Eclipse ? Sep 23 13:56:44 Intellij Sep 23 14:14:33 hi, to avoid memory increase i use getApplicationContext() instead of Activity Context, is ti correct? Sep 23 14:22:04 NavUtils.navigateUpFromSameTask drops intents when restarting previous activities? Sep 23 14:22:16 do I need SINGLE_TOP? Sep 23 14:22:18 i create 2-34 Custom View and pass context, is correct getApplicationContext() or Activity Context? Sep 23 14:22:54 pepigno75, views get activity context Sep 23 14:23:24 activity context is more efficent Sep 23 14:23:52 because context is delete when activity is destroy, is it exact? Sep 23 14:23:54 has nothing to do with efficiency. it's correct. Sep 23 14:24:29 views exist only within an activity. it is their context. Sep 23 14:24:50 (System UI excluded :-P) Sep 23 14:27:31 mrenouf, i have Activity A, this activity create a HeaderView (Custom Linear Layout) , new HeaderView(context), context of HeaderView i use Activity.this, is it correct? Sep 23 14:27:48 Yes. Sep 23 14:29:09 in HeaderView i use inflate to load layout, how can destroy custom view when Activity is onDestroy() Sep 23 14:32:16 mrenouf, is there some tutorial to avoid increase memory and create app more efficient? Sep 23 14:36:46 For some reason I can see the resource IDs for R.strings and R.drawable, but none for R.xml or R.raw - any clues? :) Sep 23 14:44:08 Q: Anybody know how i can encrypt and expriry date safely for licensing Sep 23 14:45:51 http://pastebin.com/Y819MUeV Sep 23 14:46:12 can anyone tell me why I am getting manifest parse error for Sep 23 14:47:15 this error appeared after I added the service block Sep 23 14:47:26 How can I make eclipse highlight AIDL files correctly? Sep 23 14:48:26 Where can I find the javadoc (API documentation) for Actionbar Sherlock? Sep 23 14:50:51 The api is the same as the native action bar Sep 23 14:52:52 anybody know how i can prevent a user tampering with expiry date with a rooted phone Sep 23 14:53:16 where can i store expiry date safely Sep 23 14:55:08 anybody know how i can prevent a user tampering with expiry date with a rooted phone <- it is not signed ????? preventing any alteration??? Sep 23 14:55:12 omg Sep 23 14:57:07 adq: so i sign the expiry date on my server and then in the app i verify the signature?? Sep 23 14:57:11 any opinion on my xml pastie ? ? Sep 23 14:57:22 http://pastebin.com/Y819MUeV Sep 23 14:57:38 getting manifest parse error Sep 23 14:58:50 khurasan, i don't know the workflow specifically but if rooted phone can temper the expiry data it means they are not protected Sep 23 14:59:05 however ytou don't have to change expiry if you play with clock i believe (if they are not so many guards) Sep 23 14:59:25 so at some point, it might be impossible to prevent things when ppl have high control of their device Sep 23 14:59:55 Does any one have suggestion about this: http://stackoverflow.com/questions/9251311/android-animate-view-from-off-screen-not-working Sep 23 15:00:17 adq: what is the best way encrypting/decrypting an expiry date via server to app Sep 23 15:03:00 khurasan, cannot answer that lol :) but did you look http://developer.android.com/guide/google/play/licensing/index.html ? Sep 23 15:03:34 and also http://developer.android.com/guide/google/play/billing/index.html Sep 23 15:03:37 khurasan: yeah too complex. im using paypal instead... much more simplier and more profitable Sep 23 15:03:49 roooo Sep 23 15:03:53 you're lazy dude :p Sep 23 15:04:18 khurasan, RSA 1024 is more than enough Sep 23 15:04:31 you can also use symetric encryption like 3DES or AES but you don't really chain block of long data Sep 23 15:04:42 it's really up to you, since most of ppl will not be able to break it easily Sep 23 15:04:55 (notice "most of ppl") Sep 23 15:05:13 adq: so i store the secret key on both the server and app ... Sep 23 15:05:17 nooooo Sep 23 15:05:19 never do that!! Sep 23 15:05:27 if i open the app, i will read your secret key Sep 23 15:05:39 Anyone know why tring ot animate a view that started off screen doesn't work? The view has to start on screen? Sep 23 15:06:08 khurasan, most of the time, to share a temporary shared secret, we use asymetric encryption (like RSA) Sep 23 15:06:18 but this #android-dev, not #basicconceptofcrypto Sep 23 15:07:18 adq: can you give me example please Sep 23 15:08:57 sorry not much time :/ Sep 23 15:09:36 look the design of what you want to avoid in terms of API for licensing because you want paypal Sep 23 15:09:39 and mimic it maybe Sep 23 15:09:45 just think of complexity.. and security. Sep 23 15:10:30 khurasan, something interesting on your side would be to use check with API licensing but still your paiment done via paypal Sep 23 15:10:33 i'm sure you can mix both Sep 23 15:10:49 even do a double check for your license on your server side and on api licensing/billing side Sep 23 15:10:54 many possibilities! Sep 23 15:10:56 <- afk Sep 23 15:11:33 adq: i already to licensing check on my server but what do i do when user if offline Sep 23 15:13:28 adq: how do i give access to paid features when user is offline Sep 23 15:17:50 Anyone know why tring ot animate a view that started off screen doesn't work? The view has to start on screen? Sep 23 15:19:05 Can someone explain to me why i get this exception (in 2.3 but not in 4.1): "Invalid use of SingleClientConnManager: connection still allocated" when reusing the HttpClient ? Sep 23 15:19:19 *(in 2.2 but not in 4.1) Sep 23 15:25:27 USB Host mode question: Does UsbDeviceConnection.requestWait() ever timeout? If it doesn't then how do I interrupt it? Sep 23 15:35:11 hey there! Sep 23 15:35:25 http://blog.sanctum.geek.nz/vim-koans/ Sep 23 15:36:17 got one question, tried to look it up but couldnt find an answer: how can i access a preference from xml? specifically i want to set the summary of a ListPreference contained in a PreferenceScreen to its value. Sep 23 15:37:45 Can someone explain to me why i get this exception (in 2.2 but not in 4.1): "Invalid use of SingleClientConnManager: connection still allocated" when reusing the HttpClient ? Sep 23 15:46:17 mab: ListPreference p = (ListPreference) ....; p.setSummary(p.getEntry()); Sep 23 15:47:40 s Sep 23 16:14:51 can't I change the contents of an EditText to be a String and from that, to a charArray? Sep 23 16:16:54 Hopefully an easy q: I have some text I would like to display in my main Activity. It includes bolding and bullets as the only real formatting - what would the easiest way to go about this while preserving the formatting as much as possible? Sep 23 16:26:26 I'm finding it strange, I need to grab what's in the EditText and colorize every letter inside to something different Sep 23 16:26:36 you can't get .charAt() from something that isn't a String Sep 23 16:34:04 s Sep 23 16:34:13 I need help getting the values from a listview Sep 23 16:40:12 hello all Sep 23 16:40:28 how to get MimeType from Uri? Sep 23 16:47:11 hhkalid what values? the items? Sep 23 16:48:35 this line " ClipData dragData = new ClipData(v.getTag(),ClipData.MIMETYPE_TEXT_PLAIN,item);" in the sample code given from here http://developer.android.com/guide/topics/ui/drag-drop.html doesn't exist.. Sep 23 16:48:35 speakingcode, yes I have a listview, items are checked off too, I have 2 buttons that can select all and deselect all Sep 23 16:48:46 it's just not identifying with it, it says it isn't there Sep 23 16:48:51 what's the problem? Sep 23 16:49:10 speakingcode, now I want a button that checks the items that are checked and makes a string out of it, the problem is that dont know how to do that Sep 23 16:50:28 I think I have to use SparseBooleanArray Sep 23 16:52:39 Good afternoon all. Does anyone have up-to-date docs relating to displaying hardware buttons no the AVD skin using the AVD version included in SDK tools r21 preview 4 ? Sep 23 16:53:13 * hkhalid tazers speakingcode Sep 23 16:53:17 It should be noted that there have been significant changes relating to AVD in the tools release revision 21 Sep 23 16:53:29 * hkhalid tazers hillct Sep 23 16:53:41 * Hodapp looks at hkhalid Sep 23 16:54:09 get a room... Sep 23 16:59:51 HashMap meMap = new HashMap(); <-- this is how to create a HashMap with String key and String value Sep 23 17:00:13 I want to create one with int key and int value, it isn't producing the correct output when I do meMap.get(key) Sep 23 17:00:27 just null or garbage value, and I did do .put before I tried to do .get() Sep 23 17:01:17 neither Integer (class) nor int primitive are succeeding Sep 23 17:02:23 Use SparseIntArray Sep 23 17:06:05 but then I cannot input int primitives into the hashmap, they'd have to be SparseIntArray as well Sep 23 17:06:49 what I want to input is the number 1 and Color.GREEN, 2 and Color.YELLOW, etc... Sep 23 17:07:24 Why does it need to be a hashmap Sep 23 17:07:59 I want to have it randomly colourize the text in an EditText Sep 23 17:09:04 I have no idea what you're trying to do.. But SparseIntArray is equivelant to HashMap Sep 23 17:09:06 Take your pick Sep 23 17:17:30 it works, but the randomizer is totally not random enough :o Sep 23 17:17:48 I get something like 5 instances of black and then 2 yellows, then 6 of Red.. Sep 23 17:18:29 well no that's not completely true :P Sep 23 17:20:48 i have an assignment to develop an android app that communicates with a back-end server, unfortunately i know very little about how to do this: somebody put me on to Google Cloud Messaging (GCM), a messaging service, but I still can't make out if I could use it with my SQL database, or what's its role precisely is in the first place, can anyone give me some insight into it? Sep 23 17:21:42 the SQL database, i intended to have hosted on a webserver Sep 23 17:22:53 http://amitku.wordpress.com/2011/08/03/how-to-connect-and-access-sql-database-server-from-android-app/ Sep 23 17:23:11 Looks easy enough Sep 23 17:25:38 do i need oracle java or will open java work fine for android devving Sep 23 17:29:06 hays: oracle is preferred Sep 23 17:29:41 DarkKnightCZ: hrm.. ok so I have eclipse installed and I am getting some error about swt library and the fix I am reading about says to use the open java.. heh Sep 23 17:29:58 hays: define "some error" Sep 23 17:30:10 DarkKnightCZ: currently installing updates so that --may-- resolve it Sep 23 17:30:21 error --> http://nopaste.info/0d1f4a8d83.html Sep 23 17:35:05 RazielZ can yo help me make sense of the code Sep 23 17:35:15 What code? Sep 23 17:35:16 im starting to think im way too novice for this Sep 23 17:35:24 http://amitku.wordpress.com/2011/08/03/how-to-connect-and-access-sql-database-server-from-android-app/ Sep 23 17:37:00 Hmm Sep 23 17:37:12 I never actually used jtds but I can try Sep 23 17:37:15 What don't you get? Sep 23 17:37:29 line 10 Sep 23 17:37:37 for example Sep 23 17:37:45 what does that do Sep 23 17:38:02 and why do we need a JDBC driver? Sep 23 17:38:25 to connect to a sql db? Sep 23 17:38:44 Because I assume you don't want to write your own driver? Sep 23 17:38:45 <.< Sep 23 17:38:48 DarkKnightCZ: found a solution. Sep 23 17:39:59 panegyric: line 10 is info log Sep 23 17:40:36 Log.i outputs an info-level something to logcat Sep 23 17:40:41 and basically - it is loading driver -> creating query -> parsing query to resultset -> handling resultset Sep 23 17:40:49 hays: congrats Sep 23 17:41:12 http://developer.android.com/tools/debugging/debugging-log.html Sep 23 17:41:21 panegyric, look there for more Sep 23 17:41:28 It's not required for anything to work, tho Sep 23 17:42:23 i have a friend that hit the android app lottery-- wrote a game called 'atomic bomber' over one weekend and made like $200k on it Sep 23 17:42:39 i guess it made it to some top 10 list at one point Sep 23 17:43:15 now he's using that money to pay for grad school @ Stanford. lucky bastard. :) Sep 23 17:43:36 panegyric: but be aware that using remote access to some sql server is not safe at all - users can get username and password Sep 23 17:44:30 hays: i guess IRS will love this :D Sep 23 17:45:13 to connect to a sql db?? Sep 23 17:45:17 *sorry Sep 23 17:45:20 user can get what usernames and pass? Sep 23 17:45:45 panegyric: sure, if they have access to that app Sep 23 17:46:17 which username and pass? Sep 23 17:46:32 is there a better way to do it? Sep 23 17:46:35 The ones in the database, I assume Sep 23 17:46:39 yours Sep 23 17:46:51 Better way to do what? Sep 23 17:46:56 You didn't specify what you need the database for Sep 23 17:47:07 1) they can log network , 2) they can decompile app... and what RazielZ said Sep 23 17:47:10 my app is like a collaborative writing app Sep 23 17:47:15 each user inputs a sentence Sep 23 17:47:34 and then after each user has submitted, they vote for the sentence they believe is the best Sep 23 17:47:35 so you are looking for simpliest solution ,right? Sep 23 17:47:44 that sentence gets added to story Sep 23 17:47:58 and the same process is followed for all subsequent sentences Sep 23 17:47:59 what packagename of default application "SMS/MMS"? Sep 23 17:48:15 bingels: default on which phone? Sep 23 17:48:21 on android Sep 23 17:48:27 bingels: on which phone Sep 23 17:48:38 NATIVE Sep 23 17:48:42 panegyric: imho the simpliest solution is creating some web-based script that handles post/get requests Sep 23 17:48:49 bingels: motorola has their own, htc has their own, samsung has their own Sep 23 17:49:04 without vendering Sep 23 17:49:07 DarkKnightCZ so that includes using a sql db right Sep 23 17:49:11 Check aosp Sep 23 17:49:12 on a server Sep 23 17:49:19 bingels: oh, the AOSP one? com.android.messaging or something. Sep 23 17:49:24 panegyric: sure, but on server, so users dont have access to sql stuff Sep 23 17:50:01 oh yeah Sep 23 17:50:05 i intend on doing that Sep 23 17:50:11 php should be simple right Sep 23 17:50:14 on client app, you just create request to server script (for example to web script, or you can use packets stuff) Sep 23 17:50:37 how do i go about learning to implement this Sep 23 17:50:40 it depends... its simple, but you can make some really bad things, if you dont know, how to use it :) Sep 23 17:50:50 how to view packagename of installed (system) application? Sep 23 17:51:06 look at PDO for database Sep 23 17:51:18 be aware of sql injection and other nasty things :) Sep 23 17:51:30 ^ panegyric Sep 23 17:52:28 did you guys read about the google android bouncer hack demonstrated at black hat? Sep 23 17:52:47 kinda crazy, dude made software that basically turned people's phones into a botnet Sep 23 17:52:54 completely bypassed bouncer Sep 23 17:53:27 hays: sure its possible, nothing is perfect Sep 23 17:53:34 just look at NFC :) Sep 23 17:54:04 you can basically drain their accounts and you dont even make them install app and stuff :) Sep 23 17:54:36 pretty serious though, something like that could for example take down cell service (or at least data) for large swaths of people if it got out of hand Sep 23 17:54:51 hehe yeah I have non-NFC batteries Sep 23 17:55:39 everybody wants to be the next VISA Sep 23 17:55:54 NFC was rushed to market Sep 23 17:57:08 if I want to make an app that is compatible back to Froyo do I need to install all the APIs or will the newest suffice? Sep 23 17:57:09 DarkKnightCZ: just use doctrine.... Sep 23 17:58:12 gorudonu: what? Sep 23 17:58:25 Religious kind? Sep 23 17:58:26 lol Sep 23 18:01:00 hays you install the sdk for 2.2 (froyo) Sep 23 18:01:17 all newer devices will support it Sep 23 18:01:37 hays: You just install the newest Sep 23 18:01:43 Tho you might want to install the other for testing Sep 23 18:07:08 Hey guys, random question, why is setBackgroundDrawable considered deprecated, when setBackground which replaces it only works with API16 and higher? Sep 23 18:07:27 Because setBackground replaces setBackgroundDrawable Sep 23 18:07:27 It shouldn't consider it deprecated if I have a lower targetAPI than 16... Sep 23 18:07:40 So I kinda got two opposite answers to that question hehe Sep 23 18:07:57 Mine's the right answer. You should build against the highest api level possible Sep 23 18:08:00 if you have targetAPI lower than 16, it shouldnt be deprecated (if it wasnt deprecated @ targetAPI) Sep 23 18:08:12 android:minSdkVersion="8" Sep 23 18:08:13 android:targetSdkVersion="15" Sep 23 18:08:22 s/targetAPI/build target/ Sep 23 18:08:28 afaik you should build agains lowest api version Sep 23 18:08:38 Build against api15, then it wont be marked as deprecated Sep 23 18:08:45 so it will work on whole spectrum Sep 23 18:08:52 It still says it's deprecated, and if I replace it setBackground it tells me to change target Sep 23 18:08:53 lol Sep 23 18:09:02 I am building against it. I think. Sep 23 18:09:05 No, build against highest Sep 23 18:09:11 Your minsdk is how far back you support Sep 23 18:09:19 Hmm Sep 23 18:09:21 How do I do that? Sep 23 18:09:54 so minsdk will ensure compatibility? (so if you use method added in higher api, it will work in lower api?) Sep 23 18:10:00 No Sep 23 18:10:09 You ensure that you don't call new APIs on old platform versions Sep 23 18:10:09 SimonVT: so I can use the highest API level and then.. somehow(?) get Froyo devices to work? As long as there is a path to that, I think your advice is reasonable Sep 23 18:10:24 Has anyone gotten an AVD setup using Tools rev21 to display the hardware buttons (back, menu, etc)? Sep 23 18:10:49 SimonVT: so you should build against lowest possible api to ensure compatibility (so you dont use "bad" methods) Sep 23 18:10:55 anyone able to help? Sep 23 18:10:55 No.. Sep 23 18:10:59 will pay a fee Sep 23 18:11:08 then it wont be compatible Sep 23 18:11:18 Sure, just don't call new methods on old platforms Sep 23 18:11:28 No matter what combination of skin, platform and config.init settings I use, I get no hardware buttons whatsoever Sep 23 18:11:51 what is the advantage to using the latest sdk, if you want to ensure backward compatibility? Sep 23 18:11:56 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { view.setBackgroud(myDrawable); } else { view.setBackgroundDrawable(myDrawable); } Sep 23 18:11:57 yes, thats what i mean - if you build agains old api, it will ensure you dont use new methods and it will work on oldapi+ apis Sep 23 18:12:14 hays: That you can use stuff like the action bar when it's available Sep 23 18:12:25 SimonVT: oh, you can do that kind of stuff, nice Sep 23 18:12:36 ah, makes sense. ok Sep 23 18:12:37 hays: The latest SDK has compatibility libraries for earlier SDKs so you can maintain app operability back to the earlier OS releases Sep 23 18:12:51 hays: Read this: http://simonvt.net/2012/02/07/what-api-level-should-i-target/ Sep 23 18:12:53 even better Sep 23 18:13:09 That'll tell you about minsdk/targetsdk/build target Sep 23 18:13:20 great Sep 23 18:13:22 bookmarked Sep 23 18:13:37 I am writing my first app so i may defer reading that until I get something up and running first Sep 23 18:14:17 You might as well do it right from the beginning :p Sep 23 18:14:18 At the moment I am stuck in this quagmire of updating my linux machine after probably 6 months of neglect heh Sep 23 18:14:40 SimonVT: I plan to-- going to install the newest API Sep 23 18:14:41 Hmmm Sep 23 18:15:50 The sdk has a lint tool that will, among other things, warn you when you call APIs that are not available on your minSdk Sep 23 18:15:58 That's integrated in eclipse if you use that Sep 23 18:16:06 SimonVT: very nice article. I'd forgotten that the compatibility libraries didn't go back before api4 Sep 23 18:16:30 SimonVT, my settings look fine. I changed target to 16. Sep 23 18:16:36 Since I am testing on 4.1 Sep 23 18:16:37 SimonVT: I am getting all that set up right now Sep 23 18:18:42 hillct: The article is really more relevant for the stuff the support lib doesn't offer Sep 23 18:19:01 SimonVT: yeah. nicely done Sep 23 18:20:07 They use a similar pattern to my example, just more verbose. New APIs are called when available. When you support 1.6 you just have to wrap everything in static classes or it'll crash Sep 23 18:20:12 SimonVT: should i be working with Oracle Java 7 or 6? Sep 23 18:20:46 Android only supports java6, but you can probably tell java7 to make java6 compatible code Sep 23 18:21:38 id rather just stick with 6 Sep 23 18:21:44 if that's what it wants Sep 23 18:22:00 java version "1.6.0_29" seems right Sep 23 18:22:34 I'm trying to build android library into jar with intellij idea, however it excludes R*.class files from jar. Why is that? Sep 23 18:22:49 Resources in jars are not supported (yet) Sep 23 18:23:29 If i build it with maven I can see R* files are being included. This is Intellij IDAE problem or..? Sep 23 18:23:49 what's mime type is message/* ? Sep 23 18:24:36 Maven is special, they do their own stuff Sep 23 18:24:45 I got a listview, and need help getting the values from the checked off items, any help? will pay $ Sep 23 18:26:00 USB Host mode question: Does UsbDeviceConnection.requestWait() ever timeout? If it doesn't then how do I interrupt it? Sep 23 18:27:29 hkhalid show code Sep 23 18:39:07 I'm trying to center a view inside a linearlayout in java, and I'm trying to use lp.setGravity(Gravity.CENTER); but it gives me an error saying to add a cast, and so i let it fix it and it changes it to ((RelativeLayout) lp).setGravity(Gravity.CENTER); and then I get an error saying it can't cast relativelayout in a linearlayout Sep 23 18:39:10 Any suggestions? Sep 23 18:39:39 Why are you casting it to a relativelayout, when you said yourself it's a linearlayout? Sep 23 18:40:25 because eclipse gives me an error on lp.setGravity(Gravity.CENTER); Sep 23 18:40:28 telling me to add a cast Sep 23 18:40:40 i click the "fix project" thing and it adds a cast for relativelayout Sep 23 18:40:52 lol Sep 23 18:41:03 which I don't get why Sep 23 18:41:03 well that must be te solution then Sep 23 18:41:07 thus asking the question Sep 23 18:41:21 Well, my suggestion would be to cast it to a linearlayout Sep 23 18:41:46 i wonder what lp is defined as Sep 23 18:41:46 Don't just apply any fix eclipse (or whatever tools you use) suggest Sep 23 18:41:58 eclipse just makes it compile Sep 23 18:42:01 Yeah, kinda bad naming.. Usually lp would be layoutparams Sep 23 18:42:08 running is completely different Sep 23 18:42:10 (imo) Sep 23 18:43:03 It is layoutparams Sep 23 18:43:42 layoutparams doesn't have a setGravity method Sep 23 18:43:44 http://pastebin.com/KH9VUwFg Sep 23 18:43:45 It has a gravity field Sep 23 18:43:49 lp.gravity = Gravity.CENTER Sep 23 18:43:52 Oh Sep 23 18:44:15 Eh, also Sep 23 18:44:25 LayoutParams tells the parent how to position the view Sep 23 18:44:43 which is what I want Sep 23 18:44:48 I want to center a view inside a linearlayout Sep 23 18:44:49 Alright Sep 23 18:44:56 add the view with the layoutparams Sep 23 18:45:21 I was afraid you were setting lp on the linearlayout Sep 23 18:45:24 When I was googling people were saying setGavity was how to do that, and obviously failed when trying to apply it to my code. Sep 23 18:45:39 There are two ways to do this basically Sep 23 18:45:44 Either set layoutparams on the child Sep 23 18:45:48 Or call setGravity on the linearlayout Sep 23 18:46:10 and if I call it on the layout it will just center every view within it? Sep 23 18:46:25 Yes Sep 23 18:46:27 hm Sep 23 18:46:29 ok thanks Sep 23 18:46:54 Linearly, of course.. They wont all be positioned dead center Sep 23 18:47:08 lol Sep 23 18:47:15 Yeah Sep 23 18:47:38 Ah-ha. Thanks I just set it on the layout itself. Sep 23 18:47:44 Didn't catch that it was on the layout, not the view Sep 23 18:56:56 im having doubts as to how to go about this, im a novice developer, never made an android app, but im doing it as an assignment: how would i go about implementing an app, that is a game, and that has a lobby where someone can start a table, wait for other users to join the table, and eventually lock the table, when the players are ready to play Sep 23 18:57:42 you could take a look at andengine Sep 23 18:57:45 it's a colloborative writing app: where each user inputs a sentencce, after all users have submitted, they vote on which is the best sentence , and that sentence will be added to the story Sep 23 18:57:54 do you know a programming language btw? Sep 23 18:58:06 they repeat that process for each subsequent sentence to make a story Sep 23 18:58:10 well a bit of java Sep 23 18:58:22 but i do realize it will be a learning curve for me Sep 23 18:58:33 if i have to use anything im not familiar with Sep 23 18:58:45 well if you are familiar with say C#/C++ its gonna be easy to go java Sep 23 18:58:54 other than that its just learning the life cycle of hte system Sep 23 18:59:02 making the GUI can be a bit tricky Sep 23 18:59:05 i do know c++ more or less Sep 23 18:59:09 but most games have one activity anyway Sep 23 18:59:10 and fmailiar with the basics of java Sep 23 18:59:33 would i need to make use of andegine Sep 23 18:59:38 for my particular app Sep 23 18:59:44 it's more text than anything Sep 23 19:00:13 well you did say game in the beginning Sep 23 19:00:33 if its simple text then no Sep 23 19:01:02 How could i add some text file to an android library? Sep 23 19:01:06 Should i use raw resources? Sep 23 19:01:18 use a string resource Sep 23 19:01:19 simple text but i wouldnt rule out having an appealing UI Sep 23 19:01:26 should i use andegine then? Sep 23 19:01:35 well in any case Sep 23 19:01:38 my issue Sep 23 19:01:42 its a eneral purpose game engine for android Sep 23 19:01:43 is implementing the very first part Sep 23 19:01:46 where a host Sep 23 19:01:50 if its not gonna be fancy graphics/physics stuff Sep 23 19:01:54 then don't bother Sep 23 19:01:57 if its jsut text Sep 23 19:02:11 got it Sep 23 19:02:16 so the first part Sep 23 19:02:21 i need to have a user Sep 23 19:02:23 make a table Sep 23 19:02:27 and be alerted Sep 23 19:02:33 when other users join Sep 23 19:02:46 sigh. ok I am using eclipse and have installed all the plugin stuff per the google instructions. Only when I restart eclipse, I don't get the prompt to configure the plugin, and I can't find Android projects anywhere in the New->Project dialog. Sep 23 19:02:59 Anyone had this problem or know how I can work my way out of it Sep 23 19:03:05 in other words, if a host makes a table, other users of the app must be able to see that he is currently hosting an app Sep 23 19:03:10 and if they join Sep 23 19:03:29 the host must be able to see that (along with all other users in the table) Sep 23 19:03:57 currently hosting a table ** Sep 23 19:04:51 am not sure what you expect to receive as an answer panegyric Sep 23 19:05:49 i have a class that does smsreceive and the main class that has a public void function how can i call that function from the smsreceive class without hitting the cannot make a static reference to the non-static method error? Sep 23 19:07:23 ravenheart i mean like what can i use to do this Sep 23 19:07:41 im going to have to use a sql database on a webserver (requirement of my massignment) Sep 23 19:07:50 i haven't done much android dev to give you such advice Sep 23 19:08:17 like someone mentioned something about GCM Sep 23 19:08:26 i was trying to make sense of it Sep 23 19:08:44 but im not quite sure if it good /enough for my purposes Sep 23 19:11:22 i have a class that does smsreceive and the main class that has a public void function how can i call that function from the smsreceive class without hitting the cannot make a static reference to the non-static method error? Sep 23 19:13:06 How to access resources within library that are in library? Sep 23 19:20:52 has anyone tried developing android apps with MONO/C#? Sep 23 19:21:04 yes Sep 23 19:21:21 I wanna try that out Sep 23 19:21:30 how the whole process went for you Ravenheart? Sep 23 19:21:45 well quite good actually Sep 23 19:21:47 I am guessing no way to include third party libs that are done in java? Sep 23 19:21:56 but then again i am a .NET dev my profession Sep 23 19:21:57 stuff like Action Sherlock Bar Sep 23 19:22:05 yeah, I am .NET as well Sep 23 19:22:05 oh you can include java libs Sep 23 19:22:09 currently doing MVC mostly Sep 23 19:22:13 you can? Sep 23 19:22:14 peachy Sep 23 19:22:16 yea Sep 23 19:22:29 but it involes a lot of meta data Sep 23 19:22:37 I am assuming you can debug on emulator and real phone Sep 23 19:22:43 and the experience is the same as in eclipse? Sep 23 19:23:22 you use visual studio :) Sep 23 19:23:24 and yes Sep 23 19:23:30 emulator and real phone Sep 23 19:23:38 Ravenheart, is Visual Studio 2012 sexy or what? :) Sep 23 19:23:43 experience is better than eclipse Sep 23 19:23:45 I can't believe how much of a good job they did with it Sep 23 19:23:47 well Sep 23 19:23:48 of course it is Sep 23 19:23:49 can anybody help me out with some static/non-static stuff? in a bit of a jam and on a damn headline :( Sep 23 19:24:09 i haven't used VS2012 too much yet Sep 23 19:24:18 we're scheduled soon to move to it though Sep 23 19:24:36 Azra-el, static members/classes are shared with all instances of said class Sep 23 19:24:52 you can't manipulate non-static members in static methods Sep 23 19:25:08 and it's often used to instantiate Singletons Sep 23 19:25:16 I hope that's what you were asking for Sep 23 19:25:18 -.- Sep 23 19:26:01 why is my emulator so slow?! Sep 23 19:26:02 Ravenheart, http://i.imgur.com/eqgCY.png?1 Sep 23 19:26:14 Son of Obsidian + Dark Theme for VS 2012 Sep 23 19:26:21 coding was never more aestheticly pleasing Sep 23 19:26:22 :> Sep 23 19:26:34 panegyric, there is a way to speed it up Sep 23 19:26:40 but dunno if it's worth the hassle Sep 23 19:26:47 and don't worry by default everyones emulator is slow Sep 23 19:26:51 why is my emulator so slow?! im using indigo, x86 based emulator Sep 23 19:27:04 i even went to my bios to enable virtualization Sep 23 19:27:10 and i mean it made it fastr Sep 23 19:27:18 but its not fast by any means Sep 23 19:27:37 yeah I feel you Sep 23 19:27:49 my previous android app, I was the one developer without android phone Sep 23 19:27:49 @SpearThruster - well i get that.. here's the thing .. and yes.. but here's the thing .. i have my main Activity class right? that has a non-stafic function public void whatever() .. and a second outside class Smsreceive.java that is handling broadcastreceive for sms and when it gets an sms it should call Main.whatever() and it cant. and i cant set static to whatever because of the changes Sep 23 19:27:49 (mainly im calling bindService and registerReceiver for another broadcast receiver for the main app from that method Sep 23 19:27:56 so the whole emulator experience was ... huh slow -.- Sep 23 19:28:23 the 2.3 emulator was quite fast the last time i used it :\ Sep 23 19:28:47 how do i change the emulator? Sep 23 19:29:02 start the AVD manager Sep 23 19:29:05 Ravenheart, yeah this was awhile back Sep 23 19:29:09 also save state and all that jazz Sep 23 19:29:21 i did save states Sep 23 19:29:38 but how do i get the 2.3 emulator Sep 23 19:29:39 Azra-el, why don't you send an Intent for your main activity to pick up? Sep 23 19:30:20 because im a newb i guess. dont really know how to do that i guess Sep 23 19:30:43 panegyric uhh well you first need to download that system image from the SDK manager Sep 23 19:30:48 then create an AVD Sep 23 19:30:58 i did Sep 23 19:31:21 does the google plugin work with eclipse 4.2? or should I stick with 3.8 Sep 23 19:32:49 how do i know which version my eclipse and and emulator is Sep 23 19:32:55 i ahve a feeling it should go fastet Sep 23 19:32:59 *faster Sep 23 19:33:01 hays do you mean ADT? Sep 23 19:33:22 bingels: erm, yeah i think so Sep 23 19:33:31 work Sep 23 19:34:13 with eclipse 4.2 in comparison with 3.7 gotted lags Sep 23 19:34:17 yep, ADT. IT works? Good. Sep 23 19:34:24 I'm having a hell of a time Sep 23 19:34:34 Didn't even work with my distro's Eclipse 3.7 Sep 23 19:34:46 so I uninstalled and am going to try 4.2 in my user directory Sep 23 19:34:59 what OS? Sep 23 19:35:23 Ubuntu Sep 23 19:36:17 how do i know which version exlipse im on Sep 23 19:36:34 run eclipse and try about or something Sep 23 19:36:57 i did but there so many icons there Sep 23 19:37:02 under help maybe? dunno i don't have it installed currently Sep 23 19:37:06 and each one i click has a diff version Sep 23 19:37:07 like the aosp Sep 23 19:38:06 inddigo service release 2 Sep 23 19:38:09 is that old? Sep 23 19:38:25 eclipse java ee ide for web developers Sep 23 19:38:28 my guess is that is 3.7 or 3.8 Sep 23 19:38:39 but i really don't know Sep 23 19:38:40 how do i update easily Sep 23 19:39:04 try #eclipse probably also it likely will not be easy Sep 23 19:39:11 at least if my experience is telling Sep 23 19:39:42 #eclipse? Sep 23 19:40:33 At runtime, how can I tell if an object has a method defined? Sep 23 19:40:56 maslen: you're not supposed to do that! what's the situation? Sep 23 19:41:00 make a conspicouus function Sep 23 19:41:33 sampullman: interposition for methods that may or may not have been defined. Sep 23 19:41:52 sampullman: I don't want to call the method that wasn't defined - the app crashes then. Sep 23 19:42:14 is this within a class that you've defined? Sep 23 19:42:35 I have not defined the class that I'm examining. Nor am I able to modify it. Sep 23 19:42:40 why can't you just define the method to do nothing in the super class? Sep 23 19:42:43 (at compile-time) Sep 23 19:43:36 sampullman: That's a solution I should have came up with. Let me see if I can make it work. Thanks, Sep 23 19:44:51 If you absolutely need to, you can use reflection (Class.getDeclaredMethods() or something), but that is such a horrible thing to do... Sep 23 19:45:48 sampullman: I wasn't sure if android supported reflection. I last used android about a year ago, and I recall running into all sorts of "fun" differences between the Java API's and the Android API's. Sep 23 19:46:18 i want to develop an app where the host makes a table , waits for other users to joing the table. Then the host can decide to lock the table for everyone to begin: Sep 23 19:46:24 how can i do this Sep 23 19:46:54 i have to make use of a sql database on a web server Sep 23 19:47:05 (requirement of the assignment) Sep 23 19:47:07 panegyric: It sounds like you're not sure what you're doing either. Sep 23 19:47:25 what you mean? Sep 23 19:47:41 Are there any convenience methods for converting a string of the formatting "#rgb", "#argb", "#rrggbb", or "#aarrggbb" to a color integer? Color.parseColor doesn't match this usecase Sep 23 19:47:46 im trying to figure out how to implement it maslen Sep 23 19:47:56 panegyric: it sounds like you haven't given much thought to what you're trying to do or how to do it. Sep 23 19:48:07 is there a network related android channel ? i am looking how to change the source for a mobile hotspot to the ethernet connection of my android box rather then the not even connected 3g stick on my mele a2000 a10 device Sep 23 19:48:10 i have maslen Sep 23 19:48:13 why do you say that? Sep 23 19:48:21 i just very novice developer Sep 23 19:48:31 panegyric: first you write the code, then you compile it, then test it until it works. Sep 23 19:48:31 Because your question was completely vague, and almost a copy paste of your homework assignment. Sep 23 19:48:36 i don't think you'll get a better answer with such a general question Sep 23 19:48:38 sKeiths: Integer.parseInt(…, 16) Sep 23 19:48:57 (remove the # first) Sep 23 19:49:02 sampullman maslen Sep 23 19:49:12 i cant simply have a sql webserver Sep 23 19:49:15 in other words Sep 23 19:49:18 when a host makes a table Sep 23 19:49:24 how will the other users Sep 23 19:49:30 see that he has made a table Sep 23 19:49:34 where is the best place to execute "PRGMA foreign_keys=ON" Sep 23 19:49:34 ? Sep 23 19:49:36 and when a user joins Sep 23 19:49:44 how will the host see he has joined Sep 23 19:49:44 romainguy: thank you :) that'll help Sep 23 19:50:57 danixn: at the beginning, before you've created any tables, i would assume Sep 23 19:51:24 at the beginning of onCreate ? Sep 23 19:51:44 is there a better way to do it, instead of hardcoding the command? Sep 23 19:51:59 well, it has to be after you've created the database... Sep 23 19:52:47 what will i use, assuming i have a sql database hosted on a webserver, to communicate to users of the app, that a table has been just hosted by another user? Sep 23 19:52:54 and no, I think the best way to do it is: db.execSQL("PRAGMA foreign_keys=ON;"); Sep 23 19:53:11 whenever you open the db Sep 23 19:53:27 panegyric: http Sep 23 19:53:57 thats the protocol Sep 23 19:54:09 right. use that to communicate with the webserver Sep 23 19:54:11 but how do i implement it exacltly? Sep 23 19:54:30 http://android-developers.blogspot.com/2011/09/androids-http-clients.html Sep 23 19:54:41 how will the webserver communicate with the app Sep 23 19:54:48 and tell other users Sep 23 19:54:51 k thanks Sep 23 19:54:52 when a tables has been hosted Sep 23 19:55:02 thanks sampullman Sep 23 19:55:32 will i be able to Sep 23 19:55:44 send from the webserver to all the users of the app Sep 23 19:55:48 when for example Sep 23 19:55:49 panegyric: you'll just have to read up on client server communication, nobody is going to write your code for you Sep 23 19:55:59 i understand that Sep 23 19:56:02 yes, all of this stuff you've mentioned is possible Sep 23 19:56:04 i just want to understand the concept Sep 23 19:56:09 ok Sep 23 19:56:10 sampullman: I think I might be forced to use reflection :(. Sep 23 19:56:13 but its not the database Sep 23 19:56:18 that can alert the app right Sep 23 19:56:33 are you guys mocking me? Sep 23 19:56:44 sorry im really novice Sep 23 19:56:51 im not trying to get you to do my work really Sep 23 19:56:56 im just so oblivious Sep 23 19:57:03 and i can pick up on it quick Sep 23 19:57:07 i just need some direction Sep 23 19:57:12 i feel very uninformed Sep 23 19:57:15 Ask your teacher for help then. He's paid to teach, remember ? Sep 23 19:57:20 actually Sep 23 19:57:24 he cant help us on this Sep 23 19:57:27 i'm not mocking you, but you are asking very vague questions Sep 23 19:57:29 its a capston project Sep 23 19:57:37 That's idiocy. Sep 23 19:57:42 no really Sep 23 19:57:45 its the last course Sep 23 19:57:48 before we graduate Sep 23 19:57:52 we do our project Sep 23 19:58:02 so its possible Sep 23 19:58:16 for a database to alert the users of the app Sep 23 19:58:18 And you can't write an android app by yourself? ... Perhaps it's worth delaying your graduation. Sep 23 19:58:25 maslen: that's too bad about the reflection Sep 23 19:58:46 really? Sep 23 19:58:50 im not a stupid guy Sep 23 19:58:55 i graduated from bronx science Sep 23 19:58:58 not sure if you heard of it Sep 23 19:59:14 and i think quite a few ppl need help actually Sep 23 19:59:25 although i feel extra-uninformed Sep 23 19:59:29 what's your major? Sep 23 19:59:32 my grades are fine Sep 23 19:59:34 computer science Sep 23 19:59:49 panegyric: I got a bad info for you :D Sep 23 20:00:08 heh. Grades don't count for everything. They just look pretty. Sep 23 20:00:09 whats that gorudonu? Sep 23 20:00:15 i know maslen Sep 23 20:00:25 im just saying im not a stupid guy Sep 23 20:00:28 panegyric: as far as I know Sep 23 20:00:34 you need to have some web server Sep 23 20:00:35 I've met plenty of stupid people with 3.7+'s Sep 23 20:00:40 in java / ruby / python / whatever Sep 23 20:00:47 which comunicates with sql database Sep 23 20:00:54 and then you need android / ios clients ? Sep 23 20:01:08 android clients Sep 23 20:01:09 yes Sep 23 20:01:16 eh.... Sep 23 20:01:19 how can i have the webserver communicate to the sql database Sep 23 20:01:26 the webservers hosting the database right Sep 23 20:01:35 wait wait wait Sep 23 20:01:37 panegyric: that's not an android question Sep 23 20:01:53 the answer is .. no Sep 23 20:01:59 you need some database server and web server Sep 23 20:02:12 why Sep 23 20:02:17 sampullman thanks Sep 23 20:02:44 database sever only store a information ? Sep 23 20:02:55 yes right? Sep 23 20:03:15 so you need some web server which saves and get information from sql tables (sql server) Sep 23 20:03:29 sampullman: it is an android development question though Sep 23 20:03:42 ok gorudonu got you Sep 23 20:03:52 Is there any clever way to specify a regular expression quantifier for this purpose: #[0-9A-Fa-f]{3,4} - I want to match the character group 3 or 4 or 6 or 8 times. Or do I need to duplicate the group? Sep 23 20:03:53 sampullman: Not worth your effort. Sep 23 20:04:06 and then the webserver can communicate to the android clients, based on the information it gets from the sql tables? Sep 23 20:04:15 panegyric: yes Sep 23 20:04:20 read about web services Sep 23 20:04:21 would i have the webserver constantly check the sql tables then? Sep 23 20:04:38 seems stats in google play finally work again Sep 23 20:04:42 panegyric: if you write code that way - yes Sep 23 20:04:57 skfax, couldn't you do something like (#[0-9A-Fa-f]){3,4}){1,2} ? Sep 23 20:05:03 do you know a better way to go about it gorudonu? Sep 23 20:05:14 there is no other way :D Sep 23 20:05:18 gorudonu btw thanks for entertaining my doubts Sep 23 20:05:30 AimHere: Thanks. That's clever, and I guess lucky on the numbers :D Sep 23 20:05:41 panegyric: since you need to do some distributed programmming Sep 23 20:05:56 Can you use resources in a library project? Sep 23 20:06:08 distributed programming meaning? Sep 23 20:06:51 panegyric: I meant like client - server programming Sep 23 20:06:53 in this case Sep 23 20:07:33 nahhh: yes Sep 23 20:07:49 I'm getting: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tornado.example/com.tornado.example.MyActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x7f030001 Sep 23 20:08:13 gorudonu are you familiar with GCM, and if so , do you think i can make use of it? Sep 23 20:08:15 Even though i have it defined. I'm accessing it within library like this: Resources resources = Resources.getSystem(); return resources.getString(R.string.x); Sep 23 20:08:41 panegyric: no Sep 23 20:09:14 they offer a free Google Cloud Messaging service Sep 23 20:09:18 but cmon, you had nice tutorial there Sep 23 20:09:27 nahhh: You need to get the resource reference from your context Sep 23 20:09:39 tutorial for what? Sep 23 20:09:42 panegyric: still you need to write a server :D Sep 23 20:09:45 panegyric: http://developer.android.com/guide/google/gcm/gs.html Sep 23 20:10:00 nahhh: Have you tried doing getText(R.string.VAR_NAME) ? Sep 23 20:10:06 i got you, but i could make use of GCM right Sep 23 20:10:21 gorudonu youre not from india by any chance are yo Sep 23 20:10:23 nahhh: context.getResources() Sep 23 20:10:44 I should pass context from Activity to my library? Sep 23 20:11:04 Well, you need a context to get application resources Sep 23 20:11:04 SimonVT: Is a context used for i18n ? If not, how is it different than accessing a string resource directly? Sep 23 20:11:09 panegyric: from what I saw, yes you can Sep 23 20:11:12 this tutorial is too commplex for me gorudonu but ill try to get crackin on it Sep 23 20:11:26 panegyric: dude... you're on your graduation.... Sep 23 20:11:32 maslen: It's necessary to access application resources Sep 23 20:11:49 man you guys are making me really scared Sep 23 20:11:55 gorudonu: Each person who drops out makes your degree worth more. Sep 23 20:12:09 why would i drop out maslen? Sep 23 20:12:11 maslen: I just graduated... Sep 23 20:12:21 i told you i graduated from bronx science Sep 23 20:12:27 do i really seem like a drop out to you Sep 23 20:12:36 im going to graduate with honors Sep 23 20:12:50 Which does not speak well of your school. Sep 23 20:12:58 maybe not Sep 23 20:12:58 panegyric: It doesn't seem anything to me Sep 23 20:13:03 but i have an aptitude Sep 23 20:13:09 I saw too many ppl with great marks Sep 23 20:13:19 I'm used to vim.. what do you guys recommend for editing in eclipse, using some vi/vim-like editing? Sep 23 20:13:35 jaggz: there is VI style plugin to eclipse Sep 23 20:13:45 but I dont know if it's good or not Sep 23 20:13:49 i know it doesnt mean that ill be good per se, but im not a drop out by any means Sep 23 20:14:04 SimonVT: Perhaps I'm missing a detail, but getText(int resource_id) seemed fine for me without requiring any explicit context. Sep 23 20:14:07 i still think i have an aptitude to learn this stuff Sep 23 20:14:25 maslen: getText doesn't say much,.. WHere is it defined Sep 23 20:14:29 im just at the moment very uninformed Sep 23 20:14:45 jaggz: I think I've seen something to Vim which comunicate with eclipse Sep 23 20:15:02 but I suggest to use eclipse Sep 23 20:15:09 eclipse 4 is slow though.... Sep 23 20:15:10 for me Sep 23 20:15:19 panegyric: so learn it Sep 23 20:15:25 I give you every info already ;) Sep 23 20:15:33 checking out vwrapper.. Sep 23 20:15:42 SimonVT: Heh. android.content.Context.getText(in resID) . It seems it's nicely automated for me. Sep 23 20:16:08 gorudonu, there's "eclim" which can apparently run gvim embedded in eclipse, or use eclipse from vim Sep 23 20:16:37 jaggz: yeah something like that Sep 23 20:16:37 seems exciting. I'll try just the plugin which gives some bindings first and see if that's sufficient for me Sep 23 20:16:38 maslen: And if you have an instance of Context, is that not a context? Sep 23 20:16:47 I'm not such a vim fan Sep 23 20:17:00 for me it's only text editor with coloring syntax Sep 23 20:17:01 :) Sep 23 20:17:17 my force is too weak to be that kind of geek Sep 23 20:17:38 SimonVT: Clearly it does :). I don't have the instance though, that is a static method. Sep 23 20:17:38 but if someone show me around I'm into ;) Sep 23 20:18:06 maslen: No it's not Sep 23 20:18:43 SimonVT: Strange. You're right. So how does this happen? Sep 23 20:18:58 Youøre calling it from a subclass of Context? Sep 23 20:19:07 -ø+' Sep 23 20:19:32 SimonVT: I see. Activity is a subclass. It all makes sense. Thank you. Sep 23 20:19:42 :) Sep 23 20:20:00 * maslen gives himself a figurative kick, since an actual kick would require too much effort. Sep 23 20:20:31 SimonVT: I'm not used to java yet, with its 10-level inheritance :( Sep 23 20:21:21 Can anyone tell me what branch this commit is on? https://github.com/JakeWharton/ActionBarSherlock/commit/aece21a1c336c6ad4502fdc0d03478bb539bae73 'git branch --contains aece21a' doesn't give anything... @JakeWharton_ Sep 23 20:21:22 I loop through my entire listview to set all the items to checked but it only does the first 6, so strange! Sep 23 20:23:27 hkhalid: the whole point of ListView is that it doesn't create views for items that are not on screen Sep 23 20:24:07 romainguy, hmmm, any idea to work this out? thats what I figured as those were the only ones visible, but I have to go through the entire list Sep 23 20:24:29 you have to iterate over the adapter Sep 23 20:24:44 or better yet, use ListView's API Sep 23 20:24:50 * panegyric gives maslen an actual kick Sep 23 20:25:13 * panegyric relieving him of expending any aforementioned effort Sep 23 20:25:27 lol. Sep 23 20:25:46 hkhalid: ListView.setChoiceMode() Sep 23 20:25:50 bourke: If it's not in master, then it's probably in dev Sep 23 20:25:59 and setItemChecked Sep 23 20:26:32 romainguy, I did listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); Sep 23 20:26:43 I used that as well Sep 23 20:26:48 then use ListView.setItemChecked Sep 23 20:27:02 oh that does the entire listview Sep 23 20:28:42 for (int i = 0; i < lv.getChildCount(); i++) { lv.setItemChecked(i, true); } Sep 23 20:28:45 is the same thing romainguy Sep 23 20:28:54 no Sep 23 20:29:03 getChildCount is the number of visible views Sep 23 20:29:08 ohhh Sep 23 20:29:19 so scrap that loop Sep 23 20:29:23 also getChild==0 is not the same as setItemChecked(0) Sep 23 20:29:32 you need to use the adapter's item count Sep 23 20:30:14 thanks romainguy you are my hero for today Sep 23 20:30:27 not only for today :D Sep 23 20:30:29 here's a tip Sep 23 20:30:34 in ListView parlance: Sep 23 20:30:51 i wish i could be a hero for a day Sep 23 20:30:54 - index means a value in the range 0..getChildCount(); an index is used to access one of the visible Views Sep 23 20:31:02 not for more than that Sep 23 20:31:08 being a hero must be a daunting task Sep 23 20:31:33 - position means a value in the range 0..getCount(); a position is used to access an item within the adapter Sep 23 20:31:37 thank for the tip tippy mctipster! Sep 23 20:31:43 you can convert between the two systems using getFirstVisiblePosition() Sep 23 20:32:01 for instance to turn an index into a position you'd write index+getFirstVisiblePosition() Sep 23 20:33:35 so the array adapter is what im checking on how to get its size Sep 23 20:34:38 or item count as you said Sep 23 20:42:30 What the best way to format sql statement strings? riight now i am just doing plain string concetation Sep 23 20:42:41 .... don't Sep 23 20:43:02 danixn: Do the words 'prepared statements' or "sql injection" mean anything to you? Sep 23 20:43:04 use bound parameters and apropriate helpers from SQLite Sep 23 20:43:18 danixn: What maslen said. :-) Sep 23 20:43:18 and yes, prepared statements Sep 23 20:43:38 p_l: iirc, prepared statements == bound parameters :) Sep 23 20:43:40 And google "Bobby Tables". Sep 23 20:43:42 if it's shown in PHP tutorial for beginners with mysql, it's probably wrong ;) Sep 23 20:44:26 maslen: bound parameters are part of the server access lib in question, prepared statements are just an extra feature of the SQL store that also takes them :) Sep 23 20:44:43 ah, you're right. Sep 23 20:45:06 what are prepared statements? and is it dangerous to build sql setements with plain string concetations. Ex "Create Table " + TableName + " ()"; Sep 23 20:45:12 is there a way to add a "static" - always available suggestion to the results of a SearchRecentSuggestionsProvider, or do I have to write a custom provider? Sep 23 20:45:18 all the tutorials use this method Sep 23 20:45:35 danixn: prepared statements are 'fill in the blanks'. The tutorials are wrong. It is very dangerous to build SQL statements like that. Sep 23 20:46:11 danixn: any time you see sql done by concatenating strings, and it's done directly in application code (not part of low-level library internals), it's done *WRONG* Sep 23 20:46:43 maslen: ok thanks why excatly is it dangerous? Can you give me an example? Sep 23 20:47:23 danixn: "SELECT username WHERE username = $username AND password = $password;" Sep 23 20:47:43 Every tutorial just uses: db.execSQL(String code_to_execute); Sep 23 20:47:50 danixn: $password = "foo OR 1=1". Sep 23 20:48:17 http://xkcd.com/327/ Sep 23 20:48:32 ah ok thanks and how does prepared statements prevent these kind of problems? Sep 23 20:48:49 can I pay someone here Sep 23 20:48:58 hkhalid: sure Sep 23 20:48:59 or anyone wanta small fee to help with this arrayadatper size Sep 23 20:49:00 danixn: Magic :). It prevents the variable from modifying the query. Sep 23 20:49:17 tenX, will you be here in 15 mins? Sep 23 20:50:37 maslen: ah ok got it so i am basically giving the user the freedom to create whatever sql statement they want right? Sep 23 20:50:56 danixn: When you concatenate strings? Yes. Sep 23 20:51:08 maslen: ok, so what library should i use? Sep 23 20:51:39 using proper sql hygiene, it means that instead of concatenating strings, you create a (static) string describing the query with parameter placeholders, and then give that string to library together with parameters, and the library ensures proper substitution Sep 23 20:51:47 danixn: No idea. I've never done SQL in android. Only python, php, and Java, iirc. Sep 23 20:51:51 danixn: it's already included in SQLite lib Sep 23 20:52:04 Im trying to install CM9 to my Samsung Galaxy S but it says drop update.zip in the root of the SD card but I only have cm-9.0.0-galaxysmtd.zip Sep 23 20:52:10 is that what I drop in the root of the SD card? Sep 23 20:52:17 #android-root Sep 23 20:52:33 danixn: with prepared statement, you go further into generating a "prepared" query object on the database side, which is known to query planner etc. Sep 23 20:52:55 which means it doesn't have to be reparsed etc. every time Sep 23 20:53:03 ok thanks Sep 23 20:53:07 danixn: you make sure the sql is handled seperately from your variable input. the original query cannot be modified Sep 23 20:54:41 thanks every single book and tutorial i read just told me to put everyhting in constants and just concate the string. Would i still need to use prepared statement for creating tables? Sep 23 20:54:49 danixn: actually one should sanitize inputs manually as well Sep 23 20:55:12 For creating the tables, just concat your strings.. There's no user input Sep 23 20:55:53 and the strings are hardcoded? Sep 23 20:56:45 tenX: Why should you bother doing manual sanitization? Sep 23 20:57:02 When you query, insert etc you have to use the helper methods in SQLiteDatabase, and not just .execSQL Sep 23 20:58:33 Does the SqliteDatabase method public Cursor query (String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) use prepared statements? Sep 23 20:59:00 maslen: because its even more accurate. i'd principally restrict any user input Sep 23 20:59:48 tenX: nvm. I wasn't thinking about validation, only sanitization. Sep 23 21:00:16 maslen: if there was a bug in the prepared statement engine f.e. Sep 23 21:00:30 maslen: ah k wrong wording Sep 23 21:00:39 maslen: my bad Sep 23 21:01:01 NumberPicker hourPicker = new NumberPicker(); Sep 23 21:01:21 what's wrong with that? the constructor NumberPicker() is not defined Sep 23 21:01:27 maslen: what is the difference :D Sep 23 21:01:44 it doesn't mind the type "NumberPicker" on the left though Sep 23 21:02:35 jaggz: https://developer.android.com/reference/android/widget/NumberPicker.html#NumberPicker(android.content.Context) Sep 23 21:02:43 javadocs, use them Sep 23 21:02:43 tenX: my understanding is that sanitization is to make sure it doesn't break your DB. Validation is to make sure that it's what you expect. Ex: a DOB is valid, before hitting the DB. Sep 23 21:03:21 simonvt, yeah I have that up.. but it says this is a constructor Sep 23 21:04:02 jaggz: No it doesn't Sep 23 21:04:05 maslen: okay i remember it being used in that context :) makes sense Sep 23 21:04:08 There's no public constructor with no arguments Sep 23 21:04:14 There's one that takes a Context Sep 23 21:04:16 And two more Sep 23 21:04:22 But none with no parameters Sep 23 21:04:31 oh.. I need to give it a Context.. right.. hmm Sep 23 21:06:40 how can I get the size of an array adapyter? Sep 23 21:07:02 yourAdapter.getCount() Sep 23 21:07:36 I am going to try this now, thanks SimonVT Sep 23 21:09:26 * hkhalid hugs SimonVT Sep 23 21:09:34 * hkhalid salutes SimonVT Sep 23 21:16:18 if I want to display a list of times, which changes in count (2, 3, or more times), vertically in the display, do I create something in the .xml and then add the entries to it from the .java? Sep 23 21:17:19 I'm just trying to append a new NumberPicker to the current activity but I can't find what to add it to Sep 23 21:18:04 Now seems like a good time to draw some pictures for my project. Sep 23 21:18:09 * maslen slowly steps away from the code... Sep 23 21:18:18 :) Sep 23 21:18:21 but I'm not sure of android development principles yet. e.g. perhaps I should create more unique activities and .xml layouts, rather than dynamically generating display within one activity Sep 23 21:19:09 by the way, is there any tutorial, how to generate dynamic content? (like xslt template for example) Sep 23 21:22:37 hello Sep 23 21:22:44 anybody know a goode review site to submit a puzzle game to? Sep 23 21:22:45 i m a problem Sep 23 21:22:52 this Sep 23 21:22:53 !@Scanning app dir /system/app Sep 23 21:22:53 <6>[ 25.152709] no such pid Sep 23 21:22:54 <6>[ 25.152740] no such pid Sep 23 21:23:20 my phone s GT_9070 Sep 23 21:23:26 Does the SqliteDatabase method public Cursor query (String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) use prepared statements? Sep 23 21:23:39 Where is string information in eclipse? Sep 23 21:23:45 I cant find the string.xml anywhere Sep 23 21:24:27 Sevith: /res/values/strings.xml Sep 23 21:25:43 DarkKnightCZ, -.- Thank you. -.- Just installed eclipse Sep 23 21:26:34 np Sep 23 21:28:17 hi, I want to do pinch open close gestures but can't find info … where can I get this? book or url is fine but googling i not much Sep 23 21:30:49 also, is the reason that the os releases named after deserts is because they are sweet? Sep 23 21:32:13 No, it's because android development makes you fat, because of all the clunky APIs and missing features that you have to do yourself, keeping you in your chair for days, weeks, months, drinking energy drinks and eating snacks. Sep 23 21:32:44 lol Sep 23 21:33:16 EuroTrash: first, your nick is not nice, secondly I love android … by default because it uses java Sep 23 21:33:45 :D Sep 23 21:33:51 convivial: That's not really an advantage... Sep 23 21:34:01 convivial: well, sweets aren't nutrient dense, so maybe :) Sep 23 21:34:22 then why do we do it if it's that bad? Sep 23 21:34:22 Sure, it's better than a proprietary language. But Java has its own problems Sep 23 21:34:32 Python Sep 23 21:34:35 key lime pie, lemon drizzle cake, meringue, nougat Sep 23 21:34:37 hmm Sep 23 21:34:38 It's arguably nicer than objective-c I guess, much more high-level, but the boilerplate is quite bad. Also, this is my nick because I've seen it used in many occasions to indicate Europeans :P Sep 23 21:34:40 Sevith: ++ Sep 23 21:34:45 i,'m stuck on o Sep 23 21:34:54 Is using scala for android development a viable thing? Sep 23 21:35:00 -.- Sep 23 21:35:02 Hm the next two releases are going to be a bit sour for me. Sep 23 21:35:22 ssbr_: last time I heard it was surprisingly viable, haven't tried it myself, though. Sep 23 21:35:30 oatcake? Sep 23 21:35:33 I guess it can't hurt to try Sep 23 21:35:43 nut and honey Sep 23 21:35:55 that would be a healthy desert Sep 23 21:36:04 http://www.youtube.com/watch?v=9bZkp7q19f0 Sep 23 21:36:08 frozen yoghurt. just saying. Sep 23 21:36:14 but anyways, is all I get for gestures is gesture overlay? Sep 23 21:36:53 how to do pinch open, pinch close, swipe, etc…. The gesture builder does not support pinch\ Sep 23 21:37:42 I can not find anything in android.gesture to support them Sep 23 21:38:08 am I gonna get fat with gestures? Sep 23 21:39:15 hello? Sep 23 21:42:03 is it possible to get a bitmap of the entire screen? Sep 23 21:42:18 basically, get a screenshot from within an app Sep 23 22:05:17 How big should one make the sdcard on one's AVD? Sep 23 22:05:31 I selected 8 GiB and now I am thinking that was a poor choice Sep 23 22:10:22 lol Sep 23 22:10:32 512 Sep 23 22:13:50 Where is the main java code file for eclipse? Sep 23 22:13:57 This layout is confusing Sep 23 22:14:21 I remember hearing about an app that can be used to develop android apps on your android. Does anyone know what it is called? Sep 23 22:14:50 AIDE Sep 23 22:14:50 eclipse? Sep 23 22:15:05 just watch this, you'll understand everything http://www.youtube.com/watch?v=u8qgehH3kEQ&feature=youtu.be Sep 23 22:15:24 there is no android version of eclipse afaik Sep 23 22:15:35 ? Sep 23 22:15:41 I use eclipse? Sep 23 22:15:48 psyclopolis, the app is called AIDE Sep 23 22:15:58 Thanks that's it! Sep 23 22:16:01 on your android phone Sevith ? Sep 23 22:16:08 oic Sep 23 22:16:09 np Sep 23 22:16:36 Just thinking about the idea of writing Java using a mobile phone keyboard gives me thumb cancer Sep 23 22:16:36 im still trying to figure the eclipse layout..out Sep 23 22:18:04 mainactivity.java? Sep 23 22:19:45 AIDE is very old Sep 23 22:19:52 been around for quite some time now Sep 23 22:20:38 im trying to do an email intent and I am having trouble populating the to field do to it wanting a string array Sep 23 22:20:57 I have a string, which I even converted to string array but it wont accept it, it hangs Sep 23 22:22:54 hkhalid: I assume you are very new to programming? Sep 23 22:24:07 you don't "covert" a string to a string array. You populate the string array with strings Sep 23 22:24:22 KNERD, I split it up Sep 23 22:24:54 String[] e_list = email_list.split(","); Sep 23 22:27:22 KNERD, or nah? Sep 23 22:27:44 dont look good to me Sep 23 22:27:50 hey guys, when i call startActivity from inside a onTap() in a itemized overlay it crashes, does anyone know why? Sep 23 22:28:16 http://pastebin.com/ZeHCZt2A Sep 23 22:28:16 hkhalid: maybe if you explained what you are doing Sep 23 22:28:34 Any good free ebooks on android dev? Sep 23 22:28:57 kingargon: that is like saying "I put gas in the car, but it won't start. Anyoen know why?" Sep 23 22:30:17 Sevith: billions Sep 23 22:30:30 found one Sep 23 22:30:42 KNERD, I have a listview with checkboxes, send button, gets values of all checkboxes, makes 1 string with emails seperated by comma, and then I want to do email intent emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, e_list); and it hangs due to my stringarray andI tried emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,new String[] { email_list}); when I just left it as a string and didnt do anything with Sep 23 22:30:42 making it a string array , is my code http://pastie.org/4787930 Sep 23 22:32:19 I am using this crappy mobile internet and pastbin is not coming up for me Sep 23 22:32:26 KNERD: http://learnglobally.wordpress.com/2012/05/20/start-new-activity-in-android-clicking-on-a-marker/ Sep 23 22:33:09 KNERD, http://pastebin.com/W2nWf1ps Sep 23 22:33:38 KNERD: look at the link. thats the exact problem im having Sep 23 22:39:34 i can't browse. i need to call tech support Sep 23 22:39:54 kingargon: what does logcat say? we need the stack trace Sep 23 22:54:50 doc_savage: http://pastebin.com/bqAXggiL Sep 23 22:56:27 kingargon: do you know what you're looking for? Sep 23 22:58:12 find the first reference to your package, line 16 of your paste, that tells you where the error happened (OptionActivity line 12), the line above tells you why it happened (NullPointerException) Sep 23 23:09:14 doc_savage: thanks! Sep 23 23:09:33 doc_savage: i fixed it! Sep 23 23:10:17 kingargon: cool :) Sep 23 23:15:37 p_l: may I ask you a question regarding the android kernel and adb? Sep 23 23:16:05 you may. I no guarantee useful answers Sep 23 23:16:12 *don't Sep 23 23:16:28 thanks Sep 23 23:17:01 I built my own kernel from the source of the manufacturer. (chinese tablet, please do not hit me :D). Everything works fine, but Adb does not start anymore Sep 23 23:17:05 KNERD, you messed up Sep 23 23:17:27 I copied the initramfs from the kernel that was shipped with my device and used it for my own kernel Sep 23 23:17:52 do I have to set grp and own to root both before building the kernel on the old initramfs files? Sep 23 23:19:16 arroid: I'd suggest building up kernel-related parts of the initramfs froms scratch Sep 23 23:19:49 also, ensure that your device has proper usb-slave mode running Sep 23 23:20:25 Try running adb by yourself from the console, setting it to listen over the network, and see if you can connect to it Sep 23 23:20:31 p_l: that sounds nice, would you think that I am able to do this without being able to compile the rest of the rom? the manufacturer source is highly messy and hacked together, they build their ics kernel from the gingerbread tree.. Sep 23 23:21:10 will try that immediately, but I should see a notice in dmesg upon the connection of the usb cable to the device, right? Sep 23 23:21:16 arroid: should be doable - the kernel stuff is build anyway when you compile the kernel (modules etc.), so just overwrite the original initramfs Sep 23 23:21:42 arroid: on the host? yes. But only if the slave device has the slave driver working properly Sep 23 23:22:29 okay. should I flash the original kernel and check whether it outputs a message on connection and then recheck with my version? Sep 23 23:22:50 I am confused because I just used the initramfs from the original kernel and hoped it would be plug and play :D Sep 23 23:22:59 arroid: well, you can try Sep 23 23:23:14 okay thanks, I will try Sep 23 23:23:16 I'd get further with device in my hands, but I can't help on that :) Sep 23 23:23:34 p_l well if you want I could ship it to you :D Sep 23 23:24:07 arroid: I'd probably not have the time currently. Already took at least one job, probably will have two jobs (one full time, second startup...) so... Sep 23 23:26:42 p_l: that was not to serious. I am happy enough you are trying to help me Sep 23 23:28:52 p_l, what startup Sep 23 23:30:57 I will pay for help right now Sep 23 23:31:05 if someone can help with this string array Sep 23 23:32:53 p_l: when I change back to original kernel, usb mass storage and usb debugging work fine Sep 23 23:33:29 do you know how the permissions sould be in the initramfs folder? I suppose rwxr xr x root root ? Sep 23 23:33:50 arroid: see if you can get /proc/config.gz and see what the differences are between your kernel and theirs. but yes, check permissions as well Sep 23 23:34:19 p_l: none, because I used that file for my own config Sep 23 23:34:45 hmm... then check the permissions. Also, see if you don't have in your logs anything about modules that failed to load Sep 23 23:35:01 I got it from my kernel, fed it to menuconfig and compiled it. It works great, except for this usb issue and a 90° screen rotation offset :D Sep 23 23:35:02 okay Sep 23 23:35:20 because if you used modules from stock kernel, your kernel might have blocked them due to different build signature Sep 23 23:35:54 okay :- Sep 23 23:37:08 as for the startup, it's not sure thing yet (and neither job is really android related, even if the startup is telecom-related) Sep 23 23:42:32 p_l: I have ecc errors from nand,<4>[ 3.045000] nand communication have uncorrectable ecc error 0 oob[0]0x0 [1]0x0 Sep 23 23:42:33 <4>[ 3.046000] read oob ecc plane0 failed at address 0xc0000000 (page 393216) chip: 0 Sep 23 23:42:46 but I do not think this is the issue Sep 23 23:43:45 nothing about module having wrong signature or something like that? Sep 23 23:45:18 <6>[ 14.818000] init: processing action 0x33558 (property:persist.sys.usb.config=*) Sep 23 23:45:27 <6>[ 15.104000] init: processing action 0x331b8 (property:sys.usb.config=mass_storage,adb) Sep 23 23:45:43 <6>[ 0.603000] usbcore: registered new interface driver usbfs Sep 23 23:45:43 <6>[ 0.608000] usbcore: registered new interface driver hub Sep 23 23:45:43 <6>[ 0.614000] usbcore: registered new device driver usb Sep 23 23:45:57 that's on stock, not new? Sep 23 23:46:16 my own Sep 23 23:48:04 hmmm... frankly speaking, I have no idea for now. Not today. I'd, however, go through /proc and /sys checking for presence of usb guest or similar driver Sep 23 23:48:41 thanks for your assistance anyway, I am happy enough somebody at least try to help me Sep 23 23:48:44 wow i just did the android app walkthrough and sheesh it seems complex. Sep 23 23:48:53 have a nice day/night whatever time it is in your location Sep 23 23:50:21 for example: String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE); <--- this seems weird because we have "received the intent" but then getStringExtra takes a static final string that is available (i suppose) at compile time. Sep 23 23:53:42 MainActivity.EXTRA_MESSAGE is the key for that extra Sep 23 23:53:48 that's not the value..? Sep 23 23:55:14 hays: yes, it's the key... could just as well supply it with intent.getStringExtra("key"), but it's smarter to make it a string constant, it makes the code refactor-safe, allows the compiler to check the reference and prevents typing mistakes. Sep 23 23:58:40 Basically, an intent is a key-value store that you pass around activities. Sep 23 23:59:04 You set the extra in the first activity with a key, then in the receiving activity you retrieve the extra with that same key. Sep 24 00:01:52 p_l: in case you still have time, with my kernel I am getting this entry on my host : [26544.032111] usb 1-8: new high-speed USB device number 21 using ehci_hcd Sep 24 00:01:52 [26544.184307] hub 1-0:1.0: unable to enumerate USB device on port 8 Sep 24 00:01:52 [26544.516056] hub 2-0:1.0: unable to enumerate USB device on port 8 Sep 24 00:03:15 hmm ok, i see. right, its the key Sep 24 00:03:37 ok I have 2 listviews so far with one calling another, I have @Overrided the onBackPressed() and got them to go back and forth properly when user presses back button using a listIndex to keep track of the depth the user is at, but now it won't exit the application, when my listIndex=0, it should exit the application Sep 24 00:03:45 TheTrash: what about R.id.edit_message ? what is this R? Sep 24 00:04:35 i get that it is somehow referencing the appropriate data contained in the view Sep 24 00:04:37 R is.. pretty much a class with lots of constants (generated by the platform) that connects xml and file resources to java code. Sep 24 00:05:10 R for resource then Sep 24 00:05:13 Every external item, be it a string, file, layout element, etc. gets an entry in the R class, which you can use to refer to it in code. Sep 24 00:05:14 Yes Sep 24 00:05:24 arroid: sounds like issue with usb guest driver in the device Sep 24 00:05:52 could you give me a small pointer what I should investigate? Sep 24 00:05:53 in the onBackPressed() if my listIndex==1 it will display the countries list, if listIndex==2 it will display the channels list, so I need 'exit application' code for when listIndex==0 Sep 24 00:06:07 http://developer.android.com/guide/topics/resources/accessing-resources.html Sep 24 00:07:48 TheTrash: thanks Sep 24 00:08:00 I am surprised Java needs this cast: ImageView imageView = (ImageView) findViewById(R.id.myimageview); Sep 24 00:08:29 hi all Sep 24 00:08:52 hays: the R id is only an integer constant, it has no type information. Sep 24 00:09:09 TheTrash: that makes sense now, thanks Sep 24 00:09:16 It's one of the uglier parts of Android, though I'm not sure how I would have solved it in a better way myself. Sep 24 00:09:26 TheTrash: well yeah but it returns the view and then you.. upcast it to ImageView Sep 24 00:09:41 arroid: not really - it's been too long since I tested that area, and I don't have anything to check it out at the moment Sep 24 00:10:02 Yes, but it's potentially unsafe... if the thing you're finding is not actually an ImageView, you find out the hard way, runtime. Sep 24 00:10:10 i am looking for any technical writing regarding the merits of XML usage in Android applications Sep 24 00:10:29 p_l okay, thanks anyway Sep 24 00:11:08 TheTrash: so this tutorial is a lot to swallow but I think it makes sense. just a lot of concepts to track at once Sep 24 00:11:31 my project manager is moving us away from XML and I would like to raise concerns about that Sep 24 00:11:34 they are going full bore with the abstraction and use of all the different pieces, which is probably good. start good habits early Sep 24 00:11:58 karakuri: aww no, heh Sep 24 00:12:08 and it would help to have something other than my own opinions to bring to the table Sep 24 00:13:56 Can you afford to find another job? Sep 24 00:14:35 well, i was hoping it wouldn't come to that Sep 24 00:15:21 i've had this position about 5-6 months Sep 24 00:15:36 also don't want to leave on bad terms Sep 24 00:16:23 I mean, I could google for some blogs (or you can do the same as well as I can, probably), but a project manager who 1) thinks random blogs are more reliable than his own employees and 2) gets involved with the project on such a level without technical expertise is something I would run away from as fast as I can. Sep 24 00:16:34 Don't have to leave on bad terms, just find a better environment :) Sep 24 00:17:35 TheTrash: http://developer.android.com/training/basics/firstapp/starting-activity.html#DisplayMessage Here the tutotial creates a new TextView. could this be done in the .xml file similar to how the ExitText and Button were in the first Activity? Sep 24 00:18:05 I mean, I figure you can convince him with the standard arguments: separation of concerns, frameworked automatic selection of resources for specific densities, resolutions, screen sizes, easy translation in case of strings, etc. etc. Sep 24 00:18:44 If hrefs is the only acceptable means of persuasion, then... wow. Sep 24 00:18:56 best to communicate to a project manager in terms he can understand: cost, schedule, risk, scope. Sep 24 00:20:00 even a non-technical person should be able to be convinced if explained in simple terms of what the future consequences of that decision are Sep 24 00:20:08 more. better. faster. Pick two. Sep 24 00:20:27 more and more Sep 24 00:20:31 hays: yeah, that textview could have been in a layout xml, and the layout xml referenced in setContentView... and you'd pick it up with findViewById (only after calling setContentView, though). Sep 24 00:21:53 hays: it's a somewhat impractical example as one willl pretty much never have a single-textview layout, it would have made more sense to show it in a layout context as done in the first example. Sep 24 00:22:42 But I guess the point of the exercise is to show how it can be done in code as well. Sep 24 00:22:47 well i guess they are just trying to cover as many bases as possible Sep 24 00:23:19 TheTrash: i appreciate your thoughts Sep 24 00:24:32 the reason i'm looking for other writings is that i am one of two developers on this project, the senior developer is pushing against xml, and our boss seems to agree with that Sep 24 00:25:17 so i'm isolated Sep 24 00:25:27 I feel for you :/ Sep 24 00:25:30 as much as I hate xml, it would be terribly misguided to completely avoid it out of principle Sep 24 00:25:41 its part of the framework Sep 24 00:25:50 thats the point i wish to get across Sep 24 00:26:31 i've mentioned that layouts are faster and easier to build with xml, and the structure is much more apparent in xml Sep 24 00:26:59 karakuri: even the guidelines mention xml is preferred http://developer.android.com/guide/topics/ui/declaring-layout.html Sep 24 00:27:26 Besides, you completely lose the resource selection system entirely if you do that Sep 24 00:28:08 want landscape? xlarge? oh too bad. you wrote it all in code. Sep 24 00:28:35 g00s: thanks for the link Sep 24 00:28:43 mrenouf: yeah, i agree Sep 24 00:28:54 apparently we're going to be doing that by hand in code Sep 24 00:29:18 by making subclasses of things for different purposes Sep 24 00:29:46 if you can't sway them, and you'd prefer not to switch jobs, the best thing to do is to actually help them. Sep 24 00:29:55 If you're going to fail, fail FASTT. Sep 24 00:30:01 Yes, you throw away half of what the framework provides, meaning you'll have to code that stuff yourself. Problem is finding an article by a reputable author that quantifies it (in a more detailed way than the Android docs)... I guess the reason for such articles not existing is because ten minutes of reading into the platform should convince most developers with half a mind. Sep 24 00:30:20 agreed Sep 24 00:30:51 the platform uses that approach internally Sep 24 00:31:13 as do most (if not all) of the examples/samples from Google Sep 24 00:31:16 it seems that use of XML separates the View from the Controller Sep 24 00:31:34 https://groups.google.com/forum/?fromgroups=#!topic/android-beginners/oQPSlGDj1R8 Sep 24 00:31:36 as does the ioched app Sep 24 00:31:38 The thing is, they're claiming that every other android developer, including those at Google, are not as smart as them, because they all made the "mistake" of using XML. Sep 24 00:31:53 and that is just impossible to comprehend if it's true. Sep 24 00:31:54 so if you are going to toss XML out the window at LEAST try to keep those two concepts separate Sep 24 00:31:57 "There is really very little point in building the UI from Java code except complicating the source code and making some things harder (like supporting configurations.)" Sep 24 00:32:11 There, a real quote by the guy who actually made most of that stuff. Sep 24 00:32:26 Also. Good luck with styles/themeing. Sep 24 00:32:45 well doing it in Java is more expressive.. hah which is the problem with doing it in Java Sep 24 00:32:59 "expressive" Sep 24 00:33:02 ha Sep 24 00:33:17 Doing it in assembly is even more expressive. Sep 24 00:33:33 It's also not true, the Java code is much clunkier than the XML. Sep 24 00:33:34 lol Sep 24 00:34:02 far less innformation dense, more boilerplate, and harder to read. Sep 24 00:34:09 there are more possibilities doing it in code (meaning more mistakes possible for the most part) Sep 24 00:34:50 The Qt framework has moved mostly away from a code paradigm to XML for their layouts I believe Sep 24 00:34:54 not sure about GTK Sep 24 00:35:09 but I think C#/.NET has moved that way too Sep 24 00:35:15 hays: GTK was first in that,actually Sep 24 00:35:17 Gtk has had Glade for a long time Sep 24 00:35:22 though things might have changed Sep 24 00:35:23 GTK has had designers for a long time, which read some xml style description and build the UI from that. Not sure how much that's used, though. Sep 24 00:35:36 ah yes, glade indeed was its name Sep 24 00:35:39 just another thing to maybe bring up. basically they are bucking the trend of not just Google, but everyone in the industry Sep 24 00:36:16 karakuri: https://groups.google.com/forum/?fromgroups=#!topic/android-beginners/XxML-8UWaao a few other comments from romainguy, find some of his other posts on the official (google-provided) android resources with that and maybe that'll help. Sep 24 00:36:28 karakuri: i missed the beginning of the conversation, why did they want to do their ui programmatically ? Sep 24 00:36:31 one of the things that really kills code-based layouts is the designer UI. You'd be trying to parse code to work out what the layout says, and then rewrite new code when the designer changes the layout Sep 24 00:36:38 it's not going to work, so everyone puts the UI in XML or such tech Sep 24 00:36:40 mrenouf: yeah, styles/themes is another thing i need to bring up Sep 24 00:36:41 This makes me feel so sad that I'd like to beg romainguy to write a personal e-mail to your senior. Sep 24 00:37:38 not sure if it is relevant to your project but in terms of maintenance if you do your layouts in XML you can hire a less skilled person to maintain them in the future Sep 24 00:37:48 If someone wants to do all the layout in their code, they always have the option Sep 24 00:37:56 Yes, perhaps one of those guys called a "designer". Sep 24 00:38:28 that might be important to someone who manages a project Sep 24 00:38:32 TheTrash: a personal email from Romain would be epic Sep 24 00:39:01 android fragmentation seems like another relevant topic. e.g. how to support multiple devices and the increase in scope use of code would necessitate Sep 24 00:39:13 hays: good point Sep 24 00:40:15 I went to a talk by the Tumblr Android head developer on Android. He said, "Anyone who thinks Android is fragmented never worked on Java ME" Sep 24 00:40:22 i wonder if this senior developer is looking for job security haha Sep 24 00:40:36 hays: also, if you want to go far enough in the past... Delphi used that. In face, in certain ways, Windows did that in general Sep 24 00:40:48 Ologn: thats true in a way, but … its alike arguing we dont suck as bad because something sucks more Sep 24 00:40:58 Ologn: use of buzzwords==important for communicating with project managers Sep 24 00:41:15 Ologn: well, it's pretty much "Anyone who thinks Android is fragmented has only ever worked on iOS targetting only pre-5 iphone". Sep 24 00:41:54 yeah Sep 24 00:42:49 I imagine it will soon fade, now that iphone 5 is out and Apple is starting to EOL more devices, and is possibly releasing a 7" ipad. Sep 24 00:42:53 haha yeah iphone 5 different screen dimensions is pretty hilarious Sep 24 00:43:18 i think android is pretty fragmented by os / behavior. not screen sizes … i've had a wide variety of behavior … from sqliet behaving differently because somebody enabled WAL to HTC fucking up other things, to my app suddenly crashing only on 4.1.1 because content provider uri permissions changed in behavior Sep 24 00:43:43 if I remember correctly, apple customer polls indicated that people bought androids because they had larger screens than iphones. Might be response to customer demand. Sep 24 00:44:21 still, can't be a large group Sep 24 00:44:30 i think apple is beginning to jump a very large shark Sep 24 00:44:34 Well it was inevitable, the previous screen was quite small and letterboxed pretty much all online videos, making it even worse. Sep 24 00:44:38 kinda sad to see really Sep 24 00:44:43 g00s: ... there were phones without wal? Sep 24 00:44:44 g00s: i'm one of two developers on this project. the senior developer is pushing against xml Sep 24 00:44:51 but its like the late 80s all over again Sep 24 00:45:02 my understanding is this person thinks it s crutch for inferior developers Sep 24 00:45:07 p_l: wal is not standard for sqlite, but HTC enabled it .. causing all kinds of fuckup Sep 24 00:45:12 The ipad 3 quadrupling resolution just to avoid having to design a proper scaling framework was epic. Sep 24 00:45:21 (or sqlite on android, i should say) Sep 24 00:45:24 But there's only so many tricks like that that can be pulled. Sep 24 00:45:25 and also has a game development background, so does everything programmatically Sep 24 00:45:33 g00s: umm... .journal is also write-ahead. And I remember it being pretty common.... Sep 24 00:46:03 this person also is primarily responsible for our company's iOS apps, and they did everything programmatically there as well Sep 24 00:46:19 TheTrash: apple has done it before. Pixel doubling is great way to be backwards compatible. Sep 24 00:46:25 TheTrash: nah, that's just classic Jobs hardware fetishism--I'd almost call that a good thing for the industry that stuff like that gets pushed.. of course in other areas it can be a disaster (when it doesn't work) Sep 24 00:46:26 p_l: here is the bug http://stackoverflow.com/questions/4718934/sqlite-issues-with-htc-desire-hd/ Sep 24 00:46:43 alankila: yes, but physics are bound to stop them there :P Sep 24 00:46:53 TheTrash: well it's not like you have to keep on doubling the resolution either Sep 24 00:47:02 people aren't going to evolve better eyes overnight Sep 24 00:47:52 heres another great bug from HTC that managed to fuck things up http://stackoverflow.com/questions/5358014/android-httpclient-oom-on-4g-lte-htc-thunderbolt Sep 24 00:48:12 i like wp in the sense that oems dont get the source code ;) Sep 24 00:48:20 alankila: yeah, I think going beyond retina much more is going to be pointless, considering the limits of the human eye.. the next hurdle for Apple is aspect ration. Sep 24 00:48:21 seems like theyonly fuck it up Sep 24 00:48:22 ratio* Sep 24 00:48:24 g00s: they do Sep 24 00:48:55 g00s: it's just done in different way Sep 24 00:48:56 p_l: not that i am aware of, do you have any links ? Sep 24 00:49:28 alankila: though I can predict Apple's next move... the 7" ipad is going to have exactly the same aspect ratio as the iphone 5, with 4x the pixel count. Sep 24 00:50:10 g00s: don't remember the details, but basically you get a classic WinCE kit + WinPhone target binaries. The first part is customized to get the device running, the second is just binaries Sep 24 00:50:38 * alankila doesn't really care what apple does. Sep 24 00:51:17 Never hurts to keep an eye on the competition. Sep 24 00:51:43 I think apple's example with respect to their handling of DPI shows one thing: perfectionism. And control. No scaling algorithm other than pixel doubling looks exactly "right". Sep 24 00:52:24 can someone help me with an email intent Sep 24 00:52:27 their next item will be from the iPad to the iMat Sep 24 00:52:32 I cant fill in the to field with my own string Sep 24 00:52:35 that being said, doubling is kinda wasteful. You could use the extra pixels for smoothing, at some loss of contrast and maybe gamma-related errors. Sep 24 00:52:59 then the iRug Sep 24 00:53:04 iCarpet Sep 24 00:53:07 iFloor Sep 24 00:53:21 iWall Sep 24 00:53:32 iRoom Sep 24 00:53:35 If perfection is letterboxing pretty much all available web video in order to avoid developing a flexible scaling system, then I guess so. Sep 24 00:53:37 iHouse Sep 24 00:53:42 alankila: it also shows that their system and APIs were not designed for density independence :) Sep 24 00:53:56 theoretically even non-retina applications could have some line-recovery algorithms similar to FXAA performed to generate smoothed detail. Sep 24 00:54:01 One thing I do is download my app CSV statistics and see who has a low keep percentage if I've had over 20-30 downloads or something. Then I ban those devices until I get to test them. Sep 24 00:54:15 romainguy: oh, absolutely. But it's still a hairy swamp to go there. Sep 24 00:54:31 The world is a hairy swamp, best deal with it :P Sep 24 00:54:41 Usually they are those no-name, no-brand ones on the bottom of the list in the Other category though. Sep 24 00:54:52 yeah, Apple removed density-independence sometime in Rhapsody iirc Sep 24 00:55:43 but anyway, apple makes different design decisions than most would. I'd say what they have done has worked for them -- whether it's been in spite of those things, it's harder to say Sep 24 00:56:32 thanks for the help everyone Sep 24 00:56:35 alankila: well, it's somewhat similar to their maps problems... they've made some decisions that could put a nasty brake on progress. Sep 24 00:56:54 I think a big boon for Android will be when the developer console v2 is pushed out Sep 24 00:57:01 karakuri: I sincerely hope you can convince your senior. Sep 24 00:57:10 Because then we (I think) can advertise apps in Greek, Arabic etc. Sep 24 00:57:15 yeah, me too Sep 24 00:57:35 i'm gonna keep looking for links and things Sep 24 00:57:49 just in case there's something out there Sep 24 00:58:39 And that will help with worldwide sales. I understand how Arabic is harder than a western left to right language, but its a market who is going to be grabbed by somebody. Sep 24 01:00:02 karakuri: your tech lead refuses to use XML to describe UIs? Sep 24 01:00:30 romainguy: we're hoping you can write his senior a personal email why its a bad idea :) Sep 24 01:00:41 karakuri: log this conversation :) Sep 24 01:01:56 something is wrong with my string I tink Sep 24 01:02:18 One weird thing I do with XML is I put a hidden value in a database row display screen, and use that as the integer for how many rows to display Sep 24 01:02:23 romainguy: hey, nice to see that you are still there. I can not save tar archives from gmail. you lied to me ;-) Sep 24 01:02:37 I guess I could do DisplayMetrics but my method seems easier...hmm Sep 24 01:03:34 romainguy: would you have any idea where the various DoF calculators are getting their databases of camera / CoC / focal lengths ? Sep 24 01:03:34 g00s: haha, thanks, i will Sep 24 01:03:41 arroid: I wasn't talking about Gmail; Browser should let you do it Sep 24 01:03:47 g00s: no clue Sep 24 01:03:48 Normal xhdpi screens seem to have come out of nowhere in the past months, I guess I'll have to test my apps on that emulator Sep 24 01:03:50 g00s: The Web? :) Sep 24 01:03:58 :) Sep 24 01:04:29 i can't imagine dofmaster goes to the web for this Sep 24 01:05:12 or they just look at the size of the sensors, etc. Sep 24 01:06:05 romainguy: yes, my project lead wants us not to use xml for layouts Sep 24 01:06:06 romainguy: didn't try that. but I think gmail should be able to do that too :D Sep 24 01:06:25 also, i'm now told not to use them for state list drawables either :( Sep 24 01:06:39 karakuri: this is going to be an absolute pain to write and maintain your app Sep 24 01:06:48 yes, i realize this Sep 24 01:07:27 what is his reasoning? Sep 24 01:07:41 may i private message you? Sep 24 01:07:46 sure Sep 24 01:07:48 ill pay for help Sep 24 01:07:54 ahh, a happy ending :) Sep 24 01:10:45 p_l: btw, wal is new with sqlite 3.7.0. you have to explicitly enable it Sep 24 01:10:55 hmmm Sep 24 01:11:01 then I had issues with old journals Sep 24 01:14:42 * hkhalid makes more g00s Sep 24 01:15:21 ... would that be g33s3? Sep 24 01:15:33 no, g33s Sep 24 01:15:36 :) Sep 24 01:15:39 :) Sep 24 01:16:36 * p_l meanwhile ponders if he will have epic dreams if he leaves headphones on playing rather epic battle music Sep 24 01:16:41 whenenever I pass a string of email addresses it causes a hang when I start the intent, could there be any reason for this Sep 24 01:21:53 that was delightful Sep 24 01:22:23 karakuri, why Sep 24 01:23:40 karakuri: \o/ Sep 24 01:25:07 chatting with romain guy Sep 24 01:25:17 holy nerdgasm batman Sep 24 01:27:01 hkhalid: 'it' is almost certainly *your code* Sep 24 01:28:07 Leeds, why are you hating, its not my code, its like 4 lines, and its on dev docs probably Sep 24 01:28:45 ah, I'm hating... quite early in the morning for that, but okay Sep 24 01:28:58 god damn it, now i have to give up rice too http://www.motherjones.com/tom-philpott/2012/09/waiter-theres-arsenic-my-rice Sep 24 01:29:10 the only thing that seems healthy is bacon :) Sep 24 01:29:11 hi Leeds Sep 24 01:29:24 NO BACON Sep 24 01:30:52 Leeds, you should eat Trix cereal Sep 24 01:39:59 Hey. I am an iOS developer and I'm looking to start porting some of my apps over to Android. I have a lot of programming experience, however I have not really done much with Java (I'm fluent in C/C++/Objective-C/Ruby). I was wondering if anyone could recommend the best book for learning Android development? I prefer something that covers as much of possible of the SDK with simple sample applications and as little programming ba Sep 24 01:40:48 hkhalid: Special K, my friend Sep 24 01:42:13 sprite--: honestly, I'd suggest a quick Java tutorial, then dive into d.android.com to get up on Android platform stuff - how an app fits together, IPC, etc. Sep 24 01:42:37 special k is rice Sep 24 01:44:01 g00s, at least your water doesn't have as much arsenic as mine Sep 24 01:56:37 Hi, i need to know the name of this line that indicates the position in a tabwidget. Sep 24 01:56:41 Any idea? Sep 24 01:59:18 nylon100: Someone may, but may be away from their client; minimum response time on IRC is never guaranteed, but may be minutes... or hours. :-) Sep 24 02:01:40 Baylink: Yea, I'm from Earth too : ) thanks! Sep 24 02:02:09 Roj. Just checkin'. Sep 24 02:02:21 Some people don't know what's reasonable... Sep 24 02:02:54 I should have noticed that was only 4 seconds later, and hence obviously a tag rather than a prompt,but I missed it. Sep 24 02:15:45 Maybe a tab strip it is? ... Sep 24 02:54:36 an interesting quote from torvalds on programmers http://programmers.stackexchange.com/questions/163185/torvalds-quote-about-good-programmer Sep 24 02:56:32 catherine bell has some nice D-cups, doesn't she? **** ENDING LOGGING AT Mon Sep 24 02:59:59 2012