**** BEGIN LOGGING AT Tue Jul 21 02:59:57 2009 Jul 21 04:23:25 if i wanted to create an application in flash and distribute it through the market, is there any way i can package it inside a java app as a container? Jul 21 04:23:41 i have an app i'd like to create in flash, to run on the htc hero Jul 21 04:23:51 but i don't want people to just steal the .swf Jul 21 04:24:06 I have good news and bad news Jul 21 04:24:18 The good news is I don't think anyone will steal the .swf Jul 21 04:24:23 m0zzie: puttain an app on Market that works only on one phone is probably not a good idea Jul 21 04:24:33 and besides, even in an apk getting the swf would be possible Jul 21 04:27:14 so there's not really a way to embed flash into an application? Jul 21 04:28:35 you probably could Jul 21 04:29:44 i'm sorta searching for a lib or something that will just let me create a wrapper Jul 21 04:29:56 just write the wrapper Jul 21 04:30:14 i can probably implement some basic encryption too, so that any average users won't be able to steal the SWF Jul 21 04:30:30 if someone really wants to go hardcore and reverse my app to steal the SWF, well then, that's life Jul 21 04:30:42 but i'm only planning on selling the thing for like $1 Jul 21 04:30:42 is your swf that good? :) Jul 21 04:30:58 anyway, the average user cannot get the app off of the phone anyway Jul 21 04:31:00 just fun, entertainment! Jul 21 05:43:49 is there any standard way for including license notices in android apps. (for example, I am using apache licensed code meaning I must include a copy of the license itself and a notice listing the library with it developers) Jul 21 06:05:29 uvacav: about would be reasonable. Jul 21 06:17:57 #jasta thanks i'll think about that Jul 21 07:12:42 greetings to all, can anyone help me with the "dip", how to set it in cod ? Jul 21 07:12:46 code*? Jul 21 07:15:19 guys, can anyone please help me and tell me how to set margins in dp with java ? Jul 21 07:17:57 how to set the margins with Density-independent pixels in code ? Jul 21 07:20:46 how to set padding for a layout in java ocde ? Jul 21 07:22:07 guys , anybody hereeeee ? Jul 21 07:27:20 I love it when code works perfectly the first time. Jul 21 07:28:14 how to set the margins with Density-independent pixels in code ? Jul 21 07:28:14 how to set padding for a layout in java ocde ? Jul 21 07:30:12 ???? Jul 21 08:07:39 how to set the margins with Density-independent pixels in code ? Jul 21 08:07:47 how to set padding for a layout in java ocde ? Jul 21 08:20:05 ayman, google doesn't come up with anything? Jul 21 08:31:09 Morning all Jul 21 09:29:19 Does anyone know where I can find the source code for R.style.Animation_Toast Jul 21 09:30:31 Matt___: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/values/styles.xml;hb=cupcake#l111 Jul 21 09:30:46 be aware that the window manager won't load any non-framework animations Jul 21 09:33:02 cheers jsharkey, could you tell me how you found that so I can do my own searches? I've been reading about that on the google groups, but at the moment just trying to get the toast animation on a popupwindow Jul 21 09:33:43 Also I like your weather app / widget jsharkey very nice Jul 21 09:33:57 (I'm assuming your jeff sharkey :-P) Jul 21 09:34:02 lots of the framework-level resources are defined in that directory Jul 21 09:34:03 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/res/res/values;hb=cupcake Jul 21 09:34:35 you're probably most interested in themes and styles Jul 21 09:34:50 the mapping at first might be a bit confusing, but it offers some crazy flexibility Jul 21 09:34:56 yep thats me lol Jul 21 09:35:13 if you grab the source tree you can always grep ;) Jul 21 09:35:49 I think that might be the best bet :-) Jul 21 09:35:55 you can pull just the frameworks base git tree if you dont want to sync the entire platform Jul 21 09:37:28 Yeah git is something I need to play around with, I want to get into some open source projects and so many of them use git would be handy to know Jul 21 09:37:52 git can be difficult at times ;) Jul 21 09:39:15 lol well it makes it so much more satisfying when you get it working that way Jul 21 09:46:26 Hey guys, I have been reading up on android on the side but I keep wondering, what do you do for testing? Is it possible to use unit tests and mocking? Jul 21 10:01:14 ExxKA: I think you can add jUnit test (not totally sure) but the eclipse debugger lets you use breakpoints to step through the app Jul 21 10:01:55 Its also really easy to test gps stuff through simulating long and lat values and also inserting paths through xml or kml files Jul 21 10:08:36 ExxKA: There is support for unit tests and some built-in mocks, but developer-contributed testing frameworks are also out there Jul 21 10:09:20 anyone here written a bloom filter lately? Jul 21 10:19:46 does the question "Whats a bloom filter?" answer your question kRutOn? :-P Jul 21 10:20:21 Does anyone know if the geo Uri is extended in source but not been documented? Jul 21 10:25:24 kRutOn, thanks. If a bloom filter has something to do with 2d graphics, then yeah, maybe I can help Jul 21 10:26:08 no, I'm just trying to make a word list very tiny Jul 21 10:27:29 Okay, glhf :) Jul 21 10:31:23 oh, I will... Jul 21 12:02:27 Hello. How can I create a listview where elements are added periodically? I've read about ListAdapter but the examples i've seen only show arrays which are not modified after the onCreate() call. Jul 21 12:09:07 I think I found it. The following link answers my question: http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/view/List12.html Jul 21 12:33:54 Do people think it would be ok to use the Google Maps My Location menu icon in a paid app? Jul 21 13:01:23 how does one launch a background service that does _not_ trigger a 'intent has leaked service' error? The background service is supposed to check for new messages when the main app has been closed. Jul 21 13:20:29 How about using a future intent? Jul 21 13:21:05 hmm.. I am not sure thats the name of it.. But it'll do the trick. aVirulence Jul 21 13:21:46 ExxKA: when launching the service? Jul 21 13:31:40 Yep, have the service listen to the future intent. The intent will remain even though the activity closes Jul 21 13:35:56 aVirulence, I can see that's not what it is called. But there is a construct like I just explained, I am sorry but I can't remember what it's called Jul 21 13:36:09 ExxKA: is it a PendingIntent Jul 21 13:36:15 Nice :) Thanks Jul 21 13:36:17 hehehe Jul 21 13:36:22 Well, it'll do the trick :) Jul 21 13:39:43 ExxKA: however, it's not possible to do a startService() on a PendingIntent Jul 21 13:41:04 That's not what I want you to do anyways.. Jul 21 13:41:36 You create the PendingIntent.. then have the Service implement the Reciever and listen for the Intent.. Then fire the intent Jul 21 13:47:45 a not-so-simple question: how do you keep your code clean? for example: on the main activity i create/find/reference views, variables, touch/click listeners. if i have to update the GUI from a running thread, i have to use handlers and messages (in addition to the definition of threads). my code in the main activity is a big mess... how do you keep this clear??? =) Jul 21 13:48:42 um. good architecture design? ;) Jul 21 13:50:25 i suppose so :) Jul 21 13:50:36 but big projects are a pain, anyway! Jul 21 14:27:32 I've set a ListView item's background to another color. Now it seems that the ListView selector does not show anymore. Should I set the background color to something transparent in order for the selector to show? Jul 21 15:08:07 why would you want to set the lisview item's background, not the listview's background itself? Jul 21 15:08:17 s/lisview/listview/; Jul 21 15:39:58 Has anyone read Pro Android book by Sayed Y. Hashimi? Jul 21 15:44:40 Hey all I want to subclass StateListDrawable to make use of the onStateChange, I have no idea where to start in terms of how Drawables works, can anyone point me in the right direction? Jul 21 16:15:24 Matt___: what's your goal? Jul 21 16:18:04 basically I have a map view with itemized overlay on it, the markers on the itemized overlay are StateListDrawables, now when one is clicked it opens a popupwindow which stays open till another one is pressed, now the state of the last clicked button is focused until another button is clicked OR the map view is clicked, basically when the map view is clicked and takes the focus from the itemized overlay drawables I want t Jul 21 16:19:50 So im thinking that overriding the onState method would be the best way of achieving this Jul 21 16:20:44 you want it to stay focused when the map view is clicked? Jul 21 16:21:06 no I want it to dismiss the popupwindow which is open Jul 21 16:21:51 if I add a clickListener to the mapView, will that get called if a marker is hit? Jul 21 16:22:06 I see Jul 21 16:22:36 make your markers views and set onFocusChangeListeners Jul 21 16:22:55 not really sure how easy that is Jul 21 16:25:04 hee hee lol Jul 21 16:25:52 I'll have a look into it, cheers for the help though, I've been struggling to extend StateListDrawable for quite a while now Jul 21 16:30:25 you know what I just realised, I shoud just implement onFocus change on the mapView Jul 21 16:33:05 Nope that doesn't look to hopeful Jul 21 16:34:17 anyway thanks again zhobbs, g2g byeee all Jul 21 16:41:39 hi Jul 21 16:42:59 does anyone know if bytecode generation using asm works on android? i don't mean the generation of android compatible bytecode, just java bytecode. i am running dx on android itself to generate the dalvik bytecode, which works fine Jul 21 16:44:02 so, what kind of assembler are you using to create bytecode? Jul 21 16:47:18 well the application i am porting uses asm (http://asm.ow2.org/) to generate bytecode Jul 21 16:47:58 i just wanted to know if someone has tried this already to save some time if this turns out to be impossible :) Jul 21 16:48:49 interesting idea. don't know if you are the first one Jul 21 16:52:20 Didn't you already ask that? Or was that a different person.. Jul 21 16:52:56 Basically the answer was no. Jul 21 16:53:24 kRutOn: i had a similar question yesterday... Jul 21 17:39:56 is it possible to add multiple strings in an xml android:text="" from the strings.xml ? Jul 21 17:40:50 jsharkey: ping Jul 21 17:57:12 quiet morning Jul 21 17:57:30 yeah, a little Jul 21 17:57:50 http://android.git.kernel.org/?p=platform/external/tesseract.git;a=summary <-- anyone know why this was seemedly abandoned? Jul 21 18:03:12 only Iliyan Malchev can answer, i think. he is the only one working on it according to the repo log Jul 21 18:04:33 so u should find a way how to ping Iliyan Malchev to ask the question ;) Jul 21 18:08:37 http://www.google.com/search?client=opera&rls=en&q=Iliyan+Malchev&sourceid=opera&ie=utf-8&oe=utf-8 Jul 21 18:18:34 Hi all, is there a way for me to invoke the webbrowser download manager to download a URL? Jul 21 18:20:26 Spyrorocks, you could probably just use ACTION_VIEW and pass along the URL Jul 21 18:20:43 Thanks, Ill try that Jul 21 18:21:03 Hopefully this app turns out, my other one sort of failed and I got bored of working on it :P Jul 21 18:30:59 I'm duplicating this from #android: does anyboy know if android ships with ipv6 enabled? If so, is it vulnerable to ipv6 attacks? I'm asking in reference to this tech republic article: http://blogs.techrepublic.com.com/security/?p=1955&tag=nl.e036 Jul 21 18:31:06 *anybody Jul 21 18:44:10 stux|away: "adb shell ip -6 addr show dev rmnet0" returns nothing Jul 21 18:45:51 ah! thank you lianj Jul 21 18:46:20 i searched google and a couple of articles suggest that android isn't compiled with ipv6 Jul 21 18:46:53 that puts my mind at ease Jul 21 18:46:58 heh Jul 21 18:48:59 has anyone written an orm for android yet? I wrote one that works well, but it needs to be optimized/rewritten. Jul 21 18:49:12 Also, I write it by hand, so i need to write a generator Jul 21 18:51:04 stux|away: the 'xmpp to every device' api sounds as scary to me Jul 21 18:54:12 mpardo: you mean something like this: https://www.jaqpot.net/svn/android/netcounter/trunk/src/net/jaqpot/netcounter/model/ ? Jul 21 18:54:20 how can I extend a view? I have the most simple code possible that does "public class ShapeView extends View" and in my layout.xml I have " its being incredibly frustrating getting all of these stupid, vague errors on runtime :( Jul 21 18:56:12 i guess i need to start reporting bugs about all this awful stuff the emulator spews out Jul 21 18:56:43 lianj, I'm not familiar with xmpp holes, but if it leaves ports open, i'm worried too Jul 21 18:57:07 (nor am i familiar with that api) Jul 21 18:57:36 lianj: yes something like that. I Have something similar written, but I want something more like activerecords style. I also want to generate the classes based off a config file or something. Jul 21 18:57:49 lianj: maybe a google code project should be started? Jul 21 18:58:38 stux|away: its made with good intends. for having an easy api to speak to other android devices. it can be used for good and eventunally for bad, if a flaw appears Jul 21 19:00:37 how do I output to the logcat? Jul 21 19:00:44 mpardo: its not my code. just happen to read it while learning about android platform. but yeah, coming from a ruby background i liked netcounters sqlite model code, it made sense when dealing with sql as object store Jul 21 19:00:48 I want to print out hello world how would I do that? Jul 21 19:01:19 lianj, oh... yeah that's definitely not very comforting. I'm sure some flaw will appear. Jul 21 19:01:26 would anyone be interested in helping me create an activerecord style orm? i'm creating a google hosted project now Jul 21 19:01:49 I have alot of code right now. it's shitty code... but a start Jul 21 19:01:53 and it works well Jul 21 19:01:54 mpardo: when you fire up a project, i ll help where i can Jul 21 19:02:00 hmm. I have a problem with the Eclipse plug-in. I'm getting an error that some drawables cannot be found, while they are actually there. I tried recreating the R.java file.. Jul 21 19:02:16 mpardo Ill help where I can too Jul 21 19:02:24 stux|away: ;) Jul 21 19:03:28 Cool... I'll upload what I have so far... it's a "golf caddy" app datamodel. it will need to be severely adapted i think. possibly rewritten as it is based of of EntitySpaces Jul 21 19:03:33 aVirulence, right click the res folder in the navigator in eclipse and select refresh Jul 21 19:03:39 and not properly abstracted Jul 21 19:04:03 what's the best license to give it? Jul 21 19:04:07 MIT? Jul 21 19:04:38 Matt: nothing happens Jul 21 19:04:47 mpardo: yep, Jul 21 19:05:18 aVirulence?so all your files are there within eclipse navigation? Jul 21 19:06:29 Matt: yes they are Jul 21 19:07:23 aVirulence: sorry no idea then, normally after refreshing the project and compiling any files in red will be ok Jul 21 19:07:50 Matt: yeah I tried even deleting the R.java file and cleaning the project Jul 21 19:10:57 aVirulence: I know it says drawables, but did you recently change any xml files (layout, etc.) in the res folder? Jul 21 19:11:18 herriojr1: yeah I did Jul 21 19:11:45 aVirulence: it's probably an issue with that, which creates issues with other things Jul 21 19:12:00 when one thing goes bad in the resource directory it basically will say everything is bad Jul 21 19:12:36 herriojr: yeah, but there's only one error with one drawable Jul 21 19:12:39 that is there Jul 21 19:13:33 aVirulence: and you did try a full project "clean" Jul 21 19:13:36 it even shows up in the R file Jul 21 19:13:41 herriojr: yeah, I did Jul 21 19:13:55 yeah, try reverting the xml you changed Jul 21 19:14:03 and see if that fixes it Jul 21 19:14:22 I know it sounds dumb, but it works for me quite often :) Jul 21 19:15:34 usually it ends up being that I forgot to add the android namespace or something similar Jul 21 19:17:03 aVirulence, check your imports as well :) Jul 21 19:18:15 the project is here: http://code.google.com/p/androidrecord/ Jul 21 19:18:18 i'm adding stuff now Jul 21 19:20:17 record what? Jul 21 19:21:09 herriojr, madis: It seems that the android.R was imported instead of mypackage.R.. Jul 21 19:21:11 tmzt: as in db record... play on words with activerecord Jul 21 19:21:14 thanks for the help both :-) Jul 21 19:21:37 ah, cool Jul 21 19:22:08 how is that different from romainguy's database stuff? Jul 21 19:22:15 aVirulence: yup, that could do it :) Jul 21 19:22:41 * lianj git svn clone http://androidrecord.googlecode.com/svn/trunk/ :D Jul 21 19:22:43 has anyone done alot of map stuff? I am trying to overlay a image on a mapview Jul 21 19:22:46 and am having trouble Jul 21 19:27:23 does anyone know any os x template code gen apps? Jul 21 19:33:36 aVirulence: I once did the same mistake :) Jul 21 19:34:11 madis: yeah, everything was messed up when I cleaned the project and used the automatic import feature.. Jul 21 19:45:18 hia all! is there some kind of a widget out there that would "float" its children.. kinda like LinearLayout, but when the row/col is full a new line is started? Jul 21 19:45:33 like FlowLayout from swing? Jul 21 19:46:03 the name seems right, but never used swing, so can't be 100% sure :) but I guess so Jul 21 19:51:20 roosmaa: there's no such layou Jul 21 19:51:22 layout Jul 21 19:51:26 but you can write one easily :) Jul 21 19:56:44 romainguy_: doing it right, aint that trivial, imho. much headache @ calculating measurements. Quick hack I'm doing atm is just using a table and limiting the items in the row, but it isn't foolproof either Jul 21 19:59:28 yeah, algorithms are hard Jul 21 19:59:40 but that layout is probably not as hard as you think Jul 21 20:00:50 Is there some visualization library for android, e.g. to draw some nice graphs? Jul 21 20:23:55 what do I have to do beside call invalidate() in a view to get an onDraw() to happen? Jul 21 20:25:55 let the UI thread continue to run Jul 21 20:26:14 i don't think i'm blocking it Jul 21 20:26:35 zinx: http://bnovc.pastebin.com/m55cfaef2 Jul 21 20:28:06 postInvalidate vs invalidate, don't block ui thread, etc. Jul 21 20:28:51 are you calling setColor anywhere? Jul 21 20:29:02 yep from the activity on the menu click Jul 21 20:29:20 does the ui thread call it? Jul 21 20:29:35 hiya. I know that android is java based. but does anyone know if there is any way of making c# app's using a java api/framework of some kind? Jul 21 20:30:08 mrXorY: i wouldn't count on it being easy, but if somehow you could compile C# to the Java bytecode, or even directly to dx, you could use it. Jul 21 20:30:13 mrXorY: No. Jul 21 20:30:33 jasta: Microsoft made a product ("Visual J++") that did that Jul 21 20:30:40 cjb, jasta : ok, as I thought. Jul 21 20:30:48 cjb: i thought that was the other way around? Jul 21 20:30:50 good that c# and java isn't that different. Jul 21 20:30:51 cjb: that is the other way around Jul 21 20:31:10 ah, that's true Jul 21 20:31:36 Does anyone know where I could find the source code for the Google maps app that comes with the android sdk? Jul 21 20:31:39 I guess people are trying to migrate from Java to C# Jul 21 20:31:48 no-one's trying to migrate from C# to Java Jul 21 20:31:52 Matt: it's not available. that app is closed source, along with all other proprietary google apps. Jul 21 20:32:39 vol_: yes it does Jul 21 20:32:47 oh okies jasta, just thought I could find it because some of the apps in android are in the git repo, but thanks for you help, in that case does anyone have any idea's where the source code would be for handling the geo intent? Jul 21 20:32:51 bnovc: eeenteresting. Jul 21 20:32:56 vol_: http://bnovc.pastebin.com/m627cff0f thats the activity Jul 21 20:33:24 Matt: Probably part of the google maps code. Jul 21 20:34:30 just got myselft htc magic. haven't had the time to look into the development for android. is it pretty straightforward or messy? Jul 21 20:34:58 mrXorY: it's much messier when you don't take the time to read about it :) Jul 21 20:35:04 vol_: any ideas? Jul 21 20:35:18 bnovc: many, none that would help you though : ( Jul 21 20:35:39 heh Jul 21 20:35:42 mrXorY: it's a very powerful environment, which is greatly unlike other mobile development environments. Jul 21 20:35:48 for taht reason, it may seem more complex. Jul 21 20:36:02 vol_: it seems like every trivial thing i do in android because something no one knows how to achieve very quickly Jul 21 20:36:03 actually, compared to j2me development, it's straightforward as heck :\ Jul 21 20:36:18 jasta : ok nice to hear. the impression I have so far is that it both looks great and works great aswell. Jul 21 20:36:25 mrXorY: if you actually read about things,a nd learn the framework for what it is, it is a very pleasant environment. Jul 21 20:36:43 i don't find android enjoyable at all so far Jul 21 20:36:43 I just installed a fresh ubuntu 9.04 install, and when trying to connect to an actual device, it doesn't find it unless I "sudo ./adb start-server"...I even tried adding a udev rule at /etc/udev/rules.d/51-android.rules with the text: SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"....and restart udev, but it doesn't fix it, has anyone had this issue? Jul 21 20:36:51 stupid error messages and trivial problems all the time Jul 21 20:36:58 herriojr: sudo adb kill-server Jul 21 20:37:00 then try again Jul 21 20:37:02 I've been thrown into the deep end of mobile development lately and been working on android and blackberry and android is far far nicer Jul 21 20:37:04 bnovc: should have asked when romainguy was here :P Jul 21 20:37:06 jasta: yes, I've done that as well Jul 21 20:37:36 bnovc: perhaps you aren't doing as i suggested: taking your time and reading about the platform. Jul 21 20:37:53 if you go clammoring around waving your hands like a mad man, i expect you'll have all sorts of problems. Jul 21 20:37:57 i'm not sure what i didn't read about... what i'm doing is pretty ismple and i've read all the examples Jul 21 20:38:00 jasta: no need to be a jerk. take a look at the pastes he provided, they actually look about right to me. Jul 21 20:38:03 does anyone know where the drawables (backgrounds) for the widgets reside? Jul 21 20:38:08 bnovc: well, feel free to ask. Jul 21 20:38:17 i did, scroll up a bit to my pastes Jul 21 20:38:27 aVirulence: up in frameworks/base/core/res/res/drawable* Jul 21 20:38:33 k, hang on Jul 21 20:38:50 jasta: thanks :-) Jul 21 20:39:35 i'm guessing that there is also a better way to have LinearLayout provide me 1/3 of the screen (ShapeView is added 3 times) than calling the setMeasuredDimension line but i haven't found that, yet Jul 21 20:39:47 bnovc: i'm having a hard time reading the back log, can you try to explain at a high level what you want to do? Jul 21 20:40:32 bnovc: I don't have much experience with timers. You might want to try scheduleAtFixedRate? Jul 21 20:40:52 jasta: i'm trying to update some shapes on a timer and when a menu button is pressed and neither of those are working (i.e. invalidate() is not calling onDraw) Jul 21 20:41:01 http://bnovc.pastebin.com/m55cfaef2 http://bnovc.pastebin.com/m627cff0f Jul 21 20:41:07 those are my viwe and activity Jul 21 20:41:08 jasta: ah, what it was is I didn't disconnect and reconnect the usb cord Jul 21 20:41:11 Also, I'm not sure that the Timer runs as the UI thread. Jul 21 20:41:17 you might want to try using postInvalidate for that one Jul 21 20:41:21 bnovc: I think I may know why your menu isn;t working Jul 21 20:41:28 don'tuse the Timer class, first of all. Jul 21 20:41:40 the menu item ID's need to be different, you can't do anything other wise Jul 21 20:42:03 bnovc: timing is done on android's main event loop, and not through the use of Timer. rather, Handler is used for that. Jul 21 20:42:13 and yes what Matt said is also true -- the ids must be unique to the menu, else you cannot tell which item was pushed Jul 21 20:42:17 Matt: oh, heh, well that is another problem, but onDraw() isn't called Jul 21 20:42:20 hi Jul 21 20:42:36 btw, have you checked the log for any exceptions? Jul 21 20:42:49 bnovc: so do you have a shape just gettin shown for starters? no menu and no timer? Jul 21 20:42:52 there aren't any...so I need to create a separate thread just to do a time based rotation? Jul 21 20:43:06 Matt: right. it shows 3 squares and they don't rotate or change color Jul 21 20:43:14 bnovc: likewise, Android has an animation framework which you should probably be using anyway. Jul 21 20:43:32 bnovc: this is exactly what i meant before: you are trying to force common Java solutions into a totally foreign framework. Android has its own way of doing things. Jul 21 20:43:47 i've never even used java before. i got this stuff from examples for android :\ Jul 21 20:43:59 dont trust examples that didn't come from Google -- they're all crap :) Jul 21 20:44:05 someone knows how to read an xml feed that contains accents (Spanish)? Jul 21 20:44:11 unfortunetly google doesn't have a lot of examples Jul 21 20:44:24 they don't need to have lots of examples -- they released the entire frameowrk and most apps open source. Jul 21 20:44:40 i'd rather read examples than their source Jul 21 20:44:51 bnovc one thing Im unsure about is, your onMeaure thing sets the dimensions to 50,50, if you rotate a square it's not 50 50 is it? Jul 21 20:44:52 grep -i time **/*.java isn't the most direct way of learning about timers Jul 21 20:45:02 anyway, it looks to me like yo're just trying to do some rotation animation or something on a view. hang on, i will try to find a reference on the animation framework. Jul 21 20:45:03 we don't use the Timer class Jul 21 20:45:04 their source contains examples....anything under the packages directory is an android app Jul 21 20:45:06 it will make your life much easier Jul 21 20:45:11 ahh, and romain is back. excellent. Jul 21 20:45:31 Matt: it doesnt draw that large though Jul 21 20:46:57 i saw another example somewhere that had a separate thread/etc. but i assumed there must be an easier way to do timers in android Jul 21 20:47:21 bnovc: okies thats fine, my suggestion is your trying to do too much at one, start getting the menu working (which is nearly there tbh, then make that infer a function call onto the view to rotate it (Which you should use animations which are relatively easy to do Ill find you the link I used) and then try to move it to a handler and / or thread Jul 21 20:47:29 I was hoping for something like Qt's QTimer where its setup on the UI thread but Qt deals with it for you Jul 21 20:47:37 bnovc: why do you need a timer? Jul 21 20:47:46 romainguy_: i wanted a shape to rotate periodically Jul 21 20:48:02 well that's not how we do animations on android Jul 21 20:48:12 well, i was doing this for learning only Jul 21 20:48:13 you can simply post messages in a Handler at regular intervals Jul 21 20:48:15 or Jul 21 20:48:22 you can use one of the built-in animations Jul 21 20:48:25 like RotateAnimation Jul 21 20:48:27 hehe Jul 21 20:48:34 case-and-point ;) Jul 21 20:48:56 so I have to do something like http://www.anddev.org/the_pizza_timer_-_threading-drawing_on_canvas-t126.html with the Handler? Jul 21 20:49:14 it seems like a couple hundred lines of code to call onDraw every 100ms is overkill Jul 21 20:49:41 that code does much more than that Jul 21 20:50:06 jasta: are you sure that the widget background drawables are located there? Jul 21 20:50:51 aVirulence: what widgets are you referring to? Jul 21 20:51:01 if you are talking about buttons, editexts, etc. yes they are there Jul 21 20:51:18 aVirulence: I was looking for the backgrounds for the HomeScreen widgets, perhaps I wasn't clear enough :-) Jul 21 20:51:35 Whatever happened to plusminus? All his examples are with m5 SDK it looks like Jul 21 20:51:45 then you'd have to look in the respective apps: Music, Calendar, etc. Jul 21 20:51:46 or Jul 21 20:51:55 look at the widgets design guidelines at d.android.com Jul 21 20:52:38 hey romainguy you seem pretty clued up on any and all android questions, any idea where the source code responsible for launching an intent to displays maps app is? Jul 21 20:52:49 romainguy_: I'm currently using the backgrounds provided in the guidelines, I was wondering if it might be possible to link to the built-in widgets' background drawables Jul 21 20:52:59 romainguy_: can you code me a pony? Jul 21 20:53:02 Matt: you're looking for the source of Maps? Jul 21 20:53:06 or maybe a pomeranian if a pony is too much Jul 21 20:53:09 aVirulence: nope Jul 21 20:53:42 romainguy_ ah, ok thanks Jul 21 20:54:05 Hi all, Jul 21 20:54:22 romainguy_ no im looking for the source code with is responsible for parsing "geo:lat, long?q=...." etc because the documentation has very little on it and says its being worked on, and I could find it in the Uri.java file Jul 21 20:54:25 I have a list of song titles, what would be the best control to stick them in so a user could scroll a choose one? Jul 21 20:54:34 and* Jul 21 20:54:52 Matt: that source code is the code you write yourself. Jul 21 20:54:55 setting up a handler worked. thanks Jul 21 20:55:00 register to handle the geo uri Jul 21 20:55:01 Matt: well yes it's the Uri class that parses that Jul 21 20:55:10 I guess thats not too much code Jul 21 20:55:20 is this the correct way to make an HTTP request? http://pastebin.com/d714e4103 Jul 21 20:55:22 Matt: but Uri only splits that string into the various parts (parameter names, values, host, etc.) Jul 21 20:55:50 it doesnt seem to be making the request Jul 21 20:56:03 according to apache logs Jul 21 20:56:15 romainguy_ yeah so what I need is the other half which picks out the parts but at a lost as to where that might be or even whether I can get it Jul 21 20:56:38 well it would be in the Maps app Jul 21 20:56:42 and the source code is not open Jul 21 20:56:45 Matt: they're probably in the maps app. Jul 21 20:56:45 elmer_: Using URL.openConnection() is probably easier Jul 21 20:56:57 Seriously, register for the geo uri, you'll get the choice whether to open maps or your app. Jul 21 20:57:02 how would I obtain the right width/height from my LinearList with my ShapeViews? Jul 21 20:57:10 now, contacts on the other hand, hard code maps as the componant to use : ( Jul 21 20:57:14 right now I had them hardcoded to be 50w, 50h, but I'd prefer it be full width, 1/3 height Jul 21 20:58:01 yeah okies no worries cheers for the help vol_and romianguy, I was just certain I could open the maps app from mine to show directions but i can't do that without any documentation update really Jul 21 20:59:09 Matt: maps should handle the geo uri correctly. Jul 21 20:59:12 Isn't there like a whole IETF draft on geo URIs? Jul 21 20:59:18 http://tools.ietf.org/html/draft-mayrhofer-geopriv-geo-uri-01 Jul 21 20:59:28 just figure out how to write a geo uri and call startActivity on it with a view intent Jul 21 20:59:33 what kruton said :P Jul 21 20:59:57 Maybe the docs aren't good because the authors were busy drafting the IETF doc :-) Jul 21 21:00:13 lol so is that document explaining all the components? Jul 21 21:00:34 this used to work, then just stopped Jul 21 21:00:41 with no changes Jul 21 21:01:14 Matt: Are you talking about the query string? Jul 21 21:01:48 kRutOn: Yeah thats exactly what I'm talking about . . *Gets hopeful you'll point me in the right direction* Jul 21 21:02:05 also, it seems like DDMS freaks out sometimes and starts clearing and writing 1-4 lines and clearing again Jul 21 21:02:34 Matt: Do you know of anything that can open Maps directly into driving directions now? Jul 21 21:03:10 no I dont, I dont own an android phone cos can't afford it so only have access to whats on the emulator Jul 21 21:03:27 kRutOn: contacts can Jul 21 21:04:06 ooo ooo oo this could be good cos that source code is open isnt it? Jul 21 21:04:21 good luck. Jul 21 21:04:47 I think that this either launches maps using the address as the data, or it sends a request to the google geocoding servers to get the lat/long back. Jul 21 21:05:59 you can just at logcat to see what Intent it calls Jul 21 21:06:23 oooo ok kool Jul 21 21:06:25 its like its hanging on this http call Jul 21 21:06:47 ill look at it now, cheers guys, you've been amazing help Jul 21 21:06:53 elmer, pastebin the code again please? Jul 21 21:07:49 http://pastebin.com/d714e4103 Jul 21 21:08:13 I/ActivityManager( 576): Starting activity: Intent { action=android.intent.action.VIEW data=content://contacts/people/1/contact_methods/1 comp={com.google.android.apps.maps/com.google.android.maps.MapsActivity} } Jul 21 21:08:19 I guess that's not very helpful... heh Jul 21 21:08:49 xxx.com, hot. Jul 21 21:08:54 heh Jul 21 21:10:19 is it possible that you're just timing out? Jul 21 21:10:39 im able to access the same URL from the computer im deving on Jul 21 21:11:07 apache says its not even getting a request Jul 21 21:11:08 step through w/ the debugger. where do you hang? Jul 21 21:11:20 right at the resp = client.execute(request); Jul 21 21:11:24 do you have a data connection? Jul 21 21:11:38 yeah kRutOn it doesn't look like it :-S Jul 21 21:11:47 ? data connection? Jul 21 21:12:02 don't worry about it, I'll wait and see if the documentation gets better, Im not in any hurry at the moment Jul 21 21:13:07 i dont know what you mean by data connection, maybe thats my problem Jul 21 21:13:16 however this was working once before Jul 21 21:23:51 what's the a in argb value for 80% transparency? Does anyone know where I can find that? Jul 21 21:24:09 aVirulence: what's 80% of 255? Jul 21 21:24:31 warewolf: 204 Jul 21 21:25:08 aVirulence: give that a try. Jul 21 21:27:00 warewolf: heh, in hex I guess? Jul 21 21:30:48 can someone explain overlay items to me Jul 21 21:30:51 with the mapview Jul 21 21:30:56 they don't seem to really work Jul 21 21:31:14 is there no way to add extras to an intent? Jul 21 21:31:18 in an appwidget? Jul 21 21:31:45 herriojr: ping? Jul 21 21:31:48 the_alien: hey Jul 21 21:31:51 :D Jul 21 21:32:00 MY personal hero ;) Jul 21 21:32:03 yeah, you can add extras to an intent Jul 21 21:32:41 i add it here: intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widgetId); Jul 21 21:32:53 and read it here: int widgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1); Jul 21 21:32:59 it is always -1 Jul 21 21:33:20 so, you have to make sure that your pending intent creates the Intent new each time instead of reusing the last one Jul 21 21:33:29 let me check what the flag is really quick Jul 21 21:34:19 herriojr: i create a new intent and pending intent in each update of the gui Jul 21 21:34:35 yes, I know you do, but the system just reuses what was previously created Jul 21 21:34:45 ah Jul 21 21:34:46 can someone tell me why my repo upload is failing? http://pastebin.ca/1502473 Jul 21 21:35:51 the_alien: PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT) Jul 21 21:36:19 use that flag Jul 21 21:36:37 ok i'll try Jul 21 21:37:57 the_alien: it has something to do with the system caching PendingIntents Jul 21 21:38:21 herriojr: thanks, that fixed it. i knew it would be an easy thing ;) Jul 21 21:39:06 yeah, I ran into the same issue a while back, but I can't remember who told me about it Jul 21 21:40:21 i love it... added knew classes, changed nearly everything i compile and the only problem is, the widget it isn't passing correct through the extras Jul 21 21:40:24 :D Jul 21 21:40:26 is there an easy way to replace some color in a bitmap with transparency? Jul 21 21:41:48 a nested for cycle? :) Jul 21 21:42:01 not very fast, but works. Jul 21 21:44:15 aVirulence: do it in gimp or photoshop would be the best option Jul 21 21:46:15 doing it during runtime will just use up unnecessary cycles Jul 21 21:47:31 herriojr: right, however, the image is downloaded :-) but well, I guess I'll just have to do with a white background Jul 21 21:51:47 aVirulence: I'm sure there's a way to do it Jul 21 21:52:16 herriojr: yeah, well, I guess I can find out how to do it later and see how much it affects performance Jul 21 21:53:03 is it possible to have tabs within tabs Jul 21 21:53:04 ? Jul 21 21:54:09 jasongornall: I've tried using ActivityGroups within ActivityGroups, and it has a hard time handling it from what I remember Jul 21 21:54:18 as well as increasing your View stack a whole lot Jul 21 21:54:24 so it isn't suggested Jul 21 21:54:30 gotcha Jul 21 21:54:35 hmm... Jul 21 21:54:51 so it is best to sort of manually implement a tab system Jul 21 21:54:53 are you working with ActivityGroups or just Views? Jul 21 21:55:04 views Jul 21 21:55:10 actuaqlly no Jul 21 21:55:13 activitiy groups Jul 21 21:55:27 jasongornall: I'm assuming you just want more than 4 right? Jul 21 21:55:45 actually I want to click on a tab Jul 21 21:55:50 and then within that tab Jul 21 21:55:54 have sub categories Jul 21 21:55:56 aka other tabs Jul 21 21:56:08 yeah, I wouldn't recommend a TabActivity inside a TabActivity Jul 21 21:56:26 gotcha Jul 21 21:56:36 I tried to do it before and it froze Jul 21 21:56:40 it almost sounds like you just want an Expandable List Jul 21 21:56:50 ok, final question before I call it a night: is it possible to upload different versions of an application for different phone models? Jul 21 21:57:04 alright instead of tabs Jul 21 21:57:11 is there anyway to get a expandable list Jul 21 21:57:14 to go horizontal Jul 21 21:57:21 aVirulence: yes, but you can also create a universal binary by modeling the resource directory properly Jul 21 21:57:21 (yes a expandable list would be perfect) Jul 21 21:57:41 jasongornall: horizontal, not that I know of, lists can only be vertical Jul 21 21:57:47 bah Jul 21 21:57:53 you can create a custom view if you want Jul 21 21:58:03 herriojr: you mean to create different layouts/drawables for different resolutions? Jul 21 21:58:31 aVirulence: yes, and you can also determine programatically some phone model information Jul 21 21:58:43 herriojr: ok, thanks :-) Jul 21 21:59:02 I can give you a link if you'd like for the resource directory thing Jul 21 21:59:12 that would be great Jul 21 21:59:28 http://developer.android.com/guide/topics/resources/resources-i18n.html Jul 21 21:59:49 thanks Jul 21 21:59:54 you can also change the resources based on carrier, language, orientation, etc. Jul 21 22:00:23 the only problem with universal binary is that it can get bloated if you customize it too much :) Jul 21 22:01:48 they'll probably add the ability to build with certain settings at some point, so applications don't get overbloated, if they don't already have it (you can do it yourself with ant) Jul 21 22:03:08 http://pastebin.com/m45d69cb4 <-- When I call this.wait(5000), the code doesnt get to execute the pd.dismiss() part. help anyone? Jul 21 22:03:32 ^ this is part of the variable declaration of my code fyi Jul 21 22:05:53 fangus: is something interrupting it? Jul 21 22:06:08 no Jul 21 22:06:10 you should probably print something out in your catch statement, I bet you it's going in there Jul 21 22:06:20 okay ill try that and get back to you herriojr Jul 21 22:06:36 fangus: and you probably shouldn't call wait(5000) in your UI thread Jul 21 22:06:57 herriojr i ahve a separate thread for the progress dialog and the actual UI Jul 21 22:07:11 fangus: does that handler execute in the UI thread? Jul 21 22:07:30 fangus: or is it attached to another thread? Jul 21 22:07:31 herriojr: no Jul 21 22:07:37 herriojr: attached to anotehr thread Jul 21 22:07:38 ok Jul 21 22:07:44 fangus: just making sure ;) Jul 21 22:07:56 fangus, do you want to use wait or do you want to use Thread.sleep() ? :) Jul 21 22:08:53 madis i will try using thread.sleep() also Jul 21 22:09:03 ok Jul 21 22:09:13 because object.wait was meant for other purposes iirc Jul 21 22:09:41 i.e. waiting until .notify() is called Jul 21 22:12:06 hey, is it possible to make your own browser without too much effort? Jul 21 22:12:30 muk_mb: depends on how complex you want it to be Jul 21 22:12:44 muk_mb: if you just want it to display the website text, it's not very hard Jul 21 22:12:48 I want basic back/forward buttons and a close button Jul 21 22:13:21 muk_mb: why don't you just use a WebView (at least that's what I think it is called" Jul 21 22:13:25 "=) Jul 21 22:13:49 webviews will load the content, but you don't get forward/back buttons, unless there's something fancy I'm missing Jul 21 22:14:13 you can keep track of where you've been yourself, you're the one that supplies the URL to the webview Jul 21 22:14:33 if you want to reinvent the webview, it's going to take you a whole lot longer Jul 21 22:15:41 it also has goBack and goForward Jul 21 22:15:48 functions for the WebView Jul 21 22:15:59 muk_mb: http://developer.android.com/reference/android/webkit/WebView.html#goBack() Jul 21 22:16:07 herriojr madis thx for the help, i ended up solving the problem using Thread.sleep() Jul 21 22:16:25 ok, so I just throw some buttons on top of the webview? that's doable Jul 21 22:16:39 fangus: yeah, this.wait() was probably throwing an exception (probably an exception about you needing to call it in a synchronized block) Jul 21 22:16:42 fangus: great :) Jul 21 22:17:04 herriojr: yea it was throwing an exception.. whatevs, dont need to use it lol Jul 21 22:17:28 muk_mb: it's general bad practice to catch an Exception, you should actually specify the specific exception you're wanting to catch Jul 21 22:17:43 well sure Jul 21 22:17:53 sorry, taht was meant for fangus ;) Jul 21 22:18:21 muk_mb: yeah, you can throw buttons on top of it, and that should work Jul 21 22:18:32 I can't guarantee it since i haven't used it Jul 21 22:18:41 I'ma try, thanks :) Jul 21 22:29:43 someone knows how can i parse a xml file with Jul 21 22:29:43 non-English characters Jul 21 22:40:35 im a noob, go easy: http://pastebin.com/m40ca9174 - how do i pass a variable into the handler, so inside onClick I can reference the value of some other var? Jul 21 22:41:04 e.g. i have a text view that i want to update the value of inside the handler for this button Jul 21 22:41:23 but i have various text views, and only want to have this handler defined once Jul 21 22:41:53 a common trick is to figure out which button was pressed with: Jul 21 22:41:58 switch (v.getId()) { Jul 21 22:42:02 case R.id.some_button: Jul 21 22:42:03 ... Jul 21 22:42:22 but you cannot pass data to the handler. Jul 21 22:43:24 i see Jul 21 22:43:30 but if you are going to re-use it, you can't define it the way that you have done so in this snippet Jul 21 22:43:31 ok, that may work, thanks jasta Jul 21 22:43:40 yes, thats my next question Jul 21 22:43:51 how do i rdefine the handler so i can attach it to multiple buttons? Jul 21 22:43:54 do you have any experience with Java? Jul 21 22:43:57 "re"-define Jul 21 22:44:00 very little Jul 21 22:44:10 but if you give me an overview, i can google Jul 21 22:44:11 honestly, i would start with trying to learn Java in a simpler context than android. Jul 21 22:44:24 you are going to quickly become overwhelmed and unable to produce a functional, efficient app Jul 21 22:44:26 well, i used ot do java, but its been a while. it will come back Jul 21 22:44:36 its just for hobbying Jul 21 22:44:38 really, this is a serious suggestion to you. Jul 21 22:44:55 don't learn nuclear physics by trying to build your very first functioning nuclear reactor Jul 21 22:44:56 i appreciate it, but im not really interested in doing java tuts Jul 21 22:45:08 well then i refuse to help you, sorry. Jul 21 22:45:14 wow, how awesome Jul 21 22:45:23 you refuse to help yourself. Jul 21 22:45:40 i disagree, but whatever Jul 21 22:47:00 how can i switch the emulator to landscape? Jul 21 22:47:24 the_alien: 7 on the numpad Jul 21 22:47:35 and without numpad? Jul 21 22:47:36 the_alien: you have to have num lock on or off or something Jul 21 22:47:42 dunno Jul 21 22:47:57 i dont have a numpad on the macbook :/ Jul 21 22:48:01 the_alien: i only know of KEYPAD_7/9 that can do it -- gotta find some way to send those events Jul 21 22:48:49 the_alien: there is a way, just google Jul 21 22:49:07 oh wait, CTRL+F11/F12 Jul 21 22:49:09 try that. Jul 21 22:49:33 ah thanks jasta Jul 22 00:43:46 is it possible to use the dial pad to enter numbers and fill a TextField with them? Jul 22 01:42:27 anyone know where the launcher stores what apps are installed for the app tray? Jul 22 01:42:33 I have some stale icons I need to get rid of :/ Jul 22 02:10:52 warewolf: it doesn't store the list Jul 22 02:11:00 that list comes from the PackageManager Jul 22 02:13:52 oh Jul 22 02:14:03 then I need to fix someting in the package manager then **** ENDING LOGGING AT Wed Jul 22 02:59:56 2009