**** BEGIN LOGGING AT Thu May 14 02:59:57 2009 May 14 03:31:43 soreachilles: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ May 14 04:15:44 anyone have any insights to this issue I've been having? the plugin shows itself as loaded. but not showing itself in preferences. May 14 04:33:51 what packages does the app Toggle Settings use? May 14 04:34:05 or the actual classes would be even more awesome if someone knows May 14 04:36:21 anyone knows where to find amazonmp3 app? I rooted my phone and I miss it :( May 14 05:01:50 igorgue, couldn't you root your phone, install the rc33 OTA, pull off the APK, and then install whatever release you want, and then push the APK back on? May 14 05:03:26 KNY: yeah, that's an option, but I wanted to know if somebody have it uploaded somewhere... May 14 05:05:38 igorgue: what app are you looking for? May 14 05:06:25 AppleBoy: I'd like to have amazonmp3, myfaves and the IM one... May 14 05:07:21 myfaves you can't get May 14 05:08:08 ok... May 14 05:08:12 I found http://contentops.com/android-apps :) May 14 05:08:15 got amazon mp3 May 14 05:45:20 hi, does anyone know more about the issue discussed at http://groups.google.com/group/android-discuss/browse_thread/thread/9d11cf2fc89ea2bc/596d2c2d707a8536?lnk=gst&q=china#596d2c2d707a8536 ? May 14 05:45:38 i was approached by the same company about the same thing... any more information about this would be great.. May 14 06:58:31 hey i have application in which i use Camera API..for it sdk1.1 it worked fine... but for 1.5 its not working... it is showing the following in the logcat http://www.mibbit.com/pb/qR9kSE May 14 06:59:49 any one having any idea about this...?? May 14 07:03:54 is there any bug in camera API in 1.5 May 14 07:07:22 is there any software that exists without bugs? May 14 07:14:04 yep, hello world has been whittled down to perfection at this stage May 14 07:19:50 ? May 14 07:20:37 you hello worlded yourself into a hole? May 14 07:26:10 you sure recursv1.. How many hello worlds have you seen which handles the applications arguments, and has assertions against every known issue May 14 07:26:14 it can still fail May 14 07:27:12 heh May 14 07:27:31 years back I read a thread that started with a statemetn "every program has a bug" May 14 07:27:43 someone posted helloworld.c May 14 07:28:26 * darkproximity waits May 14 07:28:27 they found a bunch of bugs, prototypes, handling argv/c, localization, mistting includes, ignoring return values, etc. etc. May 14 07:28:37 lol May 14 07:28:52 in the headers i imagine May 14 07:29:04 a lot of hello worlds in C ignore the return value of printf May 14 07:29:16 and of course as it grew it became easier to find more bugs May 14 07:29:24 oh, and a c program is supposed to ahve a return value May 14 07:29:32 (as well as printf of course) May 14 07:29:39 sure May 14 07:29:47 int main(void) { return 0; } /* any bugs? */ May 14 07:30:06 your comment May 14 07:30:13 says bug in it... May 14 07:30:15 thats a bug May 14 07:30:21 :( May 14 07:30:26 ftl May 14 07:30:32 not sure main(void) is really legal May 14 07:30:52 why not just int main() May 14 07:30:59 spikebike: it certainly is May 14 07:31:03 the arguments are passed in, your just overwiritn ghte declaration May 14 07:31:21 spikebike: int main(void) means ignore the arguments, it's legal. May 14 07:31:26 I know gcc used to throw an error when the arguments were missing in main May 14 07:31:36 or you used void May 14 07:31:41 not sure if it still does May 14 07:31:46 AndrewLuecke: no, not on int main(void) May 14 07:31:50 not compiling it May 14 07:31:53 = no bugs May 14 07:31:55 :) May 14 07:32:02 AndrewLuecke: perhaps you're referring to void main(void) or similar, which is wrong. May 14 07:32:11 maybe May 14 07:32:47 Either way.. My point is that considering how new Android is, the camera API probably does have a few minor bugs May 14 07:32:49 someone needs to create a programming language thats very literal May 14 07:32:52 like May 14 07:32:58 create a window thats 100x300 May 14 07:33:13 put a button next to the text wooo May 14 07:33:16 and bam May 14 07:33:17 error: thats -- expected apostrophe May 14 07:33:24 window with wooo and a button May 14 07:33:24 sounds like visual basic ;-) May 14 07:33:25 :) May 14 07:33:36 or maybe visual cobol ;-) May 14 07:33:39 lol May 14 07:33:40 i think there have been a few like that darkproximity.. But english is ambiguous anyway in many cases.. Not sure I'd want it May 14 07:34:21 'make me a sandwich' May 14 07:34:28 holy crap i didnt want mayo! May 14 07:34:35 good program May 14 07:34:41 just a bug with the mayo May 14 07:34:48 sudo "make me a sammich" May 14 07:34:49 lol May 14 07:35:31 my adventures in programming java have not been good :( May 14 07:35:44 esp in eclipse May 14 07:35:52 ug how many files do i need to edit May 14 07:36:13 just make nothing public ? May 14 07:36:16 ive got a great idea for an app May 14 07:36:26 just suck at implimenting it May 14 07:37:00 argg.. I should go now or i wont get my other stuff done today.. Damn you hello world for all your mindless debates :P May 14 07:37:30 now i need to figure out how to act on a button push :) May 14 07:37:48 cool then you'll be almost done May 14 07:37:58 just need a play_sound("fart.wav") May 14 07:38:05 :| May 14 07:38:11 just started May 14 07:38:18 not a soundboard May 14 07:38:21 those are a dime a dozen May 14 07:38:36 heh, well that was supposed to be a joke May 14 07:39:03 ya i figured May 14 07:39:12 user clicks close May 14 07:39:16 close the app May 14 07:39:23 easy to write, dunno how to code May 14 07:39:31 * darkproximity gets back on dev site May 14 07:40:51 ebfe: /ws 14 May 14 07:40:54 oops May 14 08:03:03 i wonder why sky map hangs with no "loading" screen at the very beginning May 14 08:03:07 just black and ANR if you touch it May 14 08:09:59 jasta: i havent peeked, but it might be if they are trying to use the now-hidden backlight adjustment api May 14 08:10:06 that was my hunch at least May 14 08:18:41 hmm May 14 08:18:55 trying to align buttons so they as a group are centered horizontally May 14 08:29:44 grr May 14 08:32:35 hi, i have a noob question, how to access a string value from a reference to some array ? May 14 08:32:54 ie: @array/name[0].text May 14 08:33:12 * rzr does RTFM May 14 08:35:26 w00t figgered it out May 14 08:36:18 you can't go wrong with trial and error, provided your determined enough :) May 14 08:36:41 did you use linearlayout or table? May 14 08:39:03 linear layout May 14 08:39:21 cool, I haven't gotten my head around table layouts yet either May 14 08:39:29 found somethin on the forums May 14 08:39:41 threw somethin together May 14 08:39:51 :) May 14 08:40:03 the gravity is what gets me, I get confused between layout_gravity and gravity May 14 08:40:06 im still on the tip of the iceburg :( May 14 08:40:18 as far as progress May 14 08:40:43 me too, I spent 5 hours earlier getting a broadcast receiver to work :D but work it did! May 14 08:41:11 lmao im on a disclaimer page May 14 08:41:20 with yes no buttons May 14 08:41:21 :p May 14 08:41:41 lol it's a start, I dived in the deep end after I couldn't get the notepad tutorial to work May 14 08:41:54 im in the pocess of making an app that unfortunately would be looked down on by a good handfull of people May 14 08:42:03 wow May 14 08:42:04 cant type May 14 08:42:07 process* May 14 08:42:08 oooh, sounds interesting? May 14 08:42:19 mhmm May 14 08:42:26 its for those whom are unfaithful May 14 08:42:39 have multiple love interests May 14 08:42:52 uh oh... definitely sounding interesting lol May 14 08:43:01 basically May 14 08:43:06 user sets up app May 14 08:43:13 they pick from their contacts who they're seeing May 14 08:43:26 then at any given time May 14 08:43:34 user selects who they're physically with May 14 08:43:36 lmao i'm liking the sound of this May 14 08:43:53 all others from said list are then *removed* May 14 08:43:56 all traces May 14 08:44:06 that's quality, you so need to link that into the calendar app May 14 08:44:08 not in contact list, txt msgs hidden May 14 08:44:22 notifications supressed from txts/cals May 14 08:44:23 calls May 14 08:44:28 sorry laptop keyboard May 14 08:44:30 that is pure genius May 14 08:44:37 and images of said persons May 14 08:44:56 i want to make it a widget too May 14 08:45:04 in as much as making the app easier to use May 14 08:45:22 yeah, I'm gonna have a wrestle with widgets soon May 14 08:45:24 the widget would just show the person you're with's picture May 14 08:45:37 then, when you arent with them anymore May 14 08:45:40 ie they went home May 14 08:45:41 ec May 14 08:45:42 etc* May 14 08:45:54 you click the pic, then do a gesture May 14 08:46:03 like click in different corners of the phone May 14 08:46:11 by your own choosing, during setup May 14 08:46:24 it wont ever prompt either May 14 08:46:28 you just have to do it May 14 08:46:30 that is a cool idea, I reckon that'd sell May 14 08:46:33 if you fail to do it right May 14 08:46:37 it doesnt error May 14 08:46:42 that way May 14 08:46:47 you're with girlfriend 1 May 14 08:46:53 or boyfriend 1 May 14 08:46:57 as i dont discriminate May 14 08:47:12 s/he picks up phone and goes thru it May 14 08:47:23 she is none the wiser of any of your misdeeds May 14 08:47:45 and flattered at having her pic on ur home screen :D May 14 08:47:53 EXACTLY! May 14 08:48:00 i like it May 14 08:48:00 oh just thought of something May 14 08:48:11 might have to do some work for phonefusion voicemail May 14 08:48:36 or the easier thing, recommend the user password protect their PF May 14 08:48:37 :) May 14 08:48:56 yeah, plan May 14 08:49:15 obviously need the disclaimer too May 14 08:49:21 which is what im working on May 14 08:49:32 though i dont know if it should be in like really legal jargon May 14 08:49:42 lol yeah, a big hugely visible disclaimer May 14 08:50:05 or just "this app is intended for fun, and we make no guarantee your significant others wont find out about eachother and kill/mame you" May 14 08:50:52 lol yeah, I think that'd do it, anyone who is cheating *should* know the consequences May 14 08:51:26 Really Sounding App Lol May 14 08:51:54 mhm May 14 08:51:59 Have u Finished with It.. May 14 08:52:05 i figure it would actually sell too in the market May 14 08:52:11 no, im just now starting it May 14 08:52:20 can you use Flickr's API in your app? May 14 08:52:30 me? May 14 08:52:38 oh nm May 14 08:52:47 is it possible for scandinavians to sell their apps in the store now? May 14 08:53:31 go to market.. der u can find.. May 14 08:54:44 can you use Flickr's API in your app? May 14 08:55:32 time for work :( cya all May 14 09:06:43 hm May 14 09:07:04 how do you tell it to run something only if its the first time the app has been run May 14 09:21:47 hi all - with enabled being deprecated what's the new fangled way for setting a button to be disabled? May 14 09:25:24 hmm actually will just do it through code and assume that setEnabled has been updated :) May 14 09:44:07 Does any one have a method for testing scrolling a view in a InstrumentationTestCase ? May 14 09:46:18 is 3rd party libs ok? May 14 09:46:23 must b aight? May 14 09:55:53 Sure, anything which works May 14 10:47:03 In unit testing an activity, is there a way to catch service bindings ? May 14 11:32:00 argh, mein oppen May 14 12:00:26 hy May 14 12:00:44 can anyone help me with a ListView May 14 12:00:45 ? May 14 12:10:08 Perhaps May 14 12:10:17 What is your issue andrei_null ? May 14 12:11:02 i had created a listview with my own layout May 14 12:12:10 and i don`t receive the callback of the metot onItemClick(AdapterView,view,int,long) May 14 12:12:21 *method May 14 12:13:10 Have you registered an onClickListener for the items ? May 14 12:14:37 no i had registered onItemClickListener May 14 12:15:09 and how are you populating the list ? May 14 12:15:25 with an adapter view May 14 12:16:45 hmm May 14 12:17:29 Sorry but it doesn't ring any bells with problems i've come accros. May 14 12:18:02 ok thank you for your time May 14 12:20:54 I could paste a copy of a list view i've done before but i'm not sure that would help at all May 14 12:29:32 Hi all May 14 12:31:13 Hello May 14 12:31:22 Doesn't seem to be many about at the moment May 14 12:34:33 Someone is french ? May 14 12:37:11 Indeed, but they may not be listening May 14 13:10:29 For those that have been following my touch based testing queries, turns out there is a TouchUtils class which performs most of the required magic. May 14 13:18:29 multitouch and all of that/ May 14 13:18:31 ? May 14 13:19:34 nope, just dragging and clicking May 14 13:21:08 im a dragon May 14 13:21:09 rooooar May 14 13:27:31 Sorry for X-posting but does anyone know how to manually start an application via commandline? I want to strace an application start. May 14 13:28:43 you crossposted I hope you burn in a lake of fire :E May 14 13:30:31 ]:o) May 14 13:30:43 * t4c sings I wanna burn in hell... May 14 13:35:30 all screens for android are touch-screens right? May 14 13:35:48 photonen: currently, yes May 14 13:37:01 t4c: adb shell am start -n my.package/my.package.activity May 14 13:38:19 where the hell is Gallery class? May 14 14:13:53 kRutOn: mmh I give it a try May 14 14:15:12 mmh May 14 14:15:16 what is activity? May 14 14:15:40 I want to start PDFViewer.apk this on is in /system/apps/PDFViewer.apk May 14 14:26:25 gah May 14 14:26:38 anyone have a very simple example of just drawing a friggin square? May 14 14:26:42 the lunarlander is huge May 14 14:26:53 i just want the simplest possible graphical app May 14 14:31:17 The graphics examples in APIDemos are pretty tiny May 14 14:39:48 photonen: do you have a View? simplest way is to override onDraw May 14 14:40:16 http://developer.android.com/reference/android/graphics/Canvas.html#drawRect(float,%20float,%20float,%20float,%20android.graphics.Paint) May 14 14:42:12 Hey guys, just starting with android dev, any nice website recommendations to follow May 14 14:42:58 of course except the android website itself May 14 14:43:01 Did the link to the eclipse plugins change or is the site given just temporarily down? May 14 14:43:30 try https May 14 14:43:32 or not https May 14 14:43:39 yeah http works May 14 14:43:40 whichever is not listed as correct May 14 14:44:40 http://dl-ssl.google.com/android/eclipse/ works for me May 14 14:44:43 tried both and neither seem to work even tried to open it in my browsers and nothing comes up but an error page May 14 14:45:12 grajo: wierd it wont open for me, did you just try the link? May 14 14:45:43 hold on, the link return 404 with google img May 14 14:45:55 I refresh on eclipse and let you know May 14 14:45:58 kk May 14 14:48:02 yep, its showing no repository found May 14 14:48:10 looks like its down May 14 14:48:25 kk thanks for checking May 14 15:00:46 hi May 14 15:01:25 hola May 14 15:02:24 anybody knows if we can change the AnalogClock widget's attribute dial, hand_hour and hand_minute programmatically ? May 14 15:03:02 hi all May 14 15:03:23 whats the status of garbage collector in android ? May 14 15:03:51 still collecting garbage May 14 15:03:53 sorry :) May 14 15:05:05 jt436: i have soemthing going now May 14 15:05:50 nice one May 14 15:10:51 hey May 14 15:14:35 hy there, on a presentation I saw how a presentator plugged in his G1 with USB and shared his Screen to the audience May 14 15:14:43 anyone knows the program used? May 14 15:20:31 Iowahc_: maybe http://androidguys.com/?p=3519 May 14 15:20:45 what does static mean in private static final float x= 1; ? May 14 15:20:52 final means not changeable right? May 14 15:20:58 priavet means not accessible otuside May 14 15:21:04 and static? May 14 15:23:54 photonen: it's not associated with an instance of the class May 14 15:24:48 all instances share the same copy of the variable May 14 15:25:14 meaning? May 14 15:25:14 which is no problem since it is final? May 14 15:26:37 yeah, by saying its static, in this case you are making it a global constant only accessible inside a class instance May 14 15:27:21 photonen: private final float x = 1; would give you one copy of x for each class instance May 14 15:28:07 yse i see May 14 15:28:08 so you save a few bytes May 14 15:28:09 static regularly just means the memory used for this object is set aside, so that wheneven any instance of the class accesses this variable they are accessing the same place in memory May 14 15:28:25 photonen: exactly May 14 15:29:35 hey, has anyone been dealing with GL and SurfaceViews? May 14 15:30:03 I keep running up against new instances of the same problem May 14 15:30:53 one the surface has been attached to the screen then removed May 14 15:31:26 it never displays anything again May 14 15:31:32 so for instance May 14 15:31:57 yep. May 14 15:32:06 have fun with that. May 14 15:32:45 I know I've brought this in here before, but theres got to be something more helpful than that May 14 15:33:46 my main question as this point would be how do you handle interruptions to your activity? May 14 15:33:51 <_Auron_> I haven't done much, just orthographical rendering May 14 15:34:25 like user's going along, gets a phone call, and when they get back the screen is black May 14 15:34:35 no matter where I initialize the screen May 14 15:34:55 sorry the GLSurfaceView May 14 15:35:13 if I do it in the Activity onCreate, it breaks May 14 15:35:25 if I do it on the View in questions, it breaks May 14 15:35:50 <_Auron_> do you have overrided onPause() and onResume() methods in your activity? May 14 15:35:55 yes May 14 15:36:08 <_Auron_> no idea then. :D May 14 15:36:20 <_Auron_> I think I know what you're talking about, but I haven't gotten far enough with this to worry about it yet May 14 15:36:33 <_Auron_> the screen just ends up blank? May 14 15:36:47 how much space does an app have? May 14 15:37:04 <_Auron_> ? May 14 15:37:09 yeah, May 14 15:37:14 and does it run in its own thread or is it my responsibility to make sure the user can answer the phone when the game is going? May 14 15:37:40 photonen: I think the memory footprint is 16MB May 14 15:38:07 there is no space req't but its best to keep it under 1-2MB May 14 15:38:55 and you main activity will be interrupted automatically by any other phone functions like calls or users pressing home, but you need to maintain your apps own state May 14 15:39:31 which you can you with onSaveInstanceState May 14 15:40:21 anybody workaround with analogclock? May 14 15:40:33 _Auron_, so if you are doing a GL app, it seems kinda hairy May 14 15:42:57 Like its fast like a beast and all, but apparently no one has found ways around these idiosyncracies May 14 15:43:30 whats the status of garbage collector in android ? May 14 15:43:46 uh, still truckin I guess May 14 15:43:50 what do you mean May 14 15:44:13 garbage collection happens, you'll see it in the logs if you play with enough memory as a matter of course May 14 15:45:23 vol: I mean is the garbage collection working well? or it requires optimization? May 14 15:45:52 it really depends on how many objects you generate over the course of your app May 14 15:46:04 define 'optimization' May 14 15:46:26 rememer that there are tradeoffs made in the development of android May 14 15:46:32 due to space and processor constraints May 14 15:46:40 vol: yeah I understand May 14 15:47:01 android is designed for arm architecture? May 14 15:47:18 more or less, though people hae had success porting it to other architectures May 14 15:47:47 which architectures ? May 14 15:48:01 there is very little in android that is architecture-specific May 14 15:48:02 I mean to which architectures had it been ported May 14 15:48:25 though we did of course spend a lot of time optimizing for the architecture we knew we'd ship on May 14 15:48:49 danfuzz: yeah thats where optimization of garbage collection comes in May 14 15:49:05 spsneo: there is a page on android.com about what you should avoid to optimize your application for android May 14 15:49:12 ahh .. too late May 14 15:49:13 there was, in fact, a period of time, where the system could be built for a powerpc target May 14 15:50:15 are the docs loading really slow for you people too? May 14 15:50:16 re gc (in case anyone else cares): i doubt that much of the gc work will actually require major knowledge of the underlying architecture. May 14 15:50:32 general stuff, sure May 14 15:50:48 but it's not like you're likely to see the thing written in asm May 14 15:51:20 why the h*** does the emulator use 120MB? May 14 15:51:37 it's emulating a device with (iirc) 96 megs of ram May 14 15:51:44 there's 96 of them right there May 14 15:51:47 ok May 14 15:51:53 and there's overhead in emulating May 14 15:51:56 code cache May 14 15:52:00 frame buffer May 14 15:52:02 etc May 14 15:52:02 etc May 14 15:52:21 it also maps in all the disk images, has a JIT cache, the MMU tables, etc... May 14 15:53:22 And, anyway, it's small enough that it's not worth optimizing for space. May 14 16:14:51 i dont get the drawLines May 14 16:14:51 it takes ana rray of floats May 14 16:14:51 so is a poitn each 2 floats? May 14 16:15:31 yes. and a line is two points May 14 16:18:41 so, whats with the broken google? :) May 14 16:19:42 hello everyone. I have a WebView in my app that takes some time to resolve. The screen just sits there blank for a number of seconds until the html loads. Is there a simple way to give a "waiting" message or do I need to watch the progress of the view and do my own progress layer and turn off when it's done. I don't see anything in the api or examples about this, so thought I'd ask. May 14 16:47:14 ok, I may have an idea on how to fix my GLSurface problem, but I need to get some Android application architecture advice May 14 16:47:56 I have made a custom application class for my app, which holds essentially my whole model state May 14 16:48:38 and up until now I've used one activity and a bizarre "ScreenController" which one of our other programmers put together May 14 16:49:10 I have five or so pretty unrelated views May 14 16:49:26 which can grab their data from the model no problem May 14 16:49:49 would it be incorrect for each of those views to have a ruling Activity? May 14 16:50:26 so instead of just switching the views, I'll be switching activities each time I move to a different screen May 14 16:51:19 is that closer or further from the preferred application model? May 14 16:52:37 anyone? May 14 16:52:49 I have tried single activity with multiple views and an activity for each view, having multiply activities is much easier to manage and would highly suggest it May 14 16:53:01 hmm even for a game? May 14 16:53:14 well it depends where you are switching your views May 14 16:53:27 I have multiple ui screens and a single in-game screen May 14 16:54:09 exactly thats what I'm looking at May 14 16:54:37 hmm May 14 16:54:39 for your menu ui it will be fine to have multiple activities and switch between them depending on the screen May 14 16:55:14 well, for instance I have a screen flow which I'll always go through May 14 16:57:14 title menu, level select, in-game, results May 14 16:57:23 and then some branching at this point May 14 16:58:08 you can make all those separate activities May 14 16:59:08 as long as you are switching once the game is actually over ie to the results screen, and not midway while the user is playing May 14 17:03:24 and does it run in its own thread or is it my responsibility to make sure the user can answer the phone when the game is going? May 14 17:03:24 like: onPhonecall(pauseAndSaveGame()); ? May 14 17:03:47 it is also easier for when your application loses focus, some activities you might need to pause while others such as the main menu you may not do anything at all May 14 17:04:50 you can do all this inside your individual activity, instead of trying to figure out what view you are current displaying and then execute the corresponding behavior May 14 17:04:59 how fast is dalvik on a native machine? i read some comparisons which state that dalvik is really slow May 14 17:05:29 if I make a game and it has aeroplanes, should the plane ahve a method draw() that accepts a canvas and draws on it? May 14 17:06:29 or what would be the best way? May 14 17:07:03 i would do so May 14 17:07:05 photonen: if the user has a phone call your application will receive onPause automatically May 14 17:07:11 why the hell did they create it then? May 14 17:07:23 does it use less memory? May 14 17:07:46 jt: ok and if I dont have a method for that then what happens in the game is undefined? May 14 17:08:42 photonen: you wont be able to pause your game, not very user friendly May 14 17:09:30 as I was saying before, if this happens on your main menu you probably wouldn't care May 14 17:21:45 quick question, is there a way to tell a cursor to not get updated when the underlying data changes in a ContentProvider? May 14 17:28:32 herriojr: don't set it to autoquery=true May 14 17:30:15 hi.. what's the 1.1 way to get the date format from android settings? In 1.5 I'd do DateFormat.getDateFormatOrder and related DateFormat classes May 14 17:30:19 err methods May 14 17:43:58 hm how do you get fullscreen mode in an activity on 1.5? May 14 17:44:07 the way i did it in 1.1 no longer works May 14 17:47:10 <_Auron_> don't dev for 1.5 yet, but are you using something like WindowManager.LayoutParams.FLAG_FULLSCREEN? May 14 17:47:15 using: May 14 17:47:28 requestWindowFeature(Window.FEATURE_NO_TITLE); May 14 17:47:30 and: May 14 17:47:51 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); May 14 17:48:01 but it still is showing a black title bar May 14 17:48:01 <_Auron_> that's what I'm using as well. dunno then May 14 17:48:12 heh well keep a look out then May 14 17:48:28 your app may not display right for people running 1.5 May 14 17:49:32 luok: you should peek at using android:theme in your manifest May 14 17:49:44 it will prevent any "flash" when the user enters your app May 14 17:49:59 hm is this documented anywhere? May 14 17:50:36 yep, but not too prominently May 14 17:50:38 nm http://developer.android.com/guide/topics/ui/themes.html May 14 17:50:41 heres how the camera does it http://android.git.kernel.org/?p=platform/packages/apps/Camera.git;a=blob;f=AndroidManifest.xml;hb=cupcake#l20 May 14 17:50:43 Greetings fellow Android developers. May 14 17:50:48 ah cool thx May 14 17:54:30 i need input from the user to move the aeroplane, I googled for user input, keyboard input but didnt get anything relevant. how do i do it? May 14 17:54:58 I really hope you are not controlling a real aeroplane from a phone... May 14 17:56:04 <_Auron_> luok: I dev with 1.1 sdk but I have 1.5, and everything works fine for me May 14 17:56:35 So I'm trying to call openOrCreateDatabase from a Service and it crashes with a NullPointerException. It seems that my Service is inheriting from a ContextWrapper which has a parent Context of null, causing pretty much all of my calls to Context methods to crash. Does anyone know what I might be doing wrong here? This is with 1.5 on the emulator. May 14 17:57:51 photonen: how do you want the user to move the aeroplane? touch, keys etc...? May 14 17:58:26 file:///Users/jtomlinson/android-sdk/current/docs/reference/android/view/View.html May 14 17:59:11 look under Implementing a Custom View for Event Processing May 14 18:00:16 does somebody know where to find api docs about "requestqueue" May 14 18:00:52 is it removed in 1.5 ? May 14 18:01:40 is it unsupported? May 14 18:02:36 <_Auron_> jt436: you just linked to a file using paths on your machine, not a weblink. heh. May 14 18:05:30 jt436: thanks a lot May 14 18:05:38 thats what I was hoping to hear May 14 18:05:47 _Auron_: ha thanks, didn't notice that May 14 18:06:18 <_Auron_> jt436: :) May 14 18:06:28 http://developer.android.com/reference/android/view/View.html May 14 18:06:35 photonen: thats the correct link, i hope ;) May 14 18:06:40 Has anyone successfully opened an sqlite database from inside a service? Maybe I'm going about it all wrong. May 14 18:09:26 haven't tried blanu May 14 18:10:51 jt346: <- -> keys May 14 18:11:58 I'm wondering if this is a bug in the SDK, or if you're just not supposed to open database inside of services for some reason. The example code I can find opens databases inside of activities, which works fine. However, I have two activities that need to access the same database, so I thought a service made sense. May 14 18:13:49 if i wanted a crossword-like black and white grid, where clicking on the boxes would fill it in with gray, and clicking a gray-filled box would change it back to white, what would be the best way to go about that? May 14 18:15:28 blanu: err, why not just open the db in each activity? May 14 18:15:59 [in general, of course, ContentProvider exists to provide shared access to dbs. it's even larger scale, however; it' handles cross-process access.] May 14 18:17:35 That's a good question. SQLite is usually not thread-safe, so I figured it needed to be in its own worker thread. But perhaps that is not a problem on Android. It's worth a try. May 14 18:18:12 fwiw accessing sqlite from my service worked fine.. just tried it May 14 18:18:25 Yeah a ContentProvider was my next guess of what to try. It's just a lot more hassle to implement. May 14 18:18:41 i don't have a contentprovider, just did a plain ole sqlite open May 14 18:18:52 soreachilles: Interesting! Are you on 1.5? May 14 18:18:58 SQLiteDatabase.rawQuery to be exact May 14 18:19:06 no 1.1 emulator but I can switch to 1.5 and try May 14 18:20:05 actually the db open was done by an activity not my service... lemme change things around to test your case May 14 18:20:43 Ah, interesting. Thanks! I'd really like to see how that works out. May 14 18:21:47 That's another way to do it, I could have my launcher activity open the database and pass it to the service. May 14 18:22:50 yeah that's esesntially how i'm doing it, but I"m trying it the other way to test.. May 14 18:23:56 argh when I switched emulators I nuked all my data of course, sigh,I think it's going to work, if I had a database in there.. May 14 18:28:45 yeah worked fine openeing the db from the service May 14 18:29:16 opened from a service, and did a query, and iterated over the query.. all in the service, after the activity had bound to the service, if that matters May 14 18:30:11 and that was 1.5 emulator May 14 18:33:41 Well that is strange. I wonder why my Service's Context is messed up. May 14 18:34:03 Thanks for the help! I'm going to try opening the db in the activity and see how that goes. May 14 18:34:45 good luck May 14 18:41:30 are there phones that can focus on faces? May 14 18:42:19 that is so bizzaro. Sometimes ddms sends me Location objects with value of getTime() set to -1000 May 14 18:43:30 guess I'll set the field myself... May 14 19:01:44 is there a convenient way to log on the device, like a precanned debug console that can be installed and log.v goes there, or some other log msg goes there? May 14 19:02:42 can we no longer use blobs in SQLite? May 14 19:02:55 for some reason when I insert a blob, when I query it directly after, it returns nothing May 14 19:03:07 or rather the blob with size 0 May 14 19:06:45 soreachilles: you can get the logcat output to Eclipse as well as 'adb shell' and run logcat manually May 14 19:06:51 wel May 14 19:06:52 all the log messages are piped to logcat May 14 19:07:08 I want to walk around with the device, generating useful infomation, then analyze it either on the device, or the pc May 14 19:08:02 I am pretty sure there was an app in the market that would display logcat on the screen May 14 19:08:07 I'm just writing a sqlite table to hold my log output, and using that, which works. But if there was something already baked, like that cool Debug class, that'd work while walking around... May 14 19:10:07 soreachilles: http://developer.android.com/reference/java/util/logging/Logger.html May 14 19:12:11 y... java.util.logigng.. I was just hoping for an on-device logging+scrollingUI so I don't have to have my own... May 14 19:12:38 it's not hard to write, I'll just do it and stop asking about it :) May 14 19:13:57 write it and share with everyone else ;) May 14 19:15:35 Anyone know how many android users there are and what the projected growth is? May 14 19:16:22 you mean how tall they're going to get? May 14 19:16:26 I've read somewhere on dzone that we are expecting 900% growth next year May 14 19:16:43 of android users May 14 19:17:02 grajo: What happens next year? Just the new release of phones, or more carriers going to have android phones? May 14 19:17:33 probably both May 14 19:18:08 wow, that 900% is all over the news. May 14 19:18:28 :) May 14 19:19:58 how is the keyboard/touchscreen ona real device? im doign a 2d-shoot em up May 14 19:20:02 argh @ stoopid me not being able to make/manage sql queries (I'm still getting a "Finalizing cursor blahblah on blahblah that has not been deactivated or closed" and "Leak found" and "SQLiteDatabase created and never closed" but I do close every reference to the SQLiteDatabase instances in onPause() IMO - apparently not) May 14 19:20:20 which buttons should i use do you think? May 14 19:20:31 i close after every query May 14 19:20:49 and close the db onpause May 14 19:20:55 close the querys and close the db.. May 14 19:21:05 hah: http://www.unwiredview.com/2009/05/11/android-shipments-to-grow-900-this-year-no-i-say-its-1800/ May 14 19:21:17 I close the db ondestroy though May 14 19:22:55 this is good one May 14 19:23:40 aha, there's something called activity.startManagingCursor(cursor) - that sounds like it'll help me in some way.. I hope :P May 14 19:24:19 heh... May 14 19:24:47 i use that for a listview that displays content from a cursor May 14 19:25:09 since its doing the query for the cursor, it's gotta manage it... May 14 19:25:19 I have a autocompletetextview that uses a FilterQueryProvider to get the data from a db May 14 19:25:43 you're hitting the database for every character the user types? May 14 19:25:47 is it fast enuf? May 14 19:26:21 using startManagingCursor() seemed to get rid of the "Finalizing cursor blahblah on blahblah that has not been deactivated or closed" but not of the "SQLiteDatabase created and never closed" error May 14 19:26:43 have you tried closing your sqlitedatabase? :) May 14 19:28:01 soreachilles, the input takes usually about 5-10 characters and my table won't contain more than 5-10 entries so it should be fast.. I hope :P May 14 19:28:21 if there's a better way of doing it, I'm all ears :) May 14 19:28:45 nah, I dunno, I'm just wondering if going that route is fast enough for type-down controls, autocomplete, etc.. just curious May 14 19:28:45 <_Auron_> if it's not fast you're doing something wrong. ;) May 14 19:28:53 Is there something like ldd for apk files? May 14 19:29:02 to find missing libs? May 14 19:30:45 soreachilles, I use SQLiteOpenHelper.getReadableDatabase(); and I do close this in onPause() again.. (I think I'm opening something else also and I just don't realize it and so I'm not closing it) May 14 19:31:42 yeah I had a ton of those errors for a long time, and just finally got sick of sifting through my log messages through the sqlite errors, and cleaned them all up... once i ensured every open was matched with a close, it was all good May 14 19:31:55 it's a slog though May 14 19:42:48 does anyone know (in simple english, please ;) ) what does "ERROR/Cursor(1315): Invalid statement in fillWindow()" mean? what does it want to tell me? :) May 14 19:43:12 I know I'm doing something wrong but I don't understand the error message :( May 14 19:45:00 can't find this string in Cursor.java source either :( May 14 19:45:22 your query is wrong? May 14 19:45:58 sorry for cross post, but should have been here: Hi, is it still possible to put the phone into silent mode from within a program? Or is user interaction required for that these days? May 14 19:50:09 romainguy__, by wrong you mean what? I have just this one query in my app and that seems to work (one really simple query in FilterQueryProvider.runQuery()) so it can't be a syntax error in the query... as I understand it May 14 19:50:40 i wanna set some parameters to my httppost like username and password May 14 19:51:17 i use BasicHttpParams and add parameter to it, then add the basichttpparams to the postmethod May 14 19:51:21 and execute httpclient May 14 19:51:33 but nothing is sent to server when i sniff the network traffic May 14 19:52:17 how do you people POST parameters to a http service ? May 14 19:52:19 :) May 14 19:52:22 > (+1) &&& (subtract 1) $ 5 May 14 19:55:30 the query itself is query("table", new String[] {"_id", "name"}, "name LIKE '" + filter + "%'", null, null, null, null);, the table contains just a "_id" and a "name", nothing more currently - what can go wrong there? :) (yes, I know I have to escape the filter parameter, I'm just testing out stuff atm) May 14 19:59:02 hmm, interesting, it seems google can remote wipe a device via gtalk. May 14 19:59:13 if MasterClearReceiver.java is anything to go on, anyway. May 14 20:00:27 jasta, now find out if only google can do it or there's a way around it (so I can send a message like "/wipe" to someone in gtalk) May 14 20:00:31 nevermind, ignore me May 14 20:00:39 my funny is not funny again May 14 20:00:47 hmm to fire a missile over the screen , how would yo do? the whole android env seems to be reactive May 14 20:01:07 photonen_: it's not, look at other games as an example. May 14 20:17:24 /join django May 14 20:21:10 oh, great, now my users can use % in autocomplete fields.. I guess I'll live with it then. May 14 20:21:14 :/ May 14 20:22:03 ..or maybe I'll point it out as a feature.. "you can use wildcards, just type %" :P May 14 20:41:35 oh well.. this database is not closable.. I can't find the cause for the leak. May 14 20:41:44 onPause() is quaranteed to be called, right? May 14 20:42:01 this is the right place where I should close my open db? May 14 20:44:30 onPause() is when your app is being made no longer frontmost May 14 20:46:14 yes, I know that - the question is - should I close my open db's there or is there generally a better place for that? May 14 20:49:04 onStop() is the other usual alternative May 14 20:49:15 since reopening them when you're resumed is relatively heavy May 14 20:49:39 * ctate shrugs. May 14 20:50:28 k, onStop() it is then.. now the one thing left is to find out why it's screaming that my db is leaking even if I close it in onPause()/onStop() May 14 20:50:56 ..and that happens only rarely and is hard to reproduce :/ May 14 20:57:58 put a log statement everytime you open, and every time you close, then when you leak, count 'em up May 14 20:58:16 refcounting the printf way May 14 21:02:30 i'm in can't-work-on-device-cuz-battery-dead mode.. so.. can that soft-keyboard be enabed/disabled by the user somewhere? I'm not trying to hook it or anything, just curious if they don't like that kb popping up if they can turn it off May 14 21:03:01 yes, it's in the settings May 14 21:03:07 huh didn't see it May 14 21:03:24 Settings -> Locale & text -> checkmark for the installed IMEs. May 14 21:03:36 oh so it's not hidden or anything ;) May 14 21:05:16 is it the "android keyboard" checkmark? May 14 21:07:03 I open my db in just one place (onCreate() -> sqliteOpenHelper = new SQLiteOpenHelperImpl(this); database = sqliteOpenHelper.getReadableDatabase();) and close it in one place (onStop() -> database.close(); sqliteOpenHelper.close();) (I prolly don't need to close both, just helper.close() should be enough?). but I still get a leak error and the trace points me to the line where I have "database = sqliteOpenHelper.getReadableDatabase();" May 14 21:07:36 anyone did a multitouch app so far? May 14 21:07:47 I've never ever tried to write DB stuff in Android before.. so I'm totally in the dark :( May 14 21:10:08 is your database in a static variable somewhere? May 14 21:10:59 nope, not static, just an instance variable May 14 21:11:00 if so, perhaps that could be a leak? Try setting the db pointer to null onStop? I'm not sure if holding onto a sqlite database handle that's been closed after your onStop is called is a leak or not, but I do null out all my static references when I'm exiting... May 14 21:11:03 tauno: hmm, was onStop() not calle? May 14 21:11:05 called? May 14 21:11:16 if you hit the back button, it should be.. May 14 21:11:28 yeah that's what i would expect May 14 21:12:40 did you stop managing your cursor in that listview thing ? May 14 21:12:55 perhaps if it's still managing a cursor, your db won't close... (guessing) May 14 21:13:07 onStop() is calle dbut AFTER it throws the "SQLiteDatabase created and never closed" at me :/ May 14 21:14:55 do nothing in your app after you open the db in onCreate(), so sit at a blank screen, then hit the back arrow so it rolls thru the destroy path.. should clean up.. May 14 21:15:31 basically I'd whittle the app down to just a db open and a db close, ensure no leaks, then start putting back stuff a little at at ime May 14 21:15:42 time.. it's the only way I've made sense of things like that May 14 21:18:03 bye all May 14 21:22:24 found my problem - if I start activity B from A.onCreate() then A.onStop() nor A.onPause() will be called May 14 21:22:54 if you're starting b from a, why not just start b? heh May 14 21:23:22 so there's the point where I open it in A.onCreat() and then don't close it (because of no onPause()/onCreate()) May 14 21:23:56 yeah the emulator's good at finding leaks May 14 21:24:22 soreachilles, A is my main entry point to the application. if some preconditions are met, then I want the app to start so that it dispplays activity B instead May 14 21:24:37 y May 14 21:24:38 so I check it in A.onCreate() and launch B from there May 14 21:24:54 or is there a better way of doing this? May 14 21:25:41 no clue, it might be better to do your launch of b from onstart or onresume -- I kinda hesistate from doing too much in oncreate() thinking it should try to finish fast, but that's more superstition more than anything else right now May 14 21:25:45 i don't know much about android either May 14 21:27:41 I have a tabhost, and I set the current tab in the host's onResume... this is sorta like your launch of activity b May 14 21:28:07 sort of, yes May 14 21:28:38 anyway, thanks for help all, I can't find any more leaks now :) May 14 21:29:08 :) May 14 21:33:58 tauno: A isn't paused when B comes up in front of it? really? hunh. May 14 21:38:56 let me doublecheck May 14 21:40:23 ctate, no, if I call A.onCreate() {startActivity(B); finish()}, then A.onPause() is not called May 14 21:41:22 need some help getting google code to compile May 14 21:41:29 checked out the camera app May 14 21:41:57 bug? May 14 21:42:29 getting a lot of compile errors and problems with the android manifest May 14 21:42:48 would be nice if someone could give me a helping hand May 14 21:43:53 When Android decides to terminate an application are the shutdown hooks run? May 14 21:44:03 Shutdown a process. May 14 21:44:10 After the Activity has been destroyed. May 14 21:44:31 the shutdown hooks that you set with the Runtime class? May 14 21:44:46 Yes May 14 21:44:54 I don't even know if we support that May 14 21:45:01 tauno: oh! i see; onPause() isn't called because you called finish() May 14 21:45:03 but if we do it has NOTHING to do with the activities lifecycle May 14 21:45:09 it would be whenever the VM is terminated May 14 21:45:13 i bet onStop() is called though May 14 21:45:14 Yeah May 14 21:45:23 needless to say, relying on this is probably a very bad idea May 14 21:45:28 very, very bad idea. May 14 21:45:33 very, very, very, very bad. May 14 21:45:38 i could go on. May 14 21:46:08 there are definitely some cases where the OS will terminate the app without those hooks being run. May 14 21:46:12 romainguy__: I think the Java Language Spec states that in the event of a "normal" shutdown of the virtual machine, shutdown hooks are guaranteed to run. May 14 21:46:15 ctate, you mean, it's not a good idea? May 14 21:46:20 ctate: :P May 14 21:46:25 i do believe sammyF has sussed it :) May 14 21:46:48 ctate: it was really subtle though ;) May 14 21:46:54 tee hee May 14 21:47:03 svm_invictvs: yeah but that's Java Language Specs :) May 14 21:47:08 Dalvik's dalvik May 14 21:47:09 ctate: I'm not relying on it, but due to the way the Android media player works, I've gotta load media assets into a temporary file on disk, then play the file. When the activity exits, I try to clean those up. May 14 21:47:21 and I don't even know if we ever perform normal shutdown ^^ May 14 21:47:33 like i said, there are cases when your process can be killed summarily May 14 21:47:39 So the process geets a SIGINT or something. May 14 21:47:39 romainguy: unfair! May 14 21:47:44 what ctate said :) May 14 21:47:45 no, it gets SIGKILL May 14 21:47:56 i.e. not even a kiss goodbye May 14 21:48:00 anyway you should ask this question on one of the mailing lists May 14 21:48:04 grumblefuck May 14 21:48:05 so that danfuzz can give you an answer :) May 14 21:48:12 danfuzz: ping May 14 21:48:23 danfuzz is OOO today, romainguy__ May 14 21:48:28 diable May 14 21:48:34 c'est vrais May 14 21:48:48 ctate, want ctate, how much you'll bet? :P May 14 21:48:59 tauno: ? May 14 21:49:02 I also have finalizers delete the temporary files May 14 21:49:07 but, I can't rely on any of that. May 14 21:49:10 finalizers... BAD IDEA May 14 21:49:13 ctate. "i bet onStop() is called though" May 14 21:49:15 I'm going to freakin' murder ListView May 14 21:49:20 tauno: oh, right, because you called finish() May 14 21:49:29 yeah, okay, sorry. i confused myself. May 14 21:49:34 romainguy__: Dude, I know this. I'm an experienced Java programmer... May 14 21:49:57 the assumption is that if you call finish(), you know you're going away so you -- the app developer -- are prepared to also explicitly take any cleanup action at that point. May 14 21:49:58 A well behaved app should clean up after itself, but not all of them do. so I"m trying to cover my bases. May 14 21:50:15 svm_invictvs: onStop() will get you most of the way there May 14 21:50:21 svm_invictvs: why don't you just clean up when the activity is stopped/destroyed May 14 21:50:26 and at startup while you're at it :) May 14 21:50:35 (in case you got killed in the background) May 14 21:50:44 romainguy__: It appears that flipping the phone open and closed destroys the activity. May 14 21:50:46 and then right, you should be prepared to erase to a clean state on *launch* May 14 21:50:52 svm_invictvs: yeah May 14 21:50:54 *but* May 14 21:51:04 svm_invictvs: there's a specific sequence that happens during orientation change May 14 21:51:14 you can check whether it's finishing or not May 14 21:51:18 romainguy__: I'd rather just pause my game and have it unpause when the activity is restoried. May 14 21:51:19 there's an isFinishing() method May 14 21:51:24 ah May 14 21:51:27 yes, it's a destroy/create sequence, but you also get an opportunity to cache information across that relaunch May 14 21:51:51 romainguy__: Ah, is finishing won't return false will it? May 14 21:51:58 svm_invictvs: http://developer.android.com/reference/android/app/Activity.html#onRetainNonConfigurationInstance() May 14 21:52:00 maybe :) May 14 21:52:01 check the docs May 14 21:52:04 I see. May 14 21:52:29 hmm May 14 21:52:32 Yeah, I also want to hook the "back" button that says, "Warning! You have unsaved data in your game. Are you sure you want to go back?" May 14 21:52:56 this method and its get* counterpart exist specifically for passing state across the open-the-keyboard configuration change relaunch May 14 21:53:19 svm_invictvs: why would you ever NOT save state? May 14 21:53:20 and in the case of a game you can always handle the orientation change yourself May 14 21:53:24 it's a valid case ^^ May 14 21:53:27 it's good app design to do that implicitly, always May 14 21:53:36 ==romainguy__ on the subject of orientation change May 14 21:53:48 games also tend to be candidates for forcing a particular orientation May 14 21:53:53 pls help me. i checked out the camera app from google and i am missing some dependencies, such as "ZoomButtonsController" or "MediaMetadataRetriever". does this ring a bell for anyone? May 14 21:54:16 the_alien: are you sure you've checked out the proper code line / tag / etc? May 14 21:54:28 uhm May 14 21:54:34 i thought so May 14 21:54:38 ctate: It saves at the end of every level. I could just pause the game, I guess. But then there's not guaranteed that Android will keep the process running. May 14 21:55:02 svm_invictvs: during an orientation chagne? May 14 21:55:06 your process won't die May 14 21:55:22 romainguy__: no when the "back" or "home" button is pressed. May 14 21:55:24 yeah, orientation change is an activity relaunch in the same process May 14 21:55:34 when 'back' is pressed, the user is explicitly quitting May 14 21:55:43 == ctate May 14 21:55:45 i would say either always save in-game state, or revert to start of level. May 14 21:55:50 as for pressing home, you should save the current in-game state May 14 21:56:03 right, because that's a switch and pause May 14 21:56:10 gnah, now i cant find the git url :/ May 14 21:57:14 ctate: Yeah, but, if you were playing and you accidentally hit the back button, wouldn't you be pissed if you relaunched your game just to have it start over? May 14 21:57:30 svm_invictvs: we did start by saying you should save state :) May 14 21:57:48 svm_invictvs: on back you can have a confirmation May 14 21:57:52 or save the ingame state May 14 21:57:57 ctate: So I should use something like VM serialization to save the state of the *entire* game's object graph? May 14 21:58:09 meh May 14 21:58:21 note the smiley May 14 21:58:29 I try to. May 14 21:58:35 But, I can't save the state of the level in progress. May 14 21:58:50 why? May 14 21:59:01 you mean "it's prohibitively expensive to save..." May 14 21:59:16 RPGs on GameBoy Advance save the entire freakin' world :) May 14 21:59:18 but the thing is May 14 21:59:31 romainguy__: in a freaking pixmap May 14 21:59:36 you need to be able to handle the case of e.g. the phone ringing May 14 22:00:12 Qwell: how they do it doesn't matter :)) May 14 22:00:48 when i worked at Palm, it was essentially forbidden for any app developer to have a case where the user could experience data or state loss when switching away from the current app May 14 22:01:11 you worked at palm? heh I worked with palm on the i705.. May 14 22:01:25 oh, heh. i was there starting in late 2001. May 14 22:01:45 yeah that's about the i705 time frame... was a fun project May 14 22:02:03 ok, i was trying to get the cupcake branch of the camera app. now i get a "manifest default.xml not available" fatal error May 14 22:02:06 it was so much better than the VIIx :) May 14 22:02:10 oh yeah May 14 22:02:25 the_alien: you really need to grab the whole tree, i think May 14 22:02:31 not just the app in isolation May 14 22:02:47 what tree? May 14 22:02:51 cupcake May 14 22:02:52 the whole android? May 14 22:03:03 i don't think Camera builds against the SDK, right? May 14 22:03:12 why not? May 14 22:03:29 Is this the right way to get the textSize dimension from an AttributeSet? I'm not sure I'm using obtainStyledAttributes properly: context.obtainStyledAttributes(attrs, new int[]{android.R.attr.textSize}, 0, 0).getDimension(android.R.attr.textSize, 12) May 14 22:03:36 it's sort of intimately tied to hardware features etc right now May 14 22:03:47 yes, we would like to abstract everything out but it's not there yet May 14 22:04:59 i'm getting an ArrayIndexOutOfBounds exception but I don't know why May 14 22:05:36 ctate: ah. i thought i could compile it against the sdk :/ May 14 22:06:04 'fraid not, the_alien May 14 22:06:10 wanted to play around with the gallery May 14 22:06:25 which seems to be in the Camera app May 14 22:06:33 yeah May 14 22:07:23 you always lose some data even on palm when switching apps or exiting.. like scroll position, focus, popup window state... ah the old days.. May 14 22:10:56 I think the problem is I need to figure out what to put at XX. All the tutorials reference R.styleable... but I can't seem to resolve R.styleable: context.obtainStyledAttributes(attrs, XX, 0, 0) May 14 22:11:51 android.R.styleable May 14 22:11:54 it's imported May 14 22:12:10 that, or they reference your own R.java file May 14 22:12:19 which means you need the attributes to be defined in res/ May 14 22:12:52 if all I want is textSize, which one do I need to import? May 14 22:14:00 also, I just did a grep of my entire 1.1 sdk and couldn't find styleable anywhere to import May 14 22:14:46 how do you do grep of entire sdk? May 14 22:15:52 sorry, my bad, I actually did a "find" on the assumption there would be a styleable dir or file, but i just realized that was erroneous May 14 22:18:31 ctate, romainguy__: i am OOO but working. i wasn't paying attention to irc for the last few hours though May 14 22:18:48 danfuzz: someone wanted to know if shutdown hooks are properly working with Dalvik May 14 22:18:59 and if so, when do we actually call them May 14 22:19:03 for nebulous definition of "properly" ;) May 14 22:19:08 :) May 14 22:19:59 yeah, i read the scrollback. i don't think dalvik ever honors them, but as was correctly surmised, it doesn't even generally get an *opportunity* to honor them even if it wanted to May 14 22:20:20 so it's kinda moot May 14 22:21:16 actually, i take part of that back: if you manage to actually exit cleanly, it will in fact run the shutdown hooks May 14 22:21:20 (just checked the source) May 14 22:21:20 the typical path even in 'clean' app teardown is that the framework invokes the onDestroy() callback on the last activity, then does a kill -9 on the process. May 14 22:21:29 oh, will it? nice. May 14 22:21:51 i guess the kill -9 is for the kill-for-memory case May 14 22:22:13 i'm not talking about what the framework does. maybe it kills -9 always May 14 22:22:18 oh wait, you're ... right, okay. May 14 22:22:33 but if something calls System.exit(), then it should get a proper vm exit sequence May 14 22:22:54 remember, to me the framework is "client code" May 14 22:24:32 it seems like a simple thing to do, retrieving the textSize attribute to pass to setTextSize(), but i don't see how May 14 22:24:41 am I going about it incorrectly? May 14 22:25:44 the textSize attribute of what? one of your views? May 14 22:25:59 one of my Paints actually May 14 22:26:47 ApiDemos has on example, LabelView, that seems to look up the textSize attribute of one of its drawable resources May 14 22:27:57 I was looking at the LabelView example, but I don't understand where R.styleable.LabelView comes from May 14 22:28:23 ah, it defines a new attribute itself called textSize May 14 22:28:25 i think it has something to do with what romainguy was talking about with attributes in my res folder, but not totally clear on what that means May 14 22:28:36 lessee, the Settings app does this: May 14 22:28:37 TypedArray styledAttributes = May 14 22:28:38 obtainStyledAttributes(android.R.styleable.TextView); May 14 22:28:38 styledAttributes.getValue(android.R.styleable.TextView_textSize, May 14 22:28:38 mTextSizeTyped); May 14 22:29:06 android.R.styleable doesn't seem to exist for me. there's com.android.internal.R.styleable, but I don't have access to that or something May 14 22:29:07 where mTextSizeTyped() is an object of type TypedValue() May 14 22:29:24 really? i thought android.R.* were a public namespace. May 14 22:29:26 hrm. May 14 22:29:52 android.R is public, but my ide can't find android.R.styleable May 14 22:30:19 hm May 14 22:32:01 what's in android.R.attr, emmby ? May 14 22:32:51 all kinds of stuff. android.R.attr.textSize, for one...? May 14 22:33:15 hmm. it looks like if you want to read the attributes like this, you have to declare so in your .xml May 14 22:33:46 in particular, look at the attrs.xml file for ApiDemos, and the section about LabelView down at the bottom, then at the LabelView.java implementation that uses them May 14 22:34:03 oh interesting. okay, will do, thanks for the pointer. I was pretty lost May 14 22:34:17 at which point you bring them into your own namespace, and refer to R.styleable.ClassName_textView etc. May 14 22:34:35 ctate: android.R is public May 14 22:34:40 but we don't put everything in there May 14 22:34:48 the styleables in particular are private May 14 22:34:50 yeah but it seems not to have any styleable blocks in the SDK May 14 22:34:51 I think May 14 22:34:52 right May 14 22:38:37 okay so now I have this in my attrs.xml: May 14 22:38:37 May 14 22:38:37 May 14 22:39:02 and my code now compiles with the following: context.obtainStyledAttributes(attrs, R.styleable.RatingBarView).getDimensionPixelOffset(R.attr.textSize, 12) May 14 22:39:27 but I still get an ArrayIndexOutOfBounds May 14 22:39:43 hmm May 14 22:40:17 you want getValue(...) instead of getDimensionPixelOffset(...) don't you? May 14 22:40:41 * ctate has never mucked with this stuff, so caveat lector May 14 22:41:41 in particular: context.obtainStyledAttributes(...) returns a TypedArray May 14 22:41:52 k, let me give that a try. I blindly copied the getDimensionPixelOffset from the LabelView example May 14 22:42:09 on which you would then call getValue(R.styleable.RatingBarView_textSize, outObjPointer) May 14 22:42:28 having first done outObjPointer = new TypedValue() May 14 22:43:57 YMMV May 14 22:49:29 so if I'm defining my own textSize, does that mean I use some other namespace when I'm setting it in the xml? eg. "foo:textSize" instead of "android:textSize"? May 14 22:50:00 yes May 14 22:50:17 hm, what's foo in this case then? May 14 22:50:25 the namespace you defined :) May 14 22:50:33 look at the examples in the SDK May 14 22:50:39 look at Home's sample for instance May 14 22:54:42 home uses a namespace called "home", but I don't see where that's defined. doesn't seem to be in attrs.xml or AndroidManifest.xml or styles.xml May 14 22:58:25 oh wait, do I just define the namespace to agree with the packagename in my AndroidManifest.xml? May 14 22:58:56 in my case, xmlns:goodfood="http://schemas.android.com/apk/res/com.goodrec.goodfood" May 14 22:59:17 success! May 14 22:59:21 jesus that was complicated May 14 22:59:32 lots of guesswork May 14 23:00:22 thanks for the help romainguy and ctate May 14 23:01:04 so now i know how to set up my own attributes and read them, but i guess it's still impossible to just retrieve the android attributes (because they're in a non-public package)? that's disappointing May 14 23:04:38 we'd rather make them public as we go May 14 23:04:46 rather than make them public right away and then support them forever May 14 23:06:54 http://www.pcworld.com/article/163874/samsung_unveils_its_first_google_phone.html?tk=rel_news May 14 23:07:19 I just found taht! May 14 23:07:20 yaya May 14 23:07:22 *yay May 14 23:08:46 romainguy: sure May 14 23:23:07 so there a lot of ex-palm folk on android now? May 15 00:17:21 Hello May 15 00:18:40 I have a question about listening to ports on Android. May 15 00:19:04 While on a wifi network I can listen on a port and connect via a browser. May 15 00:19:46 However on the Edge network a browser can no longer connect. May 15 00:21:55 Is it possible to have an Android program listen on a port and using the Edge network connect to the port? May 15 00:27:04 I don't believe you can do that. You'd need the ip address of your phone as provided by your telco and you'd need them to open a hole in the firewall which is unlikely. The usual way is to get the phone to "phone home" and then reverse tunnel through the connection May 15 00:29:19 Yeah I don't wnat to do that. May 15 00:29:41 I got the IP address using one of those sites. May 15 00:30:04 but it seems that the Edge network like you said is behind a firewall. May 15 00:31:30 I was hoping there was a range of ports that might be open. May 15 00:36:23 hello May 15 00:37:01 akash are you not the terminal root tutorial writer May 15 00:47:58 dmoffett: Not at all, the telco's keep them fairly closed. You'd have to do a call back to open the port. Once is it open you also have to keep it open as they timeout due to inactivity May 15 00:50:27 dmoffett: when you're on a cell data network, you're behind an opaque NAT sort of gateway May 15 00:50:40 under the control of the carrier May 15 00:51:06 (belated) May 15 00:51:24 I see, thank you, I suspected that might be the case but was hopeful. May 15 01:31:23 dmoffett: You might try UDP NAT hole punching. I haven't tried it on tmobile, but on Sprint I can get incoming connections just fine. May 15 01:32:09 thanks I will. May 15 01:33:18 First I have to figure what that means. :-) May 15 01:34:08 If google ever ships their XMPP API for Android, I believe it includes a UDP NAT hole punching service. May 15 01:38:34 dmoffett: It looks like there's a Java hole punching library. http://ulno.net/projects/jpunch - I haven't tried it out yet, but maybe it will run on Android. May 15 01:42:24 You know what would be sweet is if you could get Miredo running on an Android phone. Then you get an IPv6 address and NAT traversal for free. It requires tun/tap support in the kernel though. I don't know if any of the alternative distros include that. May 15 01:46:06 Oh actually, I bet the Android kernel doesn't have IPv6 support compiled in anyway, so nevermind. May 15 01:46:35 blanu: I asked that yesterday, heh. I doubt it does May 15 01:48:08 The Internet says no IPv6. And really why would it? Tmobile doesn't give out IPv6 addresses. May 15 01:48:35 It would be pretty cool though. May 15 01:49:14 it would be awesome. I could vnc to my desktop from any AP that hands out ipv6 addresses (which is all the ones I connect to...) May 15 02:39:27 mobile phone providers will probably be the first to switch entirely over to IPv6 May 15 02:40:00 kRutOn: probably pretty true **** ENDING LOGGING AT Fri May 15 02:59:58 2009