**** BEGIN LOGGING AT Fri Sep 21 02:59:58 2012 Sep 21 03:00:07 the "item" layout is generated for every "row" from the adapter Sep 21 03:00:15 Well because right now I already have 1 static textview which is for the data so should I add another? Sep 21 03:00:29 we wouldn't call it static if it's for data Sep 21 03:00:38 Its the template then Sep 21 03:00:48 yeah Sep 21 03:01:44 I think it slipped my mind that your prefix needs #'s Sep 21 03:02:30 Yea, incremental values Sep 21 03:02:33 I think your gonna have to format your data ahead fo time or create a custom adapter (ie, extend CursorAdapter) Sep 21 03:02:37 Starting at 1 and goes to an integer Sep 21 03:02:56 that's prob what you want, a custom cursor adapter Sep 21 03:03:12 Cant I add another TextView which is the 'prefix'? Sep 21 03:03:42 yeah, but you want ot assign "cursor position" to it? Sep 21 03:03:54 if Q1 is always Q1, you could just have a field in your data for it Sep 21 03:04:31 if they are ordered in various ways, you would prob use cursor position or something, doesn't sound like something that would be easy to translate into a TextView Sep 21 03:04:45 Its ordered from 1 to fixed value Sep 21 03:05:15 =D Sep 21 03:05:31 Making it easy ;) Sep 21 03:05:33 you reading from a cursor, I keep wanting ot use that terminology buy sying away Sep 21 03:05:39 shying.. Sep 21 03:07:53 Cant I nest a Linear Horizontal Layout inside the listview rows? Sep 21 03:08:33 yeah Sep 21 03:08:48 sorry, I thought you had found your path already Sep 21 03:09:03 just LinearLayout with orientation horizontal Sep 21 03:09:21 Yup and sorry, eclipse is twerking out on my again Sep 21 03:09:27 ; ) Sep 21 03:09:30 making random lines of code, god this pisses me off Sep 21 03:09:36 hehe Sep 21 03:09:57 Android needs a seperate IDE, sick of this crap... Sep 21 03:10:16 * HacDan doesn't use an IDE for android =) Sep 21 03:10:25 because Eclipse is painful. Sep 21 03:10:25 I'm partial to IntelliJ, but I wouldn't suggest that it's leaps/bounds better than eclipse Sep 21 03:10:59 oh it is Sep 21 03:11:05 LEAPS and bounds Sep 21 03:11:11 lol Sep 21 03:11:15 even idea 12's android gui designer is way better than adt Sep 21 03:11:38 if I want to sound credible, I have to be subtle right? Sep 21 03:11:45 I haven't tried 12 yet Sep 21 03:11:47 the ide is only going to be as strong as the weakest link... and the weakest link is eclipse Sep 21 03:12:03 12 is in beta atm Sep 21 03:12:08 and the betas do have issues Sep 21 03:12:13 but I'm building my android rom with it Sep 21 03:12:21 still, I aint afraid of no ghost (translation: I like beta software) Sep 21 03:13:58 ron_frow_: if i write the xml myself, is their UI preview good? Sep 21 03:14:15 also, can it format the xml according to the existing conventions ? Sep 21 03:14:45 ui preview felt slow last I used it (11), I don't care for xml conventions other than my own, so I couldn't tell you Sep 21 03:15:28 God how do I fix this bug Sep 21 03:15:39 I cant edit in the xml editor for more than 1 second Sep 21 03:15:44 its changing everything... Sep 21 03:16:07 close eclipse, make your changes with vim/etc, re-open? Sep 21 03:16:27 not ideal, but if you don't want ot get distracted by it atm Sep 21 03:16:33 I just restarted it 1 minute ago Sep 21 03:16:59 =/ Sep 21 03:18:18 in 12 it is perfect Sep 21 03:18:22 better than adt IMO Sep 21 03:18:40 12 the designer works better Sep 21 03:18:45 you can freely design Sep 21 03:19:03 http://www.youtube.com/watch?v=6BRVzjXpVS4 Sep 21 03:19:10 there really aren't alot of widgets, I don't find the xml much worse than doing html... esp with autocomplete Sep 21 03:19:27 * gutano is downloading 12 Sep 21 03:20:02 ramen noodles with fork or spoon ? Sep 21 03:20:07 fork duh Sep 21 03:20:10 sounds good Sep 21 03:20:17 hrrm.. 12 burried in some hard to find link? Sep 21 03:20:20 :) Sep 21 03:20:36 search on google Sep 21 03:20:48 Well gutano that didnt work, I cant nest the linear layout since the listview calls a textview for the row Sep 21 03:21:03 hunh? Sep 21 03:21:07 use a custom adapter? Sep 21 03:21:12 you can use a complex layout for each "row" Sep 21 03:21:50 how do you think I achieve this Sep 21 03:21:50 http://imageshack.us/a/img716/7200/drag12.png Sep 21 03:21:52 * ron_frow_ thrusts Sep 21 03:22:34 Nice table, damn Sep 21 03:22:35 oh the color scheme *covers his eyes* Sep 21 03:22:45 it does look nice though Sep 21 03:22:49 I didnt come up with the colors =) Sep 21 03:22:53 hehe Sep 21 03:23:03 pre existing software I mirrored in android Sep 21 03:24:39 hehehe "September 11st, 2012", from the IDEA 12 EAP page... Sep 21 03:25:01 they dont care Sep 21 03:25:03 I let them know Sep 21 03:41:16 JakeWharton: I'm looking to have a Service @Produce an event representing the current state of the service, however when the service itself is destroyed it will end up being de-registered from the bus, and then there won't be a producer anymore. Is there some clever pattern you've thought of for producing a default event in this case? or should the consumer detect that the event callback didn't happen during register(this) and then act a Sep 21 03:51:59 spifff: there is something like cwac-servicebus or something if you really need those kind of semantics Sep 21 03:53:57 spifff: https://github.com/commonsguy/cwac-bus Sep 21 03:54:54 i probably would not recommend it though Sep 21 03:56:57 Anyone know about how I can get output like linux lspci/lsusb, on android? Sep 21 03:57:52 Please feel free to pm me any answers or questions Sep 21 03:58:00 g00s: thanks, I'll have a look. just using Otto at the moment Sep 21 03:58:02 install shell commander and run the command? Sep 21 03:58:21 though not sure lsusb is available on android kernel Sep 21 03:58:25 but I think so Sep 21 03:59:02 When I run it from android terminal emulator I get nothing Sep 21 03:59:24 The comma d is there just no data Sep 21 04:00:17 I cannot currently reach my device from my chair Sep 21 04:00:35 might need su to actually get any data Sep 21 04:07:04 I'm rooted running cyano9 Sep 21 04:09:23 Is there a way to compount layouts. For instance, lets say first.xml has the layout I desire for multiple views, however for one situation, I need to add a textbox and label to the end. Sep 21 04:09:57 uh, in the developer console - when you see stack traces for crashes, is there any way to determine which version of android these are for ? Sep 21 04:10:07 Instead of creating second.xml with all of the same items plus the added aspects, can I somehow just have an xml with the added components and then add them to first.xml when desired Sep 21 04:15:11 hmm. my app works fine on 2.2 but crashes on 4.1. let the fun begin Sep 21 04:15:40 epsilonorion, import Sep 21 04:16:14 g00s: do you need it to be tested on a 4.1 device? Sep 21 04:16:21 gutano: I actually got it working, thanks Sep 21 04:16:53 epsilonorion, cool, was trying to find an old writeup by romain... I'll let it go Sep 21 04:17:48 sampullman: thx; special hw is required for it to work though Sep 21 04:17:59 ok, well, good luck Sep 21 04:18:05 what kind of hw? Sep 21 04:18:09 g00s: oh, you got your fleshdroid app working? Sep 21 04:18:34 Leeds: lol, wut Sep 21 04:19:15 huh, seems like content provider permissions have changed semantics between 2.2 and 4.1 Sep 21 04:26:25 what other method is there to stop a EditText from having the keyboard open up, beyond setting a layout to android:focusable="true" Sep 21 04:26:25 android:focusableInTouchMode="true" Sep 21 04:45:34 gotta try and port netbios resolution into android tomorrow Sep 21 04:52:32 might be time to use a sick day, lol Sep 21 04:53:06 hmm, is there a way to communicate to a user … for example - you see a crash in the dev console, and want to let people you are working on it, but the fix will be a few days out Sep 21 04:55:14 seems like there would be too much likelihood of abuse... ie, grumpy devs sending heated defense msgs Sep 21 04:55:51 (I have no idea, just theorizing) Sep 21 04:55:54 g00s: you could check for notifications from a server on app startup, and show a dialog with the retrieved data. Sep 21 04:56:09 I think I've used apps that do that Sep 21 04:56:19 I thought he meant through the dev console Sep 21 04:56:51 oh..well supposedly you'll be able to respond to comments soon Sep 21 04:56:51 well, yeah … basically my app is having problems on 4.1 so i would like to email everyone that had 4.1 and say i'm working on a fix Sep 21 04:57:14 sampullman: oh yeah - heh, where the hell is that ? Sep 21 04:57:31 it will show up before the next i/o i guess Sep 21 04:57:34 dunno, I think some devs can already do it Sep 21 04:59:00 respond, like email? or in the play app reviews? Sep 21 04:59:43 email. the user having the crash hasn't reviewed the app yet Sep 21 05:00:00 I know what you want, and I think google would be silly to allow it Sep 21 05:00:19 not that your usage isn't a valid case... but too much possibility of abuse.. Sep 21 05:01:09 I was hoping to get clarification from sampullman about if this (or the other case) is what he's heard of Sep 21 05:01:57 respond as in, it would be like a 2 comment thread in the comments section of your app Sep 21 05:02:01 publicly viewable Sep 21 05:02:07 that seems more viable Sep 21 05:02:17 they would never give out user emails Sep 21 05:03:02 I imagined that case to be proxied, keeping users anon... but yeah, I would be irritated to get an email from a dev of an app I d/l'd Sep 21 05:25:06 How do I get super.loadURL() available? I'm trying to do cordova android development ... "loadUrl cannot be resolved or is not a field" Sep 21 05:27:55 with cordova it seems you replace setContentView(R.layout.activity_main); with the recommended "super.loadUrl("file:///android_asset/www/index.html");" Sep 21 05:29:54 one tutorial says: 'Create folder xml into the project res folder. Add there plugins.xml and cordova.xml from the package you download before.' Sep 21 05:30:26 apache's says to copy the droidgap xml folder into the package.. I don't have plugins or cordova.xml, only a config.xml there Sep 21 05:30:50 loadURL sounds like a something you would call on a WebView, not familiar with cordova (other than a quick google) Sep 21 05:30:56 Which library do bitmap methods come from? (like nativeHeight, bitmapHasAlpha) Sep 21 05:31:03 libskia.so? Sep 21 05:31:31 I imagine you setContentView a layout with a WebView, find it, cast to WebView and loadURL Sep 21 05:31:34 but I'm just guessing Sep 21 05:31:51 Necrosan: yes Sep 21 05:32:09 thanks Sep 21 05:32:21 gutano, cordova uses html5 for the webview.. so it loads a .html for the layout Sep 21 05:32:44 an .html Sep 21 05:32:54 ok Sep 21 05:33:31 (in the phonegap package there's an example and it has the xml dir.. with res/xml/config.xml) Sep 21 05:33:54 http://marguspala.com/basic-phonegap-android-app-from-scratch-step-by-step/ Sep 21 05:34:29 I was somewhat interested after googling cordova, I'm less interested that you mention phonegap in a similar context Sep 21 05:35:21 cordova is phonegap Sep 21 05:35:44 you mean they are similar in approach? or they are the same project? Sep 21 05:35:46 phonegap gave their entire codebase to apache Sep 21 05:35:46 what about it don't you like? (honestly) Sep 21 05:35:53 so essentially the same Sep 21 05:36:17 the idea that you can fit the capabilities of every native sdk into a common pattern Sep 21 05:36:29 like magic Sep 21 05:36:43 I'm not knowledgable about it, I gathered phonegap was a translater Sep 21 05:37:43 as I'm reading the cordova description, sounds like html5 using browser bindings for some of the HW access Sep 21 05:37:51 perhaps I'm not reading closely enough? Sep 21 05:38:52 I guess some ppl might find it useful to bundle a web page as a locally runnable app... I think i would just make a web page Sep 21 05:43:29 are fine in AndroidManifest.xml right? Sep 21 05:43:35 yes Sep 21 05:45:22 first time I've looked into phonegap... it is to Android/iOS/other as jQuery is to Chrome/Firefox/Safari? (handles the nuances of runtime differences?) Sep 21 05:45:55 my cutting and pasting put bad chars in.. like left and right double-quotes.. Sep 21 05:46:24 ie, nothing that couldn't be done (albeit with more hastle) from each of the browsers by any web app in a browser? Sep 21 05:47:01 it does handle differences between different platforms, so you can get a lot done, supposedly, without platform custom development. I am not sure yet how many features it actually provides. Sep 21 05:47:24 you develop in html5 and javascript... and I believe I've seen someone who uses jquery-mobile + cordova Sep 21 05:47:38 interesting Sep 21 05:47:51 I believe jquery mostly expands the toolset and convenience of coding in javascript, while at the same time handling the browser variations for you as well.. Sep 21 05:48:49 *nod*, but cordova/phonegap don't actually "enable" these things, just make them more convenient, portable.. Sep 21 05:48:50 so if you can trust the jquery project, and don't mind the additional chunk downloaded every hit with regards to web stuff... :) In the case of an app it's not the same type of overhead, but there might be a trust/security issue. Sep 21 05:48:59 still, there are a lot of eyes on it no doubt. Sep 21 05:49:08 Can someone point me a good read on InputStreams? TIA Sep 21 05:49:10 <- fan of jQuery Sep 21 05:49:16 when I import org.apache.cordova.DroidGap -- where does that package come from? Sep 21 05:49:19 and html5 Sep 21 05:49:29 just not sure the mobile browsers are good enough yet Sep 21 05:49:35 esp the embeddable ones Sep 21 05:49:56 is it really using the browser, or is browser stuff now built into the os so it uses os web/html5 calls? Sep 21 05:50:19 I don't really want my package to demand the overhead of loading the android "internet" app Sep 21 05:50:45 it's the embedded browser as I understand it (not Chrome or other app store backend) Sep 21 05:51:21 You should also remember that it is really hard to get same look and feel to your application, as you get with native-code Sep 21 05:52:56 it's not using the browser Sep 21 05:52:57 romainguy: you happen to know libskia's dependencies? Sep 21 05:53:00 it's using a widget called WebView Sep 21 05:53:12 the Browser is built around this widget Sep 21 05:53:16 but it's part of the platform Sep 21 05:53:19 and can be used in any app Sep 21 05:53:23 Necrosan: yes why? Sep 21 05:53:37 Curious Sep 21 05:55:57 when I first read that cordova description, I thought they provided some intermediary runtime that binds to html front end (like Win8/Metro apps) Sep 21 05:57:00 all things considered, I'll stick with my native dev.. Sep 21 05:57:58 * jaggz waits for his 5554 in the emulator which appears frozen at boot Sep 21 05:58:10 odd.. just made it Sep 21 06:00:43 app crashes Sep 21 06:00:48 * jaggz shakes his head Sep 21 06:02:36 jaggz, sorry I forgot about your original problem (was reading up on the tech) Sep 21 06:03:08 I got that resolved .. it was copy/paste errors from a website which replaced double quotes with left-right quotes Sep 21 06:04:14 romainguy you still around? I've been getting sigsegv's in libhwui in jellybean Sep 21 06:04:19 well master 4.0.999999.9999999 Sep 21 06:04:29 browsing around in the Settings app Sep 21 06:04:37 eyah Sep 21 06:05:16 I saw comments you made in a mailing list a while ago saying there was a bug that caused same symptoms fixed in jb Sep 21 06:05:40 seems ui/3d acceleration/drawing related Sep 21 06:05:47 based on the cases I managed to get it to happen Sep 21 06:05:50 that's what libhwui is about Sep 21 06:06:32 aware of any such bugs? Sep 21 06:06:46 there were several in HC, ICS and JB Sep 21 06:06:48 we fixed them all Sep 21 06:06:52 at least all the known ones Sep 21 06:06:58 and fixed a couple more beyond JB Sep 21 06:07:16 if I repo sync master, I should get those, no? I am confused because syncing latest and android version shows 4.0.999999.9999 Sep 21 06:07:32 so close to 4.1 Sep 21 06:07:34 apparently panda support is only in master Sep 21 06:07:36 so close. Sep 21 06:07:45 master is versioned at 4.0.9999 =) Sep 21 06:08:14 ron_frow_: well you wouldn't get the fixes we made after the source drop :) Sep 21 06:08:33 you mean if I picked a specific branch Sep 21 06:08:49 or you are saying you dont have those changes in the master Sep 21 06:09:02 which busybox binary could i download? http://www.busybox.net/downloads/binaries/latest/ Sep 21 06:09:15 how can i see? Sep 21 06:09:22 ron_frow_, I think he's saying the master we see is 5 yrs old Sep 21 06:09:39 makes sense Sep 21 06:09:56 it'd be exceptional to get some of these newfangled bug fixes, even if I have to patch them in myself =) Sep 21 06:10:07 doesnt have to happen immediately or anything Sep 21 06:10:45 I'd love to help but I just don't have the time to wade through our thousands of commits to find which one(s) might fix this issue :) Sep 21 06:11:35 understood, will the recent commits eventually make it into the master? Sep 21 06:11:38 public master rather Sep 21 06:11:52 when the next version of Android reaches the AOSP tree yes Sep 21 06:12:22 shit Sep 21 06:12:25 I hope thats soon Sep 21 06:12:35 you can try to fix the bug yourself :) Sep 21 06:13:02 oh snap, gauntlet thrown Sep 21 06:13:15 anyone could give me a help? Sep 21 06:13:44 your better off just asking, we have no way of pairing you with the person who has the knowledge you need, until you tell us Sep 21 06:14:09 I dont mind digging in, I just dont know NEARLY enough about the libhwui/surfaceflinger/any of that Sep 21 06:14:19 what's the stack trace? Sep 21 06:14:19 I've learned alot about a lot of the android infrastructure Sep 21 06:14:32 dont have that in front of me, but I can get it first thing tomorrow Sep 21 06:14:45 even if I had a you might look here Sep 21 06:14:47 I could dig in Sep 21 06:16:05 romain thats good to know hwo the internal releases work etc... for some dumb reason I just assumed your checkins went into public branch =) Sep 21 06:16:20 not until we publicly announce a new version Sep 21 06:16:26 first time doing android dev - im doing some stuff on the lock screen and i have a couple questions about the service/broadcast reciever layer Sep 21 06:16:26 except for some kernel stuff Sep 21 06:16:28 tools Sep 21 06:16:28 etc. Sep 21 06:16:33 never work in production ;p Sep 21 06:17:16 I LOVE working in production Sep 21 06:17:31 picked up some code online that is supposed to catch screen on/screen off on a reciever and run code in either case, but i'm not sure what's the right way to set up an app meant to run as a service. Can i define something in the manifest to initiate a broadcast reciever at launch time? Sep 21 06:18:22 I am going to have to take a stab at that.. I dont really want ot revert to ICS... I never noticed it there on this hardware, but I got dev/prototypes going to customers Sep 21 06:18:28 in about 1mo time Sep 21 06:18:45 rather i think i need to init the service not the reciever. Looks like service inits the reciever onCreate Sep 21 06:21:14 patched in ethernet support, and looking into some more functionality atm, but I really hope I've got something soon for the sigsegv Sep 21 06:22:38 how do I make a clock which shows the current time? then I need to make a time input area too Sep 21 06:23:37 the clock application source is in source control Sep 21 06:23:54 thank you Sep 21 06:24:03 hey guys can someone tell me why my function with postDelayed only runs once even though its called twice??? Sep 21 06:24:07 http://pastebin.com/4kL4Vg1Z Sep 21 06:26:21 are you sure? Sep 21 06:26:44 250ms increments is... kinda small Sep 21 06:26:59 you realize each of those gets scheduled at the eexact same time, right? Sep 21 06:27:13 so every 250ms you'd get images changing Sep 21 06:27:47 well it runs right the first time tho Sep 21 06:27:57 oh Sep 21 06:28:47 but why wont the function work the second time i call it? Sep 21 06:29:03 the scheduling is delayed? Sep 21 06:29:56 kingargon they are scheduled at exactly the same time for all intents and purposes =) Sep 21 06:30:11 theres no blocking to prevent the second call from scheduling them in almost identical order Sep 21 06:30:12 king, the 250 and second run of 250 run at basically the same time Sep 21 06:30:12 there used to be a web page suggesting how to set up avds for different resolutions / dpis … where the f is that Sep 21 06:30:29 oooh Sep 21 06:30:40 add a button and put the runLights() in it Sep 21 06:30:43 click the button Sep 21 06:30:49 let it run 3 seconds so your lights flickered Sep 21 06:30:54 then hit the button again Sep 21 06:31:02 it should twinkle the lights for another 3 sec Sep 21 06:31:07 king, think about it this way. runlights() returns right away Sep 21 06:31:34 if I had to guess, the runlights() executes for mere ms, and likewise when its done, it sarts scheduling duplicate jobs for nearly the same time Sep 21 06:33:13 so your saying that both funcions are executing but its just that they are on top of each other so it looks like its not working? Sep 21 06:33:19 both runlights run and then at 250ms led1 is set on image 1 and 2, then at maybe 251ms the same images are set Sep 21 06:34:04 okay, thanks guys! Sep 21 06:35:53 it is like telling someone "smile in an hour from now. frown in 2 hours. smile in an hour from now. frown in two hours." Sep 21 06:36:25 s/in an/an Sep 21 06:41:45 a good example for loader while making an async http request ? Sep 21 06:42:05 use an intentservice instead Sep 21 06:42:54 i was hoping by now, i could just create one damn avd, and then change the skin on-the-fly instead of creating a new avd for every dang skin Sep 21 06:43:47 how would this work g00s Sep 21 06:44:16 i dunno. maybe in the avd manager i could just click on the avd and then select a property like 'skin' :) Sep 21 06:44:26 ? Sep 21 06:44:35 ! Sep 21 06:45:03 well, skin and dpi Sep 21 06:45:21 you can change themes on the fly and if its your theme engine you could figure out a way to bundle 10 themes yourself and then turn around and use apk's as well Sep 21 06:45:40 not themes, avd skins Sep 21 06:46:40 oh wait, i guess you can edit that in the avd manager Sep 21 06:47:15 is there a website with the android source examples browsable? Sep 21 06:49:27 jaggz2 its mirrored on github Sep 21 06:49:37 OH OH OH Sep 21 06:49:42 you are saing for emulatoR Sep 21 06:49:58 I thought you were saying skins for apps in separate apks Sep 21 06:50:24 hmm. I mean the sample apps so I can learn from them conveniently while on my phone instead of my desktop Sep 21 06:50:32 ron_frow_: yeah Sep 21 06:51:34 I built a pretty cool theme engine where you just install skin and pick it in the chooser and the app would have same functionality, competely diff ui Sep 21 07:05:04 hi, what is the recommended way to put text in an app Sep 21 07:05:18 text like, some licence/ disclaimer Sep 21 07:05:28 oh god. Sep 21 07:06:16 I hope its not too awful question to ask ron_frow_ Sep 21 07:06:29 just use a damn textview Sep 21 07:06:36 I mean thats a very very open ended question Sep 21 07:07:43 OK, I was asking it from the code maintenance perspective, i.e., would a separate text file in res/raw be better than the text in the xml file Sep 21 07:08:21 I do agree that I made it too open ended and I am sorry Sep 21 07:10:27 it's irc, we are looking for an excuse to be cynical... and it's been a slow day Sep 21 07:10:48 yes Sep 21 07:10:52 heheh gutano Sep 21 07:11:06 You could add it as a string resource. I'm not sure what the recommended maximum size is, though Sep 21 07:11:12 wow, the emu is constantly consuming 20% of my cpu Sep 21 07:11:16 poop Sep 21 07:11:34 poop indeed Sep 21 07:11:36 g00s using intel haxm? Sep 21 07:11:46 no, regular one on mac Sep 21 07:11:50 but again in another xml file I guess sampullman Sep 21 07:11:58 haha Sep 21 07:12:04 haxm doesnt work afaik on mac Sep 21 07:12:09 I've never seen it work on eithe rof my mbps Sep 21 07:12:24 gah all these tools are so fucking ghetto Sep 21 07:12:44 Looney: better than in your layout code. It's either that or in res/raw, like you said... Sep 21 07:13:17 I agree its frustrating that you cant just fire up an emu and have it perform like ios emulator Sep 21 07:13:19 so res/raw is not a bad practice as I thought Sep 21 07:13:20 ron_frow_: i learned the hard way to never leave the emu unattended. i woke up one morning to see it consuming 100% of the cpu; i thought the machine was going to catch on fire Sep 21 07:15:24 Looney: I don't think it's necessarily bad, but it would take more effort to retrieve than just calling getString() Sep 21 07:16:02 so strings.xml it is then ;-) Sep 21 07:16:28 plus strings is easy to localize Sep 21 07:17:58 G'day all, a lot of android code uses the this.* kind of notation eg: this.pm = (PowerManager) getSystemService(Context.POWER_SERVICE); can anyone point me towards a good explanation of the use of this in Android? Sep 21 07:18:23 Mechdave: it is sometimes needed to disambiguate a local variable vs. member. It is not recommended at other times. Sep 21 07:18:30 I personally find 'this' to be just noise. Sep 21 07:18:59 its so you can immediately recognize it as a local var Sep 21 07:19:07 scoped at class level Sep 21 07:19:16 alankila, so basically it is a limiter by making android look for a local variable instead of a global one? Sep 21 07:20:02 eh. There are no globals in java, not in full sense of the word to begin with. It just means "I'm talking about the instance variable (or object member) called pm here" Sep 21 07:20:21 its common in object oriented code... it just syntactic sugar... it just helps you visualize whats going on better Sep 21 07:20:37 and also if you do bad thing slike have a setter with parameter name same as class var Sep 21 07:20:41 this.user = user; Sep 21 07:21:08 that's prob the most justifiable usage I am aware of Sep 21 07:21:10 ron has the specific use case where it must appear. Sep 21 07:21:58 except that you probably shouldnt name your local members the same as your parameter names Sep 21 07:22:12 I use it a lot because I like to have readable code Sep 21 07:22:13 nah, it's pretty common, and eclipse generates it that way. Sep 21 07:22:23 so does intellij Sep 21 07:22:29 if I see this, I dont have to read up and figure out what the scoping is on it Sep 21 07:23:07 I've seen ParentClass.this used in an inner class, I don't fully understand that usage Sep 21 07:23:20 Just 'this' would refer to the inner class Sep 21 07:23:28 right Sep 21 07:23:30 thats so you can access the scope of parentclass from an internal or anonymous method etc Sep 21 07:23:53 rather not the scope but the instance Sep 21 07:24:00 without haveing to explicitly passing the reference Sep 21 07:24:03 gutano: nested classes are not real, they are compiler-generated fiction. Sep 21 07:24:28 gutano: so when you reference to an outer class object, you can write 'Outer.this', and this variable is actually passed to the constructor of the inner class, so it is there Sep 21 07:24:40 interesting Sep 21 07:25:12 listeing for the public service announcement "And now you know" ;) Sep 21 07:25:17 Oh, I have come from procedural C/C++ and it never appears there :) Sep 21 07:25:17 there's other pieces that the java compiler does to pull it off. For instance, it generates accessors for private members for the outer class and uses these transparently. I recommend declaring everything the inner class needs as protected, because it better matches what really happens. Sep 21 07:26:26 there's an eclipse warning you can turn on that talks about each time the compiler must generate accessors to make your code work. Sep 21 07:26:35 Oh dear, I am feeling confused about members and variables :( Will have to do some googling... brb with more questions I am sure :) Sep 21 07:26:53 it's not really relevant, and I doubt there is a performance impact. Sep 21 07:27:12 but if you just out of principle like to know that the code you write isn't going to quite run the way you expected, you might care about that warning Sep 21 07:27:20 alankila, this is a very rare crown to appreciate the insight Sep 21 07:27:23 c++ will fuck your mind Sep 21 07:27:25 s/crown/crowd Sep 21 07:27:41 you learn c++ first, and try to learn java, and you are constantly trying to do things as hard as you possibly could Sep 21 07:28:04 ron_frow_, I am finding that out right now :( Sep 21 07:28:07 learn it after other langs and its a diff world of problems =) Sep 21 07:28:15 I learnt java first, and I find C++ quite pleasant actually afterwards. But I write C++ almost exactly as I would write java. Sep 21 07:28:16 c++ is masochism Sep 21 07:28:16 that probably explains why Java looks so terrible to use Sep 21 07:28:35 alankila - I learned c++ later Sep 21 07:28:44 I understand why its so powerful, because you can do some seriously hacky shit Sep 21 07:28:51 but thats kinda whats so beautiful about it at the same time Sep 21 07:29:08 you can effectively re-engineer the language in a TON of diff ways to do what you want Sep 21 07:29:21 overriding delete operator (wtf?!?) Sep 21 07:30:11 Yes, I found a library called GLM that can provide opengl shading language types and primitives to C++. It's just some headers, and by god, GLSL code compiles afterwards almost without modification Sep 21 07:30:13 I am trying to write java like I would C, if(!understand){printf("pull hair out/n",%c); return;} Sep 21 07:30:24 alankila, yeah, GLM is great Sep 21 07:31:08 Java just feels like an exercise in pain right now Sep 21 07:31:10 not a fan of it Sep 21 07:31:23 there is a lot of hoops java forces you to jump through Sep 21 07:31:32 I am big fan of c# =) Sep 21 07:33:36 I guess I'd really like to see the ultimate flexible compiler and runtime that can just do everything :-p but I guess it's a bit too much to hope for. Sep 21 07:35:19 that being said, java is awfully close to being universal runtime, and there's a ton of languages targeting it already. I haven't really used them because I find java 'good enough', so the motivation isn't there. Sep 21 07:35:55 I wonder if that C# port of Android went any further Sep 21 07:36:20 it might be that llvm would over time become even better runtime target than jvm. It is sort of taking over elsewhere, and might provide better value proposition. Similarly, android did not go with that stuff but sort of replaced it all, for relatively small engineering effort, it seems. Sep 21 07:37:16 you are talking about monodroid? Sep 21 07:37:31 no Sep 21 07:37:33 there's a business doing it, but I've no idea how well it is going for them. Sep 21 07:37:36 they ported android to c# Sep 21 07:37:38 xamarin Sep 21 07:37:46 xamarin does make monodroid Sep 21 07:37:52 https://github.com/xamarin/XobotOS Sep 21 07:37:57 but they actually started something else to prove they could Sep 21 07:38:24 I asked manual de icaza if they needed any help with that project, and mentioned I'd donate my time Sep 21 07:38:27 but never got any resposne Sep 21 07:38:59 pretty nuts they basically ran theire sharpen java->c# converter against android aosp and it build an os that runs Sep 21 07:39:02 miguel Sep 21 07:39:09 miguel Sep 21 07:39:13 its late Sep 21 07:39:13 haha Sep 21 07:39:54 I think I get it now, a member is a variable where you use a modifier (like private,public or protected) and a local variable is when you don't use a modifier. Is that right? Sep 21 07:39:56 it seems mildly unfeasible to me. So a guy goes to google play and downloads an apk, this modified OS must start by cross-compiling the APK to C#? Sep 21 07:40:09 or more correctly, dalvik bytecode to CIL Sep 21 07:40:28 Mechdave: not really. Sep 21 07:40:37 Mechdave: the scope where the declaration happens is the key Sep 21 07:40:59 if you declare a variable in method body, that is a local. Otherwise it's scoped either to the class or the object. It's class-scoped if it has the keyword 'static' Sep 21 07:41:34 it is possible to declare a member without using any of those visibility keywords. java has 4 visibility levels, after all. Sep 21 07:41:45 (I personally do not use the 'default' visibility at all.) Sep 21 07:42:20 well, except for one case where I must: a not-public class which is only visible to other classes in the same package. Sep 21 07:42:49 alankila, Ok, thanks, I think I need to learn a bit more about java before I can really start making headway here. Any recommended tutorials covering this kind of basic territory you could recommend? Sep 21 07:43:31 Mechdave: hmm... I liked the book Thinking In Java, which is freely available, and which starts from covering the whole OO basics -- why do anyone even bother with OO, anyway -- and it has the deepest insight about that ever encoded in written text that I have seen Sep 21 07:44:19 but it basically boils down to the specialization of language, and java is not so good at that as C++ is. That being said, java's method of abstraction is method call & that is enough. Sep 21 07:44:41 it just means there's going to be a lot of method calls and correspondingly deep stack traces. Sep 21 07:46:41 java should be understood as a C-like expression language of no customazibility whatsoever welded into simple object-oriented frame, where invoking methods is how you do more complicated things than what C already gave you. And java has the specific polymorphic OO model that befits a statically typed language, I guess there's nothing special to that Sep 21 07:48:14 where java finally distances properly from C is by having GC, which allows objects to be constructed and passed around without worry about losing the memory associated to them. And also why I think it's better than C or C++, or any other language that doesn't provide GC. Sep 21 07:49:44 but that being said, java is awfully minimal. It has its own style you are supposed to use it, and you can't escape that. You best adapt to writing code in its terms, and not hope for more for the time being. Sep 21 07:50:58 many languages allow you to pull off some kind of clever tricks, either with C++ templates, or C macros, or C# implicit overloads, or stuff like that. Just not part of java & nothing to be done about that, unless you want to use any one of the literally dozens of "improved javas" there are. Sep 21 07:52:20 Aha, so in Java not have to worry about cleaning up your memory so much! :) I will have to learn OO and java. Have downloaded TIJ 3rd edition to start. My C is rusty too so I am fighting a losing battle here. thanks alankila, I will be reading :) Sep 21 07:53:47 TIJ is a bit beginnerish, but try to get past the first 50 or so pages. It gets to the basics, and I'm not sure if what is left after that is of much value. The book sure is thick, but I find it boring. I just like it for talking about why bother with OO, rather than starting from "here's how you declare java class, java method, blah blah" Sep 21 07:55:49 Mechdave, one of the main concepts is it is an evolution from basing a program on procedural algorithms, to basing one on data structures Sep 21 07:56:43 Mechdave, the data structures (classes) and their implementations (objects) dominate the program. Methods (functions) are the little helper algorithms which the class data structures need to run from time to time. Sep 21 07:56:54 as I used to think about it, "class is data and the functions that manipulate that data". I simply viewed OO as convention by affinity, the data and the functions that manipulate it should stick together. Sep 21 07:57:05 Aha, light goes on... data driven not procedure driven!! Sep 21 07:57:18 Mechdave, the best analogy for a class in C is a struct. It is different, but that's the closest data structure to it. Sep 21 07:57:21 but that is not sufficient, because procedural code can be written in that style also. And it's probably not even horrible to use. Objects are a bit more than that, but it's a way to understand it. Sep 21 07:57:33 It fits into overarching theme of minimizing spooky action at distance. Sep 21 07:58:15 with global variables and flat namespaces anybody anywhere could mess up your globals. With OO, you protect the internal members from external modification and provide an API which does the manipulations, and evolve that API to fit the exact needs of the problem. Sep 21 07:58:25 still, it's so yawn-inducingly boring way to look at it that I can't bear to go on Sep 21 07:58:46 Aha, yes you access the members of the struct by using the dot or arrow! I am remembering now :D Sep 21 07:59:01 what is important is interfaces. I think it takes about a decade of programming experience to learn how to design good APIs. It's master-level stuff. Sep 21 07:59:55 that being said, it's possible to get by with almost any API from day one, but there's usually gotchas you run into and only learning from existing code and experience is going to distill into clues about how to do it Sep 21 08:00:40 and for instance java's class library has poorly designed objects like Calendar. It's really unfortunate. Sep 21 08:00:56 alankila: thats been fixed for java8 Sep 21 08:01:04 but you can tell a poor API from the fact that it's actually hard to use it correctly, and I think everybody's going to screw up the first 10 times they try to use Calendar Sep 21 08:01:13 g00s: oh good Sep 21 08:01:19 how did they correct it? Sep 21 08:01:31 i wonder if you can just grab jsr310 and use it on lower java versions Sep 21 08:01:53 new abstractions, apis, etc Sep 21 08:02:05 I see. So no more Calendar, something else instead. Sep 21 08:02:30 but what i always wonder, is what changes to java will trickle down into android land Sep 21 08:02:31 I had hoped that they'd have simply deprecated the whole idiotic calendar.get(Calendar.YEAR) crap and provided proper overloads to it, and added nanoseconds Sep 21 08:02:33 One of the main things I dislike about Java is it making you capture exceptions in some circumstances Sep 21 08:02:51 oh, the typed exceptions Sep 21 08:03:00 yeah that sucks, for things like Visitors and Functors Sep 21 08:03:09 well they are all typed Sep 21 08:03:13 but checked is the word you meant Sep 21 08:03:20 oh yeah, sorry Sep 21 08:03:31 Ologn: here's a pro tip: try { } catch (Exception e) { throw new RuntimeException(e); } Sep 21 08:03:39 hi. my xml layout files do not get mapped on the graphical layout after a crash. what should I do? Sep 21 08:03:52 I unfortunately write this a lot. People have quite strongly left checked exceptions behind, and I typically derive my own exceptions from RuntimeException so that checking them isn't necessary. Sep 21 08:04:18 alankila, yaa, it goes from there because then things are scoped within the try...the whole thing can be annoying Sep 21 08:04:47 this bothers me most with Runnable where run() is not allowed to throw a checked exceptions. Sep 21 08:05:10 so I have a 'try { runE(); } catch blah blah' and now a runE that throws Exception. Sep 21 08:05:28 bwahahaha ! http://news.cnet.com/8301-13579_3-57517054-37/apple-accused-of-ripping-off-famous-swiss-clock-design/ Sep 21 08:07:32 One of the amazing things about writing code for web platform such as wicket is that most classes go by without a single 'throws X' in the method declaration. People quite literally just don't use classes anymore that throw, or only do so while holding their nose Sep 21 08:08:32 then I use something like javamail, or the XML shit, and suddenly I have 10 exceptions declared to be thrown, for some trivial simple circumstance like sending an email, or parsing some XML document. So many potential failures that I can't do anything about other than fail the whole thing. Sep 21 08:09:18 the same story is with the persistence solutions like JPA. Those methods don't throw checked exceptions anymore either. Sep 21 08:10:43 g00s: the apple's copy of the clock looks surprisingly pretty, though. complete with soft shadows underneath the indicators. Sep 21 08:15:08 I don't think I have a single analog clock in the house personally. Sep 21 08:15:46 I have too many Sep 21 08:15:52 I have too many time-telling devices in general Sep 21 08:16:04 The reason why? they tick. I tend to be conscious of that, and the clocks tick very, very loudly if you have never noticed. Digital systems at best produce multi-megahertz buzz that I don't hear. Sep 21 08:16:13 I have http://goo.gl/Bev1k - my gf has some... interesting tastes Sep 21 08:20:07 the next problem would be to get the water circulating in radiators to go by more quietly, in my quest of making my apartment almost completely silent. Unfortunately that looks impossible to do, and I used to cover them up with clothes in the past, even if that reduced their effectiveness Sep 21 08:23:23 * hrnt moves next door to alankila and starts playing drums. Sep 21 08:50:50 hi i'm trying to make an xml drawable that looks like this: http://i47.tinypic.com/2up5zz4.png where there's a solid colour with fixed-width blocks of different colours right-aligned over the bg, is this possible with xml or would I need to make a 9patch? Sep 21 08:53:56 stork: maybe with stroke? (dashWidth) Sep 21 08:54:09 is just a bet, i never tried :) Sep 21 08:54:39 It'd take you 5 minutes to just make a 9patch Sep 21 08:55:06 SimonVT: 5min? for this image is only one 3-4 click :) Sep 21 08:55:35 i made one Sep 21 08:55:38 but it was too small Sep 21 08:55:40 have to resize it Sep 21 08:55:41 tedious :x Sep 21 08:55:42 You have to make the patches as well and in 3 densities Sep 21 08:56:40 well for something like this, can't android autoscale the 9patch png appropriately? Sep 21 08:57:12 Probably Sep 21 08:57:29 on 9patch png you select scaleable area Sep 21 08:57:40 so it dont touch the not scalable parts Sep 21 08:57:58 what a mess :x Sep 21 09:07:04 hi, where can i download the complete android framework for android 4.1 ? Sep 21 09:07:30 I found that https://android.googlesource.com/platform/frameworks/base/ but it's not complete Sep 21 09:07:38 download sdk and launch tool/android Sep 21 09:08:15 and mark everything with android 4.1 Sep 21 09:08:30 all is installed Sep 21 09:08:33 click download and go make a coffee Sep 21 09:08:42 so you have everything Sep 21 09:09:13 I mean the C++ framework Sep 21 09:09:35 like OMXCodec.cpp OMX_Core.h, etc... Sep 21 09:10:43 lserrno: part of libstagefright Sep 21 09:10:53 ./frameworks/av/media/libstagefright/OMXCodec.cpp Sep 21 09:10:55 i think the GIT at android.googlesource.com must contains this, but there is a lot of project and I didn't find one that contains all the files Sep 21 09:11:20 alankila, yes I downloaded it, but it miss lot of other files, like include/binder Sep 21 09:11:22 the header is ./frameworks/av/include/media/stagefright/OMXCodec.h Sep 21 09:11:23 or some utils Sep 21 09:11:44 well get a complete android source code copy, or just the entire frameworks, it's got to have most of it Sep 21 09:12:23 Yes but I didn't find the entire framework Sep 21 09:12:44 well, get repo and acquire the whole AOSP or something. Sep 21 09:15:05 it doesnt sound like portable app ;D Sep 21 09:15:07 ok, thanks, I'll try with this http://source.android.com/source/downloading.html Sep 21 09:15:27 gorudonu: it can be perfectly portable if you just compile your own versions of the crap and build it for x86, mips, arm v6 and v7 Sep 21 09:15:40 I sure hope android doesn't get more platforms, and in fact I can't help but wonder if there are any users of x86 and mips phones Sep 21 09:16:03 and in fact I suspect the non-arm devices will binary translate arm assembly in all likelihood Sep 21 09:16:55 and really arm v6... phones still have just that? Sep 21 09:17:21 I think people said that opengl es 2.0 support can be taken as proxy for armv7 cpu Sep 21 09:20:55 I don't really need to be fully portable, some requirements are needed for my app which is not for a large public Sep 21 09:21:27 alankila: I have arm6 ;( Sep 21 09:22:24 gorudonu: congrats, you are the 9 %. I guess. Sep 21 09:22:40 should I feel *special* ;) Sep 21 09:22:54 I got zte blade Sep 21 09:23:04 will change this phone someday Sep 21 09:31:08 hey guys! I got some issues with BroadcastReceivers in conjunction with permission restrictions. Anybody has some experience with that? Sep 21 09:32:31 ... my problem in a nutshell: http://pastebin.com/0MDzJds7 Basically my BroadcastReceivers don't get anything as long as I add the permission restriction Sep 21 09:43:11 ... any good (or bad) suggestions and thoughts are appreciated! :) Sep 21 09:44:56 brian_de: loading link Sep 21 09:46:14 gorudonu: awesome! Sep 21 09:47:07 pastebin is actually quite slow today Sep 21 09:47:41 and what is the problem ? Sep 21 09:47:48 you can receive some info ? Sep 21 09:48:14 the broadcastreceivers dont get the broadcasts Sep 21 09:49:09 I may be wrong since I havent been programing for android for quite time Sep 21 09:49:10 but Sep 21 09:49:11 if i remove the permission from the broadcastreciver registrations, the broadcasts are coming again Sep 21 09:49:15 Sep 21 09:49:34 you dont have any filters added to your manifest Sep 21 09:49:39 for your receiver Sep 21 09:50:13 yes i have. just dont wanted to let everybody see my intent actions (as i have a problem with broadcastreceiver ;) ) Sep 21 09:50:18 ah ok Sep 21 09:51:42 dont know Sep 21 09:51:47 permissions looks good Sep 21 09:51:54 if you dont read battery or smthg Sep 21 09:52:01 cant tell Sep 21 09:52:12 yeah i thought so too :-\ ... Sep 21 09:52:26 *look Sep 21 09:52:30 well no, the permissions are basically there to protect the reciever Sep 21 09:52:46 cant tell from here Sep 21 09:52:51 bummer Sep 21 09:52:55 :) Sep 21 09:52:59 sorry ;) Sep 21 09:52:59 thanks anyway :) Sep 21 09:53:06 maybe someone else can help Sep 21 09:53:20 try to google it (like you havent tried...) Sep 21 09:53:48 ok Sep 21 09:53:50 yeah ... i have googled and stackoverflow-ed it already too much :) Sep 21 09:53:56 gonna for job interview Sep 21 09:53:59 later ! Sep 21 09:54:02 cross fingers ;) Sep 21 09:54:03 good look! Sep 21 09:54:10 *luck Sep 21 09:54:21 ... you might need to have a good look too ;) Sep 21 09:54:28 haha Sep 21 09:54:30 yeah Sep 21 09:57:38 How can I work with async network stream in android? Sep 21 09:58:04 caioketo: definitely a google-able question :) Sep 21 09:58:33 morning Sep 21 09:58:39 is anybody here pretty familiar with using jmdns? Sep 21 09:59:43 napster: I searched a lot, and the only way i got it working is implementing it by myself, with runnable Sep 21 10:00:15 napster: but there is some problem, when i got 2 messages sent at close time, the client only got 1? Sep 21 10:00:46 not sure I understand Sep 21 10:25:23 hmm, so in 4.1.1 google changed something with content providers & uri permissions Sep 21 10:30:26 its like, the server is sending messages Sep 21 10:30:42 but at some point, the server send like 2 messages almost at the same time Sep 21 10:30:47 and the client just recieve 1 Sep 21 10:33:11 I never had one, and she was a bad one: a mean, mean girl. Sep 21 10:33:21 Good Morning #android-dev Sep 21 10:35:35 finally! Sep 21 10:35:46 successful mDNS implementation on both client and server side Sep 21 10:35:48 :) Sep 21 10:37:11 i still dndt got it, already tried to implements new runnable, to keep recieving while parsing, but still only got 1 message =/ Sep 21 10:40:09 i'm almost giving up, and trying to make something in the server to hold some messages. Sep 21 10:44:58 Why can't I just bind a ServerSocket to an address of the p2p0 interface and let clients connect to it over WiFi Direct? Sep 21 10:54:38 What's the point of DNS-SD over WiFi Direct when I can't actually do anything useful with the services I discover? Sep 21 11:02:32 How can I set an image so that it changes to another image when it it pressed? Sep 21 11:04:45 I've specified the following option android:configChanges="orientation|keyboardHidden" in my manifest for a FragmentActivity but all the Fragments are still being recreated. I've used the setRetainInstance() method as well. I've also noticed, the onConfigurationChanged() method is not being called in my FragmentActivity. This is happening on my 4.1 emulator, but on a 2.3 emulator, it's fine. Sep 21 11:05:12 actually I phrased that badly. I want the button to be a different image (just filled with a different colour) while it has a finger on it and then do it's onClick event when the button is released. Sep 21 11:12:20 This guy should go ad-supported https://play.google.com/store/apps/details?id=com.tahakkki.august&feature=search_result Sep 21 11:20:33 For some reason, Android 4.1 emulator will not call through onConfigurationChanged when I have configchanges specified in the manifest. Sep 21 11:27:27 JakeWharton: Why actionbarSherlock is not getting added to the original Android OSP? :) Sep 21 11:31:20 Anyone know how I can figure out what wifi chip set my phone has? Sep 21 11:32:33 Google? ;p Sep 21 11:32:54 seriously though, are you looking for a general solution for all phones or just your phone? Sep 21 11:34:42 when i want to grantUriPermission to the MediaScannerConnection, which package do i have to specify? Sep 21 11:36:11 I am getting the NetworkInfo object from connectivityManager.getActiveNetworkInfo(); Now this object has a member called mInterfaceName but i cant seem to find a method to retrieve the same ? How can get it ? Sep 21 11:46:49 Philpax just my phone and Google didn't know lol Sep 21 11:47:16 what phone? Sep 21 11:47:54 fuck Sep 21 11:48:09 anyone "good" with domains? Sep 21 11:48:22 i thought i tranfered a domain to a different registrar earlier this year Sep 21 11:48:34 but just got an email from my "old" one saying i need to renew soon Sep 21 11:48:38 mikedg_: oh yeah, there are a lot of steps to that process Sep 21 11:48:47 i thought i went through the entire process Sep 21 11:49:14 Samsung exhibit ii 4g Sep 21 11:49:39 My twins just woke up :-) Sep 21 11:49:48 damnit America! too many phone names Sep 21 11:51:07 Ankhwatcher: any ideas how i could verify that my registar was changed Sep 21 11:51:07 and would that be the only thing i need to have changed? Sep 21 11:51:18 i remember nothing about how far along in the process i was :( Sep 21 11:52:00 Hello there, anyones knows a lib for TCP socket async connections?? Sep 21 11:52:09 or, anyone wants to make one? Sep 21 11:52:13 i could help Sep 21 11:52:22 import java.net.Socket; Sep 21 11:52:27 mikedg_: hmm, I remember that I had to do it twice, because even when I was done it turned out I had to verify it with the new host by clicking a link in their email Sep 21 11:53:16 \ Sep 21 11:53:32 Philpax: java.net.Socket just have sync, u can't recieve async Sep 21 11:54:44 use an AsyncTask Sep 21 11:54:50 mikedg_: there's nothing for it but to go back to your new host and try to find the import instructions Sep 21 11:54:55 Yeah, i tried that out Sep 21 11:54:57 but... Sep 21 11:55:14 when the server sends 2 messages at almost the same time, it only recieves one Sep 21 11:55:35 http://stackoverflow.com/questions/12529097/async-networkstream-in-android Sep 21 11:56:24 So I think maybe im doing something wrong, and for future users do it more easily, i think about some lib, that handles all the job Sep 21 11:58:11 caioketo: nothing to do with networking, but (new Runnable() {…}).run(); doesn't do what you probably think it does Sep 21 11:59:07 on server side you want to synchronize access to your socket so that two threads don't try to send at the same time Sep 21 11:59:48 the problem is that I really cant manage that in the server, its like in 2 threads, so I cant threat that there. Sep 21 12:00:00 also, you're using TCP so you need to do the message framing yourself Sep 21 12:00:02 but what I think, is that the client, need to recieving always Sep 21 12:00:14 i need a client to always recieving Sep 21 12:00:35 TCP is a byte stream, it doesn't have a concept of a "message" Sep 21 12:00:39 the message framing is all right Sep 21 12:00:43 it works Sep 21 12:01:02 like, server sends messages (byte[]) client recieves, and vice-versa Sep 21 12:01:20 are you assuming that write() on server side corresponds with a read() on the client side, with the same data? Sep 21 12:01:21 but, there is a gap that the client dont listen (recieve) for sometime Sep 21 12:01:46 the server is not in java, its in c#, and works fine, the data is ok Sep 21 12:01:58 the problem is that gap =/ Sep 21 12:02:12 if was there anything I could do, so the client never stop listening Sep 21 12:02:25 it never stops listening unless you explicitly stop it Sep 21 12:02:36 but it dont recieve Sep 21 12:02:45 data from TCP will go to a buffer, and your read() will pull some data off there Sep 21 12:02:57 yeah, i got that... Sep 21 12:03:00 but after i read() Sep 21 12:03:06 the server sent one more data Sep 21 12:03:17 so it should calls the callback function again right? Sep 21 12:03:27 or it will enter in the same buffer? Sep 21 12:03:30 if the messages were sent close by, your singe read() might contain both messages Sep 21 12:03:34 and that should fuck me system Sep 21 12:03:56 so, i need to put a byte to indicate the begin and the end of each message Sep 21 12:04:11 basically yes, that's called "framing" Sep 21 12:04:40 since TCP only gives you a byte stream, your read() can read a partial "message", full "message" or multiple "messages" at once Sep 21 12:04:41 my "framing" type, is a int to indicate the size of the message, so the client can read it Sep 21 12:05:04 so I need to handle it in the "EndRead" funcion? Sep 21 12:05:19 after reads one message, read again to see if is there something in the buffer? Sep 21 12:05:24 Unless it's a fram ! Sep 21 12:06:09 So, if i read a message (size 100 bytes) and there is not another message, and I try to read some bytes from the buffer, it will throws an exception or what? Sep 21 12:06:24 I am getting the NetworkInfo object from connectivityManager.getActiveNetworkInfo(); Now this object has a member called mInterfaceName but i cant seem to find a method to retrieve the same ? How can get it ? Sep 21 12:06:57 caioketo: your read() will return a random amount of data available in the buffer, after that it's up to your parsing to split that into messages Sep 21 12:08:01 caioketo: so you read a bunch of stuff into a buffer from the socket, look at the first byte, figure out if your buffer has the full message, if so you parse it out, otherwise you call read() again and append to your buffer until the full message is there. read() will block if there's no data in the socket Sep 21 12:08:04 Did you take a look at the code I put in stackoverflow? I got a int telling the size, and i got a function (EndRead) to read that ammount, after that I need to read again 4 bytes to see if is there another message? thats righ? Sep 21 12:08:36 thats the problem, i cant allow it to blocks Sep 21 12:08:45 how can I know if is there any data more Sep 21 12:09:00 why can't you allow it to block? Use a separate thread Sep 21 12:11:28 you can set the socket to not block, but there's no reason to do that really. you just call read(), parse as many messages are were received, then call read() again, and repeat. There's no harm in the read() blocking. Sep 21 12:12:18 creating threads like that is bad Sep 21 12:12:22 threads aren't cheap Sep 21 12:12:54 depends what you're doing, if it's a server with thousands of clients, sure. but if it's a client, then it doesn't matter Sep 21 12:13:09 the thing with tcp you have to remember also is that there's no "message." there's just a stream of bytes Sep 21 12:13:35 that you have to interpret as messages. so you can get part of messages, more than one message, a mesage and a half, etc.. Sep 21 12:13:52 freznic: fair point Sep 21 12:13:56 funktronic: that's exactly what I've been explaining Sep 21 12:14:09 oh sorry i didn't read up :/ Sep 21 12:15:50 freznic: don't look at it as pointless repitition, see it as your statement being independantly verified. Sep 21 12:16:37 implementing sockets correctly is a pain Sep 21 12:17:28 it's also quite fun Sep 21 12:23:23 can i test for sound and brightness on Emulator? Sep 21 12:24:43 Any body know how I can find out what the wifi chip set for my phone is? Sep 21 12:25:12 Open and look at it? Sep 21 12:26:02 The song that's stuck in my head today: http://j.mp/Q1nd0Y Sep 21 12:27:01 Yeah I coukd Sep 21 12:27:31 could you determine this from the mac address? Sep 21 12:27:31 There are teardown pictures of nearly every phone on the net Sep 21 12:27:46 The manufacturer? yes Sep 21 12:27:56 The Mac address is a great idea lol Sep 21 12:28:01 The particilar chip, not always Sep 21 12:28:02 Samsung Sep 21 12:28:53 Well I know its probably bcm4329 or bcm4330 Sep 21 12:29:05 newtony: no Uhrheber meant that you could determine which manufacturer made the wifi chip from the MAC address because the are handed out in blocks Sep 21 12:29:49 newtony: what's the difference between them? Sep 21 12:29:54 Yeah but no chip set info :-( Sep 21 12:30:17 I have no clue Sep 21 12:30:46 model Sep 21 12:31:45 hm adb won't show my nexus 7.. anything i need to dis/enable ? Sep 21 12:32:22 sorry for being afk, so I think i understands it, ill try to implement Sep 21 12:32:40 xorgate: USB debugging enabled? Sep 21 12:32:48 freznic you got gtalk or msn? Sep 21 12:33:42 Uhrheber yeh Sep 21 12:33:43 When I set an OnTouchListener for an ImageView is the view that gets passed to onTouch the ImageView? Sep 21 12:34:23 Bad USB cable? (had that more than once) Sep 21 12:36:34 hm well other devices work Sep 21 12:37:45 xorgate: manually set the drive to the one you downloaded in the SDK Sep 21 12:38:56 One of these days I'll buy a Uriah Heep album. Then you'll know, then you'll all know. Sep 21 12:40:05 lets say I have a dir with several subdirs. how do I write in my Android.mk to only run make on just one particular subdirectory ? Sep 21 12:43:30 can I change the default blue color for selected items/buttons/... in Holo to another color? (Without having to touch each component) Sep 21 12:44:02 I already have a custom theme that inherits from Holo.Light which is used for the whole app Sep 21 12:44:15 evident: you could probably create a style that uses holo as a parent and overload that one thing. Sep 21 12:44:43 do you know which parameter describes that blue color that is used everywhere in holo? Sep 21 12:44:48 You'd have to supply new drawables for buttons, listview, etc Sep 21 12:44:51 In your theme Sep 21 12:45:05 There's no single attribute that says blue Sep 21 12:45:52 Good Morning SimonVT Sep 21 12:45:54 hmm ok that kinda sucks if I have to provide a lot new Drawables... Sep 21 12:45:57 but thank you Sep 21 12:46:36 What's crazy is in Linux I could just run lspci/lsusb to get the info Sep 21 12:48:27 afternoon Sep 21 12:51:29 SimonVT: there was a point earlier where this channel was just an echo-chamber of unanswered questions and I thought "hmm Simon must be busy" Sep 21 12:51:43 Or sleeping Sep 21 12:51:54 sleep is overrated Sep 21 12:52:08 Sleep is for the weak, Apu. Sep 21 12:52:17 hi guys, is it possible to make an ImageView do this? if so, what scaletype, etc. would do it? http://i.imgur.com/Jhkzw.jpg Sep 21 12:53:15 You want an imageview to draw outside its bounds? Sep 21 12:53:33 Ankhwatcher Uhrheber had to download adb drivers for galaxy nexus >.< but it works now http://forum.xda-developers.com/showthread.php?t=1766220 Sep 21 12:54:03 SimonVT: it's kind of like ScaleType "center", except it's just at the bottom left of the image Sep 21 12:54:09 the ImageView is just the black container Sep 21 12:54:21 Ah, eh Sep 21 12:55:51 Maybe the matrix scaletype? I don't know really Sep 21 13:02:51 hey guys is there anyone in here who mind helping me with a little opengl 2d projection issue i am having Sep 21 13:04:04 I am drawing some stuff to the screen, i can pretty much render to my target device resolution just fine. I am developing for a 480x800 screen device but while i test it on a nexus 7 emulator my renderings are centered in the middle Sep 21 13:04:48 it seems to not scale properly, here is a screenshot : http://screencloud.net/v/lSGy Sep 21 13:05:44 on the right is my device screenshot, on the left is the emulator, as you can see its centered, i would like the image to scale to full screen but i am not sure how to do it Sep 21 13:07:35 is there anyone active at this time? Sep 21 13:08:00 blubee: yeah, where are you? Sep 21 13:08:12 What's up blubee Sep 21 13:08:43 i am in taiwan Sep 21 13:09:52 how to set On Long Item Click Listener to items dropdowned from AutoCompleteTextView? Sep 21 13:09:56 i was asking about how to get my opengl rendering scale, http://screencloud.net/v/lSGy Sep 21 13:10:15 blubee: well it's afternoon in EU and morning time on the East Coast of the US, so there are plenty of people around! Sep 21 13:10:44 i design my app for 480x800 as you can see on the right things work just as expected but on a nexus 7 emulator and other devices the image is rendered similar to on the left Sep 21 13:10:46 Are the numbers pixels? Are you hardcoding pixel values? Sep 21 13:11:35 SimonVT somewhat, my textures are loaded in and their sizes get pulled from the texture so that picture is 480x800 so its vertices go from -240 to 240 and -400 to 400 Sep 21 13:12:01 You don't design for a specific resolution and then just scale it.. You can get the resolution at runtime and do your drawing based on that Sep 21 13:12:18 that's what i would like to do but not sure how to do that Sep 21 13:14:13 how would i be able to set the sizes so they are relative to the overall aspect ratio Sep 21 13:14:29 I'm currently hiding a fragment containing a list when my user presses a button by making it's parent layout View.GONE, is that bad code? Should I also remove the fragment? When the user presses another button the parent Layout and fragment come back again. Sep 21 13:23:31 * bingels how to set On Long Item Click Listener to items dropdowned from AutoCompleteTextView? Sep 21 13:25:29 any fedora users here? I'm trying to build an android kernel here as I use to do on ubuntu Sep 21 13:25:29 but build fails with this message: "gcc: error: directory": No such file or directory" Sep 21 13:27:33 diego-ch: is it getting pissed off about a space or capital letter? Sep 21 13:27:42 looking at http://developer.android.com/training/id-auth/authenticate.html .. can client then send token to server? i'd like server to check if it is valid google mail? Sep 21 13:27:43 diego-ch: does it have permissions? Sep 21 13:28:48 Ankhwatcher: I dont think its permission related... it also fails with root user Sep 21 13:29:29 diego-ch: then it's probably just a malformed gcc command Sep 21 13:43:12 hey whats the best way to debug Android.mk? Sep 21 13:48:49 can't I rename old permissions which I defined in the manifest? it seems, as if the app is reinstalled it will still require the old permissions. Is this supposed to be like that? Sep 21 13:50:34 ...even though nowhere in my code i use the old permission anymore I get a "permission denial" warning with the old permission string. Sep 21 13:50:34 Could you guys please help me a bit here? I'm having a problem with the Android browser, which also affects my app as it uses WebView Sep 21 13:50:46 anyone interested in develop an open lib for async sockets? Sep 21 13:51:02 just say your problem Sep 21 13:51:17 Brian, and if you try uninstalling first what are your results? Sep 21 13:51:58 didnt tried that yet, because the customer/user won't reinstall either and i want to keep the strange situation for testing for now ;) Sep 21 13:53:04 I have an fresh (as in just installed) Apache server running on my devbox, and I connect to it with the Android browser just fine. But, if I stop the server and then refresh the page, the Android browser (and WebView) just hangs in there for a very long time, whereas in Chrome it says "Could not connect" right away Sep 21 13:53:24 I mean in desktop Chrome, or any other desktop browser Sep 21 13:55:32 blaman: well, maybe the timeout in the browser is just very high. anyway, even if you find out what the browser is doing "wrong" you wont be able to change that, right (since it is not you app). Sep 21 13:56:36 blaman: if you use the webview you might be able to check if the server is available via the callbacks Sep 21 13:58:13 brian_de: yeah, I was thinking maybe I could try to connect first with HttpURLConnection and try retrieving the headers Sep 21 13:58:51 Anyone here good with GPS. Is it possible to sample lower than 1time/second? Adnd are those GPS-devices superexpensive? Sep 21 13:59:33 blaman: maybe take a look at InetAddress.getByName(host).isReachable(TIMEOUT); Sep 21 13:59:39 HankMoody: You might want to sniff around the #gpsd channel; lots of people with extensive GPS experience hang out there. Sep 21 13:59:44 HankMoody: registering your locationlistener with 0 for the time Sep 21 14:00:02 Not necessarily Android GPS experience, mind you... though I think GPSD is inside Android. Sep 21 14:02:02 jaggz2: even if i deinstall first, I get the warning :-\ any idea about that? Sep 21 14:02:57 brian_de: hmm, the docs tell me it first tries pinging and then connects to port 7. I think I'll go with connecting to port 80, as most likely pings will be blocked and there won't nobody at port 7 Sep 21 14:03:50 blaman: wasnt aware of the port. good to know :) Sep 21 14:04:25 it's the echo port Sep 21 14:05:59 yeah, apparently that was in use before ICMP echo requests (pings) were common...? Sep 21 14:08:50 also there is something else I just can't seem to do with WebView. I want to prevent long presses on things in my webpage, but I've tried the usual ways and they don't seem to work Sep 21 14:10:20 first I thought maybe it was because I was preventing long-clicks in WebView itself and not in the textbox (for example) widgets, but the WebView does not seem to have any children I can access Sep 21 14:11:55 i'm not sure but you might be able to do such things with javascript interface Sep 21 14:13:20 I did try to prevent onTouch{start,end}, etc, in the page, but I don't even get these events Sep 21 14:18:45 could test with a duplicate of the app Sep 21 14:20:08 for the perms test Sep 21 14:22:58 stackoverflow.com/questions/7772409/set-loadurltimeoutvalue-on-webview Sep 21 14:25:17 jaggz2: yes, I saw that yesterday, but I thought there might a better way or maybe there was some other underlying problem or something. thanks though! Sep 21 14:26:51 actually, the timeout / disconnect problem is kind of weird: for example if you stop the server then run the app again from scratch, you get a blank page and no callbacks are called Sep 21 14:27:04 you might be right .. if apache is down, the socket won't connect Sep 21 14:28:31 the port won't even be open and internal connect()'s, or whatever, should fail right away without delay Sep 21 14:29:03 little delay :) Sep 21 14:29:52 can I develop FROM my phone? Sep 21 14:30:05 jagz2: yeah, you'd think they would, but they don't... Sep 21 14:42:09 ibgbio23 Sep 21 14:43:31 quick, note down porten's password :) Sep 21 14:44:51 hi. I have a class Z extending View. I want to add a TextView to this class to be part of the class Z and make it appearing , how can I achieve that? Sep 21 14:45:24 i mean make it visible Sep 21 14:48:04 Does anyone know why my action bar might be slowing the App down? I have a video, and the FPS goes down a couple of points when the action bar is visible. I use ABS. I have a CustomView which I add to the actionbar (which is just two TextViews on top of each other) and the rest are just normal menu items. Sep 21 14:48:48 knossos is hardware acceleration off? Sep 21 14:48:52 It is on Sep 21 14:49:09 maybe a transparent portion of view being composited onto video? Sep 21 14:49:52 I don't believe so. I will try removing the custom view. For giggles. Sep 21 14:50:57 does anybody have a good link with the 2.3 itelephony work arounds ? Sep 21 14:51:52 dominicdinada: er, can you be any more specific? Sep 21 14:51:56 hi. I have a class Z extending View. I want to add a TextView to this class to be part of the class Z and make it visible , how can I achieve that? Sep 21 14:52:33 superlinux-hp: the layout editor should pick up on this class and let you add things to it like any other View Sep 21 14:53:36 evancharlton: prior to 2.3 you could call such actions as answercall and endcall but now with the 2.3 you can not do such things the same way a good example is mr numbers call blocker version 1.6 used answercall and endcall to effectivly block calls but now it just uses endcall and sends the blocked call to voicemail Sep 21 14:53:44 Hodapp, I did not understand. Sep 21 14:54:31 evancharlton: so remember when i tried to transfer my domain to nearlyfreespeech Sep 21 14:54:32 Hodapp, this class Z has an animation Sep 21 14:54:39 now both registrars think they own my domain :/ Sep 21 14:54:49 mikedg_: fight! Sep 21 14:54:50 how do i veiryfy which one actually controls it Sep 21 14:54:53 so i want to add things like text view or anything else I want Sep 21 14:55:01 so i know who the hell to keep paying Sep 21 14:55:15 it has to be on top of class Z Sep 21 14:55:34 mikedg_: this is not the right channel for this Sep 21 14:56:09 i host my android dev site on that domain Sep 21 14:59:25 I want to order a paper book and get the kindle one free ... Sep 21 14:59:50 ok so order the paper book, order the kindle book, and copy it Sep 21 14:59:52 then ask for a refund Sep 21 15:06:41 lol Sep 21 15:06:43 sounds like a plan Sep 21 15:13:07 hi room Sep 21 15:13:58 when doing BitmapFactory.decodeStream( in ).compress( CompressFormat.JPEG , compression , fos ); i get java.lang.OutOfMemoryError: bitmap size exceeds VM budget Sep 21 15:14:31 I'm trying to set up ORMLite for use with Eclipse for an app I'm working on, but I can't get Eclipse/Java to recognize the annotations provided by its .jar files (which I've played in /libs). Anybody done this in the past and have a suggestion on how to overcome this problem? Sep 21 15:14:51 is there a possibility to save large bitmaps from the interne as jpeg without using bitmaps? Sep 21 15:15:05 i mean jpegs Sep 21 15:16:36 i don't want to display them in any view, i have solved it already Sep 21 15:18:06 get them as jpegs instead of bitmaps Sep 21 15:18:35 Ah, got it Sep 21 15:18:53 Restarted Eclipse and it offered to import the annotations Sep 21 15:19:04 Tobias|: add ormlite to build path Sep 21 15:19:10 mikedg_: how? Sep 21 15:19:24 mikedg_: the are jpegs on the server Sep 21 15:19:48 so why recompress? Sep 21 15:20:06 how are they winding up as bitmaps Sep 21 15:28:49 ok, i will download using bytestream or somthing like that Sep 21 15:33:47 helo Sep 21 15:34:21 i'm having problems getting cells in a gridlayout to align properly. is there a directive to tell a gridlayout to center all it's children vertically or something? Sep 21 15:35:18 hi, can someone give me a hint, why is HttpPost throwing java.net.UnknownHostException: www.warforum.cz even when the url is accesible from the virtualised phone? Sep 21 15:36:13 http://developer.android.com/reference/android/graphics/Bitmap.html#createScaledBitmap(android.graphics.Bitmap, int, int, boolean) In this what is the meaning of the filter parameter? Sep 21 15:36:15 Because you don't have the INTERNET permission Sep 21 15:36:37 SimonVT: yeeah, that can be possible, thanks :) Sep 21 15:36:38 SimonVT, do you happen to know how to tell a gridlayout to vertically center all of its children? Sep 21 15:36:43 Nope Sep 21 15:36:50 dang Sep 21 15:36:56 my layout_gravity is being ignored Sep 21 15:36:58 what do i do? Sep 21 15:38:02 Maybe set gravity on the gridlayout instead Sep 21 15:38:10 I don't know how it works, you could check the source see if it handles it Sep 21 15:39:01 SimonVT, but wont that align it to ITS parent? Sep 21 15:39:21 SimonVT, i checked, children of gridlayout are supposed to support the same directives as linaerlayout, including layout_gravity Sep 21 15:39:29 yitnowork? Sep 21 15:39:43 dogs love Mutt Romney Sep 21 15:39:48 lols Sep 21 15:41:06 gravity tells the view how to position its content. layout_gravity tells the parent how to position the view Sep 21 15:41:07 :( Sep 21 16:05:25 i'm making my own custom view that extends AdapterView. How might I make it scrollable? Sep 21 16:05:42 my current idea is to encapsulate it in a ScrollView, and link up listeners Sep 21 16:05:51 just wondering if there's a better way Sep 21 16:06:34 http://pastie.org/4772905 - what is createShareBitmap doing exactly? (I do not know what nativeMmap does exactly but this function is in regards to something called "ScreenshotHelper") Sep 21 16:06:54 Also Unshare method and nativemunmap.. Sep 21 16:12:19 HorizonXP: why ot just use a listview Sep 21 16:12:36 what exactly are you trying to make Sep 21 16:13:13 mikedg_: a gridview with heterogeneous rows Sep 21 16:13:36 so that the row's heights don't have to match. Sep 21 16:13:47 or rather Sep 21 16:14:23 mikedg_: something like this: http://gigaom2.files.wordpress.com/2012/08/pinterest-android.jpeg?w=288 Sep 21 16:15:20 lo Sep 21 16:15:21 looks nice Sep 21 16:15:30 why not just use two listviews ? Sep 21 16:16:42 gorudonu: they would then scroll independently. and I actually need 3 columns, but what happens when i need 4 or 5 on larger screens? Sep 21 16:16:57 HorizonXP: you got a point there Sep 21 16:23:07 hi Sep 21 16:23:46 hi Sep 21 16:23:50 if i add a new activity in my app it causes adding a new icon on the menu of the emulator...like a "new" app what's wrong? Sep 21 16:25:45 idk i just came before you here LucaS05 Sep 21 16:26:12 what you mean? Sep 21 16:26:25 anyway, i have the custom view working, just need to add scrolling to it Sep 21 16:27:13 can someone using vim tell me if and how do they manage imports? Sep 21 16:36:19 LucaS05, you want a new "Activity" in your manifest, not a new "Application" block Sep 21 16:36:59 both activities go in the same " and only 1 gets the MAIN/LAUNCHER filter Sep 21 16:39:53 I think I figured out what the BUILD_STATIC_HOST_LIBRARY make thing is for Sep 21 16:40:12 its for building a static library used when android OS is built Sep 21 16:40:46 I wish it was a shared lib so I could just link to it Sep 21 16:40:52 wtf android? Sep 21 16:43:31 shared libraries suck Sep 21 16:47:21 * kaneda^ shares a library w/ mikedg_ Sep 21 16:49:05 I have a AutoCompleteTextView with a ArrayAdapter backed by a ArrayList, how come only the items I put into the list at the start show up as choices? If I .add() to the list and notifyDataSetChanged() the adapter, the newly added item will never show up for autocomplete. Sep 21 17:19:42 Any thoughts on how to get hardware info from android? Sep 21 17:22:53 what type of hardware info? Sep 21 17:23:18 cpuinfo / Sep 21 17:23:21 maybe ;) Sep 21 17:23:42 i wonder if it works Sep 21 17:24:04 works :D Sep 21 17:24:09 cat /proc/cpuinfo Sep 21 17:24:30 erh no Sep 21 17:24:33 gorudonu: http://developer.android.com/reference/android/os/Build.html Sep 21 17:24:50 CPU_ABI / CPU_ABI2 Sep 21 17:24:53 zinx: I would use it Sep 21 17:24:56 *wouldnt Sep 21 17:25:08 I was just wondering if it works Sep 21 17:25:11 lspci doesnt Sep 21 17:25:37 you could build lspci, but there's no PCI bus on most Android devices Sep 21 17:27:36 nope just a short yellow bus Sep 21 17:28:02 zinx: I think i need to have a root then Sep 21 17:28:07 I got permission denied ;) Sep 21 17:29:01 lspci isn't shipped with Android, and the toolbox 'sh' will give permission denied for missing programs sometimes Sep 21 17:29:16 zinx: good to know Sep 21 17:33:51 what do with *.hprof file? Sep 21 17:34:19 delete them Sep 21 17:34:40 how to view him? Sep 21 17:35:07 http://lmgtfy.com/?q=.hprof+android Sep 21 17:35:35 result 2 is a blog post entirely about it Sep 21 17:36:18 hi! can I have a SeekBar that show the values without develop this functionallity with a SeekBar + TextView? Sep 21 17:41:37 bah, bastards on the aliyun store pirated my game :/ Sep 21 17:44:16 aliyun rox Sep 21 17:48:01 empty EditText has what value, i have String username = ((EditText) findViewById(R.id.username_input)).getText().toString(); Sep 21 17:48:12 how to set On Item Long Click Listener to dropdowned items from AutoCompleTextView??? Sep 21 17:48:15 and username == "" || username == null doesnt work Sep 21 17:48:34 "".equals(username) Sep 21 17:48:42 ok Sep 21 17:49:02 never use == for string comparison :( Sep 21 17:49:03 its was easy Sep 21 17:49:18 yeeah ,i forgot :) Sep 21 17:49:42 except..maybe..for null checking Sep 21 17:49:44 of course Sep 21 17:50:34 DarkKnightCZ: TextUtil.isEmpty(username) Sep 21 17:51:09 Is anyone familier with Google Musics landscape effect, where it shows the various 'recent' albums? How would I achieve something similar to that effect? Sep 21 17:51:58 evancharlton: nice, thanks Sep 21 17:54:06 evancharlton why no username.lenght!=0 ? Sep 21 17:54:57 What if username is null Sep 21 17:56:33 bingels: if you're going that route, why not username.isEmpty()? Sep 21 17:58:25 evancharlton that not exists method Sep 21 17:59:17 yes it does Sep 21 18:02:46 SimonVT you mean i right yes? Sep 21 18:03:03 atrus6: renderscript Sep 21 18:03:05 no Sep 21 18:04:12 isEmpty since API 9 Sep 21 18:05:18 So it exists Sep 21 18:07:52 lol Sep 21 18:08:35 hey guys. iphone 5 beat galaxy s3 in a drop test. better switch platforms! Sep 21 18:08:54 SimonVT for older apis is not Sep 21 18:09:18 i feel sorry for apple.. Sep 21 18:09:55 That's not the point Sep 21 18:09:57 haha why? they are making tons of money with little actual invention right now Sep 21 18:10:52 forget this word on this channel pls Sep 21 18:10:55 a***e Sep 21 18:11:11 have you seen how ios6 is being critized? it's a joke Sep 21 18:11:26 by geeks, not by the millions of people flocking out to buy it Sep 21 18:11:31 join #android Sep 21 18:12:04 only a fan can say things like that.. Sep 21 18:12:23 anyway, i don't want to get banned or kicked, so i will shut up Sep 21 18:14:37 shrug, i have no qualms with discussing it. i never cared for ios, iphone or any of apples products. they arent bad but not my thing, but the company is smart, they aren't that valuable by accident Sep 21 18:18:46 I'm really confused, If I add the items to my adapter directly, they show up in the autocomplete right away, but the adapter's getCount() is always 0 and I can't read the list to store it. If I add to the arraylist, then things don't show up in the autocomplete. Sep 21 18:19:09 Does anyone want me do some code reading? Sep 21 18:22:59 Ark42 Sep 21 18:23:01 add to the array Sep 21 18:23:08 and then call notifyDataSetChanged() on the adapter Sep 21 18:23:17 I need UI design tips! Sep 21 18:23:42 luyang http://developer.android.com/design/index.html Sep 21 18:23:57 speakingcode-wor: that's not a ui design gallery Sep 21 18:24:10 but thanks anyway Sep 21 18:24:12 u said tips Sep 21 18:24:17 speakingcode-wor - I was doing that originally, but nothing I add to the array shows up in the AutoCompleteTextView then. Only things that were in the initial array will show up. Sep 21 18:24:34 speakingcode-wor: sure, but I was thinking of something like ui design pattern gallery Sep 21 18:25:39 hmm Sep 21 18:26:05 It looks like, in the ArrayAdapter source, that as soon as the Filterable stuff is used, mOriginalValues is set to a copy of the array, and you can no longer modify it, because changing the array only changes mObjects then Sep 21 18:27:02 luyang: Download nice looking Android apps and observe Sep 21 18:27:16 Begin with Google-made apps Sep 21 18:27:28 sjobs: I have thought of that and I just would like more effective way to get a good overview Sep 21 18:27:33 I have checked google+ etc Sep 21 18:28:31 just observe apps and find what you like/dislike Sep 21 18:28:43 or google mobile ui design patterns Sep 21 18:28:55 Hello people. Can I have package with junit tests inisde my existing project? eclipse instists on putting them into a separate project. thanks! Sep 21 18:29:27 Sorry y'all that tries to answer my question I have twins and they are a lot of work. The hardware info I'm trying to get is broad com chip set info Sep 21 18:29:36 how to set On Item Long Click Listener to dropdowned items from AutoCompleTextView??? Sep 21 18:29:55 Ark42 you probably need to get a new filter instance after you update the data Sep 21 18:30:40 speakingcode-wor maybe you know? Sep 21 18:31:13 i've never used filter Ark42 so i couldn't say. what are you using the filter for? Sep 21 18:31:59 speakingcode-wor i mean "how to set On Item Long Click Listener to dropdowned items from AutoCompleTextView?" Sep 21 18:32:02 newtony: grats for twins Sep 21 18:32:17 its not filter Sep 21 18:32:27 bingels i wasn't talking to you Sep 21 18:32:45 oh sorry Sep 21 18:32:50 that's i said Ark42 to specify that i was talking to him Sep 21 18:32:57 him/her Sep 21 18:33:03 lol Sep 21 18:33:25 bingels in your adapter, in your getView() method, do the setOnLongClickListener on the view before returning it Sep 21 18:33:52 Is getApplicationContext() something that never changes during 1 run of the application, or always? Sep 21 18:34:20 speakingcode-wor to parent? but i guess this is hack Sep 21 18:34:26 bingle if you're not using a custom adapter, then you need to Sep 21 18:34:39 no this isn't hack this is the standard way Sep 21 18:34:57 extends ArrayAdapter Sep 21 18:35:09 frankbro|work i believe you are correct. applicaton context is singular IIRC Sep 21 18:35:24 speakingcode-wor: in 1 run or always tho? Sep 21 18:35:27 AdapterView av = (AdapterView) parent; av.setOnItemL.... Sep 21 18:35:39 run Sep 21 18:35:43 It's the same until your process is reclaimed Sep 21 18:35:43 in public View getView(...) Sep 21 18:35:59 yes? Sep 21 18:36:03 oh, yeah bingels Sep 21 18:36:22 whatever view you return from getView Sep 21 18:36:27 its not hack, maybe other correcter methods? Sep 21 18:36:33 *its not hack? Sep 21 18:37:17 i don't know what you're asking. but that's the way to do it. getView(int position) { .... } returns a view what Sep 21 18:37:41 that** is the view you want to set the onLongClickListener on before retruning Sep 21 18:37:42 I'm no expert, but from similar patterns, I would guess that's the recommended way Sep 21 18:37:59 ^^ Sep 21 18:38:12 getView() return not ListView with dropdown items. getView() return only item's view Sep 21 18:38:45 are you trying to listen for long press on the "whole list"? or on an item? Sep 21 18:38:55 on list's item Sep 21 18:39:06 ... Sep 21 18:39:24 i think you're on the right track Sep 21 18:39:38 the underlying code should call getView for every item, preparing this view is the role of hte method Sep 21 18:40:12 if you want it to be displayed as a dropdown, you need to use the appropriate mechanism to displayu - probably a spinner Sep 21 18:40:19 but what name of method when constructs ListView? Sep 21 18:40:27 with dropdowned items Sep 21 18:40:42 listview doesn't do dropdown items afaik Sep 21 18:40:42 Broadcom info* thanx gorudonu Sep 21 18:40:47 I get this, although I have added both: "... does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner in its AndroidManifest.xml" Sep 21 18:40:52 use a spinner for dropdown Sep 21 18:41:49 http://pastebin.com/B313vHxi Sep 21 18:42:18 speakingcode-wor how i can do that? Sep 21 18:42:49 use a spinner in yoru layout insteado f listview, use a SpinnerAdapter instead of ArrayAdapter or whatever adapter you're using, and override getDropDownView() Sep 21 18:43:21 does anyone know what getLocalVisibleRect does? Sep 21 18:43:30 thanks I suspect that this should help me. Sep 21 18:44:17 speakingcode-wor its Adapter's work making DropDownView(not item's views)? Sep 21 18:44:17 with SpinnerAdapter you need to override getView() for the selected item shown and you need to override getDropDownView() for the views of each item in the dropdown list shown when the user taps the spinner Sep 21 18:44:45 a spinner shows a single item, and when tapped it will show a drop down. Sep 21 18:44:47 or Adapter making DropDownView and item's views yes? Sep 21 18:45:09 the single item's view is from getView in the SpinnerAdapter. the dropdown list items are from getDropDownView() Sep 21 18:56:01 Ok, I finally got it to work. I modify the ArrayList like normal, but instead of JUST calling notifyDataSetChanged on the adapter, I do setNotifyOnChange(false) clear() and then add() in a loop Sep 21 18:56:26 that forces the updated data into mOriginalValues in the ArrayAdapter Sep 21 19:07:10 speakingcode-wor getDropDownView not calling when showing dropdown view in AutoCompleteTextView Sep 21 19:07:23 checked now Sep 21 19:23:00 I want to auto-start a service onBind, but don't want it destroyed when moving between activities, if the next activity also binds to it in onStart. Thoughts? Sep 21 19:23:53 right now in onBind i have the service start itself, which I feel is kind of an ugly hack. Then i start a timer in unbind, and call stopSelf if it expires. but it's not quite working as expected Sep 21 19:25:16 mrenouf: thats kinda the way the old music service did it Sep 21 19:26:27 the reason is that it acts as a memory cache to speed up data access Sep 21 19:26:44 why not just make that a singleton or something Sep 21 19:26:51 If you instanciate a activity, can you use it's context right away safely? Sep 21 19:26:53 but I want it to go away if the app is backgrounded to not hog memory when not needed Sep 21 19:27:19 frankbro|work: No, you don't manually instantiate an activity Sep 21 19:27:58 mrenouf: maybe if the cache is tuned, you can do the simplest thing and not worry about it ;) Sep 21 19:27:58 uuuh, no. making it just a singleton would make things even worse Sep 21 19:28:04 Oh indeed, .class damn Sep 21 19:29:08 if started only from onBind() there is no way to prevent being stopped after onUnbind, right? Sep 21 19:30:14 i see what you're trying to do, have a service follow your activities but only when the app is 'really' running, and its a pita Sep 21 19:30:22 mrenouf, stale code, but I tackled this once... http://pastebin.com/Hp7w2rFQ Sep 21 19:30:27 this is also going to back some widgets Sep 21 19:30:34 mrenouf, might prove useful Sep 21 19:30:36 ty Sep 21 19:30:53 safeStop was called when my timers expired.. Sep 21 19:32:17 does onRebind do anything useful? I've been simply returning false from onUnbind Sep 21 19:32:44 the docs don't seem to indicate it changes any behavior other than having a new bind call a new method, but that implies the service stays alive? Sep 21 19:32:52 I think it's call in addition to onBind... so I didn't find it useful (rusty on the details) Sep 21 19:34:09 looking at my old code makes me sad Sep 21 19:34:41 haha Sep 21 20:02:53 nobodys talkin' Sep 21 20:02:55 weekend ;) Sep 21 20:14:48 you know what it is... onBind isnt called when I move back in the activity stack, Sep 21 20:15:04 activities have bindService in their onStart() but I dont see it happen in the service Sep 21 20:15:06 really odd Sep 21 20:16:12 I think the self-start screws with that Sep 21 20:17:20 This might be off-topic for this channel, but does anyone know how to disable the messages Google Checkout generates when an Android app purchase is cancelled. Sep 21 20:21:33 jfpoole, just filter them? Sep 21 20:21:48 or check in your wallet account Sep 21 20:22:11 I've gone through the settings in my wallet account and there's nothing obvious. Sep 21 20:30:41 figured it out! Sep 21 20:30:58 I can't for the life of me figure out how to get eclipse to generate R.java Sep 21 20:31:14 is there a keyboard shortcut? Sep 21 20:31:16 Build your app Sep 21 20:31:20 I was skipping the binding if I had already received a result, so when navigating backward the service would shutdown because the binding would not be remade Sep 21 20:31:37 SimonVT: more detail please Sep 21 20:31:46 R is generated when you build your app Sep 21 20:31:53 So to generate R, build your app Sep 21 20:32:00 the default behavior does what I want (onBind only), and the service does not stop when transitioning between activities Sep 21 20:32:05 so when I press run it gives me errors due to R.java not existing Sep 21 20:32:16 If R is not being generated, you have xml errors Sep 21 20:32:35 follow the trail of red in the package explorer Sep 21 20:32:42 or use "Problems" view Sep 21 20:33:33 onResume() Sep 21 20:34:13 ? Sep 21 20:35:40 sry didnt read it clearly Sep 21 20:35:49 the first method invoked is onResume Sep 21 20:35:51 not on bind Sep 21 20:36:10 but now I see you're talking about service not activity Sep 21 20:36:14 sorry for messing up Sep 21 20:55:53 any designers have input on centering the ActionBar title text? when is it ok/good to do so vs. not? Sep 21 20:58:07 anyone able to set up the emulator email client to work with gmail ? Sep 21 20:58:21 as far as i can tell, gmail is not on the emu Sep 21 21:00:09 ah, guess i need to create an avd with google apis - otherwise its not possible Sep 21 21:33:17 what does it mean when an activity has a "leaked window" Sep 21 21:33:31 it has something to do with an AsyncTask but I'm not sure exactly what Sep 21 21:34:02 You're probably manually managing a dialog and not doing a very good job Sep 21 21:34:07 hi there Sep 21 21:34:34 haha Sep 21 21:34:50 SimonVT: correction: someone on my team is probably manually managing a dialog and not doing a very good job :) Sep 21 21:35:24 Either use a DIalogFragment or Activity#showDialog/dismissDialog Sep 21 21:36:04 ok, so this is cheesy, but what I ended up doing is running a repeating timer task, and checking if anything in the service has been used for the past 5 minutes. If not, call stopSelf() Sep 21 21:36:31 since onBind() isn't always called for reasons I can't explain, I can't use that to cancel a shutdown timer Sep 21 21:36:42 SimonVT: thanks Sep 21 21:37:48 mrenouf: O.o Sep 21 21:38:57 mrenouf: still not convinced a singleton SoftReference cache would not have been better ;) but maybe i dont understand your situationenough Sep 21 21:39:20 softreference? ok that's making it even worse still Sep 21 21:39:24 dude Sep 21 21:39:35 dude ! Sep 21 21:39:38 if I have a scrollview that contains a custom view Sep 21 21:39:47 and I've hooked a listener into the scroll event Sep 21 21:39:48 it's not *just* a cache, but a backend service connector, threadpool, response parser, etc Sep 21 21:39:59 ah, ok Sep 21 21:40:01 softrefs are a bad idea Sep 21 21:40:03 what should I call to cause my custom view to redraw elements? Sep 21 21:40:15 requestLayout seems to be too slow... Sep 21 21:40:23 I don't want to fill up the heap with crap I don't need. Sep 21 21:40:28 mrenouf: why are softrefs bad ? Sep 21 21:40:32 ^^ Sep 21 21:40:41 WeakRef maybe Sep 21 21:40:49 oh yeah, well - dvm still doesn'thave good gc Sep 21 21:40:58 right Sep 21 21:41:00 g00s: nah, the concurrent one is pretty good Sep 21 21:41:08 p_l|backup: its not generatinal Sep 21 21:41:14 *generational Sep 21 21:41:21 it's SLOW Sep 21 21:41:21 g00s: generational doesn't necessarily mean better Sep 21 21:41:32 p_l|backup: it often means more fragmentation Sep 21 21:41:44 how different is a widget's display from a normal app's display? Sep 21 21:42:12 g00s: there are different ways to handle GC. A lot of them. Also, some of the possible speedups would require killing concurrency Sep 21 21:42:13 jarwhat do you mean? Sep 21 21:42:18 jaggz: ^ Sep 21 21:42:54 new to android.. trying to add the current time (and a time-selector) to my app Sep 21 21:43:27 someone (lost in too-short logs) recommended a clock app to look at.. when I look online people refer to a "digitalclock widget" so I'm looking at its source now Sep 21 21:43:41 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/1.5_r4/android/widget/DigitalClock.java Sep 21 21:43:44 what could help, I guess, would be stack escape analysis, and maybe one-bit refcounts and precomputed refcounts (it reduces pressure on GC by explicitly killing objects that weren't shared, and with 1bit refcounts even if they were heap-allocated) Sep 21 21:44:32 p_l|backup: right, but … concurrency and generations are orthogonal Sep 21 21:44:38 When I use adb shell, I get '- exec '/system/bin/sh' failed: Permission denied (13) -' Sep 21 21:44:52 speaking of gc(), there goes eclipse again. "PermGen space" @#**(#&*@!@ Sep 21 21:45:03 I have no way to use chmod, so how would I fix that? Sep 21 21:45:06 mrenouf: what version of eclipse ? Sep 21 21:45:16 g00s, 3.8? plus ADT Sep 21 21:45:32 hm, thats why i use too. thought maybe you were using 4.2 Sep 21 21:45:47 that peice of garbage? god no Sep 21 21:45:55 :) Sep 21 21:46:13 they went and made it HTML/CSS based. and it's sluggish as hell Sep 21 21:47:05 wait, does adb push use the same permissions as the file that is pushed? Sep 21 21:47:25 g00s: yes, but some speed ups would require parallel marking Sep 21 21:48:24 I have 4.2 on one machine... it's not as sluggish as I expected (since Eclipse is always slow, duh), but that machine makes mine feel Atari Sep 21 21:49:36 eh, screw it. onBind -> start -> onStartComment with START_NOT_STICKY, and STOP_WITH_TASK. Sep 21 21:49:43 *onStartCommand Sep 21 21:50:13 the service will sit around for a bit, oh well. Sep 21 21:50:31 I implemented onLowMemory() like a good little developer ;-) Sep 21 21:51:00 is it safe to override onTrimMemory if I need to be backward comaptible? Sep 21 21:51:44 level constants should get inlined, yeah? and dalvik dosen't care about @Override annotations Sep 21 21:56:33 yes Sep 21 21:57:17 As long as reflection isn't performed on the class Sep 21 21:59:04 just a service Sep 21 22:14:33 ok, this is ODD. With my task in the background, my service is repeatedly getting onCreate called. but never onDestroy Sep 21 22:14:49 is it just getting kill()-ed ? Sep 21 22:15:13 I dont want it to restart if it's in the background and not needed Sep 21 22:16:22 anyone have a list of phones and the minimum sdk to reach them? Sep 21 22:16:29 or % of market share Sep 21 22:17:09 mrenouf: odd? Sep 21 22:17:46 jaggz: google does. Sep 21 22:18:09 jaggz: http://developer.android.com/about/dashboards/index.html Sep 21 22:19:54 thanks :) Sep 21 22:20:15 I'm honestly surprised you haven't seen the before. It's touted about almost every year at io =P Sep 21 22:23:16 hey guys, what is the best way to upload a image from my android tu a server ? in server side I'm working in .Net and use a control called FileUpload and then I use the file like a stream to convert it to a byte[] array and save it in my DataBase Sep 21 22:24:07 kulas: http Sep 21 22:24:56 hacdan, very new to android (and mobile) dev Sep 21 22:25:11 <_klk_> hi all Sep 21 22:25:25 ...and java. Sep 21 22:25:38 evancharlton: with HTTP Post? I send the image like a byte[] array ? Sep 21 22:25:47 <_klk_> brand new to android, just downloaded AOSP and trying to compile openssl. running into an error: http://pastebin.com/rxdMwVvB (full build output, error @ bottom) Sep 21 22:25:56 <_klk_> would appreciate any insight Sep 21 22:26:08 kulas: yes, or PUT Sep 21 22:28:26 _klk_, forgive me but why are you compiling openssl? Sep 21 22:28:49 oh. you mean while building android Sep 21 22:28:59 no, he told it specifically build openssl Sep 21 22:29:09 <_klk_> mrenouf: i'm working with a platform that uses android. i need some external libraries for my application to run. openssl is one of them Sep 21 22:29:25 <_klk_> the platform itself is stripped down, doesn't come with openssl library Sep 21 22:29:30 you'll most likely need to run a full build, as openssl depends on other libraries to compile Sep 21 22:30:08 <_klk_> HacDan: ok, I can try that Sep 21 22:30:34 evancharlton: thanks! I'm going to look about that Sep 21 22:30:54 _klk_: if you're on a slower system where compile time will be high, you could try building acp first, but I'm sure acp depends on things as well Sep 21 22:31:14 yeah, looks like you need a build tool from another step of the build Sep 21 22:31:49 <_klk_> HacDan: it's a core i7. do you know how long it might take to do a full build? Sep 21 22:32:01 how much ram _klk_? Sep 21 22:32:05 <_klk_> 16g Sep 21 22:32:13 35 minutes give or take for ics Sep 21 22:32:18 what's the use of a ContextWrapper? Sep 21 22:32:23 <_klk_> ok, not too bad :) Sep 21 22:32:31 wow, I would have guessed much longer Sep 21 22:32:48 I build on a quad i7 with 8gb and it only takes me 45 to do a full ics build Sep 21 22:33:20 it's an i7 mobile, so only running @ 2.0ghz, I'm sure _klk_'s cpu is much faster Sep 21 22:33:41 if I add an id to the default Hello World text field (calling it text01).. shouldn't that be accessible via t=(TextView)findViewById(R.id.text01); ? Sep 21 22:33:42 <_klk_> HacDan: i believe 3.4 ghz Sep 21 22:34:24 sounds about right _klk_, if it takes more than 35 minutes I'd be surprised Sep 21 22:34:25 jaggz: yes whats the problem? Sep 21 22:34:30 like really surprised Sep 21 22:34:43 HacDan: what takes 35 mins? Sep 21 22:34:49 text01 cannot be resolved or is not a field Sep 21 22:35:06 danixn: compiling android Sep 21 22:35:17 put source and output on an SSD and watch it scream with 32GB of RAM Sep 21 22:35:44 HacDan: cool is written in C right? Sep 21 22:35:49 jaggz: show the code Sep 21 22:35:56 danixn: most of it isn't, no Sep 21 22:35:57 dont forget -jX parallel Sep 21 22:36:03 HacDan: java? Sep 21 22:36:09 do we have a channel-preferred paste site? Sep 21 22:36:16 most of it is written in java, yes danixn Sep 21 22:36:24 pastebin -> java/xml formatting Sep 21 22:36:33 HacDan: so how excatly did you compile it? Sep 21 22:36:48 with magic beans danixn Sep 21 22:37:48 ok i will look into it is thre any guide you can suggest me? Sep 21 22:38:26 google wrote a nice one Sep 21 22:42:09 danixn: http://source.android.com/source/initializing.html that will get you started. And I wasn't being sarcastic about google writing it. Sep 21 22:43:45 Thanks HacDan, where did you compile it? what os? Sep 21 22:44:34 I've done it from ubuntu/debian/ and gentoo. Currently I compile from os x though Sep 21 22:45:56 http://pastebin.com/K3Sr9z8W Sep 21 22:46:03 (line 18) Sep 21 22:46:33 eventually I shall display a clock, and have a time selecting area.. Sep 21 22:46:41 jaggz: got the xml handy? Sep 21 22:46:48 I'm guesing your id isn't set right Sep 21 22:46:51 making an alarm clock for caregivers to help take care of their family (or patients) Sep 21 22:46:57 how to get url from HttpResponse? (i have login form - if i log in successfully, it redirect with 301 header to another page (on another page there is response code 200), if i log in unsuccessfully, there is 200 response codes), since it returns 200 every time (because it also "obey" the redirect) Sep 21 22:47:20 jaggz: and the xml? Sep 21 22:47:49 http://pastebin.com/5UyHY5Vy Sep 21 22:47:53 DarkKnightCZ: won't it be in the response headers? Sep 21 22:48:20 if you will note from the pastebin URL progression just how many people posted between my .java and .xml Sep 21 22:48:55 ya your id is set wrong jaggz Sep 21 22:49:43 evancharlton: there is the problem, it redirect to another page, so there isnt 301, but 200 (because its different page), so i can make check from url (or if you know something different than response.getStatusLine().getStatusCode() ) Sep 21 22:50:16 jaggz: http://pastebin.com/HPChFwqx try that Sep 21 22:52:31 DarkKnightCZ: wait, so the server is returning a 200, but redirecting anyway? Sep 21 22:52:42 or is your http client automatically following the redirect? Sep 21 22:55:08 evancharlton: testing website - http://pastebin.com/NaBQHjtu, login script - http://pastebin.com/wB49rbyg Sep 21 22:56:31 so if username and password match, there should be response.getStatusLine().getStatusCode() == 301, but it follows that redirect, and since redirected page returns 200, the whole function returns 0 (instead of 1) Sep 21 22:59:02 if I'm using code to modify the textview, is it then less-advised to have its default be a string resource? Sep 21 22:59:17 (I notice you removed the hello_world string default) Sep 21 22:59:53 you can still have the default, but you set the text in onCreate so the default was null Sep 21 23:08:52 I see :) thank you Sep 21 23:23:09 no DateFormat.getDateTimeInstance() in api 8 from what I can see Sep 21 23:24:41 developer.android.com has all the docs jaggz Sep 21 23:24:52 you in australia btw jaggz? Sep 21 23:25:48 no sir, los angeles Sep 21 23:25:55 but I have a brother in australia Sep 21 23:26:13 ahh okay Sep 21 23:26:25 I used to play counterstrike with a guy named jaggz and he lived in australia =/ Sep 21 23:26:37 interesting guy.. works for the airlines and is also a ranger and does other animal saving type things Sep 21 23:27:00 I should say "the airline" Sep 21 23:27:15 where are you? Sep 21 23:27:21 Vermont Sep 21 23:27:29 like the teddy bears! Sep 21 23:27:31 Vergennes to be specific, but I'm guessing you have no idea where that is Sep 21 23:27:33 ya Sep 21 23:27:39 about 25 minutes south of the factory Sep 21 23:28:27 it says getDateInstance has been supported since api level 1 Sep 21 23:28:33 err Sep 21 23:28:36 you want datetime Sep 21 23:28:37 derp Sep 21 23:30:41 there's the page for referenc: http://developer.android.com/reference/java/text/DateFormat.html Sep 21 23:30:44 reference* even Sep 21 23:35:59 The method getDateTimeInstance() is undefined for the type DateFormat Sep 21 23:36:15 String currentDateTimeString = DateFormat.getDateTimeInstance().format(new Date()); Sep 21 23:36:30 but I see it at api 8 in the docs there Sep 21 23:36:48 it's at api 1 in the docs =/ Sep 21 23:37:18 there are two DateFormats Sep 21 23:37:42 google wrote their own I take it Leeds? Sep 21 23:38:45 well, there's android.text.format.DateFormat - which doesn't list a getDateTimeInstance method - and java.text.DateFormat, which does Sep 21 23:39:32 hi what do you think about airpush google is spamming me now about that ? Sep 21 23:39:34 interesting Sep 21 23:39:51 (not airpush.. the date thing) Sep 21 23:40:04 jaggz: I'm going to guess you used IDE-assisted auto-import, and it picked the wrong one Sep 21 23:40:29 now I need Date() too.. Eclipse doesn't seem to know how to resolve these things (not sure what it knows and doesn't know) .. so I am looking for these imports Sep 21 23:40:54 well you need java.text.DateFormat if you want getDateTimeInstance Sep 21 23:41:12 Leeds, heh.. no I searched for dateformat and "android imports" and found a "common imports" page which had the android.text.format.DateFormat there Sep 21 23:42:41 elec29a: what do you mean? Sep 21 23:42:54 airpush is a new admob Sep 21 23:43:04 yes I know that Sep 21 23:43:21 i find it to offensive but google is spamming me now about em Sep 21 23:43:39 they make full screen ads and icons Sep 21 23:43:49 no, airpush is an independent ad system, which is know for pushing notification ads Sep 21 23:44:06 should i use it leeds ? Sep 21 23:44:19 I thought they stopped using notification ads? Sep 21 23:44:19 not unless you hate your users Sep 21 23:44:23 or stay with google ? Sep 21 23:44:30 ok i think like you Sep 21 23:44:55 it bullshit Sep 21 23:44:59 s Sep 21 23:45:28 is there no way to get a tablet emulation in android eclipse emulutian or is it stupid me ? Sep 21 23:45:37 elec29a: what at google is spamming you with it? Ads? Sep 21 23:45:45 every page Sep 21 23:46:06 well, it means they paid a lot and you fit the criteria closely Sep 21 23:46:09 yes you can emulate a tablet Sep 21 23:46:31 how please explain little drunken but happy Sep 21 23:46:51 elec29a: so nothing I can help you with (wasn't there a way to ban specific ads from your view, though?) Sep 21 23:47:11 ha ha lol pl Sep 21 23:47:35 new avd honeycomb or greater api level, and change the resoution to 1280 x 800 Sep 21 23:47:39 <_klk_> i'm trying to do the full aops build, but that is giving an error. here is the truncated log showing the error: http://pastebin.com/hUWGkGNj Sep 21 23:47:42 elec29a: they offered a lot of money per view of the ad by someone who fits the criteria your browser/search terms show in Google Ads database Sep 21 23:48:00 i think i got it airpush is to offensive like a virus Sep 21 23:48:15 i am a virus but i dont like it Sep 21 23:49:27 <_klk_> HacDan: would you mind taking a look? :) Sep 21 23:49:34 I am _klk_ Sep 21 23:50:14 String currentDateTimeString = DateFormat.getDateTimeInstance(DateFormat.SHORT, Locale. ??? ).format(new Date()); Sep 21 23:50:26 how do I stick with the current locale and still provide a date format? Sep 21 23:50:43 my next app is a ski gprs map best speed app whats better for that openstreetmaps or google ? Sep 21 23:51:03 (calling getDateTimeInstance() with no arguments gives a default formatted string with, I presume, the current default locale) Sep 21 23:52:03 got it I think.. getDefault() Sep 21 23:52:07 elec29a: skiing? Google got some data, but for general maps I'd go with Google as well. Not sure about OSM... afaik iOS6 was supposed to use OSM, and the showing was less than stellar... Sep 21 23:52:09 _klk_: what platform are you building? the libtvmanager is only used by google tv, or at least thats my guess Sep 21 23:52:32 granted you should have the source to build that anyway Sep 21 23:53:18 (nope.. it wants (int, int), not (int, Locale) Sep 21 23:53:21 yes skiing sorry my bad english drunk as german italian :) thx Sep 21 23:53:26 GTV source isn't open, AFAIK Sep 21 23:53:50 <_klk_> i'm building for a partner's platform, it's unreleased. their processor is ARMv7 so i chose the mini_armv7a-userdebug option from lunch Sep 21 23:54:12 _klk_: this isn't really the right channel for platform stuff, by the way Sep 21 23:54:28 he's actually just trying to build openssl =/ Sep 21 23:54:28 <_klk_> Leeds: oh, my bad, i wasn't aware. what channel do you suggest? Sep 21 23:54:35 in theory, #android is, but in practice you want the android-building/android-porting google groups Sep 21 23:54:45 <_klk_> HacDan: should i limit the build to acp ? Sep 21 23:54:55 _klk_: you could try =/ Sep 21 23:55:05 p_l i get data and maps from state map quarter should i use streetmaps or google ? is that question better Sep 21 23:55:14 <_klk_> HacDan: ok, i will try Sep 21 23:55:15 no idea then Sep 21 23:55:18 too sleepy now Sep 21 23:55:32 :) Sep 21 23:55:32 <_klk_> i followed all the steps on http://source.android.com/source/building.html for building the platform, not sure why it's going wrong Sep 21 23:55:53 well you're using 12.04 for one, which I don't believe is supported Sep 21 23:56:01 12.04 ubuntu^ Sep 21 23:56:40 _klk_: did you get Sun JDK, or OpenJDK, or IcedTea? Sep 21 23:57:46 most likely openjdk but he's experiencing an error compiling c code anyway Sep 21 23:57:54 openjdk tends to work fine for building p_l Sep 21 23:58:15 <_klk_> HacDan: ah, you might be right. Sep 21 23:58:17 <_klk_> although from the docs: "Building on Ubuntu 12.04 is currently only experimentally supported and is not guaranteed to work on branches other than master." Sep 21 23:58:20 <_klk_> i am building off master Sep 21 23:59:03 hrm, dunno then _klk_ I've never built for the 'mini-armv7a' platform Sep 22 00:00:02 <_klk_> p_l: java version "1.6.0_24" Sep 22 00:00:03 <_klk_> OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-1ubuntu0.12.04.1) Sep 22 00:02:01 <_klk_> HacDan: ok, np. thx for all the help :) i might try setting up a VM running 10.04 and building from there Sep 22 00:03:38 Suddenly when i run an application on my galaxy s3 the app does not open Sep 22 00:03:59 logcat says that it installed the apk but nothing opens Sep 22 00:04:18 no starting intent? Sep 22 00:04:28 or.. activity Sep 22 00:04:44 danixn: might wanna try gs3 support for that. this is more of a developer channel =/ Sep 22 00:05:02 k Sep 22 00:05:09 or is this something you wrote? Sep 22 00:05:12 i was just wondering if anyone had this problem Sep 22 00:05:23 you said an application, so I don't know =/ Sep 22 00:05:37 no no, i have the same problem even with code that worked before Sep 22 00:05:45 and worked perfectly Sep 22 00:05:51 oh so you wrote the app Sep 22 00:06:14 care to share your main activity code then? Sep 22 00:06:51 Yes sorry, i am working on eclipse and before every time i had to run some code i just press run and the application would automatically start running on my phone Sep 22 00:07:34 There is no problem with the code bc it works on the emulator Sep 22 00:08:10 sadly with android that doesn't mean much Sep 22 00:08:15 what sdk did you target with it? Sep 22 00:08:22 and what was the minimum Sep 22 00:08:34 target: 4.0.4 Sep 22 00:08:56 really its not a big deal bc i can manually open the application, i just really liked this feautre for debugging Sep 22 00:09:09 oh Sep 22 00:09:13 I thought you said it crashed Sep 22 00:09:20 nono Sep 22 00:09:24 it never opens it Sep 22 00:09:45 is debugging enabled on your s3? Sep 22 00:10:06 on Developer options? yes Sep 22 00:10:23 hrm, dunno then Sep 22 00:10:29 I've run into that issue, never really worried about it Sep 22 00:10:38 ok np Sep 22 00:10:55 it is a nice feature when it works though =) Sep 22 00:11:11 its really not a big deal just a little more time consuming to open the appliaction manually Sep 22 00:15:22 whats faster, drawing in canvas or use some opengl api to draw 2d graphics? Sep 22 00:17:37 I believe opengl is caioketo but don't quote me on it Sep 22 00:18:28 im doing it on opengl, it seems better, but no costs asking around right? :df Sep 22 00:18:29 =D Sep 22 00:19:12 never hurts to ask around =) Sep 22 00:19:25 :) i tought what is caioketo hmmm 10 mins Sep 22 00:19:58 opengl thx Sep 22 00:20:03 =) Sep 22 00:20:24 do you guys know any good opengl libs? im using e3roid, but not sure if the best.... Sep 22 00:24:59 i wish you the best day in your live and many clients on your app "lil wayne bruno mars mirror" is my fav wathc it thx alot Sep 22 00:26:20 Whats the best way to test if a string is null or empty? Sep 22 00:26:45 well a string should never be null as it should be initialized empty =) Sep 22 00:27:02 and strings have an isEmpty() method Sep 22 00:27:36 odd, this is causing a null ref ex Sep 22 00:27:37 (_deviceID.trim().compareTo("") Sep 22 00:27:41 caioketo, I used AndEngine - a lot of people use that Sep 22 00:27:47 hrm, maybe something else Sep 22 00:30:11 yeah, its null Sep 22 00:30:35 and I dont see a IsEmpty Sep 22 00:30:37 odd Sep 22 00:31:00 isEmpty is Java 6+ Sep 22 00:33:23 stupid question, do I set what version to use? Sep 22 00:34:19 assuming you mean in Eclipse, there's an option somewhere Sep 22 00:37:27 OK, what version is recommened? Sep 22 00:40:02 hi all, little question of performance, what is better between these 2 little scenarii, please: http://pastebin.com/Qi6pz592 and thx :) Sep 22 00:45:26 ad2: why not just: bool = something Sep 22 00:45:48 something is already a boolean, so just use it Sep 22 00:48:18 sampullman, thx you but this example is fictiv Sep 22 00:48:31 what? Sep 22 00:48:32 it's about knowing what cost more between if + else + for sure an assignment Sep 22 00:48:49 vs 2 assignment at worst + one if for sure too Sep 22 00:49:01 it's not about boolean Sep 22 00:49:16 not the variable tested in the condition Sep 22 00:49:18 nor* Sep 22 00:49:20 ok, then it's context dependent Sep 22 00:49:31 imagine it's an int affection if you prefer Sep 22 00:49:56 i'm trying to get every cycle i can, because it's a terrible loop (doing DSP) Sep 22 00:50:16 option one is better, but if it's an int it won't matter in the slightest Sep 22 00:50:38 thx you again Sep 22 00:50:48 i'm not able to benchmark it properly ;( Sep 22 00:53:45 is there any dalvik profiling tool to analyze the number of times particular function was invoked etc? Sep 22 00:53:53 DDMS Sep 22 00:54:13 so I was working on making a custom SimpleCursorAdapter today and I got what I thought would work finished. When I try to test it I'm getting an illegal argument exception because column _id does not exist. I assume this is the cursor that's saying it doesn't exist but I'm having a hell of a time figuring out why because it DOES exist and I'm using it on the main activity screen. Any thoughts? Sep 22 00:54:14 it's a big view in eclipse loading few useful debugging too Sep 22 00:54:20 some are also in tools of your sdk folder Sep 22 00:56:07 ad2, can DDMS customized to handle breakpoints in a different way as to record all points passing instead of stopping execution there? Sep 22 00:57:36 if t's possible, this would be with the eclipse debugger view, but i don't know if you can count like in visualstudio debugger or others ide Sep 22 01:12:28 is anyone here good with opengl/3d graphics? Sep 22 01:12:48 or is there another channel better suited for that sort of question? Sep 22 01:14:47 what is better develop on mac or windows or same ? Sep 22 01:14:48 this is the right channel, at least for 3d on Android - but it's not a good time of week Sep 22 01:14:54 elec29a: Linux Sep 22 01:15:03 no ha ha Sep 22 01:15:07 sampullman, #opengl sounds appropriate Sep 22 01:15:44 leeds i wanna pay atleast for my os Sep 22 01:16:07 ad2: ill give it a shot, thanks Sep 22 01:16:23 elec29a: you can pay as much as you want for ubuntu Sep 22 01:16:30 elec29a: your money, your waste Sep 22 01:22:08 I think I figured my problem out.. crazy.. _id is case sensitive.. Sep 22 01:23:05 what are you using leed i know only freebsd and debian you are on ubuntu or what ? Sep 22 01:34:23 has anyone here used the arcball method for rotating an object from touch coordinates? Sep 22 01:57:22 i want to create a constants file where i can access them like Constants.MESSAGE_TYPE.SERVER_DATA… do i create a enum file called constants, then enums within that? i'm trying it but it doesn't allow me to Sep 22 01:57:38 syntax error making an enum inside an enum…maybe that's not possible Sep 22 02:03:27 ultra i am newbie but i guess final SharedPreferences pref = getSharedPreferences("MY_PREFERENCES", Context.MODE_PRIVATE); is the best way or not ? Sep 22 02:04:13 string is all or int convertable Sep 22 02:09:08 need int Sep 22 02:09:14 shared prefs, haven't heard of it… i'll google that Sep 22 02:09:15 thanks Sep 22 02:10:18 i'm not sure i need to use something like that… these are just constants Sep 22 02:10:30 yes Sep 22 02:12:11 i think it's overkill Sep 22 02:12:33 i think i have it figured out, anyway Sep 22 02:13:27 ultra-: if you don't need to modify the data, just stick it in strings.xml Sep 22 02:14:04 i might do tht Sep 22 02:14:20 for some reason i've stayed away from the xml stuff… i have custom layouts i've written and never used any xml Sep 22 02:14:36 xml is good. it's there to help, not hinder Sep 22 02:15:16 see res/values: http://developer.android.com/guide/topics/resources/providing-resources.html Sep 22 02:15:20 yeah…i guess maybe because i'm using other languages too, i wanted to keep their usage similar… so i tend to create everything via code in all of them Sep 22 02:15:41 of course, once i started programming in cocoa that went out the window anyway Sep 22 02:16:29 XML can be good... Sep 22 02:17:01 but enumerating some constants is more universal Sep 22 02:17:30 why do you need universal? Sep 22 02:17:36 this is a client app, i've also built a server app and they'll have to share a protocol, so using constants files keeps the code similar Sep 22 02:17:58 hmm Sep 22 02:18:03 b/c this same app will be for ios as well, eventually… and it connects to a server i've written in objective-c, but i'll also be doing one in c# Sep 22 02:18:32 so being able to have similar-looking files for the shared information is a good thing for that Sep 22 02:18:43 better to have an api for getting your data. that way the storage method can differ vastly while the actual code remains exactly the same Sep 22 02:33:22 is there a way to make enums be an int? or do i have to declare public final….etc…? Sep 22 02:33:48 so an enum called MESSAGE_TYPE will return an int for MESSAGE_TYPE.SERVER_DATA_RECEIVED Sep 22 02:37:07 Hi Sep 22 02:37:21 Does anyone knows how to change launcher2.apk grid and margin? Sep 22 02:40:44 Hello! How would you compute Base, normal, reference values of Accelerometer? I mean: the normal position of the device, from which user starts his rotations **** ENDING LOGGING AT Sat Sep 22 02:59:58 2012