**** BEGIN LOGGING AT Sun Apr 05 02:59:57 2009 Apr 05 05:11:54 hi Apr 05 05:13:17 does anyone know, on eclipse, i click the icon of the bug (to start debugging) and it bring up this annoying window "Debug As Select a way to debug xxx" and I have to manually click on Android Application everytime... Apr 05 05:13:33 can I set this as a default option so it goes straight into debugging on the emulator without asking me this question? Apr 05 05:20:21 yes Apr 05 05:20:25 instead of clicking the button Apr 05 05:20:29 click the arrow next to it Apr 05 05:20:35 (the debug button I mean) Apr 05 05:21:20 yeah when i do that i get Debug As in the menu, but the only option under that is (none applicable) Apr 05 05:22:01 weird Apr 05 05:30:19 anyone know why these actual menu clicks might not work http://pastebin.com/d1be827cc Apr 05 05:32:21 you shouldn't be calling super.onCreateOptionsMenu() twice Apr 05 05:32:51 change line 4 to boolean=super.onCreate... Apr 05 05:32:58 and return boolean value Apr 05 05:36:54 yeah it all works except the onOptionsItemSelected function Apr 05 05:40:54 hrmm i even did System.out.print(item.getItemId()); inthat function and nothing gets printed almost like that function isnt getting called Apr 05 05:44:15 wait i think it's supposed to be onMenuItemSelected Apr 05 05:44:44 not onOptionsItemSelected Apr 05 05:44:52 just what Graham55 said Apr 05 05:45:13 ahh damn i cant believe i missed that :P Apr 05 05:47:29 actually i think i need onOptionsItemSelected, this is to do with the menu and not a dialog Apr 05 05:50:26 actually the documentation does say to use onOptionsItemSelected Apr 05 05:50:36 wait Apr 05 05:50:39 let me chedk Apr 05 05:50:41 check Apr 05 05:50:41 When you add items to the menu, you can implement the Activity's onOptionsItemSelected(MenuItem) method to handle them there. Apr 05 05:51:08 and i just did a test, they both get called on a click event for the Menu items Apr 05 05:51:12 no Apr 05 05:51:19 it's onMenuItemSelected Apr 05 05:51:54 it has a relationship with onOptionsItemSelected but you should not worry about it Apr 05 05:52:10 i tried that aswell but it still does not trigger :\ Apr 05 05:52:15 you can see an example I wrote here: http://code.google.com/p/shelves/source/browse/trunk/Shelves/src/org/curiouscreature/android/shelves/activity/ShelvesActivity.java Apr 05 05:52:51 schnoodles: by the way, do NOT put an Exit menu item in your app Apr 05 05:52:57 Android apps just don't do that Apr 05 05:52:58 so don't do it Apr 05 05:53:10 actually i have it working now Apr 05 05:53:34 yeah but don't use an exit menu :) Apr 05 05:54:16 ahh ok how come exactly :\ Apr 05 05:54:17 know what onOptionsItemSelected is used for then? Apr 05 05:54:22 so you arent meant to exit an app ? Apr 05 05:54:27 for context menus Apr 05 05:54:33 schnoodles: apps don't exit on Android Apr 05 05:54:38 schnoodles: the system takes care of that Apr 05 05:54:43 to get out of an app you just press back or home Apr 05 05:55:51 hrmm seems abit wierd :\ but ohwell Apr 05 05:56:12 it makes sense actually Apr 05 05:56:25 the idea is that if the user wants to come back to the app, there's no loading time Apr 05 05:56:27 since the app is here Apr 05 05:56:56 and there's just no reason to quit an app when you think about it Apr 05 05:57:00 if the system does it for you Apr 05 05:57:09 (since all apps are encouraged to save their state_ Apr 05 05:57:19 would that be memory intensive ? Apr 05 05:57:29 we always use all of the available memory Apr 05 05:57:32 but so what? Apr 05 05:57:43 when the system needs memory, it gets rid of a service or an app Apr 05 05:57:49 and lets you run the one you want Apr 05 05:57:52 but you don't notice Apr 05 06:00:05 i don't think it costs extra battery power to keep processing in memory either, only cpu power... Apr 05 06:00:15 i mean keep processes in memory Apr 05 09:48:44 Hi. If I compile android from source the "Google Maps" application isn't available. How can I enable it? Apr 05 10:04:16 Google Maps is closed source Apr 05 10:04:21 like Gmail and some others Apr 05 10:05:40 Graham55: yes, as I have supposed. But there is a way to install them in a compiled emulator? Apr 05 10:15:20 not that i know of Apr 05 10:15:42 JF's build has them installed though Apr 05 10:15:53 he might have the apk's in his download Apr 05 10:17:18 Graham55: yes, thanks. But another question: how I can download apps from market? I need to navigate it using the emulator? Apr 05 10:19:10 you want to access the Market from the emulator? Apr 05 10:21:56 no I need an application that read the location from gps and center the map. I have considered to use g. maps but in compiled emulator isn't available. So I found a similar app. on market I don't figure out how to download it ... sorry for my stupid-ness ... Apr 05 10:23:39 if the market is not your build i don't know how to download apk's Apr 05 10:24:34 unless you install them on another rooted g1 then copy them over from the SD Apr 05 10:31:59 ah ... interesting ... the situation is getting worse: I have installed an apk from a site that uses "com.google.android.maps" library but the "adb install" fails miserably with "Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]". This means that also binary version of google apis isn't present in an emulator compiled from source? Apr 05 10:37:29 filosofico: maps isn't open source Apr 05 10:38:45 TD: yes I know but if I develop an application using maps api how I can install it if the uses-library fails because isn't available in the emulator? Apr 05 10:39:12 you could try copying it from a standard sdk build Apr 05 10:40:58 TD: you are right ... (why why why I have chosen a thesis about android ... GRRR) Apr 05 11:03:21 filosofico: thesis? Apr 05 11:04:12 filosofico: you're doing masters thesis on android? Apr 05 11:04:19 gislan: yes Apr 05 11:04:39 filosofico: and what's wrong with that? I'm thinking about it myself (got around 1 month left to decide) Apr 05 11:07:36 gislan: because android is a partial-opensource project. Many things aren't available if you compile from source. And also, sorry there, but support is very low. In mailing lists you get a response more or less to 1 of 10 questions and usually the answer is "read the code" ... yes if I have weeks to spend to search in scattered 13000+ files what I need ... Apr 05 11:10:17 filosofico: ouch, sounds bad...that's what I'm afraid of too, I'm still not sure if android is good platform for my master thesis project. Thanks for the warning :) Apr 05 11:11:50 gislan: you are wellcome :-D ... Now I have a pretty high knowledge of android weirdness. I'm putting my hands in source code (adding functionalities and more) since last November Apr 05 11:12:24 what's your thesis subject? Apr 05 11:12:45 and I can certify that android is really weird sometimes Apr 05 11:13:36 A port to a completly different hardware, involving the need to expose to the apps new devices Apr 05 11:14:03 sounds interesting Apr 05 11:15:30 yes, it is ... if there aren't so much problems Apr 05 11:16:33 may I ask what hardware it is? Apr 05 11:22:17 a car Apr 05 11:31:15 filosofico: hmm, when i did my dissertation i didn't have any support at all :) Apr 05 11:32:19 TD: :-D Apr 05 11:33:31 TD: I only claimed the so-called "right to grumble" :-DD Apr 05 11:36:18 heh Apr 05 12:17:45 * TD wishes facebook would treat android as a first class citizen Apr 05 12:22:19 TD: you too grumble :-) Apr 05 12:23:22 yep, for sure Apr 05 12:28:20 about maps apis jar and copying them from an official system image: obviously extract and use the jar with a build of Android from open source would be in conflict with clause 3.3 of the Android Software Development Kit License Agreement. Now the question is: how to ask to google the right way to get that infamous jar? Apr 05 12:46:22 filosofico: are you building the source to run on a mobile device (like dev phone) or are you trying to run it on a virtual environment? Apr 05 12:48:53 Graham55: both ... the first attempt will be run it on an emulator and then on a EEE for testing ... my work actually is only for educational purpose (master thesis) Apr 05 12:53:21 Graham55: well ... I'm working on a master thesis about android but with the interest of a big company Apr 05 13:01:18 . Apr 05 13:48:01 filosofico: what type of emulator do you use... i would like to do the same here Apr 05 13:50:44 eclipse android plugin are nice. Apr 05 13:54:20 Graham55: I use the qemu shipped with source, at this time Apr 05 14:22:12 good luck with it, let us know how it goes Apr 05 14:22:58 Graham55: actually I'm testing this http://code.google.com/p/osmdroid/ Apr 05 15:03:04 http://www.hackinghardware.com/?q=node/28 native sdl Apr 05 16:03:48 sweet Apr 05 16:03:55 i haven't used SDL in years, but i had fun with it Apr 05 17:58:13 googool Apr 05 18:00:33 mibbit Apr 05 18:05:02 is there any app that call it self "fault tolerante"? Apr 05 18:06:06 it all depends on what you mean specifically. The download manager as an example knows how to resume downloads around losses of connectivity and network configuration changes. Apr 05 18:09:29 i mean that the app can recover from dropof messages, duplication, and other communication faults. Or i am wrong and the system is the only to provide this can service, not the app? Apr 05 19:35:32 Does anyone know the best way to create a dialog for selecting something from a list? Apr 05 19:35:54 bdodson: check out the Api Demos :-) Apr 05 19:38:54 the only ones I see use a ListActivity.. Apr 05 19:40:48 I think I'm close, but I'm getting a null pointer exception. I tried: 1) create a dialog 2) add a listView to it 3) call dialog.show(); 4) findViewById for the listview 5) bind my adapter to the listview Apr 05 19:41:02 but I'm getting null returned for (4) Apr 05 19:42:06 waht is your view name? Apr 05 19:42:53 (ListView)findViewById(R.id.profile_list); ? Apr 05 19:43:08 and its returning null? Apr 05 19:43:13 yea Apr 05 19:43:33 are you sure you make the dialoug rigiht? Apr 05 19:43:47 yea.. pretty sure Apr 05 19:43:55 dl.setContentView(R.layout.profiles); Apr 05 19:44:03 and that layout has an element called profile_list Apr 05 19:44:13 and I'm calling dl.show() Apr 05 19:45:55 uh...so the profiles layout has an element called profile_list? Apr 05 19:47:23 yeah Apr 05 19:47:38 are you sure thats the correct way to show that element? Apr 05 19:48:03 no :) Apr 05 19:48:14 you mean the dialog? Apr 05 19:48:32 I know that calling dl.show() displays it to screen, yes Apr 05 19:48:48 if I have simple TextViews or whatever it works fine Apr 05 19:50:37 maybe a Spinner will help get me out of this... Apr 05 19:55:40 bdodson: yeah a spinner might...ive used one before Apr 05 19:56:29 aaah I think I found it... Apr 05 19:56:38 was calling findViewById() and I think I need dl.findViewById() Apr 05 19:57:06 VICTORY :) Apr 05 19:57:10 thanks for the help Apr 05 19:58:05 lol i didnt even hlep Apr 05 20:01:26 talking it out helps :) Apr 05 21:57:52 hi Apr 05 21:58:52 someone here knows why in a emulator compiled from source applications using gps fails? Apr 05 22:10:13 How does R.java get updated with new/changed identifiers? Docs just say it gets auto-generated. I'm using Eclipse, and changed the name of a string in strings.xml Apr 05 22:23:29 halley: hit F5 on your strings.xml Apr 05 22:23:35 halley: or maybe F5 on R.java Apr 05 22:24:07 halley: I think the latter b/c it makes R.java re-check its dependencies and rebuild itself if need be Apr 05 22:25:04 On the raw xml view of strings.xml, it seemed to work. I'll try on R.java itself. Apr 05 22:26:04 Doesn't seem to do anything on R.java Apr 05 22:27:10 That helps, thanks, pjz. Apr 05 22:27:41 The Eclipse window for editing strings also doesn't update the left list right away when you change the name. Apr 05 22:27:42 * halley shrugs. Apr 05 23:14:54 some one knows why in an emulator compiled from source LocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER ... blabla) doesn't work? (gps provider seems always disabled ...) Apr 05 23:50:33 hi, does anyone know any way to play audio straight from memory, rather than from a file? Apr 05 23:51:23 e.g. if I generate some sound on the fly, or implement my own streaming protocol, and want to play it Apr 05 23:51:43 the only way I can currently see is to write it all to a big file on the SD card and then play it back from there Apr 05 23:51:51 but that is quite unsatisfactory Apr 05 23:53:33 qwandor: I don't know much about it, but I think the audio API isn't complete so tasks like that are pretty hard Apr 05 23:57:11 im on that bug report Apr 05 23:57:22 its not supported yet Apr 05 23:57:25 let me link you Apr 05 23:57:31 ah, thanks Apr 05 23:58:14 http://code.google.com/p/android/issues/detail?id=67&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary Apr 05 23:58:16 and Apr 05 23:58:43 I am wondering whether it might be possible to hack around it in the meantime by creating a named pipe and playing from that Apr 05 23:58:50 any idea if that might possibly work? Apr 05 23:59:02 heh not likely .. its an OS API restriction Apr 05 23:59:12 so unless you build custom firmware Apr 05 23:59:44 okay Apr 05 23:59:58 well I will vote for that bug anyway Apr 06 00:00:29 trust me .. im waiting on adjustable playback speed and direct audio buffer access to perform FIR filters on Apr 06 00:00:50 go add yourself for notification on the associated bugs Apr 06 00:14:02 hmm, one of the bug reports mentions something called AndroidClip which might be able to do it, but it seems to have been removed in the current API Apr 06 01:45:32 ok, i give up.. how the heck can i catch arbitrary key down/up events? adding an OnKeyListener to my top-level view and focusing it results in zero keys :/ Apr 06 01:50:28 meh, i'll just override dispatchKeyEvent in my app :P **** ENDING LOGGING AT Mon Apr 06 02:59:58 2009