**** BEGIN LOGGING AT Wed Aug 05 02:59:56 2009 Aug 05 03:05:27 how can I kill a Handler Aug 05 03:13:49 how do I set a an edit text so that as soon as it's selected the default value is erased? Aug 05 03:19:39 does a webview just start the browser? Aug 05 03:19:46 i was hoping it'd be like a browser i can have inside of my layout Aug 05 03:20:32 elprespufferfish, that's exactly what webview is Aug 05 03:20:50 i wonder what's going on then Aug 05 03:26:28 KNY, so it shouldn't be opening the browser, huh Aug 05 03:26:33 all i'm doing is WebView webView = (WebView)findViewById(R.id.webview); Aug 05 03:26:33 webView.loadUrl("http://m.facebook.com"); Aug 05 03:50:55 Is using the permission enough to prevent the phone from sleeping? Aug 05 03:52:12 wakelock Aug 05 03:54:02 Ok, being new to Java, I was hoping someone could help me understand something. Why must a call to super() within a constructor be the first statement? My subclass constructor accepts different parameters, and based on those parameters decides what to pass to super() -- but apparently that's not possible in Java? I'm hoping there's something I'm missing here... Aug 05 03:56:36 use this(bla, bla) Aug 05 03:57:23 or I totally misunderstood your problem Aug 05 03:57:24 :p Aug 05 04:00:57 SinnerG, even when I use this() within a constructor it still says it needs to be the first call within the constructor Aug 05 04:01:45 I guess I'm just having trouble wrapping my head around it -- coming from python :-P Aug 05 04:06:36 Well, I worked around it by defining an Init() method in the parent class and calling that in the child -- but it's still ugly :-( Aug 05 04:16:32 hey guys im getting a permissiosn error with record_audio even tho i added to mainfest? Aug 05 04:17:08 more deets Aug 05 04:17:26 i just get Permission failure: android.permission.RECORD_AUDIO from uid=10052 pid=550 Aug 05 04:18:58 ah i think i put it in wrong place Aug 05 04:19:43 oh good Aug 05 04:19:48 mangggg my app is so ballin now Aug 05 04:19:55 Nearly ready for marketttt Aug 05 04:20:01 :D Aug 05 04:20:02 game? Aug 05 04:20:10 naw Aug 05 04:20:16 I don't wanna say Aug 05 04:20:20 :) Aug 05 04:20:20 cause it'll spoil it Aug 05 04:20:28 if i say what it is Aug 05 04:20:30 somebody will make it Aug 05 04:20:32 and put it out before me Aug 05 04:20:35 yep i have same idea Aug 05 04:20:35 that always happens Aug 05 04:20:42 enter it into adc2 Aug 05 04:20:57 oh yeah? Aug 05 04:20:58 Hrmmmm Aug 05 04:21:03 Do they accept open source projects? Aug 05 04:21:12 not sure Aug 05 04:21:21 When is it due Aug 05 04:21:26 opens any day Aug 05 04:21:37 http://code.google.com/android/adc/ Aug 05 04:22:32 oh man Aug 05 04:22:34 I guess I could.. Aug 05 04:22:48 But I have to give the app away for free? Aug 05 04:22:52 no Aug 05 04:22:57 make it a time limited demo Aug 05 04:23:00 then release after Aug 05 04:23:16 thats what im going to do Aug 05 04:23:21 when i work out how to make a time limited demo Aug 05 04:23:29 Mehhhh Aug 05 04:23:31 That's not my style Aug 05 04:23:39 I'm not a fan of crippled applications Aug 05 04:23:42 I think I'll just sell it Aug 05 04:23:46 Not gonna get that monies anyway Aug 05 04:23:51 it wont be crippled really tho if you give it 2 weeks Aug 05 04:23:56 then have a paid one for cash Aug 05 04:24:02 thats true Aug 05 04:24:06 winning would be v hard Aug 05 04:24:09 i guess Aug 05 04:24:16 I wrote this in a week Aug 05 04:24:23 it doesn't look very pretty Aug 05 04:24:27 and I'm sure there are bugs Aug 05 04:24:36 I was hoping to make ~500 bucks from this Aug 05 04:24:41 not 25 grand Aug 05 04:40:48 how long does new post get approved on google group? Aug 05 04:40:59 rw2j what is your app? Aug 05 04:41:06 I posted a question on Sunday. It still has not showed up Aug 05 04:42:29 /n Aug 05 04:46:17 is there an easy way to give textviews a border? Aug 05 04:48:58 http://geoquake.jp/en/webgame/DrivingSimulatorPerspective/ Aug 05 04:49:46 haha Aug 05 04:49:48 v cool Aug 05 04:50:21 collions would be good Aug 05 04:54:10 elprespufferfish: well, define easy? :) Aug 05 04:54:33 elprespufferfish: you could get a border "easily" by making a nine-patch png which is basically a border and transparent content Aug 05 04:54:42 i cant get the camera preview to appear :/ Aug 05 04:54:43 and set it as the TextView's background Aug 05 04:59:46 anyone done any code for video cam? Aug 05 05:12:44 hi, is there a way to trace Messages/Runnables sent to Handler without adding Log.d() to each send/post call? something like logcat -b events but showing only my Messages. Aug 05 05:19:58 interesting, i never even knew about -b events Aug 05 05:20:02 that looks handy Aug 05 05:22:38 I don't remember how toexport to apk Aug 05 05:22:59 from Eclipse? just right click the project and go to Android Tools or whatever Aug 05 05:23:13 ah, right Aug 05 05:23:14 ofcourse Aug 05 05:23:15 merci Aug 05 05:23:25 I get so nervous at this point Aug 05 05:23:30 everything working properly on the emulator Aug 05 05:23:38 but yet to try on a real device Aug 05 05:32:41 ohh, i just found somethign neat Aug 05 05:32:43 adb logcat -v thread Aug 05 05:54:50 INSTALL_PARSE_FAILED_NO_CERTIFICATES Aug 05 05:54:55 I have to sign it to use it on my own phone? Aug 05 05:55:07 yep, usually eclipse helps by signing it with a debug cert Aug 05 05:56:12 not this time, I guess.. Aug 05 06:10:27 hey.... Aug 05 06:10:42 anyone used proximity alerts on 1.5? Aug 05 06:13:09 any help???? Aug 05 06:16:42 okay, any idea when donut may come out?? Aug 05 06:28:21 hmmm.. donuts.. Aug 05 07:03:04 how much is a htc hero off contract where ever you live? Aug 05 07:07:03 is the htc hero tied to a google account since its not google branded? Aug 05 07:07:38 does their own ui etc cripple the usability in that aspect? Aug 05 07:08:52 in DK an off contract hero will cost 490 euro Aug 05 07:09:27 ouch, 599 here... Aug 05 07:10:35 guess ill still buy it, waited long enough for the first hardware to be available Aug 05 07:10:49 just wanna know if it integrates to my google account like the other phones, since the ui etc is somewhat modified Aug 05 07:11:41 i think it is the same as with my htc magic - you don't need a google account, but it's an advantage in some areas if you have Aug 05 07:12:11 well i just want my calendar, contacts etc to sync to my google account Aug 05 07:12:37 thos things works in magic so i suspect it also does in hero Aug 05 07:37:43 hey guys, wondering if i had a drawable, is it possible to set a color as transparent, and then put a different drawable behind it so that the color shows through the transparent region ? Aug 05 07:44:01 I'm creating a custom dialog and the sepeerator between the title and the content doesn't show. How can i show this? Aug 05 08:24:13 Hello Aug 05 08:24:45 does the AurdioRecord class work on AVD ? Aug 05 08:48:13 Hi everyone, i need help on some app that i'm writing ... is this the right channel? Aug 05 08:49:08 ask2ask protocol has considerable overhead Aug 05 08:56:07 CallDrop, look at this channel's topic Aug 05 08:56:38 CallDrop, "Welcome to #android-dev, for Android Application Development. Got a question? Just ask! " Aug 05 08:57:32 cool, i'm a complete noob :) i am using SDK 1.5 and added the digitalclock in the layout view - now the problem is that i want it to be in 24 format not 12 ... how can i get it done? Aug 05 09:00:03 meh I read analog clock and went '24 hours on an analog clock?' :P Aug 05 09:00:26 :) Aug 05 09:01:59 so basicall instead of 1:00:00PM it should read 13:00:00 Aug 05 09:02:30 I think it will automatically, depending on the device date and time settings Aug 05 09:02:57 nope ... i tried changing it but with no luck Aug 05 09:03:28 is that on emulator or on device ? Aug 05 09:03:42 both :D Aug 05 09:04:33 i juest tried on my htc magic, and it honors the device settings Aug 05 09:04:49 let me check again Aug 05 09:05:54 shit, your right ... it now works :) is there a way to force it to always use this setting? Aug 05 09:06:11 even if the system is using the other format? Aug 05 09:07:05 I think it would be wrong to enforce a particular format, it would be nicer if the user always saw the format he had chosen Aug 05 09:08:47 the thing is that in the app that i'm writing, there is a timetable with times in the 24Hr format and the clock that appears should be in this format to make things easier ... i do not want to change the timetable format Aug 05 09:10:52 http://www.reddit.com/r/funny/comments/97jht/i_hate_my_job/ Aug 05 09:12:48 CallDrop, in that case you may have to roll your own widget Aug 05 09:25:40 hi Aug 05 09:25:54 i ve got a problem testing this tutorial : Aug 05 09:26:01 http://www.anddev.org/android_weather_forecast_-_google_weather_api_-_full_source-t361.html Aug 05 09:26:25 it works fine with : http://www.google.com/ig/api?weather=Paris but i ve got an error with http://www.google.com/ig/api?weather=Paris&hl=fr Aug 05 09:26:36 an org.apache.harmony.xml.ExpatParser$ParseException during XML parsing Aug 05 09:26:39 error Aug 05 09:26:50 does someone have any idea about this problem ? Aug 05 09:30:50 what does the exception message say ? Aug 05 09:47:05 hoerup: http://paste.lisp.org/display/84808 Aug 05 09:55:56 l_a_m, the problem is that the xml data is apparently ansi the parser expects it to be utf-8 Aug 05 10:06:19 Someone is familair with the state pattern (java) ? Aug 05 10:07:05 state machine? Aug 05 10:07:20 no state pattern. Its a design pattern for programming. Aug 05 10:07:29 ah no Aug 05 10:08:49 hoerup: ah Aug 05 10:15:32 Hi someone here? Aug 05 10:19:38 how do I qucikly run the platform\android-1.5\samples in my emulator ? Aug 05 10:19:49 i need to load em up in Eclipse and all? Aug 05 10:23:39 StaticAres, what's the problem ? Aug 05 10:24:24 Is it okey if I use only 1 activity for the whole game and initialize the state manager in this activity? Aug 05 10:25:06 Ramosa, the samples are not compiled so either pull them into eclipse let eclipse do the compilation or else to commandline comilation Aug 05 10:25:25 how do I pull them in there... "Open Project" is not selectable Aug 05 10:27:37 Ramosa you have to create a new android project in your workspace, and then choose "create project from existing source" Aug 05 10:28:20 phew it fills out the forms by itself then :) Aug 05 10:28:23 thanks Aug 05 10:29:55 StaticAres, I think it should be possible Aug 05 10:30:30 But is it a smart thing to do? I'm new to android sdk and kinda trying to figure out the best way to design my application Aug 05 10:33:43 honestly, I don't know that Aug 05 10:41:22 can the JET Audio engine be used to generate synth sounds on the fly? Aug 05 10:41:29 EAS: Embedded MIDI Synthesizer. The name of the SONiVOX MIDI synthesizer engine. Aug 05 10:42:20 i'm looking for apps and examples that generates synth sounds Aug 05 10:43:42 anyone can give a comment on Hello, Android book? (http://www.pragprog.com/titles/eband/hello-android) Aug 05 10:46:16 does anybody know how to switch langauges on the fly in an application? Aug 05 10:46:16 it sets the language in the ressources correctly, but the onConfiogurationChanged function is not called Aug 05 10:46:17 so my application is set to the new language only if it restarted, ony ideas? Aug 05 10:48:45 hm did you add something to your meta xml file htingy? :p Aug 05 10:48:55 the manifest :p Aug 05 10:51:33 there just sold my game site Aug 05 10:51:43 for $100 - all to pay for my magic :P Aug 05 10:51:54 gonna miss it though :'( Aug 05 10:52:04 4166 flash games on it :P Aug 05 10:52:08 jesus Aug 05 10:52:11 for 100 usd Aug 05 10:52:21 i guess u didnt own any of them Aug 05 10:52:31 no its one of them arcade flash sites Aug 05 10:52:43 question Aug 05 10:52:47 ask Aug 05 10:52:50 if its impossible to access lie camera data Aug 05 10:52:54 live Aug 05 10:52:57 how did qik do it Aug 05 10:53:05 i presumed it broke for an upload Aug 05 10:53:06 I have no idea (yet) - sry Aug 05 10:53:07 but it doesnt Aug 05 10:53:41 Gaz : http://www.tomgibara.com/android/camera-source Aug 05 10:53:43 maybe that helps? Aug 05 10:54:39 no Aug 05 10:54:42 thx tho Aug 05 10:55:04 trying to figure out how to do a particles system.. meh not easy ;p Aug 05 10:56:45 * _Auron_ finds it super easy, but he's had experience Aug 05 11:02:37 * ewon recalls doing a particle system in java2d back in the day Aug 05 11:03:06 just create a particle object, give it an update function that does some basic rules Aug 05 11:03:10 create a bunch of them Aug 05 11:03:14 call update every frame Aug 05 11:03:15 the end Aug 05 11:04:18 how is QIK actually possible Aug 05 11:07:23 there seems to be a delay between a phone call ending and the call being entered into the call log, does anybody know what a sensible time to wait might be before trying to read the call's details? Aug 05 11:10:03 <_Auron_> ewon: yeah that's all Aug 05 11:11:27 I know it goes a bit like that Aug 05 11:11:38 but I want it to be efficient or easy to make it efficient later :p Aug 05 11:11:50 like reuse particle objects for other emitters etc etc Aug 05 11:19:00 <_Auron_> SinnerG: ? Aug 05 11:19:04 <_Auron_> other emitters? Aug 05 11:23:06 well how I want to do things Aug 05 11:23:22 is create an emiutter obj with a position + an environment (for example with gravity / wind) Aug 05 11:23:38 and it handles the particles Aug 05 11:24:09 you could have multiple, but since creating / destroying objects is expensive @ android java, I'd like to be able to reuse the particle objects Aug 05 11:24:27 so I'm going to make a 'manager' for it with a gc() method in case you want to free up mem Aug 05 11:24:37 but thats for after I got it working ;p Aug 05 11:28:29 _Auron_ this making game / engine thing is rather new for me, so I'm sure that whatever I'm doing is not the best / correct way Aug 05 11:28:40 but currently I'm trying to set that asside of me, and just make it work :P Aug 05 11:48:04 how do you put the emulator on pause or something so it doesn't steal all my CPU while developing.. i'd hate to shut it down between runs Aug 05 11:49:41 just exit any app Aug 05 11:49:52 emulator.exe uses 2% cpu @ here @ main screen Aug 05 11:49:59 aka press the home icon Aug 05 11:50:37 still over 80% Aug 05 11:51:13 not here Aug 05 11:51:18 it must be doing something ucky Aug 05 11:51:20 :P Aug 05 11:51:24 ofc if you wrote your own app Aug 05 11:51:32 no i run AppDemos .. but that's also a big one Aug 05 11:51:35 it must correctly handle pause for it to drop cpu Aug 05 11:51:42 pressing red phone icon doesn't close apps it seems Aug 05 11:51:48 the emulator doensn't use much more than 2-3% on my Aug 05 11:51:51 yeah Aug 05 11:51:53 same here Aug 05 11:51:58 except when my app is running ofc :P Aug 05 11:56:23 i need a third monitor for all my windows Aug 05 11:59:17 update on my windows machine a standby emulator uses 2-3% cpu but on ubuntu it uses 7-10% Aug 05 11:59:52 in either case it's far from Ramosas 80% Aug 05 12:02:44 ill try running AppDemos again Aug 05 12:03:14 and while waiting the minute it takes to load up, i'll check status on hero phones :-p Aug 05 12:05:25 during startup (displaying android logo) emulator only takes 5-10% Aug 05 12:05:35 if it used 100% i guess my app would appear faster Aug 05 12:07:23 hey guys ! i have two projects and i want an activity including layout from one project to use as jar in another project , is that possible ? Aug 05 12:07:26 seems not to launch.. does the project you launch have to be the active/open one? Aug 05 12:09:18 <_martin___> click the dropdown from the run icon and select a launch configuration Aug 05 12:09:40 <_martin___> clicking it might not launch the right project Aug 05 12:10:46 <_martin___> use window / preferences / run/debug / launching to tell eclipse to launch the most recent launched project Aug 05 12:11:08 <_martin___> then you can just click run or use control+f11 Aug 05 12:11:21 now my emu runs 2-3% too Aug 05 12:11:36 i guess it was because i ran all examples in AppDemos after eachother, and some didn't clean up after themselves Aug 05 12:12:17 <_martin___> if there's low resources android will go round killing things off Aug 05 12:12:44 <_martin___> but until then things that aren't cleaned up can cause problems Aug 05 12:25:34 meh gettign there :p Aug 05 12:25:38 (particles) Aug 05 12:28:49 Hey folks Aug 05 12:28:51 how can I cause my application to completly restart? Aug 05 12:29:05 programmatically? Aug 05 12:29:16 yes Aug 05 12:29:35 you shouldn't be doing it, but I believe System.exit() will kill it Aug 05 12:29:39 finish() Aug 05 12:29:42 @ the activity Aug 05 12:29:47 to kill it Aug 05 12:29:51 no finish() does not excatly what I want to do Aug 05 12:29:52 but dont know how to restart it Aug 05 12:30:08 is there a way to launch apps? Aug 05 12:30:08 why do you want to reschedule your app when it ends? Aug 05 12:30:12 KNY why should I don't do that? Aug 05 12:30:17 you could spawn a 2nd thread Aug 05 12:30:27 nm finish will kill it Aug 05 12:30:28 :p Aug 05 12:30:36 I set a new locale and I want my application to start in that new locale Aug 05 12:30:41 Strauch, because it's a terrible practice. I think you need to examine why you want to completely restart your app Aug 05 12:30:47 oh Aug 05 12:31:00 why not call your app's onResume method again Aug 05 12:31:12 the problem is as I understand, if i change the locale the configuration is changed Aug 05 12:31:34 but the on ConfigurationChanged Method is never called (as i tested with a log.v output on the debug console) Aug 05 12:32:13 onConfigurationChange will only get called for events you specify in configChanges (in the manifest), IIRC Aug 05 12:32:47 the problem is i managed it to get one button updated witzh the ew text but a have another activity in my applictaiton which texts are not updated, even if it newly started throught the program Aug 05 12:32:47 Strauch, http://developer.android.com/guide/topics/manifest/activity-element.html#config Aug 05 12:33:06 if a completly kill the app in the ddms and start it again the new langiage is everywhere in that app Aug 05 12:33:28 I have specified the locale tag in them manifest Aug 05 12:33:44 but the method is not called either Aug 05 12:34:39 so my exact question should be: How to implement a kanguage switcher, that updates the whole gui of my app Aug 05 12:34:59 but I don't expect complete solutions Aug 05 12:35:47 I tested the demo app with this locale thing that works the same way as mine, but it also doesn't provide a solution for switchign the kanguage without haaving to quit the application Aug 05 12:36:07 even worse because you don't habe this locale switcher on an actual phone, that you have in the emulator Aug 05 12:36:19 so hopefully you understand my point Aug 05 12:43:26 more ideas someone? Aug 05 12:47:36 Strauch, try asking on the android-developers google group Aug 05 12:47:43 it's more asynchronous than IRC Aug 05 12:49:23 ok thanks Aug 05 12:56:40 _Auron_: http://www.youtube.com/watch?v=kx_R0NCtwOM <= getting there :P Aug 05 12:56:45 particle-ish :P Aug 05 12:57:10 <_Auron_> cool Aug 05 12:57:53 m_CircleParticles.emit(new Vector2d(event.getX(), event.getY()), 1); Aug 05 12:58:44 this wont work (yet) for lets say a scrolling field though Aug 05 12:58:55 <_Auron_> scrolling field? Aug 05 13:00:08 for example you it emitting somewhere in the middle, but you have a gmae where you can scroll around (by sweeping) Aug 05 13:00:29 so x/y 50/50 should lets say become 25/25 - no way to enforce that atm offset atm Aug 05 13:00:34 ah well its a start :P Aug 05 13:06:01 my favorite use of particles: http://www.ben.com/nonexist Aug 05 13:07:25 heh Aug 05 13:07:38 that's really well done Aug 05 13:09:10 * _Auron_ did a nifty effect for Stroids's particle effects for his next update Aug 05 13:11:51 I have a text within a textview. If the text is larger then the screen it doesnt' get a scroller. Is the best approach to use ListView instead or use ScrollView with TextView inside? Aug 05 13:12:13 <_Auron_> I'm also adjusting the bullets to fire at a frame-independant rate so you're technically able to do a lot more damage (and this balances out better) Aug 05 13:12:49 <_Auron_> then I tweaked the player movement with the trackball so it allows for more fine-tuned movement (so you can get out of tight situations more easily) Aug 05 13:13:05 KNY: That guy's a crack programmer :-) Aug 05 13:13:41 _Auron_, nice. I've noticed that sometimes I'll move the ball a little bit and he'll go flying across the screen Aug 05 13:13:45 kroot, I can tell :) Aug 05 13:14:19 frez, use ScrollView Aug 05 13:14:58 okey, thanks Aug 05 13:31:57 how can i add moe than one "TextView" to a tab? Aug 05 13:32:13 basically adding content to the tab? Aug 05 13:37:42 anyone ever had problems with the org.apache.http.* package ? Aug 05 13:37:44 CallDrop_: make the tab a linearlayout and put 2 textviews in it Aug 05 13:38:31 What I'm experiencing is that a single http GET request hangs at some low level in the platform and I can't find any bugs filed about it Aug 05 13:39:01 BadPtr: works fine for me Aug 05 13:39:11 every other request I make are fine Aug 05 13:39:28 and this one is no different really Aug 05 13:39:37 "hangs" in what way? Aug 05 13:39:49 have you tried setting timeouts on it? Aug 05 13:40:03 oh and it happens only when I enable 2G only Aug 05 13:40:24 over 3G the same request ends gracefully Aug 05 13:41:13 and when I say it hangs... the stack trace for that thread shows that it's sitting at OSNetworkSystem.receiveStreamImpl Aug 05 13:41:39 line -2 Aug 05 13:41:40 heh Aug 05 13:41:42 you're not by any chance doing this while a phonecall is active? Aug 05 13:41:48 nope Aug 05 13:43:38 strange Aug 05 13:43:56 have you tried using wireshark or similar tool to see what is going on "behind the scenes"? Aug 05 13:43:58 oh well... it might be further than that as it seems that it's doing a native call there Aug 05 13:44:03 yeah I guess I should Aug 05 13:44:53 still... it's happening on a script request where other requests are known to complete ok Aug 05 13:45:03 it might have something to do with the response content I guess Aug 05 13:45:12 anyway... I'll sniff Aug 05 13:45:15 thanks :) Aug 05 13:45:32 no worries :p Aug 05 13:46:34 alright... I've restricted the output for that script and it works now Aug 05 13:46:38 strange Aug 05 13:48:51 <_Auron_> KNY: I also made the background plasma effect look a bit smoother Aug 05 13:50:08 <_Auron_> actually, quite a lot smoother Aug 05 13:51:34 hello folks Aug 05 13:52:03 hello super nintendo chalmers Aug 05 13:52:40 i have a question for you: i have this app developed in my eclipse project, the applicatin works properly in the emulator and now i want to create an apk for my own mobile (before thinking about publishing it). I haven't found an howto that explains how to create the package from the eclipse project. can anybody give me a reference please? Aug 05 13:56:00 eclipse is probably making an apk every time you compile it Aug 05 13:56:04 i use `ant debug` Aug 05 14:00:04 alright, I seem to have it narrowed down to a single '(' thats making it behave strangely Aug 05 14:02:24 hmmm maybe not Aug 05 14:03:53 maybe its a bad pointer Aug 05 14:04:07 * bnovc throws that in with the inevitably countless others Aug 05 14:04:42 hah Aug 05 14:04:44 good one Aug 05 14:05:02 oh well... might be that it's trying to send it chunked too Aug 05 14:14:25 seems to happen when the response is bigger than 1065 bytes or so Aug 05 14:14:53 which is not a limit you'd expect Aug 05 14:17:30 I have a textbox that I'm using for data output. When a user switches from portrait to landscape and visa versa, it clears the box. Is there a way to prevent this? Aug 05 14:18:10 I should be noted the box is populated during the activation of a listener Aug 05 14:22:41 bnovc: so where i would find the apk? Aug 05 14:23:04 :D Aug 05 14:23:05 _Auron_ any idea how to catch onKeyUp ? Aug 05 14:23:08 tishammer: cd ~/androidcheckout && find . -name \*.apk Aug 05 14:25:30 KeyEvent.ACTION_UP Aug 05 14:26:00 I override the onKeyUp @ GLSurfaceView Aug 05 14:26:07 but it doesnt get called on any key I press Aug 05 14:27:02 <_Auron|G1_> .. you don't want to process input in the opengl thread Aug 05 14:27:03 my text in a textView is coming from a sms push message, and every lineshift in the message appear as a square, anything I can do with that? Aug 05 14:27:26 http://developer.android.com/intl/zh-TW/reference/android/opengl/GLSurfaceView.html Aug 05 14:27:28 look @ bottom :p Aug 05 14:27:30 <_Auron|G1_> even though you can, you don't want to. trust me. Aug 05 14:27:31 alright... I had no timeout specified Aug 05 14:27:40 well I dont handle it there Aug 05 14:27:43 now that I have one... it works fine Aug 05 14:27:44 I put it @ a queue Aug 05 14:27:51 and then the gamethread processes it Aug 05 14:27:58 atleast thats how I've forseen it Aug 05 14:28:09 but the event doesnt get triggered Aug 05 14:30:30 whats the alternative method then _Auron_ ? Aug 05 14:30:55 anyone know of any open source games for android? one of the google IO talks mentioned he was making a game called "replica island" but i can't find the source Aug 05 14:33:07 <_Auron|G1_> the queued method might be more correct, but I process input events in the ui thread and save values to a global class Aug 05 14:33:48 I use 3 threads Aug 05 14:33:58 1 UI / 1 rendering / 1 'game' thread Aug 05 14:34:09 UI read Activity Aug 05 14:34:28 <_Auron|G1_> I found that to be slower Aug 05 14:34:37 ell the ui one isnt really used much Aug 05 14:34:44 except to set window title if needed :P Aug 05 14:35:36 meh onKeyUp doesnt get called @ all :( Aug 05 14:38:21 Auron, perhaps you can answer this question for me. I have a textbox that I'm using for data output. When a user switches from portrait to landscape and visa versa, it clears the box. Is there a way to prevent this? Aug 05 14:38:37 <_martin___> deekjx read up on the application lifecycle Aug 05 14:38:54 k Aug 05 14:38:56 thank you Aug 05 14:38:58 <_martin___> when the orientation changes your activity goes through onPause() and onResume() Aug 05 14:39:12 can someone tell me how to add a button to the bottom of a listview Aug 05 14:39:15 or can you? Aug 05 14:39:30 it does trigger the activity events Aug 05 14:39:36 I'll just do my catching there :P Aug 05 14:39:41 <_martin___> any local variables you're using will be gone, you need to specifically tell your textview to be repopulated Aug 05 14:41:35 jasongornall_: can someone tell me how to add a button to the bottom of a listview Aug 05 14:41:35 [10:39am] jasongornall_: or can you? Aug 05 14:42:55 <_martin___> well, I haven't done it before Aug 05 14:43:25 thanks martin Aug 05 14:45:34 do the keys in the emulator work for you guys? alt+enter takes me to an all black screen ic an't get out of and f11/f12 don't change orientation Aug 05 14:45:55 try num 7 / 9 Aug 05 14:45:59 (num lock disabled) Aug 05 14:46:06 atleast those work for me Aug 05 14:46:21 <_martin___> I thought it was control+f11 Aug 05 14:46:34 ctrl+f12 Aug 05 14:46:38 doesnt say so on the docs Aug 05 14:46:40 ya Aug 05 14:47:05 thanks Aug 05 14:52:35 jasongornall_: patience Aug 05 14:52:43 I don't know how to do it, but someone will show up. Aug 05 14:52:53 like I know you can add views Aug 05 14:53:01 like I added a textview no problem with this line Aug 05 14:53:07 remember, this is multiplayer notepad, and 95% of the population isn't actually looking at this channel. Aug 05 14:53:13 TextView tv = new TextView(this); Aug 05 14:53:13 tv.setText("Hello, Android"); Aug 05 14:53:13 Aug 05 14:53:14 ListView list=(ListView) findViewById(android.R.id.list); Aug 05 14:53:14 list.addFooterView(tv); Aug 05 14:53:22 ok stop Aug 05 14:53:27 please use a pastebin in the future Aug 05 14:53:44 k Aug 05 14:56:32 olol Aug 05 14:58:38 my text in a textView is coming from a sms push message, and every lineshift in the message appear as a square, anything I can do with that? Aug 05 14:59:08 <_martin___> sms messages can have newlines? Aug 05 14:59:33 it's written on a computer and sent to the phone Aug 05 14:59:42 it appears normal in the message inbox though Aug 05 15:00:11 <_martin___> try string,replaceall("\n","") or something similar to remove the newline chars? or, perhaps you can make your textview multiline Aug 05 15:00:19 <_martin___> those are both guesses not solutions Aug 05 15:01:00 I do want the lineshift, but I'll give it a try Aug 05 15:01:05 just to check the result Aug 05 15:01:27 what do you mean making my textview multiline? Aug 05 15:02:22 is there a good way to map opengl coordinates to normal coordinates? Aug 05 15:02:27 i wrote a function to do it, but it seems like it should be built in Aug 05 15:02:52 <_Auron|G1_> orthographical Aug 05 15:03:02 <_Auron|G1_> you're trying to do 2D right? Aug 05 15:03:45 yes, 2d Aug 05 15:03:58 the coordinate system in opengl is -1 to 1, whereas its 0 to 480 and 0 to 240 in android Aug 05 15:04:08 <_Auron|G1_> gimme a min, I'm not at the computer atm Aug 05 15:04:23 _martin___: I tried replaceing "\n" with "," and it doesn't look like the lineshift written on the computer is interpreted as "\n" Aug 05 15:05:48 <_Auron_> gl.glViewport( 0, 0, 480, 320 ); and gl.glOrthof( 0.0f, 480.0f, 320.0f, 0.0f, -100.0f, 100.0f ); Aug 05 15:07:49 _Auron_: ah, thanks. do you know of any good resources for android+opengl? it seems like they're very scarce Aug 05 15:08:13 mostly just scraping things from the api demo + normal opengl tutorials Aug 05 15:08:21 <_Auron_> that's about all you're going to find, unfortunately. Aug 05 15:08:43 one of the google IO videos said he was making a game that would be open source but i can't fnid it, so apparently he gave up on it Aug 05 15:08:44 <_Auron_> and honestly, there's some stuff about opengl in android that isn't documented that *should* be. Aug 05 15:09:01 <_Auron_> well I'm going to release my 2D opengl game engine next month Aug 05 15:09:27 bnovc, or it's just not out yet Aug 05 15:09:34 KNY: maybe but the video was months ago Aug 05 15:09:39 IIRC, he said he would open source it when it was done Aug 05 15:09:43 and no references to it online Aug 05 15:09:55 bnovc, if I was him, I wouldn't release it until after ADC2, at the least Aug 05 15:10:00 _Auron_: what all do most engines/yours provide? ive never really written games before... just have some downtime at work and was bored Aug 05 15:10:06 KNY: why? Aug 05 15:10:22 bnovc, because otherwise you'd get leeches just repackaging it and submitting it to ADC2? Aug 05 15:11:02 <_Auron_> bnovc: smart sprite object management from an atlas texture, particle system, text rendering, sound effect object management Aug 05 15:11:14 well if they change enough of it so that its not recognizable, then it seems fine to me Aug 05 15:11:18 <_Auron_> and once I start on my next game, wickedly fast tilemapping Aug 05 15:11:57 is there a way to determine how often onDrawFrame will be called or should i just redraw every time Aug 05 15:12:31 <_Auron_> you can set the renderer to RENDER_WHEN_DIRTY and tell it to render when you want to from a seperate thread Aug 05 15:13:28 apparently RENDER_WHEN_DIRTY isnt a very documented thing, as there are 0 google results for it Aug 05 15:14:30 so i could have a timer to redraw every 1/30th of a second or something? Aug 05 15:14:36 <_Auron_> sorry, RENDERMODE_WHEN_DIRTY Aug 05 15:14:42 * bnovc is just wondering if hes approaching this concept right Aug 05 15:14:43 <_Auron_> if you wanted to yes Aug 05 15:14:53 ... dirty ;D Aug 05 15:15:59 it just seems inefficient to redraw the whole screen all the time Aug 05 15:16:11 and re-run the gl.glViewport, etc. Aug 05 15:16:35 in the ApiDemos they clear the screen every draw Aug 05 15:16:43 <_Auron_> er, you only want to do initialization stuff such as setting viewport size in onSurfaceCreated Aug 05 15:17:10 <_Auron_> bnovc: I have found overhead that loses about 15FPS from calling the renderer from a seperate thread though, and I'm not sure why Aug 05 15:17:35 <_Auron_> not that it matters; I have to render as fast as possible for my game Aug 05 15:17:51 <_Auron_> so I only have UI thread and GL thread Aug 05 15:17:54 what kind of game are you making Aug 05 15:18:03 <_Auron_> have made; it's called Stroids Aug 05 15:18:13 <_Auron_> http://darkauron.dyshost.com/Android/Stroids for some screenies Aug 05 15:18:20 <_Auron_> it's on the market, full version and demo Aug 05 15:18:27 <_Auron_> released just two days ago Aug 05 15:18:31 i dont have hardware/the market app Aug 05 15:18:44 <_Auron_> ah Aug 05 15:18:59 cool though Aug 05 15:19:18 the company i'm working for is going to make an android phone, but i'm not officially on that team yet so i'm just sitting around learning it and such Aug 05 15:19:27 cause the phone i was working on is done :\ Aug 05 15:19:57 <_Auron_> http://www.youtube.com/watch?v=rkEfztqx8Is <-- vid from a few weeks ago of Stroids, though it has changed a bit since then. see screenshots from my previous link to see the menu Aug 05 15:20:17 bnovc: for the love of god please don't reimplement the android UI Aug 05 15:21:16 lov: i think they are Aug 05 15:21:41 there is no emoticon for how sad I am about this Aug 05 15:22:24 well i dont know how much they're changing but the home screen is completely different Aug 05 15:22:33 and we have our own theme Aug 05 15:22:36 imo it doesnt look as nice :( Aug 05 15:22:53 <_Auron_> ugh, if it ain't broke don't bother trying to fix it. especially if it's an entire OS UI Aug 05 15:22:56 _Auron_: heh, nice camera on phone action Aug 05 15:23:09 <_Auron_> :P Aug 05 15:23:25 well, they think making it more customized will make it stand out more than the other android phones Aug 05 15:23:44 oh well...as long as i get paid Aug 05 15:23:55 <_Auron_> er, just being an android phone is a big deal alone. Aug 05 15:24:04 <_Auron_> at this point anyways Aug 05 15:24:07 not really...tons of them coming out Aug 05 15:25:56 phone market is too competitive Aug 05 15:38:35 too competitive? go get an iphone Aug 05 15:41:33 _Auron_ at how much fps does your game run @ the emulator? Aug 05 15:43:06 <_Auron_> SinnerG: 29FPS if I'm not rendering anything at all. it's *EXTREMELY* slow Aug 05 15:43:22 <_Auron_> with a bunch of activity, 6 to 14FPS Aug 05 15:43:31 <_Auron_> while on device it's at least double the speed Aug 05 15:44:07 yeah they need to improve their opengliding @ the emulator :P Aug 05 15:44:41 anyhow, I got confirmation couple of hours ago, tomorrow evening I'll have my magic :) Aug 05 15:46:04 <_Auron_> cool Aug 05 15:46:13 the emulator uses our software GL stack Aug 05 15:46:24 its speed depends greatly on what exactly you do with GL Aug 05 15:46:36 but it runs Quake smoothly for me so it's not so bad :) Aug 05 15:47:12 know what parts of opengl es are the 'slowest' ? Aug 05 15:47:33 SinnerG: sending the buffers Aug 05 15:48:12 sammyF: not necessarily with the software renderer Aug 05 15:48:27 mm 1990s games used as reference points :) Aug 05 15:48:55 hehe Aug 05 15:50:43 romainguy_: true Aug 05 15:52:38 http://www.youtube.com/watch?v=z_nbsAwrejw particlish part 2 Aug 05 15:53:12 :P Aug 05 16:02:45 _Auron_: do you have classes like Player, Enemy, etc. and those have a .draw() called on them from your renderer? Aug 05 16:02:58 <_Auron_> bnovc: Actually, yes. Aug 05 16:03:17 <_Auron_> .updateAll() and .drawAll() Aug 05 16:04:51 so when you create textures, you do it in the renderer and then pass their handles into the objects? Aug 05 16:06:41 <_Auron_> I have sprite objects created in an Image class, and pass Image.spritename to those game objects Aug 05 16:07:39 <_Auron_> i.e. for (int i = 0; i < Particle.MAX_PARTICLES; i++) { sParticle[i] = new Particle( Image.particle, 8.0f, 8.0f ); } Aug 05 16:08:50 <_Auron_> a lot of my constructors and classes are very automated so there's little work to be done by the dev Aug 05 16:09:03 Image.particle is an int? Aug 05 16:09:13 <_Auron_> Image.particle is a Sprite object Aug 05 16:09:23 whats that contain besides an int to reference it Aug 05 16:09:41 e.g. the api demo does " int[] textures = new int[1]; gl.glGenTextures(1, textures, 0); mTextureID = textures[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID);" Aug 05 16:11:14 <_Auron_> sprite objects use my imgData class, which holds vital texture information (and when I make an imgData object, I load a texture into openGL memory). sprites contain U,V data to reference to a texture, allowing for multiple sprites to be used in the same texture image Aug 05 16:11:52 <_Auron_> for Stroids all of the images and text character images are all in one 512x512 PNG, which I load in openGL. each sprite object holds U,V coords to that texture to use when drawing Aug 05 16:12:24 <_Auron_> I should probably rename some of my classes so it makes a bit more sense Aug 05 16:19:48 _Auron_: U,V? Aug 05 16:20:18 <_Auron_> UV coordinates are texture coordinates. They're like X,Y coords, but go from 0.0 to 1.0 for textures Aug 05 16:22:01 oh Aug 05 16:22:11 <_Auron_> when I pass the imgData (texture) into a sprite when constructing a sprite, it holds the width and height of the texture. using that, I divide 1.0f by the width and 1.0f by the height, then multiply by whatever the desired topleft coordinate is for the sprite's image in the texture Aug 05 16:23:20 <_Auron_> to get the bottom right UV coords I do 1.0f / width * (x+width-1) and 1.0f / height * (y+height-1), width and height being the width and height of the sprite I'm making Aug 05 16:24:26 G mornin' everyone Aug 05 16:24:33 good morning minty Aug 05 16:24:56 _Auron_: i see. thanks for the help :) Aug 05 16:25:18 <_Auron_> vertex and texture data has to be stored in the buffer of course, but that's required for opengl drawing in openGL ES Aug 05 16:25:28 <_Auron_> buffers* Aug 05 16:25:32 <_Auron_> np Aug 05 16:27:17 its too bad that theres so little information/development going on with android/opengl, its eems Aug 05 16:27:21 *seems Aug 05 16:30:41 How do you set the alpha value for a button? Aug 05 16:31:47 _Auron_: to draw a background image, should I draw two triangles? Aug 05 16:32:08 <_Auron_> yeah Aug 05 16:32:48 bnovc: yes Aug 05 16:33:07 you can also use the GL11 extension to draw a texture directly Aug 05 16:35:09 ok thanks Aug 05 16:41:31 <_Auron_> although the GL11 extension does not support coloration/alpha, rotation, and is not supported by all devices Aug 05 16:44:14 err what you mean _Auron_ Aug 05 16:44:42 I draw textures using glDrawTexfOES Aug 05 16:44:51 true it doesnt have args for rotation Aug 05 16:44:58 but you can define an alpha channel for sure Aug 05 16:45:03 gl.glColor4f(1.0f, 1.0f, 1.0f, Alpha); Aug 05 16:55:49 <_Auron_> hmm I didn't think glDrawTexfOES was able to be colored Aug 05 16:56:42 <_Auron_> regardless, lack of rotation completely destroys its usefulness for Stroids Aug 05 17:02:10 is this chan about android hacking or just about android apps development? Aug 05 17:02:25 mmm, hello Aug 05 17:02:27 is this chan about android hacking or just about android apps development? Aug 05 17:02:30 better Aug 05 17:03:05 <_Auron_> android hacking is #android, android apps developing is this channel, offtopic is #android-offtopic Aug 05 17:03:17 _Auron_: ok, thanks Aug 05 17:03:32 <_Auron_> however if you notice the channel topic states "for Android Application Development" Aug 05 17:03:46 <_Auron_> just an fyi, channel topics usually designate what the channel is for Aug 05 17:03:58 _Auron_: yes, but i was not sure Aug 05 17:04:22 now i am Aug 05 17:26:52 _Auron_ care to share your texture rendering gl* lines? :) Aug 05 17:27:28 <_Auron_> I'm not giving out my game engine just yet :P Aug 05 17:27:34 meh :P Aug 05 17:28:09 <_Auron_> push matrix, transform, rotate, scale, draw, pop Aug 05 17:32:42 yeah got all that except 'draw' :P Aug 05 17:33:00 meh feeling tired Aug 05 17:33:36 meh Aug 05 17:33:37 might goto bed soon Aug 05 17:33:37 figure it out tomorrow :P Aug 05 17:33:38 stupid internetz Aug 05 17:33:42 lol Aug 05 17:33:44 I see myself talking Aug 05 17:33:45 :P Aug 05 17:34:12 I traveled in time! Aug 05 17:35:57 http://www.examiner.com/x-13006-SF-Events-Examiner~y2009m8d5-Skydivers-in-San-Francisco-filming-a-TMobile-commercial Aug 05 17:38:53 is there a hero rom floating around that works in the emulator ? Aug 05 17:42:46 <_martin___> wmealing1, try #android? Aug 05 17:44:09 oh, yeah.. sorry autojoin Aug 05 17:44:24 actually, this is to build tun.ko for my vpn project.. so i'm not entirely off th emark Aug 05 17:45:09 Hello all, I was wondering if someone could help me get the IMEI code from an Android device? I Googled it but the code I found doesn't seem to be working. In particular I was using this line of code: TelephonyManager mTelephonyMgr = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); --TELEPHONY_SERVICE cannot be resolved Aug 05 17:46:21 TELEPHONY_SERVICE is a constant on Context Aug 05 17:47:05 Ah! Aug 05 17:54:32 wmealing1: vpnc? Aug 05 17:54:37 wmealing1: or openvpn? Aug 05 17:54:40 vpnc Aug 05 17:54:51 damn. Aug 05 17:55:29 I've been working on openvpn for android Aug 05 17:55:33 wait... Aug 05 17:55:53 assuming root and the tun driver, it works quite well. I have a command line scriptedbackend for it but no ui yet Aug 05 17:56:05 noahdroid: steal from my project Aug 05 17:56:17 or better yet Aug 05 17:56:19 plug it into mine ! Aug 05 17:56:20 wmealing1: I'd be happy to! Aug 05 17:56:36 http://code.google.com/p/get-a-robot-vpnc/ Aug 05 17:56:40 I am still a bit of a java neophyte, the ui was going to be my first project Aug 05 17:56:46 excellent Aug 05 17:57:00 I will be furiously busy until this weekend but I'll take a look at it then Aug 05 17:57:06 * wmealing1 nods Aug 05 17:57:23 at the moment it _only_ does vpnc, but it doesnt mean it cant be modified Aug 05 17:57:27 right Aug 05 17:57:33 I'd love an all-in-one kinda thing Aug 05 17:57:35 was thinking of making an intermediary step Aug 05 17:57:45 between add vpn, and the settings Aug 05 17:57:51 noahdroid: really? I'd be willing to help test, aslong as you support certs Aug 05 17:58:05 oh yes, I don't use shared keys in practice Aug 05 17:58:14 so supporting certs are a given :-) Aug 05 17:58:24 L2TP was the next *cough* vpn *cough* that I was thinking about doing. Aug 05 17:58:52 but there should be enough code there to get you started Aug 05 18:01:07 wmealing1: I thought l2tp was in donut or something Aug 05 18:01:22 warewolf: i can't live in hope waiting for google to release. Aug 05 18:01:44 perhaps they will, perhaps they wont Aug 05 18:01:59 some people need it sooner than that. Aug 05 18:02:11 cyanogen has been backporting some of donut's vpn support into his custom roms Aug 05 18:02:29 I haven't played with it though because I am using openvpn lately Aug 05 18:02:29 the racoon binaries were not there when i tried his roms Aug 05 18:02:31 the ui was. Aug 05 18:02:34 but no backend Aug 05 18:02:43 yeah, it's not fully baked yet last time I read the forums Aug 05 18:03:15 but there was another public drop lately, so it might be in the later roms soon Aug 05 18:03:39 openvpn's a totally different beast, so I don't expect that to go into donut. it's not ipsec Aug 05 18:03:45 (although imo that's one of its advantages) Aug 05 18:03:59 its kind of annoying, as I'd been working on this project for a while.. Aug 05 18:04:14 im imaging that the vpnc part of the project may become pointless post 2.0 release Aug 05 18:04:26 does anyone know why a video view would repeat the video when I call a .finish() on its activity? Aug 05 18:04:34 it starts over from the beginning Aug 05 18:04:38 and then exits Aug 05 18:04:45 after it finishes the second play though Aug 05 18:04:47 *through Aug 05 18:04:48 well, there are often 3rd party apps to improve the ui experience for basic functionality anyway Aug 05 18:05:02 I wouldn't call it a wash. Especially if I can use it :-) Aug 05 18:05:53 burrito Aug 05 18:06:04 Why are you calling finish, do you want to stop the videoview from playing? Aug 05 18:06:31 way past bedtime, goodnight ladies, gents. Aug 05 18:06:54 hardly any ladies in here :-p Aug 05 18:06:58 Minty, I want to return to the previous activity Aug 05 18:07:07 I want to exit the video Aug 05 18:07:25 Try pressing the back button? Aug 05 18:08:41 in the ApiDemo's TriangleRenderer, why does it use the same values for the tex buffer as the vertex buffer? Aug 05 18:08:45 what a great suggestion, Minty Aug 05 18:17:34 just a quick question, do aidl interfaces act as wsdl's in the sense that if you need to add a new function, adding it at the end won't screw up the other calls in the aidl Aug 05 18:17:36 How often does the GC kick in on Cupcake when the phone is "idle"? Seems like I have mail and latitude running, and the GC keeps cleaning out megabytes pretty frequently. Aug 05 18:18:13 ravon, it kicks in whenever it's needed Aug 05 18:18:14 Seems to be 1 meg every 20 seconds Aug 05 18:18:51 KNY: The reason I'm asking is that this Donut build seems a tad slow compared to Cupcake, and the GC is working a lot even though the phone isn't doing much. Aug 05 18:18:58 Haven't logcat:ed Cupcake though. Aug 05 18:19:25 <_martin___> it shouldn't need to do garbage collecting whilst idle, should it? Aug 05 18:19:43 Well, it's not completely idle. Aug 05 18:19:50 Minty, the back button works fine, but I want it to automagically exit when the video finishes Aug 05 18:22:01 <_martin___> meanburrito920_, http://developer.android.com/reference/android/media/MediaPlayer.html#setOnCompletionListener(android.media.MediaPlayer.OnCompletionListener) ? Aug 05 18:22:37 _martin___, thats what I'm using currently :) Aug 05 18:22:44 meanburrito920_, are you calling release()? Aug 05 18:23:29 KNY, I was, but then when it went to play the video for the second time it threw errors about how the video player wasnt initialized Aug 05 18:23:44 can someone tell me how would i go about forcing my service to run even if the memory is low? Aug 05 18:23:52 <_martin___> you don't have the setLooping element to true do you? Aug 05 18:24:24 _martin___, unless that is the default, no. I don't touch it Aug 05 18:25:25 if i call release() it throws an illegal state exception Aug 05 18:25:55 meanburrito920_, call release() right before you finish() Aug 05 18:26:24 KNY, thats what I'm doing Aug 05 18:26:41 you shouldn't have an illegal state Aug 05 18:26:47 I'll pastebin Aug 05 18:27:10 meanburrito920_, have you studied that state chart on the mediaplayer docs? Aug 05 18:27:27 androoid: you can't. Aug 05 18:27:41 I've looked at it but not in a lot of detail Aug 05 18:27:56 meanburrito920_, that and the table below it will tell you why you're getting an ISE Aug 05 18:28:14 http://pastie.org/572898 Aug 05 18:30:01 meanburrito920_, you're releasing it twice, aren't you? Aug 05 18:30:11 how so? Aug 05 18:30:25 I was only using the finish() before Aug 05 18:30:33 ctate; i got this app i'm making that gets a gps location every 5 min, and i got it running in a service. it would stop retrieving a gps location after a couple of days of running the app... is there a way to make it keep running? Aug 05 18:30:37 if I hit back, it will release it, and I believe that once it's released, it calls onCompleteListener() though I could be wrong Aug 05 18:31:00 androoid, don't worry, the battery won't last a couple of days ;-) Aug 05 18:31:06 androoid: is the service actually no longer running, or is it just not getting GPS results any more after that time? Aug 05 18:31:06 KNY, but if I hit back, everythign works fine. I had to put in the key listener there because otherwise that wasrepeating too Aug 05 18:31:13 ah Aug 05 18:31:14 i suspect it's the latter -- i am told that we have a known bug around that issue. Aug 05 18:31:25 ctate; not getting the GPS results Aug 05 18:31:40 the GPS location would pretty much stop updating Aug 05 18:31:42 then it's definitely a bug around GPS, not an issue of service livetime Aug 05 18:31:44 life* Aug 05 18:31:54 meanburrito920_, I would say that you need to step through your flow again and figure out where you're deviating from the allowed path Aug 05 18:32:23 the thing I find especially s trange is that if i put two finish()es down, it doesnt do anything different than one Aug 05 18:33:46 why would it? Aug 05 18:34:23 because the first finish should cause the second finish to fail, because there would be no activity to finish Aug 05 18:34:38 it's not a blocking call, IIRC Aug 05 18:34:58 finish() doesn't behave like System.exit() Aug 05 18:35:09 KNY, even stranger is the fact that If I just have the .release() hwen the video ends, that works fine, it gives me a blank video screen. its not until I press the back button (which calls finish()) that the whole thingfails Aug 05 18:35:22 meanburrito920_: finish() schedules the event with the activity manager, you can schedule multiple of these events but the y will just be ignored Aug 05 18:35:29 ah. but even non blocking, the resources should have expred Aug 05 18:35:35 oh Aug 05 18:35:36 ok Aug 05 18:38:16 <_martin___> to stop database leaks, is it advisable to open and close the database every time it's used (if it's not too often) or is simply making sure it's closed before opening any other activities / closing enough? Aug 05 18:38:42 <_martin___> or should the opening and closing be handled in the helper class on each method? Aug 05 18:39:10 someone using dev-util/android-sdk on Gentoo? Aug 05 18:42:03 martin: why not to close the db onDestroy() ? Aug 05 18:42:11 tessarakt, jo Aug 05 18:42:22 pskink: well if multiple activities needa ccess to it that wouldnt be very efficient Aug 05 18:42:25 SiO2: ok, no problem with that Aug 05 18:42:36 but is there an ebuild for the eclipse ADT, too? Aug 05 18:42:37 nor would it work :) Aug 05 18:42:44 nope. Aug 05 18:43:21 tessarakt, denk dran, daß die doku unter /usr/share/doc landetm, und nicht im sdk drin bleibt (ich hab ewig gesucht) Aug 05 18:43:38 KNY, if you look at the error here: http://pastie.org/572910 you will notice that reset() is getting called. is this standard, because I dont see it in the diagram? Aug 05 18:43:51 SiO2: hab Useflag doc nicht an Aug 05 18:44:02 aber mir geht es um das Eclipse-Plugin Aug 05 18:44:12 jo, musste halt runterladen Aug 05 18:44:58 danke für den tollen Tipp Aug 05 18:45:00 wobei eclipse unter gentoo irgendwas mit updates deaktiviert hat Aug 05 18:45:07 und dann im User-Profil installieren? Aug 05 18:45:13 SiO2: ja, eben Aug 05 18:45:20 lokal installieren ist doch eh scheiße Aug 05 18:45:33 wieso? kannste ja nach /opt kloppen Aug 05 18:48:46 more unusualness: if i make any change to the mediaController, it promptly forgets those changes when it goes to play again. Aug 05 18:49:27 its almost as if finish() is causing the activity to restart... Aug 05 18:49:51 um Aug 05 18:50:00 finish() kills the activity Aug 05 18:51:16 _martin___: from looking at the sources, it seems google just closes the database immediately after usage for some cases Aug 05 18:51:22 KNY, right so how is the activity effectively restarting the first time I kill it, then dying at the end of that round through the video without hitting the call to finish() again. I debugged it and thats what is happening Aug 05 18:51:25 but when contentproviders are involved, the database stays open indefinitely (they never really close it) Aug 05 18:52:08 KNY, my code is entirely within the pastebin i put up. do you have any examples i could compare it to? Aug 05 18:52:29 I couldnt find anything in the api Aug 05 18:52:35 _martin___: but it does seem that SQLiteDatabase itself has reference counting, and it closes the database when the reference count reaches 0 Aug 05 18:53:37 when this reference counter increases? Aug 05 18:53:38 also, i find it strange that the error message i pastebinned didnt originate from my code. there was a message pass somewhere along the line Aug 05 18:53:39 but the reference counting doesnt make a lot of sense to me as far as making sure close() gets called Aug 05 18:53:56 because it only seems to acquire and release references in certain critical blocks inside of the sqlite machinery Aug 05 18:54:14 so its probably just designed to guard against failure Aug 05 18:55:07 so actually i cannot see how exactly databases opened with a ContentProvider actually get closed. very curious Aug 05 18:55:39 oh wait here we go. SQLiteDatabase#finalize does it Aug 05 18:56:03 so it would be safe to just leave your SQliteDatabase handle open for all your activities to share, and let the garbage collector deal with it when the app has "exited" Aug 05 18:56:23 "for all your activities to share" sounds like hey, contentprovider :) Aug 05 18:56:42 ctate: agreed, however ContentProvider can be very heavy machinery to put in place for simpler tasks. Aug 05 18:56:48 yeah Aug 05 18:57:26 but if you don't close() you will see warning in logcat - probably froM that finalize() method Aug 05 18:57:53 pskink: no, you won't. the warning is only displayed if the sqlitedatabase itself has any open programs (closeable objects) Aug 05 18:58:02 in other words, if you have a cursor off the database you never closed Aug 05 18:58:08 s/in other words/for instance/ Aug 05 18:58:20 ok, isee Aug 05 18:58:26 always remember to close your cursors, btw :) Aug 05 18:59:20 pskink: nevermind, you are right. it prints the warning in either case, just a different one if you have open programs Aug 05 18:59:36 pskink: but i have never seen this message printed personally, so i wonder exactly how this is working Aug 05 19:00:02 pskink: you can see it plainly that most content providers do not ever close the database they open. the sqliteopenehlper doesnt seem to close it either, so the only way it can get closed is through SQLiteDatabase#finalize? Aug 05 19:00:14 speaking about sqlite: did anyone try glob statement? Aug 05 19:01:51 also, Activity.startManagingCursor() can be your friend :) Aug 05 19:01:55 ofh content provider luves thru the entire lunux process so db doesn't have to be closed Aug 05 19:02:27 pskink: contentprovider is not spceial in that regard. Aug 05 19:02:44 if you simply had a singleton database object you would have achieved the same effect. Aug 05 19:03:19 i think it is: it never is onDestroy()ed Aug 05 19:03:48 ok, u r rignt Aug 05 19:04:12 that it doesn't have an onDestroy seems like a bug to me actually. this is why you cannot close the database handle. Aug 05 19:04:45 how can you force eclipse to rebuild the resource files when you update strings.xml? Aug 05 19:06:43 the ADT would automatically do that... Aug 05 19:06:57 you probably have an error in your resources (perhaps in that xml file?) which is preventing R.java from being regenerated Aug 05 19:07:05 check for build errors. Aug 05 19:07:50 no, it's rebuilding but it's not doing it right away Aug 05 19:07:51 imho content provider starts its life when any of its method is called (query, delete, update) and never dies - till the linux process dies, am i right? Aug 05 19:08:02 I've noticed that on a mac eclipse is sloooooow Aug 05 19:09:01 whaledawg, I don't think that's limited to mac .. Aug 05 19:09:23 well it was way better on Linux. Aug 05 19:09:31 I haven't tried with windows Aug 05 19:10:45 on linux, sometimes when using eclipse i feel i'm getting older too Aug 05 19:11:13 linux's big advantage relative to OSX is usually that the file system is much, much faster Aug 05 19:12:13 ctate, which file system? ext*? Aug 05 19:12:27 raiserfs? Aug 05 19:12:39 Yes. Aug 05 19:12:43 :) Aug 05 19:12:49 HFS+ is quite slow Aug 05 19:14:17 <_martin___> jasta, thanks. would the reference counting be the reason that in the notepad example the database helper class uses a static sqlitedatabase... so more than one thing can access it? Aug 05 19:17:30 suppose i have >100k rows with one string column - with index on that column in my db - why like statement (column like 'abc%') doesn't use the index thus being so sloow? Aug 05 19:20:43 _Auron_: i tried doing the glViewport and glOrthof in onSurfaceChanged but everything still seems to use 1 to -1 Aug 05 19:21:34 glViewport has to be the display size Aug 05 19:22:06 <_Auron_> bnovc: ah. gl.glViewport( 0, 0, 480, 320 ); gl.glMatrixMode( GL10.GL_PROJECTION ); gl.glLoadIdentity(); gl.glOrthof( 0.0f, 480.0f, 320.0f, 0.0f, -100.0f, 100.0f ); gl.glMatrixMode( GL10.GL_MODELVIEW ); gl.glLoadIdentity(); Aug 05 19:22:09 <_Auron_> try that. Aug 05 19:23:15 <_Auron_> I forgot you need to switch the matrix mode when changing the screen output Aug 05 19:24:03 i made an image class that takes a float[] for vertices, tex vertices, and an int for the resource id and then has a draw(GL10) function. does that sound like a basic version of what you do with your sprites? Aug 05 19:24:26 the additional glMatrixMode calls didnt modify it Aug 05 19:24:30 perhaps i have some conflicting code Aug 05 19:24:56 <_Auron_> you also need the code in onSurfaceChanged Aug 05 19:25:19 that's where i have it Aug 05 19:25:22 (only there) Aug 05 19:25:26 <_Auron_> but that's the exact code I have; I even use a modified bit of it for flipping the screen in Stroids (in latest update I just pushed, 1.0.2) Aug 05 19:25:32 i believe i got it Aug 05 19:25:40 <_Auron_> oh. you need it in onSurfaceCreated mainly. heh. Aug 05 19:28:21 i believe onSurfaceChanged is called immediately Aug 05 19:28:54 maybe not Aug 05 19:29:14 _Auron_: that will only modify the coordinates i use for the vertices...not for the tex stuff, right? Aug 05 19:29:42 <_Auron_> correct Aug 05 19:30:38 <_Auron_> texture data goes to uv coords goes to vertex coords goes to screen coords Aug 05 19:31:41 well modifying the coordinates caused the screen to go black, so maybe thats some accomplishment Aug 05 19:32:48 ah, if i comment out "gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity();" in my onDrawFrame(), then it draws correctly but it flickers Aug 05 19:35:14 http://bnovc.pastebin.com/m22162165 Aug 05 19:43:08 _Auron_: do you use -1 to 1 or do you use something like this? Aug 05 19:59:57 how do i draw 2 bitmaps at the same screen coordinates? Aug 05 20:00:03 im using canvas.drawBitmap Aug 05 20:00:37 fangus: can you be more specific about what problem you are encountering? Aug 05 20:00:43 doesn't sound like it would be difficult do to this at all Aug 05 20:00:47 yea Aug 05 20:00:49 it shouldnt Aug 05 20:01:03 so bascially i ahve an itemized overlay, which displays on top of a MapView Aug 05 20:01:19 so i called 2 methods: Aug 05 20:01:27 canvas.drawBitmap(bmp1, x, y, paint); Aug 05 20:01:36 canvas.drawBitmap(bmp2, x, y, paint); Aug 05 20:01:50 and it ends up replacing bmp1 wit hbmp2, but i want bmp2 to display over bmp1 Aug 05 20:02:44 does bmp2 have transparent regions? Aug 05 20:02:49 probably not. Aug 05 20:03:25 if bmp2 is smaller than bmp1, shouldnt bmp1 also be showing? Aug 05 20:06:20 fangus: not if youre asking it to stretch. Aug 05 20:07:05 read the documentation for drawBitmap carefully Aug 05 20:17:02 My App creates an ANR because of an operation that is parsing a 13k line text file. How can I keep the program responsive so that the ANR does not occur? I placed the programs operation into its own thread. Do I need to seperate the database/text parsing into another thread? Aug 05 20:17:17 or do i have to build a service Aug 05 20:18:51 deekjx: are you sure you arent blocking the main thread? Aug 05 20:19:05 you say you placed the operation in a separate thread, but you must still be blocking the main thread somehow Aug 05 20:19:12 also, why on earth are you parsing a 13k text file on the device? Aug 05 20:19:40 let me rephrase. The oncreate just start the main thread. That thread does everything. Aug 05 20:20:36 im not sure i follow you. typically we refer to the main thread as the common thread shared by android components Aug 05 20:20:38 quick question, if I pass an aidl interface used as a callback as a parameter to another aidl interface, will the callback be called in the main/UI thread? Aug 05 20:20:43 that thread cannot be blocked Aug 05 20:21:10 herriojr: you mean to a service? Aug 05 20:21:49 okay, the main thread is doing the processing of the text file. This blocks the users input till the operation is complete. Aug 05 20:22:11 herriojr: you're just trying to do async service callbacks right? that will not block bceause each binder transaction is held in its own thread. Aug 05 20:22:15 but you will need to be thread-safe. Aug 05 20:22:25 deekjx: and this is broken -- do not do that. Aug 05 20:22:27 jasta: that's what I was trying to figure out Aug 05 20:22:49 deekjx: you could produce a progerss dialog while youre "working", parse the text in another thread, then dismiss when finished Aug 05 20:22:53 jasta: whether when the callback gets executed, will it run in the UI thread of the calling activity or in its own thread Aug 05 20:22:54 deekjx: refer to the documentation on AsyncTask Aug 05 20:23:10 jasta: thanks Aug 05 20:23:16 sweet thanks Aug 05 20:23:21 herriojr: any communication marshalled via AIDL is performed in a binder thread Aug 05 20:24:02 this imposes thread safety considerations. Aug 05 20:24:32 for instance if you had a PlaylistService with pause and play methods, two separate bound activities could potentially call pause at the same time Aug 05 20:24:38 so you need to synchronize them away from each other Aug 05 20:25:02 yes, I was mainly talking on the activity-side of things Aug 05 20:25:10 well the activity has the same issue :) Aug 05 20:25:32 so make sure you are synchronizing properly Aug 05 20:25:39 yeah, I'll do that Aug 05 20:25:39 thanks Aug 05 20:25:54 jasta: these is exactly what I needed, you rock Aug 05 20:26:11 these=this Aug 05 20:26:28 hello all. have a question, and feel free to tell me to go elsewhere. I'm a comp sci student and haven't coded in Java before. I'd like to play around with writing for my android phone. Is it a good idea to just dl the sdk and start trying to code very simple things, or should I go learn java better then come back? Aug 05 20:27:49 leprasmurf: it's up to you Aug 05 20:27:56 leprasmurf: however you learn best Aug 05 20:28:15 While we're on the topic of threads, I have a question about that. I have a local NetworkService which performs network transactions in a background thread, and while doing so alerts it's listeners of the transaction starting, receiving data, and finish. Does it make sense that those calls to the listeners be happening in the network thread, I'm thinking not since the listeners processing... Aug 05 20:28:17 ...in response to alerts occur before we can begin the next n/w transaction in the queue. Aug 05 20:28:47 herriojr: my main question is, will I be completely in over my head by diving into the SDK or will I be able to learn java and android at once? Aug 05 20:29:36 <-- beginner java programmer. I read a book on java. I think it lacked to much detail. Then I started trying to wrtie my own apps. Applying the knowledge works best. I would say you will have an easier time of it if you understand object oriented programming. I don't have a handle on that and thats where I struggle the most Aug 05 20:30:15 leprasmurf: if you know how to program, you can program in any language as long as you learn the semantics Aug 05 20:30:22 thanks deekjx, I've had some exposure to oo design, so I have the fundamentals, hopefully that'll help then Aug 05 20:30:47 herriojr: I heard that when I was talking about my algorithm analysis class Aug 05 20:31:18 alright, think I'll give it a go tonight. thanks! Aug 05 20:31:27 within reason Aug 05 20:31:29 i'm sure it will. I've coded in C and C++ but i've never dealt with OO till now. Aug 05 20:31:51 it's a real pain to write straight iterative code in Lisp, for example, or to do certain kinds of things in Prolog Aug 05 20:31:54 :) Aug 05 20:32:21 leprasmurf: I'd suggest learning about inheritance in java if you haven't dealt with it before Aug 05 20:33:29 herriojr: I think I dealt with inheritance in .NET...but I think it was callled...uhh...I don't remember...basically talking about mammals as a class, and horses as a sub class of mammals Aug 05 20:33:44 herriojr: that about what you're referring too? Aug 05 20:33:46 .NET? Did you do C# or C++? Aug 05 20:33:55 jasta: Any info on my above question by chance? Aug 05 20:34:22 herriojr: my previous classes were c++, then I did .NET which had vb and c# Aug 05 20:34:44 C# is pretty much a ripoff of java, so if you know it, java shouldn't be too hard Aug 05 20:35:19 Hi, I'm trying to flash a Hero ROM onto my HTC magic, but on reboot it keeps hanging at "HTC Magic".. anyone have any clues as to why this is happening? Aug 05 20:35:28 herriojr: I was rather dissappointed with that class though, we had to do everything in visual studios :-/. felt like I was cheating on vim Aug 05 20:35:32 ruiwen: /join #android Aug 05 20:35:48 herriojr: ok Aug 05 20:36:17 leprasmurf: well, in the real world, whatever environment makes your life the easiest for getting your job done is what you want to use Aug 05 20:36:24 or rather IDE Aug 05 20:36:38 if it is VS, so be it Aug 05 20:37:48 herriojr: yeah, suppose so. I did use code::blocks for c++ so I guess I shouldn't complain. Aug 05 20:37:52 Hi, is there a way to fire up Maps to show a route? I know that I can use Intent.ACTION_VIEW with "geo:" to show a specific point, but what about a route? Aug 05 20:38:15 alright, well thanks. I'll give it a try and see if I can get a ball bouncing by the end of the night :-) Aug 05 20:38:15 ccmas: have you checked the docs? Aug 05 20:38:36 actually yes, did I miss something? Aug 05 20:38:52 I don't necessarily want to use a MapView, but rather fire up the Maps app Aug 05 20:39:10 herriojr, Maps isn't OSS and, thus, not very well documented Aug 05 20:40:02 KNY: I was just making sure some type of search was done first ;) Aug 05 20:40:12 ah Aug 05 20:41:13 so, well, yes I did quite some searching on this :) any pointers how this can be done? Aug 05 20:41:55 ccmas, perhaps yank the Maps apk and look at their manifest? Aug 05 20:43:01 KNY: thanks for the hint! So, the easier way seems to be to use MapView in my application directly Aug 05 20:44:08 ccmas: you might also be able to check logcat to see if you can get such an intent to fire Aug 05 20:44:57 ccmas: and just replicate their intent Aug 05 20:46:15 I wish that you could dump all the intents that an application responded to Aug 05 20:46:23 like you can with permissions Aug 05 20:46:51 thanks for all your help, I will report back when I find a solution. hoped there was a standard way ... Aug 05 20:49:32 KNY: I'm suprised they don't have it in PackageInfo or one of it's members Aug 05 20:49:58 herriojr, I guess that exposing intents would be pointless unless the developer guarantees that the API is stable Aug 05 20:50:06 and if it was, they would document it somewhere Aug 05 20:53:30 hmm Aug 05 20:53:39 just wanted to install ADT in Eclipse Aug 05 20:53:42 Unsatisfied dependency: [com.android.ide.eclipse.adt.feature.group 0.9.1.v200905011822-1621] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.wst.xml.core/0.0.0 Aug 05 21:14:05 well you could try using motodev Aug 05 21:23:39 What happens when you unpublish a apk that was copy protected and then publish the same apk without copy protection again? Might this result in errors on the users side? Aug 05 21:26:06 my application is closing automatically when the screen dims and i don't see any applicable error in ddms Aug 05 21:26:09 heres the output http://bnovc.pastebin.com/m22f65ddd Aug 05 21:26:19 i just get "WIN DEATH" Aug 05 21:37:13 When I call and AsyncTask, How do I call the progress indicator. I set up the task with a onProgressUpdate Aug 05 21:37:24 bnovc: what do you mean by "closing automatically"? Aug 05 21:37:52 when the screen dims, your activity is paused. Aug 05 21:38:02 are you not handling pause cleanly, perhaps? Aug 05 21:39:21 [the system also reserves the right to *stop* your activity when the screen dims, too] Aug 05 21:41:04 oh! Aug 05 21:41:08 * ctate | 08-05 21:24:57.745: INFO/ActivityManager(563): Low Memory: No more background processes. Aug 05 21:41:25 bnovc: your app was killed to free up memory. Aug 05 21:41:57 (looks like) Aug 05 21:51:52 deekjx: publishProgress() Aug 05 21:55:21 I have that in the doInBackground Aug 05 21:55:24 hey Aug 05 21:55:33 I think my problem is I'm not calling it right Aug 05 21:55:36 is it possible to disable a user's ability to scroll in a scrollview? Aug 05 21:56:30 If I try to call it with .execute, The compiled doesn't like it. If I call it with .doInBackground it likes it but when you re the program, it never shows the progress bar Aug 05 21:57:25 deekjx: if you call doInBackground() directly you're not creating a thread Aug 05 21:57:39 you have to call execute() Aug 05 21:57:59 deekjx: and you have to override the progress update method to update your progress bar Aug 05 21:58:03 it doesn't do it for you Aug 05 21:59:18 thank you Aug 05 22:08:53 I see what happened. i created a doInBackground. The IDE also created one with an override. Aug 05 22:09:29 so I was calling my method directl, since I didn't use .execute() Aug 05 22:10:02 .execute uses the @Override version of the doInBackground Aug 05 22:10:22 So how do I pass to two strings into my AsyncTask? Aug 05 22:11:11 execute("s1", "s2") Aug 05 22:11:31 doInBackground takes a list of arguments Aug 05 22:11:40 you can send as many as you like Aug 05 22:17:13 :-) Aug 05 22:26:00 * ctate <3 AsyncTask Aug 05 22:37:05 ctate: thank romainguy for it ;) I believe he said he wrote it Aug 05 22:39:55 is it possible to make a scrollview that can't be scrolled by the user Aug 05 22:40:11 I want the screen to slide up Aug 05 22:42:10 you could intercept touch events Aug 05 22:42:13 and ignore them Aug 05 22:42:33 I have a listview which I add items to one at a time while parsing an XML file... I set an onItemClickListener to the list, but it doesnt seem to work while the list is being populated Aug 05 22:43:02 Rexxars: can you elaborate? what does "doesn't seem to work" mean to you? Aug 05 22:44:18 well, I set a Log.e call in the onclicklistener, but it doesnt fire.. I suppose cause the the UI thread is busy (although I thought the background processing would be the tought part, and thats threaded...) Aug 05 22:44:39 anywho, I was actually wondering what the best way would be to add a progress indicator "over" the list Aug 05 22:44:50 Rexxars: a progressdialog. Aug 05 22:45:20 doh :) Aug 05 22:45:22 thanks :) Aug 05 23:03:24 herriojr: ping Aug 05 23:03:35 ctate: what's up? Aug 05 23:16:56 <_martin___> a cursorindexoutofboundsexception is thrown when you try to access a column that doesn't exist in the cursor? Aug 05 23:17:43 okay, I'm confused about AsyncTask. From the debugger I can see my data being passed into it. I never see the progress bar and before my data is done processing, the thread I called it with moves onto trying to display datat thats not done processing. Aug 05 23:18:18 sounds like you aren't waiting for onPostExecute() Aug 05 23:18:47 remember, it's asynchronous -- the calling thread does *not* wait for doInBackground() to finish Aug 05 23:20:07 interesting, makes sense. Then my problem is not the waiting but how can I get the Asyncronous thread to post its results to an edit text box thats in the main thread? Aug 05 23:20:27 just re-define it in the async thread? Aug 05 23:20:52 you should read the documentation on AsyncTask Aug 05 23:21:11 its onPostExecute() method is called on the main thread once the doInBackground() work has finished Aug 05 23:22:43 thank you, I skipped the onPostExecute becuase the stuff i wanted to do was in the main thread. I'll move that stuffinto the on Post Execute() Aug 05 23:23:06 you will see from the docs that onPostExecute() runs on the main thread :) Aug 05 23:24:10 <_martin___> "CursorIndexOutOfBoundsException: Index -1 requested, with a size of 1" <-- I don't understand why I am getting this when there is definitely data in the cursor, and column index I'm accessing definitely exists in it Aug 05 23:24:45 hey, does any1 else have problems with blurry font using canvas.drawText Aug 05 23:24:59 did you movetofirst? Aug 05 23:25:23 <_martin___> does a cursor not automatically point to the first element when a db is queried? Aug 05 23:25:25 thanks @ctate. I do see and understand that now. Aug 05 23:26:00 <_martin___> I've always just done a query then while(cursor.moveToNext)... Aug 05 23:26:16 _martin___: it starts at row -1 Aug 05 23:26:39 yeah, doing while(cursor.moveToNext()) is the right sort of idiom Aug 05 23:26:51 <_martin___> ah, so the first time I call that it moves away from the -1 index Aug 05 23:26:57 <_martin___> so I get my first bit of data Aug 05 23:27:01 it ensures that you've advanced the cursor *to* the first returned record, etc. Aug 05 23:27:23 ahh, lol, now I see why my progress bar wasn't called, lol, I call it from the onPostExecute Aug 05 23:27:43 ha ha Aug 05 23:28:01 <_martin___> so in the first loop of the while(cursor.moveToNext) it moves to the first one which means using that method doesn't need moveToFirst, but when I'm only accessing one element I need to do it manually, right? Aug 05 23:28:13 deekjx: this is exactly what publishProgress() and onProgressUpdate() are for! Aug 05 23:28:17 <_martin___> as the cursor.moveToNext returns true but also moves on one Aug 05 23:28:32 I used those but I never see the progress bar Aug 05 23:29:19 It even updates the percentage. Never displays in the UI. It let add the onPost first and see where I'm at Aug 05 23:35:01 deekjx: onProgressUpdate() is where you should update the UI to indicate that something's happening Aug 05 23:41:11 does anyone know how to resolve the blurry font used with canvas.drawText? Aug 05 23:44:03 fangus: use TextView :) Aug 05 23:44:43 @octate: http://bnovc.pastebin.com/m1bf76b33 shows my async task Aug 05 23:46:04 I need the onPostExecute to dump the string from the doInBack.. to an EditText box on the UI thread Aug 05 23:46:50 deekjx, you could do it from onPostExecute() too Aug 05 23:46:52 basically I'm passing a two strings, one is really a text file with data seperated via newlines. the other is a search string Aug 05 23:47:54 how? by re-defining the edit text box in onPostExecute? and then using the setText there? Aug 05 23:49:16 i'll try redefining the edit textbox Aug 05 23:51:13 yeah, or using a member variable ... Aug 05 23:58:53 thank you kny Aug 05 23:58:58 no problem Aug 06 00:16:27 i dont feel like working today Aug 06 00:16:40 sigh Aug 06 00:18:10 jasta: work sucks :( Aug 06 00:18:35 _avatar: are you responsible for the Amazon.com app? Aug 06 00:18:50 jasta, isn't it 5:18 your time? go home! Aug 06 00:19:25 traffic is bad Aug 06 00:19:32 true Aug 06 00:31:07 lol, its 8:31pm here Aug 06 00:32:02 I don't code for a living (that should be obvious) but I do end up working late. Nature of the beast Aug 06 00:32:59 Anyone know why the android:layout_marginBottom won't work on a TableLayout? Aug 06 00:33:17 or any margin for that matter Aug 06 00:41:42 Amorgos: layout margins do work. Aug 06 00:41:45 you must be confused. Aug 06 00:42:33 i know they do. Aug 06 00:42:57 But I have a very simple layout here, two table layouts withint a linearlayout Aug 06 00:43:16 and the margins on those TableLayout's are not working Aug 06 00:43:27 *within Aug 06 00:44:36 can you show us the layout? Aug 06 00:44:52 sure one sec. Aug 06 00:47:05 the file is a bit big. can i dcc it to you? Aug 06 00:58:54 * jasta waits the 10 years it takes to dexopt a new image Aug 06 01:04:55 is it safe to put acquiring a wake lock in onCreate and releasing in onDestroy in a service? Aug 06 01:10:32 herriojr: uhhhhhhh... why? Aug 06 01:12:10 ctate: I guess the better question should be, does the service automatically shut down after it is no longer in use, or do I need to explicitly call stopSelf()? Aug 06 01:12:27 you need to read the docs on this Aug 06 01:12:31 kk Aug 06 01:12:39 once startService() is called, the service will run forever until stopped Aug 06 01:12:48 alright Aug 06 01:13:11 but read the docs Aug 06 01:13:15 will do Aug 06 01:26:22 Is there a way to specify a textstyle of "all caps" or "small caps" in an android textview? Aug 06 01:27:07 I want some of my headers to be in caps, but would like to avoid manually converting my text resources and code to do it Aug 06 01:27:12 why do i have to work with files as streams :( Aug 06 01:27:20 setTransformationMethod() Aug 06 01:27:33 android-dev: setTransformationMethod() Aug 06 01:28:12 elprespufferfish, how else would you do it? Aug 06 01:28:39 I think elprespufferfish is coming from a C/C++ background Aug 06 01:28:47 ah Aug 06 01:28:48 where files are not streams? Aug 06 01:28:51 as a normal filewriter, that i can buffer, and read as lines Aug 06 01:28:51 yeah Aug 06 01:28:55 uhm, what? Aug 06 01:28:58 elprespufferfish, Buffered* Aug 06 01:29:02 files are treated as streams in C and C++ Aug 06 01:29:07 i agree that java I/O is pretty strange Aug 06 01:29:10 file I/O Aug 06 01:29:27 ctate: really? i don't necessarily think so Aug 06 01:29:29 it's a lot of wrapping, that's for sure Aug 06 01:29:40 yeah, thickly layered Aug 06 01:29:41 herriojr: nice, thanks. Is there a way to do that in the xml, or just via java? Aug 06 01:29:47 ctate: that makes it correct. Aug 06 01:30:00 especially if you want to do structured access Aug 06 01:30:01 android-dev: AFAIK you can only do it via java Aug 06 01:30:19 android-dev: but it wouldn't be the first time I've been wrong Aug 06 01:30:40 oh hey, i've been showing up as "android-dev" for weeks now? Aug 06 01:30:51 * android-dev needs to figure out how to set his username back to "emmby" in adium Aug 06 01:31:05 /nick Aug 06 01:31:15 he may need to identify first Aug 06 01:31:24 nickserv will prompt Aug 06 01:31:41 testing Aug 06 01:31:50 brb Aug 06 01:31:50 testing Aug 06 01:32:01 KNY: well....ok Aug 06 01:32:22 testing again Aug 06 01:32:23 damn Aug 06 01:32:52 heh Aug 06 01:33:39 test Aug 06 02:12:13 . **** ENDING LOGGING AT Thu Aug 06 02:59:57 2009