**** BEGIN LOGGING AT Mon Oct 01 03:00:00 2012 Oct 01 03:08:39 a screen is called an "activity" right? Oct 01 03:09:06 manavan whats your day job? Oct 01 03:09:21 You would probaly love developin for windows phone more Oct 01 03:49:52 ok i have an editText, when the user enters text in it, i want to store that text in a string, how can i do this? Oct 01 03:50:38 (i want to store that text) and move into another activity Oct 01 03:50:52 panegyric: what methods have you tried? what docs did you read? what examples did you find of how to do that when you searched? Oct 01 03:51:09 i dont know how to do it Oct 01 03:51:12 stop asking me Oct 01 03:51:15 and help if you can Oct 01 03:51:18 youre so annoying Oct 01 03:51:20 you don't know how to use Google? Oct 01 03:51:21 would i be asking you Oct 01 03:51:25 if i knew how to find the answer Oct 01 03:51:31 find something to do Oct 01 03:51:38 if someone wants to help Oct 01 03:51:41 let them help Oct 01 03:52:16 i was gonna give a similar answer Oct 01 03:52:27 it's easy Oct 01 03:52:42 i know editTextName.getText.toString() Oct 01 03:52:55 thats it! Oct 01 03:53:16 but where exactly do i place it (that code) so that i get it only after the user is done entering it Oct 01 03:53:34 there is nothing on the activity except that editText Oct 01 03:54:12 depends on when 'done' is Oct 01 03:54:33 when the user enters 'done' on his touch keyboard or he presses 'enter' Oct 01 03:54:45 (after typing somehting of course) Oct 01 03:55:13 find the name of an event that you will count as 'done' and put the code there Oct 01 03:55:39 it could be after the box loses focus, after each character is entered, etc. Oct 01 03:55:43 how do i look for that exactly? Oct 01 03:55:44 what, events??? what are they? Oct 01 03:56:00 i know what events are Oct 01 03:56:06 but how do i look for a list of eevents Oct 01 03:56:06 panegyric: have you *at least* gone through the tutorial enough times to understand it? Oct 01 03:56:32 sorry Leeds i blocked you Oct 01 03:56:43 cool Oct 01 03:56:55 lol Oct 01 03:57:13 google/stackoverflow would be faster Oct 01 03:57:22 a lobotomy would be faster at this rate Oct 01 03:58:17 haha Oct 01 04:09:06 Only an idiot tells an op that they blocked/ignored them. Oct 01 04:09:38 Bryden: I think we have already ascertained the first part of that :) Oct 01 04:10:05 Heh. Oct 01 04:12:03 are there any free ad services? i'm doing an app for a non-profit and they want ads from their sponsors Oct 01 04:12:31 that's kind of an oxymoron but ya never know Oct 01 04:13:12 Are they a 501c3? Oct 01 04:13:25 not sure, possibly Oct 01 04:13:34 it's legit Oct 01 04:13:46 That means the IRS won't charge them tax for donations, basically. Oct 01 04:26:36 the stock camera app is using a flag android.views.WindowManager.LayoutParams.PREVENT_POWER_KEY, but none of the API docs mention it and it doesn't seem to be exposed from the JAR Oct 01 04:26:46 are there internal-only flags? Oct 01 04:28:13 no reason why there can't be Oct 01 04:29:19 flags are easy - they're just constants... find it in the source and replace or declare it Oct 01 04:30:20 or just comment it out, at least for now Oct 01 05:13:55 Hey guys. Have a ... question. I have an activity (the FingerPaint API example) that opens up and basically doesn't use any XML layout file like all my other activities. It has no layout/header in other words. Works fine, but I'd like to understand how this operates better (extending activities, and setting layout) because I want to just include an XML layout header at the top of this Oct 01 05:13:55 bland canvas. The FingerPaint.java is saying: v = new dView(this); and setting the content view of that "v". Is there a way to set the content view of my "canvas.xml" layout, and then incorporate this FingerPaint.java activity into that layout? Oct 01 05:14:22 If anyone knows of a tutorial for this exact stuff, I'd be more than happy to go learn about it. Oct 01 05:17:02 In simpler terms, FingerPaint.java = full blank screen I can draw on. I just want to put my app's "xml" layout (the header I'm using for the top of each screen) on top of this big blank mess. Oct 01 05:18:39 you would have an xml layout defined with your header at the top, and the SurfaceView you implemented below Oct 01 05:18:51 give me a moment and ill pastbin an example Oct 01 05:18:56 pastebin* Oct 01 05:20:03 Leeds why did you kick me out before, you have a huge ego...All i care about keeping this a civil community Oct 01 05:20:22 sampullman: Thanks I certainly appreciate it. Oct 01 05:22:04 pierpark: http://pastebin.com/XUDVYrZb Oct 01 05:22:26 it's not exactly what you'll need, but should be close enough to figure it out Oct 01 05:22:53 the result of that layout is my custom SurfaceView with 4 buttons overlayed on the bottom Oct 01 05:23:24 sampullman: Thanks I'll go take a look and get back to you. I appreciate it. Oct 01 05:23:27 you probably want a linear layout (with two items) Oct 01 05:23:36 here's a good place to read about layouts: http://developer.android.com/guide/topics/ui/declaring-layout.html Oct 01 05:27:21 I think I'm getting the idea here and if so, I'll be one happy person. I'm going to go take a look at the dev link and then try to somehow figure this out mixed with the sample you sent. Thanks a lot! Be back here in a bit. Oct 01 05:28:37 Getting the idea thanks to your example* Oct 01 05:29:37 no problem Oct 01 06:00:32 sampullman: you still around? Oct 01 06:00:44 yeah Oct 01 06:00:47 http://pastebin.com/yvGuV2qt Oct 01 06:01:18 I modified that XML file to include com.my.package.FingerPaint but I'm getting this "cannot instansiate" fun Oct 01 06:02:22 i think the view you want to include is com.my.package.dView, no? Oct 01 06:02:59 Hmm. Let me go see if that helps things a bit. I just finished reading that entire page you sent via link. Oct 01 06:03:54 what is the purpose of DamnCanvas? Oct 01 06:05:39 The purpose was me just trying anything I could think of or find on the subject that I might be able to load the XML layout onto screen like I do with the others, and was hoping to somehow open it, and have it pop in the FingerPaint somehow. All I want is to get this FingerPaint to exist inside a layout, rather than it going rogue and being a full screen of blandness. Oct 01 06:05:53 So a better answer is probably I have no idea whatsoever. Oct 01 06:06:59 what you really want is to set the layout of FingerPaint Oct 01 06:07:11 It acted like it wanted to take dView, but it's moaning about "attempted duplicate class definition for name: "com/lifeofchance/bpt/FingerPaint$dView""... so I'm trying to figure out if this error is going to be more helpful Oct 01 06:07:14 to contain both your header and the dView Oct 01 06:08:06 FingerPaint's onCreate should have something like: setContentView(R.layout.my_xml) Oct 01 06:08:08 That would work for me. Any suggestions? That's what I was hoping to achieve somehow... Like 'injecting' a header from XML above the rest of the FingerPaint stuff. Oct 01 06:09:24 my_xml should contain a linear layout (or whatever) with your header, and Oct 01 06:09:28 Right. It is actually calling dView .. "v = new dView(this)" .. which is what my newbie head is confused about. I'd like to change that to something like findViewById(R.layout.the_xml) Oct 01 06:09:39 right Oct 01 06:09:54 the xml would be instantiating dView when you call setContentView() Oct 01 06:10:18 you would access it by saying findViewBy(R.id.dview_id) Oct 01 06:10:45 you would no longer need "v = new dView(this)" Oct 01 06:11:29 it would be v = (dView) findViewById(R.id.dview_id) Oct 01 06:13:33 so set the content view to the XML which contains the , and that would be the v = (dView) findViewById(R.id.dview_id) < ---- that, right? Oct 01 06:14:21 mmh, to 'inflate' the layout (create the views) you need setContentView(R.layout.my_xml) Oct 01 06:14:44 after that you can access views that have been inflated, using findViewById Oct 01 06:14:58 I'm sorry I'm being difficult. I appreciate all the help. I don't expect anyone to do my work for me, but I sure do need to learn and get an understanding, so I'm thankful. Oct 01 06:15:11 no worries Oct 01 06:15:24 Let me go take a look and see if I can maybe make this happen and I'll be back in a minute. Oct 01 06:15:35 this may be of use to you: http://developer.android.com/guide/topics/ui/custom-components.html Oct 01 06:16:21 That looks like it will be a lot of use ! I was flicking through there trying to find something like this. brb Oct 01 06:25:32 The logic just sunk in a little... that the XML would reference the dView instead of FingerPaint referencing it with the "v = new dview" line, and then I'd reassign "v" to the findViewById of the inside the XML. Or something like that. I'm getting this InflateException on "Binary XML file line #8: error inflating class com.lifeofchance.bpt.FingerPaint.dView".. Error log Oct 01 06:25:32 shows "NoSuchMethodException: com.lifeofchance.bpt.FingerPaint$dView." Oct 01 06:25:38 I did this: Oct 01 06:25:58 setContentView(R.layout.canvas); Oct 01 06:25:58 v = (dView) findViewById(R.id.graph); Oct 01 06:26:39 canvas.xml has my header, and has a "view" which says: class="com.lifeofchance.bpt.FingerPaint.dView" " Oct 01 06:27:05 I'm in the middle wondering if I've got to fix something in FingerPaint, or fix something in XML layout now. Oct 01 06:29:46 com.lifeofchance.bpt.FingerPaint$dView implies dview is a static child class of FingerPaint Oct 01 06:30:45 I'm not sure what that means. It is in fact inside FingerPaint and it says: public class dView extends View { Oct 01 06:31:00 is that wrong? Oct 01 06:31:15 it would have to be static to define it directly in an xml Oct 01 06:31:24 since there would be no parent class at that point Oct 01 06:33:06 Thanks! Getting some more errors, but I'm about to go see if it tells me how to fix it. "Unresolved compilation problem: Cannot make a static reference to the non-static field mPaint, Custom view dView is not using the 2- or 3-argument View constructors; XML attributes will not work" Oct 01 06:34:29 interesting. Oct 01 06:34:35 you can't refer to parent items in a static child class because it can exist w/out the parent being instantiated Oct 01 06:34:39 if i were you i'd put dView in it's own class, pierpark Oct 01 06:34:41 i'm not sure you're heading in the rigt direction Oct 01 06:34:44 yeah, that Oct 01 06:35:19 Okay I'll try to do that. Thanks, and brb Oct 01 06:35:30 and in the xml: class="com.lifeofchance.bpt.dView" Oct 01 06:35:41 because yeah, it definitely went crazy up in FingerPaint when I put static on the class. Oct 01 06:36:03 a child class is constructed using the instance of the parent class Oct 01 06:36:18 you can't refer to a child class w/out an instance of the parent, which means you can't point to it directly in xml Oct 01 06:36:25 if you make it static, it means it doesn't need the parent instance Oct 01 06:36:34 but that also means it can't access any variables in it Oct 01 06:37:02 the terminlogy is outer/inner class, though Oct 01 06:38:08 Morning. I still can't fix tha Accent line on tabs (Sherlock tabs) ... Now I'm in new sittuation, I do not see tabs on emulator any more, and on A2.2. Device they are same as before, with All Caps.. :( Oct 01 06:38:09 also the syntax for constructing an instance of inner class with reference from outer class was something liker outer.new Inner() iirc. If you have ever seen that. Oct 01 06:38:25 alankila: true. I come from c++ land. Oct 01 06:39:57 where did the android api ideas come from? Oct 01 06:40:03 o_O phew. Thanks guys. I'm going to have to let all of this soak in. Don't think I'm going to be able to solve this one tonight. My eyes are going to pop. I'm going to save this log here and go read that last link that sampullman gave me. Thanks a lot! Oct 01 06:40:04 intents, activities, etc? Oct 01 06:41:03 pierpark: good luck, and just in case it wasn't clear, i think you should move dView to dView.java, and modify the class="..." in the xml Oct 01 06:41:47 I work in telephony company. Is it possible to have an app which will intercept outgoing calls, hang them, and dial them through our infrastructure? I understand it mihght be a bit evil functionality, but we actualy want to save our users money. Oct 01 06:41:58 bjorkintosh: if you say romainguy three times, he might appear and give you an answer Oct 01 06:42:12 romainguy, romainguy romainguy. Oct 01 06:42:41 Pitel_IPEX, via wifi, perhaps. Oct 01 06:42:43 why not? Oct 01 06:42:45 Pitel_IPEX: you can present a handler for the dialer intent and let the user pick; look at some of the open source voip stuff Oct 01 06:44:01 bjorkintosh: my understanding is that the design was decided on from first versions of android. I imagine it simply struck someone as a reasonable design. Of course, I know nothing useful, but I imagine it was all before Android was owned by google Oct 01 06:44:07 sampullman: Thanks! I will definitely try to do that. It just explodes a ton of errors in there when I do that, so I'll have to try and understand them one by one here in a little bit. Oct 01 06:44:10 kthx, will look for that. Oct 01 06:47:05 alankila, i see. thanks. Oct 01 06:47:33 it is imho overengineered Oct 01 06:47:51 and inconvenient as hell to deal with it Oct 01 06:48:10 it seems like the designers wanted isolation/modularity between things at any cost Oct 01 06:48:13 https://developer.android.com/reference/android/telephony/TelephonyManager.html hmm, I see I can listen to call changes, but there is no method to actualy hang the call. Oct 01 06:48:27 alankila, why do you say that? Oct 01 06:48:42 I'd rather have no multitasking at all, than to have this form of multitasking where objects are created and destroyed outside my control. In a glorious future our phones all have gigabytes of memory and this design will look especially stupid then Oct 01 06:50:16 by the time that happens phone OS's have changed anyway ;) Oct 01 06:50:22 can someone help me fix my MMS please Oct 01 06:50:28 I just don't like the way it's been put together because it's so hard to deal with objects when you aren't quite sure if the instances exist or are currently being destroyed Oct 01 06:50:36 http://pastebin.com/BzbnajDd Oct 01 06:50:52 better to have some form of multitasking than no multitasking at all Oct 01 06:51:19 tneva82: yes. But let it be done by providing hardware resources to perform it -- enough memory -- and keep the software simple. Oct 01 06:52:24 sure. and why not have big enough batteries to keep android going on for a week while you are at it ;) Oct 01 06:52:42 working with android feels like jumping on very small and slippery stones amidst a rushing current that spells your doom. There are so few things you can safely do in android, I experience it as severely constraining Oct 01 06:52:45 i want a tiny printer on my phone Oct 01 06:53:00 i dont see a long term strategy in the current android java apis / framework; they seem very obtuse and un modern Oct 01 06:53:35 maybe they're preparing for the transition to google glasses Oct 01 06:53:36 they're also on hundreds of millions of devices, which tends to trump cleanliness of API Oct 01 06:53:48 I'm sad to say I am with g00s on this one. The APIs are ugly and cumbersome and are in a desperate need of modernization. Oct 01 06:54:07 Leeds: so is jme :) Oct 01 06:54:17 and android devices now have the hardware resource to spend on making programmers' life nicer Oct 01 06:54:37 so what would you rather have, alankila? IOS? Oct 01 06:54:40 I think a lot of the pure-Android APIs are pretty decent... Java as a whole is horrid Oct 01 06:54:58 bjorkintosh: nah. Oct 01 06:55:19 for me, there is no solution that sucks less than android, I guess. Oct 01 06:55:32 I just wish it had less things that I find especially sucking Oct 01 06:55:36 is there any documentation for ndk api calls, similar to sdk api calls Oct 01 06:55:47 i would be interested in looking at webOS if it ever got traction Oct 01 06:56:15 doubtful though Oct 01 06:56:30 hey romainguy_ i said your name three times, and here you are. Oct 01 06:56:41 nah, it's a two-horse race for the foreseeable time. The only interesting thing is if Microsoft can strongarm wp* into the race Oct 01 06:56:41 sampullman was right! Oct 01 06:57:00 the others, tizen, webos, firefox os, seem especially unlikely to go anywhere Oct 01 06:57:23 i can see firefox OS replacing BREW. Oct 01 06:57:34 there will be low end phones around for the foreseeable future. Oct 01 06:57:59 bjorkintosh: today's low end is yesterday's high end. Oct 01 06:58:14 you just have to allocate sufficient distance between today and yesterday. a few years, I guess. Oct 01 06:58:47 maybe symbian might rise again to make you happy, alankila. Oct 01 06:59:22 Symbian was before I had any interest in mobile. Is there something interesting about it? Oct 01 06:59:36 no. Oct 01 06:59:54 about as interesting as DOS these days. Oct 01 07:06:00 I want to create a widget similar to "slide to unlock", a bar with a slideable knob. Would I have to do this from scratch? Oct 01 07:06:22 probably, yes Oct 01 07:06:32 sadly yes Oct 01 07:06:39 darn it Oct 01 07:06:49 i know that feel bro Oct 01 07:07:19 any tips on how to do it? A relativelayout with a.. button or something in it? Oct 01 07:07:33 awestroke, put it in a ziplock bag. Oct 01 07:07:39 slide to unlock, if it is locked :) Oct 01 07:07:43 hahaha! i kill me. Oct 01 07:09:10 aww c'mon, that was very well timed. Oct 01 07:10:36 awestroke, the good thing with android though is its opensource community ;) http://stackoverflow.com/questions/9752760/slide-toggle-for-android Oct 01 07:11:35 https://github.com/pellucide/Android-Switch-Demo-pre-4.0/tree/master/android-switch-demo Oct 01 07:12:15 chups: thanks! I google slide view and slide widget etc but found nothing Oct 01 07:12:28 use intext:"github" Oct 01 07:12:41 advanced search really helps! Oct 01 07:12:46 good luck man Oct 01 07:13:26 is it a matter of taste? Oct 01 07:13:34 what are the protocalls for mms? Oct 01 07:13:39 slide to unlock, or draw a pattern to unlock... Oct 01 07:13:56 im been trying to get mms to work for 2 days now and no luck Oct 01 07:17:50 these sammy flexible displays look cool; a bunch of things would have to happen but it would be awesome to have a bendable phone you could wrap around your wrist Oct 01 07:20:17 Can anyone help me, where can I find all possible parents to style SherlockActionBar Tabs? how do I find "Widget.Sherlock.Light.ActionBar.Solid" all possibile styles Oct 01 07:20:48 Sherlock? Oct 01 07:22:57 Balky: have you looked in res/values/style.xml in the ABS source? Oct 01 07:23:12 i think that would be a good place to start.. Oct 01 07:23:41 sampullman well, that might be the good information :) Oct 01 07:26:24 hm.. that's quite a list ... Oct 01 07:27:15 JakeWharton would have a better answer, he's in the channel but probably idle Oct 01 07:27:33 SimonVT might know if he is around Oct 01 07:31:55 Yeah, I know they might know better, but they are not here :) ... But maybe someone knows, If I use the Action Bar Style Generator, how do I import it into my project and override originals? Oct 01 07:43:22 I'm having issues with my slidingdrawer, the padding doesn't seem to work on the right hand side: http://imgur.com/pWZrN , https://gist.github.com/0905530b146a65804268 Oct 01 07:52:45 hi Oct 01 07:52:54 hackety hack, I wrapped the button in a linearlayout Oct 01 07:53:04 what should I use to draw a chart with Android ? Oct 01 07:54:08 sampullman: I did it both ways. Then I went back into FingerPaint (leaving dView class in there) because the other (making dView.java and separating the two) just required me to cut out all the other code and was a big pain. In both situations, I can see my header from XML layout, which is great... the only setback I'm experiencing is that I can't really draw... I leave peck marks of ink Oct 01 07:54:09 on the "view" but I can't draw a line or anything. Oct 01 07:54:44 maxagaz: find a charting library on github or somewhere else, or write it yourself Oct 01 07:55:16 interesting; linux 3.6 includes support for userspace drivers Oct 01 07:55:17 sampullman: is there a "best" library for that ? Oct 01 07:55:22 sampullman: I can see your point, now though, about moving it into its own file, but since I got the other 'working' also, and both have the issue of not being able to draw fluently, I was hoping there could be a fix and then I'd be done! :/ Oct 01 07:55:49 I'll be around.... not trying to interrupt. Oct 01 07:55:52 pierpark: that's odd, im not sure what would cause that Oct 01 07:56:17 maxagaz: no idea, there isn't a standard, afaik Oct 01 07:56:32 the "best" ones probably cost money Oct 01 07:58:06 the best choice would be between androidplot and achartengine ? Oct 01 07:58:36 try them both and then let me know Oct 01 07:59:28 sampullman: yeah... I'm pretty stuck on that one, too. and that dView v, and v = (dView)findViewById(R.id.graph) makes no difference whether that even exists or not. It only mattered it seems, when FingerPaint was creating it? to use for setContentView(v). Oct 01 07:59:47 !!! Oct 01 07:59:57 why are you doing setContentView(v)? Oct 01 08:00:27 I'm not... I'm using setContentView(R.layout.canvas) Oct 01 08:00:39 the sequence should be: setContentView(layout) Oct 01 08:00:48 v = (dView)findViewById() Oct 01 08:01:00 then use that v to draw stuff Oct 01 08:01:02 and the canvas contains: Oct 01 08:01:05 like Oct 01 08:01:26 v.drawStuff(), or something Oct 01 08:01:50 wait, nvm. you probably want to control that in the dView class with onClickListeners and whatnot Oct 01 08:01:51 maxagaz: they both suck bad Oct 01 08:01:55 I did that a minute ago, with finding the view by id and telling it: graph, since thats the ID of the 'view' in the XML layout.. still just showing peck marks of ink Oct 01 08:02:11 g00s: which one would you advise me to use ? Oct 01 08:02:19 Now, I've managed to get it to work on old Android devices Oct 01 08:02:23 androidplot is semi defunct Oct 01 08:02:23 if you pastebin your code ill take a look, but im going to bed soon Oct 01 08:02:25 but it sucks on new ones Oct 01 08:02:27 ... Oct 01 08:02:46 achartegine was buggy Oct 01 08:03:12 i really can't recommend either Oct 01 08:03:14 so I've got it going where: setContentView(R.layout.canvas) is in place, which definitely shows my XML layout, and the "canvas" is in the "view" in the XML layout.. but the drawing is only allowing... a peck mark then it cuts off the drawing... instead of being a fluid line as far as I drag my finger. Oct 01 08:03:41 let me go see what that line is.. it's weird. Oct 01 08:03:58 g00s: chartdroid ? Oct 01 08:03:59 sounds like your touch listener isn't updating the canvas properly Oct 01 08:04:38 that sucked too maxagaz Oct 01 08:04:45 g00s: google chart tools ? Oct 01 08:05:06 haven't tried that Oct 01 08:05:25 was I told that the "static public class dView extends View{" would not be able to access anything in the (above) FingerPaint class? Oct 01 08:05:58 g00s: unfortunately, it's deprecated... https://developers.google.com/chart/image/?hl=fr Oct 01 08:06:03 actually probably not, because when I isolated dView and left all of "FingerPaint"'s stuff off on its own and not even involved, I was still having the issue. Oct 01 08:06:04 pierpark: indeed not because it is static. The instance is not linked to the outer class Oct 01 08:06:18 unless you pass it an instance of the outer class Oct 01 08:06:29 can I save the traceview that is currently being displayed? Oct 01 08:06:42 Ok. Let me go see if I can determine whats what. Oct 01 08:07:16 what's network profiling in emulator? cf. -netfast emulator's option Oct 01 08:07:28 dView is not a good class name according to java naming conventions. Classes should begin with capital letter. Oct 01 08:08:05 Ok Oct 01 08:12:37 hey guys, in order to fix an issue i need to use "zipalign" (from sdk tools) to repack my .apk. my question is how can i do this automaticly when i run from eclipse? Oct 01 08:13:52 hi Oct 01 08:15:35 also a class called DView hopefully displays the character D. Otherwise the name is not very descriptive. :-p Oct 01 08:16:25 it has lots of sibling classes for all the other characters in the alphabet Oct 01 08:16:46 BulleTime: idk Eclipse but I guess it has script's phases|stages|steps and some awkward GUI path to edit those Oct 01 08:16:48 together, the assembly becomes AlphabetView, and can be specialized to do a TextView Oct 01 08:17:02 anyone about the traceview thing? Oct 01 08:17:04 lowercase letters will be added in a future version Oct 01 08:17:18 once the difficulty with java class naming is sorted out. Oct 01 08:17:48 apple has a patent on the iView though Oct 01 08:17:55 thats why the lower case ones are on hold Oct 01 08:18:17 it's possible to just replace i by j to not infringe with the patent. Most people never even notice the difference at the bottom of the character. Oct 01 08:18:33 can I legally use yahoo weather api in my app ? Oct 01 08:19:18 I have to send broadcastMessage from my app, and get info from app which receive my broadcastMessage that this message is received - how can I do that ? Oct 01 08:22:43 Can Tab width in Action Bar be changed somehow? I need it 2dp less then it is, as it scrolls left-right for 2 dps and it sucks Oct 01 08:22:44 kselos: there's applicationmanager, iirc, which you can query about possible receivers for particular intent Oct 01 08:22:53 or was it packagemanager... I forget Oct 01 08:23:28 or if that was not your question, perhaps startActivityForResult or some bidirecitonal intent messaging scheme is what you want Oct 01 08:28:20 kselos: i guess you could try to use an ordered broadcast. the originating app would have the last order. the 'called' app could try setResultXXX(). seems kinda kludgy Oct 01 08:28:25 oh damn it Oct 01 08:31:35 I have a problem in a layout. same layout on API 10 with same screen, is displayed incorrectly on API 16 with same screen size. and on API 16 the text of the buttons is white instead of black. and the grid views are off screen or they are there but i cannot see them. so what should I do? Oct 01 08:36:58 why did they have to use this shitty off white bg for the d.android.com Oct 01 08:37:21 because google Oct 01 08:37:36 g00s: lower contrast, maybe Oct 01 08:38:06 what I really don't like is the search field that is expanded/collapsed via js Oct 01 08:38:43 I know what it must be! Oct 01 08:38:53 erm..sorry....sampullman Oct 01 08:39:35 sampullman: I can draw horizontal lines... its gotta be the vertical linear layout Oct 01 08:40:16 sampullman: as soon as my finger runs outside of the 'row', the drawing cuts off. ... at least there's the problem,.. now I just need to figure out how to get this sized right? heh Oct 01 08:42:04 attempting a relative layout Oct 01 08:47:01 "If you are using DDMS, Android 2.2 and later devices do not need an SD card. The trace log files are streamed directly to your development machine." and since I cannot see any Traceview button to dump it seems it cannot be done at all Oct 01 08:47:12 so I should use startMethodTracing() Oct 01 09:03:38 sampullman: success. Thanks to you and the others, I've successfully loaded my XML layout with the header, etc., and painting is fully restored. So if you ever find another super-weenie that decides to put the view inside a linear layout and all the sudden can't 'paint'.... its due to nested linear layout rows causing it to cut off. As soon as I removed the unneeded layouts tangle, the Oct 01 09:03:38 drawing was fixed. The only bug I'm left with sorting out is firing off this "startActivity" on this intent... it's griping about the static business. But, I am thrilled to have learned _something_ and that you guys helped me out! Thanks a lot! Oct 01 09:05:58 The only other thing that I could mention is that not only was my class "dView" not static, the following: public dView(context c) wasn't at least the two arguments that the docs you linked me to stated. So changing that to: public dView(Context ctx, AttributeSet attrs) and then super(ctx, attr) was what satisfied the errors on the XML view. Until that was changed, there was nothing at Oct 01 09:05:58 all showing up. Oct 01 09:07:14 hello, does somebody know if is possible to set a proxy to all the system from my app? Oct 01 09:07:15 Hey guys Oct 01 09:08:28 I need some help with JSON, I want to build a JSON object with one of it's fields being an array, I'm looking for the best way to encode and decode such JSON, been playing around with GSON and JSON simple but both doesn't have a good solution I think Oct 01 09:08:56 Sasson: give me a second and I might be able to help. Oct 01 09:09:39 K thanks Oct 01 09:11:38 I thought I had some code for that, but turns out all I've got in front of me is reading a JSONObject. Oct 01 09:11:44 Let me go see if I can find the encoding. Oct 01 09:12:55 http://developer.android.com/reference/org/json/JSONObject.html is helpful. Let me see if I can find that example I was using the other day. Oct 01 09:14:15 Hello. In the Google+ App, when you navigate 'Up' you have this Menu popping up on the left. I could not find that pattern in the Design Guidelines. Oct 01 09:14:24 Can somebody point me to it if it exists? Oct 01 09:14:42 sasson: As far as reading the array, you'd do something like: JSONArray res = json.getJSONArray("theArrayKey"); Oct 01 09:16:31 and then you're items of that array are: res.getString(0), res.getString(1) and so on (for looping through all keys), or res.getString("key_name"); Oct 01 09:17:55 http://developer.android.com/reference/android/util/JsonWriter.html Oct 01 09:18:04 There's your answer about encoding the JSON, with examples. Oct 01 09:20:36 That's about all I've got, but I at least wanted to give you something to work with, considering I was just helped out for the last few hours. Oct 01 09:20:52 Reading it is easy, though, so if you have trouble let me know. Oct 01 09:22:41 hey, the IRC office hours still happen? I only find 2 years old info on the net Oct 01 09:23:54 Yeah. But everyone is idle. Oct 01 09:30:52 How can I use ?android:attr/listSeparatorTextViewStyle, but with a custom underline colour? Oct 01 09:57:49 pierpark, thanks, I will know if it helpend only when I'll debug my servlet which will be in a few hours at least, but thanks Oct 01 10:11:18 how to create RSA key in android Oct 01 10:11:29 can anyone tell me Oct 01 11:19:37 egit y u no push code Oct 01 11:21:17 apparently because openssh is down.... :( Oct 01 11:29:42 somehow I had fail2ban'd myself :) Oct 01 11:36:25 I have a json response with 5k records of cities, how would one implement an autocomplete on this ? Oct 01 11:36:37 Does anyone knows if there is something like coverflow library that does not use depricated widget.gallery? Oct 01 11:39:54 tagrudev: On what type of view do you want autocomplete? A TextView ? Oct 01 11:40:18 BadDesign, yup Oct 01 11:41:21 tagrudev: https://developers.google.com/academy/apis/maps/places/autocomplete-android Oct 01 11:46:54 finally found a good use for Log.wtf Oct 01 11:47:03 :) Oct 01 11:47:41 getPackageManager().getPackageInfo(getPackageName(), 0) Oct 01 11:47:51 can throw NameNotFoundException Oct 01 11:48:07 so I catch and log this: Oct 01 11:48:14 Log.wtf("FeedbackHelper", "A case of amnesia? The app doesn't know it's own name!", e); Oct 01 11:48:26 :-) Oct 01 11:49:03 lol Oct 01 11:51:54 hello everyone. I don't know if this is the right place to ask, but I am building a game with andengine and I want to show an arraylist inside a listview in an existing activity. Is there any way I can do that? as you know you can't use .xml files with basegameactivities Oct 01 11:52:08 mrenouf, good one Oct 01 11:53:10 BadDesign, ty I will check it out Oct 01 11:54:43 BadDesign, oh hi Oct 01 11:56:02 hello, does a service keep running even when the application is closed? Oct 01 11:56:05 Zharf: hi there, comrade Oct 01 11:56:20 or as long as the service is running, the application also is? Oct 01 11:56:32 just no UI ? Oct 01 11:56:33 mi6_x3m, depends on how it's started Oct 01 11:56:59 Zharf: well, the thing is, I have an activity and the app also needs to have a service Oct 01 11:57:08 the service is supposed to receive push notifications Oct 01 11:57:14 and show status indications in the status bar Oct 01 11:57:23 when the user clicks the status indication, the activity should start Oct 01 11:57:30 mi6_x3m, http://developer.android.com/guide/components/services.html Oct 01 11:57:37 yes ive read this Oct 01 11:59:47 I don't know what your problem is then... but I have a meeting at work right now so I won't be able to help any further Oct 01 11:59:50 -> Oct 01 12:00:01 oh thanks anyway! Oct 01 12:03:30 mi6_x3m, clicking the notification sends an intent to start the activity Oct 01 12:04:01 mrenouf: yes, I get that, the thing is: is the service part of the application? Oct 01 12:04:08 or autonuomous Oct 01 12:04:15 mi6_x3m, yes? Oct 01 12:04:45 mrenouf: hmm, okay thank you Oct 01 12:04:48 they are all part of your app Oct 01 12:04:57 but have different lifecycles Oct 01 12:05:20 a service can start a thread and continuing doing work independently of an Activity Oct 01 12:06:04 does that help? Go read about services at d.a.c: http://developer.android.com/guide/components/services.html Oct 01 12:06:04 So, does anyone know how to reduce Action Bar Tabs by 1dp? Oct 01 12:06:22 mrenouf: well i am aware of that as well but since i ues phonegap for this application Oct 01 12:06:36 and I use the method navigator.app.exitApp() to close the activity Oct 01 12:06:39 mi6_x3m, that would have been helpful to mention up front Oct 01 12:06:49 I fear it might close the application AND the service Oct 01 12:06:55 mrenouf: yes, sorry Oct 01 12:07:28 mi6_x3m, as you said, it closes the activity. I have no clue about phonegap, but if you startService() it will continue running independently (subject to other constraints) Oct 01 12:08:07 Balky, resisting the urge to ask why, but I beleive you'll need to customize the style and supply some new images Oct 01 12:08:39 hi Oct 01 12:08:42 sorry I dont have specifics handy right now, but I've customized the tab colors before Oct 01 12:09:22 Awww. Log.wtf is API Level 8 Oct 01 12:09:26 grr Oct 01 12:09:35 mrenouf: At the moment I have 5 Tabs, and they fit on the screen together with text. How ever last tab "Settings" padding area is not on the screen, so it turns scrolling on, and scrolls only for those 3-4 dp's of nothing Oct 01 12:09:42 I would like to display a 10 MB image, is there a library or some example of code I could use to do tiling ? Oct 01 12:09:54 so, if I reduce size of each tab by one dp, I'll fit everything on the screen nicely Oct 01 12:11:13 Balky, I would recommend a view pager pattern if you have > 3 tabs Oct 01 12:11:35 Balky, what about i18n ? Oct 01 12:12:03 Hi everybody! I would like to upload files to Dropbox via the Dropbox SDK but I am getting an NetworkOnMainThreadException everytime. What can I do against that? Oct 01 12:12:17 evident, do it on a thread Oct 01 12:12:42 evident, doing network operations on the UI thread is bad Oct 01 12:13:10 how would I best do this? Oct 01 12:13:15 Well, that's not my problem... My boss wants it nice and tight and non scrolable Oct 01 12:13:33 Hi, I'm really having trouble with this layout: http://pastebin.com/9HdnhiaB - I really want the propoints EditText element to pull over to the right - gravity didn't help at all and I've tried using the Graphical Layout desinger in Eclipse, but I can't make it work. What am I doing wrong? Oct 01 12:13:35 evident, http://developer.android.com/reference/android/os/AsyncTask.html Oct 01 12:13:40 later on if it will look silly localized that could be my problem :) Oct 01 12:14:15 Balky, so it IS your problem. Explain to your boss that 5 tabs is bad for usability. Oct 01 12:14:38 thx Oct 01 12:14:56 Well, I tried :) and it does not work, so at the moment I need custom solution Oct 01 12:15:11 then in week or two, I'll need to change everything again Oct 01 12:15:12 :) Oct 01 12:15:13 Balky, otherwise, for now to cheat (prototype?), just override the Widget.ActionTab style, you could use textScaleX to fudge it down to 0.9 or whatever Oct 01 12:16:14 hm.. interesting idea... I'll check it Oct 01 12:16:33 Balky, well, that or smaller textSize Oct 01 12:16:50 Repox, why the TableLayout? Oct 01 12:16:52 I already have smaller text set to 10dp :) Oct 01 12:17:02 Balky, OMG. FAIL. Oct 01 12:17:21 mrenouf: I tried having the EditText positioned to the right of the TextView? Oct 01 12:17:29 Well, I'm testing it on HTC desire with small screen, and it actually looks good Oct 01 12:17:36 I don't know why would it be a Fail Oct 01 12:17:52 Balky, yeah, because not everyone has YOUR phone? Oct 01 12:18:03 10dp is really small for text Oct 01 12:18:23 Well my is old with realy small screen. On my wifes Galaxy S2 looks perfect Oct 01 12:18:52 I agree 10dp is small, but it's just a tab, the rest looks nice Oct 01 12:18:58 so it is kind of elegant Oct 01 12:19:06 fair enough Oct 01 12:21:34 I am building a game with andengine and I want to show an arraylist inside a listview in an existing activity. Is there any way I can do that? as you know you can't use .xml files with basegameactivities. Has anybody worked with andengine before? Oct 01 12:24:37 which library should one use to pull (and parse) xml data from a web service? Oct 01 12:24:49 http://pastebin.com/qTXyyK5N Oct 01 12:25:11 i am facing this errror while installing ADT Plugin Oct 01 12:25:16 for eclipse Oct 01 12:25:20 how to analyze memory usage of application? Oct 01 12:25:31 inside Oct 01 12:26:30 anyone? Oct 01 12:27:21 neooo what's version of eclipse? Oct 01 12:27:23 bingels: hprof Oct 01 12:27:32 Ge0rG, XPath is popular (javax.xml.xpath) Oct 01 12:27:49 neooo: yeah sounds like wrong eclipse. get latest or even better get Intellij idea Oct 01 12:28:10 p_l yes mat, more details please Oct 01 12:28:53 bingels: haven't used it personally, but check the blog for Android Developer Tools, they had example of using hprof etc. Oct 01 12:29:06 latest tools moved it all into one tool, I think? Oct 01 12:29:46 I can't programaticaly reject incoming call since 2.3?! :( Oct 01 12:31:39 no mat separately Oct 01 12:37:45 bingles, osxorgate : i have 4.2 Oct 01 12:37:56 and that is the latest Oct 01 12:39:32 ims_: isnt xpath for processing xpath, not plain xml? Oct 01 12:40:20 neooo classic? Oct 01 12:40:29 Ge0rG: XPaths are a way to address elements in XML document Oct 01 12:40:39 bingles: yes Oct 01 12:40:49 try new 4.2.1 Oct 01 12:41:33 oh that Oct 01 12:41:43 I have 4.2.1 Oct 01 12:42:07 when installing adt Oct 01 12:42:22 eclipse can download also dependies from internet Oct 01 12:43:06 so Oct 01 12:43:27 It was working fine.. on Mint Oct 01 12:43:36 but now Oct 01 12:43:46 it ain't wanna work Oct 01 12:43:50 on Arch Oct 01 12:44:15 on Mint on Arch what? Oct 01 12:44:45 try full reinstall eclipse Oct 01 12:45:00 okay... :/ Oct 01 12:45:04 its works always Oct 01 12:50:04 Hey there. Oct 01 12:50:15 How can I set the background color of actionbar tabs by code? Oct 01 12:51:21 Problem is that when I use setStackedBackgroundDrawable(new ColorDrawable it removes the setBackgroundDrawable and setSplitBackgroundDrawable. Oct 01 12:51:36 I CAN however use a drawable that I defined in xml. Oct 01 12:52:17 But when I try to apply a color filter to that drawable and set it as stackedbackground I get a segmentation fault. Oct 01 12:52:32 What's the easiest way to set tab colors by code? Oct 01 12:52:38 I'm using actionbar sherlock. Oct 01 12:55:57 (downloading developer docs via GPRS is. not. fun.) Oct 01 13:05:28 ,oO( Java for world domination... SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXParser(); XMLReader xmlreader = parser.getXMLReader(); ) Oct 01 13:08:00 it's so beautiful Oct 01 13:08:24 s/beautiful/awful\ and\ it\ makes\ me\ want\ to\ kill\ myself/ Oct 01 13:08:36 Philpax: shhh :) Oct 01 13:09:46 I wonder why it is not using the AbstractSingletonProxyFactoryBean... Oct 01 13:12:11 In all fairness, that says more about who made the SAX code than about java as a language. Oct 01 13:13:06 Ge0rG: XMLReader reader = SAXParserFactory.newInstance().newSAXParser.getXMLReader(); Oct 01 13:13:06 I loathe Java and I think it's a terrible language Oct 01 13:13:41 hmm... SAXParserFactory.newInstance().newSAXParser().getXMLReader(); /// corrected Oct 01 13:13:53 I think it's old and developing too slowly. Oct 01 13:14:02 But the ecosystem makes up for a lot of that. Oct 01 13:14:24 not particularly, no Oct 01 13:15:01 I long for first class functions, named method parameters and lambdas but other than that it does the job. Oct 01 13:15:17 p_l: I was just amused by the above snippet being actual example code (on SO) Oct 01 13:15:27 I thought I'd prefer Java over Obj-C Oct 01 13:15:32 right now I don't really know Oct 01 13:15:56 Ge0rG: you may not realize this, but you can actually chain things together. Oct 01 13:15:59 For example! Oct 01 13:16:11 XMLReader reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader(); Oct 01 13:16:12 I think some of the new objc ARC stuff is better than it was, but objc is a masochists language Oct 01 13:16:20 I'd rather write/read c++ Oct 01 13:16:23 also, the SAX stuff is definitely verbose and ugly. Oct 01 13:16:37 The whole namespacing stuff in objc alone is turning me off. Oct 01 13:16:37 oh, everyone already said that Oct 01 13:16:39 nevermind :> Oct 01 13:16:42 lov: I do realize it. what I am looking for is an XML parser with readable source code Oct 01 13:16:43 What a preposterous thing to leave out. Oct 01 13:16:46 lov thats just because xml is a pos Oct 01 13:16:54 lov: also, making fun of java is hip! Oct 01 13:17:04 Ge0rG: when you say readable source code, do you mean the source code for the parser itself, or the source of the XML document? Oct 01 13:17:07 Objective-C looks quite nice, but being mostly limited in practice to Apple didn't help Oct 01 13:17:28 (also, I would not necessarily like to use NextSTEP's standard library) Oct 01 13:17:38 That's not true! There's also... Oct 01 13:17:39 p_l - well at least you can write c++ or objc to build ios apps Oct 01 13:17:40 um... Oct 01 13:17:42 lov: the java source calling the parser functions Oct 01 13:17:46 GNUstep? Oct 01 13:17:47 * Hodapp runs Oct 01 13:17:50 Nice? If you like museums. Not so much for getting stuff done. Oct 01 13:18:12 Ge0rG: we use ksoap, which may or may not fit your needs Oct 01 13:18:14 Hodapp: uses the same standard library interface Oct 01 13:18:26 Ge0rG: Oct 01 13:18:27 http://code.google.com/p/ksoap2-android/ Oct 01 13:18:28 and generally tries to implement OpenSTEP Oct 01 13:19:04 all those *step window managers looked like shit and were a total pita Oct 01 13:19:19 and were around the time of win95 etc etc etc Oct 01 13:19:26 so ui had been done better at that point Oct 01 13:19:34 lov: does it support direct access to XML on HTTP sites, or do I have to obey the rest of SOAP? Oct 01 13:19:56 it works as a regular XML pull parser. Oct 01 13:20:14 p_l: what I've read is that it's 'close enough' to work similarly but far enough to be annoying incompatible in most ways Oct 01 13:21:07 I wish people would just admit xml was a huge failure and pretty much most of the libraries and technologies wrapped around it are just complete and utter shit Oct 01 13:21:12 get the fuck away from it Oct 01 13:22:26 json appears to be much leaner, I find myself using it by default instead of xml. Oct 01 13:22:36 the client wanted XML because of. Oct 01 13:22:41 ron_frown: actually, the big failure, IMHO, is the so-called second normal form, and people generating XML from class definitions Oct 01 13:22:44 anybody Oct 01 13:22:51 My xml is pretty much limited to dealing with legacy situations when there's no other choice. Oct 01 13:22:54 hi. when I click on a textview element of a GridView it shows a contour. how can I disable displaying this contour? Oct 01 13:23:04 now there is a dozen of XML parser libs for android/java and I can not decide which one to use Oct 01 13:23:08 ron_frown: as well as the idea that RPC is good choice for high latency connections Oct 01 13:24:03 superlinux-hp: I suspect you're looking for android:listSelector="#00000000" Oct 01 13:24:06 (Second Normal Form XML is the one where you push every single bit of data into separate element and avoid attributes) Oct 01 13:24:32 TheTrash, let me check Oct 01 13:24:40 cos it annoys my boss. Oct 01 13:25:26 TheTrash, is it part of the gridview or the textview? Oct 01 13:25:42 superlinux-hp: the gridview Oct 01 13:25:47 ok Oct 01 13:26:23 * Ge0rG just read that SAX is the _simple_ API for XML. the developers must've had some serious sense of humor Oct 01 13:27:55 there's nothing simple with XML Oct 01 13:27:55 sax is a basic state machine setup Oct 01 13:28:00 better than dom by far Oct 01 13:28:10 XPath isn't gonna be nearly as fast as a well written sax handler. Oct 01 13:28:25 really you are best off with sax if you have any sufficient amount of xml to parse Oct 01 13:28:51 I prefer STP. But then, the STP lib I used was also in a language that was much more pleasant to work Oct 01 13:29:00 its not about fast for me... rather concise code Oct 01 13:29:29 XML sucks in just about every language I use Oct 01 13:29:32 including python Oct 01 13:29:39 instancies of Movie not destroying Oct 01 13:29:48 Ge0rG: if you don't care about the speed / memory usage, then don't use SAX Oct 01 13:29:51 and stay always in memory Oct 01 13:30:11 GeorG: look into simple-xml: http://simple.sourceforge.net/. It is based on class annotations. It is not "simple" either. Oct 01 13:30:11 is the situation with JSON parsing in Java better than with xML? Oct 01 13:30:38 JSON is in general just better for serialization than XML is Oct 01 13:30:42 hrnt: now this is the third library I should not use. what is left that can be used? Oct 01 13:30:56 and yes, the java org.json apis are good. You might like gson, as well. Oct 01 13:31:04 Honestly I haven't done any manual JSON parsing for years... mostly just json to object mapping using Jackson. Oct 01 13:31:14 I found Simple fairly simple to use, actually. Oct 01 13:31:42 Ge0rG: depends on what kind of XML you are parsing Oct 01 13:31:52 the one time I liked using XML was when I was working with a really cool XSLT setup we had Oct 01 13:31:56 XSLT is pretty cool Oct 01 13:31:59 underused, IMO Oct 01 13:32:00 how to fix memory leaks with instances of Movie??? Oct 01 13:32:01 basically use SAX or a similar pull parser if you need to keep memory usage low Oct 01 13:32:18 imho the idea of XSLT is cool. the implementation, not so much Oct 01 13:32:29 hrnt: the XML is yet to be specified. it should be nothing serious, like <1KB of bloat, no long lists Oct 01 13:32:31 bingels: use HPROF and/or MAT to identify the references to the Movie objects. Oct 01 13:32:39 bingels: no, I will not help you use these tools. you must read the documentation./ Oct 01 13:32:58 bingels: http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html Oct 01 13:33:02 lov i talk - Movie instances not grabbing by GC Oct 01 13:33:14 Ge0rG: in that case i would use a parser that provides a xpath api Oct 01 13:33:16 and cant be recycle Oct 01 13:33:20 *recycled Oct 01 13:34:23 many create Movie not referenced instances do big memory leaks Oct 01 13:34:35 *instances of Movie Oct 01 13:34:39 so back to javax.xml.xpath! :D Oct 01 13:34:48 bingels: use HPROF to verify that assertion. Oct 01 13:35:00 lov does it Oct 01 13:35:02 either something holds a reference to the Movie object, or the GC has chosen not to recycle it yet for whatever reason. Oct 01 13:35:04 xpath is lovely if you just need to fetch a few values. Oct 01 13:35:16 *did Oct 01 13:35:17 TheTrash, thanks you saved me 2 hours. thanks a lot Oct 01 13:35:32 * lov shrugs Oct 01 13:35:35 superlinux-hp: nice, glad it worked. Oct 01 13:35:37 I don't know what to suggest. Good luck. Oct 01 13:36:02 xstream is a decent object to xml to object lib but the api is a bit quirky. Oct 01 13:36:22 is there a shortcut for fetching a data record to a java object with xpath? Oct 01 13:36:22 Not convoluted like SAX or anything, just weird in setting state in some instances of the parser/mapper. Oct 01 13:36:47 or even to an SQLite table... Oct 01 13:36:54 TheTrash, but still, I myself, not the boss, would love to see it sinking when I click while keeping the contour off. can I have that? Oct 01 13:37:34 superlinux-hp: sinking is tricky... having a different color for the contour/background is reasonably doable with a statelist drawable as the textview's background. Oct 01 13:38:01 What happens if an AsyncTask throws an uncaught RuntimeException? Oct 01 13:38:04 Though the contour as you call it isn't really a real sink, just an embossed graphic. Oct 01 13:38:37 Bottomline is, with a statelist drawable as the textview's background, you can control its state when pressed, unpressed, etc. in detail. Oct 01 13:38:56 you know what, I could not understand you Oct 01 13:39:01 but thanks Oct 01 13:39:04 Ge0rG: you mean as an alternative to sql? That would be interesting Oct 01 13:39:08 i need some sleep Oct 01 13:39:19 It is interesting, every single time it's been tried. Oct 01 13:39:22 lov after Gause GC non referenced Movie instances have memory usage Oct 01 13:39:32 and GC not collected them Oct 01 13:39:46 TheTrash: no, I want to pull stuff from the web and store it in sqlite Oct 01 13:40:21 superlinux-hp: http://blog.stylingandroid.com/archives/55# that shows the general system for statelist drawables Oct 01 13:40:31 ok Oct 01 13:40:44 superlinux-hp: find out the states you want to support, make the xmls and use them as the textview (or gridview cell) background. Oct 01 13:41:04 ah great.. now i get you Oct 01 13:42:12 Ge0rG: only shortcut I can imagine is to map xml to java objects and use an ORM (e.g. ORMlite) to save your objects. Oct 01 13:42:17 Not really a shortcut, though :O Oct 01 13:42:42 With xpath, you'll be handling each field manually. Oct 01 13:43:41 If I had to use xpath, I'd create a little datastructure class that mirrors the xml data... but in the end it'll still be somePojo.setFieldX(value) for all fields, and somePojo.getFieldX() for each field when going to sql. Oct 01 13:48:04 fuuuuu xml Oct 01 13:52:20 how to fix Movie instances memory leaks? Oct 01 13:52:41 by closing/disposing/destroying them? Oct 01 13:53:28 Movie havent methods for closing/disposing/destroying Oct 01 13:53:54 then how do you know it's leaking? Oct 01 13:54:42 because after many times Gausing GC (and after long time) non referenced instances of Movie stay in memory Oct 01 13:55:31 so its memory leak Oct 01 13:55:56 application memory(heap) going to 29MB > Oct 01 13:59:31 whoa. JSON parsing in Java is really a snap. Why is there no XML lib with the same API? Oct 01 13:59:59 What lib are you using for JSON? Oct 01 14:00:17 Ge0rG: because XML. Oct 01 14:00:30 org.json is nifty Oct 01 14:00:31 because with JAX-WS it just works automagically(tm) Oct 01 14:00:39 until it doesn't Oct 01 14:00:46 org.json is tiresome. If you want that, JDOM. Oct 01 14:01:20 and then you get com.sun.xml.ws.com.intarwebz.soap.soap.soap.no.soap.radio.SOAPExceptionPropagatedFromTheInnerBowelsOfWhateverGodAwfulServletContainerYouAreUsing Oct 01 14:01:32 freeone3000: whats the trouble with org.json? Oct 01 14:01:42 Funfunfunfun Oct 01 14:01:48 followed by a stack trace that is so long it doesn't fit in the logs Oct 01 14:01:59 Ge0rG: It's *manual*. Oct 01 14:02:09 I use Jackson JSON, worked fine so far Oct 01 14:02:21 Ge0rG: What are you using for these crazy-simple JSON parsing? Oct 01 14:02:36 Ge0rG: Something like JAX-RS would allow you to declaratively map your JSON to your classes with annotations. Something like Gson would allow one to map it using a similar idiom to Parcelable. Oct 01 14:02:55 * Ge0rG isn't using anything currently, just looking for a library providing concise xml or json parsing Oct 01 14:03:15 freeone3000: what about sqlite ContentValue conversions? Oct 01 14:03:20 gson is easy Oct 01 14:03:21 Ge0rG: What's a "ContentValue"? Oct 01 14:03:32 so beyond super-easy Oct 01 14:03:42 Ge0rG, you could try Jackson. I like it. I can read and write something in just two calls. I dunno about any other libs since I haven't tried any others Oct 01 14:03:43 Ge0rG: You have objects. You want objects with both a JSON and a SQL representation. Oct 01 14:03:56 But I think it depends on what you need, too Oct 01 14:04:03 I just needed to send lots of crap between activities Oct 01 14:04:12 freeone3000: http://developer.android.com/reference/android/content/ContentValues.html - basically a list of name-value pairs for sqlite storate Oct 01 14:04:14 Ge0rG: You could annotate objects with both jax-rs and hibernate mappings. Oct 01 14:04:19 Uh.... Assuming Hibernate works on android. Oct 01 14:04:39 freeone3000: I don't really want objects, kthx :) Oct 01 14:04:50 ...What? Why not? Oct 01 14:05:10 freeone3000: objects either imply reflection or meta-programming Oct 01 14:05:34 Ge0rG: Or a library which does that for you, yes. Oct 01 14:05:41 hibernate is not the way to go Oct 01 14:05:48 not on android Oct 01 14:05:53 fricking thing is humong0r Oct 01 14:06:00 It's only like 300MB. Oct 01 14:06:23 meh. the longer I read about it, the more I come to the conclusion that it just plainly sucks. Oct 01 14:06:36 ...And it looks like a Nexus 1 only has 200MB of app storage, total. Okay, understood. Oct 01 14:06:46 Ge0rG, reflection is the way to go if you want easy :p Oct 01 14:07:07 so far, the most readable source I found is http://stackoverflow.com/a/10415149/539443 Oct 01 14:07:36 pfn: I don't care for object representation of my data, I want it to appear in a ListView / custom View Oct 01 14:08:12 Ge0rG: You don't just... Android is Java, Java is firmly OO. You want an object with a SQL serialization, a JSON serialization, and a ListView view. Oct 01 14:08:34 freeone3000: I want free trolls, as well. yup. Oct 01 14:09:00 Ge0rG: Thinking of it in the above manner makes the answers simple. Oct 01 14:09:03 >_> Oct 01 14:09:07 666 people in this channel O_o Oct 01 14:09:16 xlinearx: 667. Oct 01 14:09:28 xlinearx: you are one too many Oct 01 14:09:40 ah you're right. =) Oct 01 14:10:16 freeone3000: maybe I just need a WebView and some XSLT magic to display the XML... Oct 01 14:11:03 Ge0rG: Sure, but then you're not storing it locally (or doing java). Oct 01 14:12:06 freeone3000: if it is a Java object, I can't store it locally either. Oct 01 14:12:25 Ge0rG: Sure you can, you just need to also define an SQL serialization for it. Oct 01 14:13:06 freeone3000: maybe you will define them for me, then? Oct 01 14:13:42 Ge0rG: @DatabaseTable, @DatabaseField. Have fun. Oct 01 14:17:48 Ge0rG, you can just store it locally serialized to json... Oct 01 14:17:58 you just won't be able to easily search it Oct 01 14:18:52 pfn: neither display it directly using android's means Oct 01 14:19:05 displaying it directly is easy Oct 01 14:19:13 just use an adapter that works with the json representation Oct 01 14:19:48 hm.... Oct 01 14:21:03 bad idea to deal purely with JSONObject, it's meant for serialization. If you don't map it to a regular POJO, you're going to shoot yourself in the foot when you want to change a field because surprise, JSONObject isn't mutable Oct 01 14:21:30 depends on what you're doing Oct 01 14:21:34 being immutable isn't bad Oct 01 14:21:41 I don't want to change stuff. all I want is to deserialize a document I got over HTTP and store it to SQLite. ideally using XML. Oct 01 14:21:53 how exactly do you want to store Oct 01 14:21:57 why do you need it deserialized? Oct 01 14:22:04 why not just store the document directly? Oct 01 14:22:06 I ran into trouble once when I did that and the project requirements changed. Oct 01 14:22:33 and if you have a stable object schema, then yeah, write some sql adapters to store stuff based on each of your data model objects Oct 01 14:22:37 that map to the xml Oct 01 14:28:41 I think what I need to write is a good code generator Oct 01 14:29:02 yeah! that's the Java way! Oct 01 14:29:12 to solve this problem before I write this code a million times this fall again and again :) Oct 01 14:30:27 hello guys Oct 01 14:30:52 i need know it is possible to load preference form app to another app? Oct 01 14:32:18 for example addPreferencesFromResource("packaga/R.xml.preferences"); Oct 01 14:32:43 not really. Oct 01 14:33:03 lov:mm from assets? Oct 01 14:33:19 lov:or read preferences from assets? Oct 01 14:33:34 huh? Oct 01 14:33:43 uh, possibly Oct 01 14:34:00 I don't know if there's a way you can reference the Assets of another application, however. Oct 01 14:34:03 demonoid_com, if you want to share preferences, expose a service/aidl that lets you query preferences remotely Oct 01 14:34:18 ^^ Oct 01 14:34:24 or use a ContentProvider or something idk Oct 01 14:34:30 what exactly is your use case anyway? Oct 01 14:34:35 hell, use a sticky broadcast. Oct 01 14:36:20 lov:i have one package with activitys and another packages with resurs only.And i need read some preference form package2 and add to package1 Oct 01 14:36:54 Why exactly do you have two different packages? Oct 01 14:38:23 lov:because the first package is 40 mb and second package is 40 mb ... Oct 01 14:38:54 lov: google space is 50 mb for app Oct 01 14:39:10 er Oct 01 14:39:23 if you have a lot of resources, you can package them into an .obb now Oct 01 14:39:40 also, consider not having so damned many resources, or downloading them separately Oct 01 14:40:14 (I'm more concerned about the 40MB of classes...) Oct 01 14:40:26 demonoid_com: http://developer.android.com/guide/google/play/expansion-files.html Oct 01 14:41:18 can't be 40mb of classs Oct 01 14:41:24 because dx blows up if you have >10mb Oct 01 14:45:41 hey i have en editText, and as soon as the user focuses on it, the soft-keyboard comes up. I woulld like to go to another activity if they press 'DONE' on the soft-keyboard. which event listener can i use? Oct 01 14:46:25 there is no hook to catch soft keyboard dismisses iirc Oct 01 14:46:29 lov:10x for this link :) Oct 01 14:46:46 there is only a hack you can use to measure the change in the size of the main window, a terrible idea Oct 01 14:46:54 there is a done input action Oct 01 14:46:54 There is one for editor actions. OnEditorAtionListener, listen for when actionId == IME_ACTION_DONE. Oct 01 14:46:56 just change the UX before you fubar your app Oct 01 14:46:59 Oh really? Oct 01 14:47:39 I guess that works Oct 01 14:49:13 can i set the inputtype of an edittext without limiting the range of characters? i really just want to display the number keyboard and programmatically append the dashes Oct 01 14:54:47 there is a phone number type for entering phone numbers that allows dashes, parens, and other important characters like # and , which allow you to add delays to the phone number for dialing extensions. If you just format the number with the PhoneNumberUtil class each time the text is changed it should give you the desired result, but i'm speaking from vague memories here. Oct 01 14:55:13 you can use a TextWatcher, or whatever it's called. Oct 01 14:56:35 im using textwatcher rather than input filter. sometimes my method return the string formatted with dashes, which the input type prohibits so i end up in a loop because Oct 01 14:57:24 use InputFilter Oct 01 15:00:23 celeritas: change the input type to phone number, which allows dashes. Oct 01 15:00:56 also what bingels said. I believe InputFilter is the right class for this. Oct 01 15:01:02 * fn0rd should save more code. Oct 01 15:09:42 fn0rd: I had originally tried to use InputFilter but handling the replacement of text spans became a hastle. Is there a way to set the keyboard type without filtering the text? Oct 01 15:10:38 not that I am aware of Oct 01 15:15:20 fn0rd, for future reference, using setRawInputType will configure the keyboard but will allow free text Oct 01 15:16:01 awesome Oct 01 15:16:02 How easy would it be to use the maps api to create a shape that's bound to a specific distance from the coastline? Oct 01 15:17:04 That's the idea for an app I have, it would need to generate two overlays. It's for sailing. Oct 01 15:20:32 you can set the keyboard type Oct 01 15:20:46 android:inputType Oct 01 15:20:54 thats the xml Oct 01 15:21:58 does anyone know the meaning of TYPE_MAIN as subtype of Phone.CONTENT_ITEM_TYPE? Oct 01 15:22:05 panegyric: yeah, but his issue was that doing so also sets the InputFilter Oct 01 15:22:13 or something of that nature Oct 01 15:22:42 oh wait so he WANTS dashes? Oct 01 15:22:49 he figured it out Oct 01 15:22:57 see setRawInputType() Oct 01 15:24:17 thana: my guess would be that it means it is the person's primary phone number Oct 01 15:24:43 contrast with TYPE_WORK, TYPE_HOME, etc. Oct 01 15:25:00 After many times Gausing GC (and after long time) non referenced instances of Movie stay in memory? How to utillize instance of Movie? Oct 01 15:25:09 fn0rd: yep. my furst guess, too. but to mark a number as someone's primary number we have the field is_primary Oct 01 15:25:19 *destroy/close Oct 01 15:26:16 fn0rd: also we cna have several numbers of type TYPE_MAIN. so this cant be thr answer ;) Oct 01 15:40:43 Hi. My widget always show TextView label after install any app. Any ideas for solution? TQ in advance. Oct 01 15:41:24 Solutions for what? Oct 01 15:41:58 to avoid lost of data in sharepreference so that it will show the data. Oct 01 15:42:35 this happen due to auto kill app/widget, i guess. Oct 01 15:42:53 You're saying your app is losing SharedPreferences values on uninstall, or when your activity is killed? Oct 01 15:42:55 zairo: I think I speak for most people in here when I say we have no idea what you're asking Oct 01 15:43:49 zairo: i concur. no idea what you are talking about. Oct 01 15:44:41 freeone3000: losing widget sharedpreferences values when i install other app. so i guess my widget is killed. Oct 01 15:45:05 zairo: Make sure to sync SharedPreferences in your onPause(). Oct 01 15:46:08 freeone3000: FYI, in widget, i only have onUpdate. Oct 01 15:46:59 freeone3000: i will try onPause. thanks for the info. Oct 01 15:55:46 hey all, the documentation online makes it seem like there's no copy-constructor or clone method for layouts/views, is this true? Oct 01 15:55:57 without using XML is there an easy way to clone a relativelayout for exampel? Oct 01 15:57:19 When I close my slidingdrawer with animateClose or close, it closes for 1 ms and then animates from the original position to open position Oct 01 15:57:22 kaneda^: no Oct 01 15:57:42 JakeWharton, and yet ANOTHER thing i'm disappointed w/ in android design Oct 01 15:57:58 ok Oct 01 15:58:52 who's this JakeWharton guy anyways Oct 01 15:59:04 i'm me Oct 01 15:59:09 he's JakeWharton Oct 01 15:59:11 who are you? Oct 01 15:59:43 uh, isn't it kind of obvious Oct 01 15:59:53 do you not realize the futility of asking a string of characters on the internet who he is? Oct 01 15:59:54 seeing as how his nick is his real name, you could probably google and find out Oct 01 16:00:04 ^ +1 Oct 01 16:00:23 a CharSequence, even Oct 01 16:00:38 just in case I throw some Spannables in the mix Oct 01 16:00:54 JakeWharton, so you're a charsequence, I KNEW IT Oct 01 16:00:58 lets see, he developed ActionBar Sherlock, works at Square and some other stuff Oct 01 16:01:04 sounds like an awesome dude to me Oct 01 16:01:45 the latest android sdk and eclipse adt can actually handle importing abs correctly now Oct 01 16:01:46 is there something better than this library to deal with tiling: https://github.com/ened/Android-Tiling-ScrollView ? Oct 01 16:02:03 this one doesn't integrate pinch zoom Oct 01 16:02:13 fn0rd: \o/ Oct 01 16:02:19 finally Oct 01 16:02:39 by the time they ship library projects contained in single binaries ABS will be (thankfully) obsolete Oct 01 16:02:55 i am pretty impressed. i took a couple month off dev and came back to find things like @SuppressLint("NewApi") Oh wow, it actually warns us about this now. Thankfully. Oct 01 16:03:08 I need some help, I am trying to find an Android phone that I can activate on the Verizon network but also be able to place an AT&T sim in it as well and have working 3G bands with AT&T when I need to switch. Oct 01 16:03:19 gbit86: #android Oct 01 16:03:23 i am readme btw. I changed my nick to avoid a stalker. Oct 01 16:03:29 Does anyone know of an Android CDMA & GSM phone that fully supports the GSM 3G bands? Oct 01 16:03:37 gbit86: #android Oct 01 16:03:44 k, thanks Oct 01 16:04:32 i am seriously pleased with the current state of the tools Oct 01 16:05:09 seems like everything is fixed that I had gripes about.. layout editor for example. Oct 01 16:07:04 hello, do I have to create status notifications on the UI thread? Oct 01 16:08:22 afaik, no Oct 01 16:08:37 pretty easy to test that, though Oct 01 16:09:35 JakeWharton, man, there's got to be a way to copy or clone a layout with all its children Oct 01 16:09:46 i programatically wrote a complicated relativelayout that i want to clone Oct 01 16:10:02 so just abstract that code into a method and call it twice Oct 01 16:10:23 JakeWharton, that's what i'm going to have to do Oct 01 16:10:25 :( Oct 01 16:10:35 there should be a copy constructor or a static clone method Oct 01 16:10:49 i disagree Oct 01 16:11:14 is there a way to execute some code at 8 am, say? Oct 01 16:11:17 depending on time? Oct 01 16:11:29 mi6_x3m: AlarmManager Oct 01 16:11:47 lov: yes but that executes Intents Oct 01 16:11:48 freeone3000: any simple example on widget with sharePreferences? Oct 01 16:11:51 I need to schedule some runnable Oct 01 16:12:07 so have something that captures the intent run a runnable Oct 01 16:12:54 JakeWharton, why do you disagree? I think pretty much all objects should have a copy constructor ;p Oct 01 16:13:08 while (!new SimpleDateFormat("HH:mm").format(new Date()).equals("08:00")) { Thread.sleep(1000); } Oct 01 16:13:18 :P Oct 01 16:13:58 lov: this is still not it, it takes millisecond arguments Oct 01 16:14:03 I need to trigger at system time Oct 01 16:14:29 mi6_x3m: don't do that Oct 01 16:14:35 that's a terrible idea and JakeWharton was joking Oct 01 16:14:42 mi6_x3m: use AlarmManager Oct 01 16:14:53 yes, he was hoking Oct 01 16:14:56 yoking Oct 01 16:15:02 evancharlton: clearly he was, this is what I do now Oct 01 16:15:06 I have a background service Oct 01 16:15:11 already a bad idea Oct 01 16:15:16 but keep going, this sounds good Oct 01 16:15:17 How am I supposed to inherit and customize slidingdrawer if every property is private? Oct 01 16:15:21 this is insane Oct 01 16:15:45 evancharlton: ok, so background service, upon start I schedule AlarmManager, set a filter for the intent, and then show a status notification at 8am every day Oct 01 16:15:57 but I do feel there has to be a better way Oct 01 16:15:59 why are you using a background service for this? Oct 01 16:16:04 awestroke: because those are implementation detail. if you want full customization then copy the entire class into your project Oct 01 16:16:14 evancharlton: what else can I use ? my activity is not visible all the time Oct 01 16:16:21 mi6_x3m: http://developer.android.com/reference/java/util/Calendar.html Oct 01 16:16:35 JakeWharton: tried to. I needed to add constructors, and I have no idea what android expects there Oct 01 16:16:41 mi6_x3m: AlarmManager will send a broadcast to your app, even if you're not running. Don't try and be running all the time. Oct 01 16:16:48 mi6_x3m: http://developer.android.com/reference/java/util/Calendar.html#set(int, int, int, int, int) Oct 01 16:16:59 mi6_x3m: http://developer.android.com/reference/java/util/Calendar.html#getTimeInMillis() Oct 01 16:17:00 lov: stop posting stuff I know about thanks Oct 01 16:17:03 not helping at all Oct 01 16:17:06 evancharlton: aah Oct 01 16:17:06 really? Oct 01 16:17:09 I thought I was being helpful Oct 01 16:17:14 12:14:26 < mi6_x3m> lov: this is still not it, it takes millisecond arguments Oct 01 16:17:17 12:14:31 < mi6_x3m> I need to trigger at system time Oct 01 16:17:18 by posting Calendar links you're not Oct 01 16:17:25 they're links to methods you'll want to use. Oct 01 16:17:28 ah, from that angle Oct 01 16:17:30 but hey whatever, you're the man. Oct 01 16:17:32 I'll stop helping. Oct 01 16:17:35 ta Oct 01 16:17:37 yeah but i'm already doing that, no no got me wrong Oct 01 16:17:41 the thing is, I do this Oct 01 16:17:43 BUT Oct 01 16:17:50 it's terribly unprecise Oct 01 16:17:53 sometimes up to 10 minutes Oct 01 16:17:57 mi6_x3m: you didn't show us any code, so how would he know what you're doing Oct 01 16:18:09 mi6_x3m: create a BroadcastReceiver, put your on that Oct 01 16:18:25 use the flag that gives ~exact wakeup times, if that's what you really want Oct 01 16:18:45 (there's one, I don't remember which, which will bundle the alarmmanager calls to avoid unnecessarily thrashing the device) Oct 01 16:18:46 yeah using it but terrible performance on Android 3.0 :/ Oct 01 16:19:03 lov: don't get offended, I overreacted, I appreciate any help Oct 01 16:19:37 evancharlton: so I just need to register to AlarmManager and it will be there until the app is removed? Oct 01 16:19:40 mi6_x3m: AlarmManager#set(int,long,PendingIntent) should be more or less accurate Oct 01 16:19:43 mi6_x3m: yes Oct 01 16:20:04 okay, I might be misusing it currently in that case Oct 01 16:20:27 mi6_x3m: I guarantee you are if your solution involves a Service :) Oct 01 16:21:00 evancharlton: true say, let me try it Oct 01 16:21:07 evancharlton: does it matter if I register many times? Oct 01 16:21:21 JakeWharton: I copied the source now. doesn't really work at all, loads of errors Oct 01 16:21:49 I shouldn't even have to do this, SOMEBODY should have wanted to make a slide-to-x widget sometime in android's history Oct 01 16:22:21 awestroke: maybe you should go protest at google Oct 01 16:22:25 #occupy android Oct 01 16:22:37 awestroke: i made one :) Oct 01 16:23:05 JakeWharton: with a slidingdrawer or just layout+handle? Oct 01 16:23:13 awestroke: https://lh3.ggpht.com/FmpmzaX_c-k7qkthubrQbaqaqjZ0_39pJvETu9KAydRos0TwkQx-jwgPHwziUB2CgJ22 Oct 01 16:23:31 man that image is horribly photoshopped Oct 01 16:24:10 JakeWharton: Would you mind sharing the code for that Oct 01 16:24:14 looks really good Oct 01 16:24:18 I can't, sorry. Oct 01 16:24:20 lov evancharlton: works like a charm, the service was probably delaying the old code somehow Oct 01 16:24:31 exact up to the second Oct 01 16:24:53 teasing is fun Oct 01 16:24:58 it's a ViewGroup with a Button + TextView and then some code that looks a lot like the dragging code in ViewPager Oct 01 16:26:27 thanks for the tip, I'll look into that later Oct 01 16:26:27 mi6_x3m: :D Oct 01 16:26:43 evancharlton: damn I wasted my whole day for this, it's always better to ask first Oct 01 16:27:19 mi6_x3m: no problem; it's always good to stop someone before they do something foolish like leave a service running all the time :) Oct 01 16:29:03 yeah well it was running already :D :D Oct 01 16:30:20 mi6_x3m: but you presumably didn't ship it to users yet, haha Oct 01 16:30:35 i have implemented a class that implements onEditorActionListener...so that i can get rid of the soft keyboard when the user presses 'DONE'. (its and editText) ..so in the class with this editText i have this code on the onCreateMethod: http://pastebin.com/aEC92ceP Oct 01 16:31:03 evancharlton: nope, I have to battle other things as well, it's a huge cross-platform game, sadly with Facebook integration Oct 01 16:31:03 now my question is how to keep the reusablity of DoneOnEditorActionListener (my class that implemented another) Oct 01 16:31:19 so that i can start various activities at diff points of my app Oct 01 16:34:00 make it abstract and add a method onDonePressed() or something Oct 01 16:34:12 hello everyone! Oct 01 16:34:33 make what abstract JakeWharton? Oct 01 16:34:42 your class you implemented Oct 01 16:34:43 panegyric: an abstract implementation of DonOnEAL Oct 01 16:34:54 oh got it thanks Oct 01 16:35:03 I am trying to customize a Tab widget but I don't know how to change the color of the tabStrip (this is the horizontal line at the bottom of the tabs). Any idea? Oct 01 16:35:18 it's a state-list drawable Oct 01 16:35:23 (sadly, camelcase auto-complete doesn't work in irssi. I should write an irssi plugin to do that for me.) Oct 01 16:35:34 which is specified on the theme (or optionally as a style on the widget itself) Oct 01 16:35:55 evancharlton: did you try to hit alt+space a bunch of times and notice that it wasn't autocompleted? Oct 01 16:36:07 JakeWharton, are you talking to me? Oct 01 16:36:13 shibakaneki: yes Oct 01 16:36:15 or do I press control space Oct 01 16:36:16 I don't even know Oct 01 16:36:20 thank you Oct 01 16:36:30 so I will dig into the theme Oct 01 16:36:36 yes, its C-sp Oct 01 16:37:55 fn0rd: no, I knew it wouldn't work, but I was too lazy to type out the full class name, haha Oct 01 16:38:38 how do i instanitate an abstract class Oct 01 16:38:59 and JakeWharton can you tell me how to do that onPress function Oct 01 16:39:01 can't. you need to first create a concrete implementation of it. you might want to use anonymous classes to do this. Oct 01 16:39:20 like, when you do new OnClickListener() { ... } -- do that. Except with your custom class. Oct 01 16:40:00 ahhh Oct 01 16:40:02 im so confused Oct 01 16:40:07 with the code that i had Oct 01 16:40:14 how can i make it reusable Oct 01 16:40:24 1. declare the class abstract Oct 01 16:40:34 evancharlton: do I need to cancel previous request each time I register a new one? Oct 01 16:40:37 or will it override? Oct 01 16:40:40 2. declare a method called onDonePressed() make it abstract. Oct 01 16:40:50 3. Do the same thing you do with OnClickListener. Oct 01 16:41:08 mi6_x3m: you should probably cancel. But if you want this to fire every day at 8am, set a repeating alarm, once. Oct 01 16:41:27 evancharlton: yeah but the problem is the "once" Oct 01 16:41:31 how to check if it already exists Oct 01 16:41:47 I could cancel and re-add Oct 01 16:42:52 mi6_x3m: you can't check if it exists; I'm not familiar enough with your app workflow to tell you how to do it just once Oct 01 16:42:56 but yes, cancel and add is fine, too Oct 01 16:46:38 omg Oct 01 16:46:41 im so confused Oct 01 16:46:49 should i make my class abstract Oct 01 16:47:07 because then the function i have in the other class wont work Oct 01 16:47:56 o_O Oct 01 16:48:05 panegyric: I think that you need to learn java first. Oct 01 16:48:12 if you don't know what abstract is, learning that is step 0. Oct 01 16:48:29 abstract cannot be instantiated right Oct 01 16:48:30 http://docs.oracle.com/javase/tutorial/java/index.html Oct 01 16:48:37 that's correct; it's abstract. Oct 01 16:48:43 PLEASE learn OO. Oct 01 16:48:52 ? Oct 01 16:48:54 ok... Oct 01 16:48:57 anyway Oct 01 16:49:06 Object Oriented Programming ;) Oct 01 16:49:34 no i got that Oct 01 16:49:53 its just i want to know how to do what fn0rd was telling me Oct 01 16:51:56 Have your superclass be abstract, and have concrete subclasses that you instanciate. Oct 01 16:57:41 ohh Oct 01 16:57:44 thanks lov Oct 01 16:58:03 so i wouldnt have my superclass implement another class the way i do do i Oct 01 16:58:11 if im going to make it abstract Oct 01 16:58:42 I really don't know what your codebase looks like but w/e Oct 01 16:59:02 the idea is that you've got code that multiple classes will use, in a way where it makes sense for them to have a common ancestor which itself shouldn't be instanciate Oct 01 16:59:05 *instanciated Oct 01 16:59:14 e.g. Human, Dog, and Cat extend Mammal Oct 01 16:59:30 Mammal is abstract, because there's a mammal is a classification not a thing Oct 01 16:59:44 ohhhh Oct 01 16:59:47 but mammal is a thing Oct 01 16:59:50 Mammal frankenstein = new Mammal() { ... } Oct 01 16:59:56 got it lov Oct 01 16:59:57 thanks Oct 01 17:00:15 i think Oct 01 17:00:15 but Oct 01 17:00:19 can you look at my code? Oct 01 17:00:37 pastebin plz. Oct 01 17:00:47 i have implemented a class that implements onEditorActionListener...so that i can get rid of the soft keyboard when the user presses 'DONE'. (its and editText) ..so in the class with this editText i have this code on the onCreateMethod: http://pastebin.com/aEC92ceP Oct 01 17:02:31 anyway Mammal should be interface for me :P Oct 01 17:02:41 or abstract class Oct 01 17:03:05 public interface Mammal { void extractMilk(); void growHair(); } Oct 01 17:03:30 oh I'll just shut up Oct 01 17:03:53 birthLiveYoung()? need an exception for platypus and echida Oct 01 17:03:58 er, echidna Oct 01 17:03:58 I think most people would make Mammal an abstract class. Interfaces are more appropriate for behaviorish things Oct 01 17:04:52 this is because in java class hierarchy only one parent is allowed, whereas interface can be implemented more flexibly Oct 01 17:05:12 alankila: when to think about it.. yeah Oct 01 17:05:12 anybody anywhere can implement an interface Oct 01 17:05:26 multiple inheritance makes Hodapp sad. Oct 01 17:05:35 :D Oct 01 17:06:09 dont you like little performance issues ? :D Oct 01 17:07:35 is that you trying to be patronizing? Oct 01 17:07:57 panegyric: You probably don't want to make a superclass JUST for that line. Oct 01 17:09:07 there's even a whole traits-based programming model for java which some people use. They write code liks if (foo instanceof ITrait) where ITrait is the interface for some particular trait, and if yes, they cast the object and call some (single) method defined in that interface Oct 01 17:09:59 I personally don't like this style a whole lot, it might be better to think harder about how to shoehorn all your traits into the existing class hierarchy rather than implement something buckshot-like such as this Oct 01 17:10:35 people use instanceof by choice?! Oct 01 17:10:41 yes, absolutely. Oct 01 17:10:42 there's no evidence in the static method descriptions that being tagged with some specific interfaces causes magic things to happen. Oct 01 17:10:52 in particular, it's useful for equals() methods. Oct 01 17:11:02 if(obj instanceof ThisClass) { ... } Oct 01 17:11:03 that's not really "by choice" Oct 01 17:11:24 ok whatever Oct 01 17:11:35 I don't like what alankila suggest, mind you Oct 01 17:11:41 especially where interfaces are used as half-assed decorators Oct 01 17:12:12 yeah, ick Oct 01 17:12:12 lov i may want to use it over and over Oct 01 17:12:21 lov i want to make it resuable Oct 01 17:12:26 oh, for the world where Android uses Python ;) Oct 01 17:12:38 jython ? Oct 01 17:12:40 duck typing! Oct 01 17:12:50 quack! Oct 01 17:13:19 i think a good scala framework would be great (and very doable) Oct 01 17:13:25 have anyone written app in scala for android ? Oct 01 17:13:30 uh oh Oct 01 17:13:43 time for a scala love-in, where's whatshisface Oct 01 17:13:47 alankila: this sounds a lot like how COM does it... Oct 01 17:13:59 lov: I can fill in for him, I like Scala Oct 01 17:14:17 oh right it's alankila Oct 01 17:14:19 I was trying to learn scala Oct 01 17:14:22 you guys can all make out or something Oct 01 17:14:24 but didnt have much time Oct 01 17:14:25 lov: it's not Oct 01 17:14:32 I don't personally give much of a damn about scala Oct 01 17:14:33 looks nice anywy Oct 01 17:14:36 hmm. Oct 01 17:14:39 Who am I thinking of? :( Oct 01 17:14:40 alankila: why ? Oct 01 17:14:45 but...type inference Oct 01 17:14:53 gorudonu: looks too complicated to my taste. Oct 01 17:15:06 you can write apps like you do in java Oct 01 17:15:12 the low target of being better programming language than java is taken over by a high target of being too god damn smart :-p Oct 01 17:15:14 and slowly add some scala features Oct 01 17:15:32 you can write a scala program in java Oct 01 17:15:48 but overloading operators sometimes is nice feature Oct 01 17:15:49 *java syntax Oct 01 17:15:55 or lambdas Oct 01 17:15:59 miss linq from c# Oct 01 17:16:30 also, tuples are nice Oct 01 17:16:57 and partial functions Oct 01 17:16:59 ok, im done Oct 01 17:17:07 :) Oct 01 17:17:19 sampullman: do you know some nice web framework for scala ? Oct 01 17:17:22 rails-like Oct 01 17:17:25 nope Oct 01 17:17:26 gorudonu: standard answer is Lift Oct 01 17:17:34 I know lift Oct 01 17:17:43 Memory leak of instances of Movie : After many times Gausing GC (and after long time) non referenced instances of Movie stay in memory Oct 01 17:17:45 but AFAIK it doesnt have CRUD generator Oct 01 17:18:13 personally I tried play framework v2 Oct 01 17:18:20 it doesnt have curd generation Oct 01 17:18:28 and integration with eclipse is... bad Oct 01 17:20:14 bingels: have you created your test case package yet? Oct 01 17:20:25 if no, do that and come back. Oct 01 17:23:03 im on the way Oct 01 17:45:11 if I create a class that inherits ViewGroup, can I instantiate it from XML? Oct 01 17:45:52 omg lov i desperately need help with this Oct 01 17:46:19 im still trying to figure out that thing Oct 01 17:46:26 ok as of now Oct 01 17:46:46 when the user enters text and presses done on the soft-keyboard , the keyboard gets removed Oct 01 17:46:47 awestroke: yes Oct 01 17:47:01 sampullman: fantastic. Thanks Oct 01 17:47:18 but how do i make it go to another activity from there Oct 01 17:47:41 awestroke: http://developer.android.com/guide/topics/ui/custom-components.html Oct 01 17:48:43 panegyric, so catch the editor action for done Oct 01 17:48:46 and launch another activity Oct 01 17:51:31 anyone knows of some channel where people where people who rip open their android hardware can be found Oct 01 17:54:08 Loonacy: /me has sort of wondered that, Oct 01 17:54:33 ##electronics ##edev, ... Oct 01 17:55:04 I am in ##electronics at the moment I type ythis message Oct 01 17:55:34 no you're not Oct 01 17:55:35 * End of /MOTD command. Oct 01 17:55:35 * [Looney] (~Looney@unaffiliated/fahadmanxoor): Looney Oct 01 17:55:35 * [Looney] #android-dev Oct 01 17:55:35 * [Looney] pratchett.freenode.net :Rennes, France Oct 01 17:55:35 * [Looney] is using a secure connection Oct 01 17:55:36 * [Looney] is logged in as FahadManxoor Oct 01 17:55:38 * [Looney] End of WHOIS list. Oct 01 17:55:42 neat Oct 01 17:55:46 is there a default icon i can use for notifications? Oct 01 17:56:06 Yes he is, please also don't paste > 3 lines in here. Oct 01 17:56:07 I can send you a screen shot messages I typed there with the timestamps Oct 01 17:56:26 yeah, he's totally there Oct 01 17:56:28 please also note that irc channels can have flags that prevent them from showing up via /whois Oct 01 17:56:49 I even replied to a question before you did whois Oct 01 17:56:55 panegyric: Look up the documentation for the edittexts; in particular how to change what the keypresses do. Oct 01 17:57:01 ...and the plot thickens Oct 01 17:57:08 my /whois shows him in ##electronics Oct 01 17:57:24 lov: thanks for adding this thing to my knowledge, I mean the flag things Oct 01 17:57:58 Is there a compatability library bringing CookieManager to API level 8? Oct 01 17:58:16 panegyric: http://developer.android.com/guide/topics/ui/controls/text.html Oct 01 17:58:17 and also add ##hardware to this whois as wel Oct 01 17:58:17 I've implemented my own, but sometimes it isn't called, so I'm apparently doing something wrong. Oct 01 18:02:08 no lob Oct 01 18:02:10 no lov Oct 01 18:02:20 as soon as my code from removing the kyboard is gone Oct 01 18:02:30 i want it to switch the activty if the text is "valid" Oct 01 18:02:45 you can't do that. Oct 01 18:02:47 it's also a terrible idea. Oct 01 18:02:49 please don't do this. Oct 01 18:03:33 panegyric: I really, really strongly recommend that, before you go any further Oct 01 18:03:35 Are you sure you want enter? Are you sure you don't want the "DONE" editor event? Oct 01 18:03:42 read this: http://developer.android.com/design/index.html Oct 01 18:03:51 and Oct 01 18:03:53 read this: http://developer.android.com/training/index.html Oct 01 18:04:02 Do the "Getting Started" tutorials, at a minimum. Oct 01 18:04:17 but having the activity change when the soft keyboard disappears is a terrible idea Oct 01 18:04:27 it also ignores that there are devices with hardware keyboards, where a soft keyboard WILL NEVER APPEAR. Oct 01 18:07:53 wait lov Oct 01 18:07:56 what you reccomend i do Oct 01 18:09:07 freeone3000 there is a DONE editor event? Oct 01 18:09:18 i kind of made my own Oct 01 18:09:43 by declaring a class that implements onEditorActionListener Oct 01 18:11:17 panegyric: Yes, that's the one. You listen for it to be DONE, and fire whatever - but usually, if the user wants to do something, there's an indication. Try inputType="search" for an example. Oct 01 18:11:22 and implementing the onEditorAction inside of it Oct 01 18:11:50 will by valid text Oct 01 18:11:51 i meant Oct 01 18:12:01 well i have an editText where user enters his username Oct 01 18:12:11 i will have to check my sql database to see if its taken Oct 01 18:12:22 and if it's not go to next activity Oct 01 18:12:41 No. If it's not, provide a visual indication of such, and enable the button to go to the next activity. Oct 01 18:12:46 so i already had inputType=text (but i dont think i have to) Oct 01 18:13:00 You do. Oct 01 18:13:07 why Oct 01 18:13:31 Because you must specify the inputType attribute for all TextEdit objects. Oct 01 18:13:49 oh ok thanks well i did Oct 01 18:13:53 but Oct 01 18:14:02 how do i enable the button Oct 01 18:14:07 to go to next acitvity Oct 01 18:14:10 this might be novice Oct 01 18:14:13 but because Oct 01 18:14:19 i have a separate class file Oct 01 18:14:25 for the onActionEditor Oct 01 18:14:39 :) Oct 01 18:14:40 onEditorActionListener* Oct 01 18:15:05 oh wait Oct 01 18:17:31 waht are the 2 parameters Oct 01 18:17:40 Intent intent = new intent(a,b) Oct 01 18:17:45 im looking it up Oct 01 18:17:54 http://developer.android.com/reference/android/content/Intent.html Oct 01 18:17:57 but cant find it Oct 01 18:18:04 urgh im so frustrated with my stupid self Oct 01 18:18:08 panegyric: It's right there. Oct 01 18:18:50 ? Oct 01 18:18:53 dont see it Oct 01 18:19:04 i've got a fork of a project on my github. in order to pull in new changes from the original to mine, is it possible to run a pull/merge directly on github? or do i have to 'git pull real_proj/branch' 'git push my_proj/branch' Oct 01 18:19:26 oh got it Oct 01 18:34:22 I'm writing software that's going to do some basic service discovery on LAN and right now I want to collect the IP's of all connected computers.. Would it be a good idea to ping the broadcast adress? Oct 01 18:35:23 what if people have turned their icmp port Oct 01 18:35:29 Quick question. If I call Activity for result, and I push back menu, is onActivityResult called? Oct 01 18:35:31 how will you get to them Oct 01 18:35:42 Balky: yes. Oct 01 18:35:54 Cool Oct 01 18:36:23 Loonacy: Then the user can enter an IP adress manually.. This would just be for convenience.. Oct 01 18:36:24 I meant, turned the ports off xarxer Oct 01 18:36:34 Looney* Oct 01 18:36:43 manually Oct 01 18:36:53 please elaborate Oct 01 18:37:37 Looney: If the user cannot find his or her computer, he or she can press a button which allows him or her to enter an IP adress manually.. Oct 01 18:37:50 if I were to accomplish the feat you intend to do, I would keep track of ARP requests and responses Oct 01 18:38:32 intent.putExtra(EXTRA_USERNAME, userName); //this is giving me an error telling me to make userName a local variable...why does it have to be a local variable?! Oct 01 18:38:51 Looney: Doesn't a ping to broadcast generate ARP requests? Oct 01 18:38:56 and what happens next when user enters the IP Oct 01 18:38:59 nope Oct 01 18:39:10 ping is an icmp packet Oct 01 18:39:21 Looney: The software would try to connect, if it fails, it fails.. Oct 01 18:39:33 connect to what port Oct 01 18:39:47 Looney: So you'd just stick around and wait for ARP packets? Oct 01 18:40:06 intent.putExtra(EXTRA_USERNAME, userName); //this is giving me an error telling me to make userName a local variable...why does it have to be a local variable?! Oct 01 18:40:21 well, if I am interested in hearing whats happening in my LAN, i.e., collision domain yes Oct 01 18:40:22 >_< Oct 01 18:40:39 for other scenarios, one needs to do some brainstorming Oct 01 18:40:42 panegyric: we don't know what the scope of userName is. Oct 01 18:40:53 panegyric: either this is a linter error (unlikely) or you don't actually know how to write java. Oct 01 18:40:56 consider going to #java Oct 01 18:41:20 lov: don't send him there! they'll chase him up a tree and light it on fi- Oct 01 18:41:21 oh Oct 01 18:41:22 carry on Oct 01 18:41:35 hmm, some of my images look, erm, squished, even though i have scaleType centerInside Oct 01 18:41:35 :> Oct 01 18:41:41 does this imply that th image just is just actually squished? Oct 01 18:42:06 just just just, brain tired Oct 01 18:42:22 whats wrong with this: http://pastebin.com/sRWVS40N Oct 01 18:42:24 kaneda^: I had to do fitCenter to keep aspect right Oct 01 18:42:33 Hodapp, i'll try that, ty Oct 01 18:42:35 well, fitStart and fitEnd did too Oct 01 18:42:56 lov userName is created it's the way startActivity works Oct 01 18:43:02 it's weird though, some images come out lovely, some come out squished Oct 01 18:43:04 ohhh Oct 01 18:43:10 im trying to JNI interface a very simple native function. however when I load the .so library with System.load("/full/path/to/lib.so") i get a "java.lang.UnsatisfiedLinkError: Cannot load library: load_segments[906]: 3136 failed to map segment from ... " error Oct 01 18:44:52 Hodapp, i think it's just squished Oct 01 18:45:03 but i'm LOOKING at the damn image and it isn't squished Oct 01 18:45:04 SOMEBODY PLEASEEE Oct 01 18:45:11 FIGURE THIS OUT FOR ME< IVE BEEN DOING THIS ONE THING ALL DAY Oct 01 18:45:16 i have python on the server side resizing the images, that must be it Oct 01 18:45:32 reenignEesreveR: did you follow the instructions in the NDK guide? Oct 01 18:45:34 panegyric: I don't see the userName variable DECLARED anywhere. Oct 01 18:45:37 again, what is the scope? Oct 01 18:46:02 sampullman, i hope so Oct 01 18:46:22 frankly, I wouldn't make this part of your action listener; I'd make a startMainMenuActivity method in your outer class, and call that from the listener. Oct 01 18:46:24 lov forget that Oct 01 18:46:25 much cleaner. Oct 01 18:46:28 u reembemr my issue right Oct 01 18:46:31 not really. Oct 01 18:46:34 you have a few. Oct 01 18:46:59 lols, bazinga Oct 01 18:47:12 reenignEesreveR: what's a .so again? is it just an object file? Oct 01 18:47:16 i can't remember Oct 01 18:47:49 http://pastebin.com/ZzbTqkca Oct 01 18:47:52 sampullman, it's a shared library Oct 01 18:48:00 my question is in the comments lov Oct 01 18:48:16 so compiled c/cpp then? Oct 01 18:48:22 sampullman, its a compiled library file Oct 01 18:48:25 effectively, yes. Oct 01 18:48:56 panegyric: use an inner class Oct 01 18:49:05 inner classes will have synthetic access to the outer classes Oct 01 18:49:10 I don't think you can include that directly from java Oct 01 18:49:13 yes, indeed, through parent.this Oct 01 18:49:21 alternately, you have to pass the class with relevant content to your new class Oct 01 18:49:31 :S Oct 01 18:49:39 lov can i PM you? Oct 01 18:49:43 sexy time Oct 01 18:49:47 (e.g. pass your WhateverActivity as an argument to your DoneOnEditorActionListener's constructor) Oct 01 18:49:50 please don't. Oct 01 18:49:54 sampullman, what do you mean by "include directly"? Oct 01 18:49:59 panegyric: I seriously, uncomedically suggest that you go to #java Oct 01 18:50:07 these are java fundamental questions, not android questions. Oct 01 18:50:18 if you're not sure what's going on, the problem is that YOU DON'T KNOW JAVA. Oct 01 18:50:23 it's not Android specific at all! Oct 01 18:50:30 reenignEesreveR: with System.loadLibrary() Oct 01 18:50:34 mm Oct 01 18:50:39 folks in #java will be much happier to help with standard java questions Oct 01 18:50:45 alternately, google. Oct 01 18:50:47 * Hodapp snickers Oct 01 18:50:57 yeah, but im doing "System.load", instead of "System.loadLibrary" Oct 01 18:51:25 by inner class you mean an inherited class? Oct 01 18:51:33 #java Oct 01 18:52:04 reenignEesreveR: http://stackoverflow.com/questions/6165813/using-my-own-prebuilt-shared-library-in-an-android-ndk-project Oct 01 18:52:09 that might be your answer Oct 01 18:52:20 panegyric, he means an inner class Oct 01 18:53:11 basically, i think you're Android.mk file isn't correct Oct 01 18:53:27 panegyric: no, I don't. Oct 01 18:53:35 the fact that you don't know what this means, means that you really need to learn java. Oct 01 18:53:48 ok ill check out the java channel Oct 01 18:53:51 please do. Oct 01 18:54:02 see also http://docs.oracle.com/javase/tutorial/java/javaOO/innerclasses.html Oct 01 18:54:31 panegyric: here's a great resource http://www.khanacademy.org/cs/tutorials/programming-basics Oct 01 18:54:31 ha im already there Oct 01 18:54:33 dont get it though Oct 01 18:55:47 <|Repox|> I was looking at http://developer.android.com/guide/topics/data/data-storage.html and I'm not sure what would be my best option. I need to store a number and a date. The number will decrease in value troughout the day and when the day is over, the number will reset. Would storing the number in a file be a bad idea? Oct 01 18:56:34 |Repox|: sharedpreferences Oct 01 18:56:38 |Repox|, if it's just a single value (and you don't need history), I might suggest SharedPreferences Oct 01 18:56:52 =( I so slow Oct 01 18:56:59 <|Repox|> Thanks for the tips, guys. I'll take a look at that. :) Oct 01 18:57:22 sampullman, im not sure how would that be relevant Oct 01 18:57:45 sampullman, i already have a .so, its just that it won't load at runtime Oct 01 19:00:07 plesseee Oct 01 19:00:07 love Oct 01 19:00:13 help me out Oct 01 19:00:18 theyre asking me to come here Oct 01 19:00:22 at #java Oct 01 19:00:24 reenignEesreveR: I'm under the impression that the .so file must be in /approot/lib, and there must be an Android.mk file, if you want to load it at runtime Oct 01 19:00:36 omg im so frustratedddd Oct 01 19:00:52 with these two lines being the relevant ones Oct 01 19:01:06 LOCAL_MODULE := MyLib Oct 01 19:01:06 LOCAL_SRC_FILES := MyLib.so Oct 01 19:01:07 panegyric, i'm sure you're not too far from getting kicked again Oct 01 19:01:11 aaah ... i should have mentioned that I'm porting java application to android and i dont have the android structure of the app in place; I manually invoke the DalvikVM in emulator Oct 01 19:01:12 panegyric, most ppl take a class or read a book... it's unreasonable for us to teach you jave (plus we have no vested interest) Oct 01 19:01:16 another victim of ADD Oct 01 19:01:16 go read a quick java tutorial Oct 01 19:02:20 reenignEesreveR: what does manually invoking the DalvikVM mean? Oct 01 19:03:14 sampullman, # adb shell dalvikvm -cp "/sdcard/mydir/" HelloWorld Oct 01 19:03:15 :) Oct 01 19:03:25 I'm having a problem with my admob plugin for phonegap, when I rotate the device I am destroying the ad and then creating a new one more appropriate to whatever the size is. But the original ad sticks around for some reason, even though I am calling adView.destroy() on it Oct 01 19:03:33 any ideas on how I get rid of it? Oct 01 19:04:03 cbarrett1, foo.setVisibility(View.GONE) ? Oct 01 19:05:11 kaneda^: is setVisibilty part of the view, or the activity? Oct 01 19:05:16 view Oct 01 19:06:23 reenignEesreveR: gotcha. well, assuming you compiled HelloWorld on your comp and copied it to the emulator, are you sure the abs. path of the library is correct? Oct 01 19:06:44 it sounds like it just didn't find the library were you told it to look Oct 01 19:06:51 kaneda^: I'll give that a try Oct 01 19:07:27 cbarrett1, hokay Oct 01 19:07:47 i tried layout.removeView(adView) but that didn't make any difference Oct 01 19:07:55 over time eventually the old ads do disappear on their own.... Oct 01 19:08:03 leaving just the latest Oct 01 19:09:50 cbarrett1, you can also call refreshDrawableState i believe Oct 01 19:09:53 in an emergency Oct 01 19:10:32 kaneda^: setting the visibility works! which is a better solution do you think? Oct 01 19:10:34 if refresh works Oct 01 19:11:17 cbarrett1, not sure Oct 01 19:11:21 k Oct 01 19:12:20 panegyric: explain that you're having trouble with inner classes. Oct 01 19:12:25 Don't mention android at all. Oct 01 19:12:34 startActivity is just a method in Activity Oct 01 19:13:55 Working on my first Android Service app. Having some difficulties cleaning it up from a sub-view in a tab selection using a button or dropdown list due to static requirements >_> better opinions appreciated! Oct 01 19:14:24 hello Oct 01 19:16:35 mConnection is under Main.java (extends TabActivity), the button is under MyActivity.java (extends Activity). It is preferred to have a simplistic status selector. Offline selection would unbind the service (essentially killing it). Oct 01 19:16:42 I just love watching the emulator slowly start... Oct 01 19:18:59 hi guys, what is the correct way to update a widget from a service? Right now i have the methiod declared as static and just call it, but i have a feeling there is a more correct way to do this? Oct 01 19:19:01 sigh. getting an XML document in an asynctask should be bread&butter in android, why do I have to write hundreds of lines of boilerplate code? Oct 01 19:19:03 Komak57: Don't use tabs; they're deprecated because they're old and busted. use Fragments and Viewpager. Oct 01 19:19:39 tabhost + fragments Oct 01 19:19:51 just don't use tabhost period ._. Oct 01 19:19:58 i use tabhost, it's OK Oct 01 19:20:06 gets the job done Oct 01 19:20:12 ._. Oct 01 19:20:13 <|Repox|> I tried saving some information in my SharedPreferences - http://pastebin.com/YKz3L52r - the code doesn't fail, but the data isn't saved (todays_number and todays_use) even though I commit the edits. Am I missing something? Oct 01 19:20:15 and you can pretty easily mess with all the functinoality, naming, animations Oct 01 19:20:50 |Repox|: how do you know that nothing is getting saved? Oct 01 19:21:45 <|Repox|> lov: When running the app again, the data used is the default values from the prefs.getInt("todays_number", 0); Oct 01 19:23:15 Hey. Oct 01 19:23:20 "In Eclipse, press Ctrl + Shift + O to import missing classes" Oct 01 19:23:25 what does mean ? Oct 01 19:23:37 <|Repox|> going blind... nevermind.... Oct 01 19:23:52 <|Repox|> I used the wrong preference key for my check... Oct 01 19:24:09 bluesm: uh.... Oct 01 19:24:23 bluesm: try it and see what happens. Oct 01 19:25:39 lov: Import the class I've created in following code ? Oct 01 19:26:36 bluesm: any missing dependencies in the file that you're working on will be auto-imported at the top. Any unnecessary imports will be removed. Oct 01 19:27:20 lov: Wow. That is smart... Oct 01 19:27:46 that is smart, and if you do foo.package.* it will only import what is being used Oct 01 19:27:48 also very smart Oct 01 19:27:55 lov: If not Eclipse I would have to make it manually ? Oct 01 19:30:46 bluesm: if you were using a text editor, probably. Most IDEs will handle this. Oct 01 19:33:16 lov: Ok. Thank you very very much. Oct 01 19:33:34 lov: Could I get to this particular imported code manually ? Oct 01 19:37:55 huh? Oct 01 19:38:02 Yes, you can manually add the import lines if you'd like. Oct 01 19:41:05 I know this is a shot in the dark and is probably impossible, but is it possible to connect the phone to a computer and make them appear on the same network via the USB cable? Sort of emulating a local network... Oct 01 19:42:25 it is possible but not the topic of this channel nor likely to be easy, potentially requiring engineering. Oct 01 19:42:38 lov: I mean look into this dependencies. Oct 01 19:43:14 fn0rd: Nothing I could do today in other words :] Oct 01 19:45:03 xarxer: weren't you asking this last week? Oct 01 19:45:34 lov: Nope.. Thought of it just now.. Oct 01 19:48:39 git the stock camera building standalone with the SDK Oct 01 19:48:43 er, got rather Oct 01 19:48:58 xarxer: ah, must be someone else. Someone was told that just plugging in a phone automatically makes a VPN. Oct 01 19:49:11 xarxer: there's wifi/usb tethering, but that's not really what you're thinking of, probably. Oct 01 19:49:21 does anyone know of a channel for Andengine development? Oct 01 19:49:24 you can use adb forward, but that's also not necessarily the same. Oct 01 19:50:56 lov: No.. I don't have a local network so the phone is using the carriers 3G network right now, and I need it to communicate with my computer at a higher speed.. So I'd want them to appear on the same local network using the USB-cable if that is possible.. Oct 01 19:51:19 that depends on the brand Oct 01 19:51:22 my htc does that Oct 01 19:51:38 the samsung galaxy note doesn't seem to have that option Oct 01 19:52:02 Snuffel: If you plug it in with the option "just charge"? Oct 01 19:52:16 never tried that on the note Oct 01 19:52:23 tbh Oct 01 19:52:59 Snuffel: As for your HTC? Oct 01 19:53:31 on my HTC I have an option "USB passthrough" or something Oct 01 19:53:40 which is the opposite of tethering Oct 01 19:53:50 so the phone uses the LAN the computer is on Oct 01 19:53:57 xarxer: it sounds like you just want to tether? Oct 01 19:54:02 i use it to test a mobile webapp Oct 01 19:54:02 just get easytether and tether over adb Oct 01 19:54:08 or clockworkmod tether Oct 01 19:54:22 doesn't tether make it an accesspoint? Oct 01 19:54:27 well Oct 01 19:54:37 doesn't it share the phone's connection with the pc? Oct 01 19:54:51 yes, it is starting to sound like that is what he wants Oct 01 19:54:57 I think he may have worded it poorly the first time. Oct 01 19:55:20 i think he wants the phone in the same LAN as the pc is now Oct 01 19:55:33 fn0rd: So then I will get a new network interface on my computer which the phone is virtually connected to? (Observe that I do not want to use the phone as a network interface, merely communicate with it via USB as if it was via network) Oct 01 19:55:41 No Oct 01 19:56:06 my phone just gets an IP through dhcp Oct 01 19:56:10 you can use adb Oct 01 19:56:10 in the network the pc is also in Oct 01 19:56:25 If the phone was on wireless, you could use adb over tcp/ip. Oct 01 19:56:32 time for bed Oct 01 19:56:38 but you get something like a socket directly over usb with adb. Oct 01 19:56:55 if you wrote drivers that piped everything through adb, it could appear as a network interface, in theory Oct 01 19:57:41 sampullman, yes the path is correct because if i deliberately give incorrect path, it won't load at the first place Oct 01 19:57:41 hi guys. i've currently implemented my own sort of listView. my custom listview extends linearLayout, and now i'm searching for a proper way to fill it with data. should i do this with a simple baseadapter, and if yes, how can i set my adapter inside my linearLayout ? Oct 01 19:57:42 hi Oct 01 19:57:58 fn0rd: Hmm okay.. So if I did this, how would I communicate with the computer from an application on the phone? Oct 01 19:58:31 xarxer: you won't be able to do it unless you can write your own kernel modules and flash a custom rom. Oct 01 19:58:46 I'd ask in an appropriate channel, like #android-root Oct 01 19:58:50 Im a iOS whore goin Androider hehe, I use QuickDialog library on iOS side to create and capture registration data, e.g. a dynamic registration form, is there a library in Android that can do the same thing? the reg form I need to make is defined by a JSON blob, thank you in advance Oct 01 19:58:50 maybe someone else did it already Oct 01 19:59:10 Then that's not what I'm looking for unfortunatly Oct 01 19:59:24 only thing i saw so far is maybe QuickActions that could do this on android Oct 01 19:59:28 well your question is off-topic for the channel, we discuss development topics. Oct 01 19:59:37 good luck Oct 01 19:59:42 fn0rd: Thanks! Oct 01 20:03:13 hi guys. i've currently implemented my own sort of listView. my custom listview extends linearLayout, and now i'm searching for a proper way to fill it with data. should i do this with a simple baseadapter, and if yes, how can i set my adapter inside my linearLayout ? Oct 01 20:05:04 mrmaffen: if your class was actually consistent with the type of contract a lv had, it would device from AdapterView Oct 01 20:05:10 *derive Oct 01 20:05:58 Naming idea: InefficientListView Oct 01 20:06:02 why are you developing your own listview.... Oct 01 20:07:11 g00s: thanks that already helped a lot Oct 01 20:07:29 i want to create my own custom listview because i didn't like the way it displayed my listItems Oct 01 20:07:47 to be more clear: how it displayed my list in general Oct 01 20:07:50 sounds like a case of doing it wrong Oct 01 20:08:11 yea could be. i'm still learning ^^ Oct 01 20:09:01 so basically what i want to do is displaying multiple lists within one listview. each list should have a separating header Oct 01 20:09:24 you could do that with a single list view Oct 01 20:09:35 also i want to be able to not only show each list within my listview like a simple list Oct 01 20:09:44 but i want to be able to use a grid layout to show my elements, too Oct 01 20:09:49 is there a way to boot the android emulator into "safe mode"? Oct 01 20:09:57 (for API levels that support a safe mode) Oct 01 20:10:01 use a different adapter Oct 01 20:10:07 for your grid vs list views Oct 01 20:10:41 but you're saying it possible to populate a simple listview with several different lists, and different ways of showing the list also ? Oct 01 20:10:52 sure, it depends on your adapter Oct 01 20:11:16 you could create a list adapter that has 2 different view types, one for normal list items, one foryour header, and just have it appear as a single list to your listview Oct 01 20:11:44 kk thanks man !:) Oct 01 20:11:49 and for your gridview, use whatever adapter mechanism would be appropriate Oct 01 20:12:21 good thing somebody was here to stop me :D Oct 01 20:12:36 <|Repox|> I'm having some issues using SharedPreferences through the PreferencesActivity with a preferences.xml file. I the data a user entered as a double. This is how I retrieve it: double age = Double.valueOf(prefs.getString("age", "0")); If I, through the activity, set the value to empty, I get this stacktrace: http://pastebin.com/Yp8Ptv9X. Oct 01 20:13:00 <|Repox|> Can I easily avoid making a lot of if sentences to avoid this error? Oct 01 20:13:41 pfn: thanks again, i'm off to hack again Oct 01 20:14:11 |Repox|, no Oct 01 20:14:32 <|Repox|> pfn: Ohh.. okay, thanks :) Oct 01 20:19:06 i'm really looking forward to Jakob Nielsen's new book on mobile usability http://www.peachpit.com/store/product.aspx?isbn=0321884485&w_ptgrevhome=Slide4_MOBILEPO Oct 01 20:19:44 there isn't too much in the area; i read Mobile Frontier, but it was a very high level overview of mobile UX Oct 01 20:20:00 oreilly has some lower level UI pattern books out Oct 01 20:20:08 another good one was BraveNUI World Oct 01 20:28:03 I tell ya, Android is a lot more cumbersome to code than Windows Phone where you drag, drop, code. Oct 01 20:31:02 the question is... how to code once, to rule them all? Oct 01 20:31:18 So far there is only one answer to my vvast knowledge. Oct 01 20:33:00 waste knowledge? Oct 01 20:33:45 Does anyone know of a project that uses the MediaPlayer api (and/or) a VideoView to play HTML5 video on Android? Oct 01 20:33:58 :) Oct 01 20:34:47 kaneda^: refreshDrawableState is on layout? Oct 01 20:34:54 huh? Oct 01 20:34:57 I have used html5webview extensively, but on some devices it plays video outside of the webview. Oct 01 20:35:08 you recommended refreshDrawableState like hours ago Oct 01 20:35:39 Does anyone know of a working html5 webview source on google code that uses MediaPlayer? Oct 01 20:36:14 What I should Know about JAVA Oct 01 20:36:20 I got orientation working fine where it gets rid of the old ads, but there's 1 screen of the app that shouldn't have any ads, so I'm deleting the banner but for some reason it's still there… doesn't make any sense Oct 01 20:36:25 kaneda^: Oct 01 20:36:25 before I start to develop apps? Oct 01 20:36:33 do you know java? Oct 01 20:37:24 cbarrett1: Not. I know a little only Javascript (I know it is completely different language) Oct 01 20:37:28 cbarrett1, you would do parentOfAdSpace.refreshDrawableState() after you removeView Oct 01 20:37:35 not sure if this will work for you though Oct 01 20:38:16 kaneda^: right now I'm doing: adView.setVisibility(View.GONE); Oct 01 20:38:16 adView.destroy(); Oct 01 20:38:16 adView = null; Oct 01 20:38:18 You'll need to know the syntax (which javascript will help you with) and also how all the Object orientation stuff works. Classes, and objects and inheritance and so on Oct 01 20:38:36 cbarrett1, my intuition says that destroy and = null should not be used Oct 01 20:38:43 but i cant elaborate Oct 01 20:39:00 kaneda^: well destroy is what the docs recommend for adview Oct 01 20:39:12 but yeah, null is arbitrary on my side Oct 01 20:39:26 cbarrett1: ? Oct 01 20:40:04 destroy(), but = null? Oct 01 20:40:07 is it possible for a phone to have more than one (software) rotation vector sensor? Oct 01 20:40:40 yea Oct 01 20:41:06 hey am i talking now? Oct 01 20:41:07 yes! Oct 01 20:41:17 the docu says this sensor was updated in ICS to use the gyro and thus doesn't show up when there's no gyro Oct 01 20:41:19 you can have combinations of other sensor results in principle Oct 01 20:41:23 adviews? try System.exit(1); Oct 01 20:41:30 bluesm: android apps are written in java, so you need to learn it Oct 01 20:41:52 magnetomer + accellerometr can also give absolute rotation Oct 01 20:42:35 sampullman: Could you link me good course. Oct 01 20:42:42 sampullman: Not for completely beginner ? Oct 01 20:42:48 can anyone help me get started using the AVD's on eclipse? Eclipse won't let me run my app on my phone either Oct 01 20:43:13 bluesm: for android http://developer.android.com/training/basics/firstapp/index.html Oct 01 20:43:36 bluesm: for java http://docs.oracle.com/javase/tutorial/java/index.html Oct 01 20:43:38 SpeedEvil, yeah, sure, but consider a new ICS phone with gyro. then it'll have one of the newer software sensors. but will it also have one of the older too? Oct 01 20:43:58 bluesm: you probably should do some tutorials on Java at the very least Oct 01 20:44:14 EPG: sorry, I'm not properly awake Oct 01 20:44:27 EPG: there are lots of virtual senators Oct 01 20:44:46 sensors Oct 01 20:44:47 kaneda^: I'm not removing the view at this point, but I did try removing the adView from the layout and it didn't appear to make any difference. Perhaps I was missing a step or two though Oct 01 20:45:26 cbarrett1, not sure Oct 01 20:45:43 i'll get rid of adview = null, see if it makes any diff Oct 01 20:45:53 it wont Oct 01 20:46:02 but before you destroy you may want to remove and refresh drawable state Oct 01 20:46:20 EPG: I think your question can be answered most easily by looking at various build,props for different phones Oct 01 20:46:29 sampullman: Thank you very very much1 Oct 01 20:46:30 ! Oct 01 20:47:37 cbarrett1: So firstly tutorial from oracle. Yeap ? Oct 01 20:48:25 bluesm: http://docs.oracle.com/javase/tutorial/java/index.html and http://docs.oracle.com/javase/tutorial/essential/index.html and http://docs.oracle.com/javase/tutorial/collections/index.html Oct 01 20:48:32 bluesm: until you understand those codepaths, you should work on them Oct 01 20:48:42 head to #java for general (non-android-specific) java help Oct 01 20:49:13 can anyone help me get my devices set up to test my apps? Oct 01 20:49:24 lov: Ok. thank you. Oct 01 20:49:59 lov: Is http://codingbat.com/ would be good for practice ? Oct 01 20:51:16 EPG: 'sensor list' fro the market lists six 'sensor fusion' motion sensors on my nexus 7 Oct 01 20:51:29 err, 8 Oct 01 20:51:35 bluesm: that's an interesting site. Oct 01 20:52:30 SpeedEvil, interesing, do you have more info about them? Oct 01 20:52:32 bluesm: it seems to be a beginner's site, however. It just teaches the fundamentals of why you unit test. Oct 01 20:53:09 unit test? Oct 01 20:53:20 EPG: no, not looked into it, sorry Oct 01 20:53:30 speaking of unit tests, why is robolectric so stagnant seeming... would figure it'd be more up-to-date Oct 01 20:53:32 lov: unit test ? Oct 01 20:54:35 you might want to google that Oct 01 20:54:44 there'll be lots of terms you come up against that you won't know Oct 01 20:54:53 as you learn to program Oct 01 20:55:00 ^^ Oct 01 20:55:06 unit testing is extremely important. Oct 01 20:55:24 testing in general Oct 01 20:55:24 http://developer.android.com/tools/testing/index.html Oct 01 20:56:16 lov: Ok. Oct 01 20:56:21 lov: Thank you lov :) Oct 01 20:56:45 >____> Oct 01 20:57:10 To not feel guilty, I'm going to moan about mapfragments in my head a bit more Oct 01 21:11:09 how do you guys deal with an ad supported/paid version of an app? Oct 01 21:11:22 branches Oct 01 21:11:31 im deciding between keeping a (git) branch and forking/applying patches Oct 01 21:11:55 huh Oct 01 21:12:03 1 branch is all you need Oct 01 21:12:12 could you expand a little? Oct 01 21:12:21 patch both and use a toggle for some kind for the ad build Oct 01 21:12:33 whats the point of 2 branches? Oct 01 21:12:38 i'd rather avoid the toggle tactic Oct 01 21:12:46 probably better to have 1 branch, but factor the common functionality into a lib project or something; then have the deltas in 2 projects which reuse the lib project Oct 01 21:12:50 but its trivial Oct 01 21:13:03 trivial, but it hurts my soul Oct 01 21:13:08 werord Oct 01 21:13:14 it just seems wrong Oct 01 21:13:16 Oh yeh, having a library project is a neat solution Oct 01 21:13:18 your the person thats going to make the 2 builds Oct 01 21:13:35 theres are 2 targets not really 2 big different sets of code Oct 01 21:13:44 its just not worthy of a branch in any way Oct 01 21:14:00 or shared core libs if you like is cleaner.. Oct 01 21:14:22 g00s: that sounds like a good idea. it's basically what i was doing before, but with diffmerge instead of a lib project Oct 01 21:14:49 ins't 2 branches just more work for you? Oct 01 21:14:57 TheBunnyZOS: yes, i agree Oct 01 21:15:45 although it wouldn't be so bad, i'd just run a script to merge in changes in the master (paid) to a branch (ads) Oct 01 21:15:54 but yeah, lib project it is Oct 01 21:15:56 I have 1 code based ( game engine ) that builds 8 different apps ( data driven ) and I just use targets for each build. Oct 01 21:16:09 I still have to ship each game by hand anyhow Oct 01 21:16:27 just one example that really pretty easy. Oct 01 21:16:52 also with a Ad toggle thats dynamic you might use a DLC / IAP to unlock your ad free version Oct 01 21:17:01 sorry, what do you mean by 'targets for each build'? Oct 01 21:17:03 thats popular tactic that seems to work. Oct 01 21:17:45 that is true...however, i've heard of issues with the DLC/IAP method Oct 01 21:18:05 a lot of build systems or IDE will have a Project and then targets… so a target might be release vs debug. Oct 01 21:18:18 or Game1 Debug, Game1, Release, Game 2 Debug etc Oct 01 21:18:23 i see Oct 01 21:18:40 im still in the stone ages as far as build systems go Oct 01 21:18:45 I don't know how eclipse handles this if you are using that. Oct 01 21:18:50 nah Oct 01 21:19:10 or Im pretty sure make etc can do the saem Oct 01 21:19:19 probably, yeah Oct 01 21:20:10 Hi - what part of compiled android does the usb_storage_activity.xml code exist in? Specifically mount_button & unmount_button - http://source-android.frandroid.com/frameworks/base/core/res/res/layout/usb_storage_activity.xml Oct 01 21:21:16 Necrosan: framework-res.apk Oct 01 21:21:20 (almost certainly) Oct 01 21:25:44 evancharlton: sure - i mean the actual action the button does when pressed. I already found the layout :) Oct 01 21:26:24 look at the code? Oct 01 21:26:49 just grep for the ID Oct 01 21:26:50 Or does it make a call to settings.apk? Don't have the code, evancharlton Oct 01 21:26:56 I've done that against my binaries Oct 01 21:26:57 No dice Oct 01 21:27:26 what are you expecting to find in your binaries? Oct 01 21:27:29 it would be an int in the binary Oct 01 21:27:33 Howdy. Is there any way to malloc a big block of space outside the JVM? Working with large bitmaps... Oct 01 21:28:02 evancharlton: I searched the int... Oct 01 21:28:17 10203f2 Oct 01 21:28:44 Necrosan: sounds like you should actually get the source Oct 01 21:28:46 Not in settings apk, framework.jar or services.jar, or provider Oct 01 21:29:17 regardless I have to work with the binary - how about you help me out and grep your tree for that id? :) Oct 01 21:32:01 How many time I have to wait for getting many download of my first release ? How does it referenced in google play? Oct 01 21:32:18 raz86: that makes no sense Oct 01 21:33:20 Actually , I have released an application one week ago, but there is no download (no website yet) Oct 01 21:34:23 If you mean that you've published an application on Google Play, is should appear in the store within a few hours Oct 01 21:35:03 yes, but It doesn't appear at the top of the list :/ Oct 01 21:35:08 uh Oct 01 21:35:09 duh? Oct 01 21:35:27 Hi, do I need to make sure the designer i'm working with is using a legal copy of photoshop? Oct 01 21:35:43 Copter: for what? Oct 01 21:35:53 Copter: wut Oct 01 21:36:02 Estel: for the application design, buttons, background, images etc. Oct 01 21:36:07 If you're paying them, I'd be wary if they were cheap enough to not have a legit copy of Photoshop, but that's nothing to do with Android... Oct 01 21:36:52 that's normal, I know my application cant be first on the list.. but are there processes which push the application in the future? Oct 01 21:37:10 Indeed, just wanted to know if it is crucial and the images are being checked somehow of being legit. Oct 01 21:37:29 raz86: yeah, lots of great reviews, frequent updates, and lots of sales will do the trick ;) Oct 01 21:37:32 raz86: if it's good, yes Oct 01 21:37:52 is there a way to force an android activity to run as root (uid=0)? from a root shell, for example Oct 01 21:38:38 evancharlton : But if there is no downloading... they cant that is a super application Oct 01 21:38:46 cant know Oct 01 21:38:51 newsham: #android-root Oct 01 21:39:00 raz86: then why would they assume? Oct 01 21:39:12 raz86: if no one installs your app, why would Google assume it's any good? Oct 01 21:39:17 quite the opposite, in fact... Oct 01 21:39:19 estel: i'm not asking about rooting an android phone. Oct 01 21:39:26 isnt that what #android-root is for? Oct 01 21:40:41 it's for already rooted phones too Oct 01 21:40:54 alright, so, I have to use the forum/facebook/twitter/website for getting installations ? Oct 01 21:41:18 Yes. Link to it? Oct 01 21:41:50 zider: this is more of a dev question than a rooting question Oct 01 21:43:36 Java code never runs as root. Oct 01 21:44:06 hi all Oct 01 21:44:09 btbn: not true. I can invoke the dalvikvm directly from the cmd line to run java code as any uid Oct 01 21:44:12 a la http://www.milk.com/kodebase/dalvik-docs-mirror/docs/hello-world.html Oct 01 21:44:25 need some help with KeyListeners and InputFilters Oct 01 21:45:03 i have an editText, i've called addTextChangedListener(new PhoneNumberFormattingTextWatcher()); on it Oct 01 21:45:17 now i want to restrict user input to just numbers Oct 01 21:45:41 but I suspect that "android activities never run as root" might be true Oct 01 21:46:11 if i set the input type to "phone", or if i set it to use a DigitsKeyListener, that messes up the PhoneNumberFormattingTextWatcher from formatting the input Oct 01 21:48:18 I made a very simple to use slide-to-unlock view, but I copied much of stock android SlidingDrawer to make it. Android is Apache v2.0, what does that mean for me? The need to "state changes" confuses me Oct 01 21:48:19 newsham, suspect? it is absolutely true Oct 01 21:49:14 newsham, running dalvikvm isn't enough to get you to a UI Oct 01 21:49:58 newsham, if you wanted an integrated with root api, I'd build up a C library that forked stuff off that ran as root and communicated via an ipc mechanism, sockets, or intents, etc. Oct 01 21:50:09 pfn: you seem too sure. I thikn there are tricks you can play to get root execution, but I tink they're rather dirty. ie if you manually talk to the zygote and send it a message asking to run as root Oct 01 21:50:13 but i'm trying to avoid such tricks Oct 01 21:50:29 newsham, if you can hack zygote to support such a message... Oct 01 21:50:43 pfn: zygote by design accepts such messages. Oct 01 21:50:52 the activity manager sends it messages to ask it ot fire off new activity processes Oct 01 21:51:49 but not a message to launch a new activity process as root Oct 01 21:52:08 pfn: it accepts a uid and gid as part of the request Oct 01 21:52:17 the activity manager tells zygote which uid to launch a process as Oct 01 21:52:18 but it'll reject uid0 Oct 01 21:52:54 pfn: ahh. Oct 01 21:53:33 so i guess the only easy way to do it would be to have a kernel mod change the uid after the fact? :( Oct 01 21:53:52 why do you need this? Oct 01 21:54:02 anyone know how i convert a regular project into a library project? Oct 01 21:54:06 *how to Oct 01 21:54:14 sampullman, set the library.project flag in your project.properties? Oct 01 21:54:15 just tick "is library" Oct 01 21:54:19 is that it? Oct 01 21:54:22 yes Oct 01 21:54:25 contemplating the ability to run some tests that require uid=0 from inside a single activity that is already doing other tests Oct 01 21:54:29 well then Oct 01 21:54:42 versus having to spin them off as a separate C or dex application that runs frm the command line Oct 01 21:54:55 soley for the purpose of testing on special devices Oct 01 22:00:01 wish i knew about design patterns earlier D: Oct 01 22:05:04 can anyone help with my problem? Oct 01 22:14:47 hey y'all Oct 01 22:15:04 if I have a webview and I want to capture any time we do window.location inside that -- how would I do it? Oct 01 22:15:16 somebody help with this code: http://pastebin.com/mhCTu691 Oct 01 22:15:43 ios has - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType Oct 01 22:16:13 panegyric: we're not going to write your code for you Oct 01 22:16:46 i try to start a new activity but i have EditText in another class Oct 01 22:17:07 i'd like it to jump into another activity right after that soft keyboard is gone Oct 01 22:17:58 panegyric: http://developer.android.com/guide/components/activities.html Oct 01 22:17:58 not sure how i can do that though because the string from the edit text is in another class Oct 01 22:18:15 i dont need that C0deMaver1ck Oct 01 22:18:48 then why are you asking how to start an activity? Oct 01 22:19:00 in my scenario, please read what im saying Oct 01 22:19:28 i have a separate java class file with the editText Oct 01 22:19:44 you've said that about three times now. Oct 01 22:19:51 what does the edittext have to do with it? Oct 01 22:20:02 because i need the string from the editText Oct 01 22:20:04 panegyric: it seems you need to learn how to program first :-/ Oct 01 22:20:07 in the new activity Oct 01 22:20:11 I've found various resources online, but does anyone have a good recommendation for a jumping off point for device porting? Oct 01 22:20:11 evancharlton: +1 Oct 01 22:20:23 evancharlton yes that's why im trying to get help Oct 01 22:20:30 panegyric: read the page I gave you and you'll learn how to pass data between activities Oct 01 22:20:32 panegyric: so you need to make it accessible; I don't really know what's not clicking Oct 01 22:20:43 but i hope you got a ego boost from saying that Oct 01 22:20:48 vista178: #android-root; this isn't the right channel for that Oct 01 22:20:52 how can i make it accesible Oct 01 22:21:00 panegyric: I don't know; it's your app Oct 01 22:21:07 so then shut up Oct 01 22:21:11 youre wasting your own time Oct 01 22:21:13 how do you expect me to tell you the right way to do something based on 30 lines of code? Oct 01 22:21:14 panegyric: chill out man Oct 01 22:21:23 panegyric: remain civil Oct 01 22:21:42 panegyric: don't come in hear asking for help then tell us to shut up Oct 01 22:21:50 *here Oct 01 22:21:57 not telling you C0deMaver1ck Oct 01 22:22:25 its just i was trying to figure this out all day Oct 01 22:22:35 and i need some direction Oct 01 22:22:49 i was told making use of inner classes will help Oct 01 22:23:06 and i read on innerclasses but i cant make sense of how that would help Oct 01 22:25:45 on cyanogen mod ICS, i use trebuchet. Oct 01 22:25:46 is there an easy way to customise the action bar so that both abs and the native action bar use the same resources? Oct 01 22:25:52 what is the equivalent for nexus jelly bean? Oct 01 22:26:26 panegyric: get a reference to the EditText with findViewById, or keep a reference in the outer class of your editorlistener Oct 01 22:27:25 i have the reference, if you mean a string holding the contents of editText Oct 01 22:27:43 but since this class is listening for when the done button is pressed Oct 01 22:27:54 when will i store the string in the reference Oct 01 22:28:15 theyre 2 seaparate classes: the editText is one, the actionlistener antoher Oct 01 22:28:30 you don't. Android does. if you have a reference to it then it is stored Oct 01 22:28:36 panegyric: call getText on the editText reference Oct 01 22:28:44 ^ exactly Oct 01 22:28:51 myEditText.getText().toString() Oct 01 22:28:53 or something Oct 01 22:29:20 let me see getText (thanks) Oct 01 22:29:52 panegyric: you might have a little better time reading the source code for my first app Oct 01 22:29:52 https://github.com/C0deMaver1ck/Typr/tree/master/src/de/ithinkinco/typrandroid Oct 01 22:29:56 also, here's a rough approximation of why nobody wants to answer your questions: http://pastebin.com/kj4kU24t Oct 01 22:31:27 bjorkintosh: what do you mean? you're trying to select a font for your app to use ? Oct 01 22:32:39 i didnt get that sampullman Oct 01 22:32:48 lol Oct 01 22:32:53 the getText() im still going to have to know when to call it right Oct 01 22:33:11 you call it when you need the text Oct 01 22:33:58 panegyric: it might be a good idea to put things down for a while and pick up a book on android, or read threw the tuts Oct 01 22:34:05 *through Oct 01 22:34:44 im tyring to read through tutorials Oct 01 22:34:54 and i keep gettin scattered answers Oct 01 22:34:57 its so frustrating Oct 01 22:41:04 g00s, no. i had forgoten the name for 'launcher'. Oct 01 22:41:21 yo guys! Oct 01 22:41:27 I just received a weird email Oct 01 22:41:42 ouuu weird email time! :> Oct 01 22:41:47 from google: "Google has received a subpoena seeking information related to Android applications that may have been made available on alternative markets without the consent of the developer." Oct 01 22:41:57 :O Oct 01 22:42:29 So I don't understand Oct 01 22:42:46 SirLalala: i guess the first step is to make sure it really came from google. sit and wait, maybe something will be said about it Oct 01 22:42:53 are they asking you for anything? Oct 01 22:43:16 C0deMaver1ck: g00s yeah that's my first stand, but thought about asking here Oct 01 22:43:26 no not anything or wait Oct 01 22:43:39 they have a number there maybe they want me to call or something Oct 01 22:43:40 SirLalala: also, consider asking a question about it on the google groups Oct 01 22:43:50 dont call it Oct 01 22:44:01 g00s: yeah I won't maybe that's the trick and it's not legal Oct 01 22:44:24 because the other way is I sued myself Oct 01 22:44:28 and I don't remember Oct 01 22:44:36 haha Oct 01 22:44:40 I did that once Oct 01 22:44:50 happens to all of us :/ Oct 01 22:44:51 weirdest court case ever Oct 01 22:44:57 want me to upload the email? Oct 01 22:45:03 I'm always right so I couldn't argue with myself Oct 01 22:45:30 SirLalala: also, maybe post the question on the play support forums Oct 01 22:45:39 "support" Oct 01 22:46:20 they give a reference too Oct 01 22:46:37 aaaaah wait Oct 01 22:47:39 Hello, How can I display a border in a GridView Item ? Oct 01 22:47:41 could it be an email I sent to google for a blog (blogger) that had illegal copies of my game? Oct 01 22:49:52 sounds related Oct 01 22:49:56 R4md4c: add a border to your layout that the adapter backing the GridView uses Oct 01 22:51:29 uhm probably that's it Oct 01 22:53:24 does somebody know how an iterator on an arraylist behaves? when i insert an element into the list, say the element before the element the iterator is currently pointing on, will the iterator's previous() method return the right element ? or will i have to update the iterator's pointers manually ? Oct 01 22:54:04 is currently pointing on* -> is currently on Oct 01 22:55:51 JakeWharton: I got what you mean, but is there a direct attribute that I can use to draw a border or I have to create an XML file that contains shapes ? Oct 01 22:56:12 XML shape that draws a border which you can then set as the root layout's background Oct 01 22:56:25 there's no actual border properties (as in CSS, for example) Oct 01 22:56:58 I have a problem with my code i change the buttons image to something successfully and when I want to change it back it crashes Oct 01 22:57:00 is this google's channel? Oct 01 22:57:09 why is it on the developers site Oct 01 22:57:24 it is Oct 01 22:57:27 Google;s Oct 01 22:57:28 romainguy do you work for google? Oct 01 22:57:51 i wouldve never guessed, the admins are really...well Oct 01 22:57:53 yeah Oct 01 22:58:19 JakeWharton: Thanks for the help Oct 01 22:58:55 panegyric: yes I do Oct 01 22:59:22 does anyone know why my thing crashes Oct 01 22:59:26 i have a problem Oct 01 22:59:35 i have an onlcik lister for a button Oct 01 22:59:39 stacktrace ?? Oct 01 22:59:39 techdigy: gonna have to get a lot more specific Oct 01 22:59:43 and a boolean stament Oct 01 22:59:45 techdigy: we can't help you fix anything without an example Oct 01 22:59:47 can i just show you my code? Oct 01 22:59:50 in pastebin? Oct 01 22:59:50 stacktrace Oct 01 22:59:54 techdigy: consolidate your thoughts and ask a coherent question Oct 01 22:59:57 techdigy: yes Oct 01 23:00:34 http://pastebin.com/i5A6855a Oct 01 23:00:51 im sorry if i look dumb.. Im only 16 and the last time i made an app was two years ago Oct 01 23:02:38 techdigy: staketrace? Oct 01 23:02:49 should I put it in there? Oct 01 23:02:58 like eprintstacktrace? Oct 01 23:03:12 Logcat should give it to you Oct 01 23:03:15 no, the logcat when the app crashed Oct 01 23:03:22 ohh Oct 01 23:03:33 let me run it again Oct 01 23:03:36 i closed the tab Oct 01 23:04:05 http://pastebin.com/6cAT7XV8 Oct 01 23:06:06 um your bitmap is almost 10 megs big Oct 01 23:06:09 that's a tad much Oct 01 23:06:11 memory problem? Oct 01 23:06:14 damn Oct 01 23:06:21 ohh i see Oct 01 23:06:25 its 1024 x 1024 Oct 01 23:06:34 well dang man Oct 01 23:06:46 so many bits Oct 01 23:06:57 later guys Oct 01 23:07:18 break them up? Oct 01 23:07:40 hey Oct 01 23:07:50 or downsize them Oct 01 23:07:57 yeah Oct 01 23:08:06 ill probably reduce the quality Oct 01 23:08:11 or resulution in half Oct 01 23:08:21 can you guys help me get android to see adhoc networks? Oct 01 23:08:32 or is this the wrong channel Oct 01 23:08:36 Guys Thanks for the support! Oct 01 23:08:51 Tracer: probably the wrong channel, try #android Oct 01 23:09:14 thank you Oct 01 23:13:20 hey guys Oct 01 23:13:27 showdialog() got deprecated Oct 01 23:13:27 hi meetoman Oct 01 23:13:34 what's the new datepicker model? Oct 01 23:14:05 meetoman: DialogFragment with a DatePicker in it? Oct 01 23:14:34 evancharlton, any examples? Oct 01 23:14:43 nvm found it Oct 01 23:16:23 can someone tell me is getview() called for every item in a listview? Oct 01 23:18:45 what is the meathod for the camera flash in android? Oct 01 23:19:33 hmm Oct 01 23:19:39 sherlockaction doesn't seem to have getSupportFragmentManager() Oct 01 23:19:50 techdigy: setFlashMode(String) Oct 01 23:20:06 thanks evancharlton Oct 01 23:20:25 camera flash... Oct 01 23:20:44 SherlockAction isn't a class afaik Oct 01 23:20:54 * Jug6ernaut wonders when android will get a "flash light api" Oct 01 23:21:05 hey, what's the difference between sherlockactivity and SherlockFragmentActivity Oct 01 23:21:49 can I use a try and catch in a boolean statement? Oct 01 23:22:49 huh Oct 01 23:27:38 does anyone know why findViewById() would return null after converting a project to a library project? Oct 01 23:27:48 the id seems to be valid... Oct 01 23:35:24 Can a toggle button have a set on click listener? Oct 01 23:37:49 you want to use CompoundButton.OnCheckedChangeListener() Oct 01 23:38:26 or you could just add an onClick element in the xml for the toggle button Oct 01 23:41:46 I'd like to know what is the best way to write the logic of consuming a webservice do I write in inside the Adapter that will carry the result or separate it into a class or an interface ? Oct 01 23:42:11 hello. can anyone help me with this question about fragments and sliding menu.. http://stackoverflow.com/questions/12650005/change-front-fragment-when-clicking-an-item-on-a-slidingmenu Oct 01 23:47:12 Jug6ernaut: it already has one Oct 01 23:47:50 evancharlton? Oct 01 23:47:56 anyone understands about fragments Oct 01 23:49:05 cyberrog ask ur question Oct 01 23:49:28 Jug6ernaut, here it is http://stackoverflow.com/questions/12650005/change-front-fragment-when-clicking-an-item-on-a-slidingmenu Oct 01 23:51:39 Jug6ernaut: http://developer.android.com/reference/android/hardware/Camera.Parameters.html#FLASH_MODE_TORCH Oct 01 23:51:57 man I rocked the rom out today Oct 01 23:52:03 got that crap working great Oct 01 23:53:31 Jug6ernaut, I don't know if I'm missing something Oct 01 23:54:10 since I followed the documenation of how to add a layout to the fragment.. it should load the content since the code is reaching the onCreateView method. Oct 01 23:55:14 a library proj. can depend on another library proj., right? Oct 01 23:55:50 any idea? Oct 01 23:56:05 evancharlton yea i know, but you have to go through camera just to use the led, that and the implementation has to be different on a lot of different phones, which is just stupid Oct 01 23:58:12 the camera and flash need closely integrated Oct 01 23:58:16 Jug6ernaut: the point of there being an API is that the implementation won't be different... Oct 01 23:58:28 or you get the flash not going off at the right time Oct 01 23:58:45 exactly, right now it has to be different on different devices(im saying to get it to work, not that i want it to be) Oct 01 23:59:14 Jug6ernaut: er, what? Oct 01 23:59:15 SpeedEvil i mean to use the led sperately Oct 01 23:59:17 no it doesn't Oct 01 23:59:44 yes it does, you can use one implementaton to get LED to flash one one device and it will completly not work on another Oct 01 23:59:47 as a developer, you write against one API (FLASH_MODE_TORCH) and the LED comes on Oct 02 00:00:01 what happens under the hood needn't concern you Oct 02 00:00:05 i wish that were the case Oct 02 00:00:12 if it's not, file bugs Oct 02 00:00:18 because CTS should be verifying that Oct 02 00:00:26 cts? Oct 02 00:00:45 compatibility test suite Oct 02 00:00:49 ah Oct 02 00:00:51 http://source.android.com/compatibility/index.html Oct 02 00:01:18 evancharton well i need to submit a lot of bugs then bc it is in no way uniform across devices :\ Oct 02 00:01:35 Jug6ernaut, sorry for bothering, but have u read my question? Oct 02 00:01:50 yea im looking through it Oct 02 00:02:00 ok. thanks again. Oct 02 00:02:45 hello Oct 02 00:03:35 cyberrog what is it not doing exactly Oct 02 00:04:02 Jug6ernaut, it doesnt load the fragments layout on my screen.. Oct 02 00:04:34 cyberrog also for a sliding menu i recommend SimonVT's implementation https://github.com/SimonVT/android-menudrawer Oct 02 00:04:35 when I start the activity, it loads with a default layout, and it's not loading the new fragment, but keeping the original one.. got it Oct 02 00:04:49 ok let me look then Oct 02 00:06:43 cyberrog im assuming you are checking that your new fragments arnt null right Oct 02 00:08:03 Jug6ernaut, yes.. I'm pretty sure its not null hehehehh Oct 02 00:08:15 lemme check on debug Oct 02 00:08:58 lol, and your checking that ur passing correct fragments right Oct 02 00:09:04 * Jug6ernaut is just covering the bases Oct 02 00:09:13 hey guys how would i pass a string from an activity subclass to another class (an EditorActionListener class) Oct 02 00:10:02 Jug6ernaut, just a sec Oct 02 00:10:12 panegyric listeners are usually interfaces not classes Oct 02 00:10:38 i shouldve said i made a class that implements the interface Oct 02 00:11:34 pass it in the classes contructor :\ Oct 02 00:11:37 Jug6ernaut, the object itself is not null.. but there are a lot of atributes which are null. Oct 02 00:11:42 * Jug6ernaut always fears he will get yelled at for stating the obvious Oct 02 00:12:22 hey, so i'm making an app that requires a camera, if on startup it can't grab the camera is exiting with finalize() appropriate? or is there a better way to close the app so the user can free up the camera? Oct 02 00:12:52 s/finalize/finish/ Oct 02 00:13:01 wtf man, tpb is still down Oct 02 00:14:05 tpb is not down for me Oct 02 00:14:17 .se? Oct 02 00:14:42 Jug6ernaut, could be it the problem?? As you can see in my FirstFragment class code, what is missing there? Oct 02 00:14:47 http://www.downforeveryoneorjustme.com/thepiratebay.org Oct 02 00:15:02 and http://www.downforeveryoneorjustme.com/thepiratebay.se Oct 02 00:15:18 cyberrog not sure im still looking over it all Oct 02 00:16:56 anyone use the app engine plugin in eclipse? Oct 02 00:17:34 https://developers.google.com/appengine/docs/java/tools/eclipse Oct 02 00:18:41 cyberrog not the issue but u need to change getActionBar() to getSupportActionBar() in main activity Oct 02 00:20:43 Jug6ernaut, ok, thanks for the tip =) Oct 02 00:20:48 get an error when trying to install the plugin about not being able to reach repo Oct 02 00:22:35 Jug6ernaut, there is no such method in here. which package is it from? Oct 02 00:23:09 Jug6ernaut, I'm not using sherlock action bar. Oct 02 00:23:14 cyberrog ur replacing R.id.main, is this the right view to replace? Oct 02 00:23:40 when using the NDK to run native code, is there an initialization function the loader will call in the .so at load time? Oct 02 00:24:55 cyberrog ahh ok Oct 02 00:25:15 Jug6ernaut, wait.. Im checking it.. Oct 02 00:25:37 Jug6ernaut, in the Main activity, I setContentView(R.layout.main); Oct 02 00:25:41 so I gues it is Oct 02 00:26:16 cyberrog add that xml to your stackoverflow page Oct 02 00:26:29 ok Oct 02 00:27:38 Jug6ernaut, there it is Oct 02 00:28:11 hmm Oct 02 00:28:33 Jug6ernaut, its the last code Oct 02 00:28:37 i have no idea if this will give the desired effect Oct 02 00:28:45 but try replacing R.id.Main with android.R.id.content Oct 02 00:29:03 Jug6ernaut, why? LOL Oct 02 00:29:12 just do it :P Oct 02 00:29:24 granted i still dont see why that shouldnt work... Oct 02 00:29:47 Jug6ernaut, so you saying it could work by changing that Oct 02 00:30:17 yea, but idk if ital remove the menu, android.R.id.content is the base view Oct 02 00:30:20 always Oct 02 00:30:42 it doesnt even run Oct 02 00:30:51 wha Oct 02 00:30:54 whats it do Oct 02 00:31:50 Jug6ernaut, resource not found exception Oct 02 00:31:57 :\ Oct 02 00:32:07 ... Oct 02 00:32:21 what Oct 02 00:32:32 that doesnt make any sense lol Oct 02 00:32:41 yeah Oct 02 00:32:42 hahahahah Oct 02 00:33:17 yeah, thats exactly on setContentView(android.R.id.content); Oct 02 00:33:27 wait noooo Oct 02 00:33:28 not there Oct 02 00:33:34 what Oct 02 00:33:40 where you are changing the fragment out Oct 02 00:33:55 got it Oct 02 00:34:09 fragmentTransaction.add(R.id.main, frag); to fragmentTransaction.add(android.R.id.content, frag); Oct 02 00:34:27 ok Oct 02 00:35:59 Jug6ernaut, still nothing changes. only the toast shows up Oct 02 00:36:08 lol Oct 02 00:36:15 did the toast show up b4? Oct 02 00:36:21 yes Oct 02 00:36:24 hahah Oct 02 00:36:35 isnt the original activity staying above the new one? Oct 02 00:36:56 I mean overloading, and the new fragment is hided behind it? could it happen? Oct 02 00:37:48 no i dont think so Oct 02 00:38:13 Jug6ernaut, hey something wrong happend Oct 02 00:38:24 ? Oct 02 00:39:07 I have a second fragment class, which inflates a list. and when I click the second item, it just erases the original fragment. and the activity is clean. got it?? Oct 02 00:39:56 hmm Oct 02 00:40:08 can u zip up ur project & upload it so i can mess with it? Oct 02 00:40:09 here is the code for the SecondFragment class http://paste.ubuntu.com/1255117/ Oct 02 00:40:16 ok =) Oct 02 00:43:23 Jug6ernaut, why you recomend SimonVT sliding menu? Oct 02 00:43:33 bc its awesome, very well done Oct 02 00:43:54 right SimonVT? Oct 02 00:43:54 Jug6ernaut, hahahah Oct 02 00:43:55 lol Oct 02 00:44:05 his is the best Oct 02 00:44:21 ^^^^ Oct 02 00:45:13 I could test it while you mess on the code I'll send you. ok? Oct 02 00:45:20 sure Oct 02 00:45:24 Jug6ernaut, here is the link http://ubuntuone.com/5AKpEfDcIfyZ1Ni762ZCze Oct 02 00:47:15 Jug6ernaut, the link worked? Oct 02 00:47:30 Jug6ernaut, just to check I'm using the example folder not the example-abs ok?? Oct 02 00:48:32 which ever u want to use Oct 02 00:48:45 abs uses ActionBarSherlock Oct 02 00:49:37 Jug6ernaut, I'm not using ActionBarSherlock Oct 02 00:49:48 then just example Oct 02 00:51:00 Hey guys, this is really weird. So I have an adapter view and the child views have an image view. I was calling view.post() on the image views and occasionally it wasn't being run. So I checked, and that occasional view would return null from getHanlder(). Why would this be? Its visible in the app so it must be attached to the window, right? Oct 02 00:51:34 Jug6ernaut, yes.. Oct 02 00:52:45 jayd16: this happens when the view is not attached to the window Oct 02 00:54:29 Jug6ernaut, IDK why, but in a lot of codes, I have to remove the override anotation Oct 02 00:54:37 dows it will work in 2.2 versions? Oct 02 00:54:49 also add TargetAPI(11) Oct 02 00:55:28 yea ive had to do that to, someone smarter then me can say way xD Oct 02 00:56:26 romainguy: what would cause that to happen, seemingly at random, when the views are being created in a list adapter? Can a view not be attached to the window, and still visible on screen? Oct 02 00:56:47 is there some way to set a ColorStateList as a view's background? Oct 02 00:56:54 Jug6ernaut, you were right. that example is really cool. Oct 02 00:57:02 romainguy: also thanks for the help Oct 02 00:57:05 Jug6ernaut, so have you got into some solution for that problem? hahah Oct 02 00:57:39 yea just got it running Oct 02 00:57:50 button for menu is so small :| Oct 02 00:58:53 you mean the top one? Oct 02 00:58:57 yea Oct 02 00:59:04 interesting tho... Oct 02 01:00:16 dude SimonVT example's is so cool.. =D Oct 02 01:02:59 Jug6ernaut, but it uses Fragments.. how does he does that withou using fragments? I must read this article http://android.cyrilmottier.com/?p=658 Oct 02 01:03:03 stupid question. i have a galaxy nexus, and I am trying to flash a rom from clockwork recovery, however if i do a wipe and reset wont it wipe the rom from the internal storage? Oct 02 01:04:50 have to ask him lol Oct 02 01:07:05 Jug6ernaut, yes Oct 02 01:09:19 Jug6ernaut, looks like it doesnt work on 2.2 versions Oct 02 01:10:09 Come on...SOMEONE who to know in the NDK what the "host systen type" means?? Oct 02 01:10:38 psynor, no Oct 02 01:10:52 and that question would be better asked in #android-root or #cyanogenmod or something Oct 02 01:11:01 canadiancow Oct 02 01:11:06 hows job??? Oct 02 01:11:11 pretty good Oct 02 01:11:18 cyberrog i do not like this code :\ Oct 02 01:11:19 it's been 95% orientation so far Oct 02 01:11:27 Jug6ernaut, me neither.. Oct 02 01:11:28 im finally sitting at my desk for more than 30 minutes Oct 02 01:11:29 canadiancow haha wow Oct 02 01:11:58 I'm trying to make it beautiful Oct 02 01:12:23 I'm extending ScrollView to add a property for me to animate, and am using my class in the layout xml - but when I go to animate that property, PropertyValuesHolder complains that it can't ifnd the method name getFoo/setFoo.. is there something else I need to do? Oct 02 01:12:23 but yea Jug6ernaut it looks like tomorrow i'll actually get started Oct 02 01:12:30 maybe get a feature to add or a bug to fix or something :) Oct 02 01:12:58 woho Oct 02 01:13:11 * Jug6ernaut hasnt doent shit at his new job Oct 02 01:13:16 maybe tomorrow Oct 02 01:13:38 engrish, please Oct 02 01:14:02 * Jug6ernaut yawns @ u Oct 02 01:14:02 * Jdbye slaps Jug6ernaut around a bit with a large trout Oct 02 01:14:13 y would u do that ;( Oct 02 01:14:39 I dont know how this code cant support 2.2 version? Oct 02 01:14:49 you mean android 2.2? Oct 02 01:14:50 should I add some lib? Oct 02 01:14:57 what is it telling u Oct 02 01:16:19 it just shows errors in many methods like getActionBar(), Build.VERSION_CODES.ICE_CREAM_SANDWICH, MenuItem.SHOW_AS_ACTION_ALWAYS Oct 02 01:16:21 etc.. Oct 02 01:20:35 Jug6ernaut, if I could just make this app support 2.2 version, my problems would be solved.. Oct 02 01:23:35 cyberrog ual have to add support libraries Oct 02 01:23:48 & change implementation to reflect Oct 02 01:24:23 need to compile against a later SDK too, in the Build.VERSION_CODES case Oct 02 01:24:26 Jug6ernaut, is ist android.support-v4.jar ?? Oct 02 01:25:00 idk what version, i have never used them, ive always gone through abs Oct 02 01:25:16 cyberrog: action bar isn't part of the support library Oct 02 01:25:44 so android.support-v4.jar is? Oct 02 01:26:04 fragments, etc Oct 02 01:26:33 that's what I dont get... Oct 02 01:26:51 jayd16: views in a listview are constantly detached and reattached Oct 02 01:26:58 your code is probably running at the wrong time Oct 02 01:28:53 romainguy: ah, so I'm not crazy… I'll just make my own handler. Thanks! Oct 02 01:29:16 I was trying to make the fragment load in the activity, before but it wasn't, and I was using the import android.support.v4.app.Fragment; not the android.app.Fragment Oct 02 01:30:05 so is it working now? Oct 02 01:30:31 nope... Oct 02 01:30:33 LOL Oct 02 01:30:41 are you extending FragmentActivity? Oct 02 01:30:51 or whatever it's called, I forget Oct 02 01:30:56 leslie for the main activity it is SlidingFragmentActivity Oct 02 01:31:09 is a device guaranteed to have the /mnt/ folder? Oct 02 01:31:43 leslie my project is in here, and I'm using the "example" folder no "example-abs". http://ubuntuone.com/5AKpEfDcIfyZ1Ni762ZCze Oct 02 01:31:44 there's a getexternalstorage call you should probably be using Oct 02 01:31:56 Jug6ernaut, you got into some solution? Oct 02 01:33:08 bankai_: yeah i know, but on some devices that returns /mnt/sdcard/, when I really want to start my file browser at /mnt/ so it sees extSdcard Oct 02 01:35:12 cyberrog: sounds like the library you're using isn't designed to work with the support library Oct 02 01:35:30 Hello. Oct 02 01:35:45 leslie =( I'm completely confused Oct 02 01:36:16 I've been trying to debug an Android application wtih ndk-gdb and I'm getting the error: ERROR: Could not extract package's data directory. Are you sure that Oct 02 01:36:20 the compatibility library requires you to extend from FragmentActivity if you want to use fragments Oct 02 01:36:36 your installed application is debuggable?" Oct 02 01:36:46 I dont know what to do.. I need a clean project to start again. it's all a complete mess Oct 02 01:36:55 leslie: why can't you extend Fragment? Oct 02 01:37:02 err, is that what you're saying? Oct 02 01:37:24 no, the activity has to extend from FragmentActivity instead of just Activity Oct 02 01:38:05 I'm extending from SlidingFragmentActivity Oct 02 01:38:18 and what is that extending? Activity Oct 02 01:38:30 I'm certain that I've compiled a debug build, since I'm finding gdbserver in the APK file, and android:debuggable="true" is in the manifest. Oct 02 01:39:09 Moreover, it's installing onto the device just fine. I'm just looking for some more ideas, since Google has been exhausted, it seems. Oct 02 01:39:33 leslie which class? Oct 02 01:39:44 ? Oct 02 01:40:18 leslie you said there is something in my code extending Activity Oct 02 01:40:22 which class? Oct 02 01:40:39 SlidingFragmentActivity.java Oct 02 01:42:09 leslie. I guess you are wrong. it's extending FragmentActivity and implements SlidingActivityBase Oct 02 01:42:14 are you sure of that? Oct 02 01:42:25 lemme check Oct 02 01:42:38 "public class SlidingActivity extends Activity" Oct 02 01:42:51 is what it says in the code you sent Oct 02 01:43:17 LOL Oct 02 01:43:18 oh, actually, my mistake Oct 02 01:43:20 I read it wrong Oct 02 01:43:37 hm. then I don't know Oct 02 01:44:14 see, how I'm confused? I guess I'nm gonna start from the zero again. Oct 02 01:45:32 this channel could be so useless sometimes, i wanted to figure something out all day, and no one told me how, just that i should know from the tutorial...cmon Google...seriously? Oct 02 01:45:57 I've been trying to debug an Android application wtih ndk-gdb and I'm getting the error: ERROR: Could not extract package's data directory. Are you sure that your installed application is debuggable?" I've verified that the gdbserver file is in the APK, so it's compiling as debug. Moreover, it's installing on the device just fine and I can run it. If I try: adb shell run-as com.foo.bar /system/bin/sh -c Oct 02 01:46:00 pwd # it says com.foo.bar has a corrupt installation. But it plays just fine. Ideas? Oct 02 01:49:25 Also, APP_OPTIM in jni/Application.mk is set to debug Oct 02 01:50:53 whats the best / easiest library to work with XML DOM in Java/Android? Oct 02 01:56:21 hey guys, i've a friends SDcard that another friend pulled from his phone before unmounting it, it had said the card was damaged or an unsuported file system, is there a way of check the card in ADB ? Oct 02 01:57:18 paranous: I don't believe so, you can just run it through the windows file checking and it'll probably fix it though Oct 02 01:57:23 it's probably fat32 Oct 02 01:57:41 chkdsk Oct 02 01:58:52 leslie if I right clic the project and choose Android Tools > Add Support Library Oct 02 01:58:56 leslie does it work? Oct 02 01:59:07 leslie it download the revision 10 Oct 02 01:59:10 of i Oct 02 01:59:12 of it Oct 02 01:59:18 that's fine Oct 02 01:59:21 i have i have a doneOnEditorActionListener class that implements OnEditorActionListener Oct 02 01:59:21 i set this up so that the soft-keyboard can disappear after you press done ...but I also want it to go to another activity. The problem is that this doneOnEditorActionListener class file is separate from my other class (the Activity subclass). Design-wise, what can I do to make this work? Oct 02 01:59:59 leslie but it still has a problem.. on a method run() there is an error and it offers to remove the @override anotation Oct 02 02:00:10 something is wrong Oct 02 02:00:30 in your code? Oct 02 02:00:57 no.. I just donwload it.. Oct 02 02:01:06 from github..https://github.com/SimonVT/android-menudrawer Oct 02 02:01:33 its another project that makes a sligind menu, that I downloaded to test if it works the way Im doing.. Oct 02 02:02:25 yet again I have another crash... http://pastebin.com/bFDjh3kS Oct 02 02:03:05 i have a doneOnEditorActionListener class that implements OnEditorActionListener Oct 02 02:03:05 i set this up so that the soft-keyboard can disappear after you press done ...but I also want it to go to another activity. The problem is that this doneOnEditorActionListener class file is separate from my other class (the Activity subclass). Design-wise, what can I do to make this work? Oct 02 02:03:08 techdigy: line 4 is important Oct 02 02:03:23 does anyone know what went wrong? Oct 02 02:03:24 read that, it says that it can't inflate class user-feature Oct 02 02:03:25 or what i at least have to look at? Oct 02 02:04:10 ohh Oct 02 02:04:14 so its a manifest problem? Oct 02 02:05:06 I don't think so. it's an inflation problem. somewhere you're trying to create or use that class is probably wrong. Oct 02 02:05:22 hmm Oct 02 02:05:23 alright Oct 02 02:05:27 thank Ill take a look into it Oct 02 02:06:15 techdigy: no problem, if you have more troubles I can try to help you. I'm no expert but I have dealt with minor inflation problems. Oct 02 02:07:03 lethjakman_lapto: Thanks! To be honest I'm just starting off with Java and Android. I made a app 2 years ago but really didn't know what I was doing. Now I am kind of getting the hang of it. Oct 02 02:07:28 why do some people never upgrade their friggin apps?! Oct 02 02:07:45 techdigy: not a problem, I understand where you're coming from. I had a really weird problem with inflation just a few weeks ago! Oct 02 02:07:47 mrenouf: ROI Oct 02 02:08:04 ? Oct 02 02:08:24 I even remember some people from the IRC such as g00s Oct 02 02:08:38 that was a year and a half ago though Oct 02 02:09:20 I release a bugfix and still only about half the users upgrade, after 5 days of being on the market Oct 02 02:09:30 oh Oct 02 02:09:37 i thought you meant something else Oct 02 02:09:51 Alright peace guys im going to call it a day Oct 02 02:10:10 yeah, not upgrade their phone... upgrade apps. Oct 02 02:10:38 I guess it means theyre not really using the app. I know i've ignored updates for apps I dont use. No permissions changes either Oct 02 02:10:51 mrenouf: the worst is when they give a negative review after you've fixed the bug they're complaining about Oct 02 02:11:23 sampullman, ahh, I like that users can finally see the review is for an older version. Oct 02 02:11:38 hey, I did a findViewByID(R.id.foo) from inside a button callback and the view returned seems to be the button view, not the R.id.foo... why would that be (v.setText() from the result of that find view writes to the botton and not what's referenced by the ID) Oct 02 02:12:11 edman007: that doesn't make sense, can you pastebin the code? Oct 02 02:12:16 usage dropped off about 75% on the old version Oct 02 02:12:29 I guess that's fairly typical Oct 02 02:13:29 sampullman, http://pastebin.com/eDyN54zf Oct 02 02:14:34 edman007: and where is the issue? Oct 02 02:14:41 glogger() seems to write to the button, and not logger out, when I press the button... Oct 02 02:15:37 can i see your xml? Oct 02 02:15:55 assuming R.id.logger_out is in fact the text view, the code is correct Oct 02 02:16:40 sampullman, http://pastebin.com/0scGe2WT Oct 02 02:17:33 the textview is possibly being displayed on top of the button Oct 02 02:17:50 *probably Oct 02 02:18:20 hrm... Oct 02 02:18:22 it's in a relativelayout and you haven't told it where to go Oct 02 02:19:45 add something like: android:layout_above="@id/capture_sky_picture" Oct 02 02:21:22 hrm, now that works Oct 02 02:21:37 that's odd...because the fonts were different Oct 02 02:21:45 but works now...so i guess it's good Oct 02 02:29:29 anyone knows why some methods shows errors and offers the option to remove @Override annotations as a fix?? why does it happen? Oct 02 02:29:41 whats awesome, is that of the users who've upgraded, 67% are ICS+ Oct 02 02:31:08 cyberrog, you need to set your IDE to use java 1.6 Oct 02 02:31:18 mrenouf, wat? Oct 02 02:31:49 hmmm Oct 02 02:32:07 canadiancow, I put out an app update, and 5 days later, of the users using the new version, 67% are on android 4.* Oct 02 02:32:14 oh Oct 02 02:32:16 cool Oct 02 02:32:19 :-) Oct 02 02:32:41 I guess it makes sense, the ones with older devices also upgrade apps less regularly (or at all) Oct 02 02:33:53 mrenouf, or it's flat out incompatible... Oct 02 02:34:08 edman007, nope Oct 02 02:35:46 oops, 54%. I needed to anchor my regex: ^4.* Oct 02 02:36:09 that sounds a little more realistic Oct 02 02:36:55 almost 60% of my users are on 4.x Oct 02 02:37:13 although the next app i work on may have minSdkVersion="14" :) Oct 02 02:37:15 which will be fun Oct 02 02:37:27 canadiancow: what sort of apps? Oct 02 02:37:50 well my personal one is https://play.google.com/store/apps/details?id=com.madcowsolutions.CoverageMapper Oct 02 02:38:06 yeah, most app users are on 4.* now Oct 02 02:38:08 same on my end Oct 02 02:38:10 dunno what my next work app will be yet Oct 02 02:38:23 Verizon JB update for Galaxy nexus was a big one too Oct 02 02:38:39 and that just went out a couple days ago (finally) Oct 02 02:38:48 nice Oct 02 02:38:53 but those were already ICS of course Oct 02 02:39:00 most of my users are 2.3.5 Oct 02 02:39:47 ok.. here is what happened. My app was in 4.1 version. Now Ive changed it to 2.2 and the method getActionBar() stopped working. I've already added the support libraries but nothing.. what should i do? Oct 02 02:40:01 cyberrog, getSupportActionBar() Oct 02 02:40:11 getSupportActionBar() Oct 02 02:40:13 mrenouf, nothing also Oct 02 02:40:19 and try looking at ActionBarSherlock Oct 02 02:40:23 already tried that. do I need some lib? Oct 02 02:40:23 and you need to extend from FragmentActivity Oct 02 02:40:53 and please elaborate on "stopped working" Oct 02 02:41:00 I had to import android.support.v4.app... Oct 02 02:41:05 sampullman: I don't know if you saw my last message early this morning, but I got it figured out! The 'peck' drawing was from the 'view' being inside of a linear layout and so the rows were cutting me off. Thanks for all the help. Oct 02 02:41:06 if you wanna backport actionbar, ABS is the way to go man Oct 02 02:41:10 is it right? Im using fragment activity from this package Oct 02 02:41:26 pierpark: no problem, glad you got it working Oct 02 02:41:32 sorry, you need to extend from SherlockFragmentActivity Oct 02 02:41:43 cyberrog, Oct 02 02:41:43 hmmm Oct 02 02:41:55 and set up your app theme Oct 02 02:42:01 its not hard Oct 02 02:44:27 hmmm am I obligated to setup the theme on android manifest? Oct 02 02:44:33 What does the Alias field mean in your keystore? I've always just done the name of my application Oct 02 02:44:46 But what is the use of having multiple aliases? I don't get it Oct 02 02:49:37 i need a good example of how to use the Action Bar. Oct 02 02:49:43 is there a way to rotate the screen of a running emulator? Oct 02 02:50:02 what i am seeing on the developer's guide seems to be missing something. Oct 02 02:50:42 control + F12 edman007 Oct 02 02:51:21 bjorkintosh: do you mean like ActionBar UI patterns, or technically how to implement it? Oct 02 02:51:22 thanks Oct 02 02:52:13 np Oct 02 02:52:14 also Oct 02 02:52:20 edman007: http://developer.android.com/tools/help/emulator.html#KeyMapping Oct 02 02:54:44 doogan, UI patterns. **** ENDING LOGGING AT Tue Oct 02 02:59:58 2012