**** BEGIN LOGGING AT Wed Jul 29 02:59:57 2009 Jul 29 03:20:57 My android.os.Application subclass's onTerminate() is never called. I am using it as a sort of singleton in memory holder for sharing by 4 Activities. And I need to clean up stuff in the Application subclass when the app is exiting. When do I do the cleanup if Application.onTerminate is not guaranteed to be called ? Jul 29 03:22:10 I think it is guaranteed, but android decides when to terminate your app Jul 29 03:22:29 so if there is leftover memory it will hang around for a while Jul 29 03:25:05 I think there's a way you can have the debugger simulate low memory Jul 29 03:25:20 try filling it up and see if that doesn't force it to call onTerminate Jul 29 03:25:30 Yeah. But I exited my app, then restated it & the values in the Application subclass is the same (which means it never onCreate() ) Jul 29 03:25:50 exiting doesn't kill it Jul 29 03:25:57 android makes that decision Jul 29 03:26:40 it's got a stack of apps and when you start one it checks to see if one is in the stack, if so it moves it to the top(becomes visible) Jul 29 03:26:54 when memory is used up it starts killing old apps Jul 29 03:32:30 I guess one way I can overcome this, is to reset the Application subclass when my first Activity is shown. Jul 29 03:43:39 Question guys. I have a need for a listview within a scrollview (other views on top of the list view that need to scroll with it) Jul 29 03:43:53 can anyone point me in the right direction for this? I'm having some layout issues doing so Jul 29 03:46:29 ScrollView can only have 1 child so you need to add another layout manager first and inside, place your other components as well as the listview Jul 29 03:48:42 mharkus: the ListView's internal scroller is causing some issues. layout_height="fill_parent" on the ListView doesn't do anything Jul 29 04:18:49 Let me know please if I can debug problem with video player Jul 29 04:19:14 I am looking around for few days, and I will appreciate some help Jul 29 04:20:48 I am trying to make apidemo video work Jul 29 04:21:41 log said that there is exception on the setDataSource (throwing ioexception) Jul 29 04:22:32 evenif the file exists by debuging it before the call to setDataSource(path) (using sysout) Jul 29 04:23:38 Or if you have any idea thta can point me on this issue Jul 29 04:25:58 Please =8( Jul 29 04:44:43 is there a way to figure out why my app is so large? Jul 29 04:44:54 the only image is the icon, and no sounds.. Jul 29 04:44:59 but it's still 260kb Jul 29 04:46:38 well, you can first look at the sizes of each .class file that was compiled Jul 29 04:47:28 then the resulting classes.dex Jul 29 04:47:30 and resources.ap_ Jul 29 04:47:43 (you could also just unzip the apk and look) Jul 29 04:48:36 I need help with watermarked Hero Jul 29 04:48:43 forgot i could unzip the APK :p Jul 29 04:48:44 thanks Jul 29 04:48:58 I want to load official rom Jul 29 04:49:02 MiZuNo: you probably want #android Jul 29 04:49:08 this is for android developers Jul 29 04:49:26 I figured I would go Tier 2 Jul 29 04:49:35 I guess that's not gonna work ? :-) Jul 29 04:49:59 tier 2? Jul 29 04:50:34 well like when you call isp for tech support then they say "let me check with our second level support" Jul 29 04:50:53 you think this is tech support? Jul 29 04:51:00 and then they charge your account for $90 Jul 29 04:51:01 * jasta rolls eyes Jul 29 04:51:03 eesh, i need to cut out all the classes i don't use :p Jul 29 04:51:58 well I can pay 20 $ via paypal :-) Jul 29 04:53:34 MiZuNo: i'm mildly offended that you think of us as tech support. you're definitely not going to get my help now :) Jul 29 04:54:44 I am sorry ... I can call you Android Guru is that gonna work ? :-) Jul 29 05:12:12 elprespufferfish: Check out proguard Jul 29 05:12:54 jasta can I just ask one question and I promise I wont bug you anymore ? :-) Jul 29 05:13:28 That was your question. Jul 29 05:15:06 I just want to know if euro version HTC hero could be updated to work on US 3g network via rom update Jul 29 05:15:48 MiZuNo: usually it's not a software issue Jul 29 05:15:51 but a hardware issue Jul 29 05:16:24 so frequencies are hardcorded cannot be changed with radio update or something Jul 29 05:16:40 could be Jul 29 05:16:55 MiZuNo, I believe HTC themselves could change it, but you probably can't Jul 29 05:16:55 sometimes it's the antenna itself which is fine tuned for specific frequencies Jul 29 05:18:15 romainguy you're fine under any frequency Jul 29 05:18:18 MiZuNo: Isn't AT&T's HSPA band compatible with Europe? Jul 29 05:18:31 I am in canada Jul 29 05:18:37 I need 850/1900 to work Jul 29 05:18:41 my Hero is 2100 Jul 29 05:18:50 It's only single band? Jul 29 05:19:13 yep Jul 29 05:20:28 :( Jul 29 05:21:06 I guess we should refer to them based on the UMTS band (http://en.wikipedia.org/wiki/UMTS_frequency_bands) Jul 29 05:23:19 So the Hero is Band I and VIII probably Jul 29 05:24:42 [23:16:50] sometimes it's the antenna itself which is fine tuned for specific frequencies Jul 29 05:24:47 I assume it would be that way most of the time Jul 29 05:24:50 would most likely cost less Jul 29 05:25:09 yep it does not have all three wcdma bands Jul 29 05:27:16 Heya Jul 29 05:27:24 Is 35 mb too large for an Android application? Jul 29 05:27:57 svm_invictvs: let's say it is unreasonable yes Jul 29 05:28:03 especially for G1 and HTC Magic Jul 29 05:32:17 hero has 128 mb ram Jul 29 05:46:20 Yeah Jul 29 05:46:32 romainguy: A client wants an app that's 35 megs. Jul 29 05:46:52 romainguy: I was like, "Eh, that's a little large. Howabout we put most of the content online and you download what you want." Jul 29 05:54:53 hey Jackmordal... how r u? Jul 29 05:56:13 i am to compile the Adroid source Jul 29 06:11:37 hi Jul 29 06:12:06 I don't have your answers sorry Jul 29 07:54:22 hello. Jul 29 07:56:59 hi Jul 29 07:59:03 I want to clear the text from an EditText when it's clicked on, if, the text is the default text. So i compare this to the default string: edit_postnr.getText().toString() and to clear it i do this: edit_postnr.setText("") This doesn't work though. Am i doing something wrong? Well, there must be something i'm doing wrong :P Jul 29 08:05:03 velcroman: are you trying to do hints? Jul 29 08:05:25 i.e. a text that hints the user, what he or she should input to the field? Jul 29 08:06:25 if you are, then I suggest you set the android:hint for the edittext :) Jul 29 08:08:28 madis: No, i have an EditText where the user is supposed to enter a post number/area code, and i want to have the text "Postnummer..." to be in the EditText until its clicked the first time Jul 29 08:08:49 it sound exactly like a hint, no? Jul 29 08:09:59 madis: It does :P I'll check that. Thanks for the help :) Jul 29 08:10:14 np :) Jul 29 08:31:08 Does a colon ":" mean something special in a string? Noticed i must put double colons to show one Jul 29 08:34:46 in strings.xml? Jul 29 08:35:30 I have single colon's in my res/values/strings.xml and it works great for me.. Jul 29 09:12:45 Trying to learn how to use ExpandableListView. Can I use it without the ExpandableListActivity ? Pointers to sample code will be much appreciated. Thanks Jul 29 09:13:07 you can Jul 29 09:13:53 @madis thanks. Will not hack up some code. Jul 29 09:14:03 I just implemented my own adapter to map the data, apart from some nuances in the adapter it works exactly like an ordinary listview Jul 29 09:14:39 Ok. Great to hear. Jul 29 09:27:32 hi Jul 29 09:50:49 when I start an activity from my app, is it guaranteed that onPause() of current activity is always called before the onResume() of the new activity? Jul 29 10:31:40 hi folks Jul 29 10:35:31 is there a way to search only contacts ive added, not ones google have synced?? Jul 29 10:36:07 ok, is there a reason why mapView.getController() should return null? Jul 29 10:36:21 For the ExpandableListView, is it possible to change/theme the icon that denotes whether the GROUP is expanded or collapse ? Jul 29 10:49:17 This is returning null. Why? _expandableListView = (ExpandableListView)findViewById( android.R.layout.expandable_list_content ); Jul 29 10:50:01 there is definitely something of that type and ID in the current layout xml file? Jul 29 10:52:17 wait Jul 29 10:52:21 you should be using R.id. Jul 29 10:52:26 In my layout file, there is android:id="@id/android:list Jul 29 10:52:47 That is the standard ExpandableListView id Jul 29 10:54:06 I'm not sure how to reference "@id/android:list". It doesn't appear in R.id.* Jul 29 10:55:05 should it be @+id/android:list? Jul 29 10:55:32 Let me try that. What I had was copied directly from the javadoc. :( Jul 29 10:57:39 it should be @+id/ Jul 29 10:57:53 not sure about the android prefix, however... Jul 29 10:58:18 if you want to access it through android.R.id.*, then you need the prefix, no_ Jul 29 10:58:19 ?* Jul 29 10:58:59 i believe the prefix is when you are using it in another layout, for example Jul 29 10:59:03 It doesn't work. I don't find "R.id.list" during autocompletion Jul 29 10:59:35 Why is this so hard ? Jul 29 11:00:01 what are you trying to access your list view element from? Jul 29 11:00:10 a ListActivity? Jul 29 11:01:05 ListActivity.getListView() might be what you are looking for? Jul 29 11:01:06 Testing something ... Jul 29 11:01:55 Eureka! It's android.R.id.list & I don't need a + prefix Jul 29 11:02:16 Yoohoo. Beer for everyone. It's on me. Jul 29 11:15:36 guys Jul 29 11:15:58 i see the Button class used to have setOnClickListener() method to add actions listener Jul 29 11:16:12 it doesn't anymore. what is it doing it now? Jul 29 11:16:58 um, button class still has the setonclicklistener method Jul 29 11:17:04 or what are you referring to? Jul 29 11:18:56 i can't find it Jul 29 11:18:59 in 1.5 Jul 29 11:19:07 it's still there:) Jul 29 11:19:35 http://developer.android.com/reference/android/view/View.html#setOnClickListener(android.view.View.OnClickListener) Jul 29 11:19:43 oh Jul 29 11:19:48 eclipse is crazy then :) Jul 29 11:20:05 actually all views can have onclicklisteners attached to them Jul 29 11:20:23 are you sure you're not importing some wrong button class? Jul 29 11:20:31 anyhoo, must split, bye Jul 29 11:20:35 if eclipse isn't giving you the option to add a setOnClickListener method then either you're casting it wrong or it thinks it's the wrong type of object Jul 29 11:21:02 or you haven't imported android.widget.button yet :) Jul 29 11:27:43 martin___: now it works Jul 29 11:27:45 strange Jul 29 11:27:47 by the way Jul 29 11:27:51 i'm having some troubles Jul 29 11:28:09 the button is displayed correctly Jul 29 11:28:20 but the findViewById is returning null Jul 29 11:28:23 that's weird Jul 29 11:31:55 i cannot attach a clicklistener Jul 29 11:35:06 your button's findViewByID is returning null? Jul 29 11:35:59 first step, same as somebody else earlier: there is definitely something of that type and ID in the current layout xml file? Jul 29 11:36:14 (the one that's currently inflated) Jul 29 12:08:09 how can I start an activity in a tab where another activity is running? Jul 29 12:41:10 So, I'm looking for community members to help kick-start yet another forum, but it's for UI design/layout of Android apps.. Jul 29 13:56:43 i have button i get displayed correctly in the UI but returns null by findViewById() in onCreate of an Activity, what could it be? Jul 29 14:52:59 when inserting data using to a database SQLiteDatabase.insert(table, hack, contentvalues), is this susceptible to sql injection? is there a function such as mysql_real_escape_string() for java? Jul 29 16:19:10 using a SimpleCursorAdapter as a ListAdapter for my ListView, is it possible to access some of the data before it is written to the ListView's row? I would like to be able to do a date format on one of the fields before it's place into the TextView Jul 29 16:36:38 martin___, look at the docs for ViewBinder Jul 29 16:38:05 thankyou Jul 29 16:45:37 should spelling mistakes in the docs be reported as bugs? Jul 29 16:48:28 Might as well submit patches ;-) Jul 29 16:49:38 martin___: If you don't have the Android OSP checked out, you can probably just mention it here and someone will fix it. Jul 29 16:50:13 jbq: Any plans for IPv6 or will a carrier have to work on that? Jul 29 16:52:31 kr: I don't have any visibility on IPv6, sorry. I've heard that it was "critically important by next year" since 2003. Jul 29 16:58:34 I'm reformatting this computer at the end of the week so I'd rather not check anything out that I'll need to download again :D Jul 29 17:00:20 jbq: hehe Jul 29 17:07:21 how do you reformat the computer? take out the motherboard and rotate it? :P Jul 29 17:08:19 aunn: please say you're joking ;p Jul 29 17:08:57 perhaps I should have mentioned reinstalling my OS afterwards? :P Jul 29 18:06:43 hey romain you around? Jul 29 18:07:37 oh nevermind Jul 29 18:16:29 hey everyone Jul 29 18:18:28 hmm just updated to cupcake in eclipse finally .. now all my views and buttons aren't resolving Jul 29 18:18:29 bah Jul 29 18:19:34 Hi jasta Jul 29 18:20:32 hi Jul 29 18:21:20 my app is throwing issues with the "R" now that im compiling in cupcake .. R.layout.main, etc. Jul 29 18:21:58 try refreshing your eclipse project Jul 29 18:23:19 hmm no dice Jul 29 18:23:41 oh wtf Jul 29 18:23:56 tried to open the xml and got: An error has occurred. See error log for more details. org.eclipse.wst.sse.ui.StructuredTextEditor.isBlockSelectionModeEnabled()Z Jul 29 18:24:12 DJTanchyon if shales thing doesnt work, try cleaning the project Jul 29 18:25:02 oh wait i think that worked :) Jul 29 18:25:07 heh Jul 29 18:25:13 *rollseyes* Jul 29 18:25:24 That's why I turn off auto-build Jul 29 18:25:30 indeed Jul 29 18:25:54 first time doing this AVD thing Jul 29 18:26:16 ooo yeah I found that a bit weird when I first did it, but kinda makes sense the AVD thing Jul 29 18:27:14 DJTachyon: 1.5 moved the R.java from src to gen Jul 29 18:27:15 ooo does anyone have any info on motodev, mainly with regards to what they intend to add onto the SDK? Jul 29 18:27:56 interesting Jul 29 18:28:28 DJTachyon: I imagine it was to avoid the accidental check-in of the generated R.java file Jul 29 18:29:36 good point Jul 29 18:29:56 sdcard.img resides easily in \tools still? Jul 29 18:30:24 where is it's native home now? Jul 29 18:30:28 kr: exactly, we already mark those files as "derived" in Eclipse so that team plugins don't check them in, but its cleaner for those not working with Eclipse Jul 29 18:30:55 DJTachyon: when you create an AVD, if you specify an sdcard size, it'll be stored in the AVD folder itself, so that each AVD can have its own sdcard Jul 29 18:31:04 oh now that is handy Jul 29 18:31:20 if you create sdcard.img manually, you can give its path to the AVD during creation so that mutliple AVD share the same sdcard Jul 29 18:31:32 rockin ... Jul 29 18:32:52 when inserting text strings that the user can enter into the database with SQLiteDatabase.insert, will putting things into the ContentValues object escape quotations and back slashes and the like? Jul 29 18:33:33 xavd: is it possible to make sdcards within eclipse or is it outside of eclipse it needs to be done? Jul 29 18:34:11 gauntface: eclipse 0.9.1 has a (very simple) AVD wizard that allows you to create sd cards when you create the AVDs Jul 29 18:34:28 by eclipse 0.9.1 I meant ADT 0.9.1 Jul 29 18:34:57 ooo okies kool, I remember doing it manually a long time ago when first playing with android Jul 29 18:35:48 I'm trying to search multiple different web apis and combine the results. Has anyone thought about how content providers which lazily load their data (but may or may not know the total number of items right away) would work? Jul 29 18:37:10 sweet now to target 1.5 Jul 29 18:37:59 Combining multiple content provider results into a single ListAdapter seems doable, but I'm not sure about notifying the users of a Cursor that parts of the data have now been loaded Jul 29 18:39:47 The cursor's ContentObserver doesn't provide enough details about what changed Jul 29 18:41:57 kenleycapps: where do you turn off the auto-build in eclipse? Jul 29 18:42:45 Weird!! I am still getting An error has occurred. See error log for more details. org.eclipse.wst.sse.ui.StructuredTextEditor.isBlockSelectionModeEnabled()Z .. when I double click on an .xml in my project Jul 29 18:42:54 DJTachyon: cleaning the project help you solved "See error log for more details. org.eclipse.wst.sse.ui.StructuredTextEditor.isBlockSelectionModeEnabled()Z" the issue? Jul 29 18:43:05 duh, u just answer ;) Jul 29 18:43:34 it helped me solve the R. issues Jul 29 18:43:42 not that Jul 29 18:43:48 DJTachyon: which version of Eclispe are you running? Jul 29 18:44:00 ganymede Jul 29 18:44:14 3.4.2 Jul 29 18:44:29 hmm this should work. which package did you install? Jul 29 18:44:40 aunn: the "Build Automatically" option is in the Project menu Jul 29 18:44:42 DJTachyon: for "See error log for more details. org.eclipse.wst.sse.ui.StructuredTextEditor.isBlockSelectionModeEnabled()Z" Jul 29 18:44:44 http://groups.google.com/group/android-developers/browse_thread/thread/f4ba97f99c3b470c/f4add52447b4a06f?show_docid=f4add52447b4a06f&pli=1 Jul 29 18:44:46 1.5r3 Jul 29 18:44:55 thx shales Jul 29 18:44:58 DJTachyon: I meant wich Eclipse distribution Jul 29 18:45:11 i was afraid of that Jul 29 18:45:16 win32 Jul 29 18:45:20 DJTachyon: you have to revert back your eclipse update Jul 29 18:45:29 look at the link, i have provided Jul 29 18:45:39 it says to reinstall everything Jul 29 18:45:50 i have worked on that thing the day before yesterday Jul 29 18:45:55 DJTachyon: I mean which packaging (Java Dev, SDK, RCP, ...) Jul 29 18:46:01 you don't have to Jul 29 18:46:15 DJTachyon: when you go there: http://eclipse.org/downloads/ you have a lot of choice Jul 29 18:47:05 its the java one Jul 29 18:47:16 same one i used up til cupcake Jul 29 18:47:38 then i followed the instructions for updating the ADT plugin Jul 29 18:47:45 and migrating Jul 29 18:48:12 xml core 3.1 then? Jul 29 18:48:36 DJTachyon: during ur ADT update u have upgraded the WST XML Core to 3.1 Jul 29 18:48:53 yeah it seems that way Jul 29 18:48:58 ill revert and give it a shot Jul 29 18:49:21 i can update everything but that? Jul 29 18:50:23 for me, i am on ubuntu and running the eclipse from extract, i was not able to do reverting .... so i ended up getting eclipse 3.5 and starting from scratch again to set up my enviroment Jul 29 18:50:46 ah Jul 29 18:50:53 hello Jul 29 18:51:16 o/ Jul 29 18:51:38 Hi Jul 29 18:51:43 what filesystems (other than yaffs2) has android been deployed with? Jul 29 18:52:59 wtf4 Jul 29 18:53:24 * neruda looks suspiciously at DJTachyon Jul 29 18:53:39 im callin bs Jul 29 18:53:46 but nice try Jul 29 18:54:10 anyone else? Jul 29 18:54:20 ;) Jul 29 18:54:31 what im really after is whether or not Android is locked into yaffs2 on any level Jul 29 18:54:34 why dont you ask in #android Jul 29 18:54:46 this is the app dev chatroom Jul 29 18:55:12 sometimes knowledgeable ppl are in this room Jul 29 18:55:15 Am I right in thinking that the GPS does not have a bearing field? Jul 29 18:55:17 * neruda looks away from djtachyon Jul 29 18:56:00 argh .. eclipse won't revert. It says it is buy it won't Jul 29 18:57:26 bah im about to install eclipse 3.5 Jul 29 19:00:42 okay galileo it is Jul 29 19:01:08 DJTachyon: yeah I think it's easier than updating a component of 3.4 Jul 29 19:01:50 or downdating as it were Jul 29 19:07:58 neruda: how do you find out that it is yaffs2 Jul 29 19:08:35 just curious Jul 29 19:09:50 anyone know, on rooted phones, do the apps get root permissions too? if not is there a way to elevate them to root? Jul 29 19:10:00 no, they do not. Jul 29 19:10:11 you can attempt to use su to run a script to do things Jul 29 19:10:18 this is how apps that say "root only!" work, as i understand Jul 29 19:10:49 ah I see, thanks lov, I'll try find the source to one and see what I can do Jul 29 19:34:47 bingo new install of eclipse works Jul 29 19:34:50 what a pain :P Jul 29 19:51:17 guys how is it possible that my app is force closing on an SQLiteConstraintException on the line here inside the try {} block? :S http://pastebin.com/d3cabad1 Jul 29 19:52:20 I get this pointing to the line in the try: 07-29 19:48:08.151: ERROR/Database(1321): android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed Jul 29 19:52:40 is it maybe not an SQLiteConstraintException? Jul 29 19:52:49 try catching Exception there, and logging what pops out? Jul 29 19:54:21 the catch catches nothing, the log message was never printed Jul 29 19:54:34 so what exactly happens? Jul 29 19:55:00 the trace points back to the line inside the try block, with an SQLiteConstraintException Jul 29 19:55:15 but the catch {} doesn't catch? :S Jul 29 19:56:10 the most recent of my methods on the call stack is definitely that insert, that's the line that the exception is thrown on Jul 29 19:56:28 what would cause a catch to not catch? :S Jul 29 19:59:12 oh, interesting, console is now telling me that my app class does not exist after I uninstalled it from adb uninstall Jul 29 19:59:32 eclipse isn't installing it manually Jul 29 19:59:41 *automatically Jul 29 20:01:01 restarted the emulator, problem has disappeared Jul 29 20:04:31 lol martin__ its always the way Jul 29 20:09:29 isn't it the typical windows solution ;) Jul 29 20:11:31 it seems the problem of the catch was caused by eclipse and the emulator having communication problems, it said it started the app when i introduced the catch line but it seems to not have installed it, and then subsequently refused to install it even when it didn't exist any more Jul 29 20:11:57 so the problem I found was because it was running an older version Jul 29 20:17:21 aunn I get it on mac os x too :-P Jul 29 20:18:12 Im trying to setup gd old ubuntu but Macbook, as always, is giving me grief, either way I'll have problems lol Jul 29 20:18:58 Hi, in my quest to use the emulator to do locations, I'm trying to run the "android list targets" command, but it tells me that "Error: Unable to parse SDK content." Any ideas on why this might be? Jul 29 20:20:00 aunn, gauntface, the problem has come back :P and it did successfully install this time Jul 29 20:20:38 martin__: are you catching a specific exception or just "Exception"? Jul 29 20:21:04 the try {} block is executed, the catch (Exception e) {} block is not executed, the SQLiteConstraintException is thrown, and my finally{} block is executed Jul 29 20:21:12 martin__ sometime, you have to go into the emulator shell and remove the left over of unclean uninstall, iirc. it happens to me before, Jul 29 20:21:41 I added some code this time and it was successfully installed on the device as I've seen it being executed Jul 29 20:22:39 uninstalling via adb uninstall successfully removes my app from the device, the directory is now not found... trying again Jul 29 20:23:30 hah, the emulator is doing the same thing again, now I have uninstalled it eclipse still thinks it is on the device Jul 29 20:24:12 Application already deployed. No need to reinstall. <-- then --> New package not yet registered with the system. Waiting 3 seconds before next attempt. Jul 29 20:26:00 clean project? Jul 29 20:26:40 yeah I found that uninstalling the app on the emulator confused eclipse and required a reinstall on eclipse, so any solution you find now will be helpful lol Jul 29 20:27:11 ill brb next attempt to install ubuntu Jul 29 20:27:15 well I swear I've done it before and there was not a problem Jul 29 20:33:50 what do you guys think of the zii egg platform ? Jul 29 20:38:45 omg Jul 29 20:38:54 I have been using eclipse for over two years Jul 29 20:39:04 and I just realised you can control-click functions and variables Jul 29 20:39:27 this makes life so much easier! Jul 29 20:39:48 hi folks Jul 29 20:40:07 control-click ? Jul 29 20:40:08 what is the proper way to handle exceptions in an AsyncTask? Jul 29 20:40:27 hold down control and click on the name of a function or variable, it'll take you to the definition of it Jul 29 20:40:47 ho ok Jul 29 20:40:48 if an exception occurs in doInBackground the exception is swallowed and i can't react to it in my ui Jul 29 20:41:15 yea i think pretty much all token can be "control-clicked" Jul 29 20:41:25 martin___: I just click and use F3 Jul 29 20:42:05 well if I am calling a function from another class, control, click, function definition appears Jul 29 20:42:06 martin___: right click a function and click "Open Call Hierarchy" Jul 29 20:42:17 then just keep expanding, and expanding, and expanding... Jul 29 20:42:26 :-) Jul 29 20:42:28 soulreaper_: you return info in doInBackground so that your results method can figure out if it errored, etc Jul 29 20:42:40 yeah, I've used that before.... I just never realised you could hold control :P Jul 29 20:42:41 any ressource for game dev on android ? Jul 29 20:42:48 web page book something ? Jul 29 20:42:57 zhobbs: put the generic type result can only be of one type Jul 29 20:43:24 how does one go about determining when a text field is maxed out? for instance, I'd like to know when a field that can hold only 2 character is typed so that I can change focus to the next object Jul 29 20:43:42 soulreaper_: yeah...you could create a class that has a result status, and the results themselves and pass it back Jul 29 20:44:13 zhobbs: sounds tedious. one could just keep an exception in a objects field Jul 29 20:44:30 in the AsyncTask object i mean Jul 29 20:44:39 (which you have extended) Jul 29 20:44:57 soulreaper_: sometimes I populate a List<> or Array that is a member of the activity, and return boolean for sucsuss/fail Jul 29 20:45:24 zhobbs: yeah i would go along that route as well Jul 29 20:45:31 are there any adepts of the convertView pattern in here? Jul 29 20:45:37 you can use and exception to tell when the field is populated with the max entries? Jul 29 20:45:54 i hope the handling gets improved in the next iteration of the class. at least along the lines of the Future.get() method Jul 29 20:46:05 I seem to be doing most of the same effort twice in getItemViewType() and bindView() Jul 29 20:46:08 philosopher: there was a good talk at google i/o about developing games Jul 29 20:46:14 you might want to try and find it Jul 29 20:46:52 lov i just watched it Jul 29 20:47:03 lov: but the code source is not yet available Jul 29 20:47:13 I would think I would get a chance to put over some of the effort through the tag or something, but there does not seem to be any way Jul 29 20:47:46 pjv: what class are you extending? Jul 29 20:48:25 ResourceCursorAdapter Jul 29 20:49:50 in getItemViewType I basically do a getCursor() on the position and then ContactAndReminder reminder=new ContactAndReminder(cursor, ContactsAndRemindersListActivity.this, true); (which is pretty expensive) to determine the type Jul 29 20:50:58 then in bindView I need to do that final ContactAndReminder reminder=new ContactAndReminder(cursor, ContactsAndRemindersListActivity.this, true); again to a) determine the type, and b) get all the data I want to put in the item Jul 29 20:51:07 anyone here have the creative zii device? Jul 29 20:52:17 (a) is not necessary as I can also derive the type from the view, but I still need the reminder object to get to my data Jul 29 20:53:43 I was thinking on putting the first reminder object in the tag (viewHolder pattern) but getItemViewType is generally called too early/separate for that Jul 29 20:53:47 any ideas? Jul 29 20:53:48 How much internal memory does the g1 have? Jul 29 20:53:53 LIke 70-80 megabytes? Jul 29 20:54:10 ram? 100MB available to the kernel. Jul 29 20:54:43 No, storage for apps. Jul 29 20:55:37 What about the G2? Jul 29 20:59:36 G2? Jul 29 20:59:42 lol Jul 29 21:00:09 you mean sapphire? Jul 29 21:00:16 slash magic slash ion slash whatever? Jul 29 21:00:20 oh, an htc magic Jul 29 21:01:13 whats the best way to draw a sprite with animations on a canvas, with surface view or a view? Jul 29 21:01:23 IIRC; it's identical to the dream in hardware, less the keyboard Jul 29 21:01:57 wlfshmn: it's got about 300mb internal memoruy Jul 29 21:01:58 *memory Jul 29 21:02:52 does anyone know when they will have more android dev phones? Jul 29 21:03:08 Theyre releasing like 20 new android phones this year Jul 29 21:03:09 google says 20+ by the end of the year Jul 29 21:03:20 lov: hmm, seems you are correct. I retract my erroneous statement Jul 29 21:03:36 do the android tools work in eclipse 3.5? Jul 29 21:03:42 deebo: try and see :D Jul 29 21:03:42 deebo: yes Jul 29 21:03:44 GWT/app stuff doesnt Jul 29 21:03:53 oh goodie, guess ill upgrade then Jul 29 21:04:25 deebo: atöeast I've ruin into no problems, and I use 3.5 Jul 29 21:34:44 woot!!! Jul 29 21:34:56 I finally got multipart post to work Jul 29 21:36:22 use httpclient :) Jul 29 21:36:46 you use httpclient! Jul 29 21:38:54 most definitly Jul 29 21:40:31 Can someone help me with a bit of code? Jul 29 21:41:10 Ill link it Jul 29 21:41:21 no, this room exists to belittle you and make fun of your variable names Jul 29 21:41:34 DON'T EVEN POST IT IF YOU PUT UNDERSCORES IN YOUR CLASS NAMES!!!! Jul 29 21:42:39 http://pastebin.com/d78bed735 Jul 29 21:42:49 Im just creating to create a sprite on a canvas Jul 29 21:43:47 do you get a null pointer exception on line 30? Jul 29 21:44:22 martin___: line 44 would cause the NPE. not 30. Jul 29 21:44:42 I get a force quit as soon as i run it Jul 29 21:44:58 bc canvas is null Jul 29 21:45:07 yes, you need to initialise your Canvas object (I've never used one before) but you can't do something with a null object Jul 29 21:45:20 and joakime, :) Jul 29 21:45:48 are you making a jame? Jul 29 21:45:53 game rather Jul 29 21:46:04 package org.game.adventure Jul 29 21:46:50 http://www.youtube.com/watch?v=U4Bk5rmIpic Jul 29 21:46:54 it's waaaaay too long Jul 29 21:46:55 not really Jul 29 21:47:14 but the guy talks about canvas vs different types of opengl drawing Jul 29 21:47:14 im way too nooby to make a game Jul 29 21:47:27 I just want to animate a sprite on the screen Jul 29 21:52:02 patrick91, lol Jul 29 21:52:09 :) Jul 29 22:13:25 runtime exceptions in a try / catch block should still be caught right? Jul 29 22:15:50 not from the try block, they will already be caught. right? Jul 29 22:16:39 I am trying to insert some data into my database which has some unique composite keys set so as to avoid duplication Jul 29 22:17:30 I am simply running the insert operation on some elements and ones that are already there will throw an SQLiteConstraintException Jul 29 22:17:48 I could check if the items exists before inserting but I imagined it would be uneccessarily costly Jul 29 22:18:16 however, when I put my insert line in a try block and try to catch SQLiteConstraintException Jul 29 22:18:23 the catch() block is never called Jul 29 22:18:31 even when I try to catch Exception Jul 29 22:19:20 and I don't understand why :) Jul 29 22:20:45 is it throwing the exception? Jul 29 22:21:16 yes, I get lots of nice red SQLiteConstraintExceptions appearing in my LogCat output pointing to my insert line Jul 29 22:22:22 are you catching Exception, or SQLiteConstraintException? Jul 29 22:22:39 Exception, since catching SQLiteConstraintException did not do anything Jul 29 22:23:00 my try{} code is executed, my catch {} code is not, but my finally {} code is Jul 29 22:23:12 yet the exception clearly appears in LogCat Jul 29 22:23:13 final is always executed Jul 29 22:23:24 paste it Jul 29 22:25:00 a simple solution would be just to wipe my database and re-insert the non-changed things, but I had planned on only changing the updated data Jul 29 22:25:08 (I am editing the notepad example to produce an rss reader) Jul 29 22:26:23 http://pastebin.com/d3252fcb3 Jul 29 22:28:11 I know that I could fix it by wiping the database, but I would like to know why it is happening because it seems very odd to me Jul 29 22:29:35 the sqlite object must be handling the errors Jul 29 22:29:46 and not rethrowing them Jul 29 22:30:20 there is probably a way you can tell your database to throw an error on a duplicate insert Jul 29 22:31:12 should not all exceptions be thrown up though? Jul 29 22:31:48 they should be thrown up OR handled Jul 29 22:31:57 you weren't going to rethrow it, were you? Jul 29 22:32:31 point taken Jul 29 22:36:28 thankyou Jul 29 22:37:02 it is confusing and I cant' find that error code for sqlite anywhere Jul 29 22:37:30 if it bothers you I would post this in stack overflow. probably a lot of guys there with sqlite experience. Jul 29 22:38:20 I think I was confused by my assumption that all classes I used who threw errors would eventually throw them at me Jul 29 22:38:38 makes sense Jul 29 22:39:29 when inserting text using ContentValues I should manually escape slashes and quotation marks? Jul 29 22:41:01 hey guys ! Jul 29 22:41:15 is there a way to emulate a wifi-connection ? Jul 29 22:41:39 for what purpose? Jul 29 22:42:55 i wanna write an app that sends and receives data, and write a secon app (not for android) that just provides data externally, just for emulating a second android device Jul 29 22:43:36 or even start two emulators that communicate to each other via an emulated wifi ? Jul 29 22:43:46 Hi, all. Is there a way to get ID3 tags out of an MP3? There's no results on the android site for "ID3." Jul 29 22:43:59 adag444: make a second avd to start two emulators Jul 29 22:44:00 i dont have an android-device yet, that's why i wanna try this Jul 29 22:44:18 adag444: so you don't need wifi, just an internet connect. correct? Jul 29 22:44:19 Hey guys, does anyone have much experience with using 3rd party .jar's that have files in the META-INF directory? Jul 29 22:44:50 Queue29, is see, yes, but can they, so to say, tunnel a wifi connection, so this might work on two real devices as well ? Jul 29 22:44:57 adag444, the emulator should find the internet fine. Make sure to add the permission to use the internet in your AndroidManifest.xml Jul 29 22:45:22 do you mean like set up an ad-hoc network? Jul 29 22:45:32 yes, i later want this app to run on two htc-phones for example, which connect to each other via a private network Jul 29 22:45:32 you can use ports just like any JAVA app Jul 29 22:45:41 adag444, you can use java.net sockets Jul 29 22:45:41 Queue29 yes ! Jul 29 22:46:03 well that's harder :) Jul 29 22:46:30 but as soon as the connection is done, communication should be transparent, shouldnt it ? Jul 29 22:46:37 adag444 is confused, he does not want to set up an adhoc network Jul 29 22:46:48 I hope not Jul 29 22:46:50 anyone know how I can cancel the IME (on screen keyboard)? Jul 29 22:47:11 i just wanna have two guys, sitting in one room, each guy has an htc phone and they play my app against each other Jul 29 22:47:16 zhobbs_: that's a bad idea considering the g1 is the only phone with a physical keyboard Jul 29 22:47:23 he wants to communicate data between 2 devices, one of which may be android. your optoins are java.net sockets or apache http client Jul 29 22:47:33 adag444, can you assume they have a wifi router? Jul 29 22:47:45 NO WIFI!!! Jul 29 22:47:46 Queue29: well, if I have a form field I'd like to kill the IME when they hit the "submit" button Jul 29 22:48:11 it's just a connection, the actual network is irrelivant Jul 29 22:48:19 DON'T MAKE ME BUST OUT THE OSI STACK!!!! Jul 29 22:48:21 whaledawg, if they're both on the same network, they can connect using sockets on the LAN Jul 29 22:48:39 sockets will work no matter what Jul 29 22:48:47 they use ip addresses and ports Jul 29 22:49:04 and how would they know eachothers ip adds without being on a network? Jul 29 22:49:11 yeah, i thought like that, that both phones share the same network, i dont have a device so i dont really know whats possible Jul 29 22:49:11 right Jul 29 22:49:15 if you really make it wifi dependant then the wifi router has to know who you both are. Jul 29 22:49:27 queue29: you have a matchmaking server Jul 29 22:49:28 but yo ucan use zeroconf or something otherwise. We've done it on the iphone but not yet android. Jul 29 22:49:57 whaledawg: i think that defeats the purpose of just communicating between phones Jul 29 22:50:20 queue29: have you have have a warcraft lan party? Jul 29 22:50:40 it's often easier to use battle net to set up the games Jul 29 22:51:00 and then have the devices communicate themselves Jul 29 22:51:10 the more work you remove from the phone the better Jul 29 22:51:15 yea, but if they don't have a router, they'd have to connect using 3g Jul 29 22:51:35 would they still be able to set up sockets to eachother over wifi? Jul 29 22:52:04 using adhoc? Jul 29 22:52:12 BLARG!!!!!! Jul 29 22:52:14 I doubt it Jul 29 22:52:17 it's not over wifi Jul 29 22:52:24 it's over whatever their connection is Jul 29 22:52:34 whaledawg, we understand, we're talking hypothetically whether or not adhoc can work Jul 29 22:52:36 i see, i know too little about that stuff, have tro read it up, but thanks guys ! Jul 29 22:52:55 to connect directly over wifi requires that you communicate with the router directly. crazy hard and unreliable Jul 29 22:53:09 that's not true Jul 29 22:53:21 if you're connecting to the same router, you both have local IPs that are visible to one another Jul 29 22:53:40 you can use something like zeroconf to issue broadcast requests over the LAN as wel Jul 29 22:54:07 that's not connecting over wifi, that's a regular socket. the router should send your data directly between you Jul 29 22:54:18 but it's not directly connecting over wifi Jul 29 22:54:29 correct, it is not an adhoc wifi connection Jul 29 22:54:36 but it is "connecting over wifi" Jul 29 22:54:41 it's just a regular socket Jul 29 22:54:48 the wifi aspect is incidental Jul 29 22:54:55 but true :) Jul 29 22:54:59 YOU'RE GIVING ME ASPERGERS!!!! Jul 29 22:55:08 you deserve aspergers Jul 29 22:55:21 so wait, can't they just connect over bluetooth (/s) Jul 29 22:55:53 queue I will hunt you down and make you write fortran Jul 29 22:55:54 yea, I was wondering that, I don't know Jul 29 22:56:09 :p Jul 29 22:56:10 I don't think so Jul 29 22:56:36 you could use the bluetooth api to connect 2 phones Jul 29 22:56:42 but it would be a lot of work Jul 29 22:57:09 currently android only supports talk and stereo audio over bluetooth, I think Jul 29 22:57:19 anything else you have to do yourself Jul 29 22:57:33 you know, crazy stuff like file uploading. Jul 29 22:57:37 but if i wanna connect to an iphone for example, they dont allow access via bluetooth to other than apple devices Jul 29 22:57:53 WHY DO I HAVE TO PLUG MY PHONE INTO A USB PORT LIKE A PRIMATE?!?!?! Jul 29 22:58:10 androis is open adag Jul 29 22:58:22 but iphone isnt Jul 29 22:58:24 there are a bunch of apps for connecting other bluetooth devices Jul 29 22:58:30 on android Jul 29 22:58:37 any decent libraries? Jul 29 22:58:44 that I do not know Jul 29 22:59:02 queue, I'll stop hunting you if you write a bluetooth keyboard app Jul 29 22:59:20 I want to tape my g1 to my face and make it a full workstation Jul 29 23:00:13 whomever asked about ID3 tags Jul 29 23:00:43 I can't find anything, but if you download the android source you can look at how the native player works Jul 29 23:00:58 or maybe someone has their player source code posted Jul 29 23:02:05 i think about getting the samsung galaxy, anyone has experiences with it ? Jul 29 23:02:46 gaahh Jul 29 23:03:02 no but it isn't a google experience phone, so i probably will never touch it Jul 29 23:03:30 does it have bing? Jul 29 23:04:41 that would be funny, until you needed to search for something Jul 29 23:04:48 what do you mean with google experience phnoe ? Jul 29 23:05:47 it's not branded Jul 29 23:05:52 no gmail and whatnot Jul 29 23:05:58 no ota updates Jul 29 23:06:30 ah Jul 29 23:09:22 i'm trying to find the google suggest implementation in the android source code, but so far haven't found it Jul 29 23:09:53 i see the Browser looks up searchmanager, and then this uses a contentresolver and returns a cursor from somewhere Jul 29 23:10:05 and so it goes on and on.. :p Jul 29 23:11:26 so you found it? Jul 29 23:12:12 no! Jul 29 23:12:27 there's just contentresolvers all over the place Jul 29 23:12:31 no cursor Jul 29 23:12:52 that's what ultimately returned, so i'd thought it would be somewhere Jul 29 23:13:09 there has to be a cursor or array Jul 29 23:13:21 because it's bound to the search text field Jul 29 23:14:10 yep, there's a cursor that combines two cursors Jul 29 23:14:20 one straight-forward db-cursor to lookup bookmarks Jul 29 23:14:37 the other cursor is some kind of google-suggest cursor Jul 29 23:14:49 there you go Jul 29 23:15:13 exactly Jul 29 23:15:15 :p Jul 29 23:38:46 ok, seems like i finally "found" it Jul 29 23:38:54 com.android.googlesearch.SuggestionProvider Jul 29 23:39:05 and it's not in the repository :/ Jul 29 23:41:46 birgerb, pretty much anything com.* is a private API and you can't/shouldn't use it in your app Jul 29 23:42:58 developer.android.com has a complete public API reference Jul 29 23:43:57 birgerb: what is it you are trying to do? Jul 29 23:44:06 i found it, in the GoogleSearch package :) Jul 29 23:44:41 i'm just trying to make a similiar suggest dialog Jul 29 23:44:55 so, just hunting for it for reference Jul 30 01:12:14 Hi, I'm trying to develop my first android app (I'm normally a python guy so, a little new to Java/eclipse). When I run my app, I get "The application has stopped unexpectedly". I'm looking everywhere for an exception or stack trace, but I can't find one. How can I see the details of the error that occurred? Jul 30 01:13:29 savid: run adb logcat in a shell Jul 30 01:13:31 have you read about LogCat? Jul 30 01:13:49 oh, ok. Is it not possible to view logcat from within eclipse? Jul 30 01:13:54 yes it is Jul 30 01:14:05 two ways, 1.) click on the debug perspective in the top right Jul 30 01:14:21 then there should be a panel /tab labeled "LogCat" with a yellow icon Jul 30 01:14:24 savid: it is, though personally, it has pretty much crashed eclipse everytime i tried to access it Jul 30 01:14:26 also put try/catches around what might be throwing an exception Jul 30 01:15:06 2.) you can add it to the Java perspective by using Window/Show View/other/Android/LogCat and drag it to where you'd like it Jul 30 01:15:47 Ahh. there it is :) thanks martin___ Jul 30 01:20:56 I should register a nickname so I don't have to have more underscores than all the other martins Jul 30 01:27:15 ugh. I so wish I could develop android apps in python :-( Jul 30 01:27:56 I know it's just because I'm not as familiar w/ Java, but Java and python are at such opposite ends of the spectrum :-P Jul 30 01:28:09 oh god no they aren't.. Jul 30 01:28:52 savid: you might be interested in: http://code.google.com/p/android-scripting/ Jul 30 01:29:43 mikem`, yeah I saw that, though it doesn't look like that's intended for full-blown apps Jul 30 01:30:59 savid: yeah, maybe. i haven't looked into it myself, just noticed it some time ago Jul 30 01:32:02 looks like it's fun to play around with .. the examples are cool.. but it looks like a tinkering thing for now. I think the jythronroid project looks more promising, but it's got a looong ways to go before its usable. Jul 30 01:36:08 I'm sure it's just due to my newbieness, but it just gets frustrating when I get a NullPointerException that tells me nothing about the exception but for the line on which it occurred... Jul 30 01:36:26 do a printStackTrace() .. Jul 30 01:37:00 well, if that happens, click on the variable and it will highlight all the places it's used, a null pointer exception means your object hasn't been initialised by the time it's used Jul 30 01:37:24 yeah, what information is there to give you about an NPE? Jul 30 01:39:22 KNY I dunno, I guess I was hoping to see what was actually null... For example, on the line: mGameView.setTextView((TextView) findViewById(R.id.text));, was it mGameView that was null or whatever I'm passing to it? Jul 30 01:39:42 mGameView Jul 30 01:39:57 if you passed in null, the exception would come from TextView.java Jul 30 01:40:21 oh, I see. Jul 30 01:40:39 now, you have a valid point, but just provided a bad example Jul 30 01:40:48 hehe Jul 30 01:40:55 mFoo.getBar().getFoo() would be ambiguous Jul 30 01:41:15 yeah, I guess that's where I'd have to step through the debugger to figure it out Jul 30 01:41:15 since mFoo could be null or mFoo.getBar() could be returning null Jul 30 01:41:21 but that's why you don't chain methods ;-) Jul 30 01:41:33 if in doubt, atomise :) split it everything up Jul 30 02:28:08 hey question: how does a service modify a view in another activity? Say, in TheService.onCreate()? Jul 30 02:38:43 What color depth does the display on the G1 have? I tested a drawable that was basically a greyscale gradient, and "bars" are easily visible... Jul 30 02:45:15 hey Jul 30 02:45:16 anyone here? Jul 30 02:45:30 montooner: uhh, guess again. Jul 30 02:46:01 youre way off target on your approach. services dont modify activities. Jul 30 02:46:09 that you even asked that question tells me your design is all messed up Jul 30 02:46:17 right Jul 30 02:46:22 that's not good news Jul 30 02:46:26 but whatev Jul 30 02:46:35 please hear me out Jul 30 02:46:40 i have a file scanner Jul 30 02:46:43 finding particular byte patterns Jul 30 02:47:09 the activity starts a service which opens a thread which does all the work Jul 30 02:47:16 now the thread needs to change a progress bar in the activity Jul 30 02:47:23 and i can't even modify the progress bar from the service Jul 30 02:47:46 ugh. Jul 30 02:47:53 haha Jul 30 02:48:01 what you want to do is define a way for your activity and your service to communicate. Jul 30 02:48:15 a handler? Jul 30 02:48:16 one way to do this is through AIDL, implementing a particular interface in your service that your activity can bind to and use Jul 30 02:48:21 no, not a handler. Jul 30 02:48:40 if you're comfortable looking through code, you can find many examples of this in use around, including my project's source code. Jul 30 02:49:03 i'm good looking for looking at code Jul 30 02:49:05 any pointers? Jul 30 02:49:18 anything in the sdk? Jul 30 02:49:24 five.googlecode.com -- check out how my sync service communicates with the sourcelist activity Jul 30 02:49:46 this won't be a simple copy-and-paste job to get it to work. you fundamentally must redesign your components. Jul 30 02:49:59 so spend the time to understnad how it all works, then implement. Jul 30 02:51:20 think i can get in done in 20 hours? =P Jul 30 02:52:38 :) anyways thanks Jul 30 02:53:30 jasta, do you know what type of exception is thrown when I program takes to long performing a task? Jul 30 02:53:32 heh, good news==bad news Jul 30 02:54:53 learn what has to be done but find out that redesign and reimplementation is needed Jul 30 02:54:54 I'm parsing a large text file and it takes about 5-10 seconds on some entrys. During the execution of the program the force or wait option pops up. I want to catch this exception. Jul 30 02:55:02 deekjx: you cannot block the main thread Jul 30 02:55:56 there is a lot of discussion on this topic, including official stuff in android's documentation Jul 30 02:56:05 go find it, read it, and fix your code. Jul 30 02:56:12 oh, okay, then what I was planning to do wille resolve it. I was going to place it in a seperate thread. and perhaps run a progress indicator in a different thread Jul 30 02:56:25 great, so do that. Jul 30 02:56:38 thanks Jul 30 02:56:50 even if you could trap ANR, you should not -- it's android allowing the user to close your broken piece of crap program Jul 30 02:58:18 Anyone know the best Cloud Cult album? Jul 30 02:58:28 * jasta raises an eyebrow Jul 30 02:58:49 Lol. Saw your screenshots. Program looks awesome. Jul 30 02:59:11 yeah, unfortunately it's not "ready". i just dont get enough time to work on it :( Jul 30 02:59:18 right now, im rewriting the server so the sync process is more reliable and efficient Jul 30 02:59:32 the original server implementation was a proof-of-concept and was in desperate need of rewrite Jul 30 02:59:39 its now in Java, cross-platform, and with a much better UI **** ENDING LOGGING AT Thu Jul 30 02:59:57 2009