**** BEGIN LOGGING AT Fri Aug 07 02:59:57 2009 Aug 07 03:23:23 how do I switch to landscape on a magic? Aug 07 03:24:36 _Auron_ just installed the demo :P Aug 07 03:45:47 I'm confused on MotionEvent.getDownTime(). It says it returns a long of the time in ms at which the down event occurred, but the value it's returning is only 7 digits --- while System.currentTimeMillis() returns a 13-digit number. I'm really just trying to get the amount of time between ACTION_DOWN and ACTION_UP :-P Aug 07 03:46:48 So when I do System.currentTimeMillis() - event.getDownTime() it's obviously way off Aug 07 03:48:31 oh nm... found that android uses a different clock for time :-P Aug 07 03:51:06 They should probably update the docs for methods that return time based on the android.os.SystemClock.elapsedRealTime() -- that's pretty confusing :-P Aug 07 03:53:15 ug, even that value seems to be off. it's saying my quickest finger taps are lasting 72 seconds :-P Aug 07 03:54:36 oh looks like SystemClock.upTimeMillis() was the key Aug 07 03:54:45 yay for trial and error Aug 07 03:54:48 and talking to myself Aug 07 03:57:04 :) Aug 07 04:24:54 Awwww, damn -- my little usb port cover finally broke off of my G1 -- I was wondering when that was going to happen :-P Aug 07 04:27:06 hehe Aug 07 04:58:34 savid: the sapphire doesnt even have it :) Aug 07 04:58:39 its poitnless Aug 07 04:59:29 sapphire? Aug 07 05:00:03 oh is that the codename for the "t-mobile mytouch"? Aug 07 05:00:06 mytouch Aug 07 05:00:25 its the model name, before it was rbanded by t-mobile Aug 07 05:00:35 yeah, I guess it is pretty pointless... most other phones don't cover up their ports Aug 07 05:00:37 it was known as the magic/sapphire long before it was called the mytouch :) Aug 07 05:00:49 gotcha Aug 07 05:00:50 was known as the opal even before that though :) Aug 07 05:01:08 can't tmo think of any other names.. mytouch sounds weird Aug 07 05:01:22 yo jasta Aug 07 05:01:45 anyone spot any adc2 apps? Aug 07 05:01:59 it sounds even funnier when the CEO is talking about "how much you'll love mytouch" Aug 07 05:02:07 haha Aug 07 05:02:36 (im not joking, he said that in a video circulated to t-mobile employees) Aug 07 05:02:58 the management will have a lot of fun with that name :) Aug 07 05:04:00 jasta: any info on adc2? Aug 07 05:04:58 no, why would i? Aug 07 05:05:11 you are the insider now ;) Aug 07 05:05:18 tmobile doesnt have anything to do with that Aug 07 05:05:22 so are you entering? Aug 07 05:05:27 no, im ineligible Aug 07 05:05:41 hmm... Aug 07 05:06:07 not that much of an excitement for adc2 Aug 07 05:06:16 no one cares anymore Aug 07 05:06:38 I ran out of time to get myself together & enter Aug 07 05:06:44 * cliffstah works for a startup xD Aug 07 05:06:54 cliffstah: there's still time Aug 07 05:07:00 aug 31 is the date Aug 07 05:07:14 yeah, I still won't get any time before then Aug 07 05:07:50 ironically, a lot of that time will be spent developing a mobile app or two, that I can't enter into the competition Aug 07 05:08:00 we just got through to the final rounds of the vodafone clicks competition Aug 07 05:08:16 what app? Aug 07 05:08:20 woobius Aug 07 05:08:35 what it do? Aug 07 05:08:47 building & architecture communication Aug 07 05:08:49 i really wish google would start giving award money out to apps that just f'n work right. i'm so sick of all the apps throwing ANR, running slow as hell, or draining all my battery because theyre too fucking stupid to unregister receiver and shut down services Aug 07 05:09:00 the mobile app is a live on-site communication tool Aug 07 05:09:14 photo markups & live collaboration Aug 07 05:09:37 jasta: become a judge Aug 07 05:09:46 im not even remotely interested in that Aug 07 05:10:01 if its anything like the adc1, judging sounds agonizing Aug 07 05:10:09 hi. hi would I go about creating a new language for predictive text input? for scandinavian keyboard Aug 07 05:10:12 this time its different Aug 07 05:10:15 er how .. Aug 07 05:10:21 well i still dont care Aug 07 05:10:27 isnt adc2 all don through the market? Aug 07 05:10:31 users can d/l and vote Aug 07 05:10:41 deebo: not yet Aug 07 05:10:58 well after the initial phase Aug 07 05:11:14 btw, is there any solution to the "unlocked" phones and market Aug 07 05:11:37 i have a legit non modified htc hero, but since its not sim locked i cant get any non free apps off the market Aug 07 05:12:12 deebo: I just got 2 "unlocked" hero and market shows a lot of apps, infact anything but commercial ones Aug 07 05:12:21 I hear you'd need this "market enabler" or something Aug 07 05:12:40 yeah i see the free ones too Aug 07 05:12:47 but im guessing there might be a few i might actually want to buy Aug 07 05:12:52 ah sorry, I misread.. nonfree you said Aug 07 05:13:08 hmm, my hacked phone sees nonfree apps just fine Aug 07 05:13:19 i looked at the market enabler app and it seems fishy :) Aug 07 05:13:20 well, google for android market enabler Aug 07 05:13:25 I guess it is Aug 07 05:13:43 http://code.google.com/p/market-enabler/ Aug 07 05:13:48 but sint that kosher? Aug 07 05:14:23 anyways, I need to create a new language for the keyboard, any help? Aug 07 05:15:02 Ave: hardware or VK Aug 07 05:15:04 deebo: i think its a different reason that youre not seeing the nonfree apps. because seriously i see them fine and my phone is definitely hacked like crazy :) Aug 07 05:15:39 kroot: virtual Aug 07 05:16:09 this would be a nice starting point http://code.google.com/p/scandinavian-keyboard/downloads/list Aug 07 05:16:25 but I don't know where or how to start, eg do I need to full eclipse + sdk or what Aug 07 05:16:56 Ave: They're pretty simple as long as you know what you want it to look like and how it will function Aug 07 05:17:18 Ave: yeah, you'd develop it like any oyher Android app Aug 07 05:17:25 other Aug 07 05:17:36 yeah well in thise case its quite simple, everything else is like swedish, only the dictionary words would be in finnish Aug 07 05:17:49 layout and whatever rules are the same, only dictionary changes Aug 07 05:18:02 Ave: There is also a SampleKeyboard in the SDK based on the Latin IME Aug 07 05:18:18 hmm ok I'll look into that as well Aug 07 05:18:19 thanks Aug 07 05:18:23 theres more than a sample keyboard -- there is source code to the real keyboard. Aug 07 05:18:25 np Aug 07 05:18:52 jasta: it's latinime minus the dictionary basically Aug 07 05:19:16 hmm, i need a finnish dictionary vk too Aug 07 05:19:36 who doesnt!? Aug 07 05:20:02 but yeah: the Android source has the code for Chinese and Japanese inputs for anyone looking to do a non-western language ime Aug 07 05:20:10 btw, does the VK need to be called from the code? and included in layouts, or is it automatic'ish? Aug 07 05:20:37 I don't even speak Finnish, but I feel the urge to have a VK for it Aug 07 05:20:50 haha Aug 07 05:20:56 deebo: It's separate from the app Aug 07 05:21:15 Ave: was Android just released in Finland? Aug 07 05:21:36 after couple years of waiting we finally got hardware thats actually sold here Aug 07 05:21:39 htc hero Aug 07 05:21:40 kroot: well kinda Aug 07 05:21:44 Ave: Someone started translating ConnectBot to Finnish, but I wasn't sure why Aug 07 05:21:48 but I ordered mine from france Aug 07 05:21:54 deebo: the IME is selected, by user preference Aug 07 05:21:58 from the list of ones installed Aug 07 05:22:07 its available in small quantities from certain operators and independent sellers Aug 07 05:22:10 I'd still rather the G1 than the Hero/Magic xD Aug 07 05:22:22 kroot: htc hero that is Aug 07 05:22:30 and some people have had htc devices before this Aug 07 05:22:40 but its very minor player in the land of crap nokias Aug 07 05:22:42 ugh, the g1 is crap :) Aug 07 05:22:47 i love the stuff htc has made with the hero Aug 07 05:22:51 lots of cool integrations Aug 07 05:22:51 no, the G1 has a physical keyboard :-P Aug 07 05:23:07 yeah, and for that it's bulky, has a low capacity battery, and feels cheap as hell Aug 07 05:23:09 g1 is cool.. except for a few stupid limitations Aug 07 05:23:12 I'd still rather have it Aug 07 05:23:17 and the touch screen is harder to use because of that stupid f'n chin Aug 07 05:23:18 only thing i hope that gets improved is video playback Aug 07 05:23:27 its shitty at best currently, on android in general Aug 07 05:23:34 anyways, I'm using the "scandinavian keyboard" now and I'm hoping to get finnish dict for that somehow Aug 07 05:23:56 Ave: that should be simple Aug 07 05:24:09 maybe its a matter of optimizations but these new gen codecs (like h264) demand quite a lot of cpu for decoding Aug 07 05:24:26 and lets face it, the htc devices arent exactly beefy on that count Aug 07 05:24:35 jasta: I'm just hoping another decent device with a physical keyboard comes out @ T-Mobile UK by the time my contract is up and I'm eligible for an upgrade ;-) Aug 07 05:24:46 On2's codecs don't require as much horsepower.. imagine that Aug 07 05:25:01 they are also crappy by comparison Aug 07 05:25:11 vp-whatnot Aug 07 05:25:25 VP8? nah, not crappy Aug 07 05:25:33 on2's codecs rawk Aug 07 05:25:39 h264 is de facto and state of the art Aug 07 05:25:51 and I dont think the current devices can grok any wavelet stuff Aug 07 05:25:57 just not very popular because of licensing Aug 07 05:30:15 kroot: regarding "that should be simple", got any pointers? adding an extra language to scandinavian vk Aug 07 05:30:28 I'll look what the apk for swedish looks like .. Aug 07 05:32:41 Ave: use the source. the dictionary is probably a flat file Aug 07 05:34:10 it is a flat file of words Aug 07 05:34:20 in xml and plain txt forms Aug 07 05:37:05 I just dont get how the dicts are packaged since the keyboard app itself has no dictionaries Aug 07 05:50:38 banana Aug 07 05:51:18 I want to develop in android but cant get eclipes to work any suggestions? is there another way, or ide Aug 07 05:51:58 just want to make a simple tax calculator to impress my amigos someone help me out Aug 07 05:59:17 whats the problem with eclipse Aug 07 05:59:24 I'm currently installing it myself, what platform? Aug 07 05:59:45 it needs java (jdk) to begin with Aug 07 05:59:54 3.2 Aug 07 06:00:08 java is installed Aug 07 06:00:14 kubuntu 8.10 Aug 07 06:00:18 just go to eclipse.org and get the java bundle (~80MB) of the latest version Aug 07 06:00:22 dont use apt-get Aug 07 06:00:33 k Aug 07 06:00:51 dpkg -P eclipse Aug 07 06:01:03 thanks Aug 07 06:01:13 uninstalling and will reinstall Aug 07 06:01:28 dotn ever use any packaged versions of development tools :P Aug 07 06:01:48 theyre usually outdated and due to distribution rsetrictions packaged weirdly or just plain wrong :) Aug 07 06:02:00 good info Aug 07 06:02:02 like? Aug 07 06:02:12 well like eclipse there Aug 07 06:02:23 v 3.2, latest is 3.5, thats like couple years of development :) Aug 07 06:02:23 yeah, except that one Aug 07 06:02:30 tomcat on debian/ubuntu Aug 07 06:02:41 has horrible configuration for development Aug 07 06:03:54 yeah ubuntu eclipse is way too old Aug 07 06:03:58 are you a developer Aug 07 06:05:00 deebo, what does dpkg -P do? i just download the tar, extract and run it from there Aug 07 06:05:18 uh .. :D Aug 07 06:05:36 dpkg is a debian/ubuntu core package manager Aug 07 06:05:41 don't worry about that .. Aug 07 06:05:59 yeh, i know. i am going through man and can't find -P option Aug 07 06:06:12 it's delete with deletion of config files and stuff Aug 07 06:06:15 aka purge Aug 07 06:06:19 not very well versed with these stuff Aug 07 06:06:20 its an alias for --remove as in, purge Aug 07 06:06:48 ah, ur helping purge the stuff, i thought it's a cool way to install the tar :D Aug 07 06:07:20 i was like 'cool' i might be able to install from tar like standard package :D Aug 07 06:07:31 it's just 'purge' Aug 07 06:08:15 just to remove the old-ass ubuntu packaged eclipse Aug 07 06:09:03 ok, I havent used eclipse in years, now it looks like very futuristic space station Aug 07 06:09:08 such is progress .. Aug 07 06:09:11 lol Aug 07 06:09:13 yeh, would be nice if 3.5 is in the repository Aug 07 06:10:19 regards to the isntallation, I*m sure you all follow this: http://developer.android.com/sdk/1.5_r3/installing.html Aug 07 06:13:48 heh the space station wasnt too far off, I see the eclipse versions are named after jupiter moons Aug 07 06:15:56 funny enough the plugin installation has changed once again for galileo Aug 07 06:17:47 lninjox> how can i develop in android Aug 07 06:17:49 lninjox: by going to #android-dev and saying BANANA, then they'll help you... it's a code word so they know a random idiot isnt trolling Aug 07 06:17:50 thats whats up i tried everything to get the sdk to work in eclipse Aug 07 06:17:52 head on in there, they'll help you out Aug 07 06:17:54 thanks Aug 07 06:18:03 sorry for the spam... nobody noticed his banana :( Aug 07 06:18:19 yes, we have no bananas today Aug 07 06:18:27 lol he came in here and said banana :| Aug 07 06:18:40 indeed.. Aug 07 06:18:44 lol Aug 07 06:18:45 that's about as fail as fail can be Aug 07 06:18:48 but its to early. Aug 07 06:18:55 and he didnt use caps Aug 07 06:18:57 thats wrong on many levels Aug 07 06:19:00 lol its late here Aug 07 06:19:04 TommyBres: funny, but btw if you ever do that again i'll kill you ;) Aug 07 06:19:12 jasta: i love you too <3 Aug 07 06:21:40 quick, hose em Aug 07 06:22:18 ok, I actually have the ide running, now what Aug 07 06:24:11 it does look alot different Aug 07 06:24:16 banana Aug 07 06:24:17 lol Aug 07 06:25:39 >.< Aug 07 06:27:46 thanks alot i think its going to work Aug 07 06:36:09 peace off to google Aug 07 06:37:13 yeah, peace off o.o Aug 07 06:40:12 org.eclipse.ui.PartInitException: Invalid Input: Must be IFileEditorInput Aug 07 06:40:15 what? Aug 07 06:40:28 do I need a plugin or something Aug 07 06:42:26 for what? Aug 07 06:43:01 IFileEditorInput-thing Aug 07 06:43:19 install the android sdk, start up eclipse 3.5, go to help->install new software, enter googles android update site to install the eclipse stuff, restart eclipse Aug 07 06:43:20 I'm trying to open existing project manifest and it complains about that Aug 07 06:43:30 done that Aug 07 06:43:39 go window -> preferecens -> android, set SDK location Aug 07 06:43:44 also done Aug 07 06:43:51 then you did something wrong :P Aug 07 06:44:03 I can create a new android project (tho it did complain something about dalvik conversion error) Aug 07 06:44:33 its only two steps, you cant do it wring Aug 07 06:45:41 deebo: for kicks, co this and try if you can get it open: http://scandinavian-keyboard.googlecode.com/svn/trunk/ Aug 07 06:46:08 im at work, dont have android stuf here Aug 07 06:46:15 I see other people too get this error, but perhaps in other context than android Aug 07 06:47:08 did you restart eclipse after installign all the stuff Aug 07 06:47:31 yeah Aug 07 06:47:34 Could not open the editor: Invalid Input: Must be IFileEditorInput Aug 07 06:47:39 thats what it says Aug 07 06:48:01 "The IFileEditorInput interface seems to be placed on the IDE plug-in while Aug 07 06:48:04 the IFile, IFolder, IResource, are all on the org.eclipse.core.resources. Aug 07 06:48:07 What is the reason for this interface to be placed on the IDE?" Aug 07 06:48:48 I dont know shit, but it sounds like I need some esoteric extra ide plug-in Aug 07 06:50:38 seems to me that your installation is borked somehow Aug 07 06:51:34 could it be that eclipse 3.5 is too new? Aug 07 06:51:42 since the docs inly cover 3.3 and 3.4 Aug 07 06:52:59 i used it fine in 3.5 Aug 07 06:53:47 ok Aug 07 06:53:59 here's a good one: http://android-er.blogspot.com/2009/07/install-android-sdk-on-eclipse-35.html Aug 07 06:54:04 I did pretty much all the same Aug 07 06:54:11 even the dalvik error is there (and how to remedy it) Aug 07 07:01:51 well, I'm stumped Aug 07 07:02:04 a hello world type of thing compiles and runs fine Aug 07 07:31:29 is there an easy way to find out if there is an existing network connection? Aug 07 07:33:01 Phlogi, yes use ConnectionManager Aug 07 07:33:07 how can I handle this exception correctly? http://pastebin.com/m581ba4b5 get a force close now Aug 07 07:34:28 that ArrayIndexOutOfBound is a programming error Aug 07 07:34:34 fix your array code Aug 07 07:35:21 ah not that is the problem: Uncaught handler: thread Background exiting due to uncaught exception Aug 07 07:35:22 I see Aug 07 07:36:12 found it :) Aug 07 07:49:09 hoerup: thanks Aug 07 07:53:50 np Aug 07 08:05:55 I've got a UserTask which I run .cancel() on after it has started.. onCancelled is called, but the task does not actually cancel.. it continues calling publishProgress() Aug 07 08:06:01 any ideas? Aug 07 08:20:08 Rexxars_, what parameter do you give cancel() Aug 07 08:23:27 hoerup: true :) Aug 07 08:25:45 your worker loop inside the tast should probably question isCancelled() periodically to test for whether it should continue Aug 07 08:27:00 I haven't used the AsyncTask setup myself, i prefer use plain old Runnable/Thread Aug 07 08:31:30 hoerup: wow, thanks a ton :) Aug 07 08:31:46 I never figured I would have to check it myself, figured it would just kill it or something :p Aug 07 08:59:56 I tried opening couple source manifests with eclipse 3.5 but I get this error: Aug 07 08:59:59 Could not open the editor: Invalid Input: Must be IFileEditorInput Aug 07 09:00:03 any ideas whats wrong? Aug 07 09:00:39 sdk installation itself is seemingly fine and "hello world" compiles and runs ok Aug 07 09:05:07 http://www.mail-archive.com/android-beginners@googlegroups.com/msg04193.html Aug 07 09:05:11 someone else too.. Aug 07 09:23:27 has any of you had success with using a google api for finding nearby points of interrest Aug 07 09:26:26 i amde a proggy that uses last.fm api to find events near current location Aug 07 09:26:33 havent tried google apis Aug 07 09:26:54 you mean like restaurants etc? Aug 07 09:27:14 yes Aug 07 09:29:43 i tried android.location.Geocoder but it doesn't quite do the trick Aug 07 10:42:02 i couldn't directly find a way to use a official way to use google maps for geolocation Aug 07 10:42:47 but a little reverse engineering on the ajax communication and i'm good to go :) Aug 07 10:42:59 There is offical way but due to license stuff server side stuff is not that good Aug 07 10:43:03 they truncate postcodes etc Aug 07 10:43:24 hoerup: doing that is against their t&c or whatever Aug 07 10:52:12 did android 1.5 have stereo bt sound? Aug 07 10:52:24 a2dp (?) Aug 07 10:53:43 yes Aug 07 10:57:17 row, do I have any alternatives ? Aug 07 11:24:17 Hi, I m a begginer and i looking for media player source Aug 07 11:24:32 are all basic app source are available in git source ? Aug 07 11:36:19 Anyone knows why after animating a view (with android:fillAfter="true" ), all view are unclickable ? Aug 07 12:16:10 Hi all Aug 07 12:24:37 I added a .9.png file to my drawables dir and now eclipse says theres something wrong with my project.. and none of the other @drawables can be found.. any ideas? Aug 07 12:26:23 nevermind, just found the "errors" window to be helpful :p Aug 07 13:07:30 I've a probleme with Animation, I must be missing something, after using a translate animation I call something likes public void onAnimationEnd(Animation animation) { lp.leftMargin=200; details_layout.setLayoutParams(lp); } but It make the "flash"... what am I missing ? Aug 07 13:07:56 *the view Aug 07 13:18:10 hi everyone - quick question: how can i retrieve the day of the week? for example, saturday, sunday ... Aug 07 13:19:15 GregorianCalendar date = new GregorianCalendar(); Aug 07 13:19:53 date.get(Calendar.DAY_OF_WEEK); Aug 07 13:19:57 something like that should work Aug 07 13:20:13 thanks :) i'll try it out Aug 07 13:22:35 what the right way to set an animation being "persistant" ? Cant understand how It work... Aug 07 13:22:38 any one ? Aug 07 14:58:26 ok now Aug 07 14:58:46 I can't even open the samples that come with android sdk, same error persists Aug 07 15:05:57 what error are you getting? Aug 07 15:10:03 deekjx: Could not open the editor: Invalid Input: Must be IFileEditorInput Aug 07 15:10:12 while opening the manifest xml Aug 07 15:10:32 I tried couple google repos and the sdk examples, same on all Aug 07 15:10:46 self created project loads, compiles and runs nicely Aug 07 15:14:05 are you importing the examples into a project? Aug 07 15:14:27 hm no, just via "open..." Aug 07 15:14:53 I hope this is a "you're doing it wrong" situation Aug 07 15:15:01 I haven't tried running them that way, you might want to port them into their own project in workspace Aug 07 15:15:06 and then run them from there Aug 07 15:15:27 umm so do I create a new project or what Aug 07 15:18:46 ah, trying "Select a directory to search for existing Eclipse projects." Aug 07 15:19:57 => "No projects are found to import" Aug 07 15:20:12 tried: /home/ave/.eclipse/android-sdk-linux_x86-1.5_r3/platforms/android-1.5/samples Aug 07 15:20:31 Anyone know how to call a function or something when a listview element is clicked? Aug 07 15:21:54 hey I think I got it, I needed a "file system" import rather Aug 07 15:25:26 ok, via "new project" ... now we are cooking with gas Aug 07 15:36:54 Hmm what is best practice when it comes to building GUI, is it better to write the code yourself or should you ise a GUI-builder, and if so, is there a good one on OS X? Aug 07 15:44:33 navies: I code my own but your question peaked my curiousity. http://www.droiddraw.org/ Aug 07 15:44:41 i don't knwo if its any good or not Aug 07 15:44:50 deekjx: Yeah I saw it, it's primitive Aug 07 15:44:52 but it is for mac, win, and linux Aug 07 15:44:55 But Usefull none the less. Aug 07 15:45:03 Do you code it in XML or source-code like WinForms on .NET? Aug 07 15:46:21 there's a visual editor in the Eclipse plugin Aug 07 15:46:56 xml Aug 07 15:49:04 lol, I never noticed I could drag and drop from that. I've been bouncing in between the tabs. Code, look, code, look. I'll have to give that a shot Aug 07 16:14:35 Thats some weird A** crap lol Aug 07 16:14:53 Found out the problem by accident Aug 07 16:20:29 What are you supposed to have under package name in Eclipse? Aug 07 16:20:32 It asks for two identifiers Aug 07 16:21:43 nevermind Aug 07 16:24:09 Is it possible to apply my custom Theme as I'm laying out my views in the eclipse layout editor? Aug 07 16:24:36 There's a Theme dropdown, but it only shows android themes, not my custom theme. Aug 07 16:36:38 just hard code it in xml its like 1 line... Aug 07 17:45:23 anyone know what the android platform uses to decode h264? Aug 07 17:45:33 is it a gpl library or something custom made? Aug 07 17:45:46 not gpl to my knowledge Aug 07 17:46:05 ffmpeg? libav? Aug 07 17:46:21 just wondering about xvid and generic mpeg4, since it would be easier on the cpu to decode Aug 07 17:46:33 I haven't really looked too closely into it, other than that I haven't found anything obvious. Aug 07 17:56:10 it might be decoded on a DSP Aug 07 17:56:15 i dunno Aug 07 17:56:38 (i mean, that would be ideal of course) Aug 07 17:56:56 in overlay's draw method, should i be calling canvas.drawBitmap, or should i do that elsewehre? (my overlay's draw method is uber slow) Aug 07 17:59:31 fangus: did you profile it? Aug 07 18:02:21 ctate: it would, but not even low bitrate h264 is properly handled, a dsp wouldnt choke like that :p Aug 07 18:02:37 or then the gui end is really bad Aug 07 18:03:16 (the very slow memory bus on the Dream and Sapphire phones is quite problematic, fwiw) Aug 07 18:13:22 android use something called 'OpenCORE Media Framework' Aug 07 18:13:33 it should support mpeg4 but no word on containers Aug 07 18:14:07 and i guess the java side only gives apis like VideoPlayerView.play(File video) Aug 07 18:14:20 hope it gets improved Aug 07 18:18:40 If I'm going to be using multiple instances of the same drawable what's the best way to do this? Aug 07 18:19:37 OEP: is there a reason you need multiple instances instead of referencing the same one? Aug 07 18:20:02 well the image data is the same, but namely they're going to have different positions Aug 07 18:21:31 I guess I could always paint the same one multiple times but it's a little awkward Aug 07 18:22:05 OEP: I'm just thinking it over, just a sec Aug 07 18:22:29 ok :) Aug 07 18:24:33 OEP: is this for a button or something? Aug 07 18:25:00 herriojr, Graphics for a game Aug 07 18:25:05 ah ok Aug 07 18:26:13 The best I could come up with was using a single drawable and for each "instance" of it, update its bounds and paint it Aug 07 18:26:54 In fact that might be more memory-efficient. There's no sense in loading it more than once. Aug 07 18:27:15 OEP: yes, I'm about 95% sure that's the way the rest of the system does it Aug 07 18:27:27 but I'm not positive Aug 07 18:27:40 maybe I should back that percentage off a bit ;) Aug 07 18:27:48 Ok, I like that solution. I don't like updating the Rect :( Aug 07 18:27:56 I am finicky Aug 07 18:28:41 OEP: I'd just go with whatever makes your game not lag ;) Aug 07 18:28:49 hehe Aug 07 18:33:18 OEP: one thing you can do to test to see how the system works is to start up an activity, and grab the same drawable twice from res/drawables and compare their memory location Aug 07 18:33:45 I'm guessing it will be the same drawable, but I could definitely be wrong :) Aug 07 18:36:32 herriojr, yeah I was wondering if the system cached them (and I bet money it does) Aug 07 18:36:42 actually, I'll test it out right now Aug 07 18:36:51 ok! Aug 07 18:37:02 * OEP lays down his Monopoly money Aug 07 18:37:48 If I am developing an application (say a twitter client) that uses personal contact data which is not in the default contact provider (but ideally would be), what's the best way forward? Aug 07 18:38:21 A new data provider that links the information to contacts? Submit a patch to the Android project? Just store my own data? Aug 07 18:39:52 Is there a way to extend a content provider that I'm just missing? Aug 07 18:40:04 you could use the Extension table Aug 07 18:40:29 which has 3 columns: person, name, value Aug 07 18:40:46 the only problem is that it is not joined with the people table Aug 07 18:41:39 herriojr, ah, I hadn't seen that table. It has a person id but is not joined with the people table? I'm not sure I understand. Aug 07 18:41:57 also, I was actually working on a patch to make it so you could create a new ContactMethod KIND, so there could be any number of kinds, but I don't know if they'll accept it Aug 07 18:42:22 aaronw: you may not care whether it is joined with the people table, but I do Aug 07 18:42:58 herriojr, it's not that, I just don't understand the difference between "not joined" and "having a foreign key" here. Aug 07 18:45:32 OEP: so drawable1 != drawable2, but I don't know if that is true for the data backing it Aug 07 18:45:49 I guess I'd have to look up the Resources class Aug 07 18:46:36 aaronw: when doing a query on the extension table, it doesn't return along with it the columns from the people table Aug 07 18:46:55 so you have to do a separate query to get the name Aug 07 18:46:59 yeah. they could share Bitmaps I guess Aug 07 18:47:00 herriojr, ok, I see. thanks. Aug 07 18:53:14 OEP: in Resources.getDrawable(), I see the line: Drawable dr = getCachedDrawable(key); if (dr != null) { return dr; } Aug 07 18:54:30 Works for me Aug 07 18:55:26 OEP: but I don't think it is guaranteed since the cache stores a weak reference to the Drawable.ConstantState Aug 07 18:56:10 but I wouldn't worry about it unless your game is slowing down Aug 07 18:56:14 o.O Aug 07 18:56:21 it's rather quick hehe Aug 07 18:56:31 yeah, I wouldn't worry about it then :) Aug 07 18:57:33 I actually am using the same drawable (I don't load it from Resources.getDrawable()) Aug 07 18:57:40 oh ok Aug 07 19:15:08 OEP: this is where I saw it http://android-developers.blogspot.com/2009/05/drawable-mutations.html Aug 07 19:22:35 that's a handy one Aug 07 19:22:38 * OEP keeps it Aug 07 19:22:50 OEP: yeah, they have a lot of cool stuff on their blog Aug 07 19:23:53 I should get back into the blagoblag and read more Aug 07 20:43:51 how do you do a LayoutParams in code with layout_height="0dp" layout_weight="1" Aug 07 20:44:15 this doesn't work: LayoutParams lp = new LayoutParams(0, LayoutParams.FILL_PARENT); lp.weight = 1; Aug 07 20:44:25 is there a way to orient a widget like a textview Aug 07 20:44:30 so it is always on the far right Aug 07 20:44:32 LinearLayout.LayoutParams Aug 07 20:44:48 in the xml Aug 07 20:46:13 jasongornall_: RelativeLayout? Aug 07 20:46:14 jasongornall_: what is the view's parent? Aug 07 20:46:39 was a linear layout Aug 07 20:46:48 should it be relative Aug 07 20:46:48 ? Aug 07 20:47:45 you can do it with linear, just use android:layout_grabity="right" in the TextView Aug 07 20:48:07 I did and it doesn't do anything lol Aug 07 20:48:31 both height and width are wrap content Aug 07 20:48:47 jasongornall_: the parent needs to fill_parent on the width then Aug 07 20:49:00 gotcha Aug 07 20:49:02 also, you should get familiar with hierarchyviewer Aug 07 20:50:35 I found my problem, I swapped the height/width args in LayoutParams :( Aug 07 20:52:04 zhobbs_: it's always the easiest things that are the hardest to spot :-/ Aug 07 20:53:09 yeah, took me about 30 mins to figure that one out Aug 07 20:54:08 I can't remember what it is called, but you don't necessarily see what is there, but instead you see what your brain expects Aug 07 20:54:30 which it is an interesting phenomenon Aug 07 20:55:02 well, I shouldn't classify it as a phenomenon Aug 07 20:55:24 yeah, it's like all those brain teasers that ask you to pick out the misspelled word, and for some reason it's hard to find Aug 07 20:55:59 I read an interesting book called On Intelligence by Jeff Hawkins if you like AI type stuff Aug 07 20:57:39 it goes a little more indepth about it Aug 07 21:31:07 how do you make a MapView center on a specified locatoin? Aug 07 21:32:08 herriojr fyi i solved hte problem by optimizing the draw method Aug 07 21:55:22 hey is there a way to get the emulator to exhibit full singal strength? Aug 07 21:55:29 it seems to sit at 2 bars Aug 07 21:57:28 ni|: i think it only lets you have 50% :( Aug 07 21:57:34 and it only lets you have UMTS Aug 07 21:57:41 you can'd emulate HSDPA or full signal or edge. XD Aug 07 21:57:42 nah if igured out a way to get more than that Aug 07 21:57:49 oh? Sweet Aug 07 21:57:51 yea Aug 07 21:57:55 dalvik debug monitor Aug 07 21:57:57 tell me how to make it do HSDPA in emulation :P Aug 07 21:57:58 ahaha Aug 07 21:58:08 i have it doing hsdpa Aug 07 21:58:16 i just cannot figure out how to get more than 50 Aug 07 21:58:20 why would they do that... Aug 07 22:22:57 Is there a way I can draw a faded rectangle onto a canvas? Aug 07 22:25:07 how do i make 2 menu icons appear on the same row Aug 07 22:31:13 ow do i make 2 menu icons appear on the same row Aug 07 22:34:22 fangus: can you be more precise? Aug 07 22:34:34 OEP: setting the alpha? Aug 07 22:34:55 mPaint.setAlpha() ? Aug 07 22:35:06 herriojr: like an options menu, when i press menu, i want both menu options to appear on the same row Aug 07 22:35:28 herriojr, I set it to 128 but it's still opaque Aug 07 22:36:10 fangus: AFAIK you can't Aug 07 22:36:22 wait i just fixed it Aug 07 22:36:24 lol Aug 07 22:36:38 gotta make them the same order o_O Aug 07 22:36:39 fangus: maybe I don't understand, oh well Aug 07 22:37:11 OEP: without doing it myself, I can't really help much other than saying "alpha" Aug 07 22:37:16 herriojr, yeah you were right. Aug 07 22:37:34 Note to self: setColor comes before setAlpha Aug 07 22:37:44 thanks :) Aug 07 22:44:13 there was a perl script to do a line count summary out there...can't think of the name of it...anyone know what I'm talking about? Aug 07 22:44:29 zhobbs_, cloc ? Aug 07 22:44:36 line count summary? Aug 07 22:44:40 http://cloc.sf.net/ I believe Aug 07 22:44:43 oh, SLOC? Aug 07 22:44:43 KNY: ahh, yes, thanks Aug 07 22:45:10 just count "if (" and "for (" and "while (" and semicolons :) Aug 07 22:45:40 ctate, neat, my python app has zero lines! :P Aug 07 22:45:47 grep -v "" | wc -l Aug 07 22:46:01 Qwell: ! Aug 07 22:46:02 even better: `cloc .` Aug 07 22:46:02 Qwell: that counts comments, too Aug 07 22:46:10 ctate: comments are code Aug 07 22:46:12 KNY: in python, count spaces :) Aug 07 22:46:16 ctate, ahaha Aug 07 22:46:17 Qwell: but they are not SLOC Aug 07 22:46:43 Qwell: did you see my screen cap from this AM? Aug 07 22:46:52 russellb: I did! Does it work? Aug 07 22:47:01 i didn't 'shop it :-p Aug 07 22:47:41 (08:22:03 AM) russell_: i hex edited the .bmp ;-( Aug 07 22:47:44 ah hem Aug 07 22:48:28 russellb: was the stack you wrote way back all java, or did you have to rewrite stuffs? Aug 07 22:48:43 how do i change the input language into another one on the emulator? Aug 07 22:52:08 man, I can't use variable argument lists in aidl functions... Aug 07 22:54:02 is there a good way to handle screen roations Aug 07 22:54:16 is there a way to have a layout scale so that it is visible on the screen? Aug 07 22:54:16 depends on what u want to do Aug 07 22:54:18 jasongornall_: as in not allow rotation or to pass data between the two? Aug 07 22:54:31 can you not allow rotation? Aug 07 22:54:39 yes Aug 07 22:54:45 how? Aug 07 22:54:45 herriojr: correct Aug 07 22:54:57 (re no varargs through the binder) Aug 07 22:55:23 yeah, I have a list of String[] objects, so I have to create a StringArrayWrapper to pass them Aug 07 22:55:24 do android:orientation=portrait/landscape in your activity tag in manifest Aug 07 22:55:32 you can ... right. Aug 07 22:55:40 I need to either A have the screen auto scale so everything is visible or force it Aug 07 22:55:47 or you can write your own marshaling code but trust me, you don't want to do that :) Aug 07 22:56:00 ctate: yeah, probably not :) Aug 07 22:56:04 is there a way to shrink the screen to fit the dimensions of a flip? Aug 07 22:56:20 flip? Aug 07 22:56:23 you mean rotation? Aug 07 22:56:26 yeah Aug 07 22:56:29 you can force an orientation for your activity, of course Aug 07 22:56:41 yeah, just create a new xml layout and stick it under res/layout-land Aug 07 22:56:50 name it the same as the original one Aug 07 22:56:51 you can also supply independent layouts for portrait and landscape Aug 07 22:57:00 ==herriojr Aug 07 22:57:12 "-land" there is for landscape Aug 07 22:57:21 right but is there a simple .shrink layout command? Aug 07 22:57:39 http://developer.android.com/guide/topics/resources/resources-i18n.html#AlternateResources Aug 07 22:57:58 jasongornall_: I do not know what you're trying to accomplish Aug 07 22:58:11 I want my screen to scale to a layout Aug 07 22:58:18 when I rotate Aug 07 22:58:24 jasongornall_: read the document I linked Aug 07 22:58:43 but orientation changes aren't just a matter of scaling Aug 07 22:58:57 one dimension shrinks while the other grows, etc. Aug 07 22:59:29 by default, the same layout is used to build the UI within the new screen dimensions Aug 07 22:59:46 (because your onCreate() code is executed again and does the usual setContentView() etc) Aug 07 23:00:06 right Aug 07 23:00:29 there isn't a way to be like if rotated stretch the width and shrink the height? Aug 07 23:00:42 you can do a couple of things Aug 07 23:00:51 the first is to write a layout that does the right thing in either orientation Aug 07 23:01:21 another is to write *separate* layouts for landscape vs portrait modes. Aug 07 23:02:00 hmm.. Aug 07 23:02:26 also in eclipse is there a way to have the emulator rotate? Aug 07 23:02:31 yes Aug 07 23:02:32 yeah Aug 07 23:02:40 there's a function key or something that you use Aug 07 23:02:44 hit 9 on the number pad Aug 07 23:02:46 on a Mac i think it's keypad-7 Aug 07 23:02:48 if I remember correctly Aug 07 23:02:49 or 9 or hwatever Aug 07 23:02:56 so on a mac Aug 07 23:03:01 it is just the number 9? Aug 07 23:03:07 I am on a powerbook Aug 07 23:03:11 er.. macbook Aug 07 23:03:12 I mean Aug 07 23:03:14 from a command line Aug 07 23:03:22 run this: emulator -help-keys Aug 07 23:03:26 no, on those you have to do something like ctrl+f12 or something like that Aug 07 23:03:42 or cmd+f12 Aug 07 23:03:49 on my Mac i see: Aug 07 23:03:51 * ctate | KEYPAD_9, Ctrl-F12 switch to next layout Aug 07 23:03:53 I don't know I don't have my mac on me Aug 07 23:03:55 that's what you want Aug 07 23:04:07 and Aug 07 23:04:08 * ctate | KEYPAD_7, Ctrl-F11 switch to previous layout Aug 07 23:04:23 (but since there are only two at present, portrait and landscape, no worries.) Aug 07 23:04:50 jasongornall_: but really, read that document I linked Aug 07 23:05:09 awesome thanks guys Aug 07 23:06:52 in order to take care of the two different rotations in the same file Aug 07 23:07:01 would I merely specifcy a layout with Aug 07 23:07:42 android:orientation=portrait/landscape Aug 07 23:09:04 jasongornall_: no, that tells if it is portrait or landscape only Aug 07 23:09:39 so you wouldn't rotate Aug 07 23:09:57 the OS will automatically pick the layout resource that corresponds to the current rotation state Aug 07 23:10:23 so all you have to do is put the layout .xml files in the right places (layout/ and layout-land/ directories) and off you go Aug 07 23:10:37 gotcha Aug 07 23:10:40 ctate: except for saving certain data between the two Aug 07 23:10:41 land=horizontal? Aug 07 23:10:47 land == landscape Aug 07 23:10:48 yeah Aug 07 23:11:14 look at Activity.onSaveInstanceState() if you have trouble with retaining data between the orientation Aug 07 23:11:22 change Aug 07 23:11:27 herriojr: that's a different issue! Aug 07 23:11:31 that's lifecycle stuff Aug 07 23:12:03 (when the user changes orientation while your activity is running, the activity is destroyed and recreated in the new orientation) Aug 07 23:12:10 I'm just saying, he might run into it :) Aug 07 23:12:18 I thought I'd let him know in advance Aug 07 23:13:38 thank you guys alot I really appreciate it :) Aug 07 23:14:04 which btw ctate: when I'm running on the main thread in my service, and I call stopSelf() (assuming no threads were started by the service), am I guaranteed that I will not miss any calls to onStart (some of the docs confused me on this)? Aug 07 23:15:09 especially since I'm having to do it through a handler, so what if something is on the queue after the call to stopSelf()? Aug 07 23:15:39 essentially, I'm trying to implement proper thread management/service lifecycle in a service that supports binding/starting Aug 07 23:16:18 hmm Aug 07 23:16:25 both binding *and* starting? Aug 07 23:16:27 ugh Aug 07 23:16:27 do I need a seperate land layout for everything Aug 07 23:16:34 or if it can't find it in that folder Aug 07 23:16:39 will it grab it from layout Aug 07 23:16:42 I should split them? Aug 07 23:16:42 the latter Aug 07 23:17:11 herriojr: my gut reaction is that you're confused about what the lifetime of your service is supposed to be Aug 07 23:17:56 i don't *think* you can wind up with "lost starts" just by calling stopSelf() Aug 07 23:17:58 fwiw Aug 07 23:18:04 if you can, that'd be a pretty serious bug Aug 07 23:18:08 ctate: here's my condition for not killing the service: if nothing is bound, and there are no threads running Aug 07 23:18:27 herriojr: why would there be threads running if nothing is bound? Aug 07 23:18:28 or rather for killing a service Aug 07 23:18:51 so, onStart() can kick up a thread, since I don't want to do processing in the UI thread Aug 07 23:19:20 UI = main thread Aug 07 23:19:43 *starting* a service == you want it to run forever Aug 07 23:20:11 ctate: I just want the service to run until all jobs are complete, and then close Aug 07 23:20:19 I was trying to be *friendly* Aug 07 23:20:22 and close myself down Aug 07 23:20:31 that's what happens with the bind semantics anyway Aug 07 23:20:48 when the last binding is removed, the service can be shut down Aug 07 23:21:15 yes, but when I mix it with onStart(), I need to make sure the threads from onStart() aren't running, right? Aug 07 23:21:22 or rather, the other way around Aug 07 23:21:28 that gets to the crux of my question Aug 07 23:21:32 why are you mixing bind and start semantics? Aug 07 23:21:41 hey so I am looking looking at Aug 07 23:21:42 onSaveInstanceState(Bundle) Aug 07 23:21:53 [you may have legitimate reasons; you may be confused. i'm trying to figure out which it is. :) ] Aug 07 23:22:04 which is used to store data between screen rotations correct? Aug 07 23:22:07 yes Aug 07 23:22:24 but isn't the activity recreated? Aug 07 23:22:27 it is used for that one specific case -- when your activity is being destroyed and recreated due to an orientation change Aug 07 23:22:38 so, I have an operation that can be called via aidl so that I can pass it a callback and know when it finishes, and one to just kick it up and have it run Aug 07 23:22:48 it's a convenience mechanism for your activity to avoid having to recreate "expensive" data Aug 07 23:23:00 I don't really understand how to save expensive data Aug 07 23:23:17 ctate: sorry I brought up onSaveInstanceState() ;) Aug 07 23:23:27 jasongornall_: i would recommend not worrying about it unless you decide you have performance problems changing orientation Aug 07 23:23:37 herriojr: SEE WHAT YOU'VE DONE Aug 07 23:23:37 I already am ;) Aug 07 23:24:00 jasongornall_: so, you know the bundle in onCreate(Bundle savedInstanceState)? Aug 07 23:24:08 yeah Aug 07 23:24:17 it contains the data you wrote to it in onSaveInstanceState() Aug 07 23:24:36 ahhhh Aug 07 23:24:37 ok cool! Aug 07 23:25:26 ctate: anyways, you see what I'm getting at right? sometimes I want to specify a callback, but in the cases I don't, I just want it to run in the background semi-unabstructed Aug 07 23:25:42 herriojr: hm. were you by chance thinking of onRetainNonConfigurationInstance() ? ;) Aug 07 23:25:57 ctate: oh, that could be it :) Aug 07 23:26:03 sorry, I get things confused sometimes Aug 07 23:26:22 herriojr: even if the app that started your service is stopped in the meantime? Aug 07 23:26:32 ctate: correct Aug 07 23:26:42 ew, but okay :) Aug 07 23:26:44 ctate: it's talking to a server at this point Aug 07 23:26:56 yeah, okay Aug 07 23:27:11 i *think* you can just call stopSelf() when you're done and not worry about it Aug 07 23:27:16 if you have live bindings i don't think you'll be torn down Aug 07 23:27:32 what i don't know is how it deals with stacked start / stops Aug 07 23:27:35 * ctate shrugs. Aug 07 23:28:15 ctate: well, I wasn't going to stack them, since it is pretty much just synching some of the app's data Aug 07 23:28:27 and if it is just synching, it only needs to be run once at a time Aug 07 23:28:45 so there will be only one thread from onStart() Aug 07 23:28:45 * ctate nods. Aug 07 23:29:26 I was just worried about how to properly manage the service's lifecycle Aug 07 23:30:04 when it comes to a situation like this Aug 07 23:30:47 i get you now. Aug 07 23:30:57 like i said, i think you can just do the straightforward thing. Aug 07 23:31:11 and complain to me if that turns out to fail :) Aug 07 23:31:58 so, instead of using stopSelf(), I read up on stopSelfResult(), and it seemed to hint that things could be in the "queue" to call onStart and if you call stopSelf(), those ones will be lost Aug 07 23:32:06 anyways, I'll just try it out and stop bugging you Aug 07 23:33:24 need help with layout problem, fill_parent is not filling the parent. http://pastebin.com/m795a43ea Aug 07 23:34:06 aunn: which View? Aug 07 23:34:06 herriojr: you should use the startId Aug 07 23:34:07