**** BEGIN LOGGING AT Thu Nov 26 02:59:56 2009 Nov 26 03:00:22 <\monster\> hmm supporting different screen resolutions will be a pain Nov 26 03:05:14 hmm. Nov 26 03:09:30 you know what would be useful? Nov 26 03:09:35 the ability to email users who have commented on your app Nov 26 03:09:42 "Can't uninstall, can't use :(" Nov 26 03:09:43 1/5 Nov 26 03:09:52 but no bug report Nov 26 03:09:58 so i may have an issue, but i dont know what it is Nov 26 03:10:52 <\monster\> hmm would it be possible to draw a rounded rectangle that has only one corner rounded? or should I use a graphic for it Nov 26 03:18:33 if i have an AlertDialog, is it possible to have it display a button with no listener attached? Nov 26 03:18:39 like just a "close" button Nov 26 03:19:31 canadiancow, if you wanted to you could call a dummy function Nov 26 03:19:38 er, dummy listener Nov 26 03:21:38 hm Nov 26 03:21:52 I'm having some trouble making an error message AlertDialog universal for any activity Nov 26 03:22:21 can someone suggest a way to do it? I tried to make it into its own class but I was having some trouble with contexts Nov 26 03:24:04 when I tried making it its own class and passing a context, eclipse didn't like me using context.getSystemService(LAYOUT_INFLATER_SERVICE); Nov 26 03:24:27 what was the error? Nov 26 03:25:43 LAYOUT_INFLATER_SERVICE cannot be resolved Nov 26 03:28:56 Context. Nov 26 03:29:09 you need to qualify constants if they're not in your class and not imported Nov 26 03:31:13 is this then correct? LayoutInflater inflater = (LayoutInflater) App_Name.LA.getSystemService(Context.LAYOUT_INFLATER_SERVICE); Nov 26 03:32:45 dunno, what's app_name.LA Nov 26 03:33:00 thats the applications list activity Nov 26 03:33:07 Hi there, is there anyone with a motorola phone here? Nov 26 03:33:18 i got a droid Nov 26 03:33:36 mobidroid: why you ask? Nov 26 03:33:53 well someone sent me a mail about dildroid not working properly under the motorola phones Nov 26 03:34:01 i think they run under 1.5 no? Nov 26 03:34:20 I try to reproduce the behavior on the emulator but can't Nov 26 03:34:21 no, 2.0 Nov 26 03:35:09 k, i tested under 2.0, now looking at the log i'm wondering if it's my emulator that explode because he can't access sound device to notify the sms sound. Nov 26 03:36:45 anyway the dildroid app is real simple, on a sms event receive if the first chars look like a dildro sms it start the app, now the guy tell me that he only receive sms and the app dont start. on my emulator the app start when i send a sms with the correct token Nov 26 03:36:48 mobidroid: creative app name Nov 26 03:36:54 the videos are pretty disappointing though Nov 26 03:37:08 yeah never put much time on the marketing Nov 26 03:37:16 mobidroid: if they claim they have a motorola phone, it may be a cliq as well Nov 26 03:37:19 which is 1.6 iirc Nov 26 03:37:21 free apps are really not a good business plan ;) Nov 26 03:37:45 i was only joking anyway, given your app name Nov 26 03:38:37 well the app itself is a big joke, i'm a bit shock to see 80k downloads hehe Nov 26 03:39:07 <\monster\> is there like no docs for "shape" ? Nov 26 03:39:13 the user just told me the "new motorola droid" Nov 26 03:40:15 mobidroid: ah, well that would be the "droid" then Nov 26 03:41:01 \monster\: draw methods in http://developer.android.com/reference/android/graphics/Canvas.html Nov 26 03:41:20 bnovc: yeah sorry about the confusion, I dindt follow the latest release Nov 26 03:41:21 wow Nov 26 03:41:21 so, mobidroid: what did they say didn't work? Nov 26 03:41:45 he say that the app is not starting when you receive a "dildo sms" Nov 26 03:42:31 I don't see any deprecated methods on the 2.0 so I'm wondering if it's not special modification made by the phone cie Nov 26 03:42:44 <\monster\> bnovc: and the xml version? Nov 26 03:43:09 \monster\: hm. dunno. i haven't seen drawing like that done in xml Nov 26 03:44:05 <\monster\> ahh screw it, ill just use PNGs :) Nov 26 03:44:26 <\monster\> until i get to when the screen rotates and it all breaks Nov 26 03:45:04 hmm, the ResolverActivity doesn't work from the lock screen Nov 26 03:46:22 <\monster\> i see that just like in GWT i'll spend most of my time on the layouts hehe joy Nov 26 03:46:28 dazoe: can you check that if you receive a sms that start with : DildroSMS (MAX) dildroid is really not starting? Nov 26 03:47:00 does dildroid use a bluetooth peripheral? Nov 26 03:49:01 and if so, how will you authenticate with the peripheral to prevent unauthorized activation? Nov 26 03:49:32 darryl_sockwell: it was a planned feature to add a usb extention, but since there is no usb drivers yet its on hold ;) Nov 26 03:49:42 aha Nov 26 03:49:49 usb wouldnt havve those problems Nov 26 03:50:29 Are any of you using JS over Java for Android dev? Nov 26 03:50:30 but the field of teledildonics seems very sensitive to unauthorized access Nov 26 03:50:35 If anyone know how to put voltage on a usb pin on android device ill do it :) Nov 26 03:51:03 for instance, is unauthorized activation of the dildo considered rape? Nov 26 03:51:09 a little 5v motor, and a deaxed wheel and we are in real business Nov 26 03:51:13 lol Nov 26 03:51:38 Ive put a Frigid mode to prevent any hmmm rape Nov 26 03:51:49 hmm, how do I request that my application register itself as the default action for an intent? Nov 26 03:51:51 i think if it was me i would consider the matter very thoroughly before creating a device like that Nov 26 03:52:04 but what if someone hijacks a session? Nov 26 03:52:20 what if the authorized user goes to sleep and someone else starts smsing? Nov 26 03:52:43 JohnnyL, how do you expect to use js Nov 26 03:54:46 hehehe, the product is more branded has a joke than a real sex toy Nov 26 03:55:19 pfn as a layer just above java. Nov 26 03:55:26 certainly beats using java. Nov 26 03:55:40 again, how do you expect to use it--it's not available Nov 26 03:56:00 pah Nov 26 03:56:20 for christmas i gonna present myself some i7 with 8 gb ram and ssd hdd's Nov 26 03:57:36 so any droid user can confirm or infirm this bug? Nov 26 03:58:05 pfn: http://www.mozilla.org/rhino/ Nov 26 03:58:22 JohnnyL: that would be terribly inefficient to use this Nov 26 03:59:01 romain cpu time is cheap these days. And it would boost time-to-ship. Nov 26 03:59:11 no it is not cheap on a phone Nov 26 03:59:15 especially since it costs battery Nov 26 03:59:29 and I highly doubt it would boost your time-to-ship that much Nov 26 03:59:36 anyway, it's available. Nov 26 03:59:41 (since you'll have to go through the regular Java APIs anyway) Nov 26 04:00:12 typeing types and accessors, no thanks. Nov 26 04:00:24 get an IDE :) Nov 26 04:00:34 if that's what makes you slow when you write apps you have other issues :)) Nov 26 04:00:57 easy for you to say. Nov 26 04:01:04 (I'm not saying that JS is not nice, I'm saying that the tradeoff of this extra interpreter on top of Dalvik is a bad idea on Android) Nov 26 04:01:57 romainguy Having just been introduced to Rhino within the last 7 minutes. What pretell makes it so much slower than Java? Nov 26 04:02:13 it's an interpreter written in Java Nov 26 04:02:17 and? Nov 26 04:02:17 hence interpreted by Dalvik Nov 26 04:02:22 so you execute a lot more code Nov 26 04:02:26 oh? Nov 26 04:02:30 which is slower, and uses more battery Nov 26 04:02:33 Any layer you add on top of Dalvik is expensive Nov 26 04:02:33 what makes you say this? Nov 26 04:02:48 the fact that I understand what an interpreter is? Nov 26 04:03:12 Is Dalvik compiled Java? Nov 26 04:03:21 No Nov 26 04:03:32 no, Dalvik is a virtual machine Nov 26 04:03:41 it interprets dex bytecode Nov 26 04:03:47 which is compiled from Java bytecode Nov 26 04:06:27 If your worried about extra cpu cycles, you shouldn't be using Java. Nov 26 04:06:53 Anyway, the worst offender of speed should be inner loops. And that should be a one to one mapping. Nov 26 04:07:07 JohnnyL: Java is fine, as Android has shown Nov 26 04:07:50 What's not fine is if you decide to add an interpreter on top of it Nov 26 04:08:03 cbeust_ I haven't used JS on Java for the Android, mostly because I don't need a cellphone in the first place. But I use it on the PC, works great. Nov 26 04:08:18 And a phone is not a PC Nov 26 04:08:21 cbeust_ sure it is. Provides a nice competitive edge. Nov 26 04:08:27 PC != phone Nov 26 04:08:37 but is a phone a computer? Nov 26 04:08:40 ASDUIGEOUI Nov 26 04:08:45 When it's very slow to run, you don't have any edge at all Nov 26 04:09:04 Anyway don't trust us, see for yourself :) Nov 26 04:09:09 JohnnyL: for what it's worse, cbeust_ and I work on the Android team at Google, so we do have a bit of experience with phones and running Java code on phones Nov 26 04:09:23 And Romain meant "worth" :) Nov 26 04:09:34 er Nov 26 04:09:35 yes :)) Nov 26 04:09:45 I usually don't correct but the typo was a bit scary this time :) Nov 26 04:09:45 (I hate to play that card usually but you refuse to listen and you obviously have no clue of what the cost of an interpreter is) Nov 26 04:11:30 cbeust__ if you have 1 min of your time to spent just to infirm this bug on droid it would be greatly appreciated Nov 26 04:11:57 romainguy have you run JS over Java? Nov 26 04:12:51 yes I have Nov 26 04:12:53 There is a JavaScript interpreter in your browser. Do you complain about that too? Nov 26 04:13:05 I've also written a fairly large app using a Python interpreter on top of Java Nov 26 04:13:10 JohnnyL: read what I am saying Nov 26 04:13:18 a PHONE is not like a desktop PC Nov 26 04:13:23 you have to care about battery Nov 26 04:13:44 also, a browser's JavaScript interpreter is not written in an interpreted language usually Nov 26 04:13:47 romainguy there is no jvm on the phone? Nov 26 04:13:54 (and also offers a JIT, not just a simple interpreter) Nov 26 04:14:00 JohnnyL: forget it Nov 26 04:14:00 JohnnyL: dalvik Nov 26 04:14:04 you're not listening Nov 26 04:14:08 ah ok. there is. Nov 26 04:14:16 dalvik is not a JVM Nov 26 04:14:20 it's a VM :p Nov 26 04:14:32 Oh, so its... like ... err interpreted? Nov 26 04:14:59 like I said, **YES*** Nov 26 04:15:01 <_avatar> hahahaha Nov 26 04:15:07 <_avatar> (sorry) Nov 26 04:15:19 So that makes Rhino an interpreted interpreter. Nov 26 04:15:32 should I care about that: error loading sound for content://settings/system/notification_sound exept the fact that no sound work on the emu and karmic koala Nov 26 04:16:09 Brawndo: The Thirst Mutilator. Nov 26 04:16:13 mobidroid: what's that bug? Nov 26 04:16:15 *It's got electrolytes* Nov 26 04:16:50 cbeust__: that's what i see in the log when i received a sms on the emu on 2.0 Nov 26 04:17:12 mobidroid: don't paste it here, use a paste web site please Nov 26 04:17:31 ok hold on Nov 26 04:18:25 http://pastebin.com/d7bef30d8 Nov 26 04:18:59 The emulator can't find the notification sound? Nov 26 04:19:20 Are you running it with -noaudio by any chance (as you should if you're using Linux :) ) Nov 26 04:19:52 missed that part, probably a new feature, since on r2 sound was working like a charm Nov 26 04:20:01 just installed r3 today Nov 26 04:21:04 by the way just a "user experience suggestion" for you android tool target creator, could we only remove feature and not have to add all of them it really take forever to create new "target" Nov 26 04:22:43 are you using the new UI tool? Nov 26 04:22:49 personally I think it would make sense to use something more modern in terms of reusability like JavaScript instead of Java. Making updates to code in Java is a headache. And JavaScript is functional which is sweet on closures and partial application. Nov 26 04:23:03 what makes JavaScript more reusable than Java? Nov 26 04:23:06 ... Nov 26 04:23:18 JohnnyL: "modern" is subjective, a lot of people would probably argue that Java is more modern than Javascript in many ways Nov 26 04:23:20 (I don't have anything against JavaScript, quite the contrary, btw) Nov 26 04:23:23 romainguy: yeah Nov 26 04:23:25 * bnovc wonders if JohnnyL is just trolling Nov 26 04:23:57 Javascript is okay but the lack of module support, static typing and tools in general makes it an inferior language to Java for large scale software IMO Nov 26 04:24:24 cbeust_: well we did try to write Android in JavaScript at first :) Nov 26 04:24:41 romainguy: yeah, for a few seconds Nov 26 04:25:25 cbeust__: by googling "-noaudio" linux android, I don't find too much doc about linux user that need to disable the audio to use the emulator... Nov 26 04:25:49 do i miss something here?! Nov 26 04:25:56 mobidroid: that was just a shot in the dark, I just know that audio on the Linux emulator is problematic, but I don't even know if that's what you're running Nov 26 04:26:03 Is there a way to make a TextView have both horizontal and vertical scrollbars? Nov 26 04:26:25 no Nov 26 04:26:29 mikejet: try to stay away from horizontal scrolling, it's evil Nov 26 04:26:36 and what cbeust__ said Nov 26 04:26:55 I'm trying to call findViewById from a class outside of any activity, and I'm able to do it if I call App_Name.LA, but how would I do this in a portable way? Nov 26 04:27:03 From now on, Romain will give you technical responses and I'll give you philosophical ones Nov 26 04:27:05 um, no. its required to display a bunch of bus and train times. Nov 26 04:27:29 ah ok, bah no be insure that I don't use -noaudio hehehhe i'm not that dumb yet ;) anyway i busted the maintenance budget on this free app, I will put this bug thing in the "unable to reproduce" queue... Nov 26 04:28:11 mikejet: for a map I can understand, for a textview... I stand by what I said :) Nov 26 04:28:42 it's okay to say you don't know. Nov 26 04:29:04 I have no problems saying I don't know, but I do know that horizontal scrolling for text views is evil :) Nov 26 04:29:06 cbeust_ JS has dyanmic typing(duck typing), dynamic/configurable module support, functions are first class, closure, partial application, OO features (programmable as mixins for Multiple Inheritence, defaulting to single inheritence). It's a much more modern language than Java. Where you *have* to do all this unneccessary mucking about in getAccessor(), setAccessor() land nonsense. Nov 26 04:29:32 JohnnyL: again you're in the very subjective area Nov 26 04:29:41 Let me give you some food for thought about duck typing Nov 26 04:29:48 and none of these features are particularly modern :) Nov 26 04:30:00 does google have budget so I create a remote android controlled bot so I can participate to google IO without paying few grands to see you guys? I guess drone shipping is cheaper than hmm human shipping Nov 26 04:30:11 besides, that's not the point Nov 26 04:30:11 johhnyL: http://beust.com/weblog/archives/000269.html Nov 26 04:30:16 use JavaScript if you want Nov 26 04:30:20 cbeust_ Peronally I like Haskell's typing inference pattern. Nov 26 04:30:26 but your app is going to suck and draing the battery unnecessarily Nov 26 04:30:34 which means you don't give a shit about your users Nov 26 04:30:36 Type inference is awesome, pity that neither Java nor JS have it Nov 26 04:31:16 and actually, pity that Javascript has no typing at all :D Nov 26 04:31:31 Haskell is a superior language. Too bad the masses won't see much of it. Nov 26 04:32:13 anyway bye to anyone caring to read this line Nov 26 04:32:35 JohnnyL: I recognize this tone Nov 26 04:32:46 not the kind that makes you very popular at parties :) Nov 26 04:33:12 besides, we should all be writing our android apps in brainfuck with a Java based interpreter below it Nov 26 04:33:22 Now that's a manly language Nov 26 04:33:29 2nd only to whitespace Nov 26 04:34:19 your choice. Nov 26 04:34:32 JohnnyL: I'm guessing you would love Scala, which I'm sure you'd fine way superior to Javascript based on your criteria Nov 26 04:34:55 Actually if I read you correctly, I'm really surprised you like Javascript so much Nov 26 04:35:11 cbeust_ I'm not a fan. Nov 26 04:35:23 of Scala Nov 26 04:35:24 people make way too much of a fuss about the language they use Nov 26 04:35:35 bnovc++ Nov 26 04:35:55 You know you're going south when you start mocking the "masses" for liking a particular language Nov 26 04:35:57 bnovc Yeah, it's like free software... free.. if your time is worthless. Nov 26 04:36:32 I know a lot of languages and I study new language whenever I get a chance, but Java still does a lot of things very right so it remains my default language for pretty much everything Nov 26 04:36:37 with Ruby a distant #2 Nov 26 04:36:40 cbeust_ or how about mocking a mocker of the masses for liking a particular language? Nov 26 04:36:41 no, it isn't, because having strict typing does not mean time wasted Nov 26 04:36:49 its a design choice and not a flaw (as an example of one of the features in your list) Nov 26 04:37:07 everything has tradeoffs. Java doesn't have stricter typing than JS just becaues the developers are incapable of making it loose Nov 26 04:37:16 JohnnyL: you don't seem to like, you love and you hate. That's dangerous, we're talking about progamming languages here, not yellow lab puppies (which are adorable) Nov 26 04:37:26 lots of free philosophy today. Nov 26 04:37:45 theoretically you could add functions in JS to implement types. Nov 26 04:37:46 Yeah I just had a pint of Maredsous, which is an awesome beer, so that's my excuse for indulging Nov 26 04:38:03 i think you missed the point of my statement, judging by your response Nov 26 04:38:34 JohnnyL: you can't simulate static typing in a dynamically typed language, sorry Nov 26 04:39:17 cbeust_ http://blog.jcoglan.com/2008/01/22/bringing-static-type-checking-to-javascript/ Nov 26 04:39:34 JohnnyL: that's still dynamic typing Nov 26 04:39:47 you're checking types, only you're doing it dynamically Nov 26 04:39:54 probably the worst of both worlds Nov 26 04:40:45 For things like google maps, does it implement both vertical and horizontal scrolling with a single ScrollView ? Nov 26 04:40:57 I've just been spoiled by automatic refactorings, which are impossible to achieve with dynamically typed languages, but that's just me Nov 26 04:41:02 no it doesn't mikejet Nov 26 04:41:06 it's done by MapView Nov 26 04:41:39 i just like types for code readability more than anything Nov 26 04:42:12 after having read so much PHP, which is mostly, inevitably written poorly Nov 26 04:42:29 cbeust_ anyway I'm getting bored of constantly proving you wrong. Nov 26 04:42:38 You mean constantly failing to prove me wrong? Nov 26 04:42:42 I sympathize Nov 26 04:42:53 JohnnyL: if you want to use JavaScript, go use JavaScript Nov 26 04:43:00 Yes please Nov 26 04:43:00 you don't have to try to convince other people to do the same Nov 26 04:43:03 romainguy ok Nov 26 04:43:06 then point us to your apk and we'll check it out Nov 26 04:43:09 do whatever you want, nobody here will care Nov 26 04:43:35 sounds quite a bit like politics if you ask me. Nov 26 04:43:48 and you may want to increase the ANR timeout and update your framework for all your users Nov 26 04:43:55 haha Nov 26 04:44:04 He'll figure it out by himself eventually Nov 26 04:44:17 Certain things cannot be taught, they need to be experienced first hand Nov 26 04:44:29 MapView doesn't appear to be in the 2.0 SDK. im confused. Nov 26 04:44:33 cbeust__: swetland would be screaming fire right now :)) Nov 26 04:44:39 mikejet: you have to add the Google addon Nov 26 04:44:41 wow, great use community here. You give them facts , features and figures and they give you saracasm , bullshit and bit peddling. Nov 26 04:44:46 when you create the avd Nov 26 04:45:00 JohnnyL: we gave you facts first, you refused them for no reason Nov 26 04:45:03 Sorry for trying to help you JohnnyL Nov 26 04:45:03 so get lost Nov 26 04:45:04 :) Nov 26 04:45:17 we're just trying to save you some hassle and something we know for a fact that will end up in poor user experience Nov 26 04:45:21 but go ahead and see for yourself Nov 26 04:45:40 JohnnyL: what really is your point here? you personally like JS more, so you want to persuade Google to switch Android to it and have everyone rewrite their apps for 2.1? Nov 26 04:45:53 I'll check the palm user community. Thanks! Nov 26 04:46:47 how amusing Nov 26 04:46:58 haha Nov 26 04:47:02 That's awesome Nov 26 04:47:09 I'll pass this along to the team Nov 26 04:47:15 well he'll be happy Nov 26 04:47:16 they use JS :) Nov 26 04:47:22 Indeed they do Nov 26 04:47:27 i had opened pogo to find something entertaining, but #android-dev sufficed Nov 26 04:50:34 hmm, is there any way to make a ResolverActivity unlock the keyguard? Nov 26 04:51:30 oo this is a fun bug. My keyboard is a big black area Nov 26 04:57:23 what i'm looking for to allow the user to horiz & vertically scroll around in this mondo spreadsheet kind of like a huge excel spreadsheet. As the guy drags the table of cells, i'll adjust the row and column headers. MapView seems a little off. I think I'll just put a Canvas in a ScrollView, with both H & V bars enabled. Nov 26 05:18:39 mikejet: ScrolLView only scrolls vertically Nov 26 05:19:40 i see that. Nov 26 05:27:35 romainguy: hey, i've been meaning to ask for your advice on something Nov 26 05:27:36 how do you get the content view from a context that is passed to a new class? Nov 26 05:28:02 romainguy: i need to conditionally support some of the newer methods in Eclair and was wondering if this is a reasonable template for doing this sort of thing in java: Nov 26 05:29:12 http://github.com/jasta/five-android/blob/master/src/org/devtcg/five/provider/util/AcquireProvider.java Nov 26 05:35:00 jasta: yep Nov 26 05:36:46 cool, thanks Nov 26 05:37:24 also, i couldn't find any info on whether or not socket state methods are supposed to be thread safe. i don't suppose you know off hand? Nov 26 05:37:31 what are these APIs for btw? Nov 26 05:37:44 as in, if i call close() from one thread and isClosed() from another, should that be synchronized? Nov 26 05:37:51 no clue Nov 26 05:37:58 in doubt... :) Nov 26 05:38:15 ive looked extensively and can't really find anything concrete other than that the Sun JVM does appear to use it. Nov 26 05:38:20 It really depend on the underlying implementation of these two methods, so like Romain says, in doubt... Nov 26 05:38:58 cbeust__: and that's why I was insisting that the synchronized keyword should be part of the public API when we generate current.xml :) Nov 26 05:39:04 anyway, re the APIs, i need to be able to acquire a content provider reference to one of my providers Nov 26 05:39:14 and the other API i need to support startForeground (setForeground was deprecated) Nov 26 05:39:37 romainguy: the reason im asking is because Apache Harmony does not do this, though it appears to make a failed attempt at it. Nov 26 05:39:41 so it reads to me like a bug Nov 26 05:39:51 Harmony is far from perfect :) Nov 26 05:39:55 but i cant really find anything concrete which java specifies. truly, the javadocs are vague about this. Nov 26 05:40:06 <\monster\> hmm so I just tested my app so far on my phone and it seems like the emulator does not look exactly like the phone ..the alignments are slightly off Nov 26 05:40:09 then assume it is not :p Nov 26 05:40:24 \monster\: check with hierarchyviewer Nov 26 05:40:26 i mean, sun's own documentation is very vague about synchronization in general. if i read the Socket javadoc i would generally assume that the only method that's synchronized is close() Nov 26 05:40:47 but then if you read their own examples they clearly depend on many more methods being thread-safe. Nov 26 05:40:58 or the examples are wrong ^^ Nov 26 05:41:00 and if you look at code like Apache HttpClient they asusme huge amounts of the API are thread-safe. Nov 26 05:41:11 and lots and lots of other production code makes similar asusmptions. Nov 26 05:41:16 romainguy: about synchronized, it's an open question really Nov 26 05:41:19 so it's almost like it became necessary Nov 26 05:41:24 for practical reasons Nov 26 05:41:37 <\monster\> romainguy: thanx Nov 26 05:41:57 they clearly say in the javadoc that close() must work from other threads, which would then lead you to logically assume that isClosed() is in a valid state in other threads Nov 26 05:42:04 but an assumption like that is hard to prove :) Nov 26 05:42:12 (because the docs are weak) Nov 26 05:42:28 anyway, harmony naively does this: Nov 26 05:42:42 https://issues.apache.org/jira/browse/HARMONY-6390 Nov 26 05:42:44 wrong thread code available on Internet? say it aint so... Nov 26 05:42:48 read the code snippet, it's plainly obvious ;) Nov 26 05:43:20 mikejet: i might make the argument that there is a widely held assumption that socket methods are thread-safe. whether the documentation says so or not means it should be implemented this way. Nov 26 05:43:33 it is reasonable in order to achieve compatability in practice with Sun's JVM. Nov 26 05:43:44 but i'd much prefer to make the argument that it's defined to work this way hehe Nov 26 05:47:02 <\monster\> so is it normal for emulator layout not be pixel precise to what you see on actual device? Nov 26 05:47:27 \monster\: on the ADP1/2, no it should be pixel perfect. Nov 26 05:47:41 <\monster\> weird Nov 26 05:47:49 on devices with different dpi, also no, but it might not seem like it :) Nov 26 05:48:00 (as an aside, never use px) Nov 26 05:48:04 always use dp :) Nov 26 05:49:20 <\monster\> so its most likely caused by me using px in some places? Nov 26 05:49:29 no, that was an aside :) Nov 26 05:49:36 as in, not related to whatever youre currently doing, im just telling you do not use px Nov 26 05:49:45 <\monster\> heh Nov 26 05:49:46 \monster\: use hierarchyviewer to check out the positions Nov 26 05:49:49 dp and px are equal on the ADP1/2, but they differ greatly on, for instnace, the Droid. Nov 26 05:49:57 you can also grab a screenshot from the device Nov 26 05:50:04 and use hierarchyviewer to overlay it on top of the emulator Nov 26 05:50:06 and compare Nov 26 05:50:09 (or the other way around :) Nov 26 05:50:25 <\monster\> romainguy: yeah had quick look, will look at it closer tomorrow Nov 26 05:51:35 <\monster\> lucky jesusphone devs don't have to deal with this :) Nov 26 05:51:48 er Nov 26 05:51:57 it's no different, there's a simulator and a real device Nov 26 05:52:09 <\monster\> i mean different hardware resolution Nov 26 05:52:14 ah yeah Nov 26 05:52:21 well it also sucks for users to not have a choice :p Nov 26 05:52:22 man, google chrome really is a lot faster than firefox Nov 26 05:52:41 the difference is kind of incredible really Nov 26 05:53:14 <\monster\> my gradient does look nice on the phone :) Nov 26 05:53:41 told you :) Nov 26 05:54:09 <\monster\> emulator is just making a fool out of me tonight Nov 26 06:03:22 jasta, always safe to synchronize, streams aren't synchronized... Nov 26 06:03:53 pfn: erm, i'm talking specifically about the Harmony implementation of Socket. Nov 26 06:04:03 i don't think that argument would work well with them. Nov 26 06:04:06 jasta, but java.net.Socket *is* synchronized in isClosed() Nov 26 06:04:14 pfn: can you show me a proof of that? Nov 26 06:04:24 jasta, refer to java/net/Socket.java Nov 26 06:04:27 because i've searched exhausitvely and found nothing. Nov 26 06:04:31 when will android use arm's native hardware java acceleration? Nov 26 06:04:39 pfn: java/net/Socket.java in Harmony is not synchronized properly. Nov 26 06:04:46 BillyBoy: Android does not execute Java bytecode Nov 26 06:04:55 BillyBoy: probably when ARM gets native dalvik acceleration :) Nov 26 06:05:08 jasta, I don't know anything about harmony, sun's jre is my reference Nov 26 06:05:10 which, honestly, might happen some day :) Nov 26 06:05:10 jbq was discussing that last night Nov 26 06:05:36 pfn: the issue is that Harmony doesn't just do everything Sun does as a rule -- they do what is correct according to the documentation Nov 26 06:05:36 but apps for android is java? why isn't they compiled to java byte code? Nov 26 06:05:47 BillyBoy: because Android is not a Java platform Nov 26 06:05:56 pfn: and the documentation is _extremely_ vague in this regard. Nov 26 06:06:15 pfn: i'm trying to argue with the Harmony devs that they _should_ synchronize isClosed, but it's hard to do that when you can't prove that they _must_ :) Nov 26 06:06:43 but arm can execute java byte code, why not use that hardware when apps are written in java? Nov 26 06:06:56 BillyBoy: Android apps are first compiled into java byte code, _THEN_ into dalvik byte code. they are executed on the phone as dalvik byte code, not java byt ecode. Nov 26 06:06:57 BillyBoy: because Android apps are not using Java byte code Nov 26 06:07:03 jasta, the implication that close() immediately affects other threads (per docs) sort of means that close must be synchronized Nov 26 06:07:10 but if there were using it. Nov 26 06:07:18 pfn: that's my current argument :) Nov 26 06:07:26 ...they could be accelerated. Nov 26 06:07:35 jasta, I don't know how you could extend that argument to isClosed, though Nov 26 06:07:44 that merely based on the intuitive nature of close() being thread-safe, isClosed() shoudl as well. Nov 26 06:07:49 BillyBoy: but they can't use Java bytecode since that's not how Android works Nov 26 06:08:29 BillyBoy: *sigh*. there are a lot of reasons Android has its own byte code, and they are valid. Nov 26 06:08:54 it using some other kind of byte code then? the code does not compile to native arm instructions anyway. Nov 26 06:09:09 pfn: also, im hoping that in just looking at the code they realize there's an obvious bug even in their own logic Nov 26 06:09:17 because they use isClosed() to check for shit like trying to connect() twice. Nov 26 06:09:28 but clearly that check is buggy because isClosed() is not synchronized. Nov 26 06:09:54 BillyBoy: yes, it uses some other bytecode - dalvik Nov 26 06:09:55 i think it would make sense to compile to an architecture that the cpu can execute nativly. Nov 26 06:10:12 BillyBoy: you think that, but you dont understand all the issues. Nov 26 06:10:17 correct :) Nov 26 06:10:19 er... Android is already running on at least 3 different CPU architectures - x86, ARM and MIPS Nov 26 06:10:22 See if you can find a discussion on why Dalvik was created. Nov 26 06:10:27 then you'll understand. Nov 26 06:10:33 BillyBoy, google can probably answer your questions why android doesn't use java bytecode but its own Nov 26 06:10:44 but why not use java byte code instead of inventing the wheel again? Nov 26 06:10:48 Leeds, java already runs on just as many :p Nov 26 06:10:56 BillyBoy: there are several reasons Nov 26 06:10:59 BillyBoy: again, this is a lengthy discussion -- please google for it. Nov 26 06:11:02 then arm could execute the instructions nativly. Nov 26 06:11:06 one of them was that the Java bytecode is not the most efficient for mobile devices Nov 26 06:11:14 pfn: yes, but they're not all optimised for java bytecode the way some ARM CPUs are Nov 26 06:11:27 also, not all CPUs have support for Java bytecode Nov 26 06:11:36 but arm has. Nov 26 06:11:46 every ARM CPU? Nov 26 06:11:46 romainguy: I just said that Nov 26 06:12:38 hey ppl jus published my first app....it's not much but please download and give suggestions Nov 26 06:12:59 * pfn wonders how ResolverActivity can unlock the keyguard Nov 26 06:13:32 i think they should have gone for java byte code so it could have been accelerated on some (most!) arm cpus. Nov 26 06:13:44 I guess my app will have to register as a default app somehow before running from the keyguard Nov 26 06:13:48 ToadCard Nov 26 06:13:57 that leads to my next question, how do I register a default activity for an intent? Nov 26 06:14:07 I can specify category.DEFAULT but I already have 2 defaults Nov 26 06:14:19 pfn: DEFAULT is the way Nov 26 06:14:35 romainguy, I already have 2 activities specifying DEFAULT, unfortunately Nov 26 06:14:41 I'm trying to "override" the EmergencyDialer Nov 26 06:14:44 pfn: and? Nov 26 06:15:04 provide my own implementation Nov 26 06:15:05 jerjunkel: did you restrict it? I can't see it Nov 26 06:15:20 romainguy, obviously, the problem is that ResolverActivity can't display while a keyguard is active Nov 26 06:15:34 that wasn't obvious no :) Nov 26 06:15:35 also Nov 26 06:15:43 I don't think you can override the emergency dialer Nov 26 06:15:45 leeds:where are u? Nov 26 06:15:46 "provide my own implementation, obviously" Nov 26 06:15:58 jerjunkel: ah, so you did restrict it Nov 26 06:16:01 romainguy, actually, I've managed to do that, but in order to do so, I need to select it as default from ResolverActivity Nov 26 06:16:15 what I'd like, is a way to do what I just described programmatically Nov 26 06:16:16 so you didn't do it :) Nov 26 06:16:28 also Nov 26 06:16:32 (managed to do it: override emergency dialer) Nov 26 06:16:52 you certainly cannot programmatically choose the default activity to resolve an intent Nov 26 06:16:55 just not programmatically, it requires user intervention to select the correct activity Nov 26 06:17:05 and on purpose Nov 26 06:17:11 I can understand the reasons why Nov 26 06:17:12 the last thing we want is apps to be able to do this Nov 26 06:17:25 but I also feel that users will just shoot them in the foot by selecting the "wrong" thing Nov 26 06:17:35 why? Nov 26 06:17:45 they always have the choice to choose again :) Nov 26 06:17:50 leeds: how do i "unrestrict" it? Nov 26 06:18:03 romainguy, but they have to dig through a bunch of menus to figure out which is the correct place to set it Nov 26 06:18:07 but will they choose to exercise their choice to choose again? Nov 26 06:18:10 an environment shold make it hard to do the wrong thing, but it shouldn't be impossible. Nov 26 06:18:22 e.g. if I select 'emergency dialer' as the default, I have no idea how I'm going to dig through the menus to figure out which app I need to clear defaults from Nov 26 06:18:25 * pfn imagines phoneapp Nov 26 06:18:27 jerjunkel: you chose to charge for it, to apply the bogus 'copy protection', or to limit the availability by location Nov 26 06:18:36 since I've been digging through that code Nov 26 06:18:58 oh well, I guess I'll just have to document clearly how this gets enabled Nov 26 06:19:10 many environments make it hard to do the right thing though. Nov 26 06:19:49 I would argue that the emergency dialer should not be overridable at all Nov 26 06:19:58 the emergency dialer sucks ass Nov 26 06:20:01 utterly and completely Nov 26 06:20:07 that's not the point Nov 26 06:20:16 it's useless as an emergency dialer Nov 26 06:20:17 (contributions are welcome btw :) Nov 26 06:20:39 well, I'll write a replacement, and if you guys like it, you can figure out how to make it into a contribution :) Nov 26 06:20:46 no :) Nov 26 06:20:51 but as-is, the emergency dialer is useless Nov 26 06:20:55 why? Nov 26 06:20:56 it's useless from all aspects Nov 26 06:20:56 can i run dalvik apps in windows x86? Nov 26 06:20:58 what is useless about it? Nov 26 06:21:06 you're not really giving any useful feedback right now Nov 26 06:21:13 it can only dial 911, and you're never told anywhere that it's the only number you can dial Nov 26 06:21:29 in fact, it's much more useful if it would tell you all the emergency numbers you have access to and just allow direct dialing those Nov 26 06:21:35 911 isnt an emergency number in all contries Nov 26 06:21:39 112 Nov 26 06:21:42 is another number Nov 26 06:21:47 or it reads from sf_ecc or whatever Nov 26 06:21:52 into ro.ril.ecclist Nov 26 06:21:57 whatever it is in the sim card Nov 26 06:22:01 but it defaults to 112 and 911 Nov 26 06:22:21 you never know what you can dial as an emergency number, and there's no way to modify the emergency number list Nov 26 06:22:32 e.g. there's no way to contact emergency contacts in case of ... um, emergency Nov 26 06:22:45 it's by design Nov 26 06:23:06 a flawed design Nov 26 06:23:08 Leeds:it's free,didn't not check the "copy protection" and i did check "all locations" so i dunno.... Nov 26 06:23:11 users should at least be given the option to flag which contacts should be allowable from the emergency dialer Nov 26 06:23:12 why flawed? Nov 26 06:23:23 that design guarantees you can call an emergency number to get help Nov 26 06:23:37 you should pretty much always be able to dial 112 on a GSM phone, AFAIK Nov 26 06:23:38 you can't fuck it up and pick the wrong number in case of emergency Nov 26 06:23:54 romainguy, you still have to manually punch in 911 and then dial Nov 26 06:23:58 jerjunkel: ah, maybe it's an Android version thing - let me try with another phone :) Nov 26 06:24:07 which isn't exactly *easy* if you really are under duress, given it's a touch screen and all Nov 26 06:24:11 o/ Nov 26 06:24:28 adding a few options would ultimately be helpful Nov 26 06:24:37 as well as adding to its safety features Nov 26 06:24:49 adding the actual emergency number would be helpful. Nov 26 06:24:54 Leeds: yea.....1.6 and up Nov 26 06:24:55 e.g. it could easily have a single button that says "dial 911" and then "confirm" Nov 26 06:25:06 so that you avoid accidental activations Nov 26 06:25:09 morning folks.. Nov 26 06:25:14 jerjunkel: there are actually a lot of phones out there still running 1.5, FYI Nov 26 06:25:21 but it's completely senseless that you need to still go and dial the number for emergency Nov 26 06:25:30 then file a bug Nov 26 06:25:34 open a discussion on the mailing list Nov 26 06:25:38 propose patches Nov 26 06:25:43 seriously :) Nov 26 06:26:16 I having a problem with textures not showing on an HTC device but it works flawless in the emulator, anyone knows about this? does the texture needs to be mipmapped?? Nov 26 06:26:17 I'm not very happy with the file a bug process, either, they seem to sit in a black hole Nov 26 06:26:18 Leeds:hmmm.......do u still develop on 1.5? Nov 26 06:26:25 pfn: they are not Nov 26 06:26:30 and it's not just about the bug Nov 26 06:26:39 like I said, join the mailing lists and start a discussion about it Nov 26 06:26:41 how are you guys doing? Nov 26 06:26:44 I think 1.5 is the correct base platform to target nowadays - if you don't need 1.6, don't use it Nov 26 06:26:44 so that the Android team can chime in Nov 26 06:26:54 also, submit patches :p Nov 26 06:27:09 submitting patches isn't really an option without an adp to test on Nov 26 06:27:11 2.0 is already here. Nov 26 06:27:12 pfn: jbq does a lot of triage on the bugs so they come to the attention of the correct internal people - it's just that those people don't tend to post back to the public tracker Nov 26 06:27:17 i'm still looking for beta testers for my app, and would be even more interested if you are near a Trustive hotspot (http://www.trustive.com) (i'll provide a free wifi pass for beta tester) Nov 26 06:27:22 Leeds: I do too :p Nov 26 06:27:30 Ohan: stomach ache :( Nov 26 06:27:36 Leeds, yeah, I understand that, and it's difficult, but still, as an external user, it feels like a black hole Nov 26 06:27:42 Leeds, i told you, no mcdonalds! Nov 26 06:27:45 ^^ Nov 26 06:27:50 romainguy: I seem to see him reassigning and categorising things a lot... nothing personal :P Nov 26 06:28:03 Ohan: nah, didn't make it out that far - it hit after breakfast Nov 26 06:28:03 Leeds:aight thanks...i'll do that in the morning Nov 26 06:28:06 yeah, jbq works late reassigning bugs and stuff Nov 26 06:28:20 Leeds, ah, i'm sorry for you mate :/ Nov 26 06:28:22 * pfn sees stuff getting updated at 1am Nov 26 06:28:32 which is rather odd, unless he's not on the west coast Nov 26 06:28:39 he's west coast Nov 26 06:28:41 (since those .com hours are supposed to be "long gone" Nov 26 06:28:43 ) Nov 26 06:28:44 and 1am is pretty common for the android team :p Nov 26 06:28:52 indeed Nov 26 06:29:26 hello is it possible to place 2 buttons on a single line in lenar layout? Nov 26 06:29:35 romainguy: but yay! stock options? Nov 26 06:29:42 swetha: that's the whole point of LinearLayout Nov 26 06:29:47 Leeds: ha! Nov 26 06:29:49 swetha: of course - use a horizontal linearlayout Nov 26 06:30:09 swetha, sure Nov 26 06:30:19 jerjunkel: it does seem to work on my 1.6 phone though, for what it's worth :) Nov 26 06:30:51 ok .. Nov 26 06:30:59 Anyone that can help me/point me in direction ? ( textures not showing on device but works in emulator ) Nov 26 06:31:47 romainguy, anyway, I can't imagine the emergency dialer meeting everyone's needs regardless of whether the android team is interested in my suggestions Nov 26 06:31:47 let me try it out Nov 26 06:32:06 pfn: then help fixing it Nov 26 06:32:30 romainguy, e.g. one inspiration for doing this is in-case-of-emergency information (there's an ICE app on market, and it sucks, and that leads me to want to write the emergency dialer replacement) Nov 26 06:33:57 e.g. I'm in an accident and I need help, 911 is handy and all, but I want certain people notified, or I want the EMTs to know what to do with me, or where to take me (insurance considerations) Nov 26 06:34:09 I get it Nov 26 06:34:12 but Nov 26 06:34:16 and I dare repeat myself Nov 26 06:34:17 file bugs Nov 26 06:34:19 open discussions Nov 26 06:34:22 submit code Nov 26 06:34:24 help make it better Nov 26 06:34:44 but if you don't want to, just say so :) Nov 26 06:35:15 well, I'd like to help make it better by being able to sell something on market for a while first, and then open bugs and submit patches :) Nov 26 06:35:38 yeah, that's not helping :) Nov 26 06:37:17 well, the help comes after helping myself first for a little while, sorry, I'm selfish Nov 26 06:37:52 anyway, better to have patches come after I familiarize myself with the the problem more intimately first ;-) Nov 26 06:46:34 pfn: things rarely work out that way, you know... Nov 26 06:55:58 can someone help me make sense of a "java.illegalStateException: no wrapped connection" i have when using httpClient? Nov 26 06:56:39 i think i'm not using the HttpClient correctly ... Nov 26 06:57:21 can you show us your code? Nov 26 06:58:18 sure Nov 26 06:58:44 http://friendpaste.com/776jatC0argvklagBhWuC8 Nov 26 06:58:54 jasta, you mean no contributions come down the line? I guess that's kinda like documentation ;-) Nov 26 06:58:59 i believe the issue comes from the fact i'm reusing the same HttpClient instance, over and over Nov 26 06:59:13 hmm, why does StatusBarManager.disable() keep saying I don't have android.permission.STATUS_BAR... I clearly state it in my manifest Nov 26 06:59:31 maybe i shouldn't, but then, how to have the socket timeout and connection timeout applied to all the connections? should i reset it each time i create a new HttpClient instance? Nov 26 06:59:53 pfn: probably because you're not permitted to take it. Nov 26 07:00:01 if you look at logcat during your package installation you'll see a note about that Nov 26 07:00:11 its probably a system only permission Nov 26 07:00:20 Ohan: you're supposed to re-use the httpclient instance. Nov 26 07:00:23 the exception seems to be on line 63 Nov 26 07:00:35 oh, so i'm doing the right thing, just not correctly ;) Nov 26 07:00:53 seems to be line 63 or _is_ line 63? Nov 26 07:01:01 let me paste the exception Nov 26 07:01:05 yes please do Nov 26 07:01:07 * pfn uninstalls and tries again Nov 26 07:01:22 adb install -r will show you too Nov 26 07:01:55 sorry, should have done that from the beginning, it's still very early here, i'm not completely awake i guess ;) Nov 26 07:02:04 http://friendpaste.com/776jatC0argvklagBhWuC8 Nov 26 07:02:12 jasta, hmm, nope, no output Nov 26 07:02:32 man i suck, just a sec i'll put the exception at the bottom so the line numbers are ok ;) Nov 26 07:02:35 not from adb install -r Nov 26 07:02:39 but yes, it does show in logcat Nov 26 07:02:54 i meant install -r would show it in logcat Nov 26 07:02:56 http://friendpaste.com/776jatC0argvklagBhWuC8 <=== there Nov 26 07:02:57 you dont have to uninstall Nov 26 07:02:59 oh Nov 26 07:03:33 can anyone tell me like is there any interface builder for android? Nov 26 07:04:11 Ohan: hehe, this code is silly Nov 26 07:04:31 jasta, no doubt, i have no clue how to use the HttpClient... Nov 26 07:04:35 all of your member variables are static so i have no idea why you even have a getInstance method and non-static methods Nov 26 07:04:42 i went through the tutorial, but it didn't make much sense to my poor brain Nov 26 07:04:49 also your singleton pattern is way off ;) Nov 26 07:04:53 :( Nov 26 07:05:15 non static methods to reuse the same HttpClient instance, as you told me Nov 26 07:05:28 and singleton to have the same HttpClient accross all the calling classes Nov 26 07:05:46 what would you advise? Nov 26 07:05:48 Ohan: your explanation only further reinforces your confusion Nov 26 07:06:07 i'm ears wide opened ;) (or eyes wide opened should i say ;) Nov 26 07:06:17 anyway, i can't see anything wrong here... Nov 26 07:06:20 what url are you feeding it? Nov 26 07:06:50 please can anyone tell me like is there any interface builder for android? Nov 26 07:06:55 swetha: no, there's not. Nov 26 07:07:12 jasta, various urls Nov 26 07:07:16 Ok thanks Nov 26 07:07:19 google.com, urls from my own server Nov 26 07:07:28 Ohan: fyi, there is a method HttpProtocolParams.setUserAgent(params, userAgent) that you should use instead of setting it manually in a header. Nov 26 07:07:40 jasta, oh, i'll do that then Nov 26 07:07:50 so there's no "obvious" flaw in my code? Nov 26 07:08:07 appart from the fact i shouldn't use a singleton or static methods Nov 26 07:08:21 (i'm really far from being a java expert i'm afraid) Nov 26 07:08:34 Ohan: you completely misunderstood what i was saying about singletons btw Nov 26 07:08:44 could you please explain? Nov 26 07:09:26 go read what the singleton pattern looks like Nov 26 07:09:26 oh wait, should the "HttpClient hc" not be static? Nov 26 07:09:35 that's what i did to come up with this Nov 26 07:10:02 im not going to just edit your code for you Nov 26 07:10:06 you need to use your brain and figure out why it doesn't make sense Nov 26 07:10:45 i'm not asking you edit my code, i'm asking you to explain Nov 26 07:10:47 i mean that you have a finalize here is especially funny. when exactly do you think that will happen? :) Nov 26 07:10:55 "your code sucks" isn't that much of an explanation :/ Nov 26 07:11:12 jasta, when i call it Nov 26 07:11:16 it is clear that you copied-and-pasted this source from other sources and never bothered to understand it. Nov 26 07:11:24 from the classes that use this UrlGetter Nov 26 07:11:31 jasta, that's what you assume Nov 26 07:11:35 wait, you call UrlGetter.finalize()!? Nov 26 07:11:45 hi i have a question, when I have my .apk how do I get it on my htc ? Nov 26 07:11:52 anyway, if all you're going to do to "help" is criticize without explanations, i'm done, thanks anyway for the help this far Nov 26 07:12:04 also, what the hell is this: Nov 26 07:12:06 try { Nov 26 07:12:08 INSTANCE = null; Nov 26 07:12:13 } catch (Exception e) { Nov 26 07:12:13 } Nov 26 07:12:15 ? Nov 26 07:12:43 that's some "forgotten" code Nov 26 07:12:53 which means? Nov 26 07:12:54 the try catch was there for some previous code i edited out, my bad Nov 26 07:13:05 ok, and then yet again my question about finalize? Nov 26 07:13:09 when exactly do you think that gets called? Nov 26 07:13:18 when i call it, as i said Nov 26 07:13:34 and what gave you the ide athat was correct? Nov 26 07:13:41 i do: UrlGetter ug = UrlGetter.getInstance() Nov 26 07:13:46 btw, you calling finalize is almost certainly why you're getting that exception. Nov 26 07:13:49 dumbass :) Nov 26 07:13:54 and when i don't need it anymore, in the "onPause" (if finishing): ug.finalize(); Nov 26 07:14:08 if you shutdown the HttpClient, you can't re-use it later. Nov 26 07:14:14 see, that's just plain stupid, treating me of dumbass without knowing Nov 26 07:14:32 i'm _not_ shutting down the HttpClient until i'm in the onPause (if finishing) part of my code Nov 26 07:14:39 and this is _not_ when i'm having the issue Nov 26 07:14:42 also, finalize is for the VM to call when the object is being reaped. Nov 26 07:14:46 you should NEVER call it manually Nov 26 07:14:51 anyway, as i said, criticizing without explanations isn't helping, thanks Nov 26 07:15:00 nor would a singleton normally implement it (OBVIOUSLY!) Nov 26 07:15:22 Ohan: ok, let's back up. Nov 26 07:15:25 explain to me what a singleton is. Nov 26 07:16:08 a single instance, accross different classes, without having to pass the instance along Nov 26 07:16:50 and how long does the object stay referenced? Nov 26 07:17:08 for the duration of the classes Nov 26 07:17:14 in my case, for the duration of the app Nov 26 07:17:14 which is how long? Nov 26 07:17:29 yes, for the duration of the process. Nov 26 07:17:55 so, if you shut down the httpclient in one activity's onpause, where do you "unshutdown" for another activity? or for that same activity to use when it comes back? Nov 26 07:19:36 in other words, if the singleton instance lasts for the life of the process, and you completely disable the HttpClient object at a point during your process life, what makes you think you can use it after that point? Nov 26 07:22:27 ok, so maybe i should rephrase what i said already twice Nov 26 07:23:03 i'm shutting down the instance in the "onPause" (only if finishing) of my activity Nov 26 07:23:13 trust me, i undesrtand. Nov 26 07:23:21 when the activity is finished, i do a system.exit, and that's it Nov 26 07:23:25 you think activity death is process death Nov 26 07:23:30 and you couldn't be more wrong about that. Nov 26 07:23:33 so why are you telling me about unshutting down or whatever? Nov 26 07:23:43 and what does System.exit do? Nov 26 07:23:48 end the process, right? Nov 26 07:23:50 honestly, probably nothing on Android :) Nov 26 07:23:57 anyway, i don't get why we're arguing about that Nov 26 07:24:02 oh yeah, it does Nov 26 07:24:03 that you are calling it suggests you profoundly misunderatnd how android works. Nov 26 07:24:16 that's yet another argument Nov 26 07:24:24 and still nothing to do with my issue Nov 26 07:24:42 i believe it directly relates to your issue. Nov 26 07:25:47 see, i have a "Log.d(TAG, "Finalizing")" log displayed when i finalize Nov 26 07:25:53 and this isn't called until the end of the app Nov 26 07:26:02 and the issue arises _during_ the app Nov 26 07:26:05 not after the end Nov 26 07:26:18 long before a "finalizing" is displayed in the logs Nov 26 07:26:23 i understand what you're saying. and i'm sure you have a logic error :) Nov 26 07:27:23 you're just digging this hole deeper for yourself. with each new comment you reveal how little you understand about Java and Android, allowing me to reinforce my assumption that you have a gaping logic error resulting from a profound misunderstanding of your environment. Nov 26 07:27:31 because as i said, the HttpClient code shown in getUrlContent _is_ correct. Nov 26 07:28:53 feel free to repackage this into a small test app. if you remove the insanity that you've placed outside this class, i'm certain you'll find that it works properly :) Nov 26 07:29:06 and if not, at that time go ahead and share the source with me and i'll figure it out for you. Nov 26 07:29:55 i have another issue at the moment, with the same part of the code Nov 26 07:30:07 seems i can't get www.google.com at the moment... Nov 26 07:30:20 that's a different issue either way, because that would throw an IOException. Nov 26 07:30:24 nor any other url that isn't on our server, which makes no sense to me... Nov 26 07:30:24 not IllegalStateException Nov 26 07:30:34 yes, as i said, "another issue" Nov 26 07:30:42 i'm just confirming for you. Nov 26 07:30:46 i'm not sure which one i should try to fix first Nov 26 07:30:48 thanks for the confirmation Nov 26 07:30:54 you honestly can't trust your conclusions :) Nov 26 07:31:34 anyway, i'll leave you to think about this. let me know if you end up packaging up a simple example for me to look at. Nov 26 07:33:41 * _kai_ is away now (autoaway - screensaver) Nov 26 07:33:58 thanks Nov 26 07:46:23 is it possible to have a static member initialized with an instance of another class? if so, how? Nov 26 07:46:47 i should say: for a static class (to avoid the singleton) Nov 26 07:46:52 private static Foo FOO = new Foo(); ? Nov 26 07:47:01 i everything is static, i should need a singleton right? Nov 26 07:47:04 if Nov 26 07:47:27 cbeust__, oh, that easy, thanks ;) Nov 26 07:47:34 You should avoid using statics as much as possible or you'll end up with weird states because of activitity lifecycles Nov 26 07:48:00 it's to use the same HttpClient instance accross all the classes used by my activity Nov 26 07:48:08 Ohan: you do realize that private static Foo FOO = new Foo() _IS_ a singleton right? Nov 26 07:48:08 what would you recommend? Nov 26 07:48:21 jasta, that was my point Nov 26 07:48:32 Ohan: cbeust__ was speaking generically -- you should use a singleton reference to HttpClient. Nov 26 07:48:39 thats how HttpClient wants you to use it :) Nov 26 07:48:41 ok Nov 26 07:49:01 if that was your point, why did you explicitly say "to avoid the singleton"? Nov 26 07:49:08 i guess my whole issue boils down to me not using a ThreadSafeClientConnManager Nov 26 07:49:16 as i'm creating a "DefaultHttpClient" Nov 26 07:49:19 i have to check that Nov 26 07:49:42 erm, DefaultHttpClient i think uses ThreadSafeClientConnManager by default. i'm not 100% sure about that though. Nov 26 07:49:47 jasta, i meant "to avoid the singleton pattern in the class using this static member) Nov 26 07:50:27 i have to check... i have a warning saying "invalid use of SingleClientConnManager: connection still allocated" in my logs Nov 26 07:50:30 i still personally don't understand why you just don't implement getContentURL as a static method. Nov 26 07:50:41 "make sure to release the connection before allocating another one" Nov 26 07:51:00 oh, well that says it pretty clearly then... Nov 26 07:51:01 jasta, that's what i'm doing know, but i do strongly believe it has nothing to do with my issue Nov 26 07:51:23 jasta, yep, so i'm trying to use a ThreadSafeclientConnManager instead, just to see if that fixes my issue(s) Nov 26 07:51:39 good idea ;) Nov 26 07:53:32 just need to find how to do that... Nov 26 07:54:23 you basically do it via Nov 26 07:54:39 new DefaultHttpClient(new ThreadSafeClientConnManager(...), ...); Nov 26 07:54:49 anyone toyed with AccountManager in 2.0? Nov 26 07:56:03 Ohan: something vaguely like: Nov 26 07:56:05 http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e629 Nov 26 07:56:33 yup Nov 26 07:56:40 thansk Nov 26 07:57:27 <_kai_> did anyone can help me? i'm using my class extended from LinearLayout Nov 26 07:57:28 <_kai_> and how can i use it at ListView? Nov 26 07:57:51 <_kai_> because Unsupported operation exception excepts Nov 26 08:00:33 <_kai_> b.c. as i see at tutorial, it uses arrayadpter, an it only for TextView =\ Nov 26 08:05:11 are anyone still interested in googlewave.com invites, I have a couple extra Nov 26 08:06:16 is Nov 26 08:09:05 can i execute some code in a class, outside of a method? Nov 26 08:09:30 You can use a static initializer Nov 26 08:09:43 Ohan: static { ... } Nov 26 08:09:52 hmm, is there any way to clear default activities for intents programmatically? Nov 26 08:09:53 oh Nov 26 08:09:54 thanks ;) Nov 26 08:09:57 (the opposite of what I was asking earlier) Nov 26 08:10:13 pfn: possibly, check with the PackageManager Nov 26 08:10:54 hmm, there's a clearPreferredActivities thing Nov 26 08:11:28 thats probably it :) Nov 26 08:11:28 but that takes a package name... Nov 26 08:11:49 as it should :) Nov 26 08:11:57 Probably requires permissions as well Nov 26 08:12:04 ...also as it should :) Nov 26 08:12:15 I guess getPreferredActivities will give package name, so that's not a problem Nov 26 08:16:46 hmm, getPreferredActivities is weird, you can only limit by package name but not intent filter? Nov 26 08:18:14 Does anyone know what smtp-auth methods the email-client in 2.0 supports? Nov 26 08:19:33 pfn: well, you could get the packages by first querying for intents. Nov 26 08:19:46 see the source for IntentChooser -- it might give you some ideas about how all this works Nov 26 08:19:59 err no, its ResolverActivity Nov 26 08:20:20 (its the the activity that actually displays when you set the preferred activity) Nov 26 08:20:37 hi all Nov 26 08:20:54 any docs a newbie can read after doing the complete compile of source on ubuntu? Nov 26 08:22:46 india7145: what are you trying to do? Nov 26 08:23:36 i am trying to port android on htcx7500 or athena Nov 26 08:23:47 uh Nov 26 08:24:05 Would you call yourself an expert in Linux drivers and other low level layers? Nov 26 08:24:08 i have got an image without drivers and does provide some funtions Nov 26 08:24:30 cbeust: i have got 12 years of experience in linux device driver programming Nov 26 08:25:00 Is Context.getCacheDir() same directory among different PIDS of an activity? Nov 26 08:25:02 cbeust: so don't worry, i'll understand:) Nov 26 08:26:13 dinamic: its unique to an application package, not process. Nov 26 08:26:39 that package would be defined by apk boundaries, in the AndroidManifest.xml Nov 26 08:26:42 jasta, Greate, thanx for the response.. Nov 26 08:27:20 hello Nov 26 08:27:45 i can't get to the recovery console to update my adp1 :/ Nov 26 08:27:51 i can get to the boot loader Nov 26 08:27:56 wrong channel Nov 26 08:28:00 try #android or #android-root Nov 26 08:28:04 i see Nov 26 08:28:11 whats -root for? Nov 26 08:28:30 people who are mucking around with their device in the way you are :) Nov 26 08:28:48 well all i need to do is to update to 1.5 or newer Nov 26 08:28:57 yeah, but that's not here. Nov 26 08:29:00 right Nov 26 08:33:05 <_kai_> hey, how to add view items(extended from LinearLayout, contain imageview, textview) to ListView? Nov 26 08:36:06 yay, clearPackagePreferredActivities works Nov 26 08:38:46 _kai_: use an adapter Nov 26 08:39:08 <_kai_> øüçäóüóòå üí ùöò, Nov 26 08:39:14 <_kai_> implement my own? Nov 26 08:39:19 if i declare a method as throwing a SocketTimeoutException, it shouldn't appear in the logs if i "try catch" an Exception in the calling method, right? Nov 26 08:39:49 <_kai_> Ohan, ugu Nov 26 08:40:17 <_kai_> cbeust__, because ArrayAdapter only for one TextView Nov 26 08:40:43 _kai_: so override getView(...) Nov 26 08:40:57 <_kai_> hmm Nov 26 08:41:11 <_kai_> will try do it Nov 26 08:41:14 i feel like there must be literally hundreds of examples of this sort of thing on the net. could you really not find anything? Nov 26 08:41:51 Ohan, only uncaught exceptions appear in the logs (and exceptions where you print them out) Nov 26 08:42:14 <_kai_> all solutions are different Nov 26 08:42:16 ok, i must have somewhere where i miss a catch Nov 26 08:42:30 <_kai_> Ohan, try to debug;) Nov 26 08:43:03 <_kai_> or log methods where app can throw extheption Nov 26 08:43:19 <_kai_> and you will see were it dows Nov 26 08:43:21 <_kai_> *down Nov 26 08:43:21 should i specifically catch a SocketTimeoutException, or if i catch an Exception it should work? Nov 26 08:43:49 <_kai_> let catch SocketTimeoutException Nov 26 08:44:20 <_kai_> b.c. some other exception can excepts too Nov 26 08:45:08 <_kai_> and you will have different ways to do at catching them (differen friendly messages or something else) Nov 26 08:46:20 hi, who has working uClibc config for dream? Nov 26 08:50:47 how do I debug my app? or at least get stacks from it Nov 26 08:50:56 gdbservr Nov 26 08:51:02 ) Nov 26 08:51:13 trying to understand why it hangs for like 10 seconds when I'm not doing anything in onResume/onPause Nov 26 08:52:41 I guess the important thing is how I make my app "ddm aware" Nov 26 09:11:39 jasta, ok i believe using the Threaded versino fixed all my issues Nov 26 09:11:59 i rename "finalize" in "close" (and i call close from the caling classes, to shutdown the connection manager) Nov 26 09:12:05 this all seems to work well Nov 26 09:12:46 as for the "better use of singleton" Nov 26 09:13:01 so everything is static now, and there's no constructor anymore (nor getInstance) Nov 26 09:14:41 but now, for some reason, i have a socketTimeoutException when trying to get www.google.com Nov 26 09:14:59 this means it's taking more than 15seconds to open www.google.com, which seems... really odd Nov 26 09:16:22 and more than 30seconds too ... Nov 26 09:16:28 there's something wrong, dunno where though Nov 26 09:21:49 anyone here having issues connecting to www.google.com ? Nov 26 09:31:18 in the android browser, i have no clue why (even after a phone reboot), i just can't access some urls Nov 26 09:32:16 www.google.com, www.lemonde.fr, yahoo.com ... Nov 26 09:32:36 the resolution (redirections and stuff, like typing yahoo.com redirects me to fr.m.yahoo.com) works correctly Nov 26 09:32:53 but then the browser just stops loading (the green loading bar at the bottom of the screen stops at around 10%) Nov 26 09:33:19 anyone has a clue what could be happning? Nov 26 09:34:26 in the logs i see a "InetAddress: www.radioparadise.com: 72.26.207.68 (family 2, proto 6)" Nov 26 09:34:33 for example, and then nothing else Nov 26 09:38:08 ah tiens Ohan un francais Nov 26 09:38:11 oh, never mind, i have such a sucky router... Nov 26 09:38:13 neoakira, ouais ;) Nov 26 09:38:24 #androidfra :) Nov 26 09:38:41 tu dev quoi comme appli ? Nov 26 09:40:31 i believe it's an english channel ;) Nov 26 10:24:04 I need some hint of solving this in java, i Want a hasmap, which order is maintained, so i found LinkedHashMap, and now i want to get an iterator of an found item in the map and iterate prev/next, how do i do this? any hints? Nov 26 10:26:03 maybe i should use a array of hashes that maintains the order with keys of items in a std map or is there any better ways? Nov 26 10:29:16 is it better to use getContext().openFileOutput() or to create files with FileOutputStream(getContext().getCacheDir()) Nov 26 10:29:26 if the files are temporary Nov 26 10:29:31 cache right? Nov 26 10:49:13 hi Nov 26 10:50:46 hi Nov 26 11:10:29 hi guys, is it possible to charge the user from inside my application? Or would i have to handle that on my own? Nov 26 11:16:55 * _kai_ is away now (autoaway - screensaver) Nov 26 11:18:31 charge as in money? Nov 26 11:18:47 or electrocute? :) Nov 26 11:18:57 Is it possible to use a specific color for transparency? I.e FF00FF gets transparent? Nov 26 11:19:51 VelcroMan: all colours (potentially) have an alpha channel Nov 26 11:19:56 er, alpha value Nov 26 11:20:23 Leeds: Sorry, forgot to tell. It's an image file. Can i define a transparent color? Nov 26 11:22:08 I have the sdk running with a sdk1.5 image. I can see the terminal emulator available in the settings-> applications-> manage applications, but then is not listed in the app tab in the 'desktop' or in the available apps to assign keys to. how do I launch it? Nov 26 11:22:13 ah, not sure about that... should be doable though Nov 26 11:23:24 VelcroMan: not all image formats support transparent color Nov 26 11:23:37 some have an alpha channel Nov 26 11:25:08 StucKman_: It's a gif, so i could remove it before. But i got quite a few files.. :P No way do define a color in the SDK? Nov 26 11:30:06 VelcroMan: gif has transparent colors, yes, but then the renderer has to implement it Nov 26 11:39:00 uh, some of the icons on my home-screen moved up a bit ... weird. http://imgur.com/81qNy.png Nov 26 11:39:24 has this happened to anyone else? Nov 26 11:39:31 ah, found how to launch the terminal: it's in the dev tools Nov 26 11:39:47 but then I can't execute commands as root Nov 26 11:40:44 if you're running in the emulator, you can become root using adb, but not on the terminal emulator, I think Nov 26 11:40:59 ok, googling for adb Nov 26 11:41:10 uh-huh... Nov 26 11:55:12 hie mates Nov 26 11:59:54 Leeds: money, ie, access the google market account from within the application? Nov 26 12:08:47 Hi, Anyone who know how I force a SlidingDrawer to stay in one place no mater if the phone is in horizontal or vertical mode? Nov 26 12:32:26 with apps that need to store login's is there any master password system to securely store them? like the google account password when you sign into the phone maybe Nov 26 12:36:31 or would it be pretty common practice to store the plaintext in shared preferences Nov 26 12:55:27 * _kai_ is away now (autoaway after 30 minutes of expectation) Nov 26 13:04:04 Does the tag "vold" from logcat ring a bell to anyone? it sends an error that it can' t lookup the media /devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0:0001 Nov 26 13:04:17 it happens when trying to shutdown wifi* Nov 26 13:16:36 Xeli: vold seems to be the sdcard Nov 26 13:17:08 from the mount output: /dev/block//vold/179:0 /sdcard vfat Nov 26 13:17:44 * _kai_|away has gone to work Nov 26 13:18:03 the sdcard? :O Nov 26 13:18:16 Xeli: I agree with StucKman_ since mmc are often refering to sdcard on nux Nov 26 13:18:49 Can I repeat a drawable that i use at "drawable bottom" of a textview? Nov 26 13:18:50 well it would make sense then that i can' t find certain files... ;) Nov 26 13:18:55 thanks ;) Nov 26 13:23:22 my installs never refer to it as mmc, but thats because im so fuckin awesome Nov 26 13:28:26 hi there scav ;) Nov 26 13:28:29 how are you? Nov 26 13:29:32 lol Nov 26 13:32:15 <_kai_|work> :) Nov 26 13:50:37 what values would you guys recommend for the setSoTimeout and setConnectionTimeout for the HttpClient? Nov 26 13:50:49 i have respectively 5s and 15s Nov 26 13:52:53 is there a google checkout API for android? Nov 26 13:56:31 Xeli: there's also /system/bin/vold Nov 26 13:57:19 StucKman_: Do you have any idea what it does? Nov 26 13:58:05 Xeli: no, I just found it Nov 26 13:58:33 StucKman_: I found something about it, seems like it's used to mount stuff Nov 26 13:58:52 aha Nov 26 13:59:16 which would explain it' s affinity with the sdcard ;) Nov 26 14:10:24 Is there an example around that lets me scroll vertically and horizontally a large image drawn in a Canvas? Say the image is twice the area as the viewable area. I don't want scrollbars drawn on the screen. Nov 26 15:08:23 Question: How do I tell if a BluetoothSocket has been closed on the remote end? There doesnt seem to be any methods for the socket that indicate connection status Nov 26 15:18:09 mal|lappy: maybe just call getRemoteDevice? it's bound to fail if the connection is down Nov 26 15:18:23 hmmm... I'll give that a shot. Nov 26 15:18:29 didn't even think about that lol, thanks Xeli Nov 26 15:23:10 happy t-giving all! Nov 26 15:23:34 t-giving? Nov 26 15:23:48 question: i've created a quick example to learn webview. when loading slashdot, it works just fine. when loading engadget, it switches over to the default browser app. what gives? Nov 26 15:23:53 The socket is disconnected on the remote end, but the remote device is still valid, and I'm still paired. So how do I account for that situation? Nov 26 15:23:57 ahhh, nvm, i get it ;) Nov 26 15:24:14 BluetoothSocket.getRemoteDevice() gets the correct device even though the socket itself is disconnected. Nov 26 15:26:15 When a user purchases an adk from the Market, is there copy protection preventing the guy from handing out the adk to others? When you set your phone to allow install of non-Market app, will it fail if he attempts to install the adk from a non-Market website? Nov 26 15:27:09 There is protection, yes mikejet, but its awful Nov 26 15:27:27 Anyone that knows what they are doing, will be able to get the APK Nov 26 15:27:57 mal|lappy: i think bluetooth is like ad hoc, it shows as if the devices is still there eventhough it's not...beats me though, wifi/bluetooth its all messed up :P Nov 26 15:28:58 Xeli: Heh, I'm gonna keep playing around, try to find SOMETHING that fails when the socket is disconnected. Nov 26 15:30:04 Frinkz : i may be okay with that. something that just disallows mass copying by the public sounds ok. When the app references my own webserver, is there a way to retreive the guy's phone serial#? Maybe require client-side SSL auth, and look at his SSL cert. Nov 26 15:30:12 Frinkz: as I saw it put earlier, "thanks-for-going" Nov 26 15:31:10 I mean makes it a huge hassle instead of disallow, actually. Nov 26 15:31:14 :D Nov 26 15:31:16 mikejet: if you're providing a service, that's fine, but otherwise don't try to get too clever with copy protection - if they want it, it only takes one person to disassemble your code and strip the protection Nov 26 15:31:42 Your only slowing down the inevitable Nov 26 15:32:09 And while, googling my game brings up dozens of websites holding it illegally, there are still enough people out there willing to pay for something good - so its not too bad Nov 26 15:33:47 I wish people were interested enough in my stuff to pirate it Nov 26 15:34:07 lol Nov 26 15:34:17 :D Nov 26 15:37:16 hi all, getting "Host is unresolved", but only when starting app, not later on in code. is there any reason for this to happen ? Nov 26 15:37:35 Do you have the inernet permission on? Nov 26 15:37:51 yep Nov 26 15:37:59 Leeds: You've been at this thing infintely longer than I have, I'm terrible with Android... All you need is a good idea to steal Nov 26 15:38:05 Thats all I have johnnyzen :P sorry Nov 26 15:38:06 The Eclipse "add internet permission to .xml" operation is broken. It puts it in the wrong place. Nov 26 15:38:59 hmm, manually typed it in. I put it after opening manifest tag Nov 26 15:39:19 *parent tag Nov 26 15:39:55 Nov 26 15:40:10 yep, all fine Nov 26 15:41:38 seems to ignore my httpParameters aswell, just sits for ages. Nov 26 15:42:12 (setConnectionTimeout and setSoTimeout) Nov 26 15:42:15 does the web browser work? Nov 26 15:43:46 mike: I am testing in low signal area, so I know sometimes there is no carrier network available. but I dont understand why I only get this on opening app and not later in app, where I connect again. Nov 26 15:44:02 and why my timeouts are being ignored. Nov 26 15:44:25 Does the error come immediately, or does it time out? Nov 26 15:44:27 (waiting 30 seconds before io exception) Nov 26 15:44:43 * Frinkz shrugs Nov 26 15:44:52 how would i join a string array? Nov 26 15:46:14 any word on when the 2nd Android 2.0 phone will come out? Nov 26 15:46:35 NooberScoop: googles you friend for that Nov 26 15:47:02 why have a chat if "google it" is your answer for everything? Nov 26 15:47:13 NooberScoop: prob quicker than waiting for answer here :) Nov 26 15:47:15 you mean concatenating? Nov 26 15:47:20 try + Nov 26 15:47:29 (no disrespect inteneded) Nov 26 15:47:51 I really hate this "Run Configurations..." thing in Eclipse. I always read that where "run" is a verb. Then the dialog is goofy. Nov 26 15:48:12 test = arr[0] += arr[1] ?? maybe ? Nov 26 15:48:42 if you leave the second = away, yeah ;) Nov 26 15:48:48 well i mean are there no builtin functions to do it Nov 26 15:49:00 what do you want to do exactly? Nov 26 15:49:18 NooberScoop: you would have found your answer by now on google ;) Nov 26 15:49:19 like python ",".join(["hello","world","my","name","is","blah"]) Nov 26 15:49:52 http://stackoverflow.com/questions/80476/how-to-concatenate-two-arrays-in-java Nov 26 15:50:15 ok well i see a public static String join (CharSequence delimiter, Iterable tokens) Nov 26 15:50:53 how do i get a CharSequence from a String? Nov 26 15:51:43 on a rooted phone, is there any reason why "wlan_loader [+ flags]" does work, while "su -c wlan_loader [+ flags]" does not? Nov 26 15:51:44 http://journals.ecs.soton.ac.uk/java/tutorial/java/nutsandbolts/arraysAndStrings.html Nov 26 15:52:33 NooberScoop: i think you can just use Strings whenever a charsequence is expected Nov 26 15:56:02 ok thanks Nov 26 16:01:31 It's kind of weird that when I'm scrolling a TextView, my custom View elsewhere on the screen keeps getting onDraw() callbacks. Nov 26 16:03:08 Any interesting tips on keeping network traffic down, or saving battery life? Nov 26 16:03:55 mikejet Nov 26 16:04:01 ok so if i upload my app to my server, and point to it on my phone it installs fine Nov 26 16:04:04 mikejet: don't use loops :P Nov 26 16:04:17 Like, in my bluetooth app, I run a loop checking for available data to read from Nov 26 16:04:21 its a horrible way of doing it Nov 26 16:04:29 i do the same on the emulator, it says "application not installed" Nov 26 16:04:42 i have "use non-market apps" checked in settings Nov 26 16:05:46 do i have to use adb to install? Nov 26 16:21:49 anyone know of a good getting started tutorial for android 2.0. Ive seen googles 'Hello World' Tutorial, but it doesnt really cover the different aspects of actions and good coding practice Nov 26 16:22:25 I am completely new at Android development. Planning to start on my first true app soon Nov 26 16:27:40 If I want to get motion events, will the base View class give me that? I'm a little confused on what SurfaceView is all about. Nov 26 16:30:09 nevermind. i'll just use View/Canvas for now. Nov 26 16:37:13 Hello, I've created a programmatic view. How can I set it as a content in my activity? Nov 26 17:03:06 Question: is there any way to know that a BlueToothSocket connection has been closed on the other end? Nov 26 17:06:16 Aaagh. How the bloody flaming hellfire do you change the content of a tab after the tab's been createde?!?!?!?!?! D: Nov 26 17:06:49 applications can't use ConnectivityManager.setNetworkPreference(int) ? I'm getting a SecurityException (android.permission.WRITE_SECURE_SETTINGS) <- but I do have that in my manifest - I guess I just can't get that permission for some reason? Nov 26 17:08:42 is there a way to force the device to use gsm/cdma network instead of WiFi for my specific connection? Nov 26 17:14:00 xavd: hey man just wanted to let you know i was a little taken aback when a search on the market app for "chinese flash" failed to bring up the many results of "chinese flashcards" Nov 26 17:15:00 * Syniq sighs. Nov 26 17:16:34 Syniq: what's the matter? Nov 26 17:22:28 anyone done rpc stuff on android, any suggested formats? Nov 26 17:22:33 i thought about json Nov 26 17:22:41 faster and smaller the better Nov 26 17:24:56 JSON rox sox Nov 26 17:25:08 deebo, OR you could use Protobufs ;x Nov 26 17:25:24 those are more efficient than XML or JSON Nov 26 17:25:52 hmm that could work Nov 26 17:26:16 i just need to serialize and deserialize simple POJOs between appspot and android Nov 26 17:26:32 newer technology = cooler so i guess protobufs it is Nov 26 17:30:50 I don't get it, why is my app hanging for no reason, it's not even doing anything Nov 26 17:31:07 maybe it actually is and thats why its hanging? :) Nov 26 17:31:23 aha. Nov 26 17:31:49 deebo, nope, there's nothing in onPause or onResume Nov 26 17:32:03 (there is, but it doesn't get executed, some Log calls if'd out) Nov 26 17:32:11 and it crashes when? Nov 26 17:32:16 it gets an ANR Nov 26 17:32:27 after it prompts to force close or wait Nov 26 17:32:29 during? Nov 26 17:32:29 as soon as I hit wait Nov 26 17:32:32 it becomes responsive again Nov 26 17:32:50 * pfn ponders Nov 26 17:34:11 pardon the stupid newbie question, but where would I find documentation on built-in content providers for things like contacts and calendar data? Nov 26 17:36:55 traces.txt just shows it as waiting on an event Nov 26 17:37:54 http://paste.hanhuy.com/hangingapp Nov 26 17:39:09 Am I reading this right, that there is no way at all to tell if an rfcomm bluetoothsocket has been closed on the remote end? Nov 26 17:40:43 W/WindowManager( 1015): No focus window, dropping: KeyEvent{action=0 code=4 repe Nov 26 17:40:49 at=0 meta=0 scancode=158 mFlags=72} Nov 26 17:40:49 I wonder if that's why Nov 26 17:40:49 W/WindowManager( 1015): No window to dispatch pointer action 0 Nov 26 17:40:59 for some reason my activity isn't getting focus Nov 26 17:41:02 and the ANR gives it focus Nov 26 17:41:38 can you connect to a jsp from android, I want to display some data that the jsp gets from a db in an app Nov 26 17:43:01 Counterspell: Can't work out how to retain persistent tabs whilst changing activity, or at least changing the tab content. :p Nov 26 17:59:41 how do I ensure that my activity is focussed? Nov 26 18:08:23 I'm reiterating my question - is there a possibility to use gsm/cdma network for my specific connection instead of WiFi or do I have to completely turn off WiFi using WifiManager.setWifiEnabled(false) (that would suck for the user.. wouldn't it..) Nov 26 18:13:32 Hi, anyone know why if I add a Thread.sleep(3000) AFTER a ProgressDialog.show(...) the progressDialog shows 3 seconds later? Nov 26 18:13:55 because you are blocking the UI thread Nov 26 18:14:27 Does it not complete the ProgressDialog.show(...) before going to the next line of code? Nov 26 18:14:35 it does Nov 26 18:14:51 but I tell it to sleep after its done the show? Nov 26 18:15:05 calling show() just asks to show a dialog Nov 26 18:15:12 this entails many operations Nov 26 18:15:16 which don't all happen at once Nov 26 18:15:21 you should NEVER sleep() on the UI thread Nov 26 18:15:52 ah I see, that makes sence, so is there a way to wait? Nov 26 18:16:06 send a delayed message Nov 26 18:17:07 Question: I have an application I wrote, and when I hit the "back" button, it crashes with a runtime exception in ActivityThread.performDestroyActivity. I don't have the source for that, so I don't know what's failing... any thoughts? It is entirely possible I didn't impliment something I should've to handle the application closing Nov 26 18:18:01 my MyView.onTouchEvent() is never being called, even though onTouch() is. Is there a special listener you have to set to get onTouchEvent() to be called? Nov 26 18:18:36 mal|lappy: there's nothing special to implement Nov 26 18:18:40 do you override onDestroy()? Nov 26 18:18:47 romainguy: nope Nov 26 18:19:04 hmm, why does my app hang when I press the back button in my activity Nov 26 18:19:05 mikejet: onTouch() is not a framework method Nov 26 18:19:14 it throws up an ANR and if I press wait I can then press back Nov 26 18:19:16 Ah I do... and I'm asking a thread to stop inside there, but probably not waiting for the thread to stop Nov 26 18:20:04 Is there any tutorial or page that explains how the application is effected when the user say... goes ot the home screen, hits the back button, rotates the screen, etc? Nov 26 18:21:36 romainguy: thanks, looks like its a Handler I need, Nov 26 18:22:35 the notepad tutorial crashes on back button until some point when you add something. can't figure out what though Nov 26 18:24:38 read the logs Nov 26 18:25:39 i have googled for how to download images from url's for a long time now, i have found about three different ways to do it, all of them get an IOException, i have even downloaded a full blown example and ran it on my emulator with no luck, any ideas? Maybe the emulator is set up wrong? Nov 26 18:27:09 romainguy: sorry, still not getting this, I've tried just doing a loop that waits until the current time is 3 secs > then when it started (bad I know, but just to check), and it still doesn't display the dialog until after the loop! Nov 26 18:29:04 andern: here's a image download function I use => http://pastebin.org/57523 Nov 26 18:29:31 Counterspell: \o/ ViewFlipper! Nov 26 18:30:02 rac2030: thanks, i'll try it Nov 26 18:30:47 tomfreay: because you are blocking the UI thread Nov 26 18:31:49 tomfreay: show() does not immediatly show the window, it schedules it to be painted instead of hidden in the next round of refreshes I believe Nov 26 18:31:56 sorry I'm being slow, I don't understand how this is blocking? Nov 26 18:32:00 rac2030: what does your OpenHttpConnection do? Nov 26 18:32:16 onFling() is more fun than puppies. Nov 26 18:32:26 httpurlconnection(url).getInputStream()? Nov 26 18:32:36 tomfreay: you are doing stuff on the UI thread right? so while you are doing this stuff, nothing else can happen Nov 26 18:33:00 andern: http://pastebin.org/57524 Nov 26 18:33:23 ah I see, so I need to wait until the treads finished displaying the dialog before doing anything else? Is this where the handler comes in? Nov 26 18:34:17 just tried installing the new google maps from the market and it tells me the package is not signed correctly Nov 26 18:34:20 anyone else seen this? Nov 26 18:34:26 andern: found the source url where I got this code from: http://www.devx.com/wireless/Article/39810/1954 Nov 26 18:34:44 so ive got a linear layout containing a few more linear layouts which is basicly a handmade list view for a small static sized specific group of items. i was able to make them clickable, but is there a way to make it so that they are highlightable and can be scrolled through like a regular listview? Nov 26 18:35:32 use a listview? Nov 26 18:35:34 *shrug* Nov 26 18:36:21 Any idea why System.currentTimeMillis() returns 1259157366046 which converts to the year 41871. date on adb shell results in Wed Nov 25 13:57:29 GMT 2009 Nov 26 18:36:34 true but then i gotta write an adapter that specifies every element? Nov 26 18:36:49 zoniq_: you convert it assuming its seconds, but its milli-seconds? Nov 26 18:36:57 i figured listviews are for dynamicly sized lists Nov 26 18:37:14 Hello, does anyone know why android sdk r3 for mac lacks fastboot? Nov 26 18:37:39 nevcairiel: that might be the case. Thanks :-) Nov 26 18:39:10 rac2030: same Nov 26 18:39:13 ioexception Nov 26 18:39:49 andern: can you start the browser on the emulator and connect to a website? Nov 26 18:39:57 yes, it works Nov 26 18:41:08 when i open the application in the application manager thingy it doesnt say that it needs access to the internet though Nov 26 18:41:33 ah ok, add internet permissions to the manifest Nov 26 18:42:10 thanks Nov 26 18:42:23 this shit has been bothering me for a while Nov 26 18:44:59 ConnectivityManager.requestRouteToHost(int, int) <- it takes the IP address as an int - anyone knows in what format does it excpect it? (eg 127001 or in some other way?) Nov 26 18:45:34 When does View.setHorizontalFadingEdgeEnabled(true) actually fade the edge? Nov 26 18:46:58 tauno: I would assume long int format of an ip address. an ip address is a base 255 4 digit number afterall :P Nov 26 18:49:00 big or little endian? :) Nov 26 18:49:23 mal|lappy, I've seen all kind of strange ways to store an IP so that's why I'm asking :) Nov 26 18:51:14 andern: made the same mistakes in beginning ;-) Nov 26 18:53:58 :) Nov 26 19:03:12 Hmm... layout_width="fill_parent" doesn't seem to be working on the contents of the FrameLayout that I'm using to contain my tabs' content. Anyone know how to get everything to expand properly? Nov 26 19:06:09 fill_parent Nov 26 19:18:27 romainguy: 19:03 < Syniq> Hmm... layout_width="fill_parent" doesn't seem to be working Nov 26 19:21:56 where can i go look for in the source " com.android.internal.R.drawable. ..." I want to use/browse icons from there Nov 26 19:22:17 has anyone expierience in add admob to an application? Nov 26 19:24:50 rac2030 just ask Nov 26 19:26:48 I just did like the javadoc help said and in the layout xml it says me Error parsing xml : unbound prefix and google guided me to use xmlns:app but this throws error on the custom attributes Nov 26 19:33:12 have you defined attrs.xml ? Nov 26 19:34:31 Syniq: you're using it wrong then, because if that wasn't working, every app would break Nov 26 19:34:42 (activities are always embedded in a FrameLayout) Nov 26 19:36:09 aunn: yes Nov 26 19:36:39 rac2030: can you pastebin the complete error ? Nov 26 19:37:30 romainguy: where can i go look for icons used in com.android.internal ? Nov 26 19:37:38 source.android.com Nov 26 19:38:30 that's a bit to general tho, it's like looking for a needle in a stack of hay :) Nov 26 19:39:11 i am looking for ic_menu_allfriends and it is not in apk 5 Nov 26 19:39:12 Error in an XML file: aborting build. says eclipse console and the line with com.admob... says Error parsing xml : unbound prefix Nov 26 19:40:06 has anyone connected to a jsp? Nov 26 19:40:45 i call it using "@*android:/drawable/ic_menu_allfriends" it displays fine in apk 4 but not 5 Nov 26 19:41:11 argh Nov 26 19:41:12 don't do that Nov 26 19:41:40 don't do "@*android:/drawable/ic_menu_allfriends" ? Nov 26 19:41:41 and wtf is apk 5? Nov 26 19:41:44 yes Nov 26 19:41:48 you are using a private resource Nov 26 19:41:56 which may be removed/modified Nov 26 19:41:59 which will break your app Nov 26 19:42:06 API I mean :D Nov 26 19:42:11 which seems to be what you are experiencing Nov 26 19:42:16 so don't do that Nov 26 19:42:24 i see. Nov 26 19:44:52 romainguy: I've set it on everything, and it's not filling parent. :p Nov 26 19:45:00 then i just have to go hunt that icon in the hay Nov 26 19:45:01 you're still doing something wrong Nov 26 19:45:04 use HierarchyViewer Nov 26 19:45:07 which xml attribute can make a linearlayout scroll if its too long for the screen? Nov 26 19:45:16 scrollView Nov 26 19:45:18 aunn: surely you're able to search for a file by name in a directory? :)) Nov 26 19:45:55 i tried Nov 26 19:45:59 grep -rnI ic_menu_allfriends.png /home/aunnaunn/Vmware/workspace/mydroid/ Nov 26 19:46:00 scrollview dosent exist? Nov 26 19:46:08 but it is not turning up Nov 26 19:46:16 aunn: you probably grabbed the wrong version of the source code Nov 26 19:46:23 since apparently we removed that image in 2.0 Nov 26 19:46:33 freedomcaller: is not an attribute Nov 26 19:46:36 hmm scrollview is a subclass Nov 26 19:46:49 finally got wave Nov 26 19:47:03 romainguy: i have not updated my source code to 2.0 yet Nov 26 19:47:36 it might still be 1.5, i wonder Nov 26 19:50:29 rac2030 , something is wrong with your xml , i am not very good with the xml, if u don't mind posting your layout.xml, i can take a look and so can other and someone might be able to help you hopefully Nov 26 19:52:32 aunn: here is my layout xml => http://pastebin.org/57541 Nov 26 19:54:23 aunn, I found the error, thx a lot Nov 26 19:54:36 good! Nov 26 19:54:47 it was the xmlns:admobsdk that was wrong Nov 26 19:55:14 admobsdk Nov 26 19:55:28 i am looking at it too Nov 26 19:55:28 Hi Nov 26 19:56:17 does anyone know the best way to display data from an sql server db on an android app Nov 26 19:57:04 i guess, i will set up repo for Donu Nov 26 19:57:04 t Nov 26 19:57:15 is there a global property which defines how fast flinged things slow down? Nov 26 19:57:48 yes Nov 26 19:57:53 look in ViewConfiguration Nov 26 19:58:03 ok thanks. Nov 26 19:58:33 re Nov 26 20:02:37 romainguy: you work directly on the android prject? Nov 26 20:02:42 yes Nov 26 20:03:14 nice, can you tell me if parsing of huge xml documents will be viable in the future? Nov 26 20:03:30 define huge Nov 26 20:03:38 and probably not: it's for phones Nov 26 20:03:45 (battery life, etc. :) Nov 26 20:03:56 i hear the way dalvik handle big chuncks of controll-statements makes it unable to parse Nov 26 20:04:05 im talking 20.000+ lines Nov 26 20:04:06 er... ?? Nov 26 20:04:32 the way dalvik interprets dex bytecode has nothing to do with the size of the XML files you are trying to parse Nov 26 20:04:42 and do you REALLY think it's a good idea to parse 20,000 lines of XML from a phone? Nov 26 20:05:10 if i need it, yes i do Nov 26 20:05:21 ... Nov 26 20:07:50 i wrote a parser, and the code parses 18.000 lines of xml in 1 sec on my 800mhz laptop, on my phone it uses 3-4 minutes Nov 26 20:08:01 well >1 sec actually Nov 26 20:08:57 and i do belive, if i need to parse 20.000 lines of xml one time while im in the middle of nowhere then that is a viable solution for me, dont you think? Nov 26 20:16:59 hi all, how do I call finish, to finish activity from within a custom dialog Nov 26 20:17:01 ? Nov 26 20:22:20 scav: don't you believe you could pre-process the data to make it easier/more efficient to parse on a phone? Nov 26 20:24:44 This seems to be wrong ? : Activity a = (Activity)getContext(); - trying to finish actiity from within custom dialog ? can anyone help ? Nov 26 20:31:24 hmm, narrowed down what causes my anr, now to solve how to fix it Nov 26 20:31:50 if I do getWindow().setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN) it hangs if I press back Nov 26 20:31:55 until I get the anr dialog and press wait Nov 26 20:32:06 if I press wait, I can press the back button again to make it go back Nov 26 20:32:26 huh Nov 26 20:32:28 that's odd Nov 26 20:32:32 romainguy: yes, i do. i was simply asking if it was true that dalvik limited the ability to parse amounts like that (because that is what i was told) Nov 26 20:33:20 yeah, it's completely odd Nov 26 20:36:12 scav: Dalvik has nothing to do with this Nov 26 20:36:27 the problem is the slow CPU, the slow memory bus, etc. Nov 26 20:36:39 and also probably how the parsing code is written Nov 26 20:36:46 it's very easy to write inefficient strings manipulation in Java Nov 26 20:39:54 i know, i just bought the argument since the same code ran instantly on a 800mhz old computer Nov 26 20:40:06 but, i have my answer - thank you :) Nov 26 20:44:10 can anyone help me to call finish from within a customdialog ? need to ref. the Activity, but unsure on how to do it ? Nov 26 20:44:40 mmm. not exactly exactly Android-related, but almost. anyone ever had experience dealing with app localizer firms? Nov 26 20:51:53 romainguy , found my icon. it's in sdk android-sdk-linux_x86-1.5_r3/platforms/android-2.0/data/res/drawable-hdpi/ic_menu_allfriends.png Nov 26 20:55:33 happy thanksgiving everyone :) Nov 26 20:57:29 Hello Nov 26 21:02:27 * Syniq tries to work out why the third of four tabs with different intent classes which all reference different layout resources is producing the same page as the first. :p Nov 26 21:06:03 does anyone know about jsp? Nov 26 21:25:39 i bet, somebody does Nov 26 21:28:02 Sam_09: Try #java :p Nov 26 21:31:33 yea Nov 26 21:31:57 im retreiving data from an sql server db to a jsp Nov 26 21:32:05 then i want my android app to read the data Nov 26 21:32:09 and display it Nov 26 21:32:35 can i run eclipse on maemo to dev for android Nov 26 21:33:10 sam, ok so whats the problem? a urlconnection and some parsing wil read it on the droid side Nov 26 21:33:43 there is no problem Nov 26 21:33:46 im new to this Nov 26 21:33:58 o Nov 26 21:33:59 do i go about this with http get and post type requests? Nov 26 21:34:07 just wanted some guidance Nov 26 21:34:11 pretty much Nov 26 21:34:15 ah ok Nov 26 21:34:16 thats how i handle Nov 26 21:34:24 i tried searching on google Nov 26 21:34:30 but nothing about jsp Nov 26 21:34:36 for android anyway Nov 26 21:35:04 i should be ok Nov 26 21:36:00 any good info that you find, you should porbably write in a notepad app such as Melon for android Nov 26 21:37:51 yea Nov 26 21:39:45 why dosnt ListView.addView work? Nov 26 21:41:27 what are you trying to do Nov 26 21:50:41 Anyone got any idea why a ViewFlipper might not be filling its parent container? Nov 26 21:51:06 use HierarchyViewer Nov 26 21:53:40 romainguy: Everything has layout_width == FILL_PARENT. Any ideas what I should be looking for? Nov 26 21:54:35 romainguy: The table row width is 320, but the button in it is 146. :( Nov 26 22:00:08 im trying to create a listview without using an adapter Nov 26 22:00:16 you can't Nov 26 22:00:47 is there an alterate type of listview i can? Nov 26 22:00:54 no Nov 26 22:01:03 just create an adapter Nov 26 22:01:04 or use a scrollview Nov 26 22:01:27 well i did a scrollview Nov 26 22:01:36 which containd a linerarlayout Nov 26 22:01:46 which contained a bunch of linear layouts Nov 26 22:01:59 i was able to make them clickable Nov 26 22:02:07 but i couldnt get them highlightable via the trackball Nov 26 22:02:20 so it only worked with touch O-o Nov 26 22:02:22 if that's what you want use a listview+adapter Nov 26 22:02:34 (and the trackball will work with anything focusable) Nov 26 22:02:52 hmm maybe i need to make all the linear layouts focusable? Nov 26 22:03:06 or use a listview + adapter Nov 26 22:03:11 what's so hard about it? Nov 26 22:03:50 its a static list of very different objects Nov 26 22:04:10 with different things happening depending on the thing clicked Nov 26 22:04:20 an adapter can be sued but it just dosnt seem right Nov 26 22:06:26 also if i use an adapter it cant be defined in xml? Nov 26 22:06:58 no Nov 26 22:07:25 ooh cool making them focusable worked, now i just need to change the background color if its focused? Nov 26 22:29:58 anyone know any good development sites where i can asked a more in-depth question Nov 26 22:30:24 i just have a question about calling the SmsManager.sendTextMessage method Nov 26 22:31:12 hwrd, ask in the android-developers group in google groups Nov 26 22:31:21 ...or here lol Nov 26 22:31:33 well ok i'll just ask here Nov 26 22:31:39 so i have a TextView object right Nov 26 22:31:49 phone_number = (TextView)this.findViewById(R.id.phone_number); Nov 26 22:32:01 and i'm trying to send a text message based on that text view Nov 26 22:32:18 SmsManager sm = SmsManager.getDefault(); Nov 26 22:32:23 sm.sendTextMessage(phone_number,null,message.toString(),null,null); Nov 26 22:32:38 and every time i cast phone_number to a toString(), it gives me an error Nov 26 22:32:41 and idk why Nov 26 22:33:05 even though the first three are supposed to be strings and the last two are pending intents which are null for my case Nov 26 22:34:09 well Nov 26 22:34:16 you are doing a toString() on the TextView itself Nov 26 22:34:19 not the content of the TextView Nov 26 22:34:25 phone_number.getText().toString() Nov 26 22:34:56 so i need the getText()? Nov 26 22:35:02 yes Nov 26 22:37:38 oh ok i see Nov 26 22:39:53 <\monster\> android:layout_height doesn't support ps ? Nov 26 22:39:59 <\monster\> err Nov 26 22:40:02 <\monster\> im an idiot ignore Nov 26 22:40:04 * \monster\ hides Nov 26 22:40:04 ps? Nov 26 22:40:09 *lol Nov 26 22:40:14 */lol Nov 26 22:46:39 ok i made a fake listview, and i have learnt my lesson thatadapters are easyer. but there shud be a dumb version of listview theat lets you use the viewgroup.addView function Nov 26 22:49:04 *laughs* Nov 26 22:49:08 mt Nov 26 22:53:47 is it possible to add overlays made in photoshop to android maps? Nov 26 22:57:17 dang, i'm having trouble in stalling my app on my AVD Nov 26 22:58:09 i started the AVD, then ran my program, but when i try to run it on the device it says this application is not installed on this phone? Nov 26 22:58:15 any suggestions? Nov 26 23:03:24 is it signed? Nov 26 23:05:04 i think applications need to be signed if there to be used on a device Nov 26 23:11:24 signed? Nov 26 23:11:26 oh ok i see what you mean Nov 26 23:19:06 is there a simple version of text.setTypeface(Typeface.create(Typeface.DEFAULT,Typeface.BOLD)); Nov 26 23:26:02 Question: How can I activate speaker phone during a call from a program? AudioManager.setSpeakerphoneOn(true); doesnt seem to do anything Nov 26 23:28:03 I don't know about the speaker. Nov 26 23:28:22 I think you have to actively change the speaker to true during the call, rather than just before Nov 26 23:28:55 I'm changing it once phone state is off_hook Nov 26 23:28:58 could be that's still too early Nov 26 23:29:24 ya Nov 26 23:30:05 doh Nov 26 23:31:14 <\monster\> hmm if I have a horizontal LinearLayout with 300sp with ..than child elements whos widths add up to 300sp ..why is the far right child getting pushed off the screen ..thers no padding or margins Nov 26 23:32:00 android:name = "android.permission.WRITE_SMS" /> Nov 26 23:32:10 apparently something is wrong with that Nov 26 23:41:11 can anyone help me to call finish from within a customdialog ? need to ref. the Activity, but unsure on how to do it ? Nov 26 23:49:36 java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.hwrdprkns/.SmsFlood } from null (pid=-1, uid=-1) requires android.permission.ACCESS_CHECKIN_PROPERTIES Nov 26 23:49:40 anyone know anything about this? Nov 26 23:49:53 yes, you need to add android.permission.ACCESS_CHECKIN_PROPERTIES to your manifest. Nov 26 23:56:28 <\monster\> arr this layout is getting upsetting, I have 3 children inside LinearLayout which cuts off the far right child if I set gravity to right Nov 26 23:56:58 <\monster\> 1/3 seems to be pushed off screen Nov 26 23:57:19 hi Nov 27 00:05:50 is this a good why to do a layout? http://pasticals.com/4 Nov 27 00:06:26 <\monster\> im about to hit my screen Nov 27 00:08:50 dazoe: What do you need the RelativeLayout for? Nov 27 00:12:04 to make the list above the button Nov 27 00:13:14 heh. that was a pretty cheap & hackish way to find out how many imageviews were in my widget (different number for different orientation). set them all to touchable, called the layout inflater and did getTouchables() on the root view. Nov 27 00:22:25 mal| i see what you mean by the add android.permission.ACCESS_CHECKIN_PROPERTIES Nov 27 00:22:36 but do i have to add it as a permission? Nov 27 00:22:56 like ? Nov 27 00:24:14 because i did that and its still giving me the error Nov 27 00:24:24 java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.hwrdprkns/.SmsFlood } from null (pid=-1, uid=-1) requires android.permission.ACCESS_CHECKIN_PROPERTIES Nov 27 00:30:23 anyone know how i can add that permission Nov 27 00:30:25 ? Nov 27 00:34:11 ViewFlipper is stumping me. How do you jump to a specific child? setDisplayedChild seems to just re-show the current view. :( Nov 27 00:40:32 hwrd: just add it to your manifest xml Nov 27 00:47:11 * Syniq prods jasta and romainguy at the risk of annoying them. :p Nov 27 01:00:29 hi somehow my android eclipse plugin is fucked up - its even with new projects the root of the evil seems to be: Java Model Exception: Java Model Status [gen Nov 27 01:00:44 if anyone has an idea that would be great Nov 27 01:03:06 question: I want to set up a service to listen for changes to a ContentProvider. It looks like I should use Context.getContentResolver().registerContentObserver(...) .. the ContentObserver constructor needs a Handler.. what Handler should I use? (or do I need to instantiate my own?) Nov 27 01:14:30 anyone know how to add android.permission.ACCESS_CHECKIN_PROPERTIES to the manifest.xml? Nov 27 01:16:51 1 google wave invite to the first person that answers :) Nov 27 01:17:55 Erk! I just got sat on by my cat! :d Nov 27 01:18:26 ouch! Nov 27 01:18:28 lol Nov 27 01:19:16 hwrd: You changed nick. :p I thought you'd gone. Nov 27 01:19:24 Nov 27 01:19:32 Except with ACCESS_CHECKIN_PROPERTIES. Nov 27 01:19:48 You also need to add android:permission="com.example.project.DEBIT_ACCT" to the activities which use it. Nov 27 01:19:55 http://developer.android.com/guide/topics/manifest/manifest-intro.html Nov 27 01:20:14 hwrd: can't give them away now... Nov 27 01:20:53 actually... can give them away on facebook, but not IRC Nov 27 01:21:50 * Syniq hasn't got one yet. :p Nov 27 01:22:45 do you want one? Nov 27 01:26:03 does anyone know anything about writing home screen replacement? Nov 27 01:26:28 I still added it to my mainfest file, but it still doesn't work when i try to run it Nov 27 01:26:44 android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" /> Nov 27 01:26:58 Dear me, this cat weighs a ton. Nov 27 01:27:11 oh noes! Its a fat cat? Nov 27 01:27:22 Oooh, crumbs, my knees. Nov 27 01:27:33 I moved and there was a clonk. >.< Nov 27 01:27:49 hwrd: Did you add it to the activities as well? Nov 27 01:28:12 the same line of code? Nov 27 01:29:13 android:permission="blah" Nov 27 01:29:25 pigeon: very vague question, don't you think? Nov 27 01:29:52 it doesn't like the colon Nov 27 01:30:02 i'm adding android:permission"access.blahblah" Nov 27 01:30:43 and by that i mean android:permission="access.blahblah" Nov 27 01:31:48 Oh, you need this as well: Nov 27 01:32:24 i have that already XD Nov 27 01:32:54 maybe android just doesn't like the fact that im writing a program to send the same text message multiple times Nov 27 01:33:03 Inside manifest, so you'd get this: http://www.pastie.org/716703 Nov 27 01:33:08 Leeds: it is Nov 27 01:33:21 one thing i'm not sure is, when you write a home replacement app, what it can and can't replace. Nov 27 01:34:40 well... it can replace the home app :) Nov 27 01:35:47 y'know, the app which runs when you press the home button? Nov 27 01:38:21 pigeon: what are you talking about? Nov 27 01:43:34 Leeds: for example, on the default android home screen, you have the grid like interface to put shortcuts, and a few virtual desktop, and the launcher tab from the bottom, so are all of these replacable? Nov 27 01:43:43 of course Nov 27 01:44:03 they are all part of the same app - which the source is available for in Android git Nov 27 01:44:37 ok, i wasn't sure, cos most of the "home screen replacement" app i found on the net, they all look the same, as if it's just the same app with different theme/images. Nov 27 01:44:55 and i haven't started digging into the code yet, yeah. Nov 27 01:46:49 they tend to be more like tweaks - would surprise me if most of them hadn't started by modifying the built-in Home source Nov 27 01:47:51 ok Nov 27 01:48:08 what about the notification bar on the top? is that also part of the home app? Nov 27 01:50:08 lol Nov 27 01:51:14 lol dc Nov 27 01:51:20 Ok, question: I have an org.w3c.dom.Document defining an XML document. I want to wrap it up inside an org.apache.http.HttpEntity so I can send it as part of an HttpPut request. I can't find any example code demonstrating how to get from Point A to Point B, though. Nov 27 01:51:55 (eg, DocumentBuilder goes from HttpEntity.getContent() to a Document.. but I can't find any inverse flow Nov 27 01:52:17 no, the notification bar is part of the base system Nov 27 01:52:47 alterscapes: I suspect you'll have to render the document to a string (or string-like object0 Nov 27 01:53:30 Leeds: Yah, I suspect you're right. I still can't figure out how to do it -- all the examples online use an XmlTransformer, which isn't part of the Android API Nov 27 01:53:36 so apparently someone took my hwrd nick Nov 27 01:56:55 Leeds: thanks. Nov 27 01:58:01 alterscapes: you could be right - I dunno how to do it :) Nov 27 01:59:04 so is it ok that i created my own package like com.hwrdprkns? Nov 27 01:59:06 Leeds: Fair enough -- thanks for your feedback! It looks like the SAX stuff is more thoroughly implemented than the DOM, so I may just refactor to use that (thankfully I didn't write much code to generate the document I'm testing with.. :P ) Nov 27 01:59:26 hwrdprkns: that's what you're meant to do - one package per app Nov 27 01:59:59 its still requiring com.example.project.ACCESS_CHECKIN_PROPERTIES Nov 27 02:00:15 and i don't know why even though i put it in the permission, the acitivity, and the uses-permission in my manifest Nov 27 02:01:02 its having a permission denial in starting intent Nov 27 02:01:04 idk why Nov 27 02:02:03 http://www.pastie.org/716722 Nov 27 02:02:52 Why does com.android.phone (pid 1074) keep spitting out: "W/AudioTrack( 1074): obtainBuffer timed out (is the CPU pegged?) " this is on a brand new droid 2.0. Nov 27 02:03:20 i have a list view, and a really simple if function that sets a textview visible if its true, when the items are first listed, the textview is visible only on the correct items, but if i scroll up and down really fast suddenly the textview is visible on some random items where it shouldnt be visible, and if i scroll up and down really fast its set visible on most of the items, is this some sort of emulator bug? Nov 27 02:03:26 unfortunately i can't check on an actual device as i don't have one Nov 27 02:04:48 W/WindowManager( 1015): No focus window, dropping: KeyEvent{action=0 code=4 repe Nov 27 02:04:51 at=0 meta=0 scancode=158 mFlags=72} Nov 27 02:05:00 damnit, why do I keep getting that if I set my window flag_fullscreen Nov 27 02:11:26 hello Nov 27 02:11:43 anyone know how to get the first x and y coordinate of a MotionEvent? Nov 27 02:13:20 i'm trying to simulate a 'long press': when e.getAction() == e.ACTION_UP && |lastX-firstX| < 5 && |lastY-firstY| < 5: ... long press... Nov 27 02:15:49 i tried using the getPointerCount and getPointerId methods but i don think they are available in < 2.0 Nov 27 02:15:58 any suggestions? Nov 27 02:22:33 I think the Paint class should support a blinking paint for text. Nov 27 02:22:55 agreed Nov 27 02:23:04 Maybe Typeface.BLINKING Nov 27 02:23:54 hmm, setFlags is no good, but addFlags is Nov 27 02:29:20 ok thanks. Nov 27 02:36:14 Question: Does android on the Droid have any BT control built into it? I'm writing an app to give it control, because I can't find any information on if any control is built in... but I'd hate to be reproducing work. Nov 27 02:44:58 BT control as in AVRCP type of thing? Nov 27 02:47:34 More like HFP Nov 27 02:47:40 And I just found my answer, so nevermind heh Nov 27 02:51:48 And then hit a brick wall to find out there are really no linux HFP solutions. Doh! **** ENDING LOGGING AT Fri Nov 27 02:59:58 2009