**** BEGIN LOGGING AT Thu Jan 29 02:59:57 2009 Jan 29 09:38:05 how do i get the URL of my app in the marketplace? Jan 29 10:42:53 hi all, I solved my scrollng issues using scrollBY Jan 29 10:50:02 now I'm coding zooming but I have a question. is there a way to scale a bitmap directly reading from file without leaving the orig bitmap allocated (to avoid out of memory issue)? Jan 29 10:51:14 I know how to do with he orig bitmap allocated. But I doesn't try it I already know heap can't accept it Jan 29 10:51:48 some transformation tips inside bitmapfactory Jan 29 12:50:29 hi Jan 29 12:51:05 need some help with Android source download and compile Jan 29 12:51:59 @join #android Jan 29 13:29:38 this book (The Busy Coder's Guide to Android Development) is very good Jan 29 14:25:10 Hi All! question for the experts: Anybody knows ho to work with the camera on dream in a native application? Jan 29 14:25:21 *how Jan 29 14:33:30 Any live humans around? especialy the kind that tried some native development on dream...? Jan 29 15:59:14 romainguy: I have solved the problem now. Well or let me call it worked around it. When set the flag to recreate the activity when the tab is called everything is working fine. Jan 29 16:31:29 hi all Jan 29 16:32:25 I'm trying to compute the click coords on a bitmap displayed into an imageview. I'm thinking Jan 29 16:32:27 that Jan 29 16:33:20 if I set imageview.setscale(CENTER). the center of image into textview is the center of the full bitmap Jan 29 16:33:30 right? Jan 29 16:33:35 if yes Jan 29 16:35:19 when I scroll I've to add or subtract the scroll X,Y Jan 29 16:35:27 to my Center Jan 29 16:36:38 ... Jan 29 16:36:38 sounds reasonable. does it work? Jan 29 16:36:55 it's not the end, I'm thinking... Jan 29 16:37:08 lol Jan 29 16:37:14 :-) Jan 29 16:40:00 then if i want to zoom (for example a rect of 320*480 uhm...) I do: the new center X-160, the new center y-240 Jan 29 16:40:52 starting from the point I clicked Jan 29 16:41:18 uhmmm ... Jan 29 16:42:35 noooo one helper less Jan 29 16:42:47 don't quit please .-) Jan 29 16:43:39 good now 1out 1in Jan 29 16:51:57 so so... restart: 1st scaleType.Center = center of view = center of bitmap (width/2,height/2), each scrolling center of bitmap width/2+scrollx,height/2+scrolly, then I click and clickX into bitmap is width/2+scrollX+(clickXofView-centerXofView) Jan 29 16:52:16 now morgan I need the help of some of you Jan 29 16:52:30 if what i said is correct Jan 29 16:54:41 I need to display into the imageview only a rect that surrounds the point clicked scaling it too Jan 29 16:55:40 bitmap.createBitmap(myorigBitmap,myRect) Jan 29 16:55:48 create a amtrix Jan 29 16:56:03 set the imageview matrix Jan 29 16:56:40 and set imageviewto the new bitmap Jan 29 16:56:46 I try it thanks Jan 29 16:58:35 your silence helps me to think...Wow! Jan 29 17:32:35 is there a global way to set the user agent for http requests? Jan 29 17:32:44 including whatever the mediaplayer object uses Jan 29 17:40:46 mxcl: pretty sure there is no way to set user agent for MediaPlayer Jan 29 17:41:35 zhobbs: thanks Jan 29 17:43:07 quick sqlite question Jan 29 17:45:09 so, if I have the following tables t1(_id integer primary key autoincrement) t2(_id integer primary key autoincrement, t1_id integer references t1(_id)) t3(_id integer primary key autoincrement, t1_id integer) Jan 29 17:45:33 if I allow t3.t1_id to be negative, if I join it with t2, will they still be negative? Jan 29 17:50:19 nevermind Jan 29 17:50:30 I'm doing something wrong Jan 29 17:50:33 of course :) Jan 29 18:45:59 hmm...no Typeface.UNDERLINE Jan 29 18:46:43 hmm, but you can use text in a resource Jan 29 18:47:41 That's set on the Paint object Jan 29 18:48:28 any idea how to get it into a Spannable? Jan 29 18:49:35 maybe UnderlineSpan() Jan 29 18:49:47 There's an UnderlineSpan.. lose Jan 29 18:57:09 how do you programatically add icons to the home screen? Jan 29 18:59:31 andrewoid: not sure if it's possible to register an activity's intentfilter outside the manifest Jan 29 19:14:56 ok, i;ve had a weird issue for a while now, my app works fine, but when it's plugged up to the eclipse debugger I get a NullPointerException in ResourceBundle Jan 29 19:15:14 i can step through it and my app continues, but it doesn't output anything to catlog Jan 29 19:15:21 *logcat Jan 29 19:15:41 any idea what this could be? Jan 29 19:20:50 Any chance you have a trap on "caught" NullPointerExceptions configured? Jan 29 19:23:25 do'h :) Jan 29 19:46:17 i want to ask firstly if i can let the emulator starting time be less than it's currently as it takes a long time maybe more than 3 minutes Jan 29 19:47:35 is there a way to disable some features, i'm running it on a winxp PIV box with 1G of ram Jan 29 19:49:54 anybody there ? Jan 29 19:52:16 the emulator runs at full speed. Jan 29 19:52:21 it's booting a Linux distro. Jan 29 19:52:28 You need a faster machine. Jan 29 19:53:58 wasabi, faster ??? what more than 1G of Ram and PIV Jan 29 19:57:12 also i want to ask i tried to run this GUI code http://pastebin.com/d276fc908 with the following layout main.xml http://pastebin.com/d29a1e38 but on the emulator i never got the UI elements to display, i got a black screen with a the activity's title , any comment ???? Jan 29 19:58:52 I've just installed Eclipse 3.4 Ganymede on Linux and tried to add the android SDK update site at https://dl-ssl.google.com/android/eclipse/ but it tells me there isn't a repository at that location. Jan 29 19:58:56 something wrong in my code ...? Jan 29 19:59:17 and when I try to browse to it, I get a 404. Did something recently move? Jan 29 20:00:22 donspaulding, i tried and got the same , i think sometimes it's down Jan 29 20:01:09 f00, um. I have a core 2 quad with 8 gb of ram. Jan 29 20:01:09 f00bar80: Google is avoiding us ;-) Jan 29 20:01:11 so that answers that. Jan 29 20:01:55 wasabi, what about the GUI activity why it's not showing ? did you check the code and xml , something's wrong ? Jan 29 20:02:10 got me. Jan 29 20:03:50 wasabi, the reason for the GUI elements to not being displayed is the low in my machine performance , how at the time another machine with 512m of Ram displayed the gui correctly ? Jan 29 20:04:00 what? Jan 29 20:04:07 You asked why it took forever to boot. Jan 29 20:04:11 I'm not talking about your second question. Jan 29 20:04:20 donspaulding: try changing to http:// instead of https:// Jan 29 20:04:48 wasabi, what about my second question ? Jan 29 20:04:57 What about it? Jan 29 20:05:11 wasabi, do you have any comment on it Jan 29 20:06:19 f00bar80: Did you look at logcat when it dodn't load? Jan 29 20:06:34 kRutOn: doesn't make any difference, why would it? Jan 29 20:07:04 kRutOn, yes Jan 29 20:07:07 donspaulding: There's a huge discussion on this somewhere Jan 29 20:07:23 kRutOn: ok, I'll look for it. thanks Jan 29 20:08:11 f00bar80: No errors? Jan 29 20:08:40 kRutOn, one sec. i'll tell you.. Jan 29 20:09:55 donspaulding: If you're on Linux, removing gcj helps as well Jan 29 20:10:25 kRutOn: ok. Jan 29 20:19:18 kRutOn, btw all this time it's starting up the emulator, don't you have any comment on that ? Jan 29 20:21:16 if I download the SDK, am I getting Eclipse as well? Jan 29 20:21:50 donspaulding, no you have to download eclipse Jan 29 20:22:27 f00bar80: cool, I've already got eclipse, it just looked eerily similar to the SDK download size. Jan 29 20:22:46 you have to install the eclipse plugin Jan 29 20:23:09 f00bar80: no, a Pentium 4 is fairly slow and 1GB isn't that much :-) Jan 29 20:23:20 Even though nobody should need more than 640k of RAM Jan 29 20:23:29 donspaulding, http://code.google.com/android/intro/installing.html Jan 29 20:23:46 f00bar80: yup, got the plugin installed too. Jan 29 20:23:48 donspaulding: I'd download the J2EE version of Eclipse which is a couple times bigger than the SDK... Jan 29 20:24:26 kRutOn: any particular reason? The less J2EE I come across, the happier I am. Jan 29 20:24:56 donspaulding: There are some things missing from the other packages. It gets to be a headache tracking them down. Jan 29 20:25:37 kRutOn: ok Jan 29 20:26:00 kRutOn, min hardware required ? Jan 29 20:26:36 f00bar80: It will still probably work, but it will be slow Jan 29 20:27:01 kRutOn, i wonder why it's running even a little bit better on another box with 512M , and the Gui shows correctly Jan 29 20:28:32 f00bar80: Yes, sounds like you need to take a hard look at your machine. Jan 29 20:31:08 kRutOn, with respect to ..? Jan 29 20:36:55 kRutOn, 01-29 22:35:34.116: ERROR/mountd(19): could not read initial mass storage state Jan 29 20:36:55 01-29 22:35:34.577: ERROR/flash_image(27): can't find recovery partition Jan 29 20:36:55 01-29 22:35:37.908: DEBUG/RILD(21): overriding with -s /dev/socket/qemud_gsm Jan 29 20:42:04 those are okay Jan 29 20:42:12 there's no recovery partition because it isn't a real device Jan 29 20:43:50 (on a real device it would be a significant error, and since the code emitting that message doesn't know it's the emulator...) Jan 29 20:44:12 ctate, cool is there a guide that describes these things .. ? Jan 29 20:44:29 err, probably not at this point. Jan 29 20:44:48 at least, not for fiddly little corner cases like this one Jan 29 20:44:50 ctate, why ? Jan 29 20:44:58 time, or the lack thereof. Jan 29 20:45:28 ctate, sorry what do you mean Jan 29 20:45:49 the google folks can spend time writing code and making Android better, or writing documentation. mostly they write code. Jan 29 20:46:05 documentation takes a surprisingly long time to write, especially if you want it to be any good. Jan 29 20:46:34 ain't that the truth Jan 29 20:47:09 ctate, so from where did you such info Jan 29 20:47:48 well, *I* spend my time mostly writing code rather than documentation, so i figure it scales. Jan 29 20:50:18 so far today I've found that if documentation *is* on the site, it is of very high quality. Jan 29 20:50:23 ctate, do you think coding a client/server chat app. could this much different than coding it as a native Java ? Jan 29 20:51:26 i am not sure what you mean. do you mean client/server vs peer-to-peer, or...? Jan 29 20:51:32 i mean, Android apps are Java, so.... Jan 29 20:55:37 ctate, yes android apps are java , but i'm talking from the point of view regarding activity, intents and services..., i'm talking about the application structure/logic Jan 29 20:55:55 ah, i think i see Jan 29 20:56:36 i don't see any obvious benefit to using a service or other backend on the phone Jan 29 20:57:35 ctate, why not Jan 29 20:57:49 what would it do for you? Jan 29 20:58:13 ctate, then why it's there then ? Jan 29 20:58:27 err, for apps other than chat apps? ;) Jan 29 20:59:16 actually hm, maybe i'm being silly and you're thinking of getting notifications while chats come in to the background while you're running other activities. yeah, a service is the way to go if that's what you want. Jan 29 21:00:18 ctate, any comment on that => [2009-01-29 22:59:16 - ClientServer] ActivityManager: Error: Unable to connect to activity manager; is the system running? Jan 29 21:01:21 that's a bad sign. what were you trying to do? Jan 29 21:01:37 (that's a message from the 'am' command on the phone) Jan 29 21:02:00 ctate, i tried to run this GUI code http://pastebin.com/d276fc908 with the following layout main.xml http://pastebin.com/d29a1e38 but on the emulator i never got the UI elements to display, i got a black screen with a the activity's title , any comment ???? Jan 29 21:02:54 that ... huh. that doesn't obviously have anything to do with the error message you pasted. Jan 29 21:03:14 ctate, and this was after a long time trying to start up the emulator and application , when the system was light enough Jan 29 21:03:38 had the emulator gotten as far as showing the Home screen? Jan 29 21:04:06 ctate, not yet till now Jan 29 21:04:26 it hasn't finished booting yet, then Jan 29 21:04:33 you have a very slow machine by current standards? Jan 29 21:06:30 ctate, as i mentioned previously , it's a PIV with 1G Ram Jan 29 21:06:38 owwwww Jan 29 21:06:41 yeah, that's bad Jan 29 21:06:59 it's probably spending all of its time thrashing, and combined with the slow cpu the emulation is just going to be painful Jan 29 21:07:14 i would not recommend that as a dev machine for Android, i'm afraid. Jan 29 21:08:27 ctate, then what do you recommend and why Jan 29 21:09:18 the build system is extremely memory-hungry, as is Eclipse; and the emulator is very cpu-intensive Jan 29 21:09:45 my dev machine for working on Android is a Mac Pro with two Core2Duos and 4 gigs of ram Jan 29 21:10:28 sometimes i use my Macbook Pro -- core2duo and 2 gigs of ram -- and it's pretty painful Jan 29 21:10:49 a full cupcake build on that takes an hour or so Jan 29 21:11:11 ctate, is there a guide or an analysis for this build process ??? Jan 29 21:11:27 for developing apps, there's all the SDK documentation Jan 29 21:11:39 there's much less if you're trying to build the Android system itself Jan 29 21:14:15 ctate, i think you meant the android system build which's extremely memory-hungry and that's what i'm asking about, and also that's what makes the emulator starting up very slow on my system with its low memory, correct me if i'm wrong Jan 29 21:14:40 the emulator uses a TON of cpu as well Jan 29 21:14:47 it is running ARM machine code, emulated Jan 29 21:15:11 i have not looked specifically at the emulator's memory usage; i suppose i could do that. Jan 29 21:15:18 the kvm version will be a -lot- faster according to ibm Jan 29 21:17:44 okay, yeah, looks like the emulator is not a huge mem hog; 150 megs or so resident when it hits the Home activity Jan 29 21:17:52 that's reassuring Jan 29 21:18:45 ctate, do you mind to share a source for these info with me Jan 29 21:19:04 top? Jan 29 21:19:41 morgan, in case of not being on linux ? Jan 29 21:19:45 ==morgan Jan 29 21:19:52 i'm on OSX, but yeah Jan 29 21:20:19 if you're runnign Windows, fire up the task manager with Ctrl-Shift-ESC and look at how much memory the emulator process is taking Jan 29 21:22:06 ctate, let me ask you again, do you have any guide on why android system build is this much memory consumer ? and if any some more information ? Jan 29 21:22:22 i don't have any real information, just my own observations Jan 29 21:22:34 javac is very, very memory hungry; that a general thing Jan 29 21:22:44 similarly, gcc is a huge memory user Jan 29 21:22:46 etc. Jan 29 21:22:47 dx is also very heavy. Jan 29 21:22:59 oh yeah, i forgot -- dx uses a ton of memory Jan 29 21:23:02 (especially as it works on very large sets of generated data) Jan 29 21:23:03 (it's also a compiler) Jan 29 21:23:48 ctate, and on a windows box the gcc is always used ? Jan 29 21:24:07 not for SDK stuff, i don't think Jan 29 21:24:19 ==ctate Jan 29 21:24:37 building applications with the SDK will run a java compiler and dx Jan 29 21:24:44 (and the resource tools etc) Jan 29 21:24:45 for SDK stuff, you're using javac+dx on the back-end, and (if you're using eclipse) the eclipse java compiler. Jan 29 21:25:50 jbq, and by using eclipse the dx is never used ?/ Jan 29 21:27:32 i'm also asking , is there no way to disable some features from the emulator in order to let it be faster ? Jan 29 21:27:43 you cannot create an apk without using dx Jan 29 21:28:14 the eclipse plugin use the Eclipse compiler to create java byte code and then uses dx to convert the java byte code into dalvik byte code Jan 29 21:31:25 xavd, what could be the reason for an error like couldn't find appName.apk when i tried to run , at the time the path is set with both Java and AndroidSDK and the plugin is installed and all thin Jan 29 21:33:06 in eclipse? Jan 29 21:33:26 xavd, eys Jan 29 21:33:28 yes* Jan 29 21:33:56 means the build didn't complete. Check the console view or problem view for details Jan 29 21:34:44 xavd, this is the only error i got in the console "Couldn't find applicationName.apk" Jan 29 21:35:52 go to the preferences and under android/build change the build to verbose and clean/rebuild your project Jan 29 21:36:01 you should get more info Jan 29 21:37:17 xavd, k , something else is there any android low level docs , like dx, apkbuilder..etc Jan 29 21:38:35 nothing on the source.android.com site that I know about. There may be some docs in the source tree Jan 29 21:38:55 for dx look in http://android.git.kernel.org/?p=platform/dalvik.git;a=tree;f=docs;h=381f242d06323fbb4459632349f6b75f7dbf3c27;hb=HEAD Jan 29 21:41:50 xavd, is there no way to disable some features from the emulator in order to let it be faster ? Jan 29 21:41:57 no Jan 29 21:42:12 the main issue is that it emulates a full ARM based device Jan 29 21:42:27 this takes a lot of CPU and without it won't work Jan 29 21:43:28 xavd, android apps are java, but i'm talking from the point of view regarding activity, intents and services..., i'm talking about the application structure/logic is it by any mean different or better than a native java App. Jan 29 21:43:51 didn't you already ask that question? Jan 29 21:44:20 morgan, yes but i didn't get a clear answer Jan 29 21:44:28 it isn't a clear question Jan 29 21:44:38 i'm confused by that question. i mean, android apps are java. what do you mean by "a native java app" that is different from this? Jan 29 21:46:32 f00bar80: as I said the emulator takes a lot of CPU to run ARM instructions, whatever is running on top of that as little impact. Jan 29 21:46:35 I think he means just in the normal java 5 framework Jan 29 21:46:44 instead of using android Jan 29 21:46:58 ctate, i mean how to make a use of the android architecture in such and application Jan 29 21:47:12 well the Android framework has java api but a lot of its implementation is native ARM code. that requires an emulator Jan 29 21:47:42 you cannot use the Android framework to write standalone applications that run in Windows, for example. Jan 29 21:47:52 if that's the sort of thing you're thinking about. Jan 29 21:49:09 ctate, yes i know that :), i mean what's the benefit i'll get to use android over j2me, API wise Jan 29 21:50:12 sweet jesus are you kidding? Jan 29 21:50:16 have you ever USED j2me? Jan 29 21:50:25 android is real, big boy java, with all the apis and trimmings Jan 29 21:50:29 wait is that related to your emulator question? Jan 29 21:50:29 j2me is.... depressing Jan 29 21:50:34 that's like asking "what's the benefit i'll get to use macOS over Visual Basic, API wise" Jan 29 21:50:40 ctate, i'm not making a comparison here, but i'm trying to make something benefit from the application blocks (activity, intent, service, ...etc) available in adnroid in such an applicaiton Jan 29 21:50:43 they're different *kinds* of things. Jan 29 21:50:57 more like "What's the benefit I'll get using C# over qbasic, api wise" Jan 29 21:51:06 you write Android apps if you want to run on Android-based devices. you write apps in J2ME presumably because you want to run on devices that support J2ME apps. Jan 29 21:51:51 * kRutOn . o O ( "How do I become the best programmer in the world?" ) Jan 29 21:52:01 ha Jan 29 21:52:14 don't laugh, I saw that question asked in a blog comment once Jan 29 21:52:19 kRutOn: find all the better programmers and assassinate them one by one? Jan 29 21:52:31 ctate: Now that's thinking outside the box. Jan 29 21:52:44 outside the (pine) box Jan 29 21:52:55 * kRutOn . o O ( Looks like I have a long day ahead of me. *downloads TopCoder leaderboard* ) Jan 29 21:52:59 also known as the Highlander approach Jan 29 21:53:37 does lightning shoot out of the computer? Jan 29 21:53:55 only when you plug two computers together via USB-A to USB-A cable Jan 29 21:54:05 hot Jan 29 21:55:54 ctate, i asked before why activity, intents and services are there you said " for apps other than chat apps? ;)" , is there no way to make use of them in my app. if yes which type of app. that makes use of them Jan 29 21:56:12 i thought you were asking "what kind of Android app would use them" Jan 29 21:56:20 and not all Android apps need to use services Jan 29 21:58:07 ctate, other than services :), how to make use of android or show its benefits and features in a Chat app. :) ... Jan 29 21:58:12 hi Jan 29 21:58:43 f00bar80: at this point, you're asking me "how do I write an Android app?" and honestly my best answer is "read the documentation" Jan 29 21:58:54 there is a lot of sample code there, too Jan 29 21:59:04 ctate, client-server arch is a known arch. how to improve this arch using android :) Jan 29 22:00:05 ctate: when you're done with that, I have a thesis I'd like you to write... Jan 29 22:03:04 i would just like to state for the record that Eclipse's lack of support for split pane windows is Bad and Counterproductive. Jan 29 22:03:23 and yes i realize there's a religious war about it among the Eclipse maintainers but they are Wrong. Jan 29 22:03:42 Is the war about the patent on that? Jan 29 22:04:25 wait, they already have the comparison view which is what the patent I'm thinking of was on Jan 29 22:04:39 i find it very hard to believe that there's a patent on it Jan 29 22:04:45 there's been prior art for more than 17 years Jan 29 22:04:55 this is just split-pane editing Jan 29 22:05:12 can you specify two images for a button? One image non-click and a second image clicked? Jan 29 22:06:56 in the emulator, I added a background image to a button but the button looks static and there is not visible change when clicked/pressed...that sucks. Jan 29 22:07:02 better way to do this? Jan 29 22:07:54 should I be using styles for something like that? Jan 29 22:08:23 or do I have to manually manipulate the button in its onClick event? Jan 29 22:08:44 ctate: My cousin was relating a story about how he didn't believe in software patents until he wrote the feature in Word where you could have two windows of the same document opened and edit both and Microsoft was sued immediately Jan 29 22:08:59 ow Jan 29 22:09:28 you can do that in emacs, though! Jan 29 22:09:42 shhh! Jan 29 22:09:44 most people who have notions about patents are mistaken. Jan 29 22:09:47 and just about every good editor out there Jan 29 22:09:53 f00bar80: I don't know, read the docs! :D Jan 29 22:09:58 I think the only valid case I can think of to steer clear of patents in recent memory was rsa. Jan 29 22:10:01 and that expired. Jan 29 22:10:12 and gif...which is also expired Jan 29 22:10:21 *nod* Jan 29 22:10:22 BlindOracle: this is the default button background: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/drawable/btn_default.xml;h=b8ce2bfe9117f30e8ab6fa4a9c50c7ebd00f1d5d;hb=HEAD Jan 29 22:10:40 ctate: maybe they figured RMS didn't have enough money... Jan 29 22:10:46 notice that it's a selector that changes the actual image based on its state. if you put your own background you override the whole thing Jan 29 22:11:43 doh! Jan 29 22:12:22 BlindOracle: the solution is to create a selector based on this one that redirects to your different images Jan 29 22:12:47 xavd: very informative. Thanks Jan 29 22:12:58 np Jan 29 22:13:01 xavd: does that mean I can use the existing selector XML as template in my own file and it will work? Jan 29 22:13:08 sure Jan 29 22:13:26 and how would I associate that selector with the button via xml? Jan 29 22:13:44 the selector creates a drawable Jan 29 22:13:55 so just put background="@drawable/myselector" Jan 29 22:14:00 oh...and that's my bac...ya ok Jan 29 22:14:22 xavd: thanks mucho Jan 29 22:17:32 Is there a Preference for dealing with floats or are you supposed to use EditTextPreference? Jan 29 22:45:56 kRutOn, hey finally :D this http://pastebin.com/m4db5d517 is the logcat till i reach the gui i want to run , i got a blank black screen with no gui elements Jan 29 22:48:02 awesome, your emu is broken Jan 29 22:48:05 there's a ton of errors in that log Jan 29 22:48:39 are you trying to run a build of cupcake or something? Jan 29 22:48:49 or is this the sdk download emu Jan 29 22:49:13 vol , broken ...? this is the one of sdk running from inside eclipse Jan 29 22:49:30 yeah, it's pretty much dying. Jan 29 22:49:43 look around lines 230 Jan 29 22:49:45 actually Jan 29 22:49:49 pastebin the code you've written Jan 29 22:50:00 sounds like you're managing to destroy the emu Jan 29 22:50:14 vol, this is the code http://pastebin.com/d276fc908 Jan 29 22:50:17 try starting the emulator by itself, make sure it actually starts up fine Jan 29 22:50:36 vol,i tried and yes it does Jan 29 22:50:47 you should finish from onCreate as fast as possible Jan 29 22:50:53 nothing can happen before you return from that Jan 29 22:51:00 so don't start opening sockets or anything Jan 29 22:51:03 create a new thread if you need to do that Jan 29 22:51:51 interestingly, you create osToServer Jan 29 22:51:54 er Jan 29 22:51:57 you don't create osToServer Jan 29 22:52:01 but then you flush it Jan 29 22:52:05 that should do null pointer at best Jan 29 22:53:02 setContentView(tv) probably doesn't help Jan 29 22:53:15 you can invalidate it if you want to refresh it Jan 29 22:53:34 vol, somehow slowly to get you..:) Jan 29 22:53:43 huh? Jan 29 22:54:08 just uploaded the latest version of my app (brightroid) would appreciate any feedback :) Jan 29 22:54:11 also, in your pastebinned log Jan 29 22:54:14 01-29 22:52:16.547: INFO/dalvikvm(171): Wrote stack trace to '/data/anr/traces.txt' Jan 29 22:54:19 you might want to pull that off your emu Jan 29 22:54:22 and see where that's happening Jan 29 22:55:04 ANR shouldn't cause your emu to outright die, though Jan 29 22:55:50 vol, i didn't get what you mean by you "don't create osToServer but then you flush it that should do null pointer at best" and why "setContentView(tv) probably doesn't help" Jan 29 22:57:12 look at the code you pasted me Jan 29 22:57:17 search for "osToServer" Jan 29 22:57:26 you declare it, but never initialize it. You then try to flush it. Jan 29 22:57:51 also, setContentView should only be for what you want the entire content view to be. Setting it on a text view is probably a mistake. Jan 29 22:58:02 what you probably mean to do is invalidate the view Jan 29 22:58:05 vol, k got it just i'm commenting it Jan 29 22:58:13 that will force a redraw Jan 29 22:58:26 http://code.google.com/android/reference/android/view/View.html#invalidate() Jan 29 22:58:34 if you are doing this from a non-ui thread, use postInvalidate Jan 29 22:58:42 otherwise this will cause an exception Jan 29 22:59:49 vol, what else can cause the UI to not being displayed ? Jan 29 23:00:10 the emulator crashing? Jan 29 23:00:12 seriously Jan 29 23:00:22 first off, you're getting Application not Responsive, or ANR Jan 29 23:00:29 generally this is a Bad Thing Jan 29 23:00:39 in most cases, android prompts the user if they want to close the app Jan 29 23:00:44 in your case, the emulator is shutting down Jan 29 23:00:48 look at the log, search for "anr" Jan 29 23:02:18 vol, and this is because of what inside OnCreate ? Jan 29 23:03:07 I'm assuming so. You can (and probably should) step through with a debugger. Jan 29 23:03:36 which means click the little bug button to run your app in eclipse, instead of the start button Jan 29 23:05:24 xavd: the selector XML won't compile for me. I get "unbound prefix". Am I doing something wrong? Jan 29 23:06:06 vol, you said that setContentView(tv) doesn't help, what i'm trying to do is to send entered user/pass to the server instead of the radius in the commented osToServer.writeDouble(radius); that's why i tried to at first print them on the screen, if you can help in both things print and send them to the server Jan 29 23:08:45 your approach in using a listener was correct Jan 29 23:08:45 vol, any comment ??? Jan 29 23:09:23 when you click, get the username and password Jan 29 23:09:30 at that point, you might want to spawn a thread to do server I/O Jan 29 23:09:46 and then when that gets the result from the server, update your textview and post invalidate on it Jan 29 23:10:58 vol, can you modify the code with some hints regarding that ? Jan 29 23:11:49 can anyone do my homework for me? Jan 29 23:13:06 sorry, but f00bar80 i strongly suggest you read over some tutorials and look at some sample code. it is the fastest way to learn. Jan 29 23:13:21 f00bar80: Learn how to create and start a thread, anonymous or not. Jan 29 23:13:32 then, just do your network IO stuff in the thread. Jan 29 23:13:48 do tv.setText( your results ); and then tv.postInvalidate(); at the end of the thread Jan 29 23:14:01 vol, honestly i tried especially regarding threads, but it was very bad :( Jan 29 23:14:15 Is there a way to guarantee a HttpURLConnection is only opened over Wifi (failing if there is connectivity, but it's not Wifi)? Jan 29 23:14:31 new Thread() { public void run() { System.out.println("Hello, I'm a thread!"); } }.start(); Jan 29 23:14:34 bam thread. Jan 29 23:14:54 play around with threads on J5SE before android if you're not sure about how to use them Jan 29 23:15:04 jargonjustin: probably not Jan 29 23:15:36 BlindOracle: can I see it? Jan 29 23:15:40 vol: Yeah, I'm not seeing one. I'll just have to check that it's connected via Wifi before making a request and hope that's good enough. Jan 29 23:16:42 jargonjustin: what are you doing that requires wifi? is 3g not good enough? Jan 29 23:17:10 vol: I'm writing an app to make working with captive portals easier, so if my captive portal checks go over 3G it doesn't do me much good. Jan 29 23:17:30 vol, and thread should be out of the OnCreate() ? Jan 29 23:17:31 xavd: sure...hold on Jan 29 23:18:29 xavd: http://pastebin.com/d5c3f8594 Jan 29 23:18:32 f00bar80: the thread should be started when the button is clicked, so it should be started somewhere in the thread listener. Jan 29 23:18:45 You can create a custom thread class, and then create an instance of it in the listener and start it then Jan 29 23:18:54 you can create an anonymous inner class like I did, and that's just as fine Jan 29 23:18:58 BlindOracle: well you didn't declare the namespace for the android prefix Jan 29 23:19:07 it'll be a little confusing, but that's really up to you to figure out Jan 29 23:19:20 doh....let me fix that Jan 29 23:19:48 just add xmlns:android="http://schemas.android.com/apk/res/android" in the selector node Jan 29 23:20:21 jargonjustin: Oh, ok. So you want to force wifi to check if you're getting a captive portal? Jan 29 23:20:22 xavd: ya, that took care or it. For whatever reason, my eyes masked that part out... Jan 29 23:20:32 So what are you going to do once you determine that there's a captive portal? Jan 29 23:20:43 xavd: now I have more normal XML resource reference issue...thanks Jan 29 23:20:53 np Jan 29 23:21:49 vol: Right, and ensure that subsequent requests go over the Wifi interface (so an automatic login goes through Wifi as well.) Since this all fires with a broadcast receiver being notified of a Wifi connection, I think I can get away with having the service grab a wifi lock and check that it's still connected to the same SSID where it matters. Jan 29 23:23:11 xavd: cool...that's working. :) Jan 29 23:23:14 vol, "anonymous inner class" means ? Jan 29 23:23:15 interesting Jan 29 23:23:36 BlindOracle: excellent Jan 29 23:23:39 f00bar80: http://java.sun.com/docs/books/tutorial/java/javaOO/innerclasses.html Jan 29 23:23:57 you might want to try looking here Jan 29 23:23:58 http://java.sun.com/docs/books/tutorial/ Jan 29 23:24:07 xavd: thanks again! Jan 29 23:24:45 argh, that link doesn't help. Jan 29 23:25:48 basically, what you did with the on click listener Jan 29 23:26:01 you created a new OnClickListener without specifying a name for the new class Jan 29 23:26:08 you just defined the methods Jan 29 23:26:23 going home, bye Jan 29 23:26:36 vol, bye thanks Jan 29 23:26:44 has anyone had their android.R just disappear? Jan 29 23:27:05 I just added arrays.xml and its gone now Jan 29 23:28:22 do you have an error in your arrays.xml? Jan 29 23:28:49 nope Jan 29 23:29:23 It looked like it worked for about 15 seconds, but then when I tried to run it the file disappeared Jan 29 23:31:38 Is there a way to manually regenerate it? **** ENDING LOGGING AT Fri Jan 30 02:59:57 2009