**** BEGIN LOGGING AT Fri Jul 17 02:59:57 2009 Jul 17 03:28:17 so i'm noticing that if I call finish(); while a thread is still running, it will continue to run and the activity doesn't finish when asked. How can I "kill" the thread so the activity finishes properly? Jul 17 03:30:39 BeBoo_, you have to set a flag which the thread reads and shuts itself down Jul 17 03:30:52 i have a flag set... mCancelled Jul 17 03:31:04 i have if (mCancelled) { return; } Jul 17 03:31:35 (again, I urge you to use AsyncTask) Jul 17 03:31:40 return doesn't seem to do it. is there something else i should be using to shut down the thread? Jul 17 03:31:48 KNY: thats too much work for me right now ;p Jul 17 03:31:51 haha Jul 17 03:32:03 asynctask is way easier than threads hah Jul 17 03:32:12 you're essentially urging me to re-write my entire app Jul 17 03:32:22 ah Jul 17 03:32:24 i already did that learning about threads... =[ Jul 17 03:32:31 anyway, return should do it Jul 17 03:33:06 well, if i launch the activity again, the thread is never started... if i look in the theads... it's still running Jul 17 03:34:18 should i be returning under the run() or the handler? Jul 17 03:37:21 KNY: I got the thread to finish but when i recreate the activity, the thread is never created again. Jul 17 03:37:35 ugh... because the activity didn't finish Jul 17 03:37:37 grrr Jul 17 03:37:38 haha Jul 17 03:37:44 run() should be returning Jul 17 03:39:00 ok, so when i return the run... how can i when tell the activity to finish? i tell it to finish from the dialog but it doesn't actually finish i guess because the thread is still open Jul 17 03:45:29 i got it... i used the handler to finish the activity Jul 17 03:45:47 GO STROZz Jul 17 04:38:41 If i install an app on G1 from android market, how can I upload the apk to my desktop? Jul 17 05:24:19 how do I use createNewFile() ? Jul 17 05:24:32 File file1 = new File() Jul 17 05:24:36 file1.createNewFile() ?? Jul 17 07:13:46 does the android emulator support chinese locale? Jul 17 07:15:45 just added a chinese translation to my app but i don't see an option to switch to chinese at the 1.5 r3 emulator Jul 17 07:15:50 am i missing something? Jul 17 07:36:05 never mind... solved it Jul 17 09:23:12 dou: is it static or not? Jul 17 10:06:13 something I've not thought about before, is it OK to inline shorthand if's? ie: values.put(TEXT_FIELD, (sendersName!=null ? sendersName : "Unknown") + " (" + sendersNumber + ")"); Jul 17 10:08:08 hmm, ignore that, I'd be putting "(" and ")"s in my database that don't need to be there Jul 17 10:21:53 what should I include from jni to get logging functions like in android? Jul 17 10:23:55 logging to kernel? Jul 17 10:24:14 not sure, look at their code Jul 17 10:34:36 I am using several methods that can throw Exceptions, but Eclipse is not highlighting the fact that they need to be caught, have I got a setting wrong somewhere? Jul 17 10:35:03 or do people prefer for their applications to force close? :D Jul 17 10:41:29 (runtime exceptions) Jul 17 10:43:37 certain exceptions should be handled Jul 17 10:43:46 others should be errors Jul 17 10:44:04 I thought that only exceptions in function declaration have to be caught (void test(int a) throws MyException) Jul 17 10:44:23 or I'm just forgotting java ; Jul 17 10:44:29 caught or rethrown Jul 17 10:44:34 I think Jul 17 10:44:58 no, like an IOException Jul 17 10:45:36 if you function does i/o I believe you need to declare that it throws that if don't handle it yourself Jul 17 10:45:47 well if I was trying to read a file that didn't exist in a Java app and had an IOException, I'd catch it and do something, not let my app crash Jul 17 10:45:57 right Jul 17 10:46:32 the method I'm looking at now is SQLiteDatabase.insertOrThrow() which throws an SQLException, however unlikely there is to be one, surely the same principle applies? Jul 17 10:47:11 catch, report ignore :) Jul 17 10:47:27 try sql catch SQLexception e Jul 17 10:47:39 I know how :D but eclipse isn't highlighting the fact that I should Jul 17 10:47:46 oh Jul 17 10:48:21 if you handle the exception do you have to indicate that somehow in the catch, to prevent it from reaching fail? Jul 17 10:48:24 I forget Jul 17 10:48:48 just like you said above, no? Jul 17 10:48:58 try {} catch{} finally{} Jul 17 10:49:04 yeah Jul 17 10:49:05 sorry Jul 17 10:49:22 I mean do you have to return true or something catch? Jul 17 10:49:28 didn't think so Jul 17 10:49:42 it's finally I was thinking of Jul 17 10:49:49 never used that Jul 17 10:49:50 try(something) catch(some kind of exception) catch(some other kind) etc :) Jul 17 10:50:01 oh, okay Jul 17 10:50:47 I'd just like to manually catch and do something with all the exceptions that could be thrown in the interests of stability Jul 17 10:50:55 though eclipse isn't putting a nice red X by the line Jul 17 10:51:26 you could always be really lazy and try() catch(Exception e) :D Jul 17 10:51:42 yes Jul 17 10:51:59 okay, I see what you mean Jul 17 10:56:37 oh cool there's a workspace setting for "possible accidental boolean assignment (e.g. if(a=b)) that was set to "ignore" Jul 17 10:57:00 that'll save the odd debugging time Jul 17 11:36:12 Does anyone know where the apk is stored when a project is compiled within eclipse? Jul 17 12:08:16 for a local private variable is there any difference after compilation between variable and this.variable? Jul 17 12:10:28 ah, hold on Jul 17 12:13:26 okay, this would be an instance variable, the other would be scoped to the function/constructor I think Jul 17 12:15:33 what do you mean by local private? Jul 17 12:15:39 martin___: Jul 17 12:15:55 private int a; as a class variable Jul 17 12:16:52 how are scopes handled in java? when entering a new scope you have a new stack frame containing this scope's variables and a pointer to the upper level scope's stack frame? Jul 17 12:18:45 or... is it more efficient to use "variable" or "this.variable" :D or is the difference negligible? Jul 17 12:19:39 *does the time for each depend more on other things so as not to think about it, or is there always a miniscule advantage to one over the other Jul 17 12:23:31 martin__: I read somewhere that it's far more efficient to bind a class member variable to a local variable and use the local variable instead. (dunno if that's what you're asking?) Jul 17 12:25:22 yes, thanks Jul 17 12:28:57 this is where i read it: http://developer.android.com/guide/tutorials/notepad/notepad-ex2.html Jul 17 12:29:24 Step 5 (at the end ) Jul 17 12:43:59 Good morning every one :D Jul 17 12:45:35 Folks, how can I capture the event of a picture that has been taken? Jul 17 12:56:58 SidGBF: looks like this method might do what u need: Jul 17 12:57:16 final void takePicture(Camera.ShutterCallback shutter, Camera.PictureCallback raw, Camera.PictureCallback jpeg) Jul 17 12:57:47 in android.hardware.Camera Jul 17 12:58:05 not exactly... like... in my treo I have an external button to take a picture... I wanted to capture the output of it... like an intent or event listener Jul 17 13:01:59 i think it does just that, when the hardware key on the phone is pressed, the framework calls your own 'onPictureTaken' method where you can do whatever you like Jul 17 13:02:23 perhaps i didn't understand the question? Jul 17 13:09:00 I think this is the command to TAKE a picture Jul 17 13:09:29 I want the command to CAPTURE THE TAKEN picture, like a 'pictureTakenEvent' Jul 17 13:09:41 after this 'takePicture' be called by the phone Jul 17 13:14:55 does the g1 have a take picture button? Jul 17 13:22:55 the call is asynchronous and returns only when the picture has been taken (not sure about timeouts though). Jul 17 13:26:30 mmm Jul 17 13:26:38 that's bad Jul 17 13:28:21 you want your app to start when somebody takes a picture? could you either make your app take the picture, or make the app load when somebody tries to view the picture? Jul 17 13:36:10 Camera.ShutterCallback - An interface which contains a callback for the shutter closing after taking a picture. Jul 17 13:36:53 be the picture taker is an option... but... isn't already a default app for it? Can I "override" it? Jul 17 13:37:40 Camera.PictureCallback I'm so dumb... Jul 17 13:37:53 I was looking at events but it's on subclasses Jul 17 13:38:05 onPictureTaken(byte[] data, Camera camera) just what I needed!!! Jul 17 13:38:36 morning everyone. I have a runnable and a handler in this activity that is called. When i run it for the first time, it works as it should... runs thru the run() then handler. if i destroy the activity and start it again, it skips the run completely and goes right to the handler which b0rks the activity. any idea why? Jul 17 13:40:59 BeBoo_: just an idea, but call run() in onResume Jul 17 13:41:30 sammyF: hi =] would onResume be called even if the activity is destroyed? Jul 17 13:42:35 BeBoo_: INAAG, but I don't think your activity is destroyed. It sounds like it just resumes Jul 17 13:42:49 INAAG, I'm not an Android Guru :P Jul 17 13:43:27 sammyF: to give you an idea... this activity downloads images to sdcard and displays them and in onDestroy(), it deletes them so i know that onDestroy() is being called Jul 17 13:44:25 ooo no wait, i'm confused a bit... Jul 17 13:44:42 sorry, it only tries to resume if i stop the thread Jul 17 13:44:43 welcome to the club. I'm constantly confused :P Jul 17 13:45:50 can I PM you? Jul 17 13:46:28 BeBoo_: hmm .. well .. yeah, but I seriously don't think I'll be able to help Jul 17 13:46:51 any insight might be helpful, tho, if you don't mind Jul 17 13:46:54 Well... Jul 17 13:47:05 with this I'll have some BIG tasks to do :D Jul 17 13:47:21 T-T I hope I can finish the app to ADC Jul 17 13:47:33 Hey... does anyone here develop from Fedora Core? I guess which release isn't important. Jul 17 13:50:17 Well at that does anyone know if the rules for udev should even be different when setting up device debugging? Jul 17 13:50:26 ever be different* Jul 17 13:54:26 OEP, the device id changes Jul 17 13:54:38 OEP, as long as both are in the same rule, you are fine Jul 17 13:54:55 I found something on here that says that FC has a udev rule which sets the permissions back to 644 Jul 17 13:55:10 er, an android-developers post that is Jul 17 13:56:34 why did good @hide the SeekBarPreference class? they need to learn to share Jul 17 13:59:07 no that actually different work... I'm pretty sure the device id matches what is in the udev rule Jul 17 14:02:47 aha solved it :) Jul 17 14:02:58 * OEP does a small dance Jul 17 14:16:02 OEP, fedora 11 uses ACL's Jul 17 14:16:11 OEP, which is different from what you are discussing Jul 17 14:16:26 I'm not familiar with ACL's Jul 17 14:16:32 I'm actually still using FC10 Jul 17 14:16:46 OEP, well then you're using the regular old non-ACL version Jul 17 14:16:52 OEP, and you really should upgrade Jul 17 14:16:56 I know :) Jul 17 14:17:11 I haven't booted into this partition in several weeks Jul 17 14:18:02 anyone know of a disabled button state (ie, greyed out), I can't seem to recall that being used anywhere in android Jul 17 14:18:08 Hey Jul 17 14:18:19 I at least figured out the problem for a piece of deprecated software Jul 17 14:18:52 OEP, it's okay, the method used in fedora 11 is already deprecated and replaced in fedora 12 Jul 17 14:19:05 excellent. I feel not so bad. Jul 17 14:19:09 f12 is udev+consolekit+ACL's Jul 17 14:19:26 I'm developing a simple application. A vocabulary trainer. I'm going to setup a central database in the net....it's possible to edit data online and locally on the phone. Is there a way to synchronise both? Any suggestions? I'm completely lost on this topic, unfortunately. Jul 17 14:19:37 Hehe, if I read that nontechnically that almost seems absurd Jul 17 14:19:57 OEP, yep, that is how Red Hat works Jul 17 14:19:58 delx: there's a few things you could do. Jul 17 14:20:04 We love you Red Hat Jul 17 14:20:16 when you modify something on your client, push an update to the server. Jul 17 14:20:33 when you modify something on the server, that's a bit more tricky. You could always try and maintain an active connection to the server, and have the server push updates when they happen. Jul 17 14:20:40 "It doesn't work?? Put all three of 'em together!!" Jul 17 14:20:50 you might want to do something more like having the client query the server once a minute for updates. Jul 17 14:21:16 vol_, additionally, I need to handle conflicts, right? Jul 17 14:21:44 delx: right. you'll need to figure out how you'll do that. Jul 17 14:21:54 you might want to look at how diff programs handle merging Jul 17 14:22:15 delx, if you plan on making money on this you probably want make people host their vocab database on some place other than your own servers... like a public file storage area for example Jul 17 14:22:39 delx, i don't see people paying a lot for a vocab program... or at least enough to support your server costs Jul 17 14:22:50 delx, make them host it themselves on something like dropbox Jul 17 14:23:18 jclinton, it's not a vocabulary app, it just has the same functionality if I consider syncing Jul 17 14:25:12 I think I heard someone refer to Fedora Core as "big boy Linux" at the last LUG meeting. I need to go slap that person. Jul 17 14:25:22 vol_, jclinton, it's going to be an open learning platform - thus people can install the server software everywhere they like to Jul 17 14:27:37 FC is the RHEL alpha testing program Jul 17 14:27:41 OEP: Please do Jul 17 14:28:14 delx: you'll want to consider security in this app if you're going to distribute it to more than a few people Jul 17 14:28:37 make sure that you don't have arbitrary users making changes like "james: kid whose penis smells and likes to eat penises" Jul 17 14:28:46 or if you do that you can block them Jul 17 14:28:53 delx, check out the source code to conduit... it has conflict resolution in it Jul 17 14:29:02 yes..I'm going to introduce some kind of permission system Jul 17 14:29:09 delx, it even works over webdav which would also solve your security issue Jul 17 14:29:17 delx, it would just be a simple apache web server Jul 17 14:29:41 delx, look at gnome-user-share for an example of how to set up a micro-apache instance with just webdav support Jul 17 14:30:43 penises, eh? Jul 17 14:31:12 I said the magic word for beboo didn't I Jul 17 14:32:36 :o Jul 17 14:36:23 jclinton, this is conduit, right? http://code.google.com/p/simula-conduit/ Jul 17 14:36:40 delx, nope Jul 17 14:36:56 delx, http://www.conduit-project.org/ Jul 17 14:39:30 jclinton, is it still the right choice if I'm using sqlite databases? Jul 17 14:39:45 delx, no Jul 17 14:40:01 delx, sqlite = write it all from scratch Jul 17 14:40:27 maybe I should export data to xml and then sync it Jul 17 14:40:49 that requires a sync event Jul 17 14:40:58 rather than proactive sync Jul 17 14:41:07 i think you need to think about this a lot more Jul 17 14:41:46 yeah, I fear that ;) Jul 17 15:47:26 I'm using sqlite. I've got a id colum: id VARCHAR(32) NOT NULL. How do I tell him to insert id's automatically? Jul 17 15:48:49 AUTO_INCREMENT Jul 17 15:49:13 sorry, AUTOINCREMENT Jul 17 15:50:06 Here's how the download provider does it - http://android.git.kernel.org/?p=platform/packages/providers/DownloadProvider.git;a=blob;f=src/com/android/providers/downloads/DownloadProvider.java;h=0ce6b22beba9128b796ac1c5b4e19817ce5ac2ee;hb=master#l201 I remember that there are some subtle issues with 32-bit / 64-bit in case you ever go that high. Jul 17 15:50:10 KNY, just found it, yeah :) Jul 17 15:50:13 thxc Jul 17 15:50:23 wait wait Jul 17 15:50:31 you're using VARCHAR for AUTOINCREMENT? Jul 17 15:50:43 I need int, correct ;) Jul 17 15:50:47 INTEGER Jul 17 16:13:13 I've got two activities and each has a button called SaveButton. Is the ID for both R.id.SaveButton ? Jul 17 16:13:35 Or isn't it possible to give two buttons the same name? Jul 17 16:14:53 i don't think it's possible Jul 17 16:19:38 delx, yes, you can give two buttons the same ID Jul 17 16:19:44 delx, just don't use them in the same layout Jul 17 16:19:55 ok, thanks :) Jul 17 16:24:53 delx: the id is used to search for the view using findViewById, that's all. Jul 17 16:25:10 it's a recursive search through view children, the first one that matches will be returned Jul 17 16:25:34 each activity, however, would have its own view hierarchy of course, so having the same id wouldn't be a problem at a ll Jul 17 16:28:10 Hey all. I am trying to read up on android dev, and wanted to ask a question of you all. I've done some iPhone dev and in the iPhone SDK some things are kind of "built-in" like transitions between views, and other animations .. is there something similar in the android SDK? Jul 17 17:12:40 An update over marketplace is the same thing as doing adb install -r right? Jul 17 17:12:41 it shouldn't remove anything inside of the private dirs? Jul 17 17:21:33 vol_: correct Jul 17 17:24:21 ok Jul 17 17:24:39 a bug was reported related to upgraded copies of copilot, turns out it's not related to the internal files. Jul 17 17:24:56 just got a little spooked :P Jul 17 17:25:24 removable storage is a requirement for an android device right? Jul 17 17:26:05 martin___: no. Jul 17 17:26:18 BeBoo_ can i msg you in a few minutes? Jul 17 17:26:20 (the device will operate normally without it) Jul 17 17:26:53 when devices come out with a large amount internal storage and also removable storage, should we be offering the choice of where to save data to, or continue to do it on the sd card? (large files) Jul 17 17:27:09 can I assign ph number to emulator and test sms between two emulator? Jul 17 17:27:10 *do it in the sd card in preference to the onboard storage Jul 17 17:27:36 aunn: yes -- look in the title bar of the emulator, you will see a port number like 5554 Jul 17 17:27:43 that is a phone number, essentially Jul 17 17:27:58 if you start another emulator, you will notice it has a different number Jul 17 17:28:20 yes, i notice that i don't know that it can be use as ph number Jul 17 17:28:38 you can also telnet to it and you get a small interface to work with Jul 17 17:28:39 any reference doc? Jul 17 17:28:41 to simulate sms messages and such Jul 17 17:28:55 i'm sure there is if you look up the most recent online docs about the emulator Jul 17 17:29:03 ok, thx jasta Jul 17 17:29:15 i wrote a small shell script to simulate inbound text messages too Jul 17 17:29:30 martin___: if it's something you think the user should be able to ever get at with a browser, put it on external memory Jul 17 17:29:32 if you'd like, i can send it to you Jul 17 17:29:35 cool, where can i view that Jul 17 17:29:40 sure Jul 17 17:29:47 alternately, if it's large (for whatever definition of large is) you probably want to put it on external memory Jul 17 17:29:57 small things related to internal usage should live on internal memory Jul 17 17:30:09 just because the magic has 300MB, doesn't mean every device will Jul 17 17:30:15 the G1 is relatively constrained as it is. Jul 17 17:30:18 yes Jul 17 17:30:22 aunn: http://pastebin.com/m228b6291 Jul 17 17:30:36 chmod +x it, and run it. Jul 17 17:30:37 the only real exception here is that the sdcard is mounted with noexec by default Jul 17 17:30:46 so if you need a shared lib or something, it must live on internal memory, regardless of size. Jul 17 17:31:30 and what about when the internal storage becomes large (and will be loads faster than the sdcard) Jul 17 17:31:49 it's a design decision. Jul 17 17:31:54 you have to figure this one out Jul 17 17:32:02 wow, that's very short! thx a lot, jasta Jul 17 17:32:02 just bear in mind the properties of each Jul 17 17:32:11 well I would always go in with the maximum compatibility with devices Jul 17 17:32:18 but it may have a bearing on the operation of the app Jul 17 17:33:42 aunn: expect is sweet ;) Jul 17 17:34:07 martin___: it's really up to you. Jul 17 17:34:29 both options have advantages and disadvantages. If you don't see something on one side that immediately disqualifies it or qualifies it, then you'll just have to choose Jul 17 17:37:20 aunn: you can also modify this to simulate phone calls Jul 17 17:38:03 heh, srry, still figuring out expect, getting /usr/bin/env: expect: No such file or directory Jul 17 17:38:34 aunn: apt-get install expect Jul 17 17:39:08 oh ok, i thought it is already installed with env setting Jul 17 17:39:18 env just says look in $PATH for expect Jul 17 17:40:40 dang! i got the sms! Jul 17 17:40:51 thx jasta Jul 17 17:41:11 there's much more you could do with this. telnet localhost 5554 and type help Jul 17 17:41:14 you could script lots of stuff Jul 17 17:41:46 heh, i am not that strong in scripting, well, i am still learning in everything :) Jul 17 17:44:04 have u tried sms'ing between two emulators? back and forth ? Jul 17 17:44:10 yes. Jul 17 17:44:14 you can use the MMS app for that. Jul 17 17:45:16 http://developer.android.com/guide/developing/tools/emulator.html "Sending a Voice Call or SMS to Another Emulator Instance" Jul 17 17:45:24 thx for the pointer! Jul 17 18:01:40 Before I reinvent the wheel, is there an app that will query the device and list all of the apps, everything running, etc. in such a way as an end user without real technical experience can use it? Jul 17 18:07:45 kiqyou_vf, do you still need me? Jul 17 18:08:38 is there a way to display html coded text in a textview (or somehow else) within an app? Jul 17 18:13:58 localoca: you can use a webview. Jul 17 18:15:03 thx, i will try it with webview then Jul 17 18:16:52 I added the context menu listener to my listview, but I still don't get a context menu when pressing a list item for a few seconds: list.setOnCreateContextMenuListener(this); Jul 17 18:17:04 have I forgotten something? Jul 17 18:17:28 do you put items in the context menu? Jul 17 18:18:55 how do i make a slider preference in a preference view? Jul 17 18:19:17 romainguy: i use a inflater... much easier Jul 17 18:19:44 BeBoo_: either way, the menu needs to be populated Jul 17 18:19:57 do you need an example? Jul 17 18:21:24 anyone in here wanna help me out? i'm in a real bad situation with a locked G1... Jul 17 18:21:42 romainguy: http://paste2.org/p/329236 first part was in my onCreate() and second part was by itself Jul 17 18:21:55 heres my xml Jul 17 18:21:57 http://paste2.org/p/329239 Jul 17 18:23:36 romainguy, http://pastebin.com/m28eaeecb Jul 17 18:26:47 romainguy, found the solution - used the wrong method header -> thus no override Jul 17 18:26:53 thanks anyway. Jul 17 18:26:58 fangus: there is one in the framework, but it is marked private Jul 17 18:30:33 delx: doh! Jul 17 18:32:04 hey romain Jul 17 18:32:08 yo Jul 17 18:32:36 romainguy, next question ;) I've got: public boolean onContextItemSelected(MenuItem item) <- How can I find out on which list item the context menu was opened? Jul 17 18:32:53 AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo; Jul 17 18:33:02 then info will give you the targetView and the position Jul 17 18:33:03 and then info has a position member or something like that Jul 17 18:33:20 * jasta sits quietly :) Jul 17 18:34:25 I got lucky, I had a .java file with that code opened in my IDE :) Jul 17 18:39:49 romainguy, jasta, great it's working, thanks Jul 17 18:41:51 romainguy: there isn't a standard way to grey out/disable a button in Android right? I can't think of anywhere I've seen one... Jul 17 18:42:10 another problem (just google 3 minutes): How do I delete a listview item? Is it possible at all? Jul 17 18:42:31 delx: how are you storing them? Jul 17 18:42:39 what type of adapter are you using? Jul 17 18:43:11 SimpleAdapter Jul 17 18:43:49 delx: with a List or array? Jul 17 18:44:11 List Jul 17 18:44:25 deleting from the list is enough? Jul 17 18:44:36 it might be as easy as removing the item from the list and doing a invalidateViews() on the ListView Jul 17 18:44:58 don't do invalidateViews() Jul 17 18:45:05 zhobbs: I've usually found that invalidate views won't cut it in that it doesn't recall onBind Jul 17 18:45:08 zhobbs: Button.setEnabled(false) Jul 17 18:45:17 invalidateView() throws away everything Jul 17 18:45:43 romainguy: what do you do then? Jul 17 18:46:03 you remove it from the adapt Jul 17 18:46:05 adapter Jul 17 18:46:10 and call notifyDatasetChanged Jul 17 18:46:44 Hi, I am trying to create a dialog like it is told here: http://developer.android.com/guide/topics/ui/dialogs.html But somehow, my dialog is not displayed. I am trying to run it in a catch statement. Any ideas why it wouldn't show. Because the code there is executed. Jul 17 18:47:06 invalidateViews() is working - I try the other approach now :) Jul 17 18:49:08 How do I get the list I passed to SimpleAdapter? Jul 17 18:49:53 romainguy: so with invalidateViews the ListView throws all the Views away and passes null into for convertView? Jul 17 18:51:53 zhobbs: yes Jul 17 18:52:06 ok, found the solution, thanks guys! Jul 17 18:53:01 didn't know that... Jul 17 18:58:59 what does system_server do? it is sucking up my emulator cpu resources Jul 17 19:00:04 When opening a new activity through an intent, i know that it's possible to pass data through i.putExtra(); <- Is there a way to pass a HashMap, too? putExtra doesn't work with a HashMap Jul 17 19:00:17 Could somehow help my why the Dialog doesn't show? Code snippet is here: http://pastebin.com/m1d79063e (romainguy, It is for checking if a barcode scanner exists. And if not, a dialog should ask if the user wants to search for it in the market) Jul 17 19:04:51 balachmar, it's because you're never showing the dialog, you're just creating it Jul 17 19:04:58 and I recommend you use managed dialogs anyway Jul 17 19:05:37 Ooh, I was just reading http://developer.android.com/guide/topics/ui/dialogs.html on how to create dialogs.. Jul 17 19:08:07 KNY: What are managed Dialogs? (Just calling .show on the alert doesn't work. A leak window error) :) Jul 17 19:08:18 use showDialog() Jul 17 19:08:24 I believe ApiDemos does it Jul 17 19:09:42 ok, thanks for the tip. Bit weird that I shouldn't be doing it the way the explain it... Jul 17 19:10:14 balachmar: there are plenty of ways to obtain the same outcome Jul 17 19:10:19 i learned this the hard way Jul 17 19:11:27 ghe ghe Jul 17 19:24:02 is there a good place for me to look/understand how the powerManager wake lock works? Jul 17 19:37:55 I've got an activity with a listView. From another activity I'm deleting an entry and want to update the listView in the different activity. How to do it? Jul 17 19:41:48 KNY: I am using the managed stuff now, but the dialog seems to appear just before the app closes. Doesn't it make it wait until a choice has been made? Jul 17 19:45:09 uhm, those notepad examples on the dev site, why, didn't they make it as a Eclipse project so I could import the files there? Or is there a way to do it? Jul 17 19:45:54 the tutorial wants to walk you through making your own project Jul 17 19:46:22 well it gives you the template for the project Jul 17 19:49:23 BeBoo_ Do you know how I can make sure that my application doesn't quit when it id displaying a Dialog (making the dialog disappear. Jul 17 20:30:57 balachmar: you should use showDialog w/in Activity Jul 17 20:31:13 balachmar: I'm assuming you're talking about rotation? Jul 17 20:31:30 if not, you can not make sure someone doesn't exit your application Jul 17 20:32:02 herriojr: no, it isn't about rotation. Well, basically it is the last thing it needs to do. So I don't really know how to stop making it quit... Jul 17 20:32:15 what do you mean by quit Jul 17 20:32:16 ? Jul 17 20:32:20 can you be a bit more specific? Jul 17 20:32:58 do you mean if the user hits the back key? Jul 17 20:33:10 or do you mean exit your application? Jul 17 20:33:26 well, if a program doesn't have anything to do anymore, it finishes. And now it finishes, because it doesn't wait on the AlertDialog. Jul 17 20:34:27 balachmar: programs don't finish unless told to by your application or if the user hits back or home buttons Jul 17 20:34:45 how do you make a slider preference in a prefernece view? Jul 17 20:35:20 blachmar: what is it you are trying to do? that might be easier for me to give you direction on what to do Jul 17 20:36:40 herriojr: Well I am testing if a barcode scanner is present. If it isn't it should make an AlertDialog appear allowing the user to choose to go to the market. But right now, I have opted to go straight to the market and use a Toast to inform the user why. Because that actually does work... Jul 17 20:37:52 so, when your activity starts, check and see, and then display your option with the dialog (don't do finish())....then when the user clicks to download it, send it to the market Jul 17 20:38:00 I've got an activity with a listView. From another activity I'm deleting an entry and want to update the listView in the different activity. How to do it? Jul 17 20:38:21 delx: how is your data shared? Jul 17 20:38:30 balachmar: patser Jul 17 20:38:31 ;| Jul 17 20:39:24 herriojr, the list activity open through a context menu another acitvity, which should delete an entry - did you mean this? Jul 17 20:39:46 *opens Jul 17 20:39:50 balachmar: I mean, you have two activities over a list, what format is your list stored in? Jul 17 20:40:07 balachmar: = delx Jul 17 20:40:23 herriojr, SimpleAdapter, and a list of HashMaps Jul 17 20:41:10 delx: are both activities in an activity group or does one open the other? Jul 17 20:41:19 one opens another Jul 17 20:41:22 herriojr: That is exactly what I think I am doing... I put the source online. in pastebin Jul 17 20:41:34 balachmar: give me the link and I'll check it out Jul 17 20:42:15 delx: so, onActivityResult(), return the index of the item in the list to delete, and then delete it from the list and call simpleAdapter.notifyDataSetChanged() Jul 17 20:42:33 herriojr: Jul 17 20:42:36 herriojr: http://pastebin.com/m7e8f0b61 Jul 17 20:44:57 balachmar: I think it might be because you do this.finish() when onActivityResult() doesn't return OK since the activity didn't start (at least that is my assumption) Jul 17 20:45:32 balachmar: let me know if that works Jul 17 20:45:41 removing this.finish() that is Jul 17 20:57:31 What is the "best practice" for developing android applications that rely on large databases - should the database be installed to the sd card, or should it be put online somewhere and queried remotely by the application?? Jul 17 20:58:53 radiob, one I did takes the remote approach Jul 17 20:59:05 I set up a simple REST wrapper around the database and use that for querying Jul 17 20:59:32 but I also did another app that required a big database and just hosted them online and the user could download whichever ones they wanted Jul 17 21:00:33 i've read that to query a remote database with android, you can't simply establish a connection through a driver like you would with a desktop app. is that true? I'm unfortunately not familiar with REST, JSON, SOAP... Jul 17 21:00:38 herriojr: That works. But I needed that in order to shut down the scanner app. If it was installed. Now clicking the back button doesn't work. Jul 17 21:01:08 hello Jul 17 21:01:21 whats wrng with http://pastebin.com/m17224177 Jul 17 21:02:39 xbxice, that's a terrible question Jul 17 21:02:54 xbxice, what are you expecting and what are you getting? Jul 17 21:03:09 its crash on x[0]._id Jul 17 21:03:14 and i dont understand why Jul 17 21:03:22 it's because you never initialized it Jul 17 21:03:29 but i allocate 32 onjects Jul 17 21:03:38 herriojr, it's working. Big thanks! :) Jul 17 21:03:39 doesnot work like in C Jul 17 21:03:41 ++ Jul 17 21:04:23 xbxice: when you create an array in Java, it is filled with "null" Jul 17 21:04:23 KNY how i suppose to initialized it Jul 17 21:04:29 xbxice, I don't believe that would work in C++ either Jul 17 21:05:27 KNY: C++ has non-pointer types Jul 17 21:05:56 Java only takes pointer types in arrays :/ Jul 17 21:05:57 yeah, but he's not making an array of structs or anything, right? Jul 17 21:06:03 (if this was in C++) Jul 17 21:06:08 KNY: he thinks he is, but that's impossible in Java Jul 17 21:06:13 right Jul 17 21:06:14 i am making array of structs thats the idea Jul 17 21:06:27 i cant use struct in java so i make it class Jul 17 21:06:58 xbxice: everything but types like int/float are pointers in java; you have to 'new' them :/ Jul 17 21:07:11 xbxice: everything that can be stored in an array has to be new'd Jul 17 21:07:45 well, depending on what type of array i guess Jul 17 21:08:06 the native arrays will take int/float :/ Jul 17 21:08:18 well thats what i do in class XFriends i new the _name Jul 17 21:08:32 but you never make a new XFriends Jul 17 21:08:46 in class C XFriends []x=new XFriends[32]; Jul 17 21:08:51 you make a new array, yes Jul 17 21:09:03 but you never make a new XFriends for each item in the array Jul 17 21:09:11 how will i do such thing? Jul 17 21:09:21 what you have right now is 32 null pointers in the array Jul 17 21:10:00 and what i do char[]x =new char[32]; Jul 17 21:10:04 what will i have ? Jul 17 21:10:10 32 chars buffer? Jul 17 21:11:06 yes, because char is a primitive Jul 17 21:11:12 i see Jul 17 21:11:29 yay Java Jul 17 21:11:38 so now i need to do x[0]=new Xfriend(); ? Jul 17 21:11:42 no Jul 17 21:11:48 you have it right Jul 17 21:11:55 you just never initialize the elements of the array Jul 17 21:12:06 that's what he just said :D Jul 17 21:13:11 oh right right Jul 17 21:13:12 sorry Jul 17 21:13:19 long day, busy, etc Jul 17 21:13:26 (that's my excuse and I'm sticking with it) Jul 17 21:13:31 xbxice, yes, that would be correct Jul 17 21:13:49 so i need to for look for all the 32 blah Jul 17 21:13:54 loop Jul 17 21:13:58 xbxice: yup Jul 17 21:14:26 thx for the help i got it guys C++ rocks Jul 17 21:14:46 make everything is easier Jul 17 21:16:21 parsing binary protocol in C is way easier then with java Jul 17 21:18:05 brb Jul 17 21:18:13 only if you suck @ coding Jul 17 21:20:10 balachmar: are you just trying to test if the application exists? Jul 17 21:20:45 herriojr: Well yes Jul 17 21:22:58 for locationmanager, how does requestLocationUpdates work if both the minTime and minDistance parameters are filled in? Jul 17 21:50:14 a newbie android question: from an activity, how do i call a method from a service (from the same application)? Jul 17 21:54:01 omg i think i have a crazy idea for an app Jul 17 21:55:02 omg quick get someone to make it for you and give you all the profits Jul 17 21:55:03 hm nvm Jul 17 21:55:14 lol no im not like that Jul 17 21:55:31 i was gonna ask if it was possible but i thought about it and its not possible... well atleast yet. Jul 17 22:26:50 I has an awesome idea for an app Jul 17 22:26:57 I stole it specially :D Jul 17 22:28:09 if a want to have multiple layouts for an AppWidget, do i have to make a provider for each one of it? Jul 17 22:28:21 and can i reuse the ids from one layout in another? Jul 17 22:52:37 why on earth is it so hard to get my co-workers to stop fucking using git pull Jul 17 22:52:42 seriously Jul 17 23:01:52 jasta, same reason why it's so hard to get mine to stop being idiots and trying to write SQL like $query = "SELECT * FROM table WHERE foo = '".$bar."';"; Jul 17 23:02:00 (and that's not even with worst of it) Jul 17 23:02:14 sounds like your co-workers are a liability. fire them. Jul 17 23:02:15 :) Jul 17 23:02:22 jasta, haha Jul 17 23:02:33 they get so pissed at me when I just roll back their commits, but I don't care because I'm not going to waste my time fixing their broken shit Jul 17 23:02:58 either do it write or get out of my way and I'll do it Jul 17 23:03:01 err Jul 17 23:03:04 s/write/right/ Jul 17 23:03:12 it's been a long day; I think they're rubbing off on me Jul 17 23:33:25 soooo bored today Jul 17 23:42:21 hello Jul 17 23:42:37 does anyone know how to make a Dialog take up the full screen and have no rounded corners? Jul 17 23:45:12 don't make a dialog, use an activity? Jul 17 23:46:10 haha Jul 17 23:51:10 ah, bummer Jul 17 23:52:14 in LocationManager's requestLocationUpdates method, does the minTime control how often the LocationLIstener's onLocationChanged method gets called? Jul 17 23:52:50 *minTime parameter Jul 17 23:55:36 muk_mb, why is that a bummer? Jul 17 23:55:57 because I'm writing a library and need to know when this new window gets dismissed Jul 17 23:56:13 you could use startActivityForResult() .. Jul 17 23:59:05 KNY: but wouldn't the Activity get the result, not my library? Jul 18 00:14:40 quick question, are AIDLS like soap? Meaning, if my application is already deployed, and I need to add a function to the aidl, does the order of the functions matter (only add it at the end)? Jul 18 00:53:54 KNY: also, how do you pass any info to the new Activity you spawn? Jul 18 00:54:07 putExtra **** ENDING LOGGING AT Sat Jul 18 02:59:56 2009