**** BEGIN LOGGING AT Mon Apr 01 02:59:57 2013 Apr 01 03:18:44 Awww stackoverflow got me Apr 01 04:09:00 USB Debugging just mysteriously stopped working on my phone. The checkbox is checked but it no longer gives me the "USB Debugging Connected" message on the phone when I connect it to a computer via USB and the computer no longer sees it. I've tried several cables. Any ideas on what to do? Apr 01 04:10:39 This is android 2.2 btw. Apr 01 04:11:19 heh, that happens to my droid-1 Apr 01 04:11:26 i reboot the phone Apr 01 04:11:39 Yeah, tried that multiple times. Apr 01 04:11:48 :( Apr 01 04:12:00 try different usb port on the machine? maybe it got fried Apr 01 04:12:21 that happened to my linux box :/ Apr 01 04:12:23 Yeah, one computer and one hardware board (IOIO) that I use frequently with it. Apr 01 04:12:40 It charges, it just doesn't connect USB debugging. Let me try pulling the battery. Apr 01 04:14:23 Pulling the battery didn't work. :( Apr 01 04:23:41 Xonk, tried turning USB debugging on and off a few time sin the dev settings? Apr 01 04:23:53 i used to have to do that somethimes Apr 01 04:24:45 Yeah. Many times. I've tried plugging in the cable, turning on the phone and enabling that checkbox in every order I can think of. Apr 01 04:25:00 I'm wondering if maybe I damaged the data pins on the USB port. Apr 01 04:31:21 Xonk: even if usb debuging is off, it should show up as an mtp or mass-storage device Apr 01 04:31:30 something should be visible Apr 01 04:31:38 Good point. I'm not even getting that. Apr 01 04:31:42 It does charge though Apr 01 04:31:52 data pins, or the usb controller/driver Apr 01 04:32:02 try another cable Apr 01 04:32:11 Yep. I've tried 3. Apr 01 04:32:23 flash light time, inspect that port! Apr 01 04:41:10 No go. It looked ok, but I was able to wipe a little dust off with my tshirt. I sprayed it out with compressed air afterward, but it still won't connect Apr 01 04:44:58 clever, what did you mean by the usb controller/driver? Are you talking about on my computer or something on the phone? Apr 01 04:46:09 either could be the problem, but the connector itself is the most likely one Apr 01 04:52:39 Well, that stinks. Thankfully this is an old LG Optimus and I can get a replacement on Ebay for $30. :-) Thanks for the help. Apr 01 05:26:55 Do I have to declare fragment activities in the manifest? Apr 01 05:47:51 (rsilves) Hi everyone. Does anyone know which of the TitaniumBackup files contain the Android ID? Thanks. Apr 01 05:50:04 "Android ID" ? Apr 01 05:50:32 he's gone anyway :P Apr 01 05:52:04 sighs .... now I'll never know :( Apr 01 05:52:38 it's an ID android devices have that's "not guaranteed to be unique" Apr 01 05:53:14 is there a way to properly shutdown android from a shell? Apr 01 05:54:20 halt? poweroff? Apr 01 05:54:39 yeah, properly Apr 01 05:54:47 halt just stops, uncleanly Apr 01 05:54:55 ah - stackoverflow and google ftw Apr 01 05:56:02 bankai_: havent tried poweroff yet Apr 01 05:56:11 agy2154: yes Apr 01 05:56:52 why do you assume 'halt' is unclean ? Apr 01 05:57:19 evanc, I actually think you don't is this incorrect: http://stackoverflow.com/questions/9390752/android-do-you-ever-have-to-add-fragments-to-the-manifest ? Apr 01 05:58:03 bankai_: it stopped way too quickly Apr 01 06:01:02 bankai_: same for power off, it just instantly shut off Apr 01 06:03:20 agy2154: er, you asked about fragmentactivity, not fragment Apr 01 06:03:33 no, you don't have to add fragments to the manifest. Yes, you have to add FragmentActivitys Apr 01 06:03:49 evanc, ahh. I appologize. Thanks. I'll add it Apr 01 06:09:17 do any of you know much about codeaurora.org msm project? Apr 01 06:09:41 do any of you use it? Apr 01 06:13:11 never heard of it, looks OT for this channel Apr 01 06:13:54 ashes: which msm repo? Apr 01 06:15:00 SnowLeopardJB: Android for MSM Apr 01 06:16:01 CM doesn't do MHL for my phone, claiming it is proprietary and undocumented. so i am trying to get it working outside of the rom that came with my phone Apr 01 06:16:17 i have a t989d Apr 01 06:16:21 samsung Apr 01 06:17:59 i really want MHL. i noticed differences between the stock rom's config.gz and CM's config.gz. the stock rom has more config options, which says it was patched Apr 01 06:18:13 the differences lead me to codeaurora.org Apr 01 06:19:58 ashes: wrong channel Apr 01 06:20:24 I would suspect it would be very hard to do, as it is most likely a driver built into your stock kernel with a proprietary chip. I am not a kernel guy myself, but from my best guess, that would require lots of code to be rewritten to support an aosp rom. Apr 01 06:21:15 legally they can't modify gpl code and not provide their copy of it Apr 01 06:21:20 yet, they do Apr 01 06:21:56 plenty of devices use binary blobs Apr 01 06:22:09 its lame and makes things a pain but its not uncommon Apr 01 06:22:34 the only way they can ship a blob as closed source is if the entire module/library is new code Apr 01 06:22:41 They release kernel source, but that doesn't mean it is supported in aosp android. Apr 01 06:24:49 god night Apr 01 06:57:03 I have a WebView in my app. The page it is loading must be able to make a call to the underlying app via javascript. This turned out to be pretty simple to do, for the most part, but when I tested it on the gingerbread emulator, it exited with something like an "unknown JNObject" error. IS this a known bug and is there an easy workaround? Apr 01 08:15:12 is there a way to tell which resource files (png) your project is using and which ones not ? Apr 01 08:15:47 perhaps a magical delete all resources not used by this project ? Apr 01 08:22:14 mobydev: i thought lint mentioned unused resources Apr 01 08:29:14 ah yes, it does. thanks Apr 01 08:35:45 What time does the console usually update in google to see the previous days stats? Apr 01 08:50:55 I want to create an app that has 5 WebViews in it. Each one is full screen. When the user clicks one of 5 buttons, the appropriate WebView should become visible and the others become invisible. How can I make such an app? Apr 01 09:06:42 i really hope the S4 will get that IR remote control feature Apr 01 09:07:21 so if I'm restricting Otto to use the Main thread, then I call bus.post from a different thread, what happens? Apr 01 09:08:09 williehurl9: why do you need 5 web views? Apr 01 09:08:33 williehurl9: do you really have to create 5 and make 4 invisible, instead of replacing the URL? Apr 01 09:10:26 monsti: yes...client wants all of the page contents loaded at app startup. each page's content is pretty small, so memory shouldn't be an issue. Apr 01 09:11:18 storkme, it crashes Apr 01 09:11:30 ah, okay. Apr 01 09:12:48 I swear there was a video link on their website but it seems to have disappeared now.. Apr 01 09:12:52 williehurl9: well - checkup the View class, there is a setVisibility method Apr 01 09:17:16 monsti: I saw that earlier and it looks promising. What I'm wondering is what is the best way to manage those views? Should I put them into a ViewPager (which seems like it will take a fair bit of time to figure out how to use)? Or can I simply put 5 WebViews in my layout xml file and control their visibility in the Activity java file? Apr 01 09:18:02 any view container relativelayout, linearlayout... Apr 01 09:18:28 plase note - i have no idea - if the webview will keep the content when it's invisible or if android kicks it out Apr 01 09:19:02 either way is possible Apr 01 09:19:30 why not just have one webview where the user swipes content :| Apr 01 09:19:54 in fact, why have an app at all :) Apr 01 09:19:56 g00s: well that was my first question ;) Apr 01 09:20:06 "foo bar cache speed more foo" was the answer xDDD Apr 01 09:21:23 williehurl9: make a zip file on your webpage, download this once, test every startup (e.g. via cookie or tracing id) if the content has canced - if not show your html foo from that zip file Apr 01 09:23:20 monsti: that's a good point about whether or not android dumps content when not visible Apr 01 09:24:08 well4 Apr 01 09:24:29 that's a tutorial question you can use to enhance your android skills Apr 01 09:24:36 and you can find this out in 30 seconds Apr 01 09:25:12 make your views visible with a button - and check your apache/iis log file Apr 01 09:33:52 hi. how can i make a customer feel safe about his GPS coordinates are not stolen if i make a free ad-based app ? Apr 01 09:34:23 what would be the best way? Apr 01 09:34:27 ok, thanks for your input everyone. It looks like I don't necessarily need to use the ViewPager (which is good news for now): I should be able to use a regular layout manager and play around with the setVisiblity method to get the desired page to display. Apr 01 09:37:11 superlinux-hp: EULA Apr 01 09:37:49 g00s, what do you mean by EULA? the license? Apr 01 09:38:01 yeah, the privacy statement Apr 01 09:38:17 na!na!na! not a solution! Apr 01 09:38:28 i live outside the USA Apr 01 09:38:51 i want a practical solution Apr 01 09:39:01 why isn't it a solution? tell users how you use their data Apr 01 09:41:39 g00s, it's a matter of trust you know? if you show them what is being transferred in an Internet tapping would be better Apr 01 09:42:23 superlinux-hp: i dont understand, what is an Internet tapping? Apr 01 09:42:53 i mean tap the network device, wifi and 3g Apr 01 09:56:41 i have a puzzlegame running in a custom view, updating the canvas when necessary. How could I implement a seconds-counter efficiently? Apr 01 09:57:21 xorgate: put the custom view in a relative view Apr 01 09:57:27 xorgate: create a timer Apr 01 09:58:17 monsti timer being? Apr 01 09:58:40 Timer = java class Apr 01 09:58:56 it ticks every n milliseconds Apr 01 09:59:19 ah i see cool Apr 01 09:59:23 you get a callback and then you can draw or update the text Apr 01 09:59:45 you can also use your draw loop to check if 1 second passed Apr 01 10:00:29 yeah that's the problem since if the user does nothing, i don't update Apr 01 10:00:36 i think Timer will get me pretty far, thanks Apr 01 10:00:52 there is System.currentTimeMillis or System.nanoTime Apr 01 10:01:08 Just use View#postDelayed Apr 01 10:01:11 keep invalidating Apr 01 10:01:12 ^_^ Apr 01 10:01:37 if(abs(lastTimerEvent-currentTime) > one_second ) updateText() Apr 01 10:02:23 i think those approaches allow for a certain time to be shown quite longer/shorter than 1 second Apr 01 10:03:04 well in the end it's lastTime - currentTime ;) Apr 01 10:03:38 which is 99.99999999% all issues you have to solve in terms of game logics Apr 01 10:04:29 easiest would be to always invalidate, and calc passed time Apr 01 10:04:34 but that would be a waste Apr 01 10:04:50 the onDraw() get's called Apr 01 10:05:26 there are nice books on game development Apr 01 10:05:38 and there is the default gaming loop Apr 01 10:05:39 my game just got a really nice post on reddit, good for morale :) Apr 01 10:05:50 monsti it's not like that in my case Apr 01 10:06:14 while(true) update(); :) Apr 01 10:17:57 anyone ever manage to work out how to change the text on an overflow menu to be white? mine is always black no matter what http://stackoverflow.com/questions/14207596/how-to-set-text-color-on-abs-overflow-menu Apr 01 10:22:37 What's your parent Theme? Apr 01 10:23:08 Theme.Gaz Apr 01 10:23:11 .gaz Apr 01 10:23:42 And that inherits from...? Apr 01 10:23:53 heme.Sherlock.Light Apr 01 10:24:13 That's probably why. Light Theme has black text iirc. Apr 01 10:24:28 Try the Dark theme, just to see if that changes it. Apr 01 10:24:31 yeh ive sat and tweaked for long time Apr 01 10:24:34 ill try that again now Apr 01 10:24:57 That's why there's a Light.DarkActionBar theme Apr 01 10:25:00 ah Dark doesnt exist it says Apr 01 10:25:30 Next time, provide some more information in your stackoverflow posts Apr 01 10:25:37 A picture is just useless Apr 01 10:25:38 how do i reference them again, these styles? Apr 01 10:26:27 abs still confuses me and ive used it in the last 5 apps lol Apr 01 10:26:57 You seem to be using 4.1.0, right? Otherwise there wouldn't be an Overflow menu on 2.3 Apr 01 10:27:08 think i forced that Apr 01 10:27:11 some time ago Apr 01 10:27:16 im testign on nexus one 2.3.6 Apr 01 10:28:04 You just told us what Sherlock theme you use, just set it to DarkActionBar there, like SimonVT suggested. Apr 01 10:28:05 i should be able to access Theme.Sherlock.Dark shouldnt i? ABS is a lib project in my properties etc Apr 01 10:28:25 The dark theme is just Theme.Sherlock Apr 01 10:28:35 ahh Apr 01 10:28:40 trying, i must have tried this tho Apr 01 10:28:46 Or if you're using Light atm Theme.Sherlock.Light.DarkActionBar Apr 01 10:28:49 (just like the native api) Apr 01 10:29:36 Worries me that you used it in 5 projects already but never made it to the "Theming" part of the ABS website :\ Apr 01 10:29:46 hey yeh, it works, wtf Apr 01 10:29:49 lol! thanks Apr 01 10:30:42 Please answer your own SO question and mark it as resolved if possible. Or edit it and wirte a bold "UPDATE", in case others need it too. Apr 01 10:30:51 good call Apr 01 10:33:45 hmm Apr 01 10:33:49 SO is a pain Apr 01 10:38:17 Hey guys, my lead developer had something come up. I've got a major deadline - is it OK to solicit someone for android work here? Apr 01 10:38:47 my deadline is in 4 hours Apr 01 10:39:07 Nope Apr 01 10:39:20 "No advertising please, jobs or otherwise" Apr 01 10:39:22 jonfrendl: sounds painful. best of luck. Apr 01 10:39:37 sorry to bother you - any tips where to look? Apr 01 10:40:55 id normally be interested Apr 01 10:41:01 but i got silly deadline here too Apr 01 10:41:22 i'd normally be interested but my silly deadline finished last night Apr 01 10:41:29 :D Apr 01 10:41:53 i can barely follow the spec of this app which is genuinely the main problem Apr 01 10:43:32 jonfrendl - u could try people per hour Apr 01 10:43:44 jonfrendl peopleperhour.com, but getting them within 4 hrs might be tough Apr 01 10:44:01 got it - thank you Gaz Apr 01 10:55:21 for a service that needs network to do it's thing. should i use an alarm receiver or NetworkConnectivityListener with a handler? Apr 01 10:57:54 surely that depends on requirements and operation/design Apr 01 10:59:10 ahmm.. i have directories of layout based on size. can i have based of screen. can i have based on side of screen and of language? Apr 01 10:59:21 something like layout-large-iw ? Apr 01 10:59:39 StingRay_: it's a task execution service. it needs network to send some stuff to the backend and it should do it hopefully as soon as it possibly can. Apr 01 11:00:43 StingRay_: i'm thinking let the OS manage their lifecycle and when they're destroyed create an alarm that restarts them if needed ? Apr 01 11:01:13 sounds ok Apr 01 11:01:20 StingRay_: what would be better? Apr 01 11:01:23 I do file uploader Apr 01 11:01:28 that is backgrounded Apr 01 11:01:33 yeah, one of the services is a file uploader Apr 01 11:01:38 and has a task list Apr 01 11:01:47 with priorites and fail counts Apr 01 11:01:57 how do you manage connectivity? Apr 01 11:02:19 only after x fails due to connection and only if user has it on Apr 01 11:02:49 hm.. Apr 01 11:02:55 after x fails and no connection I sit the task there, I maybe should set an alarm for checking net con Apr 01 11:03:13 but 99% the user will have a data connection Apr 01 11:03:21 I should think about it more actually Apr 01 11:03:23 :) Apr 01 11:03:30 so ConnectivityManager info is fairly reliable? Apr 01 11:03:54 well for me testing gprs and up and if wifi is on yeah Apr 01 11:04:24 StingRay_: i'm thinking execute tasks while have network. if no network, register handler for network change. onDestroy set retry in 5 minutes Apr 01 11:05:25 maybe, my actions list/que gets checked on app activity, not really implemented a sched. yet Apr 01 11:05:38 not been needed in my usage Apr 01 11:05:42 i'm going to implement that and see how it holds up Apr 01 11:05:43 prob. will have to though Apr 01 11:07:09 bah i wish util.Log had a Log.leve(TAG, format, args..) Apr 01 11:07:39 do your own wrapper Apr 01 11:07:44 thats what I done Apr 01 11:07:52 yeah checking if there's a library Apr 01 11:08:03 so that I can log my custom object info too Apr 01 11:09:01 also created a few more annotations for major logs like lifecycle stuff which helps Apr 01 11:09:07 cause I hate reading logs Apr 01 11:09:09 :) Apr 01 11:09:54 i think i just need a simple wrapper that has a different log level in release builds, and built-in string.format and maybe a builder ? Apr 01 11:10:49 ah changing that theme had vast knock on effects in each screen, changing default colours, thats why i specifically want to know how to adjust only the text in that menu ;/ Apr 01 11:11:13 in a popup or a context menu? Apr 01 11:11:25 afaik you can't change a text for one item Apr 01 11:11:25 the overflow menu in an actionbar Apr 01 11:11:40 yeah you're going to have to make a new theme Apr 01 11:11:43 you can change that globally Apr 01 11:11:44 Gaz`: Try Light.DarkActionBar Apr 01 11:11:54 Since you used Light before. Apr 01 11:11:59 but not for a single item Apr 01 11:12:20 trying Apr 01 11:13:51 * P3nnyw1se slaps StingRay_ around a bit with a large trout Apr 01 11:14:23 sort of works kakazza, but now its stop using my own coloured images for the menu background Apr 01 11:14:49 this styling stuff is stupidly complex for what it needs to be imho Apr 01 11:14:50 http://i.imgur.com/AKmYgMm.png Apr 01 11:14:51 StingRay if I'm suppose to do what you told me last night, I need motivation, docs wont give that, so do you maybe know some great exercises ? Apr 01 11:15:25 I know one good way Apr 01 11:15:27 http://i.imgur.com/AKmYgMm.png How can i put the pictures so when orientation changes coins be put at right? Apr 01 11:15:41 pick something you really dont want to do and do it, tis called will power :) Apr 01 11:15:46 start small Apr 01 11:15:52 work your way to big things Apr 01 11:16:18 Parhs: do a layout for it Apr 01 11:16:28 yeah well ;) realisticly.. I can't keep doing stuff I really dont wanna do.. Apr 01 11:16:28 in layout-land Apr 01 11:16:30 maybe you can.. I can't ;) Apr 01 11:16:42 I needed exercises.. challenges Apr 01 11:16:47 not just endless pages of reading and understanding Apr 01 11:16:57 P3nnyw1se: not that you "cant" it's that you wont Apr 01 11:17:16 you should know there is a difference Apr 01 11:17:42 Not always.. I'm talking weeks ahead here Apr 01 11:17:53 its like jogging.. its good for you.. do you wanna do it sunday morning though =? Apr 01 11:17:57 no .. you dont.. Apr 01 11:17:58 :) Apr 01 11:18:06 and thats a choice Apr 01 11:18:11 not that you cant Apr 01 11:18:14 that you wont Apr 01 11:18:14 well I'm realistic about my own capacity Apr 01 11:18:29 come on exercises can't be a bad idea :P Apr 01 11:18:50 that a preconception and predetermination, neither of which are absolutes Apr 01 11:18:58 neways I aint a life coach :) Apr 01 11:19:08 you sure as hell were last night ;) Apr 01 11:19:40 we each see different things while observiing the same ;) Apr 01 11:19:57 is English your native tongue? Apr 01 11:20:12 yes Apr 01 11:20:35 * StingRay_ Apr 01 11:20:38 what's the best way to detect a "real" longCLICK (i.e., touch, hold a while _and_ release)? Currently, I'm using OnLongClickListener to detect the long press and OnTouchListener to detect the release. Is there a better method? Apr 01 11:20:41 It isn't to me...In light of that we should soon stop this pseudo-intellectual way of saying things.. Apr 01 11:20:43 :P Apr 01 11:20:52 StingRay_ what kind of layout ? Apr 01 11:21:03 Parhs: a layout that does what you want Apr 01 11:21:11 doesn't matter Parhs Apr 01 11:21:22 if you make the folder layout-land .. everytime your device goes in land orientation Apr 01 11:21:25 it will look in that folder Apr 01 11:22:16 such an absurd error.. everytime after reboot I start up my virtual device, it doesn't register in Eclipse Apr 01 11:22:23 and I have to close it and open it again.. anyone ever tried this ? Apr 01 11:26:00 Hello, pls can anyone tell me about the API behind whatsapp so I can use my custom php code to interface it? Apr 01 11:26:34 whatsApp have an api ? Apr 01 11:28:44 it's a modified XMPP, afidegnum Apr 01 11:28:54 there are open source libraries and clients out there Apr 01 11:29:10 whether they fully work with the current API, i don't know Apr 01 11:29:15 i know they work to an extent though Apr 01 11:30:02 they call it funXMPP Apr 01 11:30:23 angelsl: I am still searching for it but can't find anything in particular related to it. there was a reversed engineer api but I am told whatsapp overturned it, it can't be used. so I am looking for a different method or if there is a new gateway entry? Apr 01 11:30:23 nice https://www.google.com/intl/en/landing/nose/ Apr 01 11:31:16 afidegnum: whatsAPI? Apr 01 11:31:49 yes, I believe, there is also a module in drupal CMS which worked but I am told are not more working Apr 01 11:31:53 anyone could tell me how i could do this situation best? my app got a sound that it shipped with, now i want to make this sound chooseable in a settings dialog! but if i use a ringtone preference i cant set the default sound to my sound! its always point to the system default Apr 01 11:31:54 yowsup? Apr 01 11:32:10 specially users registering with imei and mac address Apr 01 11:32:30 imei for android! mac on iOS Apr 01 11:32:41 yes Apr 01 11:32:52 i'm pretty sure it's still the same Apr 01 11:32:55 mac is easier to get ;P Apr 01 11:36:32 euh.... is this different from teh web gateway? Apr 01 11:37:27 ...humm.... why must the emulators be so sloooooow Apr 01 11:39:03 Because it emulates Apr 01 11:41:24 SimonVT, normally i use one of my 4 develop devices Apr 01 11:41:36 but now i had to optimize the layouts for hdpi Apr 01 11:42:22 the extrem small displays 480x640 Apr 01 11:43:37 Resolution has nothing to do with how large a screen is Apr 01 11:46:18 do you know how to set the default tone in a ringtone preference to a sound in my resources not the system default? Apr 01 11:47:22 SimonVT, its a 3,1" display with resolution of 480x640 Apr 01 11:47:34 so it uses hdpi!? Apr 01 11:48:22 That doesn't really matter when creating layouts Apr 01 11:48:28 It matters when creating drawables Apr 01 11:50:05 but if i have maybe a mainmenu that doesnt fit on these displays correctly Apr 01 11:50:21 so i for example add to the small layout a scrollview Apr 01 11:50:29 or isnt this the correct way Apr 01 11:50:36 just for example Apr 01 11:51:09 i made in my app a tablet layout that fits best on tablets in landscape mode, with different positioning of the buttons etc Apr 01 11:51:15 that works perfect Apr 01 11:51:17 you dont need the density for that Apr 01 11:52:03 I have 5 buttons in a horizontal Linear Layout (I want them to be all along the bottom of the app). But the don't stretch to fill the width of the screen. I have their layout_width set to wrap_content. What am I doing wrong? Apr 01 11:52:32 hmm i put the different layout (with the same name) in folder layout-sw600dp and layout-sw720dp Apr 01 11:52:48 dgPodcats is released, the premier pod cats downloader Apr 01 11:53:39 when did the standard drawable folders go from 3 to 4 ? Apr 01 11:53:46 I keep running into tutorials talking about 3 folders Apr 01 11:53:59 P3nnyw1se: can have 1 if you want Apr 01 11:54:01 SimonVT, so what should i do in the correct way to support those small displays? no different layout in layout-hdpi? Apr 01 11:54:16 williehurl9, pastebin your layout Apr 01 11:54:18 P3nnyw1se: or you can have as many as there are qualifier combos Apr 01 11:54:25 so probably 20+ Apr 01 11:54:28 :) Apr 01 11:55:14 I meant like Apr 01 11:55:25 the standard creation.. or is that just eclipse deciding Apr 01 11:55:45 i think it's pretty rare to have different layouts in density buckets Apr 01 11:55:49 it's called a preset Apr 01 11:56:11 yeah ok.. I guess I had assumed that it was common like that Apr 01 11:56:13 mikedg, how could i do this then? Apr 01 11:56:36 isn't there layout-small? Apr 01 11:56:43 nope Apr 01 11:56:48 yes Apr 01 11:56:53 I have . layout-hdpi, ldpi, mdpi and xhdpi Apr 01 11:57:02 but I guess that just translates to small, medium, large, xlarge Apr 01 11:57:05 in DPI matters Apr 01 11:57:15 so mikedg i should better use layout-small large ...? Apr 01 11:57:25 oh sorry Apr 01 11:57:28 drawable ofc Apr 01 11:57:28 yes there is, -small, normal, large, -xlarge Apr 01 11:57:29 not layout Apr 01 11:57:33 ok i cant try, if the emulator comes up today Apr 01 11:57:38 -t Apr 01 11:57:55 people using density buckets for screen sizes just goes back to the android 1.x days Apr 01 11:58:08 when there were like 3 devices and hdpi devices happened to have large screens Apr 01 11:58:24 and ldpi devices happened to have 2 inch screens Apr 01 11:58:36 Stingray. so when I find guides that go 'put this xml in your drawable folder' .. how should I treat that with my 4 folders? .. I understand that you make images in different resolutions and add to each their own folder Apr 01 11:58:40 but what about xml files? Apr 01 11:58:41 ok i understand the problem, but does layout-small resolves this? Apr 01 11:58:44 it wa sa bad practice then, worse now Apr 01 11:58:52 ninharp: what's your ultimate problem? Apr 01 11:59:10 i came in the middle of this Apr 01 11:59:57 mikedg, i want the best way to support such small devices like motorola pro+ or something similar Apr 01 12:00:13 so i try with layout-small first Apr 01 12:00:27 mikedg, the other problem is the ringtonepreference ... Apr 01 12:00:57 how to set the default tone in a ringtone preference to a sound in my resources and not the system default? Apr 01 12:01:11 so that device is borderline small-normal Apr 01 12:01:19 you need to actually see what it classifies itself as Apr 01 12:01:28 hello, does anyone know what's the best looking 3d game for Android at the moment? Apr 01 12:02:47 selector, seems basic and seems like something I should learn about Apr 01 12:02:49 gonna pick that subject Apr 01 12:04:21 whenever a guide goes 'create a new XML file in res/drawable/ folder' I'm a little confused Apr 01 12:04:35 I understand as much as the different drawable folders are for different scaling and resolution of images Apr 01 12:04:37 but what about xml files? Apr 01 12:05:26 P3nnyw1se: xml files are typicallyd ensisty independent Apr 01 12:05:41 if you really needed one for each density, you would probably know of it Apr 01 12:06:15 yeah I didn't expect I would Apr 01 12:06:20 I was just curious about placing it.. Apr 01 12:06:39 I realise it probably doesn't matter if its in MHDI or XHDPI .. just thought Apr 01 12:06:43 maybe there was a 'standard solution' ;) Apr 01 12:06:46 just put it in drawable Apr 01 12:06:59 alright I dont have that :) but I guess you are saying create the folder Apr 01 12:07:00 you'll confuse the shit out of anyone else if they see it in xhdpi Apr 01 12:07:04 yes, create it Apr 01 12:07:12 unless you have read + designed + though + understand the docs on screen layouts and density, just put it in drawables Apr 01 12:07:19 thought* Apr 01 12:07:43 ok just trying to get some stuff straight :) Apr 01 12:09:38 honest, the docs will cover it quicker than asking everything in here Apr 01 12:21:17 yeah the docs are good Apr 01 12:21:24 when in doubt, stare at the docs Apr 01 12:38:53 I have 5 Views in my app. I want them all to be nearly fullscreen and I will show 1 at a time and hide the other 4 while the one is showing. I'm using a LinearLayout but it won't let me make them all fullscreen. How do I do this? Apr 01 12:40:56 sure it does Apr 01 12:41:05 make them all 5 machtparent Apr 01 12:41:09 add an id Apr 01 12:41:19 and read in View about the visibility method Apr 01 12:41:34 also try to find out what View.VISIBLE, INVISIBLE, GONE means Apr 01 12:41:50 or - as mentioned before Apr 01 12:41:54 use a relative layout Apr 01 12:42:10 monsti: OK, I've got visibility working the way I want. It's just their size that is off. So, do I set both height and width to match_parent? Apr 01 12:42:28 and the 3 other things i wrote... Apr 01 12:44:37 there's better choices than a linearlayout Apr 01 12:45:01 there is a better choice than create 4 extra webviews... Apr 01 12:46:25 williehurl9: try FrameLayout Apr 01 12:46:57 or show a picture of what's wrong Apr 01 12:51:24 hmm.. none of the facebook sdk examples are logging in Apr 01 12:51:50 oh, I have to add my key Apr 01 12:54:33 ARGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH Apr 01 12:54:38 sorry wrong channel.. lol Apr 01 12:56:29 just found out i cant goto I/O Apr 01 12:56:35 does anyone here want to buy my ticket? Apr 01 12:56:54 wish I could go, I would Apr 01 12:57:57 mikedg, why? Apr 01 12:58:28 mikedg: such a troll. Apr 01 12:58:33 i took a job with Apple, certain conferences are on their black list Apr 01 12:58:50 * michaelnovakjr_ ignores mikedg today more than ever. Apr 01 12:59:01 lol Apr 01 12:59:15 today is just about the only time the rest of the internet is worse than i am Apr 01 12:59:27 You know what would be the best mikedg troll.. If he didn't troll at all today Apr 01 12:59:34 SimonVT++ Apr 01 12:59:39 that's clever. Apr 01 12:59:40 That would really fuck up our minds Apr 01 12:59:54 hi Apr 01 13:00:05 irc clients should render html Apr 01 13:00:19 It's not a funny april fools joke if it's not a joke, mikedg :/ Apr 01 13:00:19 yeah, good idea Apr 01 13:00:34 also javascript Apr 01 13:00:39 that's what makes it better Apr 01 13:00:47 everyone assumes it's fake but it's real Apr 01 13:02:08 mikedg, ohh shit... damn apple is hard on their employees. I was trying to get technical with someone at the apple store and hetold me "I can't talk about that" as if he was being held hostage Anyways gtg eat. Brb Apr 01 13:02:16 I love apple though btw Apr 01 13:03:09 hi guys, i'm having a serious issue in creating multi-pane layout with an action bar for android 4.0. It's kind of messy for me, cause i couldn't find a good tutorial about the best practices currently for this situation. All the tutorials I've searched for don't include action bar. So can you point me to a place where I can find a solution ? p.s. i can go into details if is needed. Sry if my English is not too good Apr 01 13:06:23 hello there, how to make a GUI for android Apr 01 13:06:37 with eclipse Apr 01 13:06:56 hi, yup am using adt Apr 01 13:09:48 HerbertWest, d.android.com/training Apr 01 13:10:04 Hey Guys, Apr 01 13:10:24 I'm planning on using ECB for sending small auth tokens to the server Apr 01 13:10:35 sonOfRa monsti FYI TY Apr 01 13:11:12 this btw is just a JSONObject having few keys 1kb at max Apr 01 13:11:22 Getting my debug hash with keytool only returns "WA==" any ideas? Apr 01 13:12:24 brickhead: i use spring framework an the resttemplate Apr 01 13:12:52 how to show PopupWindow from broadcast receiver ? Apr 01 13:13:33 nevermind, I deleted it and regenerated from scratch and it's fine now. Apr 01 13:13:36 aagam94: is you're activity implementing this broadcast receiver ? Apr 01 13:14:05 yes Apr 01 13:14:32 basicall i want to show the popup from thehomescreen Apr 01 13:15:03 aagam94: i don't get it Apr 01 13:15:07 got two questions: (1) is it a good idea to call the Android's Gallery application to show the images in a gallery-like way? Or should I implement one by myself replicating all the options, like share, set image as... etc? (2) can I call the Android's Gallery using a set of URLs instead of bitmaps? Thanks Apr 01 13:15:18 you want to show a popup when something happenes? Apr 01 13:15:22 michaelnovakjr: what podcats do you listen to? Apr 01 13:16:10 elegos: i didn't find 100% ways to use the galery display stuff from an url or contentprovider Apr 01 13:16:12 I want to show Popupwindow when I receive a message Apr 01 13:16:20 monsti, brickhead Apr 01 13:16:28 mikedg: just started searching for ones. I haven't listened to podcasts in a few years. Apr 01 13:16:29 elegos: whatever method you decide on, don't forget that gallery is often replaced with total shit Apr 01 13:16:29 elegos: this works in 4.1 and 4.2 but not with 4.0 and gif/bmp Apr 01 13:16:51 elegos: in the end i decided to create a temp dir an put all files in there Apr 01 13:16:56 mikedg: that's the problem I was suspecting. W Nexus phones, sadly :P Apr 01 13:16:58 michaelnovakjr: ahh me neither, I just bought pocketcats a few weeks ago, I forget why, was very impressed with it Apr 01 13:16:59 mikedg: yeah :) Apr 01 13:17:15 monsti: yep, that was the other possibility (not a problem though) Apr 01 13:17:30 elegos: a gallery control is a big issue Apr 01 13:17:42 mikedg: it is ok. it appears to be better than the others out there. Apr 01 13:17:43 so in the end is better to re-implement all the things... so sad Apr 01 13:17:47 elegos: e.g. i have 8mp images - so there is no way to handle them in my app Apr 01 13:17:50 I want to show Popupwindow when I receive a message in Broadcast receiver... Apr 01 13:17:54 aagam94: If the onRecieve has access to activity instance then what is the problem? Apr 01 13:18:13 elegos: i came along with a lot of hacks e.g. content providers for html and hocking the images in a html page Apr 01 13:18:34 brickhead, Yes..let me check Apr 01 13:18:35 monsti: well, images are gonna be more or less as large as max(height, width) of the device Apr 01 13:19:00 elegos: well - it a viewpager is an option, try that instead Apr 01 13:19:26 monsti: my idea is to grab images from the web in sets (for a blog's app project) and to let the user decide whether to share the image, set it as wallpaper etc Apr 01 13:19:58 elegos: ok so loading the images in a thread would be nice Apr 01 13:20:34 monsti: yep, I already do that for caching Apr 01 13:20:50 monsti: so you suggest me to create a new gallery activity or something? Apr 01 13:21:20 elegos: yeah i have that very very simple - a scrollview with a linear layout Apr 01 13:21:30 and inside i put imageviews Apr 01 13:21:47 I love so much the default gallery :S Apr 01 13:21:55 damn customisations! Apr 01 13:22:05 Fuck Eclipse Apr 01 13:22:14 How come everything is red now? Apr 01 13:22:21 guys any thoughts about my question ? Apr 01 13:22:36 Everything was working perfectly untill I saved my project. Apr 01 13:22:37 agy2154: i think you found "lint" ;) Apr 01 13:22:59 google in their great wisdom decided to add some "click game" to the 21.0.0 version of adt Apr 01 13:23:35 I'm trying to calm down right now. Please don't tell me this is another April fools joke by Google. Apr 01 13:24:05 no google is very serious on stuff in xml, that they consider an error Apr 01 13:24:13 you probably accidentally hit lint and eclipse blew up Apr 01 13:24:26 Should I reboot? Apr 01 13:24:28 restart eclipse, clean the project, throw the computer out of the window Apr 01 13:24:35 sonOfRa: ;) that was also my idea Apr 01 13:24:38 I did restart eclipse. Apr 01 13:25:05 Project -> Clean Apr 01 13:25:26 Got even more errors Apr 01 13:25:31 I'm not joking Apr 01 13:26:21 And since when did I have to import R? Apr 01 13:27:29 you don't. Apr 01 13:27:35 remove the import, clean project again Apr 01 13:27:36 always Apr 01 13:27:56 when I import a picture what does my project use the 'extra' one it creates for? Apr 01 13:28:01 the image-web.png Apr 01 13:28:05 in the main folder Apr 01 13:28:29 I have no idea what you are talking about Apr 01 13:28:39 when I use an imageButton e.g. Apr 01 13:28:46 and I wanna import my own picture as an Icon Apr 01 13:28:57 ._. Apr 01 13:29:01 just copy the png over christ Apr 01 13:29:03 I import my ugly drawing.. and its nicely placed in mdhpi, xdphi Apr 01 13:29:12 why would I not use the designed tool for it ? Apr 01 13:29:16 that auto scales for each folder Apr 01 13:29:26 because I'm ASSUMING you're using the tool that creates an app icon for you, not just importing image resources. Apr 01 13:29:35 hence the image-web which I assume is for Play Apr 01 13:29:46 i feel old, all these new people look like 15 year olds Apr 01 13:30:06 also, I have no idea how you're 'importing' since there's nothing for graphics in file -> import Apr 01 13:30:06 I'm using the 'create new Icon' Apr 01 13:30:13 create Asset Set Apr 01 13:30:21 "Create an Android icon set" Apr 01 13:30:33 which appears to have options for: Launcher Icons, Action Bar and Tab Icons, Notification Icons, etc. Apr 01 13:30:37 not for generic images. Apr 01 13:30:45 yes ? Apr 01 13:30:51 sorry reading back.. I wrote generic image Apr 01 13:30:52 where ? Apr 01 13:31:10 consequrently you may not wish to use this tool for regular images that you're not going to be making as application icons or notifications, etc?> Apr 01 13:31:12 P3nnyw1se: are you a clown? Apr 01 13:31:23 I mean hey do whatever makes you happy, but this is why this is happening. Apr 01 13:31:36 I was trying to import a icon Apr 01 13:31:40 using.. the 'import icon' Apr 01 13:31:42 to my app Apr 01 13:31:43 jesus christ Apr 01 13:31:46 relax Apr 01 13:31:52 are you an icon or an icant? Apr 01 13:31:59 alright sorry my mistake for asking Apr 01 13:32:18 P3nnyw1se: APRIL FOOLS Apr 01 13:33:32 So you guys never use that? Apr 01 13:33:37 You manually scale for several sizes ? Apr 01 13:36:25 Dude Apr 01 13:36:39 Just use resizer Apr 01 13:36:48 http://sourceforge.net/projects/androidresizert/ Apr 01 13:37:11 I dont understand if I wanna import an icon whats wrong with using the tool eclipse provides ? Apr 01 13:37:30 P3nnyw1se, Nothing really. I use it. Apr 01 13:37:37 then.. wtf ? Apr 01 13:37:49 For other images use resizer, Apr 01 13:38:10 I havent done images though I've just done icons granted one of them is an icon on a button Apr 01 13:38:27 brickhead, I tried,but the popup doesnt show Apr 01 13:40:27 http://pastebin.com/Y9sP9kkK popup doesnt show when a message is received ... Apr 01 13:40:56 monsti, brickhead Apr 01 13:41:52 aagam94: dude you MainActivity extends BroadCastReceiver Apr 01 13:42:02 that doesn't make it an activity Apr 01 13:42:35 activity is one which extends android Activity and you tell your manifest about it Apr 01 13:42:48 by default you can't have access to UI from a broadcast receiver Apr 01 13:43:19 In your activity you could probably add a receiver, but I have never tried that Apr 01 13:43:55 brickhead: that is correct Apr 01 13:44:50 aagam94: it's pretty bad practice to randomly have shit popup on the users screen Apr 01 13:45:38 mikedg: I think the only way he could probably do it from background if he manages to launch a new activity, but I'm not sure if that's allowed Apr 01 13:46:02 yeah you would have to launch anew activity with no background Apr 01 13:46:14 but really you shouldnt be doing this unless you have a compelling reason Apr 01 13:46:20 or a real user is never going to see it Apr 01 13:46:33 thats why we have Notifications and if you insist on being terrible, Toasts Apr 01 13:47:10 just display a transparent activity that displays a dialog that finishes when the dialog is dismissed Apr 01 13:47:13 god Apr 01 13:47:20 Terrible Toast is a great name Apr 01 13:47:35 I don't know why you're telling him to do things like "Follow good practices" or "Don't interrupt the user when they're doing stuff" or "Don't be an asshole" Apr 01 13:47:56 i get to tell people not to be an asshole, today is my day! Apr 01 13:48:02 I was born in April Apr 01 13:48:36 when i connect to onError of a VideoView. how do i cause it not to show an alert message of the error message Apr 01 13:54:56 brickhead, But i have another class that externds Activity Apr 01 13:55:43 so can an Activity implement a broadcast receiver? Apr 01 13:55:48 I don't think that would be possible Apr 01 13:56:00 so why don't you raise a localbroadcast from your broadcast receiver Apr 01 13:56:15 if you're activity is alive and on screen it can catch it and do stuff Apr 01 13:56:38 i have made MainActivity as a receiver in manifest Apr 01 13:57:22 try making your MainActivity a child activity of your real activity Apr 01 13:57:43 i have done that only Apr 01 13:58:51 i dont want to open any intent and than show the popup Apr 01 13:59:05 how does your manifest entry looks like Apr 01 13:59:46 aagam94: is your popup only supposed to work when your app is on the screen? Apr 01 14:00:11 brickhead, http://pastebin.com/FfG2rqMW Apr 01 14:00:35 mikedg, no my popup should work when my app is close Apr 01 14:00:43 as it has a broadcast receiver Apr 01 14:00:43 why do you need a popup? Apr 01 14:00:50 why dont you just use a notification Apr 01 14:01:04 I want... :) Apr 01 14:01:26 aagam94: that's a duchebag thing to do Apr 01 14:01:40 I want to punch you in the belly when you ruin my game progress Apr 01 14:01:45 but we all don't get to do what we want Apr 01 14:01:46 you're customers would hate you and probably find you and kill you in your sleep Apr 01 14:02:06 der are many messaging apps that show popup of messages Apr 01 14:02:11 like goSMS Apr 01 14:02:30 goSMS is an abomination Apr 01 14:03:12 how I see a complete stack trace in a google play crash report? Apr 01 14:03:35 (instead of seeing a partial trace that ends in "14 more …") Apr 01 14:03:54 Look above the Caused By line, that's the 14 more Apr 01 14:04:37 Nothing is missing from the stack traces Apr 01 14:04:57 aaah, alright Apr 01 14:04:58 thanks Apr 01 14:05:05 stack traces should blink Apr 01 14:05:07 mikedg, brickhead just see the downloads https://play.google.com/store/apps/details?id=com.jb.gosms&feature=nav_result#?t=W251bGwsMSwxLDMsImNvbS5qYi5nb3NtcyJd Apr 01 14:06:57 Can the fragment activity controll views from the fragment? Apr 01 14:07:19 Or only views in it's own acitivity Apr 01 14:08:59 agy2154: depends how you access it/them Apr 01 14:09:05 brickhead: you can REGISTER broadcast receivers in an activity... This is actually one way to do the "do something in activity if present, otherwise show notification" pattern. Apr 01 14:09:12 mikedg, brickhead any suggestions Apr 01 14:09:14 ?? Apr 01 14:09:15 StingRay_, By their ID? Apr 01 14:09:42 how else ? Apr 01 14:09:46 other than tag Apr 01 14:09:54 or storing the index Apr 01 14:09:55 :) Apr 01 14:10:01 lov: thanks, I had never tried that Apr 01 14:10:08 How can I check from the google console if I have had any in app purchases? Apr 01 14:11:59 Stingray can I have a design opinion from you Apr 01 14:12:42 I have dark/grey buttons that kinda glow white, when they are pressed.. looks nice Apr 01 14:12:56 but this doesn't of course apply to the ViewPager when scrolling through the same fragments the buttons dont show effect Apr 01 14:13:08 would it be strange if I added effects to each case? Apr 01 14:13:19 so it looked like someone was clicking the buttons while scrolling Apr 01 14:13:19 Would they just display in the checkout? Apr 01 14:16:30 P3nnyw1se: any visual feedback to the user has to meet some kind of requirements and be applicable Apr 01 14:16:47 well I keep hearing in class 'always show the user where you are' Apr 01 14:16:52 so a button no, that is not something I would do Apr 01 14:16:58 unless directly pressed Apr 01 14:17:20 a header bar that indicates a change even though not directly influenced ,,, then yes Apr 01 14:17:43 this is an actionbar with 3 buttons each displaying a fragment.. you can also swipe between the fragments Apr 01 14:18:01 hmm Apr 01 14:18:04 then look at viewPageIndicator Apr 01 14:18:50 ahhh Apr 01 14:19:23 hm hehe hope I can change the color of that thing Apr 01 14:19:26 wouldn't fit my design Apr 01 14:19:39 show me your design Apr 01 14:20:01 .... I'm a little reluctant to do that.. youre a pro designer and this is my first app Apr 01 14:20:20 I desgn VFX/Game art etc Apr 01 14:20:30 so tis fine Apr 01 14:20:34 alright gimmi a minute need to upload Apr 01 14:26:53 hey all Apr 01 14:27:09 google just charged me for in-app purchases for an app that wan't even on the store Apr 01 14:27:22 even though the account was using was listed in test accounts Apr 01 14:28:04 Profile: http://oi48.tinypic.com/2f0dobs.jpg Landscape: http://oi46.tinypic.com/2cwnaci.jpg (the white button is how it looks when 'pressed') Apr 01 14:28:13 remember be nice, and the colors are designated by the company Apr 01 14:28:16 StingRay :) Apr 01 14:28:42 company ? Apr 01 14:28:48 this is a commercial job ? Apr 01 14:28:53 no no.. its a study job Apr 01 14:28:58 but with a real partner Apr 01 14:29:01 they know they wont recieve a product Apr 01 14:29:08 you know.. pretend commercial job Apr 01 14:29:16 oh well design of it is not all that great Apr 01 14:29:32 alright inputs please Apr 01 14:29:38 title size Apr 01 14:29:43 very silly Apr 01 14:30:05 ok smaller title.. makes sense, its their logo btw Apr 01 14:30:13 added scrollview so the user wouldn't have to look at it all the time Apr 01 14:30:20 well I would ask for a mobile friendly version Apr 01 14:30:27 and dictate a few rules to them Apr 01 14:30:46 then your scroll will kill a possible branding rule Apr 01 14:30:59 as in name logo 90% + presence in the app Apr 01 14:31:25 yeah I see .. I'm suppose to turn this in on a 10" tablet.. the company would probably perfer it for mobile Apr 01 14:31:29 but they dont grade me Apr 01 14:32:22 a lot smaller logo/title get it Apr 01 14:32:42 their colors are black and orange.. usually their printed papers are with orange lines underneath.. Apr 01 14:32:48 thats kinda why I thought to have that as an actionbar color Apr 01 14:33:43 well when you look at a design like that you look at the other mediums and use of the brand Apr 01 14:33:46 so eg. Apr 01 14:33:53 in print they wont have black paper Apr 01 14:34:03 I dont know if this will influence at all your inputs but.. I should say Apr 01 14:34:13 this is meant for ehm.. what shte English term Apr 01 14:34:19 usage by people working professional with it Apr 01 14:34:27 as a tool.. thats why I'm trying to keep it minimalistic Apr 01 14:34:48 like Imagine the same people using this 20-30 times a week Apr 01 14:34:56 well the only time you really put company branding in the forefront of design is when it's client facing Apr 01 14:35:09 it is client facing Apr 01 14:35:16 buts its as you can probably guess by the title Apr 01 14:35:20 for a rental movie company Apr 01 14:35:25 and its the same guys who rent from them.. Apr 01 14:35:27 same 200-300 guys Apr 01 14:35:30 each week Apr 01 14:35:33 oh ok Apr 01 14:35:38 still Apr 01 14:35:47 look at their print media Apr 01 14:35:52 for inspiration Apr 01 14:36:09 their website (in danish) Apr 01 14:36:09 http://www.filmgear.dk/ Apr 01 14:36:15 I dont think its that pretty but thats just my taste Apr 01 14:36:32 you see Apr 01 14:36:35 the app for me Apr 01 14:36:53 would have to tie to the design/look of the other mediums used for same purpose with same users Apr 01 14:36:57 in this case that site Apr 01 14:37:14 here is a scenario for you Apr 01 14:37:16 I would maybe add a few design choices of my own, but it would not be soo far from Apr 01 14:37:51 guy is working on a film.. middle of the night out in some barn in the country.. and their camera breaks down.. he place and order through the app.. bam.. next day lights go out.. new order through the app Apr 01 14:38:23 its like sending an e-mail for that guy Apr 01 14:38:29 he isn't looking at pictures Apr 01 14:38:37 if that makes sense Apr 01 14:38:50 the use makes sense Apr 01 14:38:58 well the logo is theirs.. the colors are theirs Apr 01 14:39:02 you thinking the buttons Apr 01 14:39:05 you interpretation of it doesn't :) Apr 01 14:39:12 okay Apr 01 14:39:47 they aren't pleased with their webiste btw.. I mean I don't have that much to go from Apr 01 14:39:47 does anyone here know anything about in-app billing? Apr 01 14:39:51 you can't order through the site Apr 01 14:40:34 I get you say I'm way off StingRay.. how would you do a closer approach ? Apr 01 14:41:34 tis about branding Apr 01 14:41:46 and complimentary branding design Apr 01 14:42:00 but not about to start going over the do/donts :) Apr 01 14:42:15 only advice is look at the "brand" Apr 01 14:42:22 but you haven't really told me anything other than 'its not good' ;) Apr 01 14:42:26 brand/style != logo/colors Apr 01 14:43:30 well I will try something different then Apr 01 14:43:38 do it how you want Apr 01 14:43:50 really they should have you working with a designer or to spec Apr 01 14:44:06 unless your on a design/arts course that happens to do programming too Apr 01 14:44:25 yeah well its not supposed to end in a complete app.. I guess thats why I'm not working with a designer Apr 01 14:48:33 anyone here know anything about in-app billing? Apr 01 14:48:46 google just charged me for a bunch of purchases on an app that was still Draft Apr 01 14:48:56 and my e-mail was listed in test accounts Apr 01 14:50:51 matt_j: your not going to get google customer services here ? Apr 01 14:51:12 was that a statement or a question? Apr 01 14:51:22 I'm not looking for a way to get a refund Apr 01 14:51:27 but rather how to avoid this in the future Apr 01 14:52:13 alright so to sum up its not good enough Apr 01 14:52:20 this channel is getting friendlier everyday :) Apr 01 14:52:26 first, are you sure you got charged Apr 01 14:52:29 and it's not just pending Apr 01 14:53:21 No, I was actually charged :( Apr 01 14:55:08 sorry for your loss Apr 01 14:56:23 iOS has a sandbox for this stuff Apr 01 14:58:41 I don't see why a Draft app would charge me Apr 01 15:00:38 did you set up your account correctly for testing? Apr 01 15:00:51 matt_j: because someone could fake your in app purchases if it didnt Apr 01 15:04:24 Hey guys, so I want to make a login page for my android app and I wanted to just confirm the logic. So my php script on the web server will talk to a database. It will send a query to get the details from the database and output it in JSON format. My app will have a HTTP client which will issue a HTTP get call to get the login details from the api and then cross check it with the details Apr 01 15:04:25 in the EditText within the app itself? Apr 01 15:04:29 mikedg: I think I have to manually refund myself Apr 01 15:04:39 though I don't control the account, so I gotta nag a coworker Apr 01 15:06:25 anyone :P Apr 01 15:06:42 coco89: sounds ok Apr 01 15:07:06 StingRay_: okay so a HTTP post is not neccessary Apr 01 15:07:18 awesomee will try this out Apr 01 15:07:19 :) Apr 01 15:08:17 Using https I hope Apr 01 15:09:16 anyone good at using the android reziser tool Apr 01 15:09:21 dunno what I'm doing wrong Apr 01 15:09:26 when he gets it working easy to switch kakazza Apr 01 15:09:27 it just crashes when I try to convert :P Apr 01 15:09:58 It's easy to not ever use http. Apr 01 15:10:11 He just forgets to change http to https in once place and we're all doomed! Apr 01 15:10:36 one* Apr 01 15:11:02 hrmf Apr 01 15:11:11 Could send hashed passwords too. Apr 01 15:11:26 yes i will use sha but i wanna just get the basics done first etc Apr 01 15:11:31 :) Apr 01 15:11:32 thanks guys Apr 01 15:11:37 will be back hopefully won't take me too long Apr 01 15:17:13 mmmm Apr 01 15:17:35 so what tool do people use for rezing images other than Android Resierzer tool ? Apr 01 15:17:47 bitmaps ? Apr 01 15:18:08 I mean like a tool where I throw in a bitmap and it spits out whatever versions I want Apr 01 15:18:12 LDPI, MDPI etc. Apr 01 15:18:13 well dending on what I'm doing I output it at the correct res Apr 01 15:18:27 photoshop/illustrator Apr 01 15:18:47 alright I will go buy that then and return :) Apr 01 15:19:23 if I'm creating icons I do that in illustrator Apr 01 15:19:53 downloaded this 'android' resizer tool and wanted to take the logo you saw a little back Apr 01 15:20:00 if I'm doing like pannel effects I will do shapes in illustrator and import into PS to check/tweak bitmap output Apr 01 15:20:04 and make out different versions.. but its just 'fails' to convert Apr 01 15:20:05 dunno why Apr 01 15:20:25 probably cause of limited resize methods Apr 01 15:20:35 eg. nearest neighbour Apr 01 15:20:54 hmm tried from XHDPI to MDPI Apr 01 15:20:58 gonna try LDPI then Apr 01 15:21:15 failed.. screw it Apr 01 15:21:26 but hey it creates the folder LDPI\ Apr 01 15:21:28 ... Apr 01 15:29:25 just taking a png and resizing it tends to produce crap Apr 01 15:29:31 get a VD Apr 01 15:29:50 where I work we have quite a few VDs Apr 01 15:30:19 VDs sounds like you can accidentally contract that from a night out ? Apr 01 15:32:08 yes Apr 01 15:33:02 be careful then mike, if you have lots of VDs, dont want to get sick too! Apr 01 15:34:09 hehehehe Apr 01 15:34:19 brb cigarette break Apr 01 15:35:41 anyone experienced issues removing their JAVA DK and installing the newest ? Apr 01 15:38:01 oh man, i cant find a simple solution .... Apr 01 15:38:35 anyone knows a simple solution to make a sound in an app chooseable? i tried ringtonepreference but it doesnt do like i want Apr 01 15:48:17 http://stackoverflow.com/questions/1986756/setting-ringtone-in-android Apr 01 15:48:23 4th link in google Apr 01 15:48:24 ninharp: make the list of options and ask the user? o.O Apr 01 15:48:45 2nd answer seems to be what you want Apr 01 15:48:52 maybe wrong :) Apr 01 15:48:57 assuming by "make a sound in an app choosable" you do _not_ mean "choose a ringtone" Apr 01 15:55:49 StingRay_, not really that what i want Apr 01 15:55:58 i dont want to set a ringtone in system Apr 01 15:56:21 i want a list of installed ringtones to use in my program oder the default tone that the app shipped with Apr 01 15:57:37 I have no idea what you just said Apr 01 15:58:03 or i do but that post I posted seems to meet what I "think" you just said Apr 01 15:58:07 :) Apr 01 15:58:23 like Beyonce said, if you like it you should make a ringtone out of it Apr 01 15:59:44 hmm i think i cant make you understand me ;P Apr 01 16:00:07 i got a simple app that ask you questions! if the answer is correct it plays a sound! Apr 01 16:00:22 so, know i added a settings screen with preferenceactivity Apr 01 16:00:40 where i want to let the user choose the sound to play when correct answer is given Apr 01 16:01:11 i tried ringtonepreference and override the default with my resource Apr 01 16:01:26 but it ever steps back to the system default ringtone Apr 01 16:01:29 not mine Apr 01 16:08:47 why are you playing with ringtone ? Apr 01 16:08:55 dont you just want to play a "sound" Apr 01 16:08:58 ? Apr 01 16:13:18 how do you access resources from both your app and your test app from a test? Apr 01 16:13:33 i can get one or the other, but im having trouble figuring out how to get both contexts Apr 01 16:15:06 How come I can't add a tab to my actionbar? Apr 01 16:15:25 I did everything correctly but it still won't add. Apr 01 16:16:33 :D .show Apr 01 16:18:23 Nvm that wasn't the problem Apr 01 16:19:40 StingRay_, the sounds played well ;) thats not the problem Apr 01 16:19:58 the problem is to choose an other sound that it play on right! Apr 01 16:20:28 so bascially all you want is a system sound picker ? Apr 01 16:20:53 yes Apr 01 16:20:58 like ringtonepreference do Apr 01 16:21:25 but ringtonepreference dont let me set the default ringtone to mine! its getting back to system standard Apr 01 16:21:47 if you set a new sound with ringtonepreference it wont let it set back to the default sound Apr 01 16:22:09 do you have correct permissions to do that ? Apr 01 16:22:34 ninharp: add your custom ringtone to the system list Apr 01 16:22:35 i dont want to set any system tone! Apr 01 16:22:43 can I define more than one bitmap font in .Xresources for urxvt? Apr 01 16:22:55 woah, wrong channel Apr 01 16:23:24 so i dont need any permission or? Apr 01 16:24:41 evanc, you mean copy my tone in the system ringtone folder? or just add my tone to the ringtone picker list? Apr 01 16:26:37 brb hang up the laundry ... hmpfl Apr 01 16:28:54 how common practise is it to hardcode dp sizes on stuff Apr 01 16:29:23 like if I want to make sure that on profile view my title never got too big.. I could do like '50dp' as height Apr 01 16:29:30 but it just sounds like a bad solution in to me Apr 01 16:31:37 Is there a quick way to see if a certain Layout has any buttons in it, and if so, to remove them? Apr 01 16:31:53 I say a quick way - any way would be good Apr 01 16:32:05 yeah you have a gui view right ? Apr 01 16:32:09 you using eclipse ? Apr 01 16:32:27 P3nnyw1se: yes, but this is whislt the app is running Apr 01 16:33:02 but you can't remove buttons in the running app Apr 01 16:33:08 not programatically anyway Apr 01 16:33:13 you want to dynamically remove buttons ? Apr 01 16:33:16 like the user can do it ? Apr 01 16:33:21 P3nnyw1se: yes I can, if I have the object, I can do Layout.removeView(button) Apr 01 16:33:34 I just need a way to access all of a Layout's views or similar Apr 01 16:34:13 well with my restricted knowledge.. my advice would be Apr 01 16:34:23 to name the buttons something that explains specifically what viewgroup they are in Apr 01 16:34:25 so you can do it that way Apr 01 16:34:42 what? Apr 01 16:35:50 like R.id.button1 Apr 01 16:35:51 like R.id.button2 Apr 01 16:35:53 like R.id.button3 Apr 01 16:35:56 I dont have that Apr 01 16:36:06 All teh buttons are added and removed dynamically Apr 01 16:36:10 oh Apr 01 16:36:14 Depending on filters the user sets Apr 01 16:36:16 well dont you keep a reference too them ? Apr 01 16:36:23 -o Apr 01 16:36:31 when you add them Apr 01 16:36:47 hm Apr 01 16:37:04 couldnt you just store a reference in like an array Apr 01 16:37:08 probably out of my league anyway Apr 01 16:37:57 no you're right Apr 01 16:42:17 happens once or twice a day Apr 01 16:43:48 WOO :D i got my filters to work Apr 01 16:43:55 hi there, can i have a url in xml for WebView ? Apr 01 16:58:57 guys in a bar with buttons Apr 01 16:59:29 instead of the color I normally use.. I added a picture.. as android:src"@drawable/xxxx.png" Apr 01 16:59:42 which works fine.. except Apr 01 16:59:55 I usually have the view on 'wrap_content' cause its suppose to follow the buttons inside it Apr 01 17:00:07 but now due to the picture size it seems to scale according to the background src Apr 01 17:00:12 can I make it.. not do that somehow ? Apr 01 17:01:53 P3nnyw1se: ... don't set it to wrap_content? Apr 01 17:03:12 well I want it to wrap the buttons inside the view Apr 01 17:03:19 but I dont want it to wrap on the background:src image Apr 01 17:03:27 which in my own little opinion makes sense Apr 01 17:03:32 that it shouldn't wrap around background Apr 01 17:20:19 Hi.. Apr 01 17:21:12 Is there a way, using the preference* items, to do a nested preference screens app just like the settings list on Android? Apr 01 17:21:41 you can have multiple preference activities Apr 01 17:22:01 In the wat that I can have a switch/checkbox that, depending where I click, it shows a new screen or if I click the checkbox just do something? Apr 01 17:22:15 (Wifi/Bluetooth items as example) Apr 01 17:22:33 you can look at the source to see how it's done Apr 01 17:23:16 how can I start the "set img as wallpaper" activity programmatically? i.e. crop and set Apr 01 17:23:38 hi is it possible to show date in language of device defaults ? Apr 01 17:24:15 Vanscot: pretty simple, enable ro disable a preference (say #3) based on the checkbox state of your parent preference (say #2), when #3 is clicked you launch a new activity with your other preferences Apr 01 17:25:14 elegos: this one https://developer.android.com/reference/android/content/Intent.html#ACTION_SET_WALLPAPER ? Apr 01 17:25:20 f2prateek: that can be done with the preferences items and the dependency attribute... Apr 01 17:25:23 thanks f2prateek Apr 01 17:25:27 But that's not what I meant. Apr 01 17:26:05 f2prateek: uhm... how can I set the wallpaper image in the intent? Apr 01 17:26:55 f2prateek: http://xgouchet.fr/android/data/images/settings_master_on_off_2.png Apr 01 17:26:59 That's what I meant. Apr 01 17:27:18 The Wifi/Bluetooth sections behave differently depending on where you click. Apr 01 17:28:10 If it's on the switch, it'll just toggle the siwtch, but if you click the text, I'll take you to the wifi screen/sub menu.. Apr 01 17:29:12 Oh, i see... Apr 01 17:29:18 Vanscot: here's how they did it https://github.com/android/platform_packages_apps_settings Apr 01 17:29:30 nvm, it's a API 14+ exclusive. Apr 01 17:29:48 Vanscot: switch is, you can use checkbox do the same though Apr 01 17:30:09 I'll check it, just in case. Apr 01 17:30:10 Tks. Apr 01 17:31:24 probably a dumb question :-) is there any guarantee on when onActivityResult() is called within the activity lifecycle? [specifically; can I assume that it will only be called after onRestoreInstanceState()?] Apr 01 17:33:59 kbs: onActivityResult() is called when an activity started with startActivityForResult() is finished Apr 01 17:34:22 birbeck: yes, that makes sense -- but how about in the context of the calling activity? Apr 01 17:34:27 onRestoreInstanceState() will not be called on the activity which started it, only onResume() Apr 01 17:35:36 even if the calling activity was destroyed for any reason? (say, an orientation change) Apr 01 17:36:04 the calling activity is paused, it will not receive a configuration change until it is resumed Apr 01 17:36:24 if the calling activity is destroyed, onCreate() will be called with the Bundle Apr 01 17:37:24 iirc, the calling activity has high priority and is not likely to be killed Apr 01 17:38:30 you can also backport switch. it's one class, 6 drawables, and two XML files Apr 01 17:38:30 It uses fragments... Apr 01 17:38:53 :-) let me make it very specific, hopefully this might clarify my question. Will the onActivityResult() be called after the onRestoreInstanceState(), in the following scenario. 1) Activity A start in portrait mode. 2) A calls activity B 3) While fiddling with activity B, user goes to landscape. 4) B calls finish() 5) is onActivityResult() guaranteed to be called in A, after onRestoreInstanceState() Apr 01 17:40:03 kbs: i dont think it will be called at all, i believe onCreate() would be called instead, you should put some logging in there and test the scenario Apr 01 17:41:56 if onRestoreInstanceState() WAS called, I would imagine it would be called BEFORE onActivityResult() Apr 01 17:42:12 exactly -- that's precisely my question -- is it guaranteed? :-) Apr 01 17:42:45 the order of the callbacks is always guaranteed, you will need to test to see which callbacks happen though Apr 01 17:42:49 if u start an activityForResult my money would be onActivityResult() "onRestart()" onRestoreInstanceState() onResume() Apr 01 17:43:29 https://developer.android.com/reference/android/content/Intent.html#ACTION_SET_WALLPAPER lets me select an image and set it as wallpaper, but how can I pre-choose the image and skip to the crop part? I'd use the WallpaperManager to set the drawable, but in this way it excludes the crop part... Apr 01 17:43:49 StingRay_: I cant say with 100% certainty, but I would expect onActivityResult() to only be delivered to a running activity Apr 01 17:44:23 i.e. after onCreate() and onResume() Apr 01 17:44:43 the activity is available b4 that Apr 01 17:44:54 onResume() that is Apr 01 17:45:39 at any rate, if the callbacks are handled correctly, it shouldnt matter much Apr 01 17:46:33 Hello! Apr 01 17:46:37 onActivityResult is called before onResume Apr 01 17:47:24 How can I move/edit/modify the "Main Wallet" text on the top of this layout? I dont see how that text is being added as it;'s not in that layout's XML Apr 01 17:47:25 http://wacomalt.com/hostedstuff/Screenshot_2013-04-01-13-29-05.png Apr 01 17:47:55 SimonVT: aah, ok. But -- before or after onRestoreInstanceState()? Apr 01 17:49:22 I'd imagine after Apr 01 17:49:25 Argh... Apr 01 17:49:45 SimonVT: yes, but I don't see a guarantee in the docs anywhere -- reliable to assume this? Apr 01 17:49:51 f2prateek: I can see how they do it, but it's a pita if you want to do it properly and programmatically. Apr 01 17:50:01 f2prateek: Thank you, anyways. Apr 01 17:50:46 kbs: you could write a sample app and step through the lifecycle Apr 01 17:51:05 f2prateek: how does that guarantee it, if it happens to work on my particular device/android version :-) Apr 01 17:51:16 iirc it's called before onPostCreate. It wouldn't make sense to deliver the result before onPostCreate Apr 01 17:51:20 kbs: the order of the callbacks is guaranteed Apr 01 17:51:56 SimonVT: okay. Apr 01 17:53:20 its crazy that people think android is the wild west and things will just happen randomly on different devices or versions Apr 01 17:53:38 birbeck: if you could point me to a link that has the words onActivityResult() and onRestoreInstanceState() and the words "must occur after" I'd be very grateful :-) All I see is essentially https://developer.android.com/images/training/basics/basic-lifecycle-paused.png -- which doesn't include onActivityResult() in the diagram. Apr 01 17:54:33 kbs: I don't think those words exist, but the activity lifecycle events are guaranteed to happen in order (if and when they are called) Apr 01 17:54:37 Docs for onActivityResult says "You will receive this call immediately before onResume() when your activity is re-starting." Apr 01 17:54:52 Can anyone tell me where to find this text in the code? http://wacomalt.com/hostedstuff/Screenshot_2013-04-01-13-29-05.png It is not in the layout's XML. I'm super new to this, can post any of the code if needed too, just not sure what Id need to post. Apr 01 17:55:02 Docs for onPostCreate says "Called when activity start-up is complete (after onStart() and onRestoreInstanceState(Bundle) have been called)" Apr 01 17:57:30 SimonVT: is there something that relates the sequence of onActivityResult() to the onPostCreate()? Or is "immediately before onResume()" imply that no other Activity callbacks are called between onActivityResult() and onResume()? Apr 01 17:57:42 :/ Apr 01 17:58:13 I think it's safe to assume it's not going to be delivered until the activity is fully created (which is indicated by onPostCreate) Apr 01 17:58:32 SimonVT: *nod* great -- thanks much :-) Apr 01 18:07:38 onActivityResult() actually happens before onStart() if i recall; yeah the docs are correct - but not that correct :D Apr 01 18:07:47 what? Apr 01 18:08:02 that's different from what SimonVT says.. Apr 01 18:08:10 any way to let a bitmap be used for the wallpaper, but leaving the user the ability to crop the image as wanted? Apr 01 18:08:13 thats because android is the wild west Apr 01 18:08:15 XD Apr 01 18:09:06 Can anyone help me please? Been stuck on this all day Apr 01 18:09:24 g00s: hm. I thought SimonVT had something with his lawyerly reading of the docs on onPostCreate(), and onActivityResult() . I'm starting to think I need to find a wild west solution here... Apr 01 18:09:29 WACOMalt: you need to pastebin your layout and your relevant code. Apr 01 18:09:31 WACOMalt: you know you could just search your project right ? Apr 01 18:09:35 WACOMalt: we can't magic your codebase into existance Apr 01 18:09:35 WACOMalt: try in strings.xml Apr 01 18:10:00 well thank you. I said I could post code but didnt know what I needed to post. now you have told me so I will post it. Apr 01 18:10:29 WACOMalt: It wasn't for you to post the code in strings.xml... Apr 01 18:10:48 But for you to check that file, since it should contain the text you're looking for. Apr 01 18:10:50 kbs: i remember a post where even dianne H was surprised by this. who knows, maybe it changed since. but thats the way it was in 2.2 Apr 01 18:11:32 WACOMalt: pastebin your layout, your relevant activity code (if in doubt, all of it), and your strings.xml. Apr 01 18:11:51 i remember the timing sucked ass, because i wanted to start and bind to a service in onStart() given results of onActivityResult(), but the timing was foobar and i couldn't Apr 01 18:12:12 g00s: Thanks for the heads-up (and if you happen find that post, would you point me to it?) Maybe it's time poke at the source just to see what the heck's going on. Apr 01 18:12:31 http://pastie.org/7270830 activity_wallet_detail.xml http://pastie.org/7270842 activity_wallet_list.xml Apr 01 18:12:58 g00s: yeah -- I have a somewhat similar issue myself. I want to "merge" results from my caller (onStart() -- save any user-modified data -- onSaveInstance() and get results back from another activity I'm calling.) Apr 01 18:13:25 You could've created a sample and run it on every api level you support by now Apr 01 18:13:56 http://pastie.org/7270870 WalletDetailActivity.java Apr 01 18:14:07 SimonVT: :-) far more entertaining this way, right? Apr 01 18:14:30 http://pastie.org/7270880 WalletListActivity.java Apr 01 18:14:40 That should be all that is involved in this Apr 01 18:16:09 http://pastie.org/7270897 DummyContent.java Apr 01 18:17:00 http://pastie.org/7270921 strings.xml Apr 01 18:17:26 WACOMalt: and look at those you still cant find it ? Apr 01 18:17:51 I can find the text value itself Apr 01 18:17:59 but not how/when it gets included in the layout Apr 01 18:18:15 FWIW https://code.google.com/p/android/issues/detail?id=17787 on the wild-wild-west ;-) Apr 01 18:18:27 is that not the actionbar or something ? Apr 01 18:18:32 rather than a layout Apr 01 18:18:39 If I build an app, which is Android versions should include. I mean, since version 2.2? thanks Apr 01 18:19:00 HerbertWest: 1.0 Apr 01 18:19:03 StingRay_: ... maybe. Where would I look to find that code? Apr 01 18:19:08 lol for real? Apr 01 18:19:19 HerbertWest: you asked an unanswerable question Apr 01 18:19:34 ok understand Apr 01 18:19:58 HerbertWest: a new app, probably minSdk=15 Apr 01 18:21:37 StingRay_: on this subpage, the action bar says Wallet Detail, which is fine. but the list title (Main Wallet) is showing on top fo the activity. ID rather move this elsewhere or to the right of the action bar Apr 01 18:22:21 http://www.wacomalt.com/hostedstuff/Screenshot_2013-04-01-13-29-05.png is how it looks right now. Apr 01 18:23:56 Weird. I do this: "if (BuildConfig.DEBUG) { menu.add(0, 123, 0, "Debug"); menu.findItem(123).setTitle(sharedPrefs.getString("appMode", "Debug")); }" , but the Debug option shows up in the released version. Why is that? Apr 01 18:25:04 g00s u said android 3.0 Apr 01 18:25:06 Quacked: because BuildConfig is something that's only set at build time Apr 01 18:25:17 Quacked: meaning, your platform as a whole. Not your app. Apr 01 18:25:33 cause all ui is working with 3.0 Apr 01 18:25:54 g00s ty FYI Apr 01 18:26:29 evanc: I'm not following :| Apr 01 18:28:10 what must I do? Apr 01 18:28:43 "Currently you can get the correct behavior by disabling "Build Automatically", cleaning the project and then export via "Android Tools -> Export Signed Application Package". When you run the application BuildConfig.DEBUG should be false." Apr 01 18:28:47 Well, I guess this is just not a good place for beginners to learn. Can anyone point me to a good book for learning up-to-date android development? Apr 01 18:28:48 Looks to be some kinda bug Apr 01 18:29:27 WACOMalt: your name from the tablet ? Apr 01 18:30:07 Quacked: hmm, looks like I need to do some reading Apr 01 18:30:21 but neways you should read about actionbar if you want to know how to edit/alter it Apr 01 18:30:30 evanc: http://code.google.com/p/android/issues/detail?id=27940 Apr 01 18:34:02 StingRay_: yeah its from the wacom tablets Apr 01 18:34:21 yeah I have quite a few round me now Apr 01 18:34:23 :) Apr 01 18:34:28 Ok. though my main issue is not in the action bar. But that will help once I can figure out how to remove that text from the activity view Apr 01 18:34:46 WACOMalt: get rid of actionbar then Apr 01 18:35:43 I guess what Im saying is I want to MOVE the text that is currently showing in my activity (and I have no idea where it's getting drawn in the code) to the action bar. Apr 01 18:36:18 read about what actionbar is Apr 01 18:36:48 tbh your best of going thought the getting started guides Apr 01 18:37:13 okeedoke. Will do then Apr 01 18:37:19 thanks for the pointers at least guys Apr 01 18:37:23 I'll be back :D Apr 01 18:37:32 evanc: if I removed build automatically, built manually and then exported, it worked Apr 01 18:41:54 dance dance Apr 01 18:44:27 the april 1 stuff has been surprisingly tame this year ;) Apr 01 18:45:03 mikedg: did you take a vacation ? Apr 01 18:45:18 i was yelled at earlier this morning Apr 01 18:45:52 i said i can not go to i/o because i took a job with apple and they blacklist i/o as an employee attendable conference, so i was selling my ticket for face price Apr 01 18:46:25 oh man, that's a good joke! Apr 01 18:46:28 (APRIL FOOLS) Apr 01 18:47:07 that wasn't the joke Apr 01 18:47:53 i'm trying to capture an image using MediaStore.ACTION_IMAGE_CAPTURE with a EXTRA_OUTPUT passed in but i can't get the camere app to actually save the image and return back to my activity. i can tap the accept button all day and it does nothing. any ideas? this is on an emulator Apr 01 18:53:04 these need to be added to the design guidelines http://www.nngroup.com/articles/mobile-usability-cats/ Apr 01 18:53:41 pussy guidlines? Apr 01 18:53:45 that's cool! Apr 01 18:56:40 g00s: cool Apr 01 19:03:44 Hi all, what would be the best way to have a TextView that auto updates when a sqlite db changes? Apr 01 19:04:31 The TextView is going to have a summary of the contents of the db, but I can't find out how to have it update when rows are added/deleted. i think it has something to do with onBind? Apr 01 19:07:40 carbohydrate: you mean if your app did not change the data ? Apr 01 19:11:15 g00s: getting close to change now Apr 01 19:13:32 StingRay_: change ? Apr 01 19:13:37 eclipse Apr 01 19:13:45 to or from ? Apr 01 19:13:50 from Apr 01 19:13:54 :) Apr 01 19:13:59 I dont care how alien intellij feels Apr 01 19:14:16 for no reason I started getting OS level jar error for guava Apr 01 19:14:37 then 8000 + errors cause eclipse no long knows what an Object is Apr 01 19:14:44 oh , heh. well, guava is big and i reached my 65k method limit for dx using that one time Apr 01 19:14:59 in reality, it was guava + a few things, not by itself Apr 01 19:15:21 anyhow, it should work :/ Apr 01 19:15:47 done it again Apr 01 19:17:05 weee Apr 01 19:17:11 anyone else's internet fucked? Apr 01 19:19:08 err...sorry for the language, wrong channel due to severe ssh lag :( Apr 01 19:20:02 tnzr: when you said your internet was lagging, my first thoughts weren't that you were in some isolated area with poor infrastructure, but that you were using comcast Apr 01 19:21:51 the gmail interface changed :| when i'm replying to a message, i'm put in a little window that holds like 4 or 5 lines of text Apr 01 19:22:11 i feel like a mobile user on my desktop Apr 01 19:23:15 Keeps me motivated to "twitterify" my emails -- can't say that's a bad thing, given my proclivity for verbal diarrhea :-) Apr 01 19:23:35 they could have just left it a freaking text area that the browser could resize Apr 01 19:24:11 and switching back is only temporary … is this an april fool joke :/ Apr 01 19:29:40 aww man Apr 01 19:29:47 the walking dead season final is such a letdown Apr 01 19:29:49 pff Apr 01 19:32:02 #walkingdead ? Apr 01 19:32:22 u afraid I'm gonna spoil it ? :) Apr 01 19:32:25 I know you watch it Apr 01 19:32:43 that was more a hey, here is your channel to discuss it Apr 01 19:32:54 :) Apr 01 19:33:08 alright thx Apr 01 19:34:56 I use viewPager on landscape mode, having 2 fragments close to each other. in profile I just use one view Apr 01 19:35:11 I have the problem that it creates duplicate fragments if anyone have some solution idea Apr 01 19:35:28 like if I write my name in a textfield in profile.. and switch to landscape.. nothing is display.. then when I switch back to profile its there Apr 01 19:35:39 can't figure out how to use.. the same on Apr 01 19:36:15 I guess I cant hmmm Apr 01 19:40:06 hmm thats kinda annoyning Apr 01 19:46:51 fixed! Apr 01 19:47:40 can I ask u something about fragments StingRay Apr 01 19:47:56 as long as it's not from lack of effort reading Apr 01 19:48:02 :) Apr 01 19:48:05 ask away Apr 01 19:48:11 well I hope not I'm not sure I understand that.... Apr 01 19:48:13 not sure I will be able to answer Apr 01 19:48:18 I know it has a lifecycle right Apr 01 19:48:30 so if I push it in the background its still there Apr 01 19:48:34 for sometime before its destroyed Apr 01 19:48:39 P3nnyw1se: by the way, it's "portrait", not "profile" Apr 01 19:48:56 but I have a button.. that I force to 'new Fragment' each time the button is clicked Apr 01 19:49:04 still its the same fragment.. at least remembers what I did Apr 01 19:49:06 how does that work Apr 01 19:49:07 exactly Apr 01 19:49:12 P3nnyw1se: please Apr 01 19:49:13 don't Apr 01 19:49:14 write Apr 01 19:49:15 your Apr 01 19:49:17 messages Apr 01 19:49:19 like Apr 01 19:49:22 this Apr 01 19:49:27 ok Apr 01 19:49:32 I'm creating a customview based on ImageView. I'm wondering what is faster: extend imageview and do drawing stuff on onDraw or create my customview from a view and add to a viewgroup if and imageview. Wich one is best? Apr 01 19:50:07 paulovap: depends what you're trying to accomplish Apr 01 19:51:14 JakeWharton: i'm trying to create a sliding panel on top of a imageview, but using layout was bad to me because a need it to be rounded.. Apr 01 19:53:56 well if you're sliding anything you'll want to make sure that you can use hardware layers so that the things moving don't have to be redrawn as you move them Apr 01 19:54:25 the easiest way to do something like what you're looking for is two ImageViews in a custom FrameLayout that manages the translation Apr 01 19:59:29 Newbie question I guess: My SimpleCursorAdapter subclass passes columns from a ContentProvider, and currently uses bindView to join and display individual columns. This means the "from-to" mapping isn't 1-1, and I'm also having trouble passing columns that I do not want to display. Apr 01 19:59:46 Anybody know a better pattern for what I'm doing? Apr 01 19:59:57 I could rewrite the content provider to match the view of course. Apr 01 20:00:22 JakeWharton: I tried to do something similar, but the borders was not cliping during animation..(as i was just moving the panel, not resizing it). And i think cliping happens in sofware layer.. Apr 01 20:02:18 dont use a simple cursor adapter Apr 01 20:02:56 your case is not simple :) Apr 01 20:03:02 there are only 2 useful adapters: BaseAdapter and CursorAdapter; the others are silly Apr 01 20:03:56 Excellent, looked briefly at CursorAdapter and it seems more like what I'm looking for. I'll check BaseAdapter as well. Thanks. Apr 01 20:04:56 kjeldahl: good luck, may the force be with you harry Apr 01 20:05:29 yeah, now I just feel silly for asking. Thanks anyway! Apr 01 20:05:55 dont feel silly Apr 01 20:05:59 the apis should feel silly Apr 01 20:06:04 the only silly question is Apr 01 20:06:11 one that you ask 50 times and dont take our advice Apr 01 20:06:11 * kjeldahl drumrolls Apr 01 20:07:15 any known issue with making Fragment variable static so I can reuse it across classes? Apr 01 20:07:16 I hereby propose to rename it to SillyCursorAdapter. Apr 01 20:07:33 P3nnyw1se: tons, don't do it Apr 01 20:07:37 :( Apr 01 20:07:41 don't make a fragment static Apr 01 20:07:46 dont make an activity static Apr 01 20:07:59 its just the Fragment variable Apr 01 20:08:01 :P Apr 01 20:08:03 dont make a service static until you understand Apr 01 20:08:56 P3nnyw1se: seriously though, don't cache things that are explicitly supposed to be transient Apr 01 20:09:07 okay.. I'm asking because Apr 01 20:09:10 if you need a global context, it's safe to cache context.getApplication(). Apr 01 20:09:29 if I do e.g. 'private static FRagmentClass fc; Apr 01 20:09:39 I can use that in both profile and landscape.. and even though I dont instantiate it Apr 01 20:09:46 * lov sighs Apr 01 20:09:47 it works cross portrait and landscape Apr 01 20:09:57 it appears to work Apr 01 20:10:03 P3nnyw1se Apr 01 20:10:09 You need to read about the application lifecycle Apr 01 20:10:15 in particular, the part regarding recreating your activity Apr 01 20:10:17 Okay, I'll rephrase my question. I have a sqlite db that can be updated from a few locations - different threads, one in a service, another in a broadcast receiver. I would like to "hook up" a TextView in an activity to this database so that if the db changes while the TextView is displaying, it will update automatically Apr 01 20:10:35 I'm struggling to learn what I need to do - it sounds like I need some sort of "adapter" Apr 01 20:10:48 lov I have both profileview and landscape view.. as it is right now they both create a new Fragment Apr 01 20:10:52 how do I fix that then ? Apr 01 20:10:58 YOU DON'T Apr 01 20:10:59 carbohydrate: the nice way of handling this is with a contentobserver wrapping your database Apr 01 20:11:07 but i dont really have the time right now to explain that Apr 01 20:11:27 P3nnyw1se: it also creates a new activity, why dont you make th eold one static too? Apr 01 20:11:47 ey I'm asking!!! Apr 01 20:11:52 I'm not telling Apr 01 20:12:07 you asking whats in the getting started guides Apr 01 20:12:09 mikedg: thanks i'll read up on it Apr 01 20:12:18 hence why patience is thin Apr 01 20:12:38 that combine with an overwhelming feeling of arrogancy StingRay Apr 01 20:12:47 I've seen others get replies in here aswell Apr 01 20:12:59 P3nnyw1se: stack overflows has experts via chat Apr 01 20:13:06 they might be able to help you fix this problem Apr 01 20:13:11 P3nnyw1se: I'm going to gently recommend that you read http://developer.android.com/guide/components/fragments.html#Lifecycle Apr 01 20:13:20 thank you lov Apr 01 20:13:39 you're welcome Apr 01 20:13:42 look I'm sorry but you gotta remember I ask.. you act like I'm trying to teach you Apr 01 20:13:46 http://stackoverflow.com/questions/5859668/in-android-when-a-service-and-activity-use-the-same-static-class-is-the-class Apr 01 20:13:51 'OH WHY DONT U JUST make everything static then!?!?!? HUH" Apr 01 20:13:51 P3nnyw1se: I dont mean to come accross arrogant , you just seem really lazy to me at times Apr 01 20:14:13 P3nnyw1se: well if you have a reason for not making everything else static, it becomes easier to explain why a fragment should not be static Apr 01 20:14:14 yeah I know.. thats your assumption of me.. yet for the past 48 hours? I've been here what Apr 01 20:14:15 30 of them ? Apr 01 20:14:36 ok lazy not the right term Apr 01 20:14:49 how about.. unwilling to learn the exact way you want me to :) Apr 01 20:14:53 wanting to get answers from this channel rather than reading the docs Apr 01 20:15:07 I dont want you to learn nething Apr 01 20:15:09 this is the official android dev irc chat room Apr 01 20:15:30 P3nnyw1se: have you done mobile development before this? Apr 01 20:15:39 nope Apr 01 20:15:57 and its not like I don't ready StingRay I have 20 docs open on my laptop next to me Apr 01 20:16:13 sometimes when you start chewing over a big subject its just nice to be told 'dont.. go in that direction' Apr 01 20:16:20 like 'hey is that a problem making Fragmenst static' Apr 01 20:16:25 you go 'fuck yeah.. dont do it.. ' Apr 01 20:16:30 you should all the android devs have 99 tabs and a bitch aint one Apr 01 20:17:10 Untill someone told me 'what about viewPager' 2 days ago.. I was reading pages about motionEvents Apr 01 20:17:14 and I had no idea how to implement them Apr 01 20:17:22 so I'm here cause its a way to get pushed in the right directions Apr 01 20:17:48 you told me doing Static Fragments is something I should avoid.. at least with my experience Apr 01 20:17:59 so I accept that and try and learn about another way Apr 01 20:18:10 ok, i apologize Apr 01 20:18:12 O Apr 01 20:18:21 I'm just saying :) its not like I ever contradict the things you say Apr 01 20:18:21 if you attach a fragment instance to the fragment manager and rotate the phone (thereby causing the activity to recreate) the fragment manager will recreate you fragment for you Apr 01 20:18:23 Lov pointed you into the direction of the lifecycle stuff Apr 01 20:18:37 "mikedg: ok, i apologize" wow, it really must be apr 1 Apr 01 20:18:41 ;) Apr 01 20:18:45 hah Apr 01 20:18:48 this means that when dealing with the fragment manager you should always query it to see if it already exists Apr 01 20:19:02 JakeWharton.. my problem.. which I assume I will learn more about when reading in a little bit Apr 01 20:19:10 is that I use a viewPager that has its own Fragmentmanager Apr 01 20:19:16 in landscape only Apr 01 20:19:58 just a random question here -- is there some basic reason why the android framework has resisted the idea of adding a horizontallistview widget for so long? Apr 01 20:20:12 does anyone know what library i need to load to fix this error? java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1306]: 300 cannot locate '__sprintf_chk' Apr 01 20:20:20 I promise you mikedg.. I stare at those docs all day.. and its just not giving me at all the same as 'trial and error' Apr 01 20:20:28 kbs: it's already there, android:orientation=horizontal in scrollview Apr 01 20:20:31 How come my action bar tabs won't show? Apr 01 20:20:43 agy2154: that's not a question Apr 01 20:20:54 mikedg: ah, but that's not the same as the memory-conserving goodness of the listview, is it? Apr 01 20:20:57 agy2154: because JakeWharton messed up Apr 01 20:20:59 P3nnyw1se: hard to know more about what you're doing without more context Apr 01 20:21:03 (i.e., code) Apr 01 20:21:36 kbs: you could implement one. also, StaggeredGridView works horizontally Apr 01 20:22:22 Jake in portrait mode.. I have an adapter that takes a FragmentManager.. and that viewPager uses this adapter to swap through fragments in 1 View Apr 01 20:22:31 kbs: april fools, i find stuff to be pretty friggen horrible to read scroll right to left on small screens Apr 01 20:22:33 in landscape mode.. I have 2 views that are populated by 2 fragments at a time Apr 01 20:22:47 uhh, *scratches head* Apr 01 20:22:57 P3nnyw1se: you should use the same tag for the fragments when you add them to the fragment manager Apr 01 20:23:06 then you query the fragment manager after rotation (and in the adapter) Apr 01 20:23:08 JakeWharton: interesting -- thanks for the pointer to staggeredgridview Apr 01 20:23:20 transient network failures can cause UnknownHostException to be thrown, and cached negatively. and I can't find the code that clears the cache? what the hell? Apr 01 20:23:38 kbs: presumably you could make the child views not staggered to get standard horizontal list-ish behavior Apr 01 20:23:43 hmmm Apr 01 20:23:44 jasta: maybe it's never cleared Apr 01 20:23:46 JakeWharton, Wait what do you mean? Apr 01 20:24:02 agy2154: you provided zero context, description, code, pictures, or stack traces Apr 01 20:24:20 nobody has any clue what you are doing, what is wrong, or how to even start helping you Apr 01 20:24:23 mikedg: so transient network failures make it impossible to get a connection? :) Apr 01 20:24:34 im investigating further. Apr 01 20:25:07 jasta: sounds like a new blog post! Apr 01 20:25:23 P3nnyw1se: does what I said make sense? or do you want to see code? Apr 01 20:26:15 I'm thinking I'm not sure how to use it in the adapter that is its own class it gets a FragmentManager in the constructor .. what you are saying is that I find it in that ? Apr 01 20:26:22 oh, looks like the TTL is only 2s. Apr 01 20:26:27 as of right now i Just return 'new FragmentClass' Apr 01 20:26:29 in the switch statements Apr 01 20:26:50 jasta: yes :) Apr 01 20:26:53 so you should try to find an existing instance of the fragment rather than always creating a new one Apr 01 20:27:03 i dont know if I have shitty connectivity everything sucks for a while Apr 01 20:27:15 thats why I did static instances of the fragments Apr 01 20:27:21 which lead me to being shunned by Jerusalem Apr 01 20:27:30 stop being racist Apr 01 20:27:35 !? Apr 01 20:27:55 i cant be party to this rampant rapism Apr 01 20:28:02 StingRay_: http://appleinsider.com/articles/13/04/01/amazon-adds-file-syncing-to-cloud-drive-drops-rates-below-dropbox Apr 01 20:28:04 lol Apr 01 20:28:07 you query the fragment manager for existing instances, not keep references to them in static fields Apr 01 20:28:30 findFragmentByTag Apr 01 20:28:51 JakeWharton, http://paste.ubuntu.com/5668608/ ... Here is a dump of my code. I removed some un nesssicary meathods. Once again the problem I am having is that the action bar is not displaying the individual tabs Apr 01 20:28:57 I see your point I think this will require I have tagged them all right away though right ? Apr 01 20:29:20 agy2154: you didnt' call setNavigationMode Apr 01 20:29:48 P3nnyw1se: yes, you should use string tags when adding them to the fragment manager manually. but, i think i see your problem now Apr 01 20:29:55 FragmentPagerAdapter uses its own tagging system Apr 01 20:30:43 I dont have to add that tagging though do I ? Apr 01 20:30:47 I kinda left it out Apr 01 20:30:49 and it worked anyway Apr 01 20:32:04 I'm as far as 'findFragmentByTag-- so gonna try some stuff out Apr 01 20:32:06 and see where it takes me Apr 01 20:32:08 you're in a murky edge-case of using fragments and their absolutely fucking awful API Apr 01 20:32:17 I need todo my own gui or UI ideas? Apr 01 20:32:35 you either have to mimic how FragmentPagerAdapter is creating tags or write your own pager adapter that does the heavy lifting for you Apr 01 20:32:41 JakeWharton thats like telling a gladiator student 'you won't make it' as he goes in the arena Apr 01 20:33:05 I don't blame you. I blame the API review committee at Google for letting fragments out the door Apr 01 20:34:00 so we're at this point where I have to find a way to add a tag to all my Fragments right away Apr 01 20:34:02 ok Apr 01 20:34:04 I'll experiment with your use case later because it seems like poor design in how FragmentPagerAdapter behaves Apr 01 20:34:21 JakeWharton: Question, do you guys at Square test/mock things like 'Enviroment' or 'NetworkManager'? If so, how? Apr 01 20:34:24 JakeWharton, Do you iOS development as well? Apr 01 20:34:30 *do Apr 01 20:34:43 agy2154: I've contributed to one internal iOS library once. It was awful. Apr 01 20:34:50 never done actual app development though Apr 01 20:35:05 kakazza: all that stuff is abstracted behind management classes which we have test/mock impls of Apr 01 20:36:06 Hmm, so you don't just have methods using Enviroment or NetworkManager directlly but your own, i.e., ConnectionWrapper Apr 01 20:36:32 And these are then passed into objects by Ctor arguments so they can be mocked? Apr 01 20:36:37 what if ehm.. Jake.. I just do a String "frag1" and add that as tag respectively both in the PagerAdapter and in the main Activity Apr 01 20:36:52 would it be 2 fragments with the same tag ? Apr 01 20:36:54 guess it would Apr 01 20:37:15 kakazza: they aren't wrappers, we just mock the classes that talk directly to those things and use those rather than the real implementation Apr 01 20:37:39 P3nnyw1se: You can't provide custom tags when using FragmentPagerAdapter Apr 01 20:38:21 so I'm back at some save Fragmen Instance State shit Apr 01 20:38:26 and reloading that naaaaah Apr 01 20:38:51 I see, but I'm not sure how that would work. For example you had something like Utils#checkForConnection. checkForConnection() makes use of NetworkManager and you want to mock a disconnected device. That method is called a lot and there's no real way of replacing that, no? Apr 01 20:39:34 we probably inject a Provider where NetworkState is our own enum Apr 01 20:39:56 and then there's a real @Provide NetworkState which talks to those things and a mock one that we can control Apr 01 20:42:44 I understand, thanks. Apr 01 20:43:57 Btw, is Robolectric 2.0 a real replacement for lots of Implementation Tests written in Robotium? Apr 01 20:44:12 We're hitting 1h45m with Robotium already :\ Apr 01 20:46:24 Jake I'm just fishing here lol Apr 01 20:46:27 'setters and getters' Apr 01 20:46:29 would it work Apr 01 20:47:00 kakazza: yes. instrumentation tests are terrible for verifying low-level behavior. they should only test extremely high-level things (or nothing at all!) Apr 01 20:47:48 kakazza: we run about 2500 unit tests via Robolectric in 2m which verify actual behavior Apr 01 20:49:11 kakazza: our instrumentation tests simply walk through the app and take screenshots. there's probably only about 10 assert statements in the entire thing Apr 01 20:49:34 We have normal JUnit tests for low level stuff, like some API testing. The Robotium tests verify actual behaviour, too. Apr 01 20:50:14 Heh, no, our Instrumentation Tests contain LOADS of assert statements. Like current activity, did stuff change in a list when we add/delete an item etc Apr 01 20:50:31 we've found those far too brittle to be useful Apr 01 20:50:47 plus it's much easier to run them as part of the unit tests than sit around waiting for a device or devices to verify all that crap Apr 01 20:51:42 How would you run them as part of the unit tests? Since they interact with the actual UI. Apr 01 20:51:59 And yes, they are brittle. But there's a 'no code goes untested' policy. Apr 01 20:52:15 Heck, we even test the About Dialog Apr 01 20:52:43 that seems a bit extreme... Apr 01 20:52:44 Robolectric runs the entirety of Android. You can inflate views, start activities, etc. Apr 01 20:53:15 gkatsev: it is Apr 01 20:53:25 for instance, we click on buttons and verify things happen Apr 01 20:53:46 Guess I'll give Robolectric another shot. 1.x didn't get my love because I spent most of my time getting simple stuff to work with all the shadows. Apr 01 20:54:35 well 1.x was shit :) Apr 01 20:54:43 idd Apr 01 20:55:18 kakazza: here's an example test with 2.0: https://github.com/JakeWharton/butterknife/blob/master/butterknife-sample/src/test/java/com/example/butterknife/SimpleActivityTest.java Apr 01 20:56:33 you can imagine things like clicking a button and then asserting that text was shown, etc. Apr 01 20:58:03 It's... beautiful Apr 01 20:58:42 Thanks, will consider that. Apr 01 20:59:04 I'm really starting to love Square, a company that actually has a sense of testing. Apr 01 20:59:46 not much choice really. if we lose your money then bad things happen! Apr 01 20:59:57 oh no! Apr 01 21:00:13 has anyone ever seen an issue where tapping on a ListView itemhas anyone ever experienced something on the nexus 7 wherein you click on a listview item and it does the little selected fade animation thing, but after so many clicks, the screen color/saturation seems to lighten up briefly? It even shows when you come back out to the home screen Apr 01 21:00:19 it also seems to happen on an Asus Transformer Apr 01 21:00:29 err Apr 01 21:00:38 sorry for the first part of that last part Apr 01 21:01:00 tnzr: are you talking about automatic screen brightness ? Apr 01 21:01:19 bankai_: no, its definitely something related to the color or saturation Apr 01 21:01:27 why won't this crap work Apr 01 21:01:30 I can force it to happen by repeatedly clicking different things in the list Apr 01 21:01:50 but its not the screen dimming, its actually like the colors get washed out and dark gray and light gray become almost indistinguishable Apr 01 21:03:06 im becoming convinced that it's somehow hardware related, because the screenshot utility in DDMS doesn't show the effect I'm describing, even while the screen is definitely in that state Apr 01 21:04:37 JakeWharton before I got nuts on this Apr 01 21:04:45 whats the approach do you know? . Apr 01 21:04:58 sounds to me like I need to attempt to use the viewPager refenrences.. outside the apgeradapter Apr 01 21:06:02 what would be the advantage over using CursorAdapter over my own BaseAdapter that i feed with a Cursor? Apr 01 21:06:31 JakeWharton is my role model Apr 01 21:13:25 I think I am going crazy. Added a jar lib to my libs folder, added it to the build path, added it to Order and Export, and still - NoClassDefFoundError. Tried everything on stackoverflow, nothing worked... Apr 01 21:17:35 hmm Apr 01 21:17:51 it does happen on the transformer, too, and they are both using Tegra 3 with GeForce Apr 01 21:18:00 although the transformer's is a "ULP" GeForce Apr 01 21:20:12 if using the actionbar tabs, is it necessary to have a different fragment for each tab? can i not just send a callback to my activity (or a nested class in it) to resort a list, for instance? Apr 01 21:21:50 speakingcode-wor: yes! Apr 01 21:21:51 so if anyone is interested, it looks like it might be related to the PRISM feature of the tegra 3 Apr 01 21:22:11 JakeWharton: yes its encessary to use fragments, or yes i can do that? Apr 01 21:22:26 where is the chase and how do I cut to it :P Apr 01 21:22:28 speakingcode-wor: yes you can do that. action bar tab changes merely provide callbacks. you can react to them however you wish Apr 01 21:23:07 JakeWharton: k, great. the documentation should imply that, it's a little misleading. but good to know cause using separate fragments just to filter a list would be a pain Apr 01 21:30:39 I have a question about Tape (TaskQueue) and a Task that has a dependency on an attribute that's injected via Dagger. It seems like this would be a problem since there's no way to obtain the Application object where I isolated my injection logic. I'm not sure if this is the right channel to ask such a question Apr 01 21:30:44 I am trying to learn git and I made a commit but decided to rollback and now i can't find the files that I commited. How can i get those files back? I am using the github program in windows. Are they stored somewhere locally? Apr 01 21:31:19 droiddev32: check out the git channel for git help Apr 01 21:31:22 I guess I could just handle that in the service. Apr 01 21:31:55 I beleive I found my solution. Apr 01 21:32:32 When I peek at the task in the question within my Service, I'll just invoke inject(task) there and then execute the logic. Apr 01 21:34:48 droiddev32: I suspect you're looking for the reflog, but find git-specific help elsewhere (SO, IRC) as they'll be more knowledgable Apr 01 21:35:23 alright. Thanks Apr 01 21:35:57 can some1 correct me that I'm wrong, passing a style into a constructor of a button works ? cause I can pass a android.R one but not my own, but my own works fine if applied to an inflated resource Apr 01 21:37:08 Hi i need some help with my app Apr 01 21:37:10 droiddev32: also, as a learning tool to visualize things, you may like a a tool like gitk or such to see what going on Apr 01 21:38:33 StingRay_: yeah, i never got that to work either - although JakeWharton knew how to do it (but I still couln't get it to work) Apr 01 21:38:54 seems odd Apr 01 21:39:03 I want my app automatic excecute when a download ended Apr 01 21:39:10 you don't pass a style, you pass a theme attribute which points at a style Apr 01 21:39:30 wait, what are we talking about? Apr 01 21:39:53 *mind blown* Apr 01 21:40:15 i just realized linux is the dominant platform in of the most personal markets of personal computing. Apr 01 21:40:23 _linux_ is. Apr 01 21:40:30 JakeWharton: apply a style to a button in the constructor Apr 01 21:40:39 10 years ago, do you eralize how freaking ridiculous that statement would have seemed? Apr 01 21:41:06 How come I can't use views in my fragment? Apr 01 21:41:12 jasta: if you came to that conclusion assuming that android is linux; there is much debate about that Apr 01 21:41:12 Wait let me google first Apr 01 21:41:18 agy2154: ask better questions, c'mon Apr 01 21:41:20 StingRay_: Apr 01 21:41:22 er Apr 01 21:41:45 the guys at the Linux Foundation think so anyhow ;) Apr 01 21:41:46 StingRay_: the third argument is an attribute on the theme which points to a style for the widget Apr 01 21:41:49 g00s: there is debate that android runs on the linux platform? who is having this debate, idiots? Apr 01 21:42:49 jasta++ Apr 01 21:44:10 JakeWharton: so this answer is wrong ? http://stackoverflow.com/questions/3454597/android-defstyle-parameter Apr 01 21:44:28 says "or an explicit style resource" Apr 01 21:44:37 well the android userland is mostly java implementation Apr 01 21:44:39 StingRay_: not sure, i've always only ever used an attribute ref Apr 01 21:44:49 bluestacks ported it to run natively on windows, for instance Apr 01 21:44:50 android does run on top of the linux kernel and contains a minimal shell with minimal versions of the typical linux commands Apr 01 21:45:30 I think it's clearer if you realize stallman was right all along :-) android should properly be called android/linux, a.k.a. gnu/linux Apr 01 21:45:54 so its debateable how necessary the linux kernel is. it is more of the defacto platfrom than the necessary platform. Apr 01 21:46:08 also a lot of the gnu utilities were rewritten to avoid licensing issues Apr 01 21:46:17 you can even copy an arm repository to your sdcard and chroot it and have a full linux environment capable of using apt-get normally Apr 01 21:46:32 speakingcode-wor: why would GNU matter? Apr 01 21:46:50 jasta because it's all copy-left licensed Apr 01 21:47:03 pragma-: ive also installed an android app that acts as an X11 server, which you could then connect to from inside the chroot Apr 01 21:47:04 so it's not a linux platform if it's not GNU/Linux? ...what? Apr 01 21:47:12 even Android developers have in the past said that Android runs on the linux kernel, but is not linux Apr 01 21:47:23 (Patrick Brady) Apr 01 21:47:23 let me pop the stack a bit... Apr 01 21:47:27 well if you take into consideration what kbs alluded to, that linux really is gnu/linux Apr 01 21:47:37 it is linux Apr 01 21:47:39 speakingcode-wor: nope, that wasn't my point at all :-) Apr 01 21:47:54 my point is - stallman always said that what people think of "linux", is gnu/linux Apr 01 21:47:54 kbs but you still alluded to that argument nonetheless Apr 01 21:47:58 nearly all high-end embedded SoCs have first class linux support. Apr 01 21:48:00 right Apr 01 21:48:04 in the same way, what people think of as "android", should be android/linux Apr 01 21:48:05 if that doesn't blow your mind, ... Apr 01 21:48:28 so fi you take that into consideration, then android isn't running on 'gnu linux', but rather the linux kernel Apr 01 21:48:42 hello i need some help with mi code pleace Apr 01 21:48:45 what bonehead would think android ran on gnu/linux? Apr 01 21:49:14 jasta it's a fair assumption, considering most platforms DONT rewrite all the gnu utilities Apr 01 21:49:26 speakingcode-wor: yep; no disagreement there. I do think stallman has always been very careful about the meaning attached to words, and this debate about "android" being "linux" highlights it... it's just android/linux, just like gnu/linux. Apr 01 21:49:41 kbs++ Apr 01 21:50:27 kbs gains a level, kbs is evolving! Apr 01 21:50:41 kbs/speakingcode-wor: i think you're drawing the opposite conclusion than i am to the same piece of evidence. Apr 01 21:50:57 jasta my point is when most people say linux, what they mean is gnu linux, and so by that reasoning when most people talk about whether or not android is linux, they are probably thinking about gnu/linux and not just the linux kernel Apr 01 21:51:09 to assert that android is android/linux just like my ubuntu system is akin to gnu/linux doesn't imply that it's not "linux" Apr 01 21:51:18 i need excecute my app when download a txt Apr 01 21:51:22 or rather, as i said originally, that it's not running on the linux platform Apr 01 21:51:26 most people don't appreciate that the OS is a complex collection of layers of tools and linux is really JUST the kernel and everything else people call 'linux' is the gnu userland Apr 01 21:51:32 * kbs evolves out of the semantics debate :-) Apr 01 21:52:03 the part that blows my mind in particular being the first class driver support for linux in a personal computing capacity is crazy. Apr 01 21:52:22 if anyone predicted this reality 10 years ago, they would have been called crazy Apr 01 21:52:23 jasta: I think what this boils down to is linux vs. Linux™ Apr 01 21:52:23 so is android linux i.e. the gnu userland, no. is it running on a linux kernel for lowl evel resource management? yes in most cases Apr 01 21:53:08 but again the android userland is just a layer. it's been ported to non-linux platforms, such as with bluestacks Apr 01 21:53:10 like, odds are if you're building a high-end SoC, you are also writing or having written first class linux drivers for the entire SoC: GPU, radio, etc. Apr 01 21:53:15 the thing here is that google don't use the "main stream" kernel, but a forked version -- is this still 'linux'? a derivitive? Should i not stir the pot any more? hehe Apr 01 21:53:27 and you're supporting them commercially. *what!?* Apr 01 21:53:50 i think people did predict this years ago Apr 01 21:53:52 marcus_19: by execute you must mean terminate? Apr 01 21:53:54 yo ... anyone here got an idea what all must be set to enable me to resize a videoview to a size greater than parent? Apr 01 21:54:10 cathedral and the bazaar... heh Apr 01 21:54:28 speakingcode-wor: 10 years ago, i can say confidently if you made such an assertion that linux would win in any personal computing market, people would have thought you were nuts. Apr 01 21:54:46 whether you were or weren't nuts, whatever, but most enthusiasts wouldn't agree with you that this was likely Apr 01 21:54:47 and most people are stupid and all the people that did assert it were completely right Apr 01 21:54:55 i would have thought the gamers who are locked into ms would tip the bar the other way Apr 01 21:54:56 jasta: some ppl still do ... laugh at you that is Apr 01 21:55:03 talk about denial :D Apr 01 21:55:18 hola necesito ayuda por favor Apr 01 21:55:26 speakingcode-wor: even enthusiasts wouldn't have been saying this. it was so outlandish. Apr 01 21:55:36 not true at all Apr 01 21:55:45 marcus_20_: ¿cón qué? Apr 01 21:56:07 estoy desarrollando una app Apr 01 21:56:15 enthusiest were saying it. thats why so many people got behind open source movement and it steadly grew up until even now Apr 01 21:56:25 y necesito que cuando se descarge un archivo txt se ejecute automaticamente Apr 01 21:56:32 it took twenty+ years to reach current maturity but a lot of people saw it coming Apr 01 21:57:06 marcus_20_: ejecute? en cual manera? Apr 01 21:57:58 people who understood the capabilities of open source and the notion of standing on the soldiers of giants envisioned this. oh who was it that spoke about giants, von nuemann? or turing? one of them. that was what 60 70 years ago.. Apr 01 21:57:58 tengo un codigo que imprime un archivo de texto que se descarga de mi server aspx Apr 01 21:58:14 speakingcode-wor: that maturity and support came from an outpouring of support in a distinctly non-personal capacity. industry support at the server level. Apr 01 21:58:26 So my problem is that I'm in an activity and I need to get the applications current context. Would htis be corect ? this.getActivity().getApplicationContext() Apr 01 21:58:36 No puedo creer que no es mantequilla Apr 01 21:58:57 turing essentially got convicted of being gay Apr 01 21:59:16 agy2154: use getActivity() if you are in a fragment Apr 01 21:59:20 was basically rendered impotent with treatment and got a lot of other health issues Apr 01 21:59:28 marcus_20_: eh, ¿como una aplicacion de web? Apr 01 21:59:30 brx_, thanks Apr 01 21:59:33 jasta true but obviously open source development was most attractive to programmers, and programmers were less interested in tackling user interface problems for non programmers than they were in tackling complex computing problems Apr 01 21:59:33 you just need ActivityName.this Apr 01 21:59:34 then he killed himself Apr 01 21:59:46 marcus_20_: me parace que necesitas un WebView... Apr 01 22:00:04 but eventually the interest came, and it was just a matter of time. Apr 01 22:00:05 No puedo creer que no es mantequilla Apr 01 22:00:21 webview? Apr 01 22:00:26 obviously history speaks kindly of him now but he got railroaded Apr 01 22:00:31 kind of sad Apr 01 22:00:40 soy muy nuevo me podrias explicar Apr 01 22:00:56 really, a lot of linux UI work was leaps and bounds ahead of commercial stuff. i mean compiz and beryl and the like were definitely pushing boundaries before apple or windows Apr 01 22:01:07 pragma-: calláte. Apr 01 22:01:11 MorkBork: yeah, he was castrated and tortured IIRC and then killed himself Apr 01 22:01:38 didnt know he was tortured, thats harsh Apr 01 22:02:07 yup good ole mankind always killing off our greatest minds for petty reasons Apr 01 22:02:26 pero... pero, que no es mantequilla!! Apr 01 22:02:33 pretty sad even now gay marriage is still a political issue Apr 01 22:02:50 anyway jasta you make a good point, it definitely is mind blowing, but i wouldn't go as far as to say no one predicted or saw it Apr 01 22:02:54 cherry picking parts of the constitution they want to uphold Apr 01 22:03:07 14th amendment is pretty clear on 'equal protection under the law' Apr 01 22:03:19 speakingcode-wor: i live very close to Alan Turin way in Manchester, walk down it most days Apr 01 22:03:51 when North Korea conquers the world, the US amendments won't be worth anything Apr 01 22:03:56 yeah probably not the right chennel to discuss it but i saw F the constitution. ethical evaluation of right in wrong in the current context > some 200 year old vague irrelevant document Apr 01 22:04:11 heh yea britain is notorious for shooting themselves in the foot in some regards Apr 01 22:05:01 hola necesito ayuda con una app android por favor Apr 01 22:05:08 the only reason the constitution is held in 'such high regard' by our govt is because its easier to build a less penetrable political system around it Apr 01 22:05:49 i think its a solid document, its just too-easily brushed aside, disregarded, or twisted by people Apr 01 22:06:05 supreme court precedence and 'interpretation' allow them to basically rule whatever they want as constitutional or not, instead of concerning whether or not it is any good to the public Apr 01 22:06:26 yea some of the interpretations over history have been retarded Apr 01 22:06:38 the writers of the constitution themselves warned of what we have today. they encouraged 'revolution' and getting rid of it in a few years when it is no longer relevant Apr 01 22:07:26 instead it is treated like some holy doctrine that needs a system of elite decision makers to weigh legislation against it, which is a power vacuum Apr 01 22:08:00 how on earth are we talking about the US Constitution in #android-dev? Apr 01 22:08:06 can we move this to #android-offtopic? Apr 01 22:08:15 haha Apr 01 22:08:31 i'll drop it. Apr 01 22:08:43 a lot of android specific stuff was merged back into the official 3.3 kernel - did wakelocks ever make it in ? Apr 01 22:09:11 i think at that time almost everything made it but wakelocks Apr 01 22:09:50 Hows it going g00s Apr 01 22:10:00 hi rburton- Apr 01 22:10:25 hi Apr 01 22:11:15 hola Apr 01 22:11:30 Going to create a ParcelableConvertor for Tape Apr 01 22:11:31 necesito ayuda(i need help) Apr 01 22:11:38 fiesta Apr 01 22:11:54 fiesta de queso Apr 01 22:12:01 anyhow, semantics aside, android is linux to me to the degree an oem can write a device driver that works on both vanilla linux and android i think ashmem was later too Apr 01 22:13:08 eh if its possible ;) Apr 01 22:14:04 so if anyone cares, I foudn what was causing the screen to be washed out. It's a bug in the PRISM feature of the Tegra3, described here: http://forum.xda-developers.com/showthread.php?t=1781157 (fix on page 5, requires root) Apr 01 22:16:44 tnzr: nice; interesting. Apr 01 22:21:46 Then again I don't need to. :) Apr 01 22:22:29 rburton-: just so long as you're not using Serializable Apr 01 22:22:34 we need to rip that shit out Apr 01 22:22:49 What are you guys looking to replace it with? Apr 01 22:22:55 we use GSON Apr 01 22:22:55 Parcels? Apr 01 22:23:38 Okay I'll have to alter this code around to use that. At the moment just implemented Serialiable ;) Apr 01 22:23:48 Minor change not much of an effort Apr 01 22:24:10 Once I verify this logic works I'll invest time later tomorrow or something and port it over. Apr 01 22:24:14 GSON is the easiest and most versatile way to use it. We should be surfacing it as the default. Apr 01 22:25:18 would be nice if java added some syntax for native key-value objects Apr 01 22:26:06 Initially I was going to use it, but wasn't sure about that vs. Serializable. I wanted to avoid Serializable, but just a little lazy at the moment ;) Apr 01 22:26:18 you'd upset all the java programmers who want to get paid by the length of their method/class names Apr 01 22:26:28 lmao Apr 01 22:26:37 JakeWharton: do square use eclipse or intelliJ mostly ? Apr 01 22:26:39 Saw Jack walking into your office today wearing funneral black Apr 01 22:26:46 StingRay_: 100% IntelliJ Apr 01 22:26:51 intellij++ Apr 01 22:27:09 the result of using eclipse should be physical abuse ;) Apr 01 22:27:17 well eclipse for me has 3 striked left out of today b4 I remove it for good Apr 01 22:27:18 I don't know how many years I've been using intellij Apr 01 22:27:23 it started with 30 Apr 01 22:27:33 eclipse works fine for all the android development i do Apr 01 22:27:42 it's mostly pretty simple stuff tho Apr 01 22:28:02 Intellij is just so fast, slowing down over the years though Apr 01 22:28:12 its just a nicier environment in my opinion to develop in Apr 01 22:28:21 Unless I'm doing Rails, then I use Sublime Text 2 Apr 01 22:28:39 AppCode for XCode Apr 01 22:28:45 * rburton- is a JetBrains slut Apr 01 22:28:47 eclipse isn't super fast but fast enough if you don't bloat it down trying to install every plugin for every framework on a single instance of it Apr 01 22:29:19 its not a 'bad' IDE. I just like Intellij. Apr 01 22:29:21 the ui components are pretty easily customizable too, really just seems like matter of preference between the two... i like vim Apr 01 22:29:25 also keep as few projects open in the workspace as possible with eclipse Apr 01 22:30:55 I don't believe in forcing people to use a particular IDE Apr 01 22:31:07 Just don't complain or ask for help with Eclipse takes a shit ;) Apr 01 22:31:49 gthe only reason i dont use vim for android development is lack of refactoring abilities Apr 01 22:32:17 eclim is pretty cool Apr 01 22:32:19 for some reason i rename and move classes and methods around a ton in java Apr 01 22:32:28 yeah i've seen eclim but haven't tried it yet Apr 01 22:32:39 Speaking of taking a shit, I had a function isNotRunning() { return running; } ;) Apr 01 22:33:02 speakingcode-wor Intellij is very good at that. XML files, etc. love it for that Apr 01 22:33:23 When I had to do IBM related development (Read websphere) I bought MyEclipse Apr 01 22:33:30 rburton-: yeah, initially the xml support for refactoring was non existent in eclipse adt but it's all in there now Apr 01 22:33:53 slowly they'll improve but intellij just leads the way Apr 01 22:34:47 i wish vim had those kinds of capabilities. i mean i guess you can do with with regex and a couple of plugins but i'm not that kind of ninja Apr 01 22:34:53 I just need to get use to annoymous classes all over in Android development and casting like a mofo Apr 01 22:35:38 yeah. you don't _have_ to use anonymous classes for all the callbacks and such, it's just usually easier that way. will be neat to see what happens with lambdas in 1.8 Apr 01 22:36:07 I really need to figure out a better way of handling this environment specfic values for mobile development Apr 01 22:36:20 emulator vs real phone is easy, but development vs production. Apr 01 22:36:23 i'm not sure how java is implementing that but i wonder if it will be even possible to make use of them in anroid off the bat since all the methods are expecting an object that implements an interface and not lambda functions Apr 01 22:36:58 http://www.asyncdev.net/2011/02/android-dev-prod-builds/ Apr 01 22:37:02 speakingcode-wor I could define a class but then like you meantion, it gets hard to follow Apr 01 22:37:19 that's why I use them and that's why Android development encoruages inner classes Apr 01 22:37:30 so you lean towards doing it. Just feels noisy Apr 01 22:38:03 the only time i don't do anonymous is if i'll be using it in more than one place, which is rare with most of the callback things Apr 01 22:39:03 priceless ;) Just ran into a bug because I seralize a token object and since the physical package name changed, FileQueue is telling me I'm a tard Apr 01 22:39:55 hehe Apr 01 22:40:15 take a look at that link i pasted about managing environment stuff for different build targets Apr 01 22:40:24 I think exceptions should be more angry. e.g., "Come on man, you have com.blah.ClassName serialized but you have a class named ClassName located in com.upyours.ClassName" Apr 01 22:40:31 sadly the eclipse project seems understaffed. i dont even think they did any performance testing for 4.2. if i recall, google made a donation to them Apr 01 22:41:32 rburton-: i agree, can you work that into *nix land too ? Apr 01 22:41:33 yeah rburton- the exceptions are a bit vague and also the stack traces are bit more ambiguous Apr 01 22:41:49 bankai_: Mac OS Apr 01 22:42:08 Exceptions in the Square projects are good. I'm a stickler for exception messages and details around exceptions. Apr 01 22:42:15 i hate that logcat cuts off the ful ltrace with "11 more.." so much, and also things like NPE only show the line and not the exact reference that was null Apr 01 22:42:27 Tell me what you know as a developer "Tried to dig a whole using 'shovel' but his concrete and expected a 'jackhammer'." Apr 01 22:42:37 speakingcode-wor: the "11 more.." is java, not logcat Apr 01 22:43:03 pisses me off when its a line of code with like three or four vars and i have to go diving around looking to figure out which one is even causing the exception and then going further to figure out why Apr 01 22:43:08 g00s: o Apr 01 22:43:24 speakingcode-wor When your stack is too deep java says forget digging deeper Apr 01 22:43:55 fair enough, though annoying nonetheless Apr 01 22:44:26 so you know when you startup an app, before even the main activity loads up have a blank screen or either whatever you set to android:windowBackground Apr 01 22:44:27 it's particulalry annoying when working in a highly threaded component and not being able to see off the bat where the call even originated from Apr 01 22:44:38 Is this line correct if it is in a fragment? Apr 01 22:44:38 super.getActivity().onWindowFocusChanged(hasFocus); Apr 01 22:44:46 is there an easy way to only have he background set on launch.. aka slash screen Apr 01 22:44:52 this is before even the first activity loads Apr 01 22:44:56 use a theme Apr 01 22:45:04 android:windowBackgorund Apr 01 22:45:16 yeah I have that Apr 01 22:45:26 but the background stays for ALL my other activities Apr 01 22:45:28 which I don't Apr 01 22:45:38 *don't want Apr 01 22:45:44 xastey you might consider having a separate activit or view that covers the screen and waits a few seconds or for a click to go away Apr 01 22:45:51 use different themes? change it in onCreate? Apr 01 22:46:05 ugh please do NOT use a separate activity or wait a few seconds Apr 01 22:46:11 14% battery... time to jump to the power supply :) Apr 01 22:46:12 nobody wants to see your splash screen Apr 01 22:46:18 JakeWharton: i agree Apr 01 22:46:19 JakeWharton: ha true Apr 01 22:46:19 umm yes I could do that.. but in my case this is what happens Apr 01 22:46:19 how to represent an Activity in UML class diagram? Apr 01 22:46:24 but he said he wants a splash Apr 01 22:46:28 I created a context menu when I click on an item in a ListView, then I select something in the context menu so when that happens, how do I get what I selected in the ListView from there? Apr 01 22:46:28 when I launch my app it takes a while for my MainActivity to show up Apr 01 22:46:44 JakeWharton: because you said that, I'm going to force users to watch a 1 minute long video introduction. Apr 01 22:46:45 xastey: on a device, or just on emulator? Apr 01 22:46:49 so in the mean time I have android:windowBackground set and all is well Apr 01 22:46:51 on device Apr 01 22:46:52 xastey: clear or change the window background in your onCreate Apr 01 22:47:04 alright thats what I'm doing now JakeWharton Apr 01 22:47:10 i'd try to see if i could speed up the load Apr 01 22:47:27 actually speakingcode-wor I want the load delay Apr 01 22:47:34 not sure what you're doing but maybe you could asyncrhonize some of your initialization or lazy load things Apr 01 22:47:38 o... ok Apr 01 22:47:48 yeah I know odd Apr 01 22:47:49 rburton-: insta-uninstall Apr 01 22:47:57 crack3r : you draw a box and put "Activity" in it :D Apr 01 22:48:00 the rest of the app is just fine.. but I do have a large image being loaded Apr 01 22:48:09 You wouldn't do that! You would watch/rewatch the introduction video :) Apr 01 22:48:20 loaded twice, from res/ so I can do an endless scroll effect.. so maybe thats why it loads so slow Apr 01 22:48:39 why do you need it twice? Apr 01 22:48:48 Okay crap on me.. my FileTransferTask is being serialized to disk, but when it restores it's not restoring the full path Apr 01 22:48:52 full object Apr 01 22:49:44 speakingcode-wor cause I need it to loop seamlessly Apr 01 22:50:06 can't just use 1 instance.. have to use 2 so it can wrap around smoothly without a loop Apr 01 22:50:25 actually nvm.. its loaded once in a ListView.. getting ahead of myself Apr 01 22:50:33 forgot the view isn't created untill needed Apr 01 22:50:47 not sure what you're doing exaclty but im 1000% positive it can be accomplished without loading an image resource twice Apr 01 22:51:20 but, shrug Apr 01 22:51:26 hello guys Apr 01 22:51:47 if android kills your application then when you click the app icon you get back to the activity ? Apr 01 22:52:31 parhs i am not sure what you're asking exactly but i think i understand and the answer is it depends on a few factors Apr 01 22:53:35 i extend Application class Apr 01 22:54:01 if only the activity is killed, then it will go back to that activity. if the whole "task" is killed, then relaunching will go back to the initial activity, iirc Apr 01 22:54:34 i store there an object as static Apr 01 22:54:53 and i use this class for my application.. Apr 01 22:54:59 JakeWharton: I see why you guys are removing Serialization ;) Apr 01 22:55:05 but if i leave it for long time then when i get back i get to my activity Apr 01 22:55:11 now if only Java would remove it from their API Apr 01 22:55:23 the variable in application is null Apr 01 22:55:37 ;) Apr 01 22:55:46 I so should have done private static final long serialVersionUID = -1; Apr 01 22:55:50 i thought that because it is singleton it would work Apr 01 22:55:53 now i need to drain this queue ;) Apr 01 22:56:01 Parhs: then the whole task is being 'killed' and resetting back to initial state when you relaunch Apr 01 22:56:21 Parhs: singleton doesn't mean it lives forever. only means there is a single instance of it when its initialized Apr 01 22:56:27 but it gets back to my activity from logcat Apr 01 22:56:43 Okay battery is low. time to race home. Make some coffee and back to coding! Apr 01 22:56:44 if you want values to persis indefinitely, you need to store them in either file storage, preferences, or sqlite Apr 01 22:56:46 yes but it is within Application object which they claim that goes with app Apr 01 22:57:48 Think there's a good answer on SO which explains that Application is not meant for persistent data. Apr 01 22:57:54 At least not persistent-persistent Apr 01 22:58:34 can I return any type of object through an Intent? Apr 01 22:59:13 Parhs: it is persistent within a single task Apr 01 22:59:35 when the task is killed, all state of all of the activities in that task and the application object, are gone Apr 01 23:00:01 so if you're using the application object to put some value then retrieve later, you misunderstand the paradigm and you're doing it wrong Apr 01 23:00:11 what you could do Apr 01 23:00:47 is in your APplication class where you have setWhateverValue() and getWhateverValue()... .in the set, store it somewhere like system preferences or in a file or whatever Apr 01 23:01:25 then in the getter, say if (whateverValue == null) { //load from storage} return whateverValue; Apr 01 23:01:55 i want them for temp data though. Apr 01 23:02:04 ok? Apr 01 23:02:08 anyone? Apr 01 23:02:14 i mean if application is killed i dont care if these data are lost Apr 01 23:02:19 ........ Apr 01 23:02:32 so you say that this isnt possible and i should use preferences and serialisation Apr 01 23:02:39 your concern about it being lost if the application is killed implied otherwise Apr 01 23:03:01 do the classes generated from AIDL change? are they specific to the app that compiles them? can I generate the java and embed it in a .jar library? Apr 01 23:03:01 i dunno man i don't know what you're trying to do cause you've contradicted yourself more than once as far as i can decipher Apr 01 23:03:23 Does kill application mean starting from the activity you were before ,or the first activity (like closing from task manager) Apr 01 23:04:03 probably static variables within Application die as it keeps only the instance ? Apr 01 23:04:15 there are activities Apr 01 23:04:24 activies can be individually killed when backgrounded Apr 01 23:04:28 there is a "TASK" Apr 01 23:04:33 all the activities run within that task Apr 01 23:04:38 /ignore speakingcode-wor Apr 01 23:04:52 g00s: ? Apr 01 23:04:57 damn it :) sorry speakingcode-wor , your nic is so long is messing up the formatting on colloquy Apr 01 23:05:30 at least on the blackboard theme; please dont take it personally, i have to change the css Apr 01 23:05:41 ok.. but keeping static variables is a problem you say Apr 01 23:06:09 g00s: no problem i just thought you were implying i was speaking insanely and inaccurately Apr 01 23:06:20 speakingcode-wor: no, again - sorry Apr 01 23:06:58 anyway, when the 'task' itself is killed all the state is lost, even in your Application object Apr 01 23:07:14 i don't think you understand what static vars are Parhs Apr 01 23:07:20 Parhs: why not use the outgoing bundle ? Apr 01 23:07:31 onSaveInstanceState() Apr 01 23:08:04 they don't 'live forever', they just live in the heap and not in the stack, they aren't bound to an object, they are bound to the class instance Apr 01 23:08:45 if you initialize a value into the static variable where it's defined, like say static String foo = "bar"; then it will always have the value Apr 01 23:08:59 lol, no Apr 01 23:09:02 you're thinking of final Apr 01 23:09:36 but if you just have static String foo; and then you go and say someclass.foo = "bar"; somewhere else, then there is possiblity of SomeClass.foo being null Apr 01 23:10:17 so if you say SomeClass.foo = "bar"; i.e. the second case, and then the app is killed, upon restart SomeClass.foo is null again until it is assigned a value Apr 01 23:10:53 jasta i don't believe i'm thinking of final of final has to do with immutable reference Apr 01 23:11:05 static String foo = "bar"; Apr 01 23:11:07 SomeClass.foo = null; Apr 01 23:11:09 foo is now null. Apr 01 23:11:25 yes, but i'm assuming he isn't assigning null to it Apr 01 23:11:42 "if you initialize a value into the static variable where it's defined, then it will always have the value." Apr 01 23:11:55 without final, this statement is absurd. and false. Apr 01 23:12:00 rewrite Apr 01 23:12:17 if you initialize a value into the static variable where it's defined, then it will always have the value, unless you sign it another value (including null) Apr 01 23:12:27 assign* Apr 01 23:13:11 the point i was trying to make is if he is just declaring a static var, and then assigning a value somewhere else, there's no reason to expect that valu to not be null upon the next launch of the application Apr 01 23:13:46 bu that's what he seems to be expecting Apr 01 23:21:59 can I return any type of object through an Intent? Apr 01 23:23:05 hesperaux: return to? Apr 01 23:24:13 Activity Main starts ActivityB for a result with intent INTENT_B. I want ActivityB to send back a BluetoothSocket via an Intent Extra. Is that possible? Apr 01 23:24:35 if it's Parcelable, yes Apr 01 23:24:36 otherwise, no Apr 01 23:24:46 Damnit, beat me to it Apr 01 23:25:16 you want to send a socket through an intent? Apr 01 23:25:40 that seemed like one way to do it, so yes Apr 01 23:25:41 That's what you do with sockets, right? Send them! ;p Apr 01 23:26:07 kakazza, i can't tell if that's sarcasm Apr 01 23:26:21 think of an intent like a conversation with another person. when i'm telling you about a novel I don't speak the entire novel, i tell you about the novel and you go get it yourself to read Apr 01 23:27:05 so you're saying it's bad form to send large objects via an Intent? Then how do I get the bluetooth socket from my bluetooth connection activity into my main activity? Apr 01 23:28:57 hesperaux: there's a few ways Apr 01 23:29:20 hesperaux: you use a service or something else to hold the socket connection Apr 01 23:30:32 you coudl do what evanc said, or you could use a static singleton to hold a reference to the object then retrieve that referene from the other activity Apr 01 23:30:32 hmm Apr 01 23:30:32 passing objects between activities is a bit of a PITA imo Apr 01 23:30:32 speakingcode-wor, do you think keeping a static reference is sloppy/lazy? I kind of like that idea because it's easier... Apr 01 23:30:32 not really sure why they limited that Apr 01 23:31:15 hesperaux: i do it often, just depends on how you do it Apr 01 23:31:15 if it's appropriate, then it's appropriate Apr 01 23:31:15 you could always set the static ref back to null for garbace collection purposes after you've retrieved it in your main activity Apr 01 23:32:28 yeah, although it wouldn't terrify me to keep a tiny memory address hanging around anyway Apr 01 23:32:28 so that once your activity is gone, the bluetooth socket object is ready for gc Apr 01 23:32:28 ah, you mean the copy of the object. nvm Apr 01 23:32:28 nod, but you don't want the connection object hanging around when you're done with it, though a single object instance probably is insignificant, unless it's huge Apr 01 23:33:28 i agree Apr 01 23:33:28 hesperaux: you shouldn't probably be doing sockets in your activity at all Apr 01 23:33:28 I implement BT as a service and pass the parsed data from the service up to the activities Apr 01 23:33:28 via service messaging Apr 01 23:33:28 ^^ could do that too Apr 01 23:33:28 you really don't want your BT socket in a activity; then rotating or backgrounding can break your socket Apr 01 23:33:28 and that makes for sadness Apr 01 23:33:28 heh Apr 01 23:34:14 yeah it's important that the data stream remain in tact Apr 01 23:34:14 service probably is the way to go then Apr 01 23:34:14 it will be a stream of timed integers using SPP Apr 01 23:34:18 service will have better lifetime and what not Apr 01 23:35:20 just make sure to provide the user a way to stop the service if they want so it's not just living endlessly draining up cu and battery Apr 01 23:35:20 can anyone point me to a useful tutorial or resource to learn about doing that? I am new to the Android API Apr 01 23:35:20 speakingcode-wor, i was gonna have a button for that purpose Apr 01 23:36:20 and onFinish() would do it also, based on a preference Apr 01 23:36:20 hesperaux: there is android documentation, and i have an example audio streaming ap that uses a simple bound service model Apr 01 23:37:21 it's pretty old though and probably has some bad practicies, but it will show you a working example of how a bound service works. there are other service models which may be more appropriate to your case; i used a bound service in that instance because i needed lots of back and forth communication between the service and the ui Apr 01 23:37:21 I will need that also Apr 01 23:37:21 hesperaux: just look at the BluetoothChat sample Apr 01 23:37:22 or that Apr 01 23:37:34 i have that open Apr 01 23:41:28 is there a place I can read or watch about the concept of using a service? Apr 01 23:42:34 hesperaux: d.android.com has some nice examples Apr 01 23:43:34 http://developer.android.com/guide/components/services.html Apr 01 23:47:38 speakingcode-wor, thanks Apr 01 23:47:38 I'm in a fragment so I can't use OnWindowFocusedChanged. Is OnGlobalLayoutListener a good alternative? Apr 01 23:52:31 anybody know what time of the day dev console stats get updated ? Apr 01 23:53:36 g00s: right around beer thirty, which is rapidly approaching Apr 01 23:53:53 thus my queue to exit. have a good one Apr 01 23:54:00 gnight Apr 01 23:54:33 but i dont thats the right answer ;) Apr 02 00:03:12 Okay time to find a nice solution to this environment specific state e.g., remote URLs etc Apr 02 00:05:07 Is the activity already drawn in the onStart()? Apr 02 00:10:07 agy2154: no Apr 02 00:10:14 after onResume() i think Apr 02 00:11:20 StingRay_, I can't use a OnWindowFocusedChanged in a fragment so do you think onResume() would be safe for me to use? Apr 02 00:12:17 safe ? Apr 02 00:12:22 not sure I understand the question Apr 02 00:18:08 StingRay_ : So I wan't to measure the width and height of a imageview and i am waiting for it to finish drawing the imageview. Would it work with an onResume() or onSTart()? Apr 02 00:18:25 oh neither Apr 02 00:18:39 Before I moved it into a fragement it was in an OnWindowFocuusedChanged Apr 02 00:19:01 well ONLY if focus change occured Apr 02 00:19:08 brb cuppa Apr 02 00:21:16 StingRay_, Alright then Ill be back too. Going to ttake a shower. Apr 02 00:21:41 agy2154.onStop() StingRay_.onStop() Apr 02 00:22:03 g00s: I think you're looking for .finish() Apr 02 00:22:17 :) Apr 02 00:23:49 So If I make a finish() meathod It will run the code when eveyrhitng has been drwan? Apr 02 00:24:23 tis the 2nd of april here now Apr 02 00:24:35 you have to account for timeZones Apr 02 00:29:05 if you want dimensions info cant you get it onLayout onMeasure ? Apr 02 00:29:21 What do you mean Apr 02 00:29:28 Should I just make a runnable? Apr 02 00:29:46 Ohh Apr 02 00:30:05 StingRay_, I tried on Measure and It gave me incorrect measures for some reasion when I tried to get the x and y Apr 02 00:30:22 Yeah measuring in advance doen's twork Apr 02 00:30:26 if you read about the method there is a proper way to do it Apr 02 00:30:43 the values in are not useable pixel values iirc Apr 02 00:31:09 ahh Apr 02 00:32:43 agy2154 add a "preDrawListener" and in its listener u can get dimensions for the view, measuredX, measuredY Apr 02 00:32:49 width/height* Apr 02 00:34:07 view.getViewTreeObserver().addPreDrawListener Apr 02 00:34:49 Will I need a MeasureSpec? Apr 02 00:35:12 no Apr 02 00:36:11 jug6ernaut_, Alright thanks. I'll follow your steps. I hope it doens't give me the same problems as last time; I kept getting either 0 or a awkward number. Apr 02 00:36:41 right Apr 02 00:37:53 because the dimensions arnt calculated until the views are all laid out, when u are trying to get the dimensions is before this happens probably Apr 02 00:38:57 So do you think it will work this time? Apr 02 00:42:48 jug6ernaut_, I don't think I can use a addOnPreDrawListener in a fragment Apr 02 00:43:06 what are u trying to do exactly Apr 02 00:44:58 Measure my imageview which is in a realtivelayout. Overall, the fragment is in a fragment activity and before It was in a actiity and I had a windowfocuslistener which worked perfectly but now I can't use that. Some places online suggested a addOnGlobalLayoutListener or somthing similar to that. Apr 02 00:50:23 agy2154: but whats the purpose ? Apr 02 00:51:52 StingRay_, I need to find out whe x and y so I can place my textviews exactly on by percentage. DP won't work becase it isn't %100 relative and I already have a decent amount of code for the positions set up so all i need right now is to obtain the x and y Apr 02 00:52:21 StingRay_, Looks like a onGlobalLayout might just work. Apr 02 00:52:21 A phonegap question: I'm following the example at cordova's website - ipsis litteris - yet the function bound to the menubutton event doesn't trigger. Do I have to enable/disable something in the java part of the app? Apr 02 00:52:39 konr: this is not for phonegap Apr 02 00:52:43 this is android dev Apr 02 00:52:52 but there is a #phonegap Apr 02 00:53:07 StingRay_, Do runnables run after everything is drwan? Apr 02 00:53:24 agy2154: I dont think so Apr 02 00:53:36 a postDelay hung of a view element may Apr 02 00:53:56 StingRay_, Someone actually posted this. Wow. Its almost the exact same thing I'm going through.. http://stackoverflow.com/questions/12352920/measure-view-in-fragment Apr 02 00:55:02 and almost the exact solution that Jug gave you Apr 02 00:55:53 StingRay_, Yeah but I needed to use a addOnGlobalLayoutListener which I did right now and it worked perfectly. Thank you StingRay_ for helping. Apr 02 00:55:56 Also Jug. Apr 02 00:56:28 agy2154: i did this today, similar http://pastebin.com/ Apr 02 00:56:44 obviously you measure you replace with your imageview Apr 02 00:56:54 brx_: u created pastebin ? Apr 02 00:56:55 wow Apr 02 00:57:00 brx_, yeah. lmao i was about to say that Apr 02 00:57:03 shit Apr 02 00:57:14 brx_, no but for real that what I went thogugh Apr 02 00:57:38 personally I think your doing something wrong when you have to work in abosultes Apr 02 00:57:49 brx_, won't it be better to use a addOnGlobalFocusListener than a addOnGlobalLayoutListener... the addOnGlobalLayoutListener does the job though. Apr 02 00:57:57 http://pastebin.com/zCUCBrTx Apr 02 00:58:08 hadnt pasted it :) too late Apr 02 00:58:39 brx_, Yeah that Apr 02 00:59:04 That is what I went through. Do you think a addOnGlobalFocusListener would be better since it would be for that specific view right? Apr 02 00:59:38 inot sure mate, try it! Apr 02 01:00:24 * brx_ returns to trolling on youtube Apr 02 01:03:03 its all over; if this sea lion can keep beat to back street boys, its inevitable they will be programming computers in short order Apr 02 01:05:27 g00s, what do you mean? No more programmers? Apr 02 01:05:36 brx_, Doesn't work. Stick to your current code lmao. Apr 02 01:32:28 Is there anyway I can kill a listener? Apr 02 01:33:33 I guess i will just set it to null. Apr 02 01:33:38 ij? Apr 02 01:33:50 err define kill Apr 02 01:34:58 funkbox, like stop listening. for example on click listener. In my case its ImagePlace.getViewTreeObserver().addOnGlobalLayoutListener(this); Apr 02 01:34:58 I tried ImagePlace.getViewTreeObserver().addOnGlobalLayoutListener(null); but it didn't work Apr 02 01:35:19 wow removeGlobalOnLayoutListener Apr 02 01:36:04 Works great. Thanks. Apr 02 01:38:04 yeah add/remove. if it's a setXXX then setting it to null will kill it Apr 02 01:38:14 add means "add this one in addition to whatever's there" Apr 02 01:38:17 that's why it did't work Apr 02 01:38:36 funkbox, null crashed my app. Apr 02 01:38:51 funkbox, Instead i used the removeGlobalOnLayoutListener Apr 02 01:44:43 Does ubuntu have fastboot and adb drivers for the nexus 7? Apr 02 01:56:59 ha found an interesting bug with my ListView + Universal Image Loader ;) Apr 02 01:57:26 since it loads in the background if you flick through the list it (Universal Image Loader) will update the ImageView to the wrong icon sometimes Apr 02 01:58:14 i have a quick question. when items in an AbsListView are "chosen" does that mean they're selected, as in, setSelected(true) ? Apr 02 02:00:05 rburton-: when i last did automatic loading, getView would queue the load, and return a dummy, which then calls notifyDatasetChanged, it did not update the view Apr 02 02:00:27 the change event then triggers a second getView, which will show the cached copy, that it just fetched Apr 02 02:00:32 because i'm reading the AbsList doc, and in the choiceMode section it says, "By setting the choiceMode to singleChoice, the list allows up to one item to be in a chosen state." Using the word 'chosen' seems ambiguous Apr 02 02:01:06 rburton-: cpu usage is a bit worse, but it wont have that bug, and cpu can be improved by batching the notifyDatasetChanged calls together Apr 02 02:02:09 Basically load the images in the background and update the adaptor to re-paint the list Apr 02 02:02:22 yep Apr 02 02:02:30 Makes sense Apr 02 02:02:36 in my case, it didnt have any images, it was displaying chat from an sqlite table Apr 02 02:03:47 the biggest issue i can see for performance, is batching things up Apr 02 02:04:16 like delaying the notifyDatasetChanged 10 or 20ms, and only firing once, so several images get into a single reload Apr 02 02:05:20 when i was trying it out, i only loaded one row from sqlite at a time, so it wound up chewing a lot more cpu usage Apr 02 02:05:33 but was purely async, so it was more responsive, i think Apr 02 02:14:04 * clever heads to bed Apr 02 02:23:32 Trying to create a file scanner is a real headache, how do i deal with files being moved, if the user renames a directly mid scan it screws everything up Apr 02 02:55:06 do0ob: you need to implement a feature where it punches the user if they do that Apr 02 02:55:45 <[deXter]> +1 Apr 02 02:57:00 on a more serious note, you can try using a FileObserver to watch for events, and try to fix things up afterward or during the scan Apr 02 02:58:09 Yup, i can tell this is going to be a headache **** ENDING LOGGING AT Tue Apr 02 02:59:58 2013