**** BEGIN LOGGING AT Sat Oct 06 03:00:02 2012 Oct 06 03:00:04 When the producer-containing class is regged? or the listener? Oct 06 03:01:21 <_kbulgrien> Ok, well, this was the answer: http://stackoverflow.com/questions/4249695/adt-requires-org-eclipse-wst-sse-core-0-0-0-but-it-could-not-be-found Oct 06 03:01:40 a producer is called whenever a subscriber is registered for that type. it is also called when the producer is registered and there are already existing subscriber for that typed registered Oct 06 03:02:03 it is called once for each existing subscriber in the latter case Oct 06 03:02:23 JakeWharton, ahh, that sounds far more useful. Docs don't *quite* spell that out. And now it makes sense why there can be only one producer per type per bus. Oct 06 03:03:21 yeah they should be improved. it was kind of a rush job to make the website Oct 06 03:03:47 Well, it's pretty anyway. That's really what won me over. ;-) Oct 06 03:04:00 haha, yeah it's my favorite of all the ones i've done Oct 06 03:04:31 now I need to make some richer types since I have sort of a "Result" class which carriers all types of stuff. Oct 06 03:05:35 if GPRS isn't on would that allow mms not to work? Oct 06 03:06:04 Not exactly a java question but how can i set a android:background white in the xml for a realative layout? Oct 06 03:06:32 android:background="#0000000" Oct 06 03:06:38 yeah specific types are the best Oct 06 03:06:43 it also doesn't support generics (yet) Oct 06 03:06:52 I have a branch which does code-gen rather than reflection Oct 06 03:07:13 its either #000000 or #ffffff Oct 06 03:07:15 generics are a lie Oct 06 03:07:27 typeless types Oct 06 03:07:32 it's all a sham! Oct 06 03:08:16 thanks optimusM Oct 06 03:08:30 Your welcome did it work? Oct 06 03:08:53 checking as we speak Oct 06 03:09:39 it's #ffffff Oct 06 03:09:41 yeah Oct 06 03:09:43 i think so Oct 06 03:09:49 let me try puting something into the layout Oct 06 03:09:50 or @android:color/white Oct 06 03:10:07 the #ffffff worked Oct 06 03:10:08 that Oct 06 03:10:16 #fff is easier to type Oct 06 03:10:26 can i use any hex color? Oct 06 03:10:26 use @android:color/white so you're future-proof! Oct 06 03:10:33 or android:background="@string/white" /> lol Oct 06 03:10:35 lol mrenouf Oct 06 03:10:38 yeah Oct 06 03:10:44 white might be easier Oct 06 03:10:45 lol Oct 06 03:10:49 thanks all guys! Oct 06 03:10:56 you don't want your app standing out with out-of-date white Oct 06 03:11:08 then in the string xml do string name="white">#ffffff lol Oct 06 03:11:09 techdigy: yes, any hex color works Oct 06 03:11:14 mrenouf: true true Oct 06 03:11:17 techdigy, yes. screens support many colors these days Oct 06 03:11:28 hopefully one day i will know what im doing more so i can help you too Oct 06 03:11:31 half joking Oct 06 03:11:52 im trying to get mms working for cm9 lol Oct 06 03:11:58 no optimusM Oct 06 03:12:00 obviously for white it's silly, but there are other better examples, like "textColorPrimaryInverse" which is theme sensitive Oct 06 03:12:02 do not use a string for a color Oct 06 03:12:12 i ment not string lol Oct 06 03:12:26 @color/ Oct 06 03:12:35 what the heck is "textColorPrimaryInverse"... lets stay with the basic ways of donig things... lol Oct 06 03:12:52 theme attribute references Oct 06 03:12:52 Thanks guys it worked... I'm changing it to grey though haha Oct 06 03:12:58 you'll get to that Oct 06 03:13:06 mrenouf: can it be used in the xml ? Oct 06 03:13:08 on your 3rd or 4th app Oct 06 03:13:12 dont worry about it now Oct 06 03:14:08 in a way android can be handled similar to web development, like CSS. it's no where near as simple or flexible, but the idea is the same Oct 06 03:14:40 mrenouf: Hopefully ill get to that point... I'm working hard. Oct 06 03:14:56 symbolic names are used for key colors and values, and themes provide these, and they can extend and override values of other themes Oct 06 03:15:02 i think I might have come across that... is it the styles.xml? Oct 06 03:15:11 yes Oct 06 03:15:37 mrenouf: playing around with exlipse does have benefits Oct 06 03:15:39 haha Oct 06 03:15:39 at a very basic level, you can group a bunch of values together, and assign them all with style="@style/myStyle" Oct 06 03:16:06 this can be thought of like defining a CSS class, and assigning it to an element. Oct 06 03:16:59 except there's no cascading, or wildcard matching Oct 06 03:17:17 mrenouf: wait that element what if it has some extra thing that can't be used for that specfic layout or maybe its a button or do all of theme have the same things that can be applied to it Oct 06 03:17:43 *Sorry my english isn't that great today. Oct 06 03:17:44 but you can change the style for ALL TextView by changing the attribute they all use by default. which is defined by the theme Oct 06 03:17:56 ...I am just now learning that Android supports sensing the level of pressure in a touch event Oct 06 03:18:02 and that my Nexus 7 indeed reads this Oct 06 03:18:07 I'm not aware of a single app that makes use of this Oct 06 03:18:09 Hodapp, "pressure" Oct 06 03:18:17 I see so each like type of view has its own like style Oct 06 03:18:20 it's neat, but its not really pressure Oct 06 03:18:35 mrenouf: It's working quite well for what I'm doing. Oct 06 03:18:45 it's like finger smush-factor Oct 06 03:18:53 yeah, it works well Oct 06 03:19:35 is there moz border radious in xml? Oct 06 03:19:36 techdigy, yeah that's roughly like setting a style for "P" tags, etc. Oct 06 03:19:49 techdigy, no. don't expect any simple easy stuff like that Oct 06 03:20:14 layout is totally different, it may seem very weird at first, but there is a system to it. Oct 06 03:20:31 mrenouf: what is a good reference for all the types of thigngs ican use in this system? Oct 06 03:20:32 play with the layout editor. it helps Oct 06 03:20:47 ohh I see them in the gui part Oct 06 03:20:54 in the graphical layout Oct 06 03:21:06 i can right click on it and it shows me everythign Oct 06 03:21:32 your bread & butter will be: LinearLayout and RelativeLayout. Oct 06 03:22:06 read up on "gravity" and "weights" Oct 06 03:22:32 there's a lot that's easy in Android that you really can't do simply in CSS Oct 06 03:22:39 like center an element vertically! Oct 06 03:22:59 gravity="center_vertical" <- it's that easy! Oct 06 03:23:38 can someone help me with this error please Oct 06 03:23:39 http://pastebin.com/iJxBEg2r Oct 06 03:24:24 Yeah I know a bit of gravity but the part that if i put like 80 of 100 its actually 20 percent isntead of 80 got me confused Oct 06 03:25:00 mrenouf: I was watching a pretty good tutorial series on developing for android... it might be a bit outdated but It gave me a good start. its 20 hours in total . Oct 06 03:27:03 I honestly think I can rip out this whole Executor/Callable/ListenableFuture bound service stuff, and just use an IntentService, and Bus. Oct 06 03:28:01 the only tricky part is, I need to keep track of more than "result" per activity/task Oct 06 03:28:35 Haha I wish i knew what you said in the last sentence Oct 06 03:29:06 One problem I had in my last app i tried to make is that I couldn't keep the data stored after i .finished() Oct 06 03:29:17 like when it was destroyed Oct 06 03:29:30 really speaking in generic terms. through the normal workflow of a single "use" of the app, there are requests send based on the result of previous requests. Oct 06 03:30:09 techdigy, yep. the lifecycle. you'll learn it. Oct 06 03:30:33 can one get those requests back after the memory is released? Oct 06 03:30:34 you have no control. you run when you're told. you start and stop when the user wants you too. Oct 06 03:31:00 if the system doesn't want you around any more, you will be destroyed or just killed. But there are rules. Oct 06 03:31:06 follow the rules and you'll be fine. Oct 06 03:31:23 I see Oct 06 03:32:01 use d.android.com reference section heavily Oct 06 03:32:08 there's useful diagrams of this Oct 06 03:32:14 er, flowcharts Oct 06 03:33:41 Looks like they have al ot of answers over there. Thanks mrenouf and everyone I learned a lot today from this IRC alone. When I get better I'm goign to give back to other people and help them learn too.haha Oct 06 03:33:55 What phone do you use to develop? Oct 06 03:34:05 Galaxy Nexus Oct 06 03:34:14 but it shouldn't really matter Oct 06 03:34:17 it Oct 06 03:34:41 it's helpful to have a really new one, and a moderately old one Oct 06 03:35:03 I'm using a Nexus s Oct 06 03:35:12 Im getting anew one this december... Oct 06 03:35:22 hopefully somethign new comes out Oct 06 03:35:36 that's a good phone. if you get a new phone, you can flash that back to Gingerbread for testing. Oct 06 03:35:52 for you I wouldn't worry about targeting anything earlier than that. Oct 06 03:37:02 JakeWharton, thanks, your library has made me rethink my entire app architecture :-/ Oct 06 03:50:21 JakeWharton: when adding the action view for the collapsable action item (like in the demo) unless I pass the resource id directly, the view doesn't take up the whole horizontal length of the actionbar Oct 06 03:50:32 say, if I use a layout inflater to create it Oct 06 03:50:36 and then pass that Oct 06 03:50:48 even if I set fill_parent, it is wrap_content Oct 06 03:52:02 consequentially, to get a handle to the view after it is inflated, I had to write yoyo code http://pastie.org/4919793 Oct 06 03:52:06 is it that bad or Oct 06 03:52:11 am I missing something here Oct 06 04:07:08 mrenouf: it's reduced a TON of boilerplate in both of our apps Oct 06 04:07:22 probably the single greatest addition to our code Oct 06 04:14:43 techdigy: looking at scrollback; i dont think i would have recommended going to school to learn java/android : Oct 06 04:14:54 did you have a different nick back then ? Oct 06 04:16:40 fnord`: an action item view has a max width Oct 06 04:16:55 i forget the exact number off of the top of my head Oct 06 04:16:59 it's something like 480dp Oct 06 04:18:52 JakeWharton: yeah but it's way smaller than that Oct 06 04:19:05 if you use a LayoutInflater, instead of passing the resource id Oct 06 04:19:15 it will take wrap_content space. Oct 06 04:19:20 even if you have fill_parent set. Oct 06 04:28:52 hey, I'm new in Android development Oct 06 04:29:11 and I'd like to know how to identify the MotionEvent MOVE origin Oct 06 04:29:51 is it possible? the action index is always 0 :'( Oct 06 04:39:24 Danguafer, there is a motionEvent.getSource(), I haven't found it useful for my purposes (yet), so I can't answer much in the way of details Oct 06 04:41:36 let me check it Oct 06 04:43:55 I actually wound up getting rawX/rawY and checking it against a view's getGlobalVisibleRect and calling contains on that... Oct 06 04:44:13 but my case was weird ; ) Oct 06 04:47:18 I don't know what getSource is returning :~ it's not the pointer index Oct 06 04:49:18 by pointer index, you mean the R.id of the view? Oct 06 04:50:30 nop Oct 06 04:51:05 the one that MotionEvent.getActionIndex() returns Oct 06 04:52:02 for handling multi-touch? Oct 06 04:52:22 yup! Oct 06 04:53:46 I believe that I don't need it Oct 06 04:53:56 I can run through the pointers in a loop Oct 06 04:54:37 I will test it later Oct 06 04:54:43 time to wash the dishes :p Oct 06 04:54:44 o> o/ Oct 06 04:54:47 ; ) Oct 06 04:55:13 gl, sounds like fun territory Oct 06 05:04:42 halu. my widget got kill sometimes. anyone can help? my widget code is http://pastebin.com/3HyGR3mF Oct 06 05:06:06 <_kbulgrien> Ok, supposedly have hello world app, and in eclipse I was given to understand that one had to start an AVD, but when I push start... there is no emulator that I can see. I thought starting one meant there was a screen shown that looked like an android device that my app would run in. Oct 06 05:13:13 _kbulgrien, if you haven't already, you will have to define a device (basically creating an emulator image) Oct 06 05:13:36 _kbulgrien, you can do this through various gui's... I don't use eclipse, so I would recommend 'android avd' from the cmd line Oct 06 05:14:12 you would then pick an api/screen size/etc, create the virtual device, and start it Oct 06 05:14:42 <_kbulgrien> that does nothing. Oct 06 05:14:52 <_kbulgrien> it says starting and nothing happens Oct 06 05:15:18 =/ Oct 06 05:15:48 <_kbulgrien> details says nothing execpt stuff like the name, skin, target, sd card size... Oct 06 05:16:12 like it's launching an emulator and hanging (or very slow)? Oct 06 05:16:27 or you can't launch the avd managment app Oct 06 05:16:44 <_kbulgrien> a progress bar fills while "starting"... gets full, and nothing else happens. Oct 06 05:16:57 OS? Oct 06 05:17:06 <_kbulgrien> Linux Oct 06 05:17:26 <_kbulgrien> I did android avd... made a new one, etc... pressed start... Oct 06 05:17:42 hard to say, Windows/OSX are more "uniform" and thus a little easier to debug (though I myself am a linux guy) Oct 06 05:17:57 man I gotta say working on porting android Oct 06 05:18:04 I have found the emulator painfuly slow/buggy on linux/mac Oct 06 05:18:06 it sure as hell seems like the android platform has a TON of bugs Oct 06 05:18:18 it has it's share :) Oct 06 05:18:21 gingerbread was full of bugs that caused random shit Oct 06 05:18:28 like lockups, apps crashing Oct 06 05:18:30 random reboots Oct 06 05:18:36 and then when it comes to ics, random hangs Oct 06 05:18:47 jb, random app crashes Oct 06 05:19:06 I dont know how 3rd parties like samsung etc release builds that are even remotely stable Oct 06 05:19:41 _kbulgrien, if you are just looking to get started and save this hastle for later, I would recommend dev'ing against a device Oct 06 05:19:46 probably because they get help from framewokr guys to squash bugs Oct 06 05:19:55 <_kbulgrien> it acts like one is running, but I can't see anything Oct 06 05:20:39 <_kbulgrien> I'm not sure I grok dev'ing against a device Oct 06 05:20:53 <_kbulgrien> I'm not trying to use a real device Oct 06 05:21:13 *nod*, not trying to redirect you, just checking Oct 06 05:21:38 it can be easier for new devs to "get started" with a real device Oct 06 05:21:57 anyhow, you get any console output when the emulator is launching? Oct 06 05:22:03 <_kbulgrien> oh... well, I'm not sure I know how to do that... put the apk on a device? Oct 06 05:22:27 <_kbulgrien> Is that what you mean? Oct 06 05:23:01 _kbulgrien, you have to create an AVD Oct 06 05:23:08 _kbulgrien, I am on Linux myself Oct 06 05:23:29 yeah, eclipse automates the process, but again, I don't use eclipse much... adb install my.apk Oct 06 05:24:20 _kbulgrien, if you think you created an avd, and Eclipse won't open it, try to open it apart from Eclipse, from the command line Oct 06 05:24:48 <_kbulgrien> Ologn: well if that is running Android Virtual Device Manager, I have done that. Oct 06 05:25:08 <_kbulgrien> um... ok, don't know how to do that Oct 06 05:25:15 _kbulgrien, the AVD manager is the manager of all AVD devices Oct 06 05:25:25 <_kbulgrien> I have it launched Oct 06 05:25:48 _kbulgrien, so if you have not done so already, create an AVD from the AVD manager (or from the command line) Oct 06 05:26:04 _kbulgrien, and then launch that AVD from the AVD manager (or the command line) Oct 06 05:26:08 <_kbulgrien> I did Oct 06 05:26:19 <_kbulgrien> nothing happens Oct 06 05:26:32 You have an Android emulator on screen? Oct 06 05:26:37 <_kbulgrien> no Oct 06 05:27:14 Do you have an AVD listed in the AVD manager? Oct 06 05:27:56 <_kbulgrien> ps -ef shows evidence of java running... adb fork-server server and stuff, but its all greek to me, and there is no ui showing Oct 06 05:28:39 <_kbulgrien> yes, i selected it and hit start. a progress bar fills, and it all disappears... avd manager has green check mark on the avd... Oct 06 05:28:55 Are any devices listed in the AVD manager? Under virtual devices? Like device name so and so, target 2.3 or whatever, platform 2.3 etc. Oct 06 05:29:01 common issues, vid driver, lack of ia32-libs, x-issues (vary widely)... no interesting error messages in term, dmesg, other? Oct 06 05:29:46 <_kbulgrien> heh... emulator-arm: segfault Oct 06 05:30:03 <_kbulgrien> error 4 in libGL.so Oct 06 05:32:22 <_kbulgrien> am using proprietary nvidia driver because nouveau is crap and kills my system... other opengl app works ok Oct 06 05:33:49 _kbulgrien, http://code.google.com/p/android/issues/detail?id=33897 Oct 06 05:34:02 <_kbulgrien> when you say ia32-libs... not sure what that is Oct 06 05:34:40 <_kbulgrien> yes, that is the message alright. Oct 06 05:35:21 when you run a 64bit linux, there are still alot of thigns compiled/linked for x86... ia32-libs is the bridge for this Oct 06 05:35:41 It seems to be a very Nvidia related message. Maybe the AVD does not play well with Nvidia driver in certain circumstances Oct 06 05:35:42 <_kbulgrien> am on 32-bit distribution Oct 06 05:35:56 don't mind ia32-libs then Oct 06 05:36:36 I had better luck with the NV drivers than nouveau(sp?) or that other one they use commonly now Oct 06 05:38:02 maybe there aren't 2 common OSS ones... maybe I'm just thinkig of nouveau twice.. Oct 06 05:38:30 anyway, this is obscure, prob wind up trying a bunch of random stuff till you get lucky or googling Oct 06 05:38:36 <_kbulgrien> well, i can run nv or vesa, but then it is slooow... Oct 06 05:39:22 <_kbulgrien> but nouveau is a definite no as it is inevitable that the system will freeze in not very long. Oct 06 05:40:18 <_kbulgrien> maybe I should try to set up the build env on an older install... 3.x kernel seems more flaky Oct 06 05:41:26 * _kbulgrien is disappointed... no start tonight I guess. Oct 06 05:41:36 if you have a device, it's really much better than an emulator Oct 06 05:41:51 <_kbulgrien> I do have an archos 43 Oct 06 05:41:52 and not much/any more complicated to debug/deploy to Oct 06 05:42:16 plug her in, see if you get anything in 'adb devices' Oct 06 05:43:02 common that you have to add a usb device entry for your mfgr, but the steps/id's are pretty well known/defined Oct 06 05:44:47 <_kbulgrien> nothing there Oct 06 05:45:08 http://developer.android.com/tools/device.html Oct 06 05:45:22 hrrm.. no archos listed Oct 06 05:45:51 do you have debuggin on ont he device? Oct 06 05:45:58 (could be that simple) Oct 06 05:46:20 just a checkbox in settings Oct 06 05:47:14 <_kbulgrien> USB debugging checkbox.... Oct 06 05:47:23 I don't understand how art can be relative across various types of androis, I understand there are four varients of dpi devices from low to extra high, but if I design a game for the lowest resolution, how does the scaling work, is the scaling automatic and does it apply anti aliasing, like when scaling bitmaps? Oct 06 05:47:58 <_kbulgrien> ah... list of devices shows ????????????? no permissions Oct 06 05:48:16 <_kbulgrien> so that's getting somewhere I guess Oct 06 05:48:45 you may have to kill that adb service and start one as root iirc (should make most ppl angry) Oct 06 05:49:03 by service I mean process Oct 06 05:49:20 <_kbulgrien> or put myself in the usb group? Oct 06 05:49:37 I don't recall the logic behind it, that might be it Oct 06 05:49:57 (I thought it was more than that, but it was some time ago that i last dealt with it) Oct 06 05:51:21 gutano do you know how to detect the mobile rotation? :D Oct 06 05:51:35 if you where testing the root way, it would be 'adb kill-server', followed by sudo/su/whatever, then adb start-server Oct 06 05:51:49 Danguafer, you mean query current orientation? Oct 06 05:52:31 yup Oct 06 05:52:33 _kbulgrien: I'm about to head out, but you want 'lsusb', that'll give you a line with a XXXX:XXXX for your device, take the first XXXX and use it with the udev rules step from gutano's link Oct 06 05:52:43 I mean... not the orientation Oct 06 05:52:46 but the rotation Oct 06 05:52:48 if possible Oct 06 05:52:59 that goes into the idVendor bit, you need to unplug and re-plug your device after following that link Oct 06 05:53:02 <_kbulgrien> yeah, working through the udev setup at the moment Oct 06 05:53:10 of the touch/multi-touch input, I do not Oct 06 05:53:18 I think that's abstracted... Oct 06 05:53:28 maybe look @ gesturelistener? similar? Oct 06 05:53:35 oh, awesome :D LG p705 has a buggy multitouch Oct 06 05:53:51 lemme see if I can find a lead Oct 06 05:54:48 nah, I got nothin Oct 06 06:01:03 <_kbulgrien> even running adb devices by root says no permissions Oct 06 06:02:09 weird, iirc, I would have to start the server as root, but I could deploy/everything else as my normal user Oct 06 06:02:45 <_kbulgrien> oh, ok, it probably started it as my regular user so might need to kill it off before trying as root Oct 06 06:02:53 *nod* Oct 06 06:03:17 eclipse/avd manager would have started it in any attempt to launch an emulator Oct 06 06:05:27 <_kbulgrien> ok, that worked Oct 06 06:06:01 <_kbulgrien> A43-lotsofnumbers offline Oct 06 06:06:42 unplug/replug? shouldn't say offlie Oct 06 06:08:10 <_kbulgrien> replug doesn't change anything Oct 06 06:08:49 hrrm.. well, you are close, hehe Oct 06 06:09:01 might as well try pushing something to it Oct 06 06:09:42 I assume that blocks a `adb install my.apk`, but maybe it doesn't Oct 06 06:10:50 <_kbulgrien> error: device offline -waiting for device- Oct 06 06:11:03 yeah, that's not helpful Oct 06 06:11:06 =/ Oct 06 06:11:34 http://stackoverflow.com/questions/5584976/android-device-chooser-my-device-seems-offline Oct 06 06:11:38 *shrug* Oct 06 06:14:27 <_kbulgrien> hmm... ok... i think I am plugged into a port that is on a composite device... trying to move cable to other connector... have had trouble with some usb card readers not working on front ports. Oct 06 06:15:21 <_kbulgrien> yeah, no luck Oct 06 06:18:28 I would just be shooting in the dark with idea's... perhaps googling offline device will turn up some fruitful leads Oct 06 06:18:57 <_kbulgrien> different cable no difference Oct 06 06:19:33 <_kbulgrien> yeah... imagine so... probably will bail for now, but you guys helped a lot... I was going through a book and it expected eclipse to just work... Oct 06 06:19:50 in my experience USB is all or nothing... if your see'ing offline, i'm betting adb server, perms or device restarts (along those lines) Oct 06 06:20:27 channel is more active during the day (or only sporadically at night), you'll get there soon =D Oct 06 06:20:52 it's mid-afternoon now Oct 06 06:20:58 hehe Oct 06 06:44:23 whats the setting to have the action overflow menu show on devices with a menu key? I want the 3 dots so they know there's a menu option. Oct 06 06:45:10 you can't Oct 06 06:47:57 well isn't that a bunch of phooey Oct 06 06:51:54 i used to think so Oct 06 06:51:58 but then I came to my senses Oct 06 06:52:43 why's that? Oct 06 06:52:56 if there's options, why not show the overfow? Oct 06 06:53:01 overflow Oct 06 06:53:32 because the device has a key dedicated for it Oct 06 06:53:44 and if users are upgrading from gingerbread, they are used to it Oct 06 06:53:51 and because the overflow is for action items which are rarely used Oct 06 06:54:30 oh, well i still would like it :P Oct 06 06:54:42 I'm using abs btw Oct 06 06:54:55 it's an app for a non-profit Oct 06 06:55:39 a lot of people share your desire for it Oct 06 06:55:54 and that's great! Oct 06 06:56:59 yeah i saw on g+ that you're 3rd most watched on github? that sounds pretty damn good! Oct 06 06:58:12 yeah as of yesterday Oct 06 06:58:20 and only for Java projects Oct 06 06:58:26 probably nowhere near close to the top overall Oct 06 06:58:57 nope, not even halfway to making it into the top 40 Oct 06 06:59:10 yeah but still very good Oct 06 06:59:11 does anyone know how to convert Date to a specific locale. I wish to find the local time of a particular point on the map Oct 06 06:59:13 congrats Oct 06 06:59:47 thank you Oct 06 07:01:15 any ideas! Oct 06 07:01:37 ali__, have you seen http://developer.android.com/reference/java/util/Locale.html and http://developer.android.com/reference/android/content/res/Configuration.html ? Oct 06 07:02:00 ali__: Date is mostly deprecated anyhow Oct 06 07:02:17 look around SimpleDateFormat and stuff Oct 06 07:04:37 g00s: Thanks I'll look into it, what I wanted to do is use the reverse geocoding feature of google maps and find the local time of the center of the map. What route to do think I should use? Oct 06 07:05:09 oh, heh, thats suprizingly difficult Oct 06 07:05:32 there are a few web services which will give you the tz based on location coordinates Oct 06 07:05:47 g00s: are any of them free? Oct 06 07:05:59 ignore anything deprecated in Date Oct 06 07:06:02 honestly, i can't remember. its been a while since i looked Oct 06 07:06:05 just use the methods Oct 06 07:06:29 g00s: well when I reverse geocode I get the locale of the center point Oct 06 07:06:42 just need to find a way to use that to get the local time Oct 06 07:07:15 JakeWharton: I tried that but it doesn't work it just displays the current time Oct 06 07:25:21 If I have a search function that has results that should be logically sectioned into groups, is there some api i can use to do that with a listview and cursor? Oct 06 07:27:24 ali___ what if you tested the longitude component against a range and reference the time zone? Oct 06 07:35:51 <_kbulgrien> woohoo... got it Oct 06 07:36:05 <_kbulgrien> as regular user and not even root Oct 06 07:46:45 oops nevermind, http://en.wikipedia.org/wiki/File:Standard_time_zones_of_the_world.png Oct 06 07:47:03 _kbulgrien, whoo! Oct 06 07:49:40 <_kbulgrien> yeah, www.archos.com/support/support_tech/updates_adb.html only it had a mistake on their page. Oct 06 07:50:05 <_kbulgrien> Also part of the magic was rebooting the archos Oct 06 08:00:07 I have to make multiple passes of a database (different selections) and want to compile all the results into what at least appears as one listview, is there any good examples of something like this out there? Oct 06 08:16:05 afternoon Oct 06 11:31:52 hello, how do you develop core android applications? Such as add an entry in "about the phone"? Oct 06 11:36:19 hi everybody! can anybody tell me a good way to read/write JSON files before Api level 11? The matching Android classes only work from Api level 11 Oct 06 11:37:59 could someone help me out with installing apk files on my andriod device? i know u can move it into the data/app/ folder ibelive, but cant u use a file manager to go to it and it should let me install it as well ? Oct 06 11:39:26 evident: erm, the org.json stuff has been there since API 1 Oct 06 11:39:53 Ob1-W4n: can't you just copy it to somewhere on the sd-card, access it via a File Manager and install it? Oct 06 11:40:33 thats what im asking to confirm Oct 06 11:40:37 i think i can do that Oct 06 11:40:41 asking that im correct Oct 06 11:40:51 just try it Oct 06 11:40:58 i know i gotta allow outside sources to be installed in the options too Oct 06 11:41:05 Ob1-W4n: make sure you have allowed to install apps from unknown sources... Oct 06 11:41:13 yea, well what i was gonna ask more specifically Oct 06 11:41:20 was what file manager is good to use Oct 06 11:41:29 like just flashed a new rom on a new device Oct 06 11:41:36 so i need a good free file manager anyways Oct 06 11:42:07 Leeds: hmm you're right... I guess I could work around with something like that... I just saw that the convenciences of the JSONReader and JSONWriter classes are from Api level 11... but I get I can get what I want without that convencience... ;) Oct 06 11:42:18 ES File manager Oct 06 11:45:20 hy all Oct 06 11:45:47 thx evident Oct 06 11:45:49 my android program breaks here: mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid); Oct 06 11:45:52 what is the problem? Oct 06 11:45:52 ill give es a go Oct 06 11:45:58 where can I see what is the problem? Oct 06 11:46:33 hi Oct 06 11:46:45 gregtom6: what is the exception? Oct 06 11:46:58 where can I see what is the exception? Oct 06 11:47:05 i am following android tutorial and removed all the errors but still the app is not running on my emulator. can someone please test this app in their emulator? Oct 06 11:47:08 help please Oct 06 11:47:26 java.lang.nullpointerexception Oct 06 11:47:29 hmm Oct 06 12:02:20 What LayoutParams should I use inside a ViewFlipper? Oct 06 12:02:59 (ViewFlipper is a subclass of FrameLayout) Oct 06 12:03:17 hi Oct 06 12:03:46 this is sample test app code. it do not have any errors and it runs fine. http://paste.ubuntu.com/1263681/ but it do not show any output. how can i troubleshoot it? Oct 06 12:03:47 help please? Oct 06 12:06:22 Abhijit: use @Override annotations on your overridden methods in your DownloadWebpageTask Oct 06 12:06:33 let me know if it still compiles after you add them. Oct 06 12:06:36 chances are it wont Oct 06 12:06:54 oh btw, you have a doInBackground() that does nothing but return ull Oct 06 12:07:00 null* Oct 06 12:07:26 fnord`, i see. i have taken this code from andoird tutorial on android website. can you pleaset tell me how do i make it return the result and not the null? Oct 06 12:07:29 and you didn't use the generic type syntax try: extends AsyncTask with your desired types. Oct 06 12:07:46 Abhijit: it must have come from a low-quality blog. Get a real example from the official site. Oct 06 12:08:04 fnord`, no it came from here http://developer.android.com/training/basics/network-ops/connecting.html Oct 06 12:08:28 I will be very surprised if it matches that character for character, but I will look Oct 06 12:08:55 I'm trying to draw an image in a live wallpaper i'm making. currently I'm getting the bitmap using: BitmapFactory.decodeStream(mAssetManager.open("smoke.gif")); // this works just fine with the image in /assets/smoke.gif Oct 06 12:08:55 you omittied the @Override annotations and added an extra doInBackground Oct 06 12:09:05 and the example itself is missing the type parameterization Oct 06 12:09:05 but is this the right place to put images? shouldn't images go into /drawable/... ? Oct 06 12:09:13 I can't get BitmapFactory.decodeResource() to work... my image doesn't appear in any way when I type "R.drawable." Oct 06 12:09:16 look for a better example Oct 06 12:09:21 this one is not very good, sad to say. Oct 06 12:09:23 how can I get the image "id" to pass it to the BitmapFactory.decodeResource() function ? Oct 06 12:09:54 fnord`, where can i find the better working example? Oct 06 12:10:06 checking, 1 sec Oct 06 12:10:15 ok Oct 06 12:10:28 https://github.com/commonsguy/cw-android/blob/master/Threads/Asyncer/src/com/commonsware/android/async/AsyncDemo.java Oct 06 12:10:33 you can check out the whole cw-android repo Oct 06 12:11:24 fnord`, if i add override then eclipse gives me error Oct 06 12:11:28 you don't need to call publishProgress like he does unless you want to have a progress bar type setup. The SystemClock.sleep() is for example. Oct 06 12:11:34 Abhijit: and what error is that Oct 06 12:12:27 fnord`, the method or type of (....) must override or implement supertype method Oct 06 12:12:57 async task doInBackground takes a parameterized type Oct 06 12:13:15 try (String... urls) Oct 06 12:13:19 and get urls[0] Oct 06 12:13:36 what are the parameterized types? Oct 06 12:13:42 you would have known this if you had put the there, because eclipse would have autogenerated the method stubs Oct 06 12:13:43 you mean urls is a an array? Oct 06 12:13:47 variadic function arguments, Abhijit Oct 06 12:13:48 and i should write urls[0' Oct 06 12:13:50 read about them Oct 06 12:13:55 in a java book Oct 06 12:13:55 and i should write urls[0="google.com"? Oct 06 12:14:03 ok Oct 06 12:14:17 fnord`, which is best book or resource to learn android ? Oct 06 12:14:28 you need to learn java and android from separate resources Oct 06 12:14:34 try thinking in java, its' a free book Oct 06 12:14:41 also try the oracle site, it has tutorials. Oct 06 12:14:52 yes i will try and for andoird? Oct 06 12:16:24 fnord`, please tell me andoird resource also Oct 06 12:16:55 JakeWharton or anyone else in the know about ActionBar Sherlock: I have a collapsible actionview in my *overflow* menu, and it works fine on API >= 14, but in compat mode selecting the item from the menu does not result in the view being expanded in the action bar. My first guess is that using the native gingerbread menu routes too much through the old APIs to trigger the expansion, so how can I force an ICS-style menu like when forced overflow ite Oct 06 12:16:55 m is used? Oct 06 12:16:57 commonsware.org Oct 06 12:17:14 er, .com Oct 06 12:17:33 ok Oct 06 12:17:36 the official site... books published by apress Oct 06 12:18:10 ok Oct 06 12:27:41 <92AABMDM0> hi guys Oct 06 12:29:42 <92AABMDM0> Do someone know how to find the complete code Oct 06 12:29:51 <92AABMDM0> of de DatePicker Oct 06 12:29:51 <92AABMDM0> http://cdn.imghack.se/images/220471c75a82e19bc68d1163f3a4bc10.png Oct 06 12:30:22 <92AABMDM0> I need to create a password widget using the scroll event to choose a number Oct 06 12:30:29 <92AABMDM0> thanks in advance Oct 06 12:32:43 I have an image in "res/raw/smoke.gif" and I'm trying to get it with "getResources().openRawResource(R.raw.smoke);" but I'm getting "smoke cannot be resolved or is not a field" Oct 06 12:32:53 <92AABMDM0> help pl Oct 06 12:32:55 <92AABMDM0> plz Oct 06 12:33:23 I'm assuming the image needs an id first, how do I assign it? Oct 06 12:33:31 <92AABMDM0> ? Oct 06 12:36:18 <92AABMDM0> anyone could help please? Oct 06 12:38:21 92AABMDM0 wrong import Oct 06 12:38:58 <92AABMDM0> monsti: sorry see the image on this page http://developer.android.com/guide/topics/ui/controls/pickers.html Oct 06 12:39:17 wrong android sdk version in your manifest Oct 06 12:39:36 they added/removed certain resources in specific sdks Oct 06 12:39:51 also some resources arn't public Oct 06 12:44:00 I am getting an undefined reference to error when I try to build the code from ndk-build Oct 06 12:44:34 all the things for which there is error are in the headers file Oct 06 12:58:46 hello. Pretty rookie question but: how to show EditText Element after user clicks on "Edit " item in context menu? Oct 06 13:01:50 how to drow an arrow on top of the activity, to say the user that he can swipe left-right Oct 06 13:01:52 & Oct 06 13:02:00 *draw Oct 06 13:02:32 something like "swipe here to see this" and arrow Oct 06 13:03:11 hi developers ;) Oct 06 13:04:34 stiggpwnz you mean like es file manager does when you open it up the first time? Oct 06 13:04:52 ron_frown, yep, exactly Oct 06 13:05:17 Super simple NDK question: I want to run a C program that only prints "hello" when I run it on Android and here is what I tried: https://gist.github.com/6094dce66480bdad9f67 Oct 06 13:05:28 But make says -- make: *** No rule to make target `/home/utku/Development/android-ndk-r8b/sources/cxx-stl/system/utku.c', needed by `obj/local/armeabi/objs/utku/utku.o'. Stop. Oct 06 13:05:46 I dont have a space to place a tab or viewpagerindicator, so I just want to infor the user once Oct 06 13:06:22 so he would find out additional features, and then easily access them Oct 06 13:06:46 ron_frown, any ideas on how to implement that? Oct 06 13:06:57 you could look at the source for Launcher2, it does do that on first launch Oct 06 13:07:08 if I had to guess you could just add a view to the master view overlaying the others Oct 06 13:07:18 correct alpha in the right places and I'd think t'd work Oct 06 13:07:21 but never done it myself Oct 06 13:07:42 ron_frown, thanks mate Oct 06 13:08:50 ooh they may do it with a dialog with the theme set appropriaetly Oct 06 13:09:26 hi guise, im new Oct 06 13:20:09 maybe someone know how to add the arrows on top of the screen, like on the ES file explorer? Oct 06 13:23:31 https://groups.google.com/forum/?fromgroups=#!topic/android-developers/nP-ASi0ir6Y Oct 06 13:23:32 hello. Pretty rookie question but: how to show EditText Element after user clicks on "Edit " item in context menu? Oct 06 13:23:38 a guy says he does what I just said Oct 06 13:23:42 custom dialog popup Oct 06 13:23:57 transparent bg, and overlay the hints where you want them Oct 06 13:26:13 ron_frown, thanks again, gonna try that now Oct 06 13:27:00 X-Raimo, you can show an alertdialog with edittext Oct 06 13:27:27 stiggpwnz: thanx for that. I will try Oct 06 13:28:19 <92AABMDM0> monsti: have you seen what I need? pz Oct 06 13:37:59 hi Oct 06 13:38:15 Do someone know how to find the complete code Oct 06 13:38:15 of de DatePicker Oct 06 13:38:25 I need to create a password widget using the scroll event to choose a number Oct 06 13:38:26 thanks in advance Oct 06 13:38:39 Image of the datePicker : http://developer.android.com/guide/topics/ui/controls/pickers.html Oct 06 13:39:04 in AOSP Oct 06 13:39:10 http://s.android.com/ Oct 06 13:44:14 SimonVT: thanks ;-). One other thing do you have any idea to implement this for my purpose (password chosing code) Oct 06 13:44:42 SimonVT: I mean the handling the scroll event to change numbers Oct 06 13:54:55 in my app i am launching a video that gets played in a third party video app. How can i monitor that intent so I can capture when it has finished? Oct 06 13:55:01 SimonVT: ? Oct 06 14:22:34 is it possible to define extra app themes as xml-files and have them loaded at run time, so users could download or create their own themes? Oct 06 14:23:49 hi i am getting tihs error when try to do ant debug taskdef A class needed by class com.android.ant.SignApkTask cannot be found: com.android.ant.SignApkTask Oct 06 14:23:52 help please Oct 06 14:33:29 I'm using a FilterQueryProvider to query a ContentResolver. After I perform the new query, by calling runQueryOnBackgroundThread(), the listview content does not change... Although I am sure the query is being run. My instinct is that I should call the adapter's notifyDataSetChanged() but for some reason that doesn't seem like something I should have to do. How do I get it to refresh? Oct 06 14:33:51 I'm using a SimpleCursorAdapter to bind the data to the listview. Oct 06 15:00:54 i am launching a video in an external app like MX Player or BS Player, how can I tell if that video is still playing or not? Oct 06 15:02:47 10-06 16:59:24.853: E/dalvikvm(22221): Could not find class 'com.giusdev.idd.IrcClient', referenced from method com.giusdev.idd.MainActivity.onCreate . I get this error. I started new project, just created another class and make an istance of it. same package, eclipse doesnt give error but the app wont run becouse of the ' 10-06 16:59:24.958: E/AndroidRuntime(22221): java.lang.NoClassDefFoundError: com.giusdev.idd.IrcClient ' Oct 06 15:02:48 what is the problem? I try to connect to a bluetooth mate. http://i.imgur.com/W5PWQ.png Oct 06 15:05:59 gregtom6: and for your next trick... how to post something from the log without taking a screenshot Oct 06 15:07:09 http://pastebin.com/Pefk1YAa Oct 06 15:08:55 you are posting log messages that might not even be caused by your app Oct 06 15:09:42 we need lines of your code, relevant to the problem Oct 06 15:15:10 : I don't know where is the problem in my code Oct 06 15:17:22 I need to use custom selector for my listview, but I don't want that to be used for the headerView. How can I achieve this behaviour? Oct 06 15:24:41 does including the android.intent.action.MAIN filter in an activity just mean it can/cant be launched by third party apps? Oct 06 15:26:31 eclipse is shit. it says there are errors and you have to fix it but it does not say WHERE the errors are Oct 06 15:28:44 Window->Show View->Problems Oct 06 15:29:13 The documentation for runQueryOnBackgroundThread is ill-conceived Oct 06 15:29:15 under: but this isn't says anything Oct 06 15:29:27 or I just don't understand the logcat Oct 06 15:29:29 "Is always executed on background thread" should be "Must be executed on a background thread" Oct 06 15:29:36 Or "Should be" Oct 06 15:29:48 because invoking it does not execute a background thread itself. Oct 06 15:29:56 * fnord` bashes head against wall Oct 06 15:30:23 fnord`: thanks Oct 06 15:31:02 Also "After this method returns the resulting cursor is passed to changeCursor" -> "After this method returns, you must pass the result to changeCursor()" Oct 06 15:31:21 thank god android is open source. Oct 06 15:33:21 I got crazy to understand what was the problem. If you dont put the *.jar in the libs folder, you will get ever error. Pff Oct 06 15:34:26 okay Oct 06 15:34:31 but wait -- there's more. It makes sense to just use a CursorLoader Oct 06 15:34:44 how the hell can you make a normal bluetooth-android communication? Oct 06 15:34:54 I try to do it, but I can't Oct 06 15:34:58 even from examples Oct 06 15:35:22 I've found eclipse's error reporting to be reasonable. It's typically down to line accurate, and automatic fix sometimes is even correct. Where I find eclipse to fail is in being too damn generic, for instance on OS X I have system java 1.6 and oracle's 1.7, and I have to do annoying busywork to introduce the VM to eclipse in all my workspaces after every update and then disable project-specific settings and all that sort of crazy nonsense which follow Oct 06 15:35:50 my beef with eclipse is that it's too flexible relative to what is really required (for me, at least) Oct 06 15:36:40 I really don't need to compile half my projects with java 1.6 and the rest in 1.7 and crap like that. Jeesus. Oct 06 15:37:12 namecheap rox Oct 06 15:37:33 never spammed me about the fact that they allow ns recording hosting for free Oct 06 15:37:53 sorry wrong tab Oct 06 16:01:44 If I call my Service twice will it create two services or will it just feed the service a new Intent? Oct 06 16:02:44 I'm thinking/hoping it just feeds onStartCommand a new Intent Oct 06 16:04:13 i've got 2 layouts, one for landscape and the other for portrait. when my device is being rotated between them does my activity's onCreate() function is being called? Oct 06 16:04:16 Oh good, it will. http://developer.android.com/reference/android/app/Service.html Oct 06 16:04:30 socket: yes Oct 06 16:05:07 is there a way to write 2 onCreate() functions? one for each state? Oct 06 16:05:40 socket: no I don't think that's the right idea Oct 06 16:05:58 socket: in your onCreate(), detect which orientation the device is in and do stuff accordingly Oct 06 16:06:29 maraz: that's plan b :) which api tells me the orientation? Oct 06 16:06:56 socket: http://stackoverflow.com/questions/5112118/how-to-detect-orientation-of-android-device Oct 06 16:06:59 socket: don't ask, google Oct 06 16:07:04 thanks guys Oct 06 16:07:06 everything is there Oct 06 16:11:16 where can I fiind good resource to read about writing Android.mk file Oct 06 16:25:17 If I want to pass information in one activity to another, do I use an intent with a bundle? Should I be using this a lot, or is there something wrong with my model if I'm needing to pass values in between a lot of my activities? Oct 06 16:25:33 helichopter: you can just add extras to the intent Oct 06 16:25:53 hi Oct 06 16:26:12 i am getting error taskdef A class needed by class com.android.ant.SignApkTask cannot be found: com.android.ant.SignApkTask for ant debug Oct 06 16:26:15 help please Oct 06 16:27:03 Leeds: do you mean that the extras remain after switching to a new activity? So if I switch from activity1 to activity2 with an extras instance, then switch from activity2 to activity3 (or even activity1), do I still have to use intent.putExtra()? Oct 06 16:27:53 you create an extra in A1, set it up so that it will launch A2, add extras, and startActivity() on it Oct 06 16:27:55 hi there! how can I capture the event that a package has been unistalled? Oct 06 16:28:05 in A2, you then get the extra out of the intent which launched it Oct 06 16:29:33 helichopter: http://developer.android.com/training/basics/intents/sending.html Oct 06 16:29:49 Leeds: thank you Oct 06 16:33:26 <_kbulgrien> So for some reason on my system the avd doesn't work (segfaults) and I have been able to download a hello world app to a real device from the command line. I don't know how to tell Eclipse to download the the real device. Oct 06 16:35:34 i am getting error taskdef A class needed by class com.android.ant.SignApkTask cannot be found: com.android.ant.SignApkTask for ant debug Oct 06 16:35:38 help please Oct 06 16:36:05 <_kbulgrien> Ah... Run | Run Configuratoons Oct 06 16:37:56 OMGZ. Latest ADT preview is such an improvement! Oct 06 16:38:27 Re: Layout editor -- correctly previews the entire screen, including ActionBar styling, based on theme Oct 06 16:38:46 also has pre-defined device profiles like "Nexus S" and "Nexus 7" Oct 06 16:42:18 which android http client is sufficient/best for communicating to databases on a webserver? Oct 06 16:42:26 LAMP Oct 06 16:42:35 http://android-developers.blogspot.hk/2011/09/androids-http-clients.html Oct 06 16:42:44 im on that now Leeds Oct 06 16:43:06 just wanted to make sure it wasnt outdates Oct 06 16:43:08 *outdated Oct 06 16:43:28 nope Oct 06 16:43:54 I gave you that link about 10 days ago Oct 06 16:44:39 maybe he wanted a second opinion. 10 days is not a long time to decide on such an important matters as which http client to use. Oct 06 16:44:44 it could have far-reaching ramifications. Oct 06 16:46:36 I personally do the new URL(url).openConnection(). Oct 06 16:51:00 how should an android application ask for pairing the selected device? Oct 06 16:52:53 whats wrong in this code ? StrictMode.setThreadPolicy(policy); Oct 06 16:54:15 You tell us Oct 06 16:54:45 eclipse shows errors for the dot and the word policy Oct 06 16:54:58 Then it's probably failure to java Oct 06 16:55:06 Find a tutorial, see how it works Oct 06 16:56:28 SimonVT, this is the tut http://www.vogella.com/articles/AndroidNetworking/article.html and they said to add that code Oct 06 16:57:02 I meant a tutorial on java Oct 06 16:57:06 You could be doing lots of things wrong Oct 06 16:57:08 We can Oct 06 16:57:09 t Oct 06 16:57:13 see that from a single line of code Oct 06 16:57:41 ok Oct 06 16:57:53 i just copied that three lines in my main.java Oct 06 17:08:38 i am launching a video in an external app like MX Player or BS Player, how can I tell if that video is still playing or not? Oct 06 17:10:04 dmfrey, I would guess that is app specific.. A well featured app might have a public service? Oct 06 17:11:04 how should an android application ask for pairing the selected device? Oct 06 17:12:07 gutano, is it possible monitor the state of an intent after it has been sent to startActivity or startActivityForResult? Oct 06 17:13:33 dmfrey, that doesn't so und like the right question to ask.. I expect the intent would be queried for params, I wouldn't expect there is anything to "monitor" Oct 06 17:13:55 true Oct 06 17:14:27 how do i comment lines on the XML files? Oct 06 17:14:29 there are "process monitors" out there, so there are plenty of ways to query other apps/etc state, but the functionality you are asking about sounds specific to the player Oct 06 17:14:41 socket, Oct 06 17:14:51 thanks gutano Oct 06 17:15:18 i was playing around with setting a flag, but what I notice other lifecycle events get fired a couple of times while playback is still occurring, making it unreliable to check if it playing or not Oct 06 17:18:10 Hi what is the protocol on copyright and trademarks? For instance could I call my app McDonalds even there exists no app in the play store with that exact name? Oct 06 17:19:01 gutano, the MX Player API shows it will return onActivityReturned, but need to set the package Oct 06 17:19:04 The protocol is don't violate copyright and trademarks Oct 06 17:19:16 but was trying to avoid locking into one player Oct 06 17:20:03 how can I find whether the name of my app is doing that or can the name alone not do that but the logo etc. can? Oct 06 17:21:16 dmfrey, onActivityResult? typically doesn't return until the Activity has completed.. a service or broadcast mechanism seems like what you would want, there may be some commonality in players, or something that the common underlying system libraries expose Oct 06 17:21:40 psyclopolis: here's a hint: don't name your app after a globally-famous brand, unless you're contracted with them to write an app Oct 06 17:23:25 when i set android:editable="false" im losing the cursor on the EditText, i have my own little keyboard in the app that controls the TextEdit. is there a way to get the cursor back even if it's not android:editable ? Oct 06 17:23:35 Leeds: Yes I realise that, I was simply using McDonalds as a well recognised example. But what if you haven't heard of the company and a google search produces nothing? Oct 06 17:23:52 some apps which have a tabbed layout have the tabs in the action bar right? but I can't see how to create that using the visual designer in eclipse? Oct 06 17:24:06 psyclopolis: then it's likely not a globally-famous brand... Oct 06 17:24:32 I can create a 'TabHost' but that seems to get positioned below the action bar Oct 06 17:24:37 am I missing something? Oct 06 17:24:40 marsilainen: Time to read up on the action bar api then Oct 06 17:25:08 Leeds: so I should call my app that and not worry about it? Oct 06 17:26:02 psyclopolis: as long as you're clearly not trying to pass yourself off... don't worry about it. The worst thing which will happen is that someone, somewhere, will complain, you'll change your name and move on Oct 06 17:26:08 aka "don't be a dick" Oct 06 17:26:25 is it possible to view the source code of one of android's built in apps? i guessing it's included in the sources some where Oct 06 17:26:47 Leeds: Thanks Oct 06 17:26:50 socket: which app Oct 06 17:27:01 leeds: the calculator Oct 06 17:27:02 SimonVT: OK... I was just wondering whether it was something I should expect to work in the visual designer or whether I need to do something more programatic to get that behaviour? Oct 06 17:27:18 I don't know, I don't use the visual designer Oct 06 17:28:04 OK, in the XML of the activity then? Oct 06 17:28:11 socket: try http://goo.gl/cnprj Oct 06 17:28:24 You add action bar tabs in code Oct 06 17:28:26 Read the docs Oct 06 17:28:51 Ugh this Oct 06 17:28:54 thanks Leeds Oct 06 17:29:03 socket: enjoy :) Oct 06 17:29:08 SimonVT: ok, thanks - that was the only thing I was asking... sorry for troubling you Oct 06 17:29:09 Apparently when using many threads there's a high chance of a method being accessed twice in a very short timespan, making it only register once Oct 06 17:29:14 Sooo how do I mutex in java? Oct 06 17:29:59 well, java/android Oct 06 17:30:02 Using new thread() etc Oct 06 17:30:37 Basically, I have an object that's being built in multiple threads; when each thread is done, it adds one more completion counter to the object. Oct 06 17:30:55 But apparently sometimes the add fails, I assume because two threads complete at basically the same time and try to add a counter at the same time. Oct 06 17:31:17 And that makes the big thread gets stuck on waiting for the object to finish being built Oct 06 17:31:19 get* Oct 06 17:34:30 Hmmm Oct 06 17:34:43 Would making the add counter method synchronized work? Oct 06 17:35:42 * RazielZ tries that Oct 06 17:36:24 hmmm, I've just discovered 'Drawers' - maybe those are what I actually want to use instead of having tabs Oct 06 17:37:29 marsilainen: drawers aren't really a commonly used pattern anymore...what do you have in mind, exactly? Oct 06 17:37:31 Well apparently that worked Oct 06 17:37:33 Thanks guys! <3 Oct 06 17:37:40 Hi.. I just want to know if we can get the email received to our mobile using BroadcastReceiver class? Oct 06 17:38:11 codebutler: ah ok, I'm just wondering the best way to design my app - it has a few different sections which are quite different from one another Oct 06 17:38:40 codebutler: so I had been thinking about using tabs to switch between them but then saw the drawers and wondered about using those instead Oct 06 17:39:15 What kind of sections? Oct 06 17:40:18 one section might be 'play a game' (think a game of chess or something like that) and it would need then UI for setting up the game Oct 06 17:40:26 another section might be records of old games Oct 06 17:40:27 guys, I think I've a great idea to develop but my skill cant permit me to do it well. Is there anyone that would like to work with me? PM me please Oct 06 17:40:38 another might be some tutorials Oct 06 17:40:41 marsilainen: sounds like those should be separate activities Oct 06 17:40:48 ovviously I mean an app :) Oct 06 17:40:56 marsilainen, sounds like you want different activitie- Oct 06 17:41:02 codebutler, you... you... ninja. Oct 06 17:41:09 codebutler: sure, I agree - but I still need an interface for switching between them? Oct 06 17:41:18 Well, buttons can work Oct 06 17:41:18 I thought maybe the drawer could be that interface Oct 06 17:41:21 sure Oct 06 17:41:23 well, preferences is usually in the menu Oct 06 17:41:40 so you would have a top level activity with buttons to the different sections Oct 06 17:41:49 <_kbulgrien> Ok, this is cool. I have messed with Glade/libglade. Doing UI stuff seems very similar. Color me happy. Oct 06 17:41:52 which would be separate activites? Oct 06 17:41:56 Yep Oct 06 17:42:00 And the buttons launch each activity Oct 06 17:42:01 is that the suggested way of doing this sort of thing? Oct 06 17:42:06 ok Oct 06 17:42:14 And the more-or-less hardware button Back goes, well, back to the top level one Oct 06 17:42:18 I thought that might not be in keeping with the platform some-how Oct 06 17:42:22 Well Oct 06 17:42:26 RazielZ: I recommend you read about Java Concurrency (as it is pretty much the same in DVM) Oct 06 17:42:31 It depends on how you want the design to be, really Oct 06 17:42:48 Like, mostly from a graphical/user standpoint Oct 06 17:43:15 Also, why is dp scaling so... weird? Oct 06 17:43:20 well, mostly I'd like it to fit well with the design patterns of the platform Oct 06 17:43:21 It's totally not size-safe. Oct 06 17:43:49 Well, maybe it is size-safe if the h/w ratio is exactly the same Oct 06 17:43:52 :/ Oct 06 17:44:27 Is it bad practice to just use metrics.widthPixels and heightPixels to size and position stuff? Oct 06 17:44:39 RazielZ: dp iirc is so that a 25dp square is the same physical size on all devices Oct 06 17:44:42 RazielZ: you dont usually need to position things in code.. Oct 06 17:44:59 I have lots of dynamic stuff in my app Oct 06 17:45:19 do you have an example? Oct 06 17:45:48 Well, for example, a dynamically created list of buttons in a relativeLayout in a ScrollView Oct 06 17:46:01 The list of buttons is created from a list of heroes that's parsed from the internet Oct 06 17:46:07 Along with images also downloaded from the net Oct 06 17:46:10 can you use a LinearLayout instead? Oct 06 17:46:13 Ummm Oct 06 17:46:17 or a ListView Oct 06 17:46:22 sec Oct 06 17:46:49 http://i.imgur.com/AuBt3.jpg Oct 06 17:46:54 It looks like that, scrolls up and down Oct 06 17:47:27 RazielZ: a GridView, then? Oct 06 17:47:28 I didn't really look into other kinds of layouts Oct 06 17:47:34 I'll try that Oct 06 17:47:38 RazielZ: looks like something along the lines of a grid layout... Oct 06 17:47:44 Would that be easier to sort and filter than what I have right now? Oct 06 17:48:04 yes, because you only have to change the adapter Oct 06 17:48:17 The whatnow Oct 06 17:48:19 Might be. I ended up not doing enough UI stuff on Android to remember offhand Oct 06 17:48:27 * RazielZ goes read up on grid layout Oct 06 17:48:33 RazielZ: ... you seem to be missing a bit in terms of UI stuff on android, then :) Oct 06 17:48:39 Yep. Oct 06 17:48:50 I'm pretty new at it still. Oct 06 17:49:02 And I usually improvise stuff rather than read a book. XD Oct 06 17:49:11 RazielZ: there's a lot of good stuff on d.android.com Oct 06 17:49:21 So when I saw relative layout I was like yeah that's fine, Imma just manually code my grid in that. So I did. lol Oct 06 17:49:31 p_l, yeah, there is, I use it quite a lot! Oct 06 17:49:50 but for starters, there are views that will automatically load and display stuff if provided with apropriate Adapter class Oct 06 17:51:10 Hmm Oct 06 17:51:16 RazielZ: http://developer.android.com/guide/topics/ui/layout/gridview.html <--- well, this does everything you need, apparently :) Oct 06 17:51:42 Those portraits in the screenshots aaare, well, FrameLayouts with a drawable background and a textview on top, and an onClickListener to act as a button. Oct 06 17:51:49 Will that work in gridview? XD Oct 06 17:52:45 note how the adapter is the one that passes apropriate view objects to gridview Oct 06 17:53:00 Hm Oct 06 17:53:14 Well as long as it can pass my custom pretty button thingies it should do Oct 06 17:53:40 I had to use a GridLayout as a button because I couldn't get those pretty transparent-background textviews over normal buttons. Oct 06 17:53:41 XD Oct 06 17:54:26 RazielZ: remember... when you really can't see a way to mangle the framework-provided widgets (or you create too deep layout hierarchy), you can always implement your own widget in a view :) Oct 06 17:54:43 also, do check resulting view with hierarchy viewer and some profiler tools Oct 06 17:55:02 I did when something was weird (check it) Oct 06 17:55:14 Also, how do I widget in a view Oct 06 17:55:40 Also, when I launch the activity containing all those buttons, it takes quite a few seconds until it shows up, while it's loading the images and hero names and creating the buttons. Oct 06 17:55:43 Any way to speed that up? Oct 06 17:56:18 I think so Oct 06 17:56:53 but it's getting closer to the mark where I put a price list (read: I'm grumpy enough right now that working in Java with slowass emulator doesn't enthuse me) Oct 06 17:56:58 I guess I could use threads and make the buttons show up one by one, which would speed it up for the user (in that he won't be looking at a frozen screen but at buttons popping up from nowhere) Oct 06 17:57:04 Lol Oct 06 17:57:24 RazielZ: download your data in the background using an AsyncTask or a Loader Oct 06 17:57:30 I am Oct 06 17:57:36 The data is already on the sd card Oct 06 17:57:38 but basically, download in background and do a lot of caching Oct 06 17:57:47 It just needs loaded into the activity Oct 06 17:58:05 OK, switch to using a GridView and an Activity. that will likely solve your performance problem. Oct 06 17:58:11 It's downloaded before opening that activity with the buttons, using an asynctask and a nice loading bar, and the async task uses many many threads so it's fast. Oct 06 17:58:26 It is an activity, so I guess I just have to switch relativeLayout to gridView and work with that Oct 06 17:59:36 RazielZ: probably generating all that has some slow path somewhere Oct 06 17:59:42 Hmm Oct 06 17:59:47 also, remember: When in doubt, profile Oct 06 17:59:51 then profile again Oct 06 18:00:05 I'll change it to use gridView then do a methodtracing if it's still slow Oct 06 18:01:35 So adding a search bar/filters at the top to filter the heroes displayed in the gridview shouldn't be too hard, I guess? Oct 06 18:02:06 shouldn't Oct 06 18:02:11 which hopefully does the filtering without freezing the UI for 4 more seconds. lol. Oct 06 18:02:32 Also, fun fact: the url connection handler in android crashes at around 500 or 600 threads trying to connect at the same time! Oct 06 18:02:39 around 300 is fine and really fast tho. Oct 06 18:02:48 ... you're making waaay too many threads Oct 06 18:02:53 srsly Oct 06 18:03:07 Well, I profiled, and the thing slowing everything down was actually resolving the url. Oct 06 18:03:10 That was like 50% of the real time. Oct 06 18:03:16 Soo I made threads so it can resolve more at once! Oct 06 18:03:18 ... Oct 06 18:03:24 Yeah, I bet the DNS hates me. Oct 06 18:03:25 But it works. Oct 06 18:03:26 XD Oct 06 18:03:35 consider using pipelined HTTP requests with keepalives Oct 06 18:03:53 I don't think I can since each hero has to access about 7 DIFFERENT htmls Oct 06 18:04:00 Different from every other hero as well Oct 06 18:04:31 RazielZ: not much of a problem. Also, you can separate hostname and IP resolution, lowering the latency (which is already suspect, it should have been cached) Oct 06 18:04:50 that is, you can provide URL that includes IP, after first resolving the IP Oct 06 18:04:51 Hmm, how would I do that? Oct 06 18:05:32 Also, I first tried threading each components of a hero, and it worked about 15 times faster, so then I threaded the whole hero loading so it makes a different thread for each hero, and it's even faster! :DDDD. Oct 06 18:05:45 * p_l is grumpy dev without any device allowing for sensible testing of android newer than 2.2, so... Oct 06 18:05:56 I'm limiting the big hero threads to 16 tho, each has between 7 and 11 threads... Oct 06 18:05:59 Lol Oct 06 18:06:09 I'd donate a nexus if I could Oct 06 18:06:10 XD Oct 06 18:06:10 that's crazy, android has a DNS cache. Oct 06 18:06:30 codebutler: apparently something is going wrong Oct 06 18:06:40 I'm testing on three different devices Oct 06 18:06:45 Big speedups after threading on all of them Oct 06 18:06:50 also, I've just got a DejaVu. I hate it when timeline desyncs Oct 06 18:06:50 10-15 times faster with the first 7 threads Oct 06 18:06:59 10 more times after the big threads implement Oct 06 18:07:10 Galaxy nexus, nexus 7 and galaxy s2 Oct 06 18:07:11 RazielZ: try doing DNS lookup *once*, then using resulting IP everywhere Oct 06 18:07:14 the s2 is even on a different connection Oct 06 18:07:16 Hmm Oct 06 18:07:24 what information is being downloaded? just a list of names, then a thumbnails for each, right? Oct 06 18:07:31 Well, no Oct 06 18:07:48 It's also parsing stats and skills, downloading icons for each skill (4 for each hero) Oct 06 18:09:00 but how many HTTP requests? Oct 06 18:09:54 6 or 10 depending on if the hero has a pet or not. Oct 06 18:09:55 For each hero. Oct 06 18:09:57 113 heroes right now. Oct 06 18:10:01 ... Oct 06 18:10:06 :) Oct 06 18:10:15 all images? Oct 06 18:10:29 1 is the portrait, 4 are the skill icons, 1 is the html where the stats and stuff are Oct 06 18:10:38 So only 5 are images Oct 06 18:10:44 Or 9/10 if it has a pet Oct 06 18:11:04 And, well, the first hero also downloads a big file where all the skill descriptions are stored, but only the first one does that since it contains them for all the heroes Oct 06 18:11:04 and each 'hero' has different images for these skills etc? Oct 06 18:11:06 The rest just parse it Oct 06 18:11:08 Yep Oct 06 18:13:35 Different images for everything, different stats and name and skill descriptions and all that Oct 06 18:15:05 well, it should be one request to get all the non-image data for all 'heros' Oct 06 18:15:15 then you can focus on lazy-loading images Oct 06 18:15:42 Ummm Oct 06 18:15:48 That data is also on different pages Oct 06 18:15:57 Except for the skills one, which I'm already doing in one request Oct 06 18:16:06 sure, well you should create an API Oct 06 18:16:08 a better one Oct 06 18:17:20 Well, I'm getting them from the official website. I'll look at more effective stuff in a while, but yeah XD Oct 06 18:18:16 It's also not really an API there. I'm just spider-parsing their heroes pages. Oct 06 18:18:19 write a quick web app that does all the work of sorting through the data, and then have it provide a simple single endpoint for your app to read from. Oct 06 18:18:27 Hmm Oct 06 18:18:58 That's actually a good idea. I'll keep that in mind. Oct 06 18:20:26 ok guys, give me some advice on what business to pursue - whats it out there that constitutes untapped market opportunity Oct 06 18:21:00 reuf, I have a lot of abandoned apps Oct 06 18:21:37 reuf: I want a nice android 2d cad program. Oct 06 18:22:01 reuf, this was fairly popular but I pulled it from Play https://github.com/dennis-sheil/commandergenius/tree/toytrain Oct 06 18:22:18 supporting offset cursor, where one finger moves the cursor, and you press another to turn on the pen Oct 06 18:23:04 reuf, that app from June 3rd to September 26 has 1460 active device installs Oct 06 18:23:24 Ologn: thanks Oct 06 18:23:26 im on this Oct 06 18:23:34 reuf, and I only had it in English and Spanish...if you do all the languages it does you would have more Oct 06 18:24:04 I actually have some more patches I never pushed up Oct 06 18:26:14 Here's another one https://github.com/pelya/commandergenius/tree/sdl_android/project/jni/application/jooleem_0.1.4 Oct 06 18:26:34 I think that game is OK but it never seems to take off, no one has it on Play as far as I know Oct 06 18:29:44 Does anyone know of a free android app that edits openoffice powerpoint presentation? Oct 06 18:31:27 lime_: how is that development related? Oct 06 18:38:47 Working on an android socket server thread under a service. Trying to prevent it from being destroyed after the app is closed out of. Should I prevent the app from using the onDestroy(), or is there a way to keep the service active behind the scenes without erroring? Oct 06 18:40:27 Komak57: if you call startService()... it stays running http://developer.android.com/guide/components/services.html#Lifecycle Oct 06 18:55:58 is there a limit to the number of items that can be stored in an SQLite Table, ie a limit to the number of rows? Oct 06 18:56:40 codebutler: I see... My project is bindService() rather than startService()... guess I'll read up a bit, thanks Oct 06 18:57:20 synchronized is a damn useful property to have when you want your threads to not fuck up. Just sayin! Oct 06 19:00:55 codebutler: works great, thanks! Oct 06 19:03:07 when I use android:bottomrightradious it dosen't change anything. Topright only changes it.. and it changes it all aruodn Oct 06 19:03:35 is there a simple way to make the EditText thicker? like the old dos consoles Oct 06 19:04:00 socket: the text? or edit box? Oct 06 19:05:20 the blinking cursor of the EditText Oct 06 19:10:08 can someone help me why my app is crashing with a memory problem. http://pastebin.com/e6nPZ3wh Oct 06 19:12:00 Hey there! Oct 06 19:12:51 ahh i see Oct 06 19:12:52 my image is big in size Oct 06 19:12:52 thanks anyways Oct 06 19:18:41 hello all Oct 06 19:18:57 Will this SQL Query work? http://pastebin.com/kvync87Q Oct 06 19:19:02 textView.setText(null) - its good practice? Oct 06 19:28:53 hey, any idea what kind of valut android:textDirection should get? i tried ltr/rtl and got syntax errors. google does seem to be clear on that one Oct 06 19:30:26 hi Oct 06 19:31:23 I have to colect gps cordinates and speed for 2 hours and store it in gpx.xml file Oct 06 19:31:46 can I do this while running or only on the end? Oct 06 19:31:47 codebutler: you still around? I know you were saying earlier that the 'drawer' is a dead design pattern, but I've been looking around and some places seem to think it's the future? Oct 06 19:31:55 best way for a calculator layout Oct 06 19:31:58 would be a gridlayout correct? Oct 06 19:32:05 because it would probably take quite some time to genrete that file on the end Oct 06 19:32:08 marsilainen: example? Oct 06 19:32:11 codebutler: eg. this: http://www.androiduipatterns.com/2012/06/emerging-ui-pattern-side-navigation.html Oct 06 19:32:27 oh. you don't want to use a Drawer to implement that though Oct 06 19:32:33 oh Oct 06 19:32:36 ok Oct 06 19:33:51 codebutler: the reason I'd thought that I should use a drawer for doing that was because I was reading this: http://developer.android.com/design/patterns/actionbar.html Oct 06 19:34:38 codebutler: and in the drawers section of that they have a YouTube UI that looks to be exactly like those side navigations - and which they are saying is done using drawers Oct 06 19:34:52 hello, i get 'packages/apps/Phone/src/com/android/phone/DTMFTwelveKeyDialer.java:37: package com.android.contacts does not exist' but the package does exist Oct 06 19:35:09 codebutler: so are you saying that the side-navigation design pattern is a fine pattern, but just that you don't agree that drawers is the way to implement it? Oct 06 19:35:14 all the screenshots in that blog post show the main content sliding to the right when the menu appears.. if you use a drawer, that won't happen Oct 06 19:35:35 I have mixed feels about the side navigation thing. I don't like how Google+ does it where they repurpose the "Up" button Oct 06 19:36:12 if I use a drawer then it would just slide over the top I assume? Oct 06 19:36:49 interestingly though the screenshot on the developer docs link I gave above also pushes the content to the right Oct 06 19:36:59 and they are certainly talking about using drawers there Oct 06 19:37:04 so yeah, confusing Oct 06 19:37:33 I'd love to get on with some coding, but I'm lost in sea of design patterns for now :) Oct 06 19:37:45 but would rather get it right Oct 06 19:37:55 I want to implement something sleek and modern Oct 06 19:39:37 I guess I might have to give a couple of different approaches a try and see which turns out the best... at least I'll learn a lot along the way I'm sure Oct 06 19:40:33 http://www.youtube.com/watch?v=XwGHJJYBs0Q Oct 06 19:40:35 this is a good watch Oct 06 19:40:41 if even just to get insight into some of google's choices Oct 06 19:40:46 especially re: up button Oct 06 19:41:07 they dont get into slide-out nav pattern really Oct 06 19:41:22 thanks, shall give it a watch Oct 06 20:09:13 On Android 4.x devices my app runs when not in the foreground, but on 2.x devices it pauses. How can I tell it to keep running on 2.x? Oct 06 20:11:52 Xonk, you could use some background service Oct 06 20:13:58 anyone have any experience with text direction/ BiDi ? Oct 06 20:15:28 what is the fastest way to check whether a file with some filename exists on the private internal storage? Oct 06 20:16:13 EPG - I was thinking the same thing, but was hoping there was a flag for 'keep running' or something that would allow me to accomplish this without making significant code changes. Oct 06 20:17:02 evident - I haven't tried on android specifically, but in java: File f = new File(filePath); if(f.exists()) {} Oct 06 20:17:27 Xonk: I'll try that, thank yoU! Oct 06 20:18:26 can anybody tell me why is this xmlSerializer giving me emptey string?:http://pastebin.com/kS5DFA4Q Oct 06 20:25:16 Jur - Just a guess, but shouldn't it be xmlSerializer.setOutputCharStream(writer); ? Oct 06 20:27:18 i had this as an example http://xjaphx.wordpress.com/2011/10/27/android-xml-adventure-create-write-xml-data/ Oct 06 20:29:00 im getting this error when trying to set textDirection/layoutDirection: error: No resource identifier found for attribute 'textDirection' in package 'android' ; were those attribute deprecated? Oct 06 20:30:43 Xonk you mean instead of xmlSerializer.setOutput(writer);? Oct 06 20:45:26 does anyone know what native library `native_get` in SystemProperties.java is defined in? Oct 06 20:46:58 it just says ' private static native String native_get(String key, String def);' Oct 06 20:47:18 enth Oct 06 20:47:23 see what native lib is being loaded Oct 06 20:47:27 then look at the source for it Oct 06 20:48:19 Jug6ernaut: I'm trying to find that native library Oct 06 20:49:13 derp Oct 06 20:49:32 lol Oct 06 20:49:50 derp Oct 06 20:50:21 Jug6ernaut: I'm trying to find that native library, but there is no System.loadLibrary('...') in the source file where native_get is defined Oct 06 20:50:40 look in superclass Oct 06 20:54:22 Jug6ernaut: okthanks! Oct 06 20:59:11 What's going on? Oct 06 20:59:43 yo Oct 06 20:59:45 cakejetski: I'm trying to find the library that `native_get` in SystemProperties is implemented in Oct 06 21:00:06 What are you trying to work on? Oct 06 21:01:31 I'm trying to modify the android source so that it looks like the SD card is always inserted Oct 06 21:01:48 wooo, just finished a 24h game jam. we used plain android. crazy :) Oct 06 21:02:18 I just picked up a GS3, I'm digging it so far. Oct 06 21:02:18 /sdcard is automatically mounted as a vold object, is bound to /media Oct 06 21:02:55 but EXTERNAL_STORAGE_STATE environmental var also needs to be set to something that would indicate the card is inserted Oct 06 21:03:23 If the card isn't inserted, that environmental var isn't set Oct 06 21:06:52 hello Oct 06 21:07:59 Hi guys. I want to start development on Android and I have a Samsung GNex. I was wondering if I can develop in linux and fully test my app on my Gnex? Oct 06 21:08:07 yes Oct 06 21:08:27 I mean all the drivers work and are available for linux? Oct 06 21:08:35 Linux doesn't need any, but yes Oct 06 21:08:39 i am new to android development, and followed the guide on developer.android.com. when i got to click "run" to run a new project in an emulator, i got an error about main_activity.out.xml missing content. What went wrong? :$ Oct 06 21:08:53 the full android tools + emulator + etc are available for Linux Oct 06 21:09:19 (i recommend using the x86 emu for testing, if you decide to use an emulator to speed up development) Oct 06 21:09:29 rather than the ARM one, which is stupidly slow ;) Oct 06 21:10:09 zinx: I can only use my gnex directly (in usb debugging mode) instead of the emulator right? Oct 06 21:10:29 alund: it is a bit weird that it is called .out.xml, but still... what content is missing exactly? there should be a clear message in the eclipse console Oct 06 21:10:38 heladocaliente: you can do that, yes Oct 06 21:11:05 heladocaliente: some distributions require extra setup so that the usb device has permissions your user can access (or you can just run the adb server as root, but i don't recommend that) Oct 06 21:11:10 zinx: I started installed the sdk tools and it said that the x86 emulator wasnt available for linux I think. Oct 06 21:11:14 heladocaliente: other than that, it's pretty straightforward Oct 06 21:11:17 zinx: for intel* Oct 06 21:11:20 heladocaliente: it should be Oct 06 21:11:51 alegen: that file is created when clicking the run button, i do not know what is supposed to be in it. The message asks me to at least add a layout. Oct 06 21:12:06 maybe using eclipse 4.2 is wrong? Oct 06 21:12:42 whats wrong with eclipse 4.2 ? Oct 06 21:12:51 zinx: wow nice. Thats good ;) What about using directly the cell instead of the emulator. Which one do you prefer? The x86 emulator is fast enough for testing? Do you really get the touch 'feel' with the mouse? Oct 06 21:13:30 alund: no, eclipse version doesn`t matter... did you create a new android application porject ? Oct 06 21:13:50 alund: that is the exact name of what you should have selected Oct 06 21:13:54 you don't really get touch feel with mouse on a real device (nexus 7) Oct 06 21:13:54 alegen: yes, with default values, and a blank activity Oct 06 21:13:56 heladocaliente: the x86 emu is fast enough, but you can't use it to test everything properly (sensors, etc) Oct 06 21:14:12 heladocaliente: so you do need to use a real device sometimes - and you might find using a real device to be snappy enough anyway Oct 06 21:14:28 heladocaliente: there's a bit of a delay (depending on size of your app) uploading it to the phone Oct 06 21:14:31 i need to perform a complex animation within a view, one that cannot be done by changing view properties. what i've tried is running a recurring task (using TimerTask) that draws a new picture every 50ms, and then invalidates the area of the view where it drew itself. however, this is creating numerous problems, and it seems like android probably made a better way to do this sort of thing. what else could i try? Oct 06 21:15:03 zinx: It uploads the app and then I run it like any other app I purchase on the play store right? Oct 06 21:15:05 heladocaliente: also, the emulator allows you to choose different layouts and such Oct 06 21:15:09 heladocaliente: yup Oct 06 21:15:25 heladocaliente: it'll actually start it for you by default too Oct 06 21:15:39 zinx: Seems pretty straightfoward to me.. No need to have MACOS installed :P Oct 06 21:15:43 heladocaliente: (after which you can still run it again via launcher - it's installed until you uninstall it) Oct 06 21:16:02 heladocaliente: correct :) though do note you can also develop them on Windows or MacOS if you so desire :) Oct 06 21:16:13 heladocaliente: Google's not quite as exclusive as Apple :) Oct 06 21:17:00 zinx: Do you use Java for programming or other native like C++ ? I talked with a game dev... he said their company uses C++ for games (obviously faster) but I was wondering for simple apps, is it worth it? Or Im better off with Java? Oct 06 21:17:08 zinx: I suspect that the iOS emulator wouldn't work without OSX anyway... by virtue of it running the apps as normal OSX applications Oct 06 21:17:22 alund: for the sake of simplicity... copy paste what this http://pastebin.com/XYRqN98P into that file Oct 06 21:17:24 heladocaliente: also, you don't need any sort of developer account to make apps or distribute them yourself, but you do need a one-time-fee $25 google dev account to distribute them via Google Play specificly (i dunno what Amazon's thing costs) Oct 06 21:17:32 heladocaliente: most of the time, use java. Unless you know what you're doing, going with NDK can be bad idea Oct 06 21:17:55 heladocaliente: use Java unless you really need a lot of speed in tight loops and such (like for intensive games) Oct 06 21:18:05 alund: though that should not happen normally... you should get a default activty which already includes layout tags Oct 06 21:18:07 p_l: so when I test some apps and they are slow... its not java...but the programmer's fault? Oct 06 21:18:08 heladocaliente: simpler games can be done in Java Oct 06 21:18:13 heladocaliente: usually Oct 06 21:18:23 alegen: my console output: http://paste.kde.org/563630 Oct 06 21:18:24 heladocaliente: yeah Oct 06 21:18:35 heladocaliente: there's a lot of stuff that can make something slow (including an old-ass phone) Oct 06 21:18:41 I dont need intensive loops or anything like that.. so Ill go with Java. Oct 06 21:18:48 heladocaliente: yeah, that is a good plan Oct 06 21:19:19 zinx: Any book, video or good tutorial to start with? I want to start it the right way and using the good tools. Oct 06 21:19:33 http://coding.abel.nu/2012/06/programmer-time-translation-table/ heh Oct 06 21:19:33 heladocaliente: developer.android.com has some really good tutorials these days Oct 06 21:19:39 heladocaliente: better than most books Oct 06 21:19:49 alund: copy the stuff from my to activity_main.xml and delete that out.xml file, i honestly don't understand why it keeps appearing Oct 06 21:20:28 heladocaliente: if you've done java/c++ development in the past, be sure to read about the activity lifecycle and such - android handles applications a lot different from a normal computer OS Oct 06 21:22:04 hey everyone, i want to ask, if iam doing a layout in landscape mode, do i JUST need to separate the portrait Layout and the landscape layout ? or i need also write into code some IF s ?? Oct 06 21:22:13 zinx: Thanks ;) Oct 06 21:22:31 alegen: i just gets much more errors Oct 06 21:22:42 something in my setup must be wrong :( Oct 06 21:22:53 WallnPall: if you need a different layout (a lot of times you don't), you can put the landscape one in layout-land Oct 06 21:22:57 WallnPall: instead of layout/ Oct 06 21:23:12 it create an .out.xml file again, and found it insufficient :\ Oct 06 21:23:17 WallnPall: you shouldn't need any ifs if you do that Oct 06 21:23:17 alund: probably, yes... a new "Android Application Project" should work out of the box Oct 06 21:23:31 alund: the out.xml should not be there Oct 06 21:24:16 i give up Oct 06 21:24:37 alund: switch to a .java file and then run, eclipse is trying to compile your XML Oct 06 21:25:03 doc_savage: what .java file? Oct 06 21:25:07 any in your project Oct 06 21:25:19 ok then Oct 06 21:25:22 (sorry I haven't read all the way back up, only your last few messages) Oct 06 21:25:30 i try and start eclipse again Oct 06 21:25:33 alund: actually seems to be some kind of problem with eclipse and ADT... read this too http://stackoverflow.com/questions/2393103/android-sdk-main-out-xml-parsing-error Oct 06 21:26:07 you may also need to delete the .out.xml files, they may break the actual compile process Oct 06 21:27:04 thank you very muc Oct 06 21:27:27 doc_savage: he does but they keep reappearing Oct 06 21:28:48 alegen: it should be ok so long as he runs from a .java file, if you have an XML file in focus, eclipse goes screwy Oct 06 21:29:20 there is an option for this somewhere (apparently) but I've just gotten into the habbit of switching to a .java file before running Oct 06 21:29:26 "your project contains errors, please fix them before running" :0 Oct 06 21:29:37 ah yes... i remember that part now Oct 06 21:30:12 how can i delete the project? Oct 06 21:30:42 right click -> delete, and check the box if you want to remove from hard drive Oct 06 21:31:26 alund: when you press run, make sure you have a java source file selected and not the xml Oct 06 21:31:48 ok,i try over Oct 06 21:36:07 "the connection to adb is down. you must restart adb and eclipse" :0 Oct 06 21:36:14 fun :$ Oct 06 21:36:37 starting eclipse takes about a minute... Oct 06 21:36:41 alund: you seem to be having fun :) adb kill-server; adb start-server to restart adb Oct 06 21:38:09 adb-related problems do sometimes slow eclipse down Oct 06 21:38:18 apparently the ADT plugin does something naughty at init time Oct 06 21:38:41 I'm on SSD so if eclipse isn't up in < 10 seconds I know something is wrong Oct 06 21:39:43 doc_savage: i didn't even know it was something that would be running... Oct 06 21:40:10 will it stop when i quit eclipse? Oct 06 21:43:58 alund: adb kill-server Oct 06 21:47:53 Is there a way to instantiate an activity without actually launching it with an intent? I want to launch a 3rd party class that extends Activity in a new thread. Oct 06 21:50:18 what are you trying to do? Oct 06 21:51:05 hi, I have an activity and inside that activity I defined a fragment: public static class TimePickerFragment extends DialogFragment implements TimePickerDialog.OnTimeSetListener {...} Inside that fragment I defined and interface to comunicate the fragement dialog with the parent activity. The problem is that in the parent activity I can't implement that interface. Any one can help me? Oct 06 21:52:53 at least it now seems to be running, but there is no visual sight of that emulator yet... i must try to get it to recognize my phone. Oct 06 21:55:22 thanks for the help. i give it up for today :\ Oct 06 21:58:29 alund: did you try adb kill-server Oct 06 22:00:07 Hi guys,tell me please, what is the best library for aplying my own 2d graphics ..just some basic stuff Oct 06 22:00:15 its not for game, its for App Oct 06 22:10:16 hi, I have an activity and inside that activity I defined a fragment: public static class TimePickerFragment extends DialogFragment implements TimePickerDialog.OnTimeSetListener {...} Inside that fragment I defined and interface to comunicate the fragement dialog with the parent activity. The problem is that in the parent activity I can't implement that interface. Any one can help me? Oct 06 22:11:25 why can't you implement the interface in parent activity? Oct 06 22:11:52 I don't know, it says that it doesn't exists Oct 06 22:12:08 (the interface) Oct 06 22:12:25 so you have something like 'public class fooACtivity implements TimePickerFragment.SomeInterface' ? Oct 06 22:12:25 but if I try to implement it to another activity the interface does exists Oct 06 22:12:54 maybe try making the interface public if you did not declare it that way Oct 06 22:13:21 also make the fragment public Oct 06 22:13:59 I'm not sure you can implement an interface of your own inner class... at all? I know you can extract that interface to it's own file/class(not class) Oct 06 22:14:14 I think the interface is never inner Oct 06 22:14:29 what sense would it make? the interface has by definition no implementation Oct 06 22:14:34 so there's nothing to store the outer context in Oct 06 22:14:44 yeah, my brain recursed in on itself thinking about his description ; ) Oct 06 22:14:44 I have this: public class NuevaOfertaActivity extends SherlockFragmentActivity implements TimePickerFragment.IOnHourSelectedListener { //code .. public static class TimePickerFragment extends DialogFragment implements TimePickerDialog.OnTimeSetListener { public interface IOnHourSelectedListener {}}} Oct 06 22:15:15 kulas: hmm. I think that should work Oct 06 22:15:24 I mean, it looks valid to me Oct 06 22:16:21 what exactly is the error generated by eclipse or something? Oct 06 22:16:31 it gives me a error :( Oct 06 22:16:40 yes, what error Oct 06 22:17:06 "Type Syntax error on token "implements", InterfaceType expected after this token NuevaOfertaActivity.java" Oct 06 22:17:26 hmm... check out that your imports have not something broken in them Oct 06 22:17:26 "Type Syntax error on token "implements", InterfaceType expected after this token" ***** Oct 06 22:17:36 expand them from the + if you have them collapsed Oct 06 22:17:57 I can't see where that is a syntax error Oct 06 22:18:05 public class X extends Y implements Z is normal java Oct 06 22:18:17 imports look ok Oct 06 22:18:26 no, his inner class contains the interface definition Oct 06 22:18:36 where is the token 'NuevaOfertaActivity.java' ? Oct 06 22:18:44 But if I try to implement that interface from another activity it works Oct 06 22:18:49 I'm trying to get my service to create a custom dialog that will pop up while the program isn't active. This is running in a thread. Which context should I grab? None of the tutorials seem to work? Oct 06 22:19:08 kulas, take your interface, put it into it's own file... watch it work, go from there Oct 06 22:19:37 Honestly there should not be a problem with the interface being declared in the same file Oct 06 22:19:48 no, but it's inside his inner class Oct 06 22:19:53 if that indeed is the case. It looks like it is -- sort of messy style imho -- but it shouldn't be a problem Oct 06 22:19:54 gutano: I will try that. But in my fragmentdialog I implement that interface? Oct 06 22:19:57 I'm trying not to complicate it Oct 06 22:20:03 but yes, it can be in the same file Oct 06 22:20:07 just not inside, the inside Oct 06 22:20:33 gutano: seriously? there is a problem at declaring an interface if nested multiple layers deep? I don't see why. Oct 06 22:20:47 in any case the java compiler should generate Foo$Bar$ISomething.class file out of it Oct 06 22:20:59 and as long as you access it as Foo.Bar.ISomething it should be alright Oct 06 22:21:22 or inside Foo, just Bar.ISomething should suffice Oct 06 22:22:20 also the syntax error about that NuevaOfertaActivity.java interests me. Oct 06 22:22:46 It is the system's actual reported error, after all. And nothing we see so far explains why the java source file contains something like "Foo.java" as token. Oct 06 22:24:06 alankila, his stuff isn't working.. I'm not trying to debate the deep intricicies of java atm, I'm trying to help this chap Oct 06 22:24:31 okay, but I just don't think your suggestion will help, that's all Oct 06 22:24:58 alankila, make a sample class that proves your point, pastebin Oct 06 22:25:13 should take all of 2 mins Oct 06 22:26:00 I'm casually reading irc on the side, I see something suspicious, but I'm not up for researching Oct 06 22:27:40 looks like you can't declare interfaces in the same file that you will use them. Oct 06 22:27:52 more specifically, you have to declare names in advance before use Oct 06 22:28:15 public class X implements SomeInterface { public interface SomeInterface {} } will not compile Oct 06 22:28:26 because at the time java encounters SomeInterface the first time it isn't declared yet Oct 06 22:28:45 that was my hunch, but I wasn't ready to make a confident statement Oct 06 22:29:00 but the specific error is not a syntax error but a complaint that "Cannot find symbol" Oct 06 22:29:08 so the error in this specific case is something else Oct 06 22:29:12 or that's what I think. Oct 06 22:29:45 anyway, a transformation to 'interface SomeInterface {}' before the public class will make it work, of course, as would moving it to separate compilation unit Oct 06 22:30:07 +1 Oct 06 22:30:47 I'm still kinda disappointed by the result. Java could make even this case work, there is no principal reason why you couldn't work it out Oct 06 22:31:59 you could parse the whole file first, note the mentioned names, then resolve them. resolving on sight is not done with other things Oct 06 22:32:13 for instance you can call a method in a java class that hasn't been introduced yet, but will be introduced later Oct 06 22:32:33 these things are often done for deep reasons that the casual programmer (us) has not considered Oct 06 22:32:52 or for sake of laziness. The practical utility of being able to do this is quite low. Oct 06 22:33:19 and I understand it complicates compiling. Oct 06 22:36:25 anyway, a good reason to not use static inner classes so much, I suppose. Oct 06 22:38:18 they use static classes in the android tuts, without suggesting they are inner classes, that threw me for a loop Oct 06 22:39:42 eclipse compiler generates better errors: it doesn't say just that the type can't be found but that the type can't implement its own member types Oct 06 22:39:53 so it knows full well it exists, merely disallows it Oct 06 22:42:16 hehe, http://developer.android.com/guide/components/fragments.html#UI Oct 06 22:43:43 this does work (if it's an inner class) Oct 06 22:44:07 indeed, as android can't construct the fragment Oct 06 22:45:02 the default constructor will not be there, and instead there is a constructor that requires an instance of the outer class, which android doesn't know how to call Oct 06 22:45:36 oh wait I read your words wrong. I mean, it does work, as long as it's static. My words were for the case it's not static Oct 06 22:45:57 I guess you have to know the Foo$Bar naming in the XML... maybe. Oct 06 22:46:02 it does not work (java or android) as the only/base class in a file Oct 06 22:47:21 I think I really don't enjoy the mess that has been created of the inner/outer classes. They are useful, but damn, why did they go with Foo$Bar like naming for them on disk Oct 06 22:48:05 you sometimes have to know it, as some dynamic systems actually open class files from disk and if you have one of them, the distinction between Foo.Bar and Foo$Bar.class is there Oct 06 22:48:58 it would be much simpler if it just made directory called Foo and stored a file called Bar.class there. That would be fairly consistent, the idea that . are translated to path separators and then .class appended Oct 06 22:49:48 hrrm.. but that would confuse the package directory structure Oct 06 22:49:55 is it an inner class or nested package Oct 06 22:49:57 also the naming of anonymous classes could be improved slightly. I once had a class with something like 160 anonymous classes (don't ask) and when you have error in Foo$123 it's really hard to discover which one it was Oct 06 22:50:09 lol Oct 06 22:50:31 obviously it's the 123rd inner class, so happy counting :-p Oct 06 22:50:44 I have found that ppl often have good reasons for doing weird sh!t Oct 06 22:50:58 and even more often, they don't, lol Oct 06 22:51:07 it was port of C++ codebase. C++ used function pointers, java uses ... anonymous inner classes. Oct 06 22:52:15 perfectly logical translation of the original idea, but way more verbose. Oct 06 22:54:00 these days I'd probably have reverse compiled the file but I was a java noob so I didn't know of that Oct 06 22:54:14 or ran the program with debug link where it enters debugger on exception Oct 06 22:54:22 oh well. *sigh* Oct 06 22:54:42 it's been fun, but... dinner! Oct 06 23:10:49 I created an empty Activity class for the popup, but it calls a blank background, displaying the activity in front. Is there any way to create and show a dialog from a Service that appears on top of any active window? (like GO SMS and imo)? I can't find the proper google terms, or documentation... Oct 06 23:12:01 alankila and gutano, I put the interface in a another file and it worked. Thanks for our help! Oct 06 23:12:09 your * Oct 06 23:12:20 ^^ Oct 06 23:12:32 kulas: yeah odd thing, why was the error a syntax error? it should not have been Oct 06 23:13:58 alankila: I don't know why it gave me a syntax error ... weird Oct 06 23:14:11 Any other attempts at a dialog (without an activity class to run from) pulls "Unable to add window — token null is not for an application" Oct 06 23:16:07 source snippet: http://pastebin.com/JkJrdsFm Oct 06 23:17:21 bleh, wrong button Oct 06 23:22:47 Any CM users in here? Oct 06 23:22:57 Running on a non-S3 Oct 06 23:25:49 me Oct 06 23:26:03 gorudonu: Does your installation fancy an FM radio? Oct 06 23:26:12 I dont use radio Oct 06 23:26:27 gorudonu: I understand, but does it come with one? Oct 06 23:26:43 no Oct 06 23:26:55 Okay Oct 06 23:26:58 What device, if I may ask? Oct 06 23:27:09 zte blade - android 4.1.1 Oct 06 23:27:26 Alright Oct 06 23:27:35 pretty old Oct 07 00:19:42 if im creating some sort of asteriks/pbx softphone which connect to the layer between asteriks and my app and sends and receives messages in json format and i need to make it possible for call conferencing, chat, etc to be in place - what sort of patterns should be followed for establishing, streaming etc? Oct 07 00:50:56 hey guys i need a hand here, here is my question --> http://paste.ubuntu.com/1264863/ Oct 07 00:51:09 when I do "run as", eclipse isn't prompting for my emulator.. Oct 07 00:51:44 then I do it again and it shows two Launching entries, one of them is blocked with (... "Building workspace" to complete) Oct 07 00:53:55 I'm testing a normal app and a phonegap/cordova version. I just tried the cordova version to which I just added jquery-mobile .. maybe that caused it. Oct 07 00:54:07 I can't even cancel it.. it's sitting there with "Cancel Requested" Oct 07 00:56:23 restart adb? Oct 07 00:58:21 okay.. killed adb and that dialog went away.. Oct 07 00:58:27 (restart of eclipse was pending on that too) Oct 07 00:58:56 I recently updated my motherboard bios and some drivers (but not all) -- is it possible some USB thing is stopping adb from working? Oct 07 01:00:38 there we go.. it was also just sitting there when I restarted eclipse and tried again, but just now the emulator popped up Oct 07 01:05:01 http://stackoverflow.com/questions/12765192/appwidget-does-not-finish-updating-when-adding-it-for-the-first-time Oct 07 01:17:36 wait what # is for custom roms Oct 07 01:18:24 #android-root Oct 07 01:35:21 morning all Oct 07 01:59:26 Wow ... the service is rather persistant, isn't it XDD Have some bugs i'm trying to work out =.= (venting) Thread not closing with boolean running attached to any while loops... bleh >_> Oct 07 02:37:27 Hi. I got issue with widget sometimes auto kill. I've done onReceive but to no avail. Any sample/suggestion is highly appreciate. Oct 07 02:43:57 freeone3000: Any sample that I can follow? Oct 07 02:57:51 I'm using a custom list selector drawable for my list view. Is it possible to use a custom selector for the headerView? **** ENDING LOGGING AT Sun Oct 07 02:59:58 2012