**** BEGIN LOGGING AT Fri Jun 19 02:59:58 2009 Jun 19 03:20:44 romainguy__: omg, google has got to fix the behaviour of the build system when you accidentally forget to run lunch. Jun 19 03:20:55 it cleans everything without prompting you Jun 19 03:21:53 twice this month ive accidentally done this at around 4pm and just decided to pack up my laptop and go home as a result :) Jun 19 04:14:38 will ' startManagingCursor(c);' able to manage multiple cursor? Jun 19 04:14:42 for my activie? Jun 19 04:14:48 activity? Jun 19 04:15:05 i.e. can i call startManagingCursor() multiple times with a different cursor? Jun 19 04:15:25 yes Jun 19 04:15:53 thx Jun 19 04:24:37 how can I register for an event so that whenever the selected item of a gallery get changed, my function get called Jun 19 04:35:00 how to remove tabs from large blocks of code in eclipse? Jun 19 04:35:15 one way would be to download a plugin called AnyEdit Jun 19 04:35:26 this plugin is recommended by google for modifying android code because they are allergic to improper use of whitespace Jun 19 04:35:29 (as they should be!) Jun 19 04:35:40 oh - found Source -> Shift Left Jun 19 04:35:50 AnyEdit sounds interesting too Jun 19 04:35:53 ugh tabs Jun 19 04:36:05 tabs are the true whitespace Jun 19 04:36:25 its just that few mortals are capable of using them correctly Jun 19 04:36:59 different platforms can be inconsistent about displaying them Jun 19 04:37:04 I'm a spaces only kinda guy Jun 19 04:37:43 that's the point. tabs allow the developer to choose his/her viewing preference Jun 19 04:37:47 in a common, standard way Jun 19 04:38:02 if you prefer indentation at 3 spaces, that's fine, but i don't. so i use tabs to allow that. Jun 19 04:54:07 tabs >>>>>>>> spaces Jun 19 04:54:31 spaces for positioning, tabs for meaning Jun 19 04:54:44 KNY++ Jun 19 06:15:56 Hi, I know that we cant use RecordStore in a Android App. Jun 19 06:16:20 But is it possible if we include the RecordStore's code from J2ME library and bundle it with Android code. Jun 19 06:16:33 And then use it with Android. Jun 19 06:17:43 why would you want to? Android provides you more suitable alternatives Jun 19 06:18:46 for instance, sqlite3. Jun 19 06:19:09 See I have written a library for J2ME which uses RecordStore Jun 19 06:19:17 so generalize away from it. Jun 19 06:19:18 So I want to use the same one for Android too. Jun 19 06:19:25 As in? Jun 19 06:19:52 as in, introduce a layer of abstraction which satisfies both sides of your implementation: J2ME and Android. Jun 19 06:20:23 Could you elaborate more on that, please. Jun 19 06:20:24 you could make your own abstract RecordStore-esque class and prvoide a thin implementation for J2ME calling through to RecordStore, and one for Android dealing with SQLiteDatabase Jun 19 06:20:50 Cool. I got it. Jun 19 06:21:13 then, your code need not care which implementation is in effect. this pattern is commonly used in other java products, so go look at how they have done it if you still have questions. Jun 19 06:22:47 Thanks for heads up. Jun 19 06:22:59 Other one. How good is sensor support of emulator. Jun 19 06:23:10 Can we test/develop android apps which use accelerometer? Jun 19 06:23:31 not effectively, no. Jun 19 06:23:44 it is best to get a real android device to experiment with Jun 19 06:23:50 I am in India :'( Jun 19 06:23:53 600$! Jun 19 06:24:18 in fact, the emulator is a poor approximation of many things. for instance, pixel density, display quality / color filters, touch targets, performance, etc :) Jun 19 06:24:20 Anyone taking part in ADC here? Jun 19 06:24:37 Well, I need to "suffice" with that only actually. Jun 19 06:25:49 why do i get the sense that i'm speaking to muthu? Jun 19 06:29:39 As in? Jun 19 06:29:45 I dont know what a muthu is? Jun 19 06:29:51 nevermind Jun 19 06:30:05 You taking part in ADC? Jun 19 06:30:58 no Jun 19 06:31:02 there are numerous reasons why i cannot Jun 19 06:34:43 You also from India? Jun 19 06:34:44 :D Jun 19 06:34:56 no Jun 19 06:38:50 How is it that I use ACTION_SEND? Jun 19 06:38:55 From http://developer.android.com/reference/android/content/Intent.html#ACTION_SEND Jun 19 06:41:13 use it? as in, offer the user a choice of ways to send things? Jun 19 06:41:24 Yeah Jun 19 06:41:40 I am really bad at java, none of the terms on there make any sense to me Jun 19 06:41:45 startActivity(Intent.createChooser(intent, "Dialog Title")) where intent has action Intent.ACTION_SEND and EXTRA_STREAM. Jun 19 06:41:53 See Camera/src/com/android/camera/ViewImage.java Jun 19 06:42:27 I have a desktop system with Wi-Fi/Bluetooth, is it possible to find out approximate/relative distance of Phone from the desktop system? Jun 19 06:42:53 jasta: but how would I pass the content to it? Jun 19 06:42:54 Relative as difference between position of phone at two instances. Jun 19 06:43:28 mib_oqezbdyq: theoretically, yes. will android let you? unlikely. Jun 19 06:43:34 hey. Is there a real google developer who works on developing the android platform itself in this channel at the moment? Jun 19 06:43:46 the9a3eedi: try #android Jun 19 06:43:51 ivantis: EXTRA_STREAM. look at the source i referred you to. Jun 19 06:43:54 ivantis, k Jun 19 06:44:19 the9a3eedi: what did you need? Jun 19 06:44:21 How is it possible theoritically? Jun 19 06:44:24 mib_oqezbdyq: it's possible to get a very vague signal strength, and some times noise floor, but you will have to do a lot of filtering on that to even have a reliable signal strength, and converting that to a distance will be even more unreliable Jun 19 06:44:29 jasta: Camera/src/com/android/camera/ViewImage.java ? Jun 19 06:44:42 jasta: to give a token of appreciation for the awesome SDK they made :D Jun 19 06:44:49 mib_oqezbdyq: because you can make assumptions about the speed of radio waves through common mediums, and measure the time a ping takes to respond. Jun 19 06:44:49 zinx:I dont want exact distance. Jun 19 06:45:03 jasta: where can I find the Camera source code? Jun 19 06:45:04 jasta: seriously, I love google :P Jun 19 06:45:24 ivantis: android.git.kernel.org Jun 19 06:45:46 jasta: That makes sense, but then within a room of 20m the difference in "ping" response time is not that high. Jun 19 06:46:16 Can Accelerometer be used? Bluetooth Signal Strength? Jun 19 06:46:41 mib_oqezbdyq: of course its not, but you have a very sensitive timer at your disposal. Jun 19 06:47:12 jasta: thanks, that helped :) Jun 19 06:47:18 anyway, this information is already being compiled to determine signal strength. it relies on lots of assumptions and cannot be used reliably though relative distances along the same line should be very reliable. Jun 19 06:47:30 if all you want to determine is if point A is beyond point B, i mean. Jun 19 06:47:39 but anything not on a straight line is even silly to try Jun 19 06:47:50 So Uri should be the URI to the thingy? Jun 19 06:48:12 Or can I pass a string? Jun 19 06:48:21 It would be a message Jun 19 06:48:41 are you wanting to just pre-fill out an e-mail? Jun 19 06:48:48 Yeah Jun 19 06:49:15 I want to have a button, and when it is clicked, it would put some content in an e-mail so that the user could edit it Jun 19 06:49:26 look at the f'n documentation that you pasted. Jun 19 06:49:46 But I don't know what any of that stuff means Jun 19 06:49:55 then look at the camera source like i said Jun 19 06:50:15 i'm not going to spoon feed you Jun 19 06:50:27 Please? Jun 19 06:51:22 Oh, should it be EXTRA_TEXT instead of EXTRA_STREAM? Jun 19 07:28:53 How easy is it to use native libraries? I was talking to the guy who made the Doom port for android, and he said that the library for the Doom engine was written in C, but was ported to android using JNI. Is this easy? Jun 19 07:29:26 I was interested in writing a sound chip emulator app, but I'm worried about the bad performance caused by java Jun 19 07:36:17 the9a3eedi: if you dont already know, i suspect it will be quite difficult for you Jun 19 07:36:39 but youre more than welcome to go learn about it Jun 19 07:38:30 true enough Jun 19 07:44:30 jasta: I kinda find it hard to believe that people can very easily just link a native C-written library to their Android apps. :P Jun 19 07:44:44 and that's why its going to be hard for _you_ to do. Jun 19 07:44:44 :) Jun 19 07:44:50 lol Jun 19 07:45:06 the9a3eedi: i very easily did it.. Jun 19 07:45:07 night everyone Jun 19 07:45:15 so in order for it not to be hard, I just have to believe? :P Jun 19 07:45:34 you have to be the kind of person who finds that sort of thing easy Jun 19 07:45:34 zinx: oh? for what app? Jun 19 07:45:43 and that kind of person doesn't have to ask how to do it on IRC :) Jun 19 07:45:59 I'm just new to it, give me a break :P Jun 19 07:46:07 the9a3eedi: snes9x emu that i haven't worked on in a while, and isn't fast enough to be usable Jun 19 07:46:17 ah Jun 19 07:46:56 did some evdev stuff too, but that's for devs and i haven't worked on cleaning it up :x Jun 19 07:47:21 nice Jun 19 07:47:45 I'm seeing that all those emulators are running slow on android. I wonder if I should even try with my idea Jun 19 07:48:04 porting a SID player to android (SID is the sound chip on the Commodore 64) Jun 19 07:48:24 ugh, people who dont understand activity lifecycle and still try to put apps on the market piss me off Jun 19 07:48:37 i just want to strangle them when the app loses its state all the damn type and the back button doesnt work for shit Jun 19 07:48:46 yeah Jun 19 07:59:32 do you guys know how to setup an ant build script for android applications? Jun 19 08:03:25 Anyone know why the code at http://www.anddev.org/email_send_intent_intentchooser-t3295.html will only share with GMail and not Email or Twidroid? Jun 19 08:15:32 reading the comments on that page, it seems like the Email application doesn't accept that method Jun 19 08:15:43 (or possibly even any method) Jun 19 08:35:58 can it add some buttons into the statusbar? Jun 19 10:01:28 moo Jun 19 12:37:00 ;o Jun 19 12:37:03 G'day. Jun 19 12:49:17 hi, what is the adequate content-type for apk files ? Jun 19 12:49:34 I've found application/android-package but google only show it once :/ Jun 19 15:32:05 would anyone know if its possible to trace the source of an exception thats shown in the eclipse plugin's logcat ? Jun 19 15:32:36 Uhuh. Jun 19 15:32:43 Isn't the stack trace in there? Jun 19 15:33:10 i cant seem to see a stack window Jun 19 15:33:25 and execution didnt seem to halt at the point the exception occured Jun 19 15:34:17 gah, wths me stack gone >< Jun 19 15:34:37 Is it an exception caused by the Android machine/ Jun 19 15:34:39 Or, by your code? Jun 19 15:35:08 android i reckon Jun 19 15:35:15 its complaining about a missing directory Jun 19 15:35:29 Could you pastebin it? Jun 19 15:36:12 please pastebin the exception Jun 19 15:36:40 yeh that was me geting kicked for server spam lol Jun 19 15:37:17 basically the top line is: Jun 19 15:37:18 06-19 15:23:12.817: ERROR/MediaProvider(667): java.io.IOException: Parent directory of file does not exist: /data/MyPhonebook/1245424992818.jpg Jun 19 15:39:13 does MyPhonebook exist? Jun 19 15:39:24 you may want to do file checks before you try opening files Jun 19 15:40:17 yeh the app should do, i just need to find the bit that isnt doing it Jun 19 15:40:41 and i could trawl through the source i guess, but i was wondering if there was anything fancy in the ddms bit that would let me just jump to where the exception came from Jun 19 15:49:44 o_O Jun 19 15:49:57 normally stacktraces get print into the log Jun 19 15:50:04 so really, no, there's nothing you can do. Jun 19 15:50:15 You might want to see where MyPhonebook is used in your app and start there, set breakpoints Jun 19 16:20:13 is Geocoder nonfunctional? I'm trying to do business searches and I've found lots of complaints but no solutions. :/ Jun 19 16:23:06 text sizes, what's the XML attributes called for the standard sizes? like large/medium etc.? Jun 19 16:49:36 doc_savage: android:textAppearance="?android:attr/textAppearanceMedium" or Large. Jun 19 16:50:00 this controls size, color, and other properties Jun 19 16:50:46 that's the story!, thanks jasta :) Jun 19 17:22:33 is there a way to get it so the emulator doesn't automatically pick up a call (when initiated through telnet)? Jun 19 17:22:47 so that the call can be missed Jun 19 17:24:36 nvm Jun 19 17:24:44 I guess it just wasn't working yesterday Jun 19 17:50:37 ok, yeah, so setting the Calls.NEW column to 0 for missed calls doesn't actually clear the notification...I see the system does it by binding to an internal service, so how can I get a hold of this service? I've seen some other apps that can clear missed calls, so I know it can be done. Jun 19 17:54:12 KNY: here? Jun 19 17:54:36 what's up? Jun 19 17:54:47 still havin issues with that remote trace Jun 19 17:54:48 =[ Jun 19 17:54:51 do you use it? Jun 19 17:55:08 I've used it before but took it out Jun 19 17:55:58 BeBoo_, grab the source and throw some logging in there to see if it's POSTing correctly Jun 19 17:56:25 okies Jun 19 17:57:49 could probably make this myself lol Jun 19 17:58:10 BeBoo_, yeah Jun 19 17:58:14 it's like 100 lines of code Jun 19 18:00:21 well, there is already log entries... Jun 19 18:00:22 Log.d(TAG, "Found "+list.length+" stacktrace(s)"); Jun 19 18:00:25 that never appears Jun 19 18:00:39 interesting Jun 19 18:01:21 lemme try it without my URL Jun 19 18:10:26 still nothin Jun 19 18:10:29 hrm Jun 19 18:10:48 how can i look in the data dir? Jun 19 18:23:11 KNY: look what i found: http://trace.nullwire.com/collect/com.evancharlton.googlevoice-trace-1.0.1-1237337614-7684 Jun 19 18:23:12 ;p Jun 19 18:23:30 yeah, note the exception :) Jun 19 18:23:37 yeah Jun 19 18:23:40 test case Jun 19 18:24:09 i just don't know what's goin on here... it's looking in the dir (or it says it is)... i can't seem to look in that dir to see if anything is even there... Jun 19 18:30:31 i wonder... KNY, did you test this with 1.5? Jun 19 18:30:40 no Jun 19 18:31:01 i wonder if it's something with 1.5 Jun 19 18:35:17 maybe i'll just try to do this myself Jun 19 18:35:56 Is there any methods that will return the stack trace? Jun 19 18:37:21 yeah, t.getStackTrace() or something Jun 19 18:38:33 BeBoo_, in your UncaughtExceptionHandler you'll get a Throwable Jun 19 18:38:40 use Throwable.printStackTrace(writer) Jun 19 18:40:22 where would the UncaughtExceptionHandler be? Jun 19 18:40:27 you make one Jun 19 18:40:38 MyHandler implements UncaughtExceptionHandler Jun 19 18:40:43 is this instead of using try and catch? Jun 19 18:40:44 ohhh Jun 19 18:53:18 KNY: how do i implement it now. I have the handler class built... is it automatically called? Jun 19 18:53:30 Thread.setDefaultExceptionHandler() or something Jun 19 18:57:08 it wants type Thread, not class... did i do something wrong? Jun 19 19:04:07 nvm i see what i did wrong Jun 19 19:07:57 heh Jun 19 19:13:00 ugh this is a pain. i can't get this stupid thing to do anything Jun 19 19:15:14 I have a string with 2 instances of {YEAR} in, I just want to replace those with a variable year, but String.replaceAll() is doing some funky regex, and I'm useless with regex, is there a simpler replace I can use? Jun 19 19:15:56 (I tried \{YEAR\}, it didn't seem to like that, and that's about the extent of my regex knowledge without looking it up Jun 19 19:18:03 doc_savage: i believe you need two \ Jun 19 19:18:09 \\{YEAR\\} Jun 19 19:18:39 BeBoo_: thanks, I'll give it a go, like I'm not confused enough without being slapped around by regex :) Jun 19 19:19:10 doc_savage: no problem. I am not good with regex too but that double \ confused me a bit too. Hope that works for you Jun 19 19:19:44 me too :) I've lost me code now, not going well Jun 19 19:19:53 * doc_savage has too much going on Jun 19 19:25:38 is an exception concidered "handled" if it's being catched in a try? Jun 19 19:26:21 Well Jun 19 19:26:23 90% of the time Jun 19 19:26:27 You'd want to do something on an exception Jun 19 19:26:32 But, technically, yeah Jun 19 19:27:13 well, what i'm trying to do is catch the exception so it can send a "bug report" to me and display a dialog to the user that something happened Jun 19 19:27:32 cept i can't get the UnhandledExceptionHandler to get called Jun 19 19:27:34 =\ Jun 19 19:33:33 haha somebody slap me, BeBoo_ you were exactly right, I couldn't figure out why this wasn't working url = source.replaceAll("\\{YEAR\\}", year); URL u = new URL(source); (well equiv of) Jun 19 19:35:10 yup, you have to escape the escape because java wants to escape { which leaves you with {YEAR} Jun 19 19:35:15 so you have to escape the escape Jun 19 19:35:16 haha Jun 19 19:35:51 hehe yeah, you were right, you got it working, but then I missed that I still had the source string in the URL constructor, I was baffled for about 5 mins :D Jun 19 19:49:33 Simplest way to convert a java.net.URI to an android.net.Uri? Jun 19 20:03:38 hurm... I have to hard-reboot this rooted phone a lot. is San's official build any more stable? Jun 19 20:04:07 I can probably figure out how to get root on an official image, I bet :) Jun 19 22:05:35 hurm... adb's telling me device not found Jun 19 22:05:46 I'm running jaunty, and I think my udev rule looks right Jun 19 22:06:02 $ sudo bash -c "echo SUBSYSTEM==\"usb\", SYSFS{idVendor}==\"0bb4\", MODE=\"0666\" > /etc/udev/rules.d/51-android.rules" Jun 19 22:11:55 cj: I believe I have the same Jun 19 22:13:30 eep, only have 20 minutes to pack before i go camping Jun 19 22:13:32 jelg: should I see something in my syslog when I plug the in the usb cable? Jun 19 22:14:31 jelg: I get usb-storage notices... Jun 19 22:14:46 cj: I believe so.. yes.. that is also what I get Jun 19 22:15:03 jelg: do you have to run adb elevated? Jun 19 22:15:17 e.g. "scsi 9:0:0:0: Direct-Access HTC Android Phone 0100 PQ: 0 ANSI: 2" Jun 19 22:16:24 jelg: sounds like I might have to enable debugging on the device Jun 19 22:16:41 cj: u got it Jun 19 22:49:49 i am running into certificate problem on a res file? Jun 19 22:50:00 anyone faced that before? Jun 19 23:46:33 everybody idling as expected :-) Jun 19 23:50:39 I'm waiting for an API to push a small file to an android phone and launch and app to handle that file to drop out of the sky Jun 19 23:51:07 this sounds like a security hole spikebike. i wouldnt wait for an API to exploit a security hole. Jun 19 23:51:29 or a job for "adb forward" Jun 19 23:51:59 or even "adb push" with an application that watches for a file to be created Jun 19 23:52:18 with adb forward being a much cleaner solution Jun 19 23:52:31 well the latter is possible now of course Jun 19 23:52:51 anyone know why entity.getContentLength() returns -1 and i cant read data from a url despite it working to do my HTTP POST to my php, i was expecting the texti see in my browser when i do the same http post Jun 19 23:53:21 Gaz: you didn't get the response you expected, use a protocol analyzer to see why. Jun 19 23:53:27 such as wireshark Jun 19 23:53:31 ah Jun 19 23:53:33 ok Jun 19 23:53:34 yeah, and the latter would be practically trivial to implement, while adb forward would require knowledge of sockets on both Linux and Android, which really wouldn't be too difficult Jun 19 23:53:45 but might be unfamilliar Jun 19 23:54:08 jasta no other suggestions? Jun 19 23:54:24 i mean surely my entity has to contain something Jun 19 23:54:27 Gaz: why would i have other suggestions? Jun 19 23:54:39 Gaz: no, an entity doesn't have to contain something, nor does getContentLength have to tell you how long it was if it did Jun 19 23:55:28 do yourself a favor and just look at a protocol analyzer to see what was exchanged Jun 19 23:55:34 its HTTP for crying out loud, its very easy to read Jun 20 00:00:24 wow, I just obtained internal services without having root access in my app Jun 20 00:01:10 yeh silly me for expecting an api to work Jun 20 00:01:37 tricky Dialogs Jun 20 00:01:58 showDialog reuses earlier created objects.. Jun 20 00:05:57 that's the whole point of managed dialogs :) Jun 20 00:07:26 i guess.. :-) need to get used to that.. Jun 20 00:07:54 i was trying to show the id of a selected item in a ListView in that dialog.. Jun 20 00:07:58 kept returning the same id Jun 20 00:17:07 hmm Jun 20 00:17:19 shame u cant just get the text the server sent back **** ENDING LOGGING AT Sat Jun 20 02:59:57 2009