**** BEGIN LOGGING AT Fri Mar 02 02:59:58 2012 Mar 02 03:10:02 <_Syzygy> http://www.youtube.com/watch?v=_T3YkqU8n30 Mar 02 03:10:20 <_Syzygy> sorry, wrong channel Mar 02 03:46:56 is it me? or are people just lazy anymore Mar 02 03:47:08 * t0mless is lazy Mar 02 03:47:37 in fact... I think I need a nap Mar 02 03:47:38 im doing all the android work for my group in school because I am the only guy who knows android, and no1 is botherin trying to learn it Mar 02 03:47:41 lol go take one Mar 02 03:51:13 learning is overrated Mar 02 03:52:44 killring: I suppose being productive is too Mar 02 03:54:22 I'm having a problem getting my transformer tf101 back to stock. Mar 02 03:55:02 E:Can't open /sdcard/repacked-8.2.3.13_US+root-CWR-update(su_removed).zip (bad) Installation aborted. Mar 02 03:55:14 abhooP: this is #android-dev, not #android-root Mar 02 03:55:15 abhooP: #android-root Mar 02 03:56:34 drpenguin: the only thing worse than learning is being productive ;-) Mar 02 04:00:31 yhpark: you wanted a divider? Mar 02 04:00:43 There was a solution on stack overflow.http://stackoverflow.com/questions/5049852/android-drawing-separator-divider-line-in-layout Mar 02 04:15:03 I hae this code : http://pastie.org/3501566 How to make it rotating continuously? Mar 02 04:15:35 now it stops in every 4 seconds Mar 02 04:16:55 napster: I usually set the repeat count in code Mar 02 04:17:44 napster: see this commit: https://github.com/github/gauges-android/commit/e606ff2fea2df672abb745117626f126fdd6bbba Mar 02 04:21:47 EddieRingle: I really don't understand. Is it not possible to just keep it rotating at the same speed without stopping in every 4000ms ? Mar 02 04:22:34 napster: it shouldn't stop if you set it to repeat Mar 02 04:22:58 EddieRingle: ok Mar 02 04:23:14 What does this linear interpolate do? Mar 02 04:24:12 rate of change of the animation is constant Mar 02 04:24:25 EddieRingle: ok, that should work. Let me check :) Mar 02 04:28:01 I'm querying the contact database with a call like this getContentResolver().query(Data.CONTENT_URI, Mar 02 04:28:01 DataQuery.PROJECTION, DataQuery.SELECTION, new String[] {accounts[0].name}, DataQuery.COLUMN_GIVEN_NAME + " ASC"); that returns the stuctured name fields perfectly but I'm trying to join the company field from the organization fields and I'm not sure how to write my selection statement to make that work (here is the selection statement I'm using now public static final String SELECTION Mar 02 04:28:01 = ContactsContract.RawContacts.ACCOUNT_NAME + "=? and " + Data.MIMETYPE + "='vnd.android.cursor.item/name'"; Mar 02 04:28:01 ) Mar 02 04:28:15 anyone have any ideas Mar 02 04:33:13 so you post some code and ask for ideas? Mar 02 04:33:18 what's the error? Mar 02 04:34:21 no error I just can't firgure out how to join those to mimetypes in a single call so it returns Mar 02 04:34:31 the name stuff and the organization stuff Mar 02 04:40:15 hello…anyone do both android and iOS? Mar 02 04:40:28 yes Mar 02 04:40:35 winegoddess I do Mar 02 04:41:01 Ive done a bit of iOS stuff Mar 02 04:42:01 hi wabz and ron_frown and DrPenguin - I'm finding i like the documentation of android so much better. if there any resources that are good for truly learning iOS? something with good walk throughs? i love the android API Demo apps, and code, but the stuff on iOS seems so limited Mar 02 04:42:24 tbh, I found the iOS documentation better :p Mar 02 04:42:25 the problem is the official documentation is just a bunch of sample source code Mar 02 04:42:33 not so much tutorials Mar 02 04:42:49 winegoddess: have you looked at stuff in Dev Center? From what I remember, it was pretty good Mar 02 04:42:50 wow wabz really? i ilk ethe organization of developer.android Mar 02 04:42:52 yeah, but I never really had to look much further than the class documentation for iOS stuff Mar 02 04:43:09 because everything in ios is better *groan* Mar 02 04:43:32 I don't think anyone is saying that Mar 02 04:43:38 i have been snooping around DrPenguin - but it just isn't layer out logically like i find dev.android - unless there is a view which is different Mar 02 04:43:57 winegoddess: This is true, I find d.android.com to be better. I feel like its more welcoming when it comes to coding Mar 02 04:44:01 i mean i can so quickly do a search on a concept and get back the dev guide and api references….plus the api demos, briliant Mar 02 04:44:11 DrPenguin: YES! Mar 02 04:44:13 exactly Mar 02 04:44:35 the iOS dev portal definitely takes longer to get your head around Mar 02 04:45:08 wabz: do you think once i do it will be better? Mar 02 04:45:28 the provisioning stuff in ios is just complete and utter shit Mar 02 04:45:34 yes I think once you learn stuff it becomes.. easier..? Mar 02 04:45:39 i keep hoping i will find something…i recall finding api demos and feeling like i had struck gold Mar 02 04:45:48 like lets think of as many ways to annoy developers, then multiply it by 10 and hten add 2 Mar 02 04:45:58 well..duh! :) i mean getting oriented to become more self sufficient, etc Mar 02 04:46:02 I'm swimming now Mar 02 04:46:41 ... wait, did winegoddess come here to ask about iOS dev? I'm too distracted to rad the bfull backlog Mar 02 04:48:44 oh no, just to taut the glory of the developer.android site :) Mar 02 04:48:54 major props to those invlved Mar 02 04:49:33 d Mar 02 04:50:19 It's all open source, too, IIRC Mar 02 04:52:52 anyone here work with the contact database enough to know how to return the vnd.android.cursor.item/name and the vnd.android.cursor.item/organization blocks in a single query ? Mar 02 05:06:27 Hey all, I'm new to android dev... currently messing around with MediaPlayer, but when I run my application I get a NullPointerException. Activity source and stack trace are as follows: http://pastebin.com/ER3peSj3 and http://pastebin.com/YQ8PUAdj Mar 02 05:06:49 my res/raw folder contains a single file, inception.mp3 Mar 02 05:08:16 put the create for the mediaplayer in the oncreate function of your class Mar 02 05:10:43 ah great, thanks! Mar 02 05:12:10 no problem Mar 02 05:30:11 is there a way to disable buttons? like if i want to hand a kid an app, can the app prevent them form getting out of it, and doing damage elsewhere? Mar 02 05:31:19 no Mar 02 05:31:25 the only way I've found and its not a good one is to set the app as the launcher Mar 02 05:31:55 hmmm….it would be great to be able to password protect it, but yeah i can see how that could be potential for something bad Mar 02 05:32:06 too bad isn't some type of permission t allow of rthis Mar 02 05:32:21 agreed Mar 02 05:32:36 android isn't terribly kid friendly by default Mar 02 05:32:37 aselby11: when you say set it as the launcher, what do you mean exactly? Mar 02 05:33:10 okay, So I'm getting this data from a calendar web feed. However for some reason, a lot of the text I am getting is "stripped" html. Mar 02 05:33:40 with tablets, looking to maybe do some kids apps Mar 02 05:33:48 by stripped I mean all of the '<' and '>' characters are removed, but all of the html keywords, eg table, style ..., are still there. Mar 02 05:33:51 http://www.addictivetips.com/mobile/set-any-app-on-your-android-device-as-default-home-app/ Mar 02 05:34:03 thanks aselby11 :) Mar 02 05:34:09 Is there any libraries to remove the html keywords and perhaps attributes, Mar 02 05:34:56 gnac: prorbably not, because a lot of tags also happen to be words, I'd sugest looking into why you're getting such bad data. Mar 02 05:35:04 winegoddess: as long as you're not looking at ~4 or under, you should be fine Mar 02 05:35:05 @gnac yeah Jsoup.parse Mar 02 05:35:21 @gnac works great Mar 02 05:35:22 the onscreen buttons just don't work for really young kids Mar 02 05:35:24 aselby11: even with the <>s removed? Mar 02 05:35:26 killring: so there is a way to lock things in ICS? Mar 02 05:35:35 aselby11: even with the missing <'s? Mar 02 05:35:48 * SeligArkin doubts it Mar 02 05:36:05 @gnac ... yeah ... probably not Mar 02 05:36:08 not really... like I said, not terribly kid friendly by default (I was thinking along the same lines re: some kids apps until I actually had some kids sit down with the tablet for about 5 minutes) Mar 02 05:36:17 aselby11: next time read the full line. :D Mar 02 05:36:30 SeligArkin: yeah, I think folks are posting html to the events calendar. Somewhere something is trying to strip the tags but is leaving all the attribute info in there. Mar 02 05:36:35 did y'all see the Archos $120 ICS kid's tablet? Mar 02 05:36:41 the very first thing they did was rest their palms on the thing, hit one of the navigation buttons, and got lost Mar 02 05:37:08 Well they can't just be resting their palms willy nilly on a touch screen :| Mar 02 05:37:09 killring, yeah, I hate the soft buttons on honeycomb Mar 02 05:37:26 eg heres the feed fwiw: https://www.google.com/calendar/feeds/1dd9js4f7uifprto25lahpafsqnhs10a%40import.calendar.google.com/public/full?v=2&alt=jsonc&orderby=starttime&sortorder=ascending&futureevents=true&singleevents=true Mar 02 05:37:27 real buttons ftw Mar 02 05:37:33 for some reason, the android team doesn't view it as a problem Mar 02 05:37:42 despite the hundreds of comments on the bug saying otherwise Mar 02 05:37:57 android team listening to comments Mar 02 05:37:57 lol Mar 02 05:38:07 well, maybe not hundreds Mar 02 05:38:09 sorry, $129 http://www.archos.com/corporate/press/press_releases/ARCHOS_Child_Pad_us.pdf Mar 02 05:38:14 but I swear it gets a new email every so often Mar 02 05:38:15 which in turn is grabbed from this calendar Mar 02 05:38:17 http://www.columbiagorgewine.com/events.htm Mar 02 05:38:21 http://code.google.com/p/android/issues/detail?id=15408&can=1&q=is%3Astarred&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars Mar 02 05:38:22 vil33: big difference between resting their palms on something within the app (which can be accounted for) and resting their palms on navigation buttons that take them out of it (not something that can be worked around afaik) Mar 02 05:39:38 seriously, find some young kids and have them try to play angry birds on a soft button android device. you'll learn quickly that you're screwed re: kids apps Mar 02 05:39:43 ah yea soft buttons are a pita Mar 02 05:40:02 There was this family lock app but not sure if its for ics Mar 02 05:40:17 hmmmm Mar 02 05:40:38 I actually like soft buttons provided they can be disabled... but without *any* physical buttons, that's not really possible Mar 02 05:40:50 Leeds: thanks for the share! Mar 02 05:41:02 winegoddess: np Mar 02 05:41:15 * SeligArkin would prefer screen buttons, as it means they can be rotated when the device is / moved to the bottom Mar 02 05:41:39 * SeligArkin also doesn't see what the fuck is with all these people with MUST HAVE MOAR SCREEN!!!!!!! -- it's not taking up much space ffs Mar 02 05:42:14 * killring thinks 30" smartphones will be all the rage in a year or two Mar 02 05:42:31 * p_l wants physically *pushable* button Mar 02 05:42:33 *buttons Mar 02 05:42:40 go back to the age of having giant boxes as phones Mar 02 05:42:48 and then they will make them smaller again Mar 02 05:42:51 What the hell are you doing giving your kid your 600$ tablet, anyway? Mar 02 05:42:58 moar? Mar 02 05:43:02 he can do anything he wants! Mar 02 05:43:03 i guess nobody remembers sidetalking Mar 02 05:43:17 vil33: no thanks, SGS2 hits the spot with button layout... Mar 02 05:43:46 Yea 4 hard buttons is what I like Mar 02 05:44:15 what might work as a compromise would be to go with soft buttons that can be disabled and a user defined button to force them back on (dunno... hold down the vol up/down for some period of time) Mar 02 05:44:32 search Mar 02 05:44:40 oh wait Mar 02 05:44:46 why not both hard and soft Mar 02 05:44:50 soft for rotation Mar 02 05:44:51 the theater mode b.s. just doesn't cut it Mar 02 05:45:18 test Mar 02 05:45:20 vil33: agreed... I don't see why it needs to be an either or thing. provide a couple/few hard buttons and let the user decide what they do Mar 02 05:45:25 hey guys Mar 02 05:45:26 holding vol up and down would mean accidently increasing volume lol Mar 02 05:45:28 killring: you're going to cover the support calls for people who don't remember or understand how to get their buttons back? Mar 02 05:45:38 is romainguy an actual guy or is it a community? Mar 02 05:45:40 remember, users are *dumb* in aggregate Mar 02 05:45:42 he's a guy Mar 02 05:45:54 not bad Mar 02 05:45:57 thanks wmealing_ Mar 02 05:46:00 its also his last name Mar 02 05:46:10 cool Mar 02 05:46:10 i think of him as androids igno moyer. Mar 02 05:46:22 chups: look up some Google I/O talks - you can see his *face* Mar 02 05:46:25 He's a guy and he is the rotational main guy, to be exact Mar 02 05:46:48 leeds: shit, I've lost count of how many times I've had to reboot/pull the battery due to system level stuff blowing up during the normal course of usage. the carriers could just do the same thing they do now when users have problems... ignore them :-( Mar 02 05:46:55 my point about hard buttons is that I want to be able to receive and end calls while my hands are in bulky gloves... Mar 02 05:46:55 oowww Mar 02 05:46:58 little known fact, Igno Molnar is actually a tribe of people, not a single personn. Mar 02 05:47:06 guys, do you use maven when building apps? Mar 02 05:47:17 Yes. Mar 02 05:47:31 what do you use to compile? Mar 02 05:47:43 ...maven. Mar 02 05:47:45 is it normal for builds to take about a minute? Mar 02 05:48:01 You must be new to maven. Yeah, builds take about that long. Mar 02 05:48:02 was wondering if there was a way to use maven just for dependency management Mar 02 05:48:25 like it'll only collect the jars and eclipse uses it to build Mar 02 05:48:33 Then what would you use to compile? Ant? Mar 02 05:48:35 i'm thinking 1 minute is too long Mar 02 05:48:38 maven Mar 02 05:48:41 android:deploy Mar 02 05:48:42 figured out my android market in app billing bug Mar 02 05:48:56 my google account was a google app account that had google wallet disaabled Mar 02 05:48:58 chups: The issue is that the minute you're complianing about is just for dependency management. Mar 02 05:49:14 what command do you use? Mar 02 05:49:28 hmmm.. i think i'm a bit lost kamoricks Mar 02 05:49:31 thanks btw Mar 02 05:49:56 chups: "package", obviously. Plugins are maven-compiler-plugin, maven-resources-plugin, and maven-android-plugin. Mar 02 05:50:00 i use mvn clean install -DskipTest=true android:deploy Mar 02 05:50:16 so its Mar 02 05:50:16 chups: The "clean" will mess things up royally, and why would you skip tests? Mar 02 05:50:24 to save some time Mar 02 05:50:29 hahaha, this is awesome Mar 02 05:50:34 so you use package? Mar 02 05:50:35 chups: But that ruins the entire point of having tests! Mar 02 05:50:46 not if you have the tests in another package. Mar 02 05:51:01 wmealing_: I'm sorry, could you explain what you mean? Mar 02 05:51:16 can't you put android tests in another package, you can build your package, and test the code from another package Mar 02 05:51:25 so that's mvn package android:deploy? Mar 02 05:51:30 just import the crap you need to test ? Mar 02 05:51:35 trying it right now :) Mar 02 05:51:36 wmealing_: You could. However, -DskipTests skips *every* test. Mar 02 05:52:02 i see. Mar 02 05:52:09 [INFO] Total time: 56.840s Mar 02 05:52:16 still takes a minute Mar 02 05:52:25 when i'm doing layouts Mar 02 05:52:25 chups: Yep. Look at how much of that time was spent invalidating caches and checking remote POM files. Mar 02 05:52:29 i'm thinking about hooking up jenkins later anyway.. should make things easier. Mar 02 05:52:38 i do mvn android:apk Mar 02 05:52:41 am i doing it right? Mar 02 05:52:52 i'm using an older version of the mvn android plugin Mar 02 05:53:02 doesn't have docu Mar 02 05:53:16 if i use the new version, my m2eclipse won't work Mar 02 05:53:24 chups: Don't use m2ecliipse. use mvn eclipse:eclipse. Mar 02 05:53:37 cool Mar 02 05:53:41 i'll try it out right now Mar 02 05:54:21 so kamoricks Mar 02 05:54:28 what other mvn commands do you use? :) Mar 02 05:54:32 you're pretty helpful man Mar 02 05:54:33 chups: All of them. Mar 02 05:54:33 thanks a lot Mar 02 05:55:05 hmmm.. Mar 02 05:55:07 i mean like Mar 02 05:55:09 chups: Go over the maven lifecycle and see where the goals for your plugins fit. You're using explicit plugin calls where you probably want lifecycle calls. Mar 02 05:55:28 lets say you edited a line in your activity, what command do you use? Mar 02 05:55:33 chups: mvn package Mar 02 05:55:38 thanks2.. Mar 02 05:55:42 i'll go over it right now Mar 02 05:55:44 thanks a lot man Mar 02 05:55:51 doin eclipse:eclipse Mar 02 05:55:53 crosses fingers Mar 02 05:56:19 btw Mar 02 05:56:24 what eclipse version do you use? Mar 02 05:56:28 I don't. Mar 02 05:56:40 My IDE is IDEA 11. Mar 02 05:57:06 * validate - validate the project is correct and all necessary information is available Mar 02 05:57:06 * compile - compile the source code of the project Mar 02 05:57:06 * test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed Mar 02 05:57:06 * package - take the compiled code and package it in its distributable format, such as a JAR. Mar 02 05:57:07 * integration-test - process and deploy the package if necessary into an environment where integration tests can be run Mar 02 05:57:10 * verify - run any checks to verify the package is valid and meets quality criteria Mar 02 05:57:12 * install - install the package into the local repository, for use as a dependency in other projects locally Mar 02 05:57:15 * deploy - done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects. Mar 02 05:57:18 here it is! Mar 02 05:57:20 haha, thanks man Mar 02 05:57:22 :) Mar 02 05:57:31 chups: There's also documentation. You know, on the internet. Mar 02 05:57:33 irc is not your own personal notepad Mar 02 05:57:37 so you've tried eclipse as well and you think that idea is better, am i right? Mar 02 05:57:44 chups: Yes. Mar 02 05:58:36 hmmm.. i'll try it out, thanks kamoricks :) Mar 02 05:58:41 chups: gentle on the pasting please Mar 02 05:58:42 one more question Mar 02 05:58:51 you've got any tips there? Mar 02 05:58:56 sorry Leeds Mar 02 05:59:03 looked so small on my screen Mar 02 05:59:09 i thought it was going to be a short one Mar 02 06:03:28 kamoricks, the community edition? Mar 02 06:05:08 chups: Ultimate, but Community also does maven. Mar 02 06:06:14 is there a huge difference between Ultimate and community when it comes to android development? Mar 02 06:06:33 like, to the point wherein it's no longer worth your time if you're only going to use the community edition Mar 02 06:06:49 chups: No. Mar 02 06:07:05 okay :) Mar 02 06:07:06 thanks Mar 02 06:17:16 Anyone know if there is a quick way to add the "big scroll bar" to a scrollview (like the contacts app) Mar 02 06:23:08 you're looking for fast scroll I believe Mar 02 06:23:54 thanks Mar 02 06:48:13 which android device would you recommend for developing / testing games? are there notable differences from a developer perspective between android devices except that some have physical buttons and some don't etc.? Mar 02 06:53:51 there are a large array of screen size/density combos as well Mar 02 07:06:35 night, im beat Mar 02 07:09:12 Try a tegra ouut Mar 02 07:14:30 color drawable ignores its bounds when drawn in canvas Mar 02 07:15:20 is this known bug? Mar 02 07:41:15 https://plus.google.com/107538503004482952974/posts/7T9adSef5X2 :) Mar 02 07:53:47 is there an event i can catch when tapping on a Spinner? Mar 02 07:53:57 OnClickListener is a no go Mar 02 07:54:18 lol accedently posted that in iPhone dev Mar 02 07:54:32 accidentally* Mar 02 07:54:50 onSelectedListener? Mar 02 07:55:16 http://developer.android.com/reference/android/widget/Spinner.html#setOnItemClickListener(android.widget.AdapterView.OnItemClickListener) Mar 02 07:55:30 oh just kidding Mar 02 07:59:06 http://developer.android.com/reference/android/widget/AdapterView.html#setOnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener) Mar 02 07:59:10 that was the one I was looking for Mar 02 07:59:15 Blou_Aap ^ Mar 02 08:04:26 t0mless, I have that Mar 02 08:04:56 but I want something to happen when i tap on it and the drop down pops up Mar 02 08:05:19 and it moans about using OnClick Mar 02 08:05:22 lol: http://openradar.appspot.com/10597149 Mar 02 08:06:39 * killring feels a little bit better about the pile of shit that is eclipse Mar 02 08:07:01 you don't have to use eclipse.... Mar 02 08:07:51 in all honesty, I'm not convinced that any other ide would convince me that java doesn't suck, so I stick with the google endorsed one Mar 02 08:08:10 killring: you should try IntelliJ, really :) Mar 02 08:08:43 @romainguy: seriously? Mar 02 08:09:00 awe romainguy, why can't I use OnClickListener on a spinner :( Mar 02 08:09:42 what would be the main benefits of it vs. eclipse? Mar 02 08:09:48 vim FTW Mar 02 08:10:28 ^ lol Leeds, such a nerd Mar 02 08:10:31 oh wait... Mar 02 08:11:01 * killring really longs for a good emacs solution Mar 02 08:11:08 Blou_Aap: didn't you try to .setOnClickListener(this) ? Mar 02 08:11:19 rendar, yes Mar 02 08:11:31 it complains Mar 02 08:11:39 Spinner doesn't accept onClickListener Mar 02 08:11:45 ^ Mar 02 08:12:00 why do you need it to do something other than display it's list when it's clicked? Mar 02 08:12:22 I want something else to be triggered in my app Mar 02 08:13:34 killring: it's a lot smarter about writing code Mar 02 08:13:50 * killring surrenders to the advice of @romainguy and begins intellij download Mar 02 08:14:04 it will take you a couple of weeks to learn the shortcuts Mar 02 08:14:10 You use an onSelect and not onClick for spinners... Mar 02 08:14:12 but its refactorings and code completion commands are fantastic Mar 02 08:14:42 romainguy, does inttelJ have an Android plugin of some sort? Mar 02 08:14:49 yes Mar 02 08:15:01 don't need xml views, I always do those the hard way anyways Mar 02 08:15:06 previews* Mar 02 08:15:20 It has xml previews Mar 02 08:15:23 just not live editor Mar 02 08:15:30 which I don't use either Mar 02 08:15:35 @romainguy: unrelated question... is it possible to use fragments in popup windows? (I've been banging my head against this all day) Mar 02 08:15:35 but I appreciate the previews Mar 02 08:15:53 where is this plugin for intelliJ Mar 02 08:16:04 I already use inttelJ for Corona SDK Mar 02 08:16:19 and it doesn't cripple my Mac's ram like eclipse does Mar 02 08:16:35 it was just included when I downloaded <.< Mar 02 08:16:42 meeh Mar 02 08:16:44 Blou_Aap: it's included in the community edition Mar 02 08:16:52 just enabled it in the plugins Mar 02 08:18:19 can it import eclipse projects? Mar 02 08:18:19 im lazy Mar 02 08:18:19 :P Mar 02 08:18:58 Yes Mar 02 08:19:00 it can Mar 02 08:19:11 oh wow Android is just there Mar 02 08:19:15 never even noticed it Mar 02 08:19:17 -_- Mar 02 08:19:40 I've had it lock up on me when trying to build apps though Mar 02 08:19:50 now I just use ant to build from command line anyway Mar 02 08:19:57 awe really :/ Mar 02 08:20:13 meh I'm too lazy for that Mar 02 08:20:17 lol Mar 02 08:20:43 ill just have to make a common script once then Mar 02 08:20:48 and use it always Mar 02 08:20:59 but you use windows or osx t0mless ? Mar 02 08:21:06 windows Mar 02 08:21:20 maybe it won't do the same on osx Mar 02 08:21:47 maybe, never really nailed down the issue, it just hung on "Packaging Resources" Mar 02 08:26:13 romainguy: You about? Mar 02 08:26:23 yeah Mar 02 08:26:28 pm? Mar 02 08:29:32 Is there a chart anywhere showing the numbers of ARMv5 vs ARMv6 vs ARMv7 phones? Mar 02 08:31:00 hello anyone out there? Mar 02 08:32:05 Nope Mar 02 08:32:13 looking for help with removing am/pm text from clock in status bar on sgs2 sgh t989 Mar 02 08:32:38 set it to 24 hour? Mar 02 08:32:44 t0mless: that directed at me? Mar 02 08:33:01 not what the people want Mar 02 08:33:21 they want a centered clock w/o AM/PM Mar 02 08:33:30 frescoraja try #android-root for rom hacks Mar 02 08:33:35 thanks Mar 02 08:33:50 Drakonite no it was not... not even sure how that would remotely apply Mar 02 08:33:57 oh, the nope Mar 02 08:34:04 still not directed at you Mar 02 08:34:10 I was just being a sarcastic ass Mar 02 08:34:27 http://thedoghousediaries.com/3461 Mar 02 08:38:14 is there a reliable way to convert .smali to .java? Mar 02 08:40:24 http://lmgtfy.com/?q=smali+to+java Mar 02 08:40:36 t0mless: I meant the "nope" reply :P Mar 02 08:40:52 yea, I got that after.... I think it's bedtime for me Mar 02 08:40:54 oh Mar 02 08:40:57 oh, bah, you realized that. Mar 02 08:41:00 did you see ICS Rom for a500? Mar 02 08:41:05 yeah, I'm a bit short on sleep too :-/ Mar 02 08:41:22 I put it on mine, it runs much faster and more responsive Mar 02 08:41:35 I have not, I've been busy moving the past month and a half >_< Mar 02 08:41:38 doesn't have root but I didn't have root on it before Mar 02 08:41:50 but I think they have one now that is rooted Mar 02 08:41:53 I've been running ICS on a nexus s, I have mixed feelings on it Mar 02 08:41:57 new bootloader though Mar 02 08:42:33 so you can't just install from cwm recovery Mar 02 08:43:18 that happened with honeycomb for a while too Mar 02 08:43:31 on my xoom at least Mar 02 08:43:31 I'm liking it so far, though I didn't think I'd ever say this, but I miss the appinapp folders Mar 02 08:44:07 I will not miss them, as I'm not even sure what you are talking about :P Mar 02 08:44:22 the 4 little category of app folders that came pre-made Mar 02 08:44:32 the Media, Games, Social, Reading Mar 02 08:44:34 * Drakonite blanks Mar 02 08:44:42 ah, I kinda remember those Mar 02 08:44:58 I think I installed a custom rooted rom on mine a while back that doesn't have them Mar 02 08:45:31 will have to look into new app folders Mar 02 08:45:37 or actually use more than one screen Mar 02 08:46:10 I feel so out of it for not even knowing about app folders Mar 02 08:46:23 past couple months have been VERY screwed up for me though Mar 02 08:47:07 :-/ Mar 02 08:47:15 I've had those times Mar 02 08:47:18 sorry man Mar 02 08:49:10 bedtime for me though Mar 02 08:50:05 'later! Mar 02 08:55:12 anyone here doing any android ADK development? Mar 02 08:55:18 with the arduino open accessory stuff? Mar 02 08:55:55 * iivvoo doesn't quite understand if you can only develop using a real phone or if it's also an option to use an avd with the development board attached to the pc running the avd Mar 02 08:56:19 fairly sure you need a real phone Mar 02 08:58:01 dammit... honeycomb blank screen hang again. time to reboot Mar 02 08:59:15 Is there a way to defined supported screen/density combinations in the android manifest? Mar 02 08:59:35 I want to support small screens and ldpi, but not small screens and mdpi (for instance) Mar 02 08:59:43 screen yes, density no (afaik) Mar 02 09:00:06 why would you not want to support a particular density? Mar 02 09:00:17 * Chainfire wonders that too Mar 02 09:00:28 http://developer.android.com/guide/topics/manifest/compatible-screens-element.html Mar 02 09:00:34 It seems so. Mar 02 09:01:01 I stronly suggest not using that tag Mar 02 09:01:24 Why not? Mar 02 09:01:29 seems silly to do so Mar 02 09:02:10 density scaling is basically free (just ship the highest density artwork you can and it scales down automatically) Mar 02 09:02:21 But there is a screen we absolutely do not support (small and mdpi), how can I prevent those users from installing the app? Mar 02 09:02:33 (small and ldpi works fine) Mar 02 09:02:39 exclude it from the device list ? Mar 02 09:02:56 How? Mar 02 09:03:00 why would you not support a specific density? seriously, what is it that you can't support about it? Mar 02 09:03:03 I don't get how you can not support small and mdpi but can support small and ldpi ? Mar 02 09:03:16 its the "small" part that should matter, not the "ldpi" part Mar 02 09:03:31 excluding a device is done through the developer console after you upload the app to Market Mar 02 09:03:55 hmm okay Mar 02 09:04:24 I have a compatible device/tablet (perhaps even more than one) but doing everything in an avd initially is easier I think Mar 02 09:04:26 killring: http://www.gsmarena.com/sony_ericsson_xperia_x10_mini-3125.php Mar 02 09:04:28 that one Mar 02 09:04:50 ah, so you want to exclude a specific device. *that* makes sense Mar 02 09:05:11 =) Mar 02 09:05:33 aspic> yeah, do that one in the developer console after you upload the app Mar 02 09:05:34 the wholesale disabling of a screen density doesn't (at least for the scenarios I can think of) Mar 02 09:05:36 But I believe its the resolution and density which makes it not working, what if there is similar devices? Mar 02 09:05:44 Chainfire: ait, makes sense. Mar 02 09:06:04 Thanks alot though, will look into it. Mar 02 09:06:11 (the dev console) Mar 02 09:06:34 I could be wrong, but I don't think that device even qualifies as small Mar 02 09:09:53 according to http://developer.android.com/guide/practices/screens_support.html 'small' is at least 426x320dp... that sony device isn't 426dp high Mar 02 09:10:31 yeah you have to take those numbers with a grain of salt Mar 02 09:10:39 they are no longer relevant Mar 02 09:10:50 they seem to be more guidelines than anything else these days Mar 02 09:10:58 remember that the vendor declares their screen parameters Mar 02 09:11:25 what do you mean... those are the relatively new numbers aren't they? (at least for small/medium/large/xlarge that came out in the 3.x timeframe) Mar 02 09:12:14 killring trust me Mar 02 09:12:51 the sizes are now "somewhat around" and no longer "at least" Mar 02 09:12:54 they are guidelines and not requirements. technically venders can rig the rom to claim it to be whatever they want... this tends to show up and be an issue with DPI scaling values more than other settings in my experience Mar 02 09:12:59 killring: the point is, google can't really do anything about it if a vendor decides to ignore those guidelines Mar 02 09:13:10 killring: just like samsung decided to make a 2.x tablet Mar 02 09:14:12 mdijkstra: they can fail them on the compatibility front and refuse them access to google apps on that device (i.e. market) Mar 02 09:14:19 the only power google has is to deny google apps on devices that don't meet the CDD requirements, which IIRC don't say how screen sizes have to be specified Mar 02 09:14:32 killring: and destroy their ecosystem in one big swoop Mar 02 09:14:51 the small/normal/large/xlarge thing is deprecated now anyway Mar 02 09:14:56 anyway, it's easy to fix Mar 02 09:14:57 granted, goog isn't likely to do that given their tendency to break out the comfy kneepads whenever the telcos are in the room Mar 02 09:15:08 for 3.0 and up (I think) you use the sw360dp or smth selectors Mar 02 09:15:13 just see if the screen is too small Mar 02 09:15:15 * Chainfire forgets as I target 2.1+ Mar 02 09:15:23 chainfire: I think that's 3.2+ Mar 02 09:15:26 print an error, and then finish() Mar 02 09:15:32 whatever :) Mar 02 09:15:43 lol Mar 02 09:15:48 * Chainfire has backported half of ICS to GB by now Mar 02 09:15:57 ... Mar 02 09:16:02 half assed compatibility libraries Mar 02 09:16:04 * Drakonite wishes they'd fix the audio requirements instead of messing around with more screen res requirement changes Mar 02 09:19:48 lol... that x10 is a 1.6/2.1 device Mar 02 09:20:14 * killring is glad to be focused on the .1% of the market that's on 3.x or greater :-) Mar 02 09:21:33 killring: :3 Mar 02 09:21:40 But yeah, that device is crap. Mar 02 09:21:52 Also, found the "exclude"-devices now, thanks! Mar 02 09:21:57 (exactly what I really needed) Mar 02 09:22:23 Lots of people has bought the x10 mini device, for some obscure reason. Mar 02 09:22:32 *have Mar 02 09:23:15 (and when checking for the screen size in runtime in android it reports small) :/ Mar 02 09:24:40 aspic: either excluding specific devices or checking that they meet your needed definition of 'small' makes sense to me... I was struggling with why you were looking to exclude an entire category esp. based on density Mar 02 09:24:53 aspic> I know the x10 mini is really popular with a lot of girls I know Mar 02 09:25:18 is that pos still being sold? Mar 02 09:26:00 nah but back when it was :) Mar 02 09:26:46 ah, ok. I'd be very sad if that were still a popular device and begin to question all the stats goog has been boasting about :-) Mar 02 09:27:33 Chainfire: exactly _how_ do you know that? ;-) Mar 02 09:27:33 * killring takes some small amount of comfort in knowing that a large number of devices are 4.x capable but will never be upgraded Mar 02 09:27:47 not that I'm bitter or anything :-) Mar 02 09:28:02 aspic ? Mar 02 09:30:21 Chainfire: it was a joke :-P Mar 02 09:38:28 Hi, does anyone know what format to use if you want to declare android:gravity as an attribute in attrs.xml? Mar 02 09:38:28 tried with format="string" and format="enum", but neither seem to work Mar 02 09:57:42 Hi, I just wanted to know if TabHost is depricted... Mar 02 09:57:48 Posted my question on stackoverflow: http://stackoverflow.com/questions/9531177/correct-format-for-androidgravity-in-attrs-xml Mar 02 10:03:17 I need to keep track of the two clocks (the clock in android, and the clock on on a server which the app is communicating with). When the app starts, it gets a unix-timestamp from the server.. Is there a way to easily keep track of these two, or do I have to create my own class with methods like getHour, getTime and whatnot, based on the difference between initial server timestamp, and initial client timestamp, and the current client Mar 02 10:05:24 nah, you can simply create a Date object with the offset Mar 02 10:06:21 ie, int offset=ourUnixTime-serverUnixTime; Mar 02 10:06:47 then simply make some utility class with offsetDate(Date d, int offset) Mar 02 10:06:56 * Date offsetDate Mar 02 10:08:34 but when I want to use the time again, will it not return the original server time, and not the current server time? Mar 02 10:08:52 well yeah Mar 02 10:09:10 so make a Date getCurrentServerTime() Mar 02 10:09:19 that gets the current time, then offsets it Mar 02 10:35:52 Oh, is onResume() called when the game starts? Mar 02 10:46:37 Kake_Fisk yes you can see this in the activity lifecycle pic Mar 02 10:46:50 Yeah, I saw that, just had to make sure Mar 02 10:47:06 That might be why I have two Runnable threads Mar 02 10:55:02 Hey, i got this Custom ImageView http://pastebin.com/nPD15rmX - how can i clear the canvas with the black lines? Mar 02 11:12:11 When I move something fast over my high density screen, I get trails behind. Do I just deal with it, or is there some way to fix it? Mar 02 11:12:50 I could maybe just use it as a visual effect in my game Mar 02 11:16:42 Kake_Fisk, i don't think it happens on my GNex Mar 02 11:17:19 I see. I have an HTC HD2 Mar 02 11:18:52 hd2 is high density? Mar 02 11:18:53 o_O Mar 02 11:19:13 yeah Mar 02 11:20:32 As in 1.5x Mar 02 11:21:50 Hey, i got this Custom ImageView http://pastebin.com/nPD15rmX - how can i clear the canvas with the black lines? Mar 02 11:22:43 well... i guess 217 isn't that high density Mar 02 11:23:58 does eclipse lose the formatting of anyone elses code when u copy n paste? Mar 02 11:24:01 really infuriating Mar 02 11:24:03 Android divides it into high density and extra high density, I think Mar 02 11:25:55 Kake_Fisk, afaik, low density is ~150 Mar 02 11:26:02 extra low is <100 Mar 02 11:26:13 medium is about 200-300 Mar 02 11:26:21 Oh, okay Mar 02 11:26:28 i guess Mar 02 11:26:35 It's higher density than my computer at least :D Mar 02 11:26:49 my GNex is extra high at 319 or so dpi Mar 02 11:26:58 nice Mar 02 11:27:47 I was a bit shoocked when 32*32px on my computer screen was much smaller on my phone Mar 02 11:28:17 try viewing galaxy nexus screenshots on a pc Mar 02 11:28:20 it's retarded Mar 02 11:28:37 well, it has the same resolution as most laptop screens :P Mar 02 11:28:50 Anyways, I have to go, cya Mar 02 11:31:58 except it's vertical and not horizontal Mar 02 11:43:18 Hi all Mar 02 12:15:58 android.graphics.Rect a = new Rect(130, 180, 150, 0); Rect b = new Rect(110, 180, 160, 0); a.intersect(b) == false <- Why? They clearly overlap on left/right, no? |130-150| and |110-160| Mar 02 12:16:40 nevermind Mar 02 12:19:05 Hey guys. I have an Activity, where I make a new object that is extended from a NanoHTTPD class. In this object I want to access getWindow(), but I get the error "No enclosing instance of the type RemoteSleepActivity is accessible in Mar 02 12:19:05 scope". Any idea how to fix this? Mar 02 12:20:35 WeeJeWel: pastebin your code Mar 02 12:32:43 MDijkstra: http://pastebin.com/jrmyJkCi Mar 02 12:35:17 WeeJeWel: you can't access RemoteSleepActivity state like that Mar 02 12:35:17 WeeJeWel make it an inner class in your activity, or pass the acticity explicitly (as Context) Mar 02 12:35:43 WeeJeWel: how would it know which instance you want? Mar 02 12:36:10 and why is the RemoteWebServer variable static? Mar 02 12:36:15 ie, in RemoteSleepActivity Mar 02 12:37:11 also, it's bad practice to do stuff that the Activity has the responsibility to do in the RemoteWebServer Mar 02 12:37:26 (modifying window flags, for example) Mar 02 12:39:19 Hey, i got this Custom ImageView http://pastebin.com/nPD15rmX - how can i clear the canvas with the black lines? Mar 02 12:39:37 Okay, I made it an inner class, but now: Only the original thread that created a view hierarchy can touch its views. Mar 02 12:43:45 anyone knows a place where I can clarify some android design guidelines? Mar 02 12:46:26 Hm I can now send messages, but still the screen doesn't turn on. Mar 02 12:53:51 anyone know how to convert html to text? Mar 02 12:54:09 im using HTML.fromHTML() but its adding weird symbols and removing spaces Mar 02 13:25:41 love away scripts Mar 02 13:25:47 because everyone gives a fuck Mar 02 13:31:27 awesome Mar 02 13:32:29 when is io2012 Mar 02 13:33:05 no, when is io2012 registration date Mar 02 13:33:09 asdf Mar 02 13:33:20 nobody knows Mar 02 13:37:26 so AlertDialog.THEME_DEVICE_DEFAULT_LIGHT doesn't work, that's nice. Mar 02 13:37:42 HI, I'm using a Messenger to send data from a Service to an Activity but unsure about how to do it the other way e.g. data from activity to service besides calling "StartService()" where it is possible to send data through Intent's extras Mar 02 13:38:44 Hey, i got this Custom ImageView http://pastebin.com/nPD15rmX - how can i clear the canvas with the black lines? Mar 02 13:41:08 t432: You can use another Messenger. Mar 02 13:41:50 ndim: I was hoping someone would say that :) Mar 02 13:44:12 t432: Just make sure you don't incidentally send the message to your own instead of the other component's Messenger (I did that :) Mar 02 13:46:18 ndim: Yeah...this service/client relationship can be tricky Mar 02 14:01:29 why would I be getting this error in the logcat: "ERROR/MapActivity: Couldn't get connection factory client" Mar 02 14:01:44 I have verified my API Key (using the debug key) Mar 02 14:11:55 DammitJim, does hte map work? Mar 02 14:12:00 Whoa, I am getting reports my GPS application were reporting 3-2-2012 yesterday. location.getTime() must have been returning the wrong date…has anyone else seen a leap year bug like this? Mar 02 14:12:19 canadiancow|work, it does work... just cleaning up code and came across that log entry Mar 02 14:12:42 yea...i see that a lot Mar 02 14:12:51 so, it's not really a problem? Mar 02 14:12:54 litewait: i have not Mar 02 14:12:56 DammitJim: no Mar 02 14:13:40 the only other thing I saw in Eclipse was a suggestion about an ItemizedOverlay implementation that I'm using where I'm not providing a parameter. i think it wants ItemizedOverlay and I'm not doing the piece Mar 02 14:14:13 litewait, lememe check my logs, cause i have a gps app too Mar 02 14:14:24 DammitJim, generics will work fine without it Mar 02 14:14:30 im pretty sure generics only matter at compile time Mar 02 14:14:59 alright, then I am in good shape :D Mar 02 14:15:16 cancow: scanning my brain but I can't think what else could be wrong, all that I am doing is taking the result of getTime() and setting it on a GMT calendar, this thing has been running for years. Mar 02 14:21:59 dammit! Why is it that JSON doesn't work with NaNs or Infinite Doubles Mar 02 14:22:34 javascript = devil Mar 02 14:22:53 mikedg = lived Mar 02 14:23:01 devil lived Mar 02 14:23:05 SECRET MESSAGE FROM DOG???? Mar 02 14:26:26 Ah, man. Mar 02 14:27:09 Hello, yes, this is dog Mar 02 14:27:27 I recently switched from linux to Windows 8 consumer preview. I have installed the latest android SDK including the Google USB driver. I connect my nexus s to the laptop, the phone goes into USB debugging mode. But eclipse doesn't detect it. if I do >adb devices, the phone doesn't show up. Please help! Mar 02 14:27:39 I was about to buy some new 120mm fans and decided to check the BIOS to see what these were running at...turns out, at some point, the BIOS had been reset and they were running at 100% all the time. Fixed that and now they're traffic loud instead of jet engine loud. Mar 02 14:32:12 wheres the thing on the design site that says dont put an arrow on the right of list items Mar 02 14:34:29 purely belta! Mar 02 14:35:23 How can i setBackgroundResource() in the onDraw() method in a custom imageview? Mar 02 14:35:50 StringBuffers are generally a drag on performance but there no alternative for multi-threading. How does Android cope with StringBuffers? Mar 02 14:36:35 you're making very little sense Mar 02 14:36:59 StringBuffer = way to glue a set of strings together Mar 02 14:37:10 ContraMundum: look at the device in Device Manager, does the device actually show up as having the ADB drivers? Mar 02 14:37:13 multithreading = two threads of execution Mar 02 14:37:18 ContraMundum: I don't think anyone has tried working on this for Win8 yet Mar 02 14:37:30 t432: uh... Mar 02 14:37:51 MDijkstra: I'm HOPING that he means that StringBuffer is thread-safe. That's a silly hope, though, I'm sure. Mar 02 14:38:14 lov, do you know [09:32:12] wheres the thing on the design site that says dont put an arrow on the right of list items Mar 02 14:38:27 canadiancow|work: no Mar 02 14:38:30 sorry Mar 02 14:38:48 anybody here speak japanese? Mar 02 14:39:07 extremely limited I'm afraid.. Mar 02 14:39:23 canadiancow|work: http://developer.android.com/design/patterns/pure-android.html Mar 02 14:39:24 is it total madness to put a viewpager in a dialogfragment? Mar 02 14:39:28 I'm trying to figure out how accurate google's translation of my app name is Mar 02 14:39:39 ndim: <3 Mar 02 14:39:49 hit http://translate.google.com/ and type in "Virtual DJ Turntable" Mar 02 14:40:06 canadiancow|work: Still had it open from a few minutes ago where I read just that. :) Mar 02 14:40:11 heh Mar 02 14:40:48 VJTachyon: sorry, that's way out of my league :) Mar 02 14:40:53 :P Mar 02 14:42:43 lov: I have a service that I plan place it in a thread so I will have multiple threads holding multiple services. From a Service I am sending a bunch reading off an InputStream and placing the content in a StringBuffer and using a Messenger to this stuff to the client. My concern is that StringBuffer may take too much memory and slow the app down...I'm not sure if I should go with a buffer or a String Builder... Mar 02 14:43:19 to send this stuff* Mar 02 14:49:02 hmmm. In my widget in the onUpdate I goto my server to get some news, and I want to change the text in the widget, im using asynctask and on the post execute it should updates the text, however it doesn't, Logs indicate that it is running. code: http://pastebin.com/16vE95JK Mar 02 14:49:18 t432: application components don't own their own threads Mar 02 14:49:32 t432: by default they share one thread (per process, of course) Mar 02 14:49:43 trying to figure out why line 8 and 9 don't get run. Mar 02 14:49:58 t432: so you could just as well start one Service that spawns n worker threads Mar 02 14:50:28 anyone use phonegap Mar 02 14:50:30 oh, c is the context. which gets set in the onUpdate. Mar 02 14:50:30 t432: but you basically have to define what synchronization in the buffer means Mar 02 14:50:48 t432: ie, if the order in which concurrent messages end up in the buffer isn't that important Mar 02 14:50:52 you can make it much faster Mar 02 14:51:21 by just creating n lists of strings for each worker thread, tag every message with a timestamp Mar 02 14:51:37 then, when done, collect all the lists, sort on timestamp Mar 02 14:51:40 and join them together Mar 02 14:52:01 MDijkstra: and this would be better than StringBuilder? Mar 02 14:52:15 better in terms performance Mar 02 14:52:38 t432: it'd depend on what you're trying to do, again, I don't know StringBuilder is threadsafe Mar 02 14:52:49 but generally stuff isn't unless it was specifically designed to be Mar 02 14:52:55 StringBuilder according docs is not thread safe Mar 02 14:53:07 t432: then yeah, it'll be much faster Mar 02 14:53:23 since you essentially have no locking overhead Mar 02 14:54:04 I mean, to do this with stringbuffer means having a lock around it Mar 02 14:55:07 ie, have a class with a synchronized void appendMessage(String s) { mStrBuffer.append(s); } Mar 02 14:55:08 MDijkstra: Right. If using "Worker Thread" then dont the normal multi-thread precaution apply? I though it did? Mar 02 14:55:25 thought* Mar 02 14:55:37 yes, they do Mar 02 14:55:57 synchronized will make sure the method can only be accessed by one thread at once Mar 02 14:56:01 making it 'safe' Mar 02 14:56:47 the problem with this is that if you're writing a lot of stuff from a lot of threads Mar 02 14:57:01 threads will essentially be waiting on the lock 95% of the time Mar 02 14:57:04 hurting performance Mar 02 14:57:20 so it depends on what your threads are doing exactly Mar 02 14:57:26 Right, which is why I am reluctant to use StringBuffer Mar 02 14:57:34 if they're calculating stuff and seldom write a message, it should be alright Mar 02 14:57:42 but if they're constantly streaming lots of messages Mar 02 14:57:48 in java i have a hashmap containing preparedStatments so i easily can call a method with the name of the preparedStatement and a value array ... as android doesnt have preparedStatments -- does anybody know how to do this? Mar 02 14:58:05 with a sqlitedatabase* Mar 02 14:59:01 the_ellipse: android has prepared statements :> Mar 02 14:59:30 oO Mar 02 14:59:34 the_ellipse: actually, you've seen SQLiteDatabase's query methods, right? Mar 02 14:59:48 the ones that accept a string for the query statement, and a string[] with the args to insert? Mar 02 15:00:00 How can i setBackgroundResource() in the onDraw() method in a custom imageview? Mar 02 15:00:03 MDijkstra: You suggest a list is the way to go? Mar 02 15:00:13 but yeah Mar 02 15:00:15 the_ellipse: http://developer.android.com/reference/android/database/sqlite/SQLiteStatement.html Mar 02 15:00:16 well, it depends, again Mar 02 15:00:23 are you streaming messages constantly? Mar 02 15:00:30 or is it a batch process? Mar 02 15:00:39 a batch process Mar 02 15:00:43 er Mar 02 15:00:45 http://developer.android.com/reference/android/database/sqlite/SQLiteProgram.html Mar 02 15:00:47 but i need a resultSet / Cursor as return value lov Mar 02 15:00:56 ok Mar 02 15:01:11 t432: then yeah, the list approach will work Mar 02 15:01:21 the_ellipse: http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#query(java.lang.String, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String) Mar 02 15:01:35 is this method not acceptable? Do you need to actually have pre-compiled prepared statements for maximum efficiency? Mar 02 15:01:39 t432: you just need some kind of way of threading the different messages together Mar 02 15:01:48 t432: ie, a timestamp, or a serial number Mar 02 15:01:56 also, searching for "Android prepared statement" I got http://stackoverflow.com/questions/433392/how-do-i-use-prepared-statements-in-sqlite-in-android#436162 Mar 02 15:02:16 would be much better to have them some kind of precompiled Mar 02 15:02:37 ye found this thread aswell ... thought there might be a nicer solution Mar 02 15:03:05 Hmm. Mar 02 15:03:06 because this one is not really precompiled Mar 02 15:03:09 MDijkstra:I think I'd play it safe and assume the messages will be streamed frequently...what do option do you suggest in this case? Mar 02 15:03:18 Yeah, it sounds like you can't use precompiled statements if you want a cursor, sadly Mar 02 15:03:32 sorry! Mar 02 15:03:39 shit Mar 02 15:03:53 the_ellipse: if you're feeling saucy, compile the sqlite libs, use loadLibrary, and do everything yourself :> Mar 02 15:04:04 t432: it becomes more complex then: Mar 02 15:04:06 no time :P Mar 02 15:04:16 generally you'd have n worker threads and 1 collector thread Mar 02 15:04:18 but thanks anyway :] Mar 02 15:04:47 the workers write their message to a lockless per-thread structure Mar 02 15:04:57 ie, a lockless map Mar 02 15:05:06 per-thread Mar 02 15:05:56 then every second or so, the collector thread empties the structure, and does what I described previously Mar 02 15:07:46 ahhh needed an updateAppWidget call in my postExecute Mar 02 15:08:10 MDijkstra: i have to think this through a little :) Mar 02 15:08:34 t432: my explanation is a bit too complex though: essentially the collectorthread has a datastructure containing n lists, where n is the number of worker threads Mar 02 15:09:02 whenever a worker threads wants to post a message, it pushes it to its list, which it can do without taking a lock Mar 02 15:09:37 Hello all Mar 02 15:09:43 every once in a while, the collector thread will run, locking the entire list, emptying it, joining them together in the way I described earlier Mar 02 15:10:47 MDijkstra: Its a complex proposition for sure... Mar 02 15:11:42 It's impossible for me to debug any native code application using ndk-gdb. Even sample 'hello-jni' app fails. It jumps to unexpected address every time before I am able to set a breakpoint. Without debugger applications run perfectly. Any suggestions? Mar 02 15:13:35 Hem Mar 02 15:13:43 as I was asking in android Mar 02 15:14:11 before trying to start coding for android, and reading its guide, am I supposed to go trough all the java tutorials' guides? Mar 02 15:14:41 pzov: don't use the debugger :> Mar 02 15:14:50 Mitlontecutli: huh? Mar 02 15:14:58 Mitlontecutli: knowing java is generally a prerequisite to doing android dev Mar 02 15:15:12 Mitlontecutli: technically you can do it in c/c++ with the NDK, but only for devices at API level 9 and above (i.e. gingerbread) Mar 02 15:15:22 hi.. Mar 02 15:15:40 since I just tried the basics in java (no swing), I was wondering if it's nough Mar 02 15:15:43 how should the cleartext be used in this example?..and what is it? Mar 02 15:15:45 String crypto = SimpleCrypto.encrypt(masterpassword, cleartext); Mar 02 15:16:08 Mitlontecutli: Android doesn't use swing, so that's ok. Mar 02 15:16:22 its from this tut: http://www.tutorials-android.com/learn/How_to_encrypt_and_decrypt_strings.rhtml Mar 02 15:16:23 Nice idea. Actually, there are suggestions that it's possible to use flag -gstabs in order to use another debug format. However it neither works Mar 02 15:16:32 Mitlontecutli: If you understand http://docs.oracle.com/javase/tutorial/java/index.html and http://docs.oracle.com/javase/tutorial/essential/index.html then you're probably fine to start doing android dev Mar 02 15:16:59 bestKoderEver: "cleartext" is the unencrypted text Mar 02 15:19:38 lov ok, but then one still needs to hide the masterpassword some place safe?.. Mar 02 15:19:44 huh Mar 02 15:27:36 lov is it safer to have a masterpassword in the application? then in the sharedprefs...? Mar 02 15:32:53 J Mar 02 15:37:20 Hey, Is it possible to preview (open) SlidingDrawer in the Layout Editor in eclipse? Mar 02 15:38:39 hey guys. I want my activity to be able to handle email attachments of a certain kind. My activity gets opened and all this works. I retrieve the uri from the intent and get a content uri (content://). But i would rather have a filepath. Does anyone know how to get it? Mar 02 15:39:26 I might have misinterpreted ADT preview 17, but I was hinted that it might be able. "Also fix preview rendering for SlidingDrawer" Mar 02 15:40:45 bestKoderEver: don't keep a password in shared prefs. If you have to store a password, store it in a file encrypted. Consider just not using it at all. Mar 02 15:41:04 bestKoderEver: bear in mind that if the phone is rooted, anyone can get into that directory anyway, and they can figure out how you encrypted the password and thus decrypt it Mar 02 15:41:15 bestKoderEver: security is Hard. Mar 02 15:41:24 let's use plaintext Mar 02 15:42:26 lov: I still disagree that it's worthwhile to encrypt the passwords Mar 02 15:42:34 evancharlton: eh. Mar 02 15:42:44 evancharlton: obfuscation isn't worthless but it's only a speedbump Mar 02 15:43:06 evancharlton: it won't stop a determined attacker, but someone doing grep -R /data/data "password" will miss it Mar 02 15:43:09 if someone's making a targeted attack on your app, the encryption won't slow them down Mar 02 15:43:50 if someone is making a targetted attack on your app, and they have root, they're just going to modify your code/libraries and add hooks anyway Mar 02 15:44:20 bear in mind that proguard is "obfuscation" Mar 02 15:45:00 lov: as someone in here pointed out, it's not _necessarily_ true that the attacker has root Mar 02 15:45:16 some devices have insecure flash modes which let you slurp /data/data Mar 02 15:45:34 heh yup :) Mar 02 15:45:46 oh sweet Mar 02 15:45:52 lov: moto mdm loader Mar 02 15:45:57 yeah, aren't OEMs great? Mar 02 15:46:08 glad you guys are going to firewall them after the acquisition Mar 02 15:46:12 so they can continue doing really dumb shit Mar 02 15:46:37 I didnt realise how much android development involves multi-threading Mar 02 15:46:46 s/android // Mar 02 15:46:50 t432: *all* ;) Mar 02 15:46:57 ;) Mar 02 15:47:11 $0.02 - encrypt the password, at least you make an attempt and block plaintext scraping. If it's a password to Something That Matters, like banking or something, don't roll your own solution, figure out how to use auth tokens you can expire from the server. If it's just a crap account... well... encrypting it is better than plaintext, obfuscation is better than not. Mar 02 15:47:13 android is just a special case. If your program is more complicated than a script, you're probably multithreading, even if you dont' realize it Mar 02 15:48:05 lov: if you come from a strong 'nix background you can avoid threads entirely and still do massive parallel programs. I don't know what his background is though. Mar 02 15:50:11 dragorn: yes, you can substitute multiprocess computing with multithreading, if you're feeling masochistic Mar 02 15:51:21 lov: nah; I do everything select-loop based, single process, except for security Mar 02 15:51:49 lov: but I need to work against a half dozen unixy-posixy-things that threading just adds a new layer of hell on Mar 02 15:52:15 yeah, exactly. unless you're writing a driver or something, you're almost certainly letting SOMEWHERE do the multithreading/processing Mar 02 15:52:29 lov: (except for security meaning multiprocess with IPC to split off the root-level crap) Mar 02 15:52:40 anyhoo Mar 02 15:53:00 lov: nah, no multithreading/multiprocessing at all in that model. Single thread, limited-time select blocking, non-blocking IO exclusively Mar 02 15:53:17 but who does the actual I/O? Mar 02 15:53:21 (the kernel via time sharing) Mar 02 15:53:48 lov: Now that's carrying it a bit father than any normal definition of multithreading :P Mar 02 15:54:05 just pointing out that if you peer over the side, you'll start seeing the turtles. Mar 02 15:55:06 lov: Yes, it's a multitasking capable system. Though I've actually gotten that code to run in a non-multitasking environment driven entirely by hw interrupts to break io blocks and timers, so if you really want to dig at it, you CAN do it :P Mar 02 15:55:42 lov: (fun fact, you can do packet capture on a nintendo ds. you wouldn't want to, though.) Mar 02 15:56:30 o_O Mar 02 16:07:19 ok.. thanks for your thoughts guys.. security...gah.. Mar 02 16:09:27 lov but why would a file with a encrypted pass be better then have it encrypted in shared prefs? Mar 02 16:09:46 hello Mar 02 16:09:52 bestKoderEver: security is hard. The best way would probably be to avoid a pw entirely, and have the user get a long-term token from the auth server that can be removed on the server side Mar 02 16:09:55 I just mistook #android for #android-dev. Mar 02 16:10:05 simon: how'd that work out for you? Mar 02 16:10:26 dragorn, not outright bad. Mar 02 16:10:30 heh Mar 02 16:10:41 oki thanks! Mar 02 16:11:09 bestKoderEver: but also scale it to the riskiness of your app, i don't know what you're doing. If it's just high scores, meh. Mar 02 16:11:12 and he's gone. Mar 02 16:13:44 good morning :) Mar 02 16:14:01 I was reading http://www.vogella.de/articles/Android/article.html as my entry article. I wonder if adding a myClickHandler to every Activity is the way to go. Mar 02 16:17:47 as my first app, I wrote a tamagotchi that can poop and die. you can clean up after it, feed it and play with it. if you play too much with it, it becomes over-excited and frustrated (unhappy), and if you don't clean it, it becomes unhealthy. if any of its three scores drop below zero, it dies. Mar 02 16:18:57 the more you feed it, the more likely it will poop, and the more unhealthy it will also be. if you starve it, it becomes unhappy, but if you then feed it, it becomes really happy. it's kind of silly, and there's a lot of things I don't explore about the platform. Mar 02 16:19:10 ^ not sure if mikedg ... Mar 02 16:19:29 sounds like a pretty complex first app tho Mar 02 16:19:53 ?? Mar 02 16:19:53 could it not have been shortened to: if (!happy) die(); Mar 02 16:20:41 Chainfire, yeah... right now it's if (happy < 0 || fed < 0 || health < 0) die(); Mar 02 16:20:47 Hey guys ... So - I'm in need of some help here. :) One of our branch offices decided to upgrade all their devices to Ice Cream Sandwich and now one of our most used apps broke. Since the original developer is no longer here, I am now king of a realm I no nothing about. heh. So, I'm thinking to recompile the app with the new sdk. However, I'm not sure how to do that. I've already tried it and the resulting apk file wouldn't install. I know Java, I ju Mar 02 16:20:48 st don't know Android dev. Is there any way I can quickly and easily recompile under the new sdk? Mar 02 16:20:54 you want the critter to crawl around on the screen? Mar 02 16:21:06 ender|x: depends on what the old sdk was Mar 02 16:21:10 why you want to do this Mar 02 16:21:37 mikedg: it was Google API 7 Mar 02 16:21:48 did it use any libaries? Mar 02 16:22:16 looks like it's using apache-mime4j-0.6.jar and httpmime-4.0.1.jar Mar 02 16:22:22 mikedg, yeah, I want it to hop around whenever the activity is open, and display its number of turds. Mar 02 16:22:37 libraries caused tons of issues during the recent upgrades Mar 02 16:22:44 it might be a pain in the ass for a non developer to handle Mar 02 16:22:48 it could also be really easy Mar 02 16:22:59 heh - let's hope for easy Mar 02 16:23:13 I mean, I'm a developer - just not an android developer :P Mar 02 16:24:18 ahh Mar 02 16:24:20 I already tried just changing the sdk, but it wouldn't let me do that. So then I built a new project, copies all of the code over and recompiled, but now the apk file won't run. So I'm at a loss... Mar 02 16:24:22 you should have very little problem then Mar 02 16:24:35 why wouldnt it let you change the sdk? Mar 02 16:24:38 and are you using eclipse Mar 02 16:24:44 yeah, using eclipse Mar 02 16:24:58 what profiler do you guys use? Mar 02 16:25:09 ender|x: you need to be a lot more specific Mar 02 16:25:15 traceview :// Mar 02 16:25:20 ender|x: what's not working? what won't install? what won't run? Mar 02 16:25:37 anyone have a list of test cases for LVL stuff Mar 02 16:25:41 well, I went into the project properties, -> Android -> Project Build Target ... and selected the new Google API ... but it won't stay selected. Mar 02 16:25:50 ender|x: no, start from step 0 Mar 02 16:25:56 ender|x: why are you doing this at all? Mar 02 16:26:01 okay... here we go. Mar 02 16:26:05 Is it possible to use more than one content provider per application? Mar 02 16:26:13 canadiancow|work: is LVL enabled? yes, turn off Mar 02 16:26:14 hwrd|work: yes, of course Mar 02 16:26:22 mikedg i'll have a look ty Mar 02 16:26:53 im going to lunch Mar 02 16:26:59 evancharlton: Tks Mar 02 16:27:31 mikedg: thanks, appreicate it Mar 02 16:27:31 evancharlton: Well, what I mean is. Is it possible to provide two separate search suggestion content providers in an application? Mar 02 16:27:37 ^ A little more specific Mar 02 16:28:04 hwrd|work: no idea Mar 02 16:28:07 So, I work for a Sign company in their dev department. We have an app for a special team that goes around the country and takes photos of each sign that is damaged, it uses GPS and Google Maps to upload the "job" to our servers. One of the branch offices decided to upgrade to Ice Cream Sandwich. The app breaks. The original developer who designed this app is long gone. I'm the only one who knows Java here. So the task falls to me to get this app back o Mar 02 16:28:07 nline as soon as possible. :) Mar 02 16:28:08 hwrd|work: try it and see Mar 02 16:28:08 hehe Mar 02 16:28:17 evancharlton: ^^^ Mar 02 16:28:28 ender|x: "app breaks" is what you need to focus on; not the history of the application :P Mar 02 16:28:31 evancharlton: I'm trying it and it's breaking. But, then again, I break a lot of stuff. So I figure I'd ask smart people. Mar 02 16:28:52 ender|x> what exactly breaks Mar 02 16:28:56 :) Mar 02 16:29:06 evancharlton: cool story bro :> Mar 02 16:29:08 er Mar 02 16:29:08 hwrd|work: I think you can only have one per activity Mar 02 16:29:10 damnit Mar 02 16:29:13 ender|x: cool story bro Mar 02 16:29:14 lov: nice try Mar 02 16:29:14 fuck. Mar 02 16:29:18 doesn't come off nearly as flippant. Mar 02 16:29:22 * lov fails again Mar 02 16:29:43 ender|x: are you getting stacktraces for networking on the UI thread? Mar 02 16:29:53 ender|x: it's totally possible that it's the whatsit that's crashing you Mar 02 16:29:54 argh Mar 02 16:29:55 evancharlton: per activity? that's an interesting concept… hmmm ok i'll see about that Mar 02 16:30:01 strict mode Mar 02 16:30:04 the whatsit? Mar 02 16:30:14 StrictMode Mar 02 16:30:30 ender|x: you said "The app breaks". In what way? why? Mar 02 16:30:33 as of ICS, the runtime checks to see if you're doing Really Dumb Shit, like Networking on the UI thread, and just throws an exception Mar 02 16:30:34 ok... so apparently, the app installs, it even runs, but there are certain functions that don't work. Mar 02 16:30:39 is it possible to have a viewpager inside a dialogfragment? Mar 02 16:30:50 ender|x: there's roughly a 0% chance that using the new SDK will magically fix this. Mar 02 16:31:02 ender|x: step one would be to plug in a device, turn on debug mode, and get the log of when it crashes Mar 02 16:31:11 ender|x: android is backwards- and forwards-compatible; updating the SDK won't do a damn thing, haha Mar 02 16:31:13 ok Mar 02 16:31:18 ender|x: does anything CRASH? when you say something "doesn't work", be very specific please :> Mar 02 16:31:20 lov> you have to specifically enable that though, no? Mar 02 16:31:23 Chainfire: nope :D Mar 02 16:31:30 that was a fun surprise! Mar 02 16:31:33 ender|x: rather than flailing around, you'd know what you're looking at. If it's a strictmode violation it'll be in your logs. Mar 02 16:31:42 Chainfire: on 3.x you did, on 4.x it's just on, iirc Mar 02 16:31:45 Is there any good guide on how to make 2 devices communicate over local wifi? Mar 02 16:31:58 lov> oh... guess none of my apps suffer from that stuff then :D Mar 02 16:32:06 lov - look, I don't know too much about this myself. I've been given this task and I'm just trying to get this figured out. So what I'm asking is what do I do. What are my steps. I'm not an android developer. Mar 02 16:32:08 * Chainfire AsyncTasks as if it were a religion Mar 02 16:32:14 ender|x: ok, step 0 is to fix that :> Mar 02 16:32:14 lapdis: as of ICS, there's a Wifi Direct setting Mar 02 16:32:18 ender|x: d.android.com, download the SDK Mar 02 16:32:18 hah Mar 02 16:32:22 done Mar 02 16:32:29 have the dev environment set up? Mar 02 16:32:33 yup Mar 02 16:32:36 zomg Mar 02 16:32:40 srs Mar 02 16:32:40 ok, look up adb logcat Mar 02 16:32:45 that gives you the logs on the device Mar 02 16:32:46 open Mar 02 16:32:49 ok Mar 02 16:32:55 usually if something bad happens, there's a nice fat stacktrace Mar 02 16:33:04 kk ... Mar 02 16:33:16 one sec ... Mar 02 16:34:09 I'm going to trash this project and check it back out from the rep really fast - start fresh yo Mar 02 16:34:13 :) Mar 02 16:34:21 ender|x: yo Mar 02 16:34:47 YO! Mar 02 16:34:53 sup synic :D Mar 02 16:35:11 nothin, surprised to see you in here Mar 02 16:35:22 yeah dude, I got hit with a project I know nothing about Mar 02 16:35:22 heh Mar 02 16:35:49 it'll be fun. Probably. Maybe. Mar 02 16:35:51 :D Mar 02 16:35:58 hehe Mar 02 16:36:00 oh yeah Mar 02 16:36:07 ender|x no offense, but as little as you know about all this, you should be paying somebody to help you / do this for you ... as I think this goes way beyond a simple question here and there. Mar 02 16:36:18 (or do a lot of reading yourself ;)) Mar 02 16:36:25 ender|x: I think the only thing that changed from 2.3 to 4.0 is making web requests on the main thread. Mar 02 16:36:31 oh, I'm sure. Mar 02 16:36:58 ok. that def helps to know that. Mar 02 16:39:37 should I be seeing anythign in logcat during device boot, or not yet? Mar 02 16:39:46 ender|x: I don't know, should you? :> Mar 02 16:39:56 ender|x: does the app set itself up to get a broadcast at boot time? Mar 02 16:40:10 ender|x: go to the ddms view, if you're using eclipse, and click the device Mar 02 16:40:16 alternately, from the commandline, adb logcat Mar 02 16:40:22 logcat picks up sometime during boot on my phone Mar 02 16:40:31 adb logcat that is :P Mar 02 16:42:29 k, ddms view open ... you're loving aren't you lov? Watching a grown man drown in the waters of android :) heh Mar 02 16:42:41 ok, device clicked Mar 02 16:42:57 oh ... nope crap ... heh, one sec Mar 02 16:43:33 alright - logcat working - device booting - ddms open Mar 02 16:43:48 now crash the app Mar 02 16:43:57 you'll see all the problems pop up in the logcat Mar 02 16:44:08 ok Mar 02 16:46:40 Boy am I a noob. I have a vertical linear layout and all I want to do is set a text view to a fixed height and the listview to consume the rest of the display. What should layout_height/weight be? Mar 02 16:47:13 litewait: weight 0 for textview Mar 02 16:47:18 the height whatever height Mar 02 16:47:26 weight 1 for the listview, height 0 Mar 02 16:47:43 litewait: For the listview, Gravity.FILL_VERTICAL Mar 02 16:47:58 uh ... well .... I'm going to try that again - android just crashed during boot. This is going to be a long day :P Mar 02 16:48:11 mike/kam: thanks Mar 02 16:49:25 I have this in the code and I'm not sure where it would normally be in the XML (I didn't write this). I want to add icons to these menu options Mar 02 16:49:28 http://pastebin.com/sPXqVHw6 Mar 02 16:49:45 this adds three menu options (Add new User, Settings and Refresh) Mar 02 16:51:51 they aren't included in my xml, the only stuff that's included in the xml are the screens that popup upon choosing one of those 3 options Mar 02 16:52:00 the addnewuser screen and the settings screen Mar 02 16:52:10 but the options themselves aren't referenced in the xml Mar 02 16:53:32 Sicp: They won't be. See http://developer.android.com/guide/topics/ui/menus.html#options-menu Mar 02 16:53:34 Sicp: http://thedevelopersinfo.wordpress.com/2009/11/04/adding-icon-to-the-menu-item-in-android/ Mar 02 16:53:52 I saw the Marakana tutorial approaching this differently Mar 02 16:53:59 Sicp: you can set the icon programmatically Mar 02 16:54:06 I was searching for such a method Mar 02 16:54:15 I thought a menu.add variant would allow for an icon as well Mar 02 16:54:25 the current one being used is the one you see in the code Mar 02 16:54:28 Sicp: no, you have to string it together like in that link Mar 02 16:54:37 ok I'll read Mar 02 16:54:45 ahhh Mar 02 16:54:50 yes like toast takes .show in the end Mar 02 16:54:52 ok Mar 02 16:55:31 ya, some android methods like this return a reference to themselves so you can chain more methods calls together Mar 02 16:55:49 yea, cascading Mar 02 16:56:33 that is typically called 'fluent'. Mar 02 16:56:34 Android design says I should store a copy of the icons I use so that it won't get botched when the app is running on different platforms Mar 02 16:56:46 but what about 3.0+ which doesn't accept icons anymore? Mar 02 16:57:01 I mean, 3.0 does, but it's in an action bar of some sort while 4.0 accepts none Mar 02 16:57:08 who gives a shit about 3.0 Mar 02 16:57:09 will they just not appear or will the method break? Mar 02 16:57:14 I don't Mar 02 17:00:01 isn't this the site that offers you all of those 2.2 drawables? isn't this Mar 02 17:00:04 http://androiddrawableexplorer.appspot.com/ Mar 02 17:14:27 hmm, I wonder if spinneradapter has some way of having a distinction of selected vs. non-selected items Mar 02 17:15:42 Is there any way to "decrypt" mediaplayer error codes? Mar 02 17:16:10 e.g what does: W/MediaPlayer(16799): info/warning (703, 126) I/MediaPlayer(16799): Info (703,126) mean Mar 02 17:16:41 mean the 703,126 error code. Mar 02 17:22:52 where can i fix that file location? Mar 02 17:22:53 java.lang.RuntimeException: Unable to start activity ComponentInfo{de.volleyball.dom/de.volleyball.dom.Testing}: java.lang.NullPointerException Mar 02 17:23:13 it's not supposed to be there twice i think Mar 02 17:24:39 well where's the code? Mar 02 17:25:43 full logcat pls Mar 02 17:25:50 damn you auto-correct Mar 02 17:26:06 just noticed two spelling errors in my response to a google recruiter Mar 02 17:26:22 you're done Mar 02 17:26:27 birbeck: oh no Mar 02 17:26:27 :( Mar 02 17:26:34 lol Mar 02 17:26:38 now they are gonna hire you Mar 02 17:26:41 just so they can fire you Mar 02 17:26:44 that's okay, you probably didn't want to work at google anyway Mar 02 17:26:47 haha Mar 02 17:26:52 they might hire you just for thinking outside the box! Mar 02 17:27:07 my compnay's always hiring ;) Mar 02 17:27:11 fuck convention! make your own words! Mar 02 17:27:26 canadiancow: im not really into games or social stuff Mar 02 17:27:27 do you still have to sign away your soul to work for them? Mar 02 17:27:41 how about irc angry birds? Mar 02 17:27:48 anyone who can help me with this Error? Mar 02 17:28:04 or youre zygna, not rovio Mar 02 17:28:19 Surfer2010: With this tiny logcat snipped its impossible :D Mar 02 17:28:26 you could totally do irc poker Mar 02 17:28:34 http://pastebin.com/dHTeFGws Mar 02 17:28:56 I cannot set icons for contextMenu? Mar 02 17:29:01 only options menu? Mar 02 17:29:44 i'm not sure what part of the project-code you need for checking where the error might be Leandros ... but i think the "file-path" is not correct, where can i fix that? Mar 02 17:30:18 Sicp: of course you can, and google will help you do that Mar 02 17:30:19 Sicp: correct… you could always make a list activity/fragment that extends the dialog theme Mar 02 17:30:53 oh by default.. my bad. Mar 02 17:31:03 hmm Mar 02 17:31:05 I just think in "there's always a way" Mar 02 17:31:19 I've got an image that is currently stuck in a LinearLayout. I'd like it to hop around... Mar 02 17:31:36 Surfer2010: The erorr is at line 36 in de.volleyball.dom.Testing.onCreate Mar 02 17:32:08 simon: hop around as in animate, or ...? Mar 02 17:32:15 birbeck, yes, move its position. Mar 02 17:32:23 birbeck, its layout forces it put. Mar 02 17:32:56 birbeck, so I wonder what my options are. could I create a sub-layout in which I can draw its position change, or can I change it to some x,y-layout? Mar 02 17:33:02 you may need a relative layout or frame layout if its container does not have enough room to move it where you wish Mar 02 17:33:29 relative layout sounds promising. I'll look into that. Mar 02 17:34:15 Does anyone know how to set a View's layout_height to fill_parent programatically? LayoutParams wants a numeric value. Mar 02 17:34:32 View.FILL_PARENT Mar 02 17:34:33 :D Mar 02 17:34:39 ^ Mar 02 17:35:07 LayoutParams.FILL_PARENT though Mar 02 17:35:17 Yes, of course. Mar 02 17:35:21 cool - thanks Mar 02 17:35:52 e.g RelativeLayout.FILL_PARENT Mar 02 17:35:56 works, too. Mar 02 17:37:03 hmm, doesnt look like it Mar 02 17:38:51 Sure. Use it in my code. :D Mar 02 17:39:04 anyone see any problems with putting a viewpager in a dialogfragment? Mar 02 17:39:47 thank you Leandros :) Mar 02 17:42:32 Leandros: RelativeLayout.LayoutParams.FILL_PARENT perhaps? Mar 02 17:43:09 FILL_PARENT isnt visible as a static or instance member of RelativeLayout Mar 02 17:43:13 Na. Sorry. My mistake. Use LayoutParams.xx :D Mar 02 17:43:27 xD Mar 02 17:43:49 that's a huge workaround for creating context menu that support icons Mar 02 17:43:55 oh well, it's just 2 items Mar 02 17:44:25 its not that bad, depends on if youre requirements need icons there, or if you can get by using system defaults Mar 02 17:45:45 Coding is fun though. But releasing is pain in the ass. Mar 02 17:50:40 Releasing is the easy part Mar 02 17:53:42 "Easy" but painfull. Mar 02 17:54:00 Hates to do icons and this shit. Mar 02 17:54:09 get a gfx guy and stick to coding Mar 02 17:54:11 Leandros could you check again ... can't find the mistake in Line 36 as you said ?! Mar 02 17:54:11 http://pastebin.com/u6wmwFQX Mar 02 17:54:57 http://pastebin.com/c1r3JtiG (is the Error Log) Mar 02 17:55:45 So I'm doing a zoomable image. I've got touch-based panning and zooming done, but apparently it "doesn't work how users expect". How *do* users expect it to work? Currently, diagonal swipes zoom, and horizontal/vertical swipes pan. Mar 02 17:56:03 Surfer2010: bFieldPos1 seems to be null Mar 02 17:56:21 QubeZ: Would be nice. But nothing is free. :D Mar 02 17:56:50 is gmail down for ayone else? Mar 02 17:57:06 gmail works. (germany) Mar 02 17:57:24 Surfer2010: i see you doing things like bFieldPos4.setOn... but bFieldPos4 is not assigned to a Button reference. You are instead using some array to hold the references. Mar 02 17:57:26 Bad Request Error 400 Mar 02 17:57:29 gmail.com Mar 02 17:57:30 :( Mar 02 17:57:44 it is at the very end Mar 02 17:57:47 bFieldPos[4] = (Button) findViewById(R.id.bFieldPos5); // like here, i dont understand why you're doing this Mar 02 17:58:20 private void varzuweisung() { <--- in there it is assigned Mar 02 17:58:36 Surfer2010: I'm saying that youre using bFieldPos4 Button to assign a listener but the variable itself is not referencing your actual Button ID Mar 02 17:58:40 bFieldPos[4] = (Button) findViewById(R.id.bFieldPos5); // this is not right Mar 02 17:59:17 QubeZ: pos4? Dont you mean pos0? Mar 02 17:59:33 well none of them are going to work Mar 02 17:59:44 yes. It starts at pos0 :D Mar 02 17:59:50 tvFieldBASICPos[0] = (TextView) findViewById(R.id.tvFieldBASICPos1); <----- but this is working why not with a button? Mar 02 18:00:26 Surfer2010: because you're actually using the array reference... Mar 02 18:00:43 bFieldPos0.setOnClickListener(this); /// needs to be this: bFieldPos[0].setOnClickListener(this); Mar 02 18:00:57 ahhhhhhhhhhhhhhhhh Mar 02 18:01:00 still not sure wtf you're putting Buttons into an array of Buttons Mar 02 18:01:17 becuase i need to access them by their "number" Mar 02 18:01:35 i see of course you're right about my mistake ... i was looking at a different place Mar 02 18:02:14 you should clean that code up and make it more sane... very hard to follow because you're assigning references to buttons then stuffing them into an array. Why not give those buttons actual names like btnYes, btnNo... instead of positions? Mar 02 18:02:59 becuase those buttons are "rotating" ... or the thing they represent Mar 02 18:03:27 Oh, that's not going to be confusing at all. Mar 02 18:03:49 lol Mar 02 18:05:28 QubeZ: long story i don't know if you wanna hear it all? i'm happy about getting suggestions to make the code work easier, but so far i only found this way Mar 02 18:05:58 im in the middle of my work day, multi-tasking, no time for the long version but synopsis of what you're doing? Mar 02 18:06:56 Volleyball Team ... on the court ... each button represents a player who is on this "position" ... now they rotate by the game getting it's way ... Mar 02 18:07:00 also the fact that you start the naming of your buttons at 1 and using the arrays which start at 0... this will come back to bite you many times Mar 02 18:07:19 you should probably have named them starting at 0 to be consistent with the array... *shrug* Mar 02 18:07:34 i know Mar 02 18:08:01 and by clicking the button i wanna edit some values of this player "standing there" at this moment Mar 02 18:08:22 and it's shorter with a for loop than listing every button by itself Mar 02 18:11:36 I have a Thread that is used for network connections. I need to restart the Thread from within itself so it can accept another connection. How do I restart a Thread from within itself? Mar 02 18:12:09 or reinitiate the run() method? Mar 02 18:12:14 dlaroche: are you using ASyncTask? Mar 02 18:12:16 if not, you should Mar 02 18:12:42 No, this is really on the server portion of my app, but it is developed in Java also. I am using a Thread Mar 02 18:13:03 this is #android-dev Mar 02 18:13:14 just because its Java doesnt mean its the place to ask that question Mar 02 18:13:17 no kidding!!! Mar 02 18:13:24 next! Mar 02 18:13:25 dlaroche, you can't restart a thread from within itself Mar 02 18:13:28 you're doing it wrong... Mar 02 18:13:39 dlaroche, use a serversocket or a selector Mar 02 18:13:51 depending on whether you're doing nio or io Mar 02 18:13:55 he could have just asked in #java *shrug* Mar 02 18:13:58 I am using a serversocket Mar 02 18:14:09 io Mar 02 18:15:06 pastebin: http://pastebin.com/tSWsDF4z Mar 02 18:15:07 dlaroche, you have a thread run the accept loop, and it spawns off threads for each accepted stream Mar 02 18:15:10 dlaroche, that's how it works Mar 02 18:15:24 That's... one way for it to work. Mar 02 18:15:40 I have a resolution that the tablet sends over after every orientation change. Mar 02 18:16:16 so I don't want to spawn a bunch of different threads every time the orientation changes Mar 02 18:16:45 Why does the server need to know the orientation of every client device, anyway? Mar 02 18:16:55 dlaroche: One thread per CONNECTION, not per packet. Mar 02 18:17:40 ok....i see now Mar 02 18:17:51 alright back to programming for me Mar 02 18:17:55 thanks everyone Mar 02 18:18:52 <\monster\> hmm no wonder admob pays so little per click ..did some advertising and you pretty much have to set your bid super low or else your budget gets killed within minutes Mar 02 18:19:15 <\monster\> had a $20 test budget set for 5cents/click ..got used in within few minutes Mar 02 18:19:31 anyone else get spam from airpush? Mar 02 18:19:56 i got an email the other day with a bunch of people copied in, looked like market app dev email addresses Mar 02 18:20:13 their payouts suck too Mar 02 18:20:24 i tried them out, but switched Mar 02 18:20:51 dlaroche, thread-per-connection is how IO works Mar 02 18:21:29 \monster\, that many clicks huh Mar 02 18:21:45 are people clicking accidentally that often?? Mar 02 18:22:08 pfn: yeah I know that is how it normally works, but I designed everything assuming that I would just be able to restart the same thread over and over again Mar 02 18:22:37 no biggie though Mar 02 18:23:03 mikey|: welcome to the world of garbage spammers Mar 02 18:23:12 dlaroche, you designed it wrong :p Mar 02 18:23:13 mikey|: the nicest thing to do is to remind them of federal can spam laws Mar 02 18:23:33 I'll get it right this time! Mar 02 18:31:30 my wifi is insanely slow so I'd like to connect from a device to PC over USB. adb forward requires the server to be on a device, other ways (hotspot/tether/pass-through) aren't working one reason or another -- what can I do to make the PC to act as a server for multiple devices connected over USB? Mar 02 18:39:13 http://youtu.be/pi7CxCAjJ6A < new lightshow, new colour set (Twilight Sunset) check it out! Mar 02 18:41:27 This video contains content from WMG, who has blocked it in your country on copyright grounds. Sorry about that. Mar 02 18:41:34 failtube! Mar 02 18:46:26 http://www.h-online.com/security/news/item/Android-smartphones-infected-via-drive-by-exploit-1446992.html Mar 02 18:53:21 is there an article somewhere that details how to properly open/close databases and cursors? Mar 02 18:54:14 ninjai: Yes. .close(). Mar 02 18:54:28 All of them. Always. In a finally { }, so exceptions won't throw them off. Mar 02 18:54:57 No I mean.. when. Like I havemethods that use a database and open a cursor. My database object is created in onCreate(). whenever I hit onResume() my app crashes Mar 02 18:55:05 >_< Mar 02 18:55:05 because it says the cursor is already closed Mar 02 18:55:18 hi lov, long time no see ;) haha Mar 02 18:55:32 don't hate on my yearn to learn :P. Mar 02 18:55:52 how is hackkitten ? Mar 02 18:55:55 ninjai: Yeah. Should be created on onResume() and destroyed on onPause(). Mar 02 18:56:17 destoryed? ok.. I was jsut closing it before Mar 02 18:56:30 Destroyed, closed, whichever. Mar 02 18:57:09 oh Mar 02 18:57:14 I'm already closing it on pause Mar 02 18:57:22 and creating it on resume Mar 02 19:04:13 kamoricks, the reason I get the error is because at onResume() I call a method which uses a cursor. I get the DB in the cursor object and I get the error that I'm trying to use an already closed cursor. Why would it not be open? Mar 02 19:10:37 F'ING HATE GALAXY TAB 7" Mar 02 19:12:52 which one Mar 02 19:13:44 original Mar 02 19:13:50 it lies about its density Mar 02 19:13:54 thus f'ing up layouts Mar 02 19:16:26 id say dont bother with it Mar 02 19:16:32 any bugs like that are "device issue" Mar 02 19:16:45 or find a REAL large hdpi device, nad show how fixing galaxy tab fucks it Mar 02 19:20:52 can you programatically check if a uses-feature element is in the manifest? Mar 02 19:21:52 canadiancow|work: i'd love to, but original tab is a pretty popular device Mar 02 19:22:20 disagree Mar 02 19:22:21 :P Mar 02 19:22:33 so you're going to fuck other current and future devices Mar 02 19:22:35 because samsung is a cunt? Mar 02 19:22:59 welcome to the world of the galaxy tab 7"... I'm struggling with it myself Mar 02 19:23:27 but oh well... the end user is the one that ends up losing in that battle Mar 02 19:23:35 no, i'm just forced to lay out this particular activity by specifying margins from the side, rather than widths from the center, which is how i want to Mar 02 19:24:05 end result the user sees isn't really that different, even across devices. just a PITA. Mar 02 19:24:11 and agree that samsung is a giant cunt. Mar 02 19:24:38 I guess you can do that when you are the #1 seller of 2012 Mar 02 19:25:45 canadiancow|work: i'm curious as to why you'd need to programmatically check if something is in the manifest Mar 02 19:25:59 unless you're talking about checking a diff pkg's manifest Mar 02 19:26:03 i made my custom dialog http://pastebin.com/yRtJQP5N and wanna call it now so i put a >>EvaluationDialog.show();<< to call it but get the error cannot make a static reference to a non-static method show() from the type Dialog Mar 02 19:26:04 my own Mar 02 19:26:11 so i have a library that needs a certain feature Mar 02 19:26:14 do i have something missing in my dialog-class? Mar 02 19:26:14 Confirmed: GalaxyS running Froyo is returning tomorrow's date from (GPS) location.getTime(). Can you say leap year bug? Mar 02 19:26:19 so if the main app doesn thave that feature declared, i want to throw up a big warning Mar 02 19:26:26 ahhh Mar 02 19:26:38 so "kind of" a diff pkg's manifest.. in how i was thinking at least Mar 02 19:26:46 maybe your gps is in a different timezone xD Mar 02 19:26:48 well at runtime, it's mine Mar 02 19:26:55 right Mar 02 19:27:20 http://youtu.be/pi7CxCAjJ6A < new lightshow, new colour set (Twilight Sunset) check it out! (Now available in the USA) Mar 02 19:27:26 GMT is GMT last time I checked 8-) Mar 02 19:28:15 litewait: http://www.independent.co.uk/news/science/einsteins-theory-is-proved--and-it-is-bad-news-if-you-own-a-penthouse-2088195.html Mar 02 19:28:33 GPS satellites are much higher in orbit than we are, so time travels faster for them. Mar 02 19:28:47 100mi up, maybe it really is tomorrow. Mar 02 19:30:25 i need my FeatureInfo!!!! Mar 02 19:30:34 if it helps, it's Saturday in Korea Mar 02 19:31:17 But here it's friday friday Mar 02 19:31:38 but it's a Korean phone Mar 02 19:31:52 <[deXter]> /j #android-root Mar 02 19:39:30 tophyr: ya they proved frame dragging effect with Gravity Prove B Mar 02 19:40:09 also the geodetic effect, which is dope Mar 02 19:57:48 I get not errors when I do db.execSQL(...); and the command doesn't work. How can I get debugging info? Mar 02 19:58:28 ninjai, read the logcat Mar 02 19:59:05 pfn nothing in logcat. Mar 02 19:59:24 there's always something Mar 02 19:59:44 there really isn't. Mar 02 20:00:05 pastebin it all Mar 02 20:00:12 from where it says your activity is starting Mar 02 20:00:22 and how do you figure that it doesn't work? Mar 02 20:00:36 because it's still in the database Mar 02 20:00:42 pastebinning, 1 sec Mar 02 20:01:43 then you wrote the wrong query Mar 02 20:02:05 pfn I never changed the query, just how I accessed the DB Mar 02 20:04:58 pfn, http://pastebin.com/KCvimjvz Mar 02 20:05:47 that's terrible... Mar 02 20:05:50 also pfn, I am looking at the DB on my phone right now, and there definitely is a vehicle table and the string definitely matches Mar 02 20:06:43 what's terrible? my code? probably, I don't really knwo what I'm doing and this was one of my first android projects I'm trying to revive. Mar 02 20:07:03 use db.update/delete/insertOrThrow Mar 02 20:07:13 why are you using execSQL Mar 02 20:07:24 because I thougth that's what you were supposed to use Mar 02 20:07:34 also, pastebin a dump of select * from vehicle Mar 02 20:08:14 my gmail still wont work :( Mar 02 20:08:23 seems like there's also a chance that your string doesn't match, like you have a preceding string or something Mar 02 20:09:08 canadiancow|work: maybe the real name thing applies to bovines too Mar 02 20:09:14 oh wait, thats g+ Mar 02 20:09:23 ok fixed it Mar 02 20:09:26 i went to calendar Mar 02 20:09:28 logged out from there Mar 02 20:09:31 then logged back in at gmail Mar 02 20:11:16 pfn, imgur.com/DWIYN Mar 02 20:11:53 Anyone using ActionBarSherlock 4.0.0-RC1 here? Mar 02 20:12:01 Preferably with Maven and IntelliJ? Mar 02 20:12:02 hmm, preview 3 of adt 17 maybe later today ? ! Mar 02 20:12:27 ninjai, I dunno maybe you have a space before or after Mar 02 20:13:41 not likely :( Mar 02 20:15:24 g00s: yea Mar 02 20:15:30 you on that thread too? :P Mar 02 20:15:43 hehe, the busted library dependency thing ? Mar 02 20:15:46 yea Mar 02 20:15:47 :P Mar 02 20:15:51 yup :P Mar 02 20:15:55 lint + proguard 4.7 Mar 02 20:16:02 i want the whole company to switch over Mar 02 20:16:07 i want to add a new lint rule Mar 02 20:16:31 so that if layout_width or layout_height is not "match_parent", "wrap_content", or "0dp", it spits out a warning Mar 02 20:16:45 i often use 48dp Mar 02 20:16:52 for what? Mar 02 20:16:54 Can someone tell me if I'm doing this wrong? http://pastebin.com/kqbXACVD Mar 02 20:17:23 many things, since its so prevalent in the style guidelines. icon sizes, layouts of general types, etc Mar 02 20:18:43 so make the icon that big Mar 02 20:18:46 and set it to wrap_content Mar 02 20:19:03 the problem ive found is someone makes an image 60x60, then sets the width/height of the imageview to 48x48 Mar 02 20:19:07 and then "WHY DOES IT LOOK BAD" Mar 02 20:19:21 heh, yeah Mar 02 20:19:26 in that case you are right Mar 02 20:19:27 i know there would be a FEW cases where you really want a real absolute value Mar 02 20:19:35 but i would 95% of ours shouldnt be Mar 02 20:19:38 would say* Mar 02 20:19:39 but i don't often have specific dpi icons for every single case Mar 02 20:19:51 so a few cases might be scaled Mar 02 20:20:13 most often i do, but not always Mar 02 20:20:28 well scaling 96x96 to 48x48 is fine Mar 02 20:20:44 but 60x60, not so much Mar 02 20:34:23 what are some good percentages active installs / total for free apps? Mar 02 20:34:56 11 Mar 02 20:35:04 100%/100% Mar 02 20:35:07 those are good Mar 02 20:35:14 awesome Mar 02 20:35:28 my app has 110%/100% Mar 02 20:35:28 etuleu, no idea, 10-30% is my guess Mar 02 20:35:57 pfn, interesting Mar 02 20:36:07 well, 10-40% Mar 02 20:36:12 I mean, it's free Mar 02 20:36:22 people are gonna tend to download it to try it out Mar 02 20:36:29 and then decide it's not useful for them and uninstall it Mar 02 20:36:39 pfn, makes sense Mar 02 20:36:52 paid apps tend to have higher retention, I think Mar 02 20:37:02 yeah i read that somewhere too Mar 02 20:37:03 people paid for the app, so they'll want to keep it Mar 02 20:37:21 honeybar has just over 50% Mar 02 20:37:48 my first for-pay app is down to <30% though Mar 02 20:39:04 I guess some people change phones over time and don't reinstall Mar 02 20:39:08 I guess it's not as useful as it used to be Mar 02 20:39:13 or decide they don't need an app anymore Mar 02 20:39:19 right Mar 02 20:39:29 apps also compete for space on devices with limited internal storage Mar 02 20:39:36 my xperia play was constantly running out of space Mar 02 20:39:55 yeah Mar 02 20:40:25 is it possible to debug a running Android process (preferably with eclipse)? Mar 02 20:40:43 wongk, set debug=true in the manifest and use ddms Mar 02 20:40:58 http://developer.android.com/guide/developing/debugging/ddms.html Mar 02 20:41:19 thank you Mar 02 20:42:53 oh, hmm, i mean stepping through line by line Mar 02 20:42:57 yes. Mar 02 20:43:07 wongk: go to the ddms view, select the device in the devices tab, find your packagename Mar 02 20:43:11 select it, click the little green bug Mar 02 20:43:16 (your manifest had debuggable=true, yes?) Mar 02 20:43:20 then set your breakpoints Mar 02 20:43:26 you can absolutely attach the debugger at runtime Mar 02 20:43:31 (as long as the build is debuggable, that is) Mar 02 20:44:32 The compiler should automatically add debuggable=true if compiling a debug build, shouldn't it Mar 02 20:44:45 yes Mar 02 20:45:34 crap in a hat, this build isn't debuggable Mar 02 20:45:53 aapt adds debuggable=true if you build in debug Mar 02 20:45:59 ok, how bout this, can i somehow force it to overwrite me "release" apk with a debug build Mar 02 20:46:47 no Mar 02 20:46:51 uninstall then reinstall a debug build Mar 02 20:46:54 i just happen to have a market install on my phone atm Mar 02 20:47:09 which of course i almost never have Mar 02 20:47:16 my own devices never have release builds of my own apps, heh Mar 02 20:47:48 hey guys, I need an advice, i've 5 spinners, and each one with an ArrayAdapter, and the setDropDownViewResource is the android.R.layout.simple_spinner_dropdown_item; when I start my app the first option is automatically selected, is any way to put none selected item? Mar 02 20:48:11 i can add the debuggable flag and rebuild a release build Mar 02 20:51:35 ok, got it Mar 02 20:52:34 * hackkitten hops onto Snuffel's lap~ Mar 02 20:52:35 mew :3 Mar 02 20:52:44 hello hackkitten Mar 02 20:52:53 still doing android dev ? :) Mar 02 20:53:08 * hackkitten nods Mar 02 20:53:21 occasionally :3 Mar 02 20:53:29 busy with so many things @_@ Mar 02 20:53:53 djx, make a none-item Mar 02 20:54:34 pfn I thougth that to but the users can select it as well, isn't? Mar 02 20:55:58 djx, I guess, no idea Mar 02 20:56:26 djx, android:prompt Mar 02 20:56:38 maybe Mar 02 20:58:04 djx, I still say set an empty item as the first element, ontouch of the spinner, change the dataset so that the empty item is gone Mar 02 20:58:07 ;-) Mar 02 21:00:19 Suddenly eclipse started trating the "run" button as the "debug" button. I started getting the "attaching debugger" message all the time when I just click "run" Mar 02 21:00:54 Yep. Sometimes does that. Restart eclipse. Mar 02 21:01:07 Alright, I'll try that Mar 02 21:01:15 pfn, that's not a bad idea but how I can read the items from the DB and then add that empty item? Mar 02 21:02:46 that's for you to figure out, I guess :p Mar 02 21:07:21 How can I control when to open my option menu for my activity? Mar 02 21:07:39 huh? Mar 02 21:07:57 you open it when the user presses Menu Mar 02 21:07:59 I want to open it with the default button, but I just want to open it if some variable is true Mar 02 21:08:27 that's probably a bad idea and awkward for a user Mar 02 21:08:39 i'd be weirded out if my options menu opened because of something i did on screen Mar 02 21:09:14 Well, I just have one activity and I just want to open the menu if you are in the level editor part of the game Mar 02 21:09:34 show your own menu construct Mar 02 21:09:48 What do you mean? Mar 02 21:09:48 not the platform menu options Mar 02 21:10:02 show your own toolbar Mar 02 21:10:44 Yeah, that's what I'm doing, if I understood correctly Mar 02 21:10:54 you're asking to show the option menu Mar 02 21:10:55 that's not a toolbar Mar 02 21:12:23 I'm sorry, but I don't understand what you mean :| Mar 02 21:12:43 the options menu is not a toolbar Mar 02 21:12:46 if you want to show a toolbar Mar 02 21:12:47 create your own Mar 02 21:14:21 Kake_Fisk: consider using ActionBarSherlock; you might be thinking of the ActionBar Mar 02 21:15:54 at last android developers who could understand me :D Mar 02 21:16:20 i didnt expect that this #irc channel would be so active Mar 02 21:16:29 no one can understand you Mar 02 21:17:17 I'm just thinking about a simple Menu you can make by making an xml file in res/menu Mar 02 21:17:24 lol pfn Mar 02 21:17:32 I want to control when to open such a menu Mar 02 21:19:02 use actionbarsherlock Mar 02 21:19:06 and an actionmode Mar 02 21:19:12 I'll check it out Mar 02 21:19:32 Oh, it's an extension? Mar 02 21:19:33 is there a way to call setContentView from inside a button onclick listener? Mar 02 21:21:19 Kake_Fisk,you have to keep in mind the menu looks different in different versions of android Mar 02 21:21:28 drastically difference from <3.0 and 3.0+ Mar 02 21:21:36 dandaman: YourActivity.this.setContentView() ? Mar 02 21:21:56 skfax: yea, i just created a global variable and set it to this on oncreate Mar 02 21:22:01 ill se if that works in a sec Mar 02 21:22:51 Yeah, that's not so important. I just want to have some "new", "load", "save", etc. buttons in my level editor Mar 02 21:24:39 Kake_Fisk, so make those buttons, the menu is not the solution Mar 02 21:25:07 Yeah, you think I should just drop the idea with the menu and make some buttons myself? Mar 02 21:32:06 hmm Mar 02 21:32:11 so i have an onclick listener Mar 02 21:32:23 and i want to make it setContentView to something else Mar 02 21:32:30 but I have already setContentView in the oncreate Mar 02 21:32:37 how do i do? Mar 02 21:33:41 just call setContentView again Mar 02 21:33:47 i got an exception Mar 02 21:33:55 so address the exception Mar 02 21:33:59 dandaman: strongly consider using another Activity Mar 02 21:34:04 nullpointer…. Mar 02 21:34:12 ..... and? Mar 02 21:34:15 we don't really care Mar 02 21:34:18 dandaman: naturally, where's the code? Mar 02 21:34:20 a nice fat stacktrace comes with Mar 02 21:34:22 lov: its for a search Mar 02 21:34:29 i can figure this out Mar 02 21:34:30 sorry guys Mar 02 21:34:35 dandaman: use another activity. Mar 02 21:34:39 is this another logical task? Mar 02 21:34:40 yes? Mar 02 21:34:41 Just an early version of my level editor :D http://desmond.imageshack.us/Himg267/scaled.php?server=267&filename=device20120302222417.png&res=medium Mar 02 21:34:42 use another activity Mar 02 21:34:50 call startActivityForResult or something Mar 02 21:34:53 lov: well if the person hits back, i dont want them to go back to an older search Mar 02 21:34:57 whats a level editor? Mar 02 21:35:07 i feel like its one activity Mar 02 21:35:08 An editor where you can editor and make levels Mar 02 21:35:12 dandaman: set flags in your intent so that your taskgroup only has that one instance of the activity Mar 02 21:35:14 edit* Mar 02 21:35:17 ok in context of games Mar 02 21:35:21 yepp :) Mar 02 21:35:27 lov: whoa, how do i do that? Mar 02 21:35:49 lov: and why is that a prefered method over just setting the contentview again? Mar 02 21:35:50 Kake_Fisk: you should make it so if you lose in your game, you really brick the mobile Mar 02 21:35:57 hehe Mar 02 21:36:02 dandaman: for sanity! Mar 02 21:36:09 and organization Mar 02 21:36:15 Hello folks Mar 02 21:36:24 romainguy: http://www.gizmag.com/vintage-leica-cameras-head-to-auction/21642/ Mar 02 21:36:28 I have a linear layout and inside it I have 2 other linear layouts Mar 02 21:36:30 do you do all of your shit in onCreate? no, why? organization, logic, flow Mar 02 21:36:33 g00s: I saw that Mar 02 21:36:37 it looks old :p Mar 02 21:36:44 I want the outermost linear layout to stretch the width of the whole dialog ... Mar 02 21:36:47 the camera or the article :P Mar 02 21:36:49 romainguy: check out www.todomapr.com, it uses google places api. Thoughts? Mar 02 21:36:58 I thought it would be layout_width = fill_parent, but that doesnt seem to work.... Mar 02 21:37:26 QubeZ: do you know what the flag is to keep the activity as one like lov said? Mar 02 21:38:11 FLAG.NEW_TASK or something... i forgot, google it Mar 02 21:38:13 dandaman: because now you have many more views and things to keep track of, not to mention that you have to reinitialize all of your listeners, etc. Mar 02 21:38:26 Isn't FULL_WAKE_LOCK mean to use? Mar 02 21:41:08 depends on what you're doing Mar 02 21:41:28 What if the user wants to save power? Mar 02 21:42:45 a user will surf FB all day, have their GPS loaded with maps for hours and text message throughout the day then complain they have to charge the phone 2x a day Mar 02 21:43:22 ah :p Mar 02 21:43:47 if your app needs full wake lock for some reason, well the user will complain Mar 02 21:44:03 i mean they'll get right past the permissions and install... then flame you on the reviews =) Mar 02 21:44:22 I'm still angry that I have to charge my phone once a day. Aren't things supposed to run on magic by now? Mar 02 21:46:10 Unrelated: I saw that article about most Android users data being sent over WiFi, not 3/4G...which caused me to wonder how everyone doesn't use the gig and a quarter I used in the past two days. Mar 02 21:46:27 huh? Mar 02 21:46:33 MalRD, what phone do you use ? Mar 02 21:46:49 RAZR Maxx. Mar 02 21:47:00 I have the reg RAZR Mar 02 21:47:47 Hi there, I'm trying to bind to a service by following http://developer.android.com/guide/topics/fundamentals/bound-services.html#Binding though I can't seem to find the LocalBinder or LocalService class. What am I doing wrong? Mar 02 21:48:00 I had the 4 (which someone probably remembers me complaining about) and had to exchange it. It was dead halfway through my day, if I was lucky. Mar 02 21:48:20 That's what tipped me off that my usage might be atypical. Mar 02 21:48:36 Possible heh Mar 02 21:49:54 opinions on www.todomapr.com? Curious if anyone's tried the app so far and their thoughts. Mar 02 21:50:03 about to finish beta testing then off to the Market Mar 02 21:50:42 anyone? Mar 02 21:51:00 ziroday: what do you mean can't find it? Mar 02 21:51:23 public MyNewService extends Service {... then auto fill Mar 02 21:51:24 QubeZ: it's not there....eclipse tells me the class doesn't exist. I can't seem to find it in the android javadocs either Mar 02 21:52:20 oh hah I'm dumb. LocalBInder is a placeholder for the service name I assume? Mar 02 21:52:24 ziroday: LocalService is their class dude Mar 02 21:52:33 you name yours whatever Mar 02 21:52:45 yeah gotcha, that makes sense Mar 02 21:53:03 QubeZ: I thought it an Android class. My bad, I'm dumb :) Mar 02 21:53:14 dur!! :P Mar 02 21:58:22 quick question, I am looking at creating a compound control - what method would I override to inflate a specific layout for that? I don't see an onCreateView. Mar 02 22:00:02 developernotes: onAttachedToWindow() maybe? Mar 02 22:00:38 developernotes: constructor? Mar 02 22:00:40 evancharlton: ok, have you done that before? I was thinking about just doing it in the constructor Mar 02 22:00:55 tophyr: that's what I was thinking but wasn't sure if that was the right spot. Mar 02 22:01:28 developernotes: there are problems with doing it in the constructor, iirc (it's not attached, measured, doesn't have a parent, something like that) Mar 02 22:01:49 evancharlton: looks like you're supposed to use the merge tag. Mar 02 22:02:03 well yeah Mar 02 22:02:19 but I don't think that's related to being in the constructor ... Mar 02 22:02:28 right Mar 02 22:03:06 I guess I've done it in the constructor Mar 02 22:03:10 at least in this code I'm looking at Mar 02 22:03:23 evancharlton: i set up my compound views in the ctor, but i don't generally inflate layouts to do it Mar 02 22:03:39 you're right in that there are problems with measuring and such. Mar 02 22:04:30 that's a PITA and i haven't found a method that i can hook into that tells me "the layout process has finished and your view is now at the size it will be, until the next configuration change" Mar 02 22:04:53 my intern is awesome, but he doesnt know the first thing about bit shifting or boolean operations :( Mar 02 22:05:31 canadiancow|work: you've complained about that intern a few times now, fire him Mar 02 22:05:31 tsk Mar 02 22:05:39 [17:04:53] my intern is awesome Mar 02 22:05:47 ya so its contradictory Mar 02 22:06:18 send him to a conf room and tell him not to come out until he can swap two arbitrary integer variables without using a temporary Mar 02 22:06:19 but im glad he's awesome :) Mar 02 22:07:42 Hi Mar 02 22:07:57 hello Mar 02 22:08:07 Busy with developing ? :-) Mar 02 22:08:12 I just sat down Mar 02 22:08:21 but yeah :) I'm trying to figure out 2D graphics. Mar 02 22:09:21 I wanted to ask if it's possible to track down my phone which is stolen :p Mar 02 22:10:02 there's an app for that Mar 02 22:10:19 Yea, bit hard to install without the phone :D Mar 02 22:10:30 what phone Mar 02 22:10:36 HTC Wildfire Mar 02 22:10:43 It's one of my phones Mar 02 22:11:25 tophyr: do you not inflate views in your compound components? Mar 02 22:11:34 sounds like you're hosed to me. Mar 02 22:11:54 call it and ask whoever answers where they are Mar 02 22:12:20 i think my intern is flirting with another intern Mar 02 22:12:23 becuase they're whispering Mar 02 22:12:29 Blocked the SIM, oGMo :p Mar 02 22:12:40 x86d: i wasn't serious :p Mar 02 22:13:10 Can other applications access my raw resources if I provide them the R.id? Mar 02 22:13:10 hehe) Mar 02 22:13:40 no Mar 02 22:13:44 Anyway it's not possible to track such phone with IMEI? Mar 02 22:14:01 Can I give them permission somehow? Mar 02 22:14:16 Even Google with their nice privacy policies ? :D Mar 02 22:14:20 (or if that's not possible any application is allowed to access the SD card with permissions correct?) Mar 02 22:15:29 "hey scott, what's that thing you did? was it like two less than signs? and then 16?" Mar 02 22:15:45 biggest facepalm moment *ever* Mar 02 22:16:07 x86d: it's possible to track a phone, but that requires a warrant. You need to get the tracking system *before* it gets stolen if you don't want to go through warrant Mar 02 22:16:30 well, maybe in USA you don't need warrant, but I'm assuming a country with privacy controls ;) Mar 02 22:17:00 Yea I know, but HTC Sense shit didn't work when I bought the phone hehe Mar 02 22:17:25 Anyway next time I'll write my own security Mar 02 22:17:44 Password when starting phone, if wrong -> send mail with GPS information Mar 02 22:18:16 haha canadiancow|work Mar 02 22:18:23 i actually facepalmed Mar 02 22:18:26 like actually Mar 02 22:18:29 normally i just type it on irc Mar 02 22:18:36 Was it your intern? :p Mar 02 22:18:39 yes Mar 02 22:18:40 of course Mar 02 22:18:44 :D Mar 02 22:18:47 x86d, I can install apps on my HTC Desire on the marketplace website. Mar 02 22:18:53 hes a second year mechanical engeering student Mar 02 22:18:54 x86d, but it requires that my phone is turned on. Mar 02 22:18:59 so he has none of the basics Mar 02 22:19:11 canadiancow|work: ... that's typical comp-sci graduate these days, too Mar 02 22:19:16 You mean market.android.com simon ? Mar 02 22:19:21 x86d, yes. Mar 02 22:19:26 comp-sci is sci Mar 02 22:19:28 Yea I know that Mar 02 22:19:28 eng is eng Mar 02 22:19:29 eng > * Mar 02 22:19:59 canadiancow|work: actually, neither Mar 02 22:20:11 (in reality, that is) Mar 02 22:20:43 what Mar 02 22:20:48 also, in quite a lot of places "engineer" is a title given by a professional body, not a course Mar 02 22:21:00 yes Mar 02 22:21:13 and as a graduate of an accredited institution, i can be licensed once i have 4 years of experience Mar 02 22:21:15 and comp-sci is comp-sci is comp-sci unless it's "ICT" Mar 02 22:21:20 ^_-; Mar 02 22:21:29 s/;// Mar 02 22:23:35 in canada, you cant call yourself an engineer unless you are licensed Mar 02 22:23:54 but you cant be licensed unless you attended an accredited institution, and were enrolled in an accredited program Mar 02 22:24:52 canadiancow|work: anyway, the thing is, I find there's no such thing as a real computer engineering course (there is electrical engineering that might get you into semiconductors ;)), but whatever the label... "comp sci" got a lot worse in last decade+ Mar 02 22:25:26 my comp eng course was very similar to elec Mar 02 22:25:37 it had enough elec that i know more than any compsci grad Mar 02 22:25:45 but rather than going hardcore analog circuits Mar 02 22:25:46 canadiancow|work: how long was it? :) Mar 02 22:25:51 4 years Mar 02 22:25:55 it went into software Mar 02 22:25:58 heh. You lucked out, possibly Mar 02 22:26:56 otoh, polish universities will go into another extreme, with heavy maths etc., but probably won't teach you many important bits about actually working Mar 02 22:27:17 (as in, "approach" to get it done, not just finish assessment) Mar 02 22:28:41 ours was all theory Mar 02 22:28:46 well not "all" Mar 02 22:28:47 but a lot Mar 02 22:30:13 canadiancow|work: we have a mandatory third year course called "software engineering", which tries to simulate actually getting a product out... Mar 02 22:30:26 i guess we do too Mar 02 22:30:37 but ti was like HERE IS THEORY Mar 02 22:30:39 now go write some code Mar 02 22:30:46 fuck that prof pissed me off Mar 02 22:30:46 ~_~ Mar 02 22:31:04 Mar 02 22:31:33 the only good part is that theoretically we simplified a lot since then Mar 02 22:31:49 except now I have to figure how to link PHP with the rest of the system Mar 02 22:32:49 it's especially annoying coming from the guy who was barely seen during planning stages Mar 02 22:42:46 does anyone have an HTC Desire? Mar 02 22:43:03 BOOBIES Mar 02 22:43:12 yay boobies! Mar 02 22:43:16 I want the HTC One X Mar 02 22:43:24 The 4quad core Mar 02 22:43:47 4quad is the new thing Mar 02 22:44:01 yeah, I'd like a quad core too. I was considering getting one but vzn wanted to screw me over on the contract, so screw it I'll just save my money Mar 02 22:44:08 my incredible is still damn fast Mar 02 22:44:56 I have reports that my app is not showing up as supported for the HTC Desire, but the market publishing panel lists it as compatible Mar 02 22:46:03 Drakonite, I can check, how is the app called? Mar 02 22:46:16 Dude Perfect Mar 02 22:46:32 https://market.android.com/details?id=com.dudeperfect.dudeperfect Mar 02 22:46:49 Says compatible here Mar 02 22:46:55 On HTC Desire Mar 02 22:47:32 Dragonene, shows up as compatible on mine Mar 02 22:47:52 er Drakonite. Mar 02 22:48:13 thanks Mar 02 22:49:49 hei im using - rawQuery(query, values) - how can i see either the ? have been replaced or not? the cursor is always empty ... Mar 02 22:50:00 hello guy Mar 02 22:50:01 s Mar 02 22:50:22 how i make a collision with a object in android (java ) Mar 02 22:50:25 hello Mar 02 22:50:49 can someone help me with an ndk question? Mar 02 22:50:54 helllo Mar 02 22:51:10 how i make a collision with a object in android (java )+ xD i try Mar 02 22:51:24 a collision with what Mar 02 22:51:24 the_ellipse: whats your query look like? Mar 02 22:51:33 with a purple object Mar 02 22:51:36 in a image Mar 02 22:51:38 lol Mar 02 22:52:12 can u help me ? Mar 02 22:52:14 QubeZ: SELECT ID FROM tbl_node WHERE routable = 1 AND lon > ? AND lon < ? AND lat > ? AND lat < ? Mar 02 22:53:07 I'm working on a framework library that will be licensed to other android developers Mar 02 22:53:09 the_ellipse: what does your rawQuery code look like? You're missing the other parameter Mar 02 22:53:20 how i make a collision with a purple object in picture ? Mar 02 22:53:29 i guess android still doesn't have the r*tree module compiled in sqlite, bummer Mar 02 22:53:43 ok, this is a pain. the market is randomly reporting to some users that the game is not compatible with their phone, even though it is. Mar 02 22:53:44 range queries without it suck Mar 02 22:53:47 QubeZ: its a string array containing 4 floats (converted to string) Mar 02 22:53:50 so my framework requires some native code Mar 02 22:54:03 the_ellipse: but your DB for lat lon etc.. are int right? Mar 02 22:54:25 I've suspected this as a bug in the past, but I've confirmed it now with some people seeing it as compatible and some seeing it as not compatible that have the same phone Mar 02 22:54:29 so you need to just pass in variables and use that like ... AND lon < myLon AND lat > myLat etc... Mar 02 22:54:30 is there any way to distribute both the compiled classes and the .so in a single package (ie a jar or apk) so that other devs can build android apps against it? Mar 02 22:54:56 QubeZ they are stored as REAL values Mar 02 22:55:02 the_ellipse: I dont think you can use string in that statement because it'll quote it and such I believe so you'll get no results if your lat / lon are integer or real Mar 02 22:55:22 mh Mar 02 22:55:23 the_ellipse: ya so thats why you're getting no results, you have REAL in yoru DB and you're passing in strings to your query Mar 02 22:55:40 nothing people know that ) collision Mar 02 22:56:16 QubeZ: ah ok i see this now in the docs "You may include ?s in where clause in the query, which will be replaced by the values from selectionArgs. >> The values will be bound as Strings. <<" Mar 02 22:56:26 guess thats the prob then, thanks Mar 02 22:56:35 np Mar 02 22:56:38 subdeuxed: you'd just put them in a zip and distribute, and have them unzip to the libs dir in their project or such Mar 02 22:57:35 and honestly, if a readme says to put one file in one folder and another file in a different folder and someone can't handle doing that, they aren't much of a developer Mar 02 22:57:56 drakonite: agreed Mar 02 22:58:16 drakonite: i kinda wish there was a more elegant solution, but if that's how it's done, np Mar 02 22:58:24 ty Mar 02 22:59:01 subdeuxed, apkbuilder only picks up native libraries out of libs/ and not out of jars... Mar 02 22:59:21 subdeuxed: You could deploy it as a maven artifact with os-based classifiers for the SOs and a general for the jar, but make sure you deploy it with the android descriptor. Mar 02 22:59:57 I think the 'best' way is put things in the correct folders in a zip so that when extracted on top of a project things just go to the right spots, but that isn't always feasible or nice depending on the folder layout Mar 02 23:00:30 one more... does anyone have an HTC THunderbolt ? Mar 02 23:01:31 very cool, thanks for your solutions all :) Mar 02 23:02:58 still haven't found a charting library for android that i like; achartengine is buggy. android plot is dead. anyone have any opinions ? Mar 02 23:03:29 g00s: app doing any better? Mar 02 23:08:57 sup people Mar 02 23:09:11 i want a phone with 1080p and um 6 cores Mar 02 23:09:13 and 2gb ram Mar 02 23:09:20 and 100MP camera Mar 02 23:09:29 www.htc.com Mar 02 23:09:31 and 4GHz Mar 02 23:09:34 lol Mar 02 23:09:45 it's coming out in June Mar 02 23:09:47 with android 6.0 and sense 6.0 Mar 02 23:09:58 Android 4.0 and Sense 4.0 Mar 02 23:13:00 hello guys how i make a collision in java android Mar 02 23:13:19 Hourmin: Get the dimensions. See if they overlap. Mar 02 23:13:21 throw your computer at your coworker's computer? Mar 02 23:13:23 with a ball ( Image ) and in a image a part Mar 02 23:13:37 lol Mar 02 23:13:45 cut it out from paper ... paper fight! Mar 02 23:14:11 XD, thats dont help me Mar 02 23:14:20 wtf is XD? Mar 02 23:14:22 Hourmin: collision detection is nontrivial Mar 02 23:14:26 a smilie Mar 02 23:14:47 not a metaphor? Mar 02 23:14:55 no Mar 02 23:14:58 QubeZ: japanimation version of :D Mar 02 23:15:07 tophyr: ahh Mar 02 23:15:37 but i m not japan Mar 02 23:15:42 anyhow, whats some good tutorials to learn on how to get with the whole ICS look/feel design? Mar 02 23:15:42 im from germany Mar 02 23:15:58 i read through the design guidelines but want to look at creating nice user interfaces Mar 02 23:16:55 okay and how i make collsisions ? Mar 02 23:17:10 pot + your head Mar 02 23:17:12 Hi, I'd like to know if using xml layout can be the cause of longer loading (for the same views but writtent programmatically ) Mar 02 23:17:44 how complicated is your view? i cant image its much slower/faster one way or the other Mar 02 23:17:50 not significantly Mar 02 23:18:07 Walui: it's probably a little slower but not tons so. the resource xml files are "compiled" along with the java code Mar 02 23:18:19 the inflater doesn't have to dynamically parse and optimize things Mar 02 23:19:14 seems like iPad3 will be the same price as the iPad2. i heard they were going to be about $80 more; guess not. android is going to have a tough time against these … again / still Mar 02 23:19:28 ipad is fucking expensive Mar 02 23:19:39 and if i wanted to carry around something bulky that couldnt even multitask Mar 02 23:19:42 i'd get a husband Mar 02 23:20:16 Ok thanks tophyr and QubeZ, I was worried about this because I spent a few hours converting what could be into xml layout, but that's probably just the connection Mar 02 23:21:42 I have created a composite control that represents two buttons - I'd like to have them appear to be one button which I have done, except when one button is press, only one is highlighted, is there a way to get them to both appear to be in the same state when only one button is being pressed? Mar 02 23:22:34 And I had an other issue, my activity is loading the xml and a few things, and then it sends a message to a handler which loads the rest of the stuff (because it needs to download it) Mar 02 23:23:06 But it seems like it waits for the handle to finish before dislaying the activity Mar 02 23:23:14 Displaying * Mar 02 23:23:37 So you're telling a handler on the same thread to download stuff? Mar 02 23:24:17 Walui: xml layouts are almost always better than code layouts. xml lets you easily adapt to screens and configurations Mar 02 23:24:19 code does not Mar 02 23:24:40 I don't really understand what you mean sorry SimonVT :/ Mar 02 23:24:59 "and then it sends a message to a handler which loads the rest of the stuff (because it needs to download it)" Mar 02 23:25:17 Is that Handler on another thread? Mar 02 23:25:30 finally got a hold of a google maps personale and they said my app meets terms.. was nervous Mar 02 23:25:39 and what i intend to do with the services Mar 02 23:25:41 I'm very new so i don't really know Mar 02 23:25:43 go live soon! Mar 02 23:26:42 But with the same handler, if I change stuff before calling it, it displays before Mar 02 23:27:14 So I think it means it is on an other thread Mar 02 23:28:08 I mean with an other message later in the activity Mar 02 23:28:48 I figured it out - you simply have to set the onTouchListener for each button and forward the event to the other button with onTouchEvent. Mar 02 23:28:51 i love this android stress monkey tool Mar 02 23:30:15 I will deal with this later, I have to go, thanks for your help :) Mar 02 23:31:35 i ran a 5000 event test on my app and results: :Dropped: keys=4 pointers=84 trackballs=0 flips=0 Mar 02 23:31:37 guessing that is good Mar 02 23:35:00 so - i'm at the library, this seat is next to the romance (uh, fem porn) section … which is the largest genre in the library i am sure Mar 02 23:35:22 the book on display is http://www.amazon.com/Nauti-Deceptions-Novel-Lora-Leigh/dp/051515055X Mar 02 23:35:26 hehe Mar 02 23:35:31 nice name Mar 02 23:36:37 g00s, so, has it piqued your interest to read it yet? Mar 02 23:36:54 hehe, nooo ;) Mar 02 23:37:11 right... you know you want to Mar 02 23:37:46 its weird how much traffic this section gets :) Mar 02 23:37:58 g00s, time to put on your A-game Mar 02 23:38:09 heh Mar 02 23:52:18 pfn, i managed to stream a file with netcat to android the other day as per your help (inputstreams buffered output stream et al) Mar 02 23:52:42 if i want to stream video rather than serving a single file, could i do this with netcat, and would the android side of things be much more difficult? Mar 02 23:52:53 Yes, and only with playback. Mar 02 23:54:20 kamoricks: ok thanks Mar 02 23:55:21 Actually, looking at it, that's not even that bad. ParcelFileDescriptor.fromSocket() gives you the FileDescriptor which you just hand to MediaPlayback, which handles everything else. Mar 02 23:55:55 hmm interesting Mar 03 00:16:11 * g00s goes into install google earth; runs first time from dmg and pops up a dialog saying it wants to install some updater crap; my only option then is install that or quit Mar 03 00:16:14 ux fail Mar 03 00:29:47 g00s: you're not supposed to run from the dmg, you're supposed to put it on your hard drive, the reason it prompted you at all is that it can't write to the directory it was launched from (the dmg) Mar 03 00:31:32 raymonddull: thats what i did. i can mac Mar 03 00:31:46 :) Mar 03 00:46:37 Just quickly, if I create a handler in the activity class, will it start an other thread when called ? Mar 03 00:47:19 no Mar 03 00:48:18 I don't know how to do because I have a lot of views to update with it Mar 03 00:49:07 And if I'm in an other class I won't be able to access to them Mar 03 00:49:24 so lint is telling me I should replace my combo with a Textview with a compound drawable. Mar 03 00:49:38 What could be the best way of doing this then ? Mar 03 00:49:50 I found out how to do this, but I haven't found out how to access the drawable programatiically to change it during runtime. little help? Mar 03 00:49:58 Walui: your trying to update Views of an Activity thats not on in the foreground? Mar 03 00:50:14 No Mar 03 00:50:42 gnac: setCompoundDrawables... Mar 03 00:50:56 Just want to display basic stuff, then download and display the rest Mar 03 00:51:39 But currently it waits for everything to be loaded Mar 03 00:52:14 End that's because it's actually the same thread Mar 03 00:52:18 And* Mar 03 00:53:31 But if my handler is in an other class, how will it access to my views ? Mar 03 00:54:07 sounds like a design issue Mar 03 00:54:34 why is your handler.. yeah your design sounds fubar Mar 03 00:56:28 SimonVT: ty Mar 03 00:56:42 SimonVT: I assume on the referenced textview... Mar 03 00:56:51 gnac: yeah Mar 03 00:57:22 I was told to do it this way Mar 03 00:57:49 by? Mar 03 00:58:11 Don't remember Mar 03 00:58:11 hai Nighthawk Mar 03 00:58:13 I didn't read that far back but it sounds like you are trying to download something. Mar 03 00:58:28 Yes Mar 03 00:58:43 To download something you need to do it inside of a thread or it will bog down the UI thread leading to a force close or basically a wait. Mar 03 00:59:09 So you need to use a thread to download the file and then a handler will be called to interact with the UI thread. Mar 03 00:59:45 can anyone point me to a good xml parsing tutorial for android?(I get all this xml from a webservice call) Mar 03 00:59:54 So you need to pass the views into the constructor or a method and have the thread do it's work then call the handler which should be in the same class. Mar 03 01:00:34 dandaman I would use org.json and convert it to JSON and then parse it that way. Mar 03 01:00:37 Much easier. Mar 03 01:00:55 JoeTheGuest: yeah that's a much better idea Mar 03 01:01:11 but i need to figure out how to convert it :\ Mar 03 01:01:13 dandaman https://github.com/douglascrockford/JSON-java Mar 03 01:01:21 Use the XML class. Mar 03 01:01:54 Just do JSONObject obj = XML.toJSONObject(Your XML) Mar 03 01:03:15 So if I understand, I will first in onCreate display my basic stuff, then start a new thread that will download informations and this thread sends a message to my handler in the activity class ? Mar 03 01:03:19 JoeTheGuest: i just take my inputstream it and toString it into toJSONObject()? Mar 03 01:03:20 Is that it ? Mar 03 01:03:47 Yea, just read the URL to a string, pass it to the XML.toJSONObject, and parse it as json. Mar 03 01:04:45 Walui No. I think you are missing the basis of Objective programming. Mar 03 01:05:03 Pass your views to an object which handle all the threading and handlers. Mar 03 01:05:06 Maybe... Mar 03 01:05:34 I typically make a class that extends Handler and implmenets Runnable. Mar 03 01:05:48 Override the run method and then override the handleMessage(Message msg) Mar 03 01:07:18 Ok I'll try to understand... Thank you Mar 03 01:08:17 Walui quick and dirty demo. http://pastebin.com/r5chtDuQ Mar 03 01:09:05 Hm...there's no way to do optional permissions yet, is there? Mar 03 01:09:35 Ok thanks a lot Mar 03 01:10:15 You handler is where you interact with the UI thread. Mar 03 01:12:44 JoeTheGuest: this is not good, this expects me to use their own json class Mar 03 01:12:49 instead of the one that comes with android Mar 03 01:12:58 It's the same thing. Mar 03 01:13:04 no its not Mar 03 01:13:07 there are some missing classes Mar 03 01:13:17 err Mar 03 01:13:18 methods Mar 03 01:13:20 The github one is a newer version I believe Mar 03 01:13:31 They are the same though just one doesn't have the XML class. Mar 03 01:14:06 Just drag the package in there and you wont notice a difference. Mar 03 01:14:18 weenas Mar 03 01:15:34 dandaman you can use what ever library you want to parse it, you aren't limited to what android provides. Mar 03 01:16:35 how do i download the library in a jar file? Mar 03 01:16:48 A jar is just that stuff packaged up. Mar 03 01:17:12 Create a new package in your project named org.json and then drag and drop the classes in. Mar 03 01:17:31 okay Mar 03 01:18:57 I searched a bit, and I think it will be hard if I have to call the handler everytime I have to change something in a view, so that's why I think I will just download in the thread and then modify the interface in the handler Mar 03 01:20:35 Walui I think you need to learn some Java, it sounds like you don't much about how it works. Mar 03 01:21:30 That's right ... Mar 03 01:22:04 i think the main problem is java, that it doesnt work itself Mar 03 01:22:07 /troll Mar 03 01:22:30 But can you indicate me what is wrongr in what I said ? Mar 03 01:22:50 Because it's what I understood Mar 03 01:23:35 Everything. You use that class I showed you to download something on a side thread and then it calls the handler to exit the thread and return back to the UI thread. Mar 03 01:23:44 Nighthawk: theres nothing wrong with Java. This can happen with any language Mar 03 01:23:55 DrPenguin hence /troll Mar 03 01:24:06 i see no difference in any of these popular c based ones Mar 03 01:24:09 I will end you Mar 03 01:24:30 I agree with you there.. I mainly do C.. if I have to some C++ Mar 03 01:24:45 Ugh.. Don't remind me. Mar 03 01:24:57 Currently in a C/C++ class. Mar 03 01:25:05 Not a fan? Mar 03 01:25:07 JoeTheGuest : isn't it what I told...? Mar 03 01:25:07 2 years of Java to C sucks. Mar 03 01:25:14 how? Mar 03 01:25:20 its not like you can forget... Mar 03 01:25:28 InputStream response = connection.getInputStream(); Mar 03 01:25:28 BufferedReader rd = new BufferedReader(new InputStreamReader(response,Charset.forName("UTF-8"))); Mar 03 01:25:28 JSONObject json=XML.toJSONObject(rd.toString()); Mar 03 01:25:29 Nighthawk: no, but Java and C are night and day Mar 03 01:25:38 JoeTheGuest: i'm obviously doing that right Mar 03 01:25:41 why? Mar 03 01:25:44 JoeTheGuest: err wrong* Mar 03 01:25:51 guess c yea Mar 03 01:25:54 Nighthawk ... your seriously gonna make me explain that Mar 03 01:25:54 dandaman Yes, very wrong. Mar 03 01:25:56 C++? i wouldnt say so Mar 03 01:26:01 dandaman look up some examples or how-to's. Mar 03 01:26:16 DrPenguin: compare java to haskell then i will say yes Mar 03 01:26:20 Nighthawk DrPenguin Java does so much of the heavy lifting and basics for you that C doesn't. Mar 03 01:26:29 Nighthawk you could still say C++ is, C++ for one isnt OO, it just supports an OO Paradigm Mar 03 01:26:32 huge diff Mar 03 01:26:53 JoeTheGuest: I know it does ^^; im arguing your point, not against your point Mar 03 01:27:03 c++ is oo Mar 03 01:27:07 DrPenguin: uh what? Mar 03 01:27:19 it just is backwards compat] Mar 03 01:27:31 im confused Mar 03 01:27:35 loads of ppl write a mix of c and c++ Mar 03 01:27:43 Nighthawk sup Mar 03 01:27:47 dood chachin Mar 03 01:28:01 JoeTheGuest: i guess i'm just confused about how to convert my inputstream or bufferedreader into the full xml text Mar 03 01:28:13 You have to read it in. Mar 03 01:28:20 It will involve a while loop Mar 03 01:28:24 I'm trying to find the currect flags to use for my intent: I wish to launch an activity in a separate task, always being at the root of the task (clearing the stack if needed). The activity should also always have its onCreate() called. Mar 03 01:28:39 lmgtfy.com => java read inputstream Mar 03 01:28:56 w^ dandaman Mar 03 01:29:12 dandaman: http://pastebin.com/LyD0p9GP Mar 03 01:29:38 Never seen Writer class. Mar 03 01:29:39 ron_frown: I dunno, you could go either way on that one.. C++ isnt truly an OO language because you can do stuff without any Objects, where as with Java, you have to use some sort of Object or Class Mar 03 01:29:39 thank you, i suck Mar 03 01:30:03 thats because c++ was an extension to c Mar 03 01:30:07 DrPenguin: thats only because its low level Mar 03 01:30:15 not an all out replacement Mar 03 01:30:19 Which is why I said C++ supports an OO Paradigm Mar 03 01:30:24 people abuse it Mar 03 01:30:39 c++ is oo Mar 03 01:30:47 I would argue that it isnt Mar 03 01:30:49 it looks like onLayout of a viewgroup treats children that are simple Views different from children that are other ViewGroups - is there some logic there? Mar 03 01:30:51 just that most compilers will build c and c++ Mar 03 01:30:52 DrPenguin: how is it not? Mar 03 01:30:55 c++ can be used in an oo fashion or not Mar 03 01:31:00 stl is most decidedly not oo Mar 03 01:31:03 and when its not Mar 03 01:31:12 its pretty much c Mar 03 01:31:13 haha Mar 03 01:31:20 and not to mention c++ has no object hierarchy Mar 03 01:31:23 While I was washing my hands, I sneezed so hard that I smacked my head against the faucet. I now have a lump the size of a goose egg on my head. I'm not sure if it's going to hatch, or if that's just the brain damage talking. FML Mar 03 01:31:46 lol chachin Mar 03 01:31:52 pfn: no object hiearchy? Mar 03 01:31:56 didnt happend to me phew Mar 03 01:31:57 lol Mar 03 01:31:57 chachin: lesson learned: never wash your hands Mar 03 01:31:59 no subclassing? Mar 03 01:32:03 Nighthawk, not in its own library Mar 03 01:32:09 i don't sneeze that hard Mar 03 01:32:09 you can make one Mar 03 01:32:17 but there isn't any sort of object hierarchy Mar 03 01:32:32 bigmomo: It doesn't Mar 03 01:32:33 rather, not existing library that is pretty universal Mar 03 01:32:37 I wasn't aware men wash their hands, I must have missed the memo. Mar 03 01:32:44 +1 Mar 03 01:33:00 in anycase Mar 03 01:33:06 pfn: im not aware of this Mar 03 01:33:08 I just find the statement that c++ isnt oo wrong Mar 03 01:33:17 then again Mar 03 01:33:21 i dont use c++ Mar 03 01:33:21 lol Mar 03 01:33:49 ron_frown: I guess it boils down to how you define it Mar 03 01:34:08 SimonVT - thanks - i have a simple custom layout that override onLayout to position children based on an x/y and an offset determined by the child's dimensions (imagine: tooltips). works perfectly with TextViews, ImageView, but when I try to use a RelativeLayout the child doesn't render Mar 03 01:34:14 well you use objects in C++ Mar 03 01:34:23 so that pretty much makes it oop Mar 03 01:34:24 lol Mar 03 01:34:36 Nighthawk in that case, C is OO Mar 03 01:34:48 DrPenguin if you treat structs as objects Mar 03 01:34:51 I can make a struct, that has members, and functions Mar 03 01:34:58 can you do inheritance of structs in c? Mar 03 01:35:02 (honest question) Mar 03 01:35:03 DrPenguin: no you can't Mar 03 01:35:27 ron_frown: You would have to do some really goofy thing, like giving the child struct a reference to the parent Mar 03 01:35:32 Nighthawk: you totally could Mar 03 01:35:36 ron_frown: Sortish, you can include a base struct in a "child" struct Mar 03 01:35:37 that wouldnt be oo Mar 03 01:36:04 Nighthawk define OO Mar 03 01:36:18 copy pasta: data structures consisting of data fields and methods together with their interactions Mar 03 01:36:34 OK, a struct with members and functions is exactly that Mar 03 01:36:47 ... Mar 03 01:37:20 Anyone know if there is a way to disable the auto MTP on the nexus? Mar 03 01:37:24 i dont know what to say to you anymore Mar 03 01:37:31 abstraction polymorphism and inheritance Mar 03 01:37:33 It gets annoying pluging it in and having the File Browser appear every time. Mar 03 01:37:46 pfn: Optional, but not required Mar 03 01:37:48 yes i could use only structs and pass it in ecx everytime Mar 03 01:38:03 everything is done at compile time though Mar 03 01:38:03 JoeTheGuest: turn off autorun Mar 03 01:38:03 they're the tenets of oo Mar 03 01:38:10 pfm thats how I'd describe it Mar 03 01:38:24 SimonVT in the File browser? Mar 03 01:38:26 If we are gonna go by Nighthawks copy pasta:  Programming techniques may include features such as data abstraction, encapsulation,messaging, modularity, polymorphism, and inheritance. Mar 03 01:38:34 JoeTheGuest, disable AutoRun completely Mar 03 01:38:38 you're using windoze right? Mar 03 01:38:46 Nope. Mac. Mar 03 01:38:54 So, going by my line and Nights line, C can support OO, albeit a very limited paradigm of it Mar 03 01:38:57 I stopped using windows a long time ago. Mar 03 01:39:02 DrPenguin: you can write objective c code using c Mar 03 01:39:05 but that doesnt make c oop does it? Mar 03 01:39:20 Nighthawk Now your just sounding stupid Mar 03 01:39:25 Nighthawk: classes and methods don't make C++ nor Java OOP as well Mar 03 01:39:39 No, you wouldn't call C OO since it's not an inherent part of the language. However you can do OO style programming in C. Mar 03 01:39:40 DrPenguin: explain why? Mar 03 01:40:01 p_l, but surely you would agree that c++ or java is better suited for doing OOP, compared to c? Mar 03 01:40:02 skfax: inheritance isnt a requirement of OO, its just a feature that can be supported Mar 03 01:40:13 JoeTheGuest, using GNOME on ubuntu, i just set the popup to do nothing Mar 03 01:40:14 mgj: hah no Mar 03 01:40:18 no? Mar 03 01:40:24 when a media device/camera is connected Mar 03 01:40:28 mgj: Java... kinda. C++... what are you smoking? Mar 03 01:40:29 so both MTP and PTP Mar 03 01:40:36 i just remembered Mar 03 01:40:39 compared to C?! Mar 03 01:40:41 this convo was about java being oop Mar 03 01:40:44 and C++ not Mar 03 01:40:46 DrPenguin, I wasn't referring specially to inheritance. I was using "inherent" as "embedded in the language" Mar 03 01:40:47 mgj: in fact, I've seen better OOP libs for C than C++ offers Mar 03 01:40:49 nothing to do with C at all ol Mar 03 01:41:00 mgj: i suggest reading alan kay's commentary on oop Mar 03 01:41:05 hmm Mar 03 01:41:12 i'm gonna go facepalm Mar 03 01:41:15 facedesk* Mar 03 01:41:16 and objective-c is actually compiled down to native C structs Mar 03 01:41:20 skfax: ah, I misread. But anyway, id still disgree with ya Mar 03 01:41:31 p_l: objc is just a fat preprocessor Mar 03 01:41:43 p_l: isnt that (kinda) the case with c++ too? Mar 03 01:41:53 DrPenguin: no Mar 03 01:41:54 (my point being that java and c++ aren't any better-suited to oop than C) Mar 03 01:41:55 DrPenguin, Which part do you disagree with? :) Mar 03 01:41:57 @SimonVT would you mind take a quick look at a short piece of code? Mar 03 01:42:43 skfax: that your saying its not an inherent part of the language. It can be if your skilled in C. People just dont normally look at C and think "Objects!" Mar 03 01:42:48 is there an intent fired when a contact is added? how can i listen for this? Mar 03 01:42:48 btw Mar 03 01:42:51 what is an "OOP" lib Mar 03 01:42:56 bigmomo: Sure Mar 03 01:42:57 that doesnt really make much sense Mar 03 01:43:07 SimonVT: thanks. http://stackoverflow.com/questions/9542296/custom-layout-whats-different-when-laying-out-a-viewgroup-vs-view-as-a-chil Mar 03 01:43:23 or am i thinking of the wrong thing >_> Mar 03 01:43:53 Nighthawk well, at first thought, I would think of it as a set of routines or instructions that support an OO Paradigm or structure Mar 03 01:44:04 i was thinking the product of a compiled source Mar 03 01:44:20 the actual machine code, nvm ;p Mar 03 01:45:35 bigmomo: Dunno, you're probably measuring them wrong Mar 03 01:45:51 p_l, do you have evidence of that? does gcc-objc compile to .c prior to .i? Mar 03 01:46:08 Remember, if the size is undefined, it's the sum of child sizes Mar 03 01:46:14 pfn Mar 03 01:46:19 SimonVT: i logged the dimensions, they're reported correctly... you're saying it should work tho? Mar 03 01:46:20 pfn: no, but the ABI of Objective-C (except for the 2.0 variant of Apple) compiles into simple structs Mar 03 01:46:23 an objc message is compiled to a c call Mar 03 01:46:39 which is objc_msgSend(objorclass, selector, ... ) Mar 03 01:46:46 pfn: and Objective-C was originally a preprocessor, like Cfront, but much simpler Mar 03 01:46:56 so yes p_l is right Mar 03 01:47:03 the magic is done in the objc runtime Mar 03 01:47:14 otherwise it will be kinda useless lol Mar 03 01:47:24 bigmomo: So you override onMeasure.. But did you override its measuring of children as well? Mar 03 01:47:31 Nighthawk: there's definitely less magic in objC Mar 03 01:47:35 yea Mar 03 01:47:37 (in the relatievlayout) Mar 03 01:47:45 its a pretty simple language Mar 03 01:47:49 SimonVT: yep, and it logs correctly Mar 03 01:47:49 does what it has to do though Mar 03 01:48:33 bigmomo: The size of the relativelayouts children is properly being measured as well? Mar 03 01:49:35 interesting, so terribly hacky Mar 03 01:49:36 if so Mar 03 01:50:56 SiminVT: in the RL, onMeasure is basically: measureChildren(wms, hms), then get the child dimensions with getMeasuredWidth/Height, then setMeasuredDimension(w, h)... and back in the layout, in onLayout i'm logging the dimensions, which are repoted correctly. most strangely is that it works just as it should with simple Views Mar 03 01:51:13 but it fails to render child ViewGroups Mar 03 01:53:18 Dunno, check hierarchyviewer, see what it tells you Mar 03 01:53:21 SimonVT: i also don't understand why i need to mess with the RLs at all - if the layout handles "normal" Views, why is there an issue with ViewGroups Mar 03 01:53:32 SimonVT: ok. thanks for your iinput Mar 03 01:53:46 Simple answer, you fucked up somewhere Mar 03 01:53:52 You shouldn't need to mess with RL Mar 03 01:55:14 I'll just keep banging on it. Thanks. Mar 03 02:14:18 I see to ways to refresh dataset on listviews. notify and set a new instance of the adapter with the new dataset. What is the difference between them? Mar 03 02:15:16 notifying is the cleaner method Mar 03 02:17:48 pfn: one thing I observed is, when I set a new adapter instance with the changed dataset : if the user was scrolling, he will be moved to the top of the list. Can this be avoided by using notify? Mar 03 02:18:16 napster, yes Mar 03 02:18:30 pfn: hmm, thanks pfn Mar 03 02:18:47 replacing the adapter = replacing all data Mar 03 02:18:54 = 0 data => all data Mar 03 02:19:03 notifying just means that the view should refresh itself Mar 03 02:39:19 pfn: ok, I found another problem. When I call notifyDatasetChanged() from onPostExecute() of my asyntask instance, the ListView doesn't seems to be refreshing. Mar 03 02:39:49 you didn't update the adapter Mar 03 02:40:04 need to add stuff to the adapter not to your array Mar 03 02:43:15 hello peeps! Mar 03 02:44:29 pfn: Hmm, ok. Can you point me a link where I can refer "listView update with AsyncTask"? Mar 03 02:45:06 pfn: http://stackoverflow.com/questions/6922561/how-to-update-listview-after-calling-asynctask-to-call-webservice what about this? Mar 03 02:53:21 napster that deals with threading, which if you're calling notifyDatasetChanged() in onPostExecute() you should be on the main thread and therefore not have an issue Mar 03 02:53:40 you need to actually update the information contained in the adapter Mar 03 02:53:49 before calling notifyDatasetChanged Mar 03 02:54:12 t0mless: ok. actually the adapter uses a global arrayList for populating the listview Mar 03 02:54:40 so when I change the ArrayList, it becomes automatically available for the adapter right? Mar 03 02:54:48 No Mar 03 02:54:57 t0mless: oh Mar 03 02:55:03 the adapter uses a local copy when you create it Mar 03 02:55:40 unless you made a custom adapter that uses a global arrayList Mar 03 02:55:40 t0mless: ok, so how can I set the new data to the adapter, then? Mar 03 02:55:51 what kind of adapter are you using? Mar 03 02:55:51 t0mless: It is a custom adapter Mar 03 02:55:57 ^^ Mar 03 02:56:12 create an update method or something to read the most current data in Mar 03 02:56:15 or an add() method Mar 03 02:57:06 t0mless: in the adapter? Mar 03 02:57:14 yea Mar 03 02:57:27 t0mless: ok let me try Mar 03 02:57:29 thanks **** ENDING LOGGING AT Sat Mar 03 02:59:58 2012