**** BEGIN LOGGING AT Wed Sep 18 03:00:00 2013 Sep 18 03:22:37 I have an Intent object, can I get an activity from it? Sep 18 03:25:16 zquad, What do you mean by "get an Activity?" Sep 18 03:25:24 one sec Sep 18 03:52:23 hey all Sep 18 05:10:55 hm. if the android framework has a private class x.y.x, and i copy that class into my own code but leave the package the same, would there be any potential issue ? Sep 18 05:11:07 i'd rather not modify the original files, just makes it easier Sep 18 05:11:58 if I have an ArrayAdapter typed to my own class rather than a generic one and then set it to a ListView, how would I retrieve the an array of strings stored inside? If I just do ArrayAdapter, I can set the ListView's rows just fine with a List of Strings. Sep 18 05:12:11 -the Sep 18 05:12:47 spike021 did we talk about this already? use BaseAdapter Sep 18 05:12:48 g00s: potentially yes, when installing you'll see warnings about ignoring class already in classpath or something like that, and it will use the system's version rather than your own Sep 18 05:13:16 and if the system's version is substantially different you will be in trouble. you could use proguard to change the package name but probably better to just change it yourself Sep 18 05:13:25 g00s: something similar yes. I know you suggested that. Is there a reason I can't just stick with what I have? Sep 18 05:13:44 kevinb hm, ok. so technically i could maybe make it a compile dependency only, but seems safest to rename it. ok thanks ! Sep 18 05:14:10 spike021 because ArrayAdapter is stupid Sep 18 05:14:20 read the code for it Sep 18 05:14:25 and decide, if it deserves to exist Sep 18 05:14:49 g00s, I'm just going off of what was recommended for now. If I can make it work, at least I'll understand why *not* to use it Sep 18 05:15:06 I'll even implement it both ways. I just want to understand right now Sep 18 05:15:28 BaseAdapter is the more generic concept / abstraction Sep 18 05:15:33 it smore important to understand how that works Sep 18 05:15:52 ArrayAdapter adds very little value over BaseAdapter. if you can use an ArrayAdapter without overriding it then great. but if you're going to override it then starting with a BaseAdapter is often easier as it's very obvious how it works Sep 18 05:15:55 when i looked through ApiDemos a while back, all the examples that stuffed an ArrayList still used BaseAdapter Sep 18 05:16:23 kevinb agreed; and when you use BaseAdapter, there is no question who "owns" the model Sep 18 05:16:38 and when . how . who needs to call notifyDatasetChanged, etc Sep 18 05:19:16 ok Sep 18 05:19:49 spike021 when you use a different model, maybe a primitive array, you can still use BaseAdapter Sep 18 05:19:57 or another data structure Sep 18 05:20:14 and when you implement a CursorAdapter, again you will be able to carry over some of the concepts Sep 18 05:20:40 although bindView is a little different Sep 18 05:31:25 <\0x90\> if var oldValue is int 1 Sep 18 05:31:33 <\0x90\> and you do oldValue = oldValue++; Sep 18 05:31:50 <\0x90\> should oldValue be 2 or am i crazy for thinking it should ? Sep 18 05:33:13 Should be two Sep 18 05:33:33 because it first does oldValue = oldValue then the oldValue++ Sep 18 05:34:14 <\0x90\> yes, for some reason it aint. Sep 18 05:34:24 Maybe its some Java thing Sep 18 05:34:33 If you're actually coding like that you should be shot Sep 18 05:35:02 <\0x90\> incrementing int like that ? Sep 18 05:35:16 wouldnt you put the ++ in front Sep 18 05:35:32 <\0x90\> btw, this was just... a question, the code doesn't look like this Sep 18 05:37:17 desmin88, preincrement versus post increment Sep 18 05:37:38 oh wait, sorry, I'm tired Sep 18 05:37:41 it would be one Sep 18 05:37:46 derp Sep 18 05:38:13 post increment increments a tmp value that isn't getting assigned to anything Sep 18 05:38:42 ya Sep 18 05:38:48 kevinb do you use AS ? Sep 18 05:39:04 yes, though not using gradle and i still use ant for my release builds Sep 18 05:39:49 kevinb oh, i thought you pretty much needed gradle with AS. ok, well - when importing a gradle model there is this thing 'use auto import' dunno what that means , hmmmm Sep 18 05:40:27 g00s, I've checked it and not checked it and didn't notice anything :P Sep 18 05:40:37 desmin88 haha, i thought i did too Sep 18 05:40:41 i imported the source directly and it worked though it used to give warnings. it's kind of in intellij mode. i tried switching to gradle but was getting OOMs in AS and got tired of fighting with it Sep 18 05:40:49 thats why i can never remember if i should use it :D Sep 18 05:41:29 kevinb oh no Sep 18 05:41:37 yeah, it does take a lot of memory Sep 18 05:41:49 i dont find the as takes up that much memory... Sep 18 05:41:57 basically, i can only have AS , a browser, and the emu and there goes all my 4G Sep 18 05:42:35 you only have 4gb of ram? Sep 18 05:42:40 yeah Sep 18 05:42:42 well i used to use eclipse, so i'm happy to give AS all the memory in the world, but it meant i had to keep finding different input boxes to add -Xmx2G to or whatever Sep 18 05:43:17 eeek. thats so little d: Sep 18 05:43:25 at some point i plan on switching to gradle proper, but i'll wait until it's a bit more stable and i can use it for release builds as well Sep 18 05:44:29 i find myself being limited by my 16gb.. Sep 18 05:44:48 oh " This will let Studio re-import your build.gradle whenever you edit it." Sep 18 05:44:59 so there - don't have to keep pressing that sync model button Sep 18 05:45:21 ... Sep 18 05:45:26 im going to check it everytime. Sep 18 05:46:30 wow that's a oddly named checkbox Sep 18 05:46:41 it sounds like it's a one time thing to help with importing the project Sep 18 05:47:03 agreed Sep 18 05:48:10 what kinda projects do you guys work on? Sep 18 05:48:40 i need a pet project to make in my spare time d; Sep 18 05:48:48 so you want to compete with us? :P Sep 18 05:49:06 no Sep 18 05:49:23 the statements weren't meant to sound connected haha Sep 18 05:49:29 i do personalization apps, Nova Launcher and WidgetLocker Sep 18 05:49:50 sweet thats cool you work on nova Sep 18 05:50:06 ive never heard of widgetlocker Sep 18 05:50:47 similar idea, but for the lockscreen (and it supports 2.x) Sep 18 05:51:26 interesting. Sep 18 05:51:43 once i get my OK from verizon that my warranty replacement is cool with them ill try it out Sep 18 05:52:22 (LCD started dieing and looked like it cracked even though the glass was fine) Sep 18 05:53:12 now that i think about it, thats the second time i warrantied my droid dna for lcd issues ... Sep 18 05:54:16 if you like the idea of personalization apps, Roman Nurik released the source code for a month view calendar widget. It looks really sharp. but it doesn't show events, just a month view Sep 18 05:54:32 making it into a full featured widget would be a fun project Sep 18 05:55:23 So guys. Android Studio or IntelliJ Ultimate? Sep 18 05:55:30 AS. Sep 18 05:55:58 kevinb: thats interesting, i saw it a while back but never read into it, thanks for reminding me Sep 18 05:58:29 what's the debugging option that helps simulate low memory conditions? can't seem to find it on my phone Sep 18 05:59:33 umm Sep 18 05:59:35 one way Sep 18 05:59:39 is destroy activities? Sep 18 06:00:44 f2prateek ^? Sep 18 06:01:03 well destroying would probably free up memory not simulate low memory conditions Sep 18 06:01:14 kevinb seems the issue i have most with AS is - when i go to build from the command line, i may get an error (syntax, missing import, etc) … but AS doesn't seem to be showing anything itself Sep 18 06:01:21 I guess I could keep starting apps but that's not a reliable test Sep 18 06:01:45 well if a phone has less memory it will destroy activities more often to free up memory for other apps so technically its low memory Sep 18 06:01:56 f2prateek: "Don't keep activities" is the name of the debug setting that will cause your activity to be destroyed as soon as you leave it Sep 18 06:02:04 f2prateek there is an options in the dev tools apk, something like 'destroy activity immediately' maybe ? Sep 18 06:02:10 g00s: i think that's a gradle thing Sep 18 06:02:16 hm Sep 18 06:02:21 g00s: thats what i said :( Sep 18 06:02:33 oh heh, sorry desmin88 Sep 18 06:03:58 I see the destory activity option, but not what I need, I'm actually testing a service and figure out how to optimize it with tighter memroy restrictions. I do remember reading about an option that could limit the the memory available for the entire device just can't find Sep 18 06:06:16 start an emulator with limited memory set to it? Sep 18 06:07:36 That's what I've been doing, but testing on an emulator is slow and not ideal :( Sep 18 06:07:58 i dont think there is another way Sep 18 06:08:28 if you specifically want to test it being killed/restarted you can use "kill" from adb shell (maybe need to use run-as first for permissions) Sep 18 06:11:23 I want to analyze an OOM in the service, haven't been able to replicate on my devices but keep getting user reports Sep 18 06:13:04 umm Sep 18 06:13:20 initialize huge empty arrays Sep 18 06:14:56 desmin88 what ? Sep 18 06:15:19 he said he wants to limit memory :{\ Sep 18 06:15:21 :P* Sep 18 06:16:28 im only half joking Sep 18 06:17:45 on froyo you could start the web browser; that would cause crush everything :) Sep 18 06:17:49 on my droid-1 Sep 18 06:18:03 hehehe Sep 18 06:20:31 ok guys im signing off for the night 2:30 am for me haha Sep 18 06:20:45 gnight Sep 18 06:20:59 sleep is for the weak Sep 18 06:21:08 hey capella Sep 18 06:21:16 :D hey g00s Sep 18 06:21:22 I wish I could sleep for a week Sep 18 06:21:58 * capella has been up for 26hrs ... heh - actually should crash here too Sep 18 06:27:22 Leeds still use vim for android :P Sep 18 06:27:30 hello, yes? Sep 18 06:27:43 AS is such a pia Sep 18 06:27:58 i just imported a project, from a gradle model ... Sep 18 06:28:11 Hm, any reason why the Android File Transfer app doesn't want to show me files my app has written to external storage? Sep 18 06:28:22 and then restarted AS, and it says "this project is not using gradle as a build system, would you like to convert" Sep 18 06:28:57 Maybe it wasn't gradle enough Sep 18 06:30:04 but prefs->gradle has the project linked ... Sep 18 06:35:47 Leeds how do you handle your imports? also what plugins do you find useful? the only ones i use are ctrl-p Sep 18 06:36:07 by hand, and none - although I started looking for useful ones a couple of weeks ago Sep 18 06:37:23 Leeds this one has been pretty useful so far http://kien.github.io/ctrlp.vim/ Sep 18 06:45:44 Ok, I'm a moron, forgot to call scanFiles. Sep 18 07:05:45 pretty ambitious http://www.wired.com/business/2013/09/dropbox-2/ Sep 18 07:05:50 too bad its the cloud Sep 18 07:06:34 now, if can run their service from a raspi i would be more interested ;) Sep 18 07:06:44 and i'd even *pay* for that :D Sep 18 07:19:49 g00s_: can you please re-tell the story in two words? what is exactly ambitious? Sep 18 07:20:08 what exactly is ambitious :) Sep 18 07:20:20 squ moving away from syncing files - being file centric Sep 18 07:20:41 seems like they were syncing event streams Sep 18 07:21:14 hm Sep 18 07:21:39 war is going on there Sep 18 07:21:47 kinda seems like they are moving towards something like firebase ? Sep 18 07:23:41 for me it seems that companies are trying to be independent in all possible services Sep 18 07:24:06 yeah, i would like that :) Sep 18 07:24:14 apple won't give dropbox its users Sep 18 07:24:49 they want their ecosystems to be sticky Sep 18 07:25:03 g00s_: apple introduced centralized password create & store in safaris cloud Sep 18 07:25:09 but i dont want to get stuck :) Sep 18 07:25:23 this means you do not know your own password Sep 18 07:25:54 imagine that rule applied to all other services Sep 18 07:26:46 g00s_: what do you mean by sticky ecosystems? Sep 18 07:27:05 apple wants to lock you into their ecosystem Sep 18 07:27:11 so does google for that matter Sep 18 07:27:26 Hi all, Is there an open source library for a pull-down-refresh listview? Which is like the current gmail app? (not with an arrow). I need this for using it in a master-detail layout Sep 18 07:27:35 yea, we seem to agree :) Sep 18 07:28:12 g00s_: who will use dropbox then? windows and linux users? Sep 18 07:28:13 squ i like something like BitTorrent Sync more :) Sep 18 07:28:51 bittorrent's trying to lock you in!!! Sep 18 07:29:05 oh, actually in that case the code is not open source Sep 18 07:29:13 alex_PP is right ;) Sep 18 07:29:16 there is a gnu project Sep 18 07:29:19 gnunet ? Sep 18 07:29:35 https://gnunet.org/ Sep 18 07:35:25 squ reading that wired article, it seemed - without mentioning internet of things - they were going to move into that space also like xively.com Sep 18 07:36:34 don't know about that Sep 18 07:37:42 squ the tl;dr of the article "the company believes it must focus on becoming the default file system for a multiscreen world. " Sep 18 07:46:35 hello Sep 18 07:49:41 i using pagers and scrollviews in my application and i have a problem: i using android support library because te min SDK is 8. in Android 4+ everithing is ok, i can swipe horizontal scrollview in the pager, but in 2.x i can scroll 4-5 px and the paget intercepts the event Sep 18 08:03:24 hi. i have two issues with startActivity(Intent.createChooser(email, "Choose an Email client :")); first is how can i force it to always be on foreground and second is how can i make it give error when the app can not connect to internet? so that user will go back to switch on internet and then again submit the form? Sep 18 08:03:42 help please Sep 18 08:10:00 hello? Sep 18 08:13:18 hello, ALOGE defined in which file ? Sep 18 08:17:32 anyone have any issues upgrading to studio 0.2.9 Sep 18 08:17:35 ? Sep 18 08:23:03 good morning fellow devs Sep 18 08:25:08 Nilium still there ? Sep 18 08:25:16 Yes. Always. Sep 18 08:25:37 anyone been playing with mulicast? Sep 18 08:25:50 * Nilium is reimplementing FragmentPagerAdapter because it makes it impossible to look up fragments by id/name Sep 18 08:26:00 Nilium haha, i was just reading this on codingHorror "I used to think that PHP was the biggest, stinkiest dump that the computer industry had taken on my life in a decade. Then I started needing to do things that could only be accomplished in AppleScript." Sep 18 08:27:03 Nilium congrats though, in getting that applescript stuff to work … that was amazing :) Sep 18 08:27:13 +ly stupid Sep 18 08:29:04 is there a possibility to set the background of a standard list item (simple_list_item_multiple_choice)? thats the only thing i want to change there. Else i have to go for and custom arrayadapter and custom item view, which is much to do for a color change in my opinion :/ Sep 18 08:31:22 question: I've just started reading a book about android dev. the author jumps into xml directly and talks about view hierarchy in the xml with elements e.g. RelativeLayout. But at the same time he talks about these widgets inheriting from e.g. ViewGroup class. Are all these elements "converted" to classes when compiled or how does it work? Sep 18 08:32:14 BillTheButcher_l yes, by something called LayoutInflater Sep 18 08:32:19 afaik, yes that's how it works Sep 18 08:32:58 BillTheButcher_l think of LayoutInflater as 'hydrating' the xml into an object graph Sep 18 08:33:09 which will be hierarchical Sep 18 08:34:04 ok ty Sep 18 08:43:21 I have a problem, I am trying to cancel a handler at onPause, and then start the handler at onResume. I am able to cancel it, however, if I put handler.postDelayed(run, 1000) in my onResume, my handler is never canceled. Sep 18 08:49:54 timroes just found this :) https://code.google.com/p/android/issues/detail?id=59894 Sep 18 08:53:13 wow, gradle installDebug made the launcher crash - impressive Sep 18 09:02:12 can anyone help me please http://stackoverflow.com/questions/18817426/viewpager-inside-fragment-loses-focus Sep 18 09:06:25 how do I overwrite the standard properties of a xml? for now I made a new layout xml and copied the code from android source. There I made my adjustments and then used this instead of the standard android layout. Is there another way, so that I can use the built in adapters n stuff but have slightly customized xml? Sep 18 09:07:09 I read about include, but that doesn't really work, because I have to define a root layout and then the adapters don't work anymore Sep 18 09:08:34 Now I have the same code 2 times but with 1 adjustment ... Sep 18 09:09:06 this is bothering me so much and seems like it should be simple: I have a static string created during onCreate that I want to compose into a JSON object with the results of a LocationListenener and no dice Sep 18 09:09:24 any suggests on how to gracefully pass that static string into a composition interface? Sep 18 09:26:56 g00s_: yeah it's somehow not the best solution right now :D Sep 18 09:27:13 since android studio uses its own mechanism to upload and select devices, it would be nice to have that integrated into gradle :) Sep 18 09:27:39 i thought assembleDebug would spray my app to all the devices Sep 18 09:28:09 deviceCheck does if i remeber correctly, but installXXX doesn't somehow (and assembleXX sholdn't upload anything afaik) Sep 18 09:28:35 oops, i meant installDebug Sep 18 09:28:46 yeah Sep 18 09:29:59 capella still there ? Sep 18 09:30:25 yep :p Sep 18 09:30:34 oh, i thought you were sleeeeping Sep 18 09:30:37 :) Sep 18 09:30:42 you just woke him up :) Sep 18 09:30:44 just checking :D Sep 18 09:30:48 tries ...can't Sep 18 09:30:59 tries are cool Sep 18 09:31:27 hehehe - gonna start some coffee soon and just power through Sep 18 09:31:58 quick q: ff24; when i search for unloadTab plugin, it doesn't show up through the weird Tools -> Addons -> Search … *but* it show up in the web portal search, what could cause that ? Sep 18 09:32:23 are they trying tp tell me something :P Sep 18 09:34:11 "web portal search" ? What does that mean? Sep 18 09:34:33 https://addons.mozilla.org/en-US/firefox/ Sep 18 09:35:03 i pull up https://addons.mozilla.org/en-US/firefox/addon/unloadtab/?src=search Sep 18 09:35:19 but can't "see" it through the Tools -> Addons stuff Sep 18 09:35:56 yah - odd - lemme check Sep 18 09:36:47 g00s_: this happens often because your version of firefox is not compatible with the plugin in question Sep 18 09:36:52 same with thunderbird Sep 18 09:37:18 ohcibi hm; but usually from the web it will say 'not compatible with your FF or something' Sep 18 09:37:31 but , i was able to install it from the web Sep 18 09:37:44 idk, i only use thunderbird and i had the same issue with lightening when they start to freak out with their versioning Sep 18 09:37:59 goos_ Do the Tools -> Addons -> Search ... then after search on bottom of page click See all 227 entries? Sep 18 09:39:12 capella for me, 224 Sep 18 09:39:24 yah but did work? works for me Sep 18 09:39:28 lemme see Sep 18 09:39:51 yeah, ok that worked Sep 18 09:39:53 weirdness Sep 18 09:39:58 \o/ Sep 18 09:40:07 thx :) Sep 18 09:40:58 That outta be more discoverable or we should actually provide navigation options right there in the browser Sep 18 09:41:29 capella in every FF before this, it was the top of the list. i mean, the first thing should be an exact match Sep 18 09:41:55 yah that too! Sep 18 09:42:02 this is - again - just the Tools -> Addons page Sep 18 09:42:08 yeah, web was fine Sep 18 09:43:35 well clicking the "best match" button should turn it up on top Sep 18 09:43:45 but apparently doesn't Sep 18 10:00:50 where can i find some guidelines about how to switch between activities and keep state of the app etc? Sep 18 10:01:35 the easiest and dirtiest way is to use a singleton global state to share state across activities Sep 18 10:02:51 Hi all, has somebody used the this library before? https://github.com/chrisbanes/Android-PullToRefresh Sep 18 10:04:21 how do you have fixed theme/style across different versions prior to 3.x? I'm using ActionBarSherlock but the tab widgets look fugly in 2.x Sep 18 10:04:38 if i was building an activity that has a search box on it to search something and show some results, should i be building a fragment thats on the same activity to display the results? Or transition to a whole new SearchResult activity ? i dont know what the best way is Sep 18 10:13:39 (at home screen, activity stack for that task is empty) -> launch activity A from notification -> hit back button -> back at home screen -> open multitasking menu and select that task again -> back at the activity A launched from the notification. Sep 18 10:14:13 to get out of that cycle, user needs to open the task from the launcher Sep 18 10:15:10 that seems like shitty/confusing behaviour, how should I fix it? automatically insert my 'root' activity under activity A so that the user always has a fallback when using the back button? Sep 18 10:24:48 Uh, should I be placing logic and stuff in a activity? Or should I make my own class for things that aren't specifically android (but will be run in the activity) Sep 18 10:59:24 hi Sep 18 10:59:45 can i create goople play account using other than master credit card and visa credit card for non us? Sep 18 11:00:00 or any free method to upload the app? Sep 18 11:00:01 help Sep 18 11:09:44 there is no free method to upload Sep 18 11:09:54 its not that expensive to get started Sep 18 11:31:03 hello Sep 18 11:31:05 how can I be getting sth like dalvik/vm/Init.cpp:1959:84: error: unknown register name 'r14' in 'asm' from __asm__ __volatile__? Sep 18 11:31:09 __asm__ __volatile__ ("mov %[result], %%r14\n\t" : [result] "=r" (asm_lr) :: "r14"); Sep 18 11:31:37 Is that something you have made yourself? Sep 18 11:31:53 yes Sep 18 11:32:00 just need to extract r14 Sep 18 11:32:23 I did %%r14, %r14, r14 in that particular spot, no change Sep 18 11:32:31 Well there is no r14? Sep 18 11:32:42 impossible Sep 18 11:33:25 R14 perhaps? :-) Sep 18 11:34:20 flexd: nope :( Sep 18 11:34:24 I do not know, haven't coded assembly on arm before. Sep 18 11:34:28 r14 is the link register? Sep 18 11:38:40 any experience with SlidingPaneLayouts? Sep 18 11:38:41 flexd: yeah, it's LR Sep 18 11:38:54 i want my slidingpanelayout to always show a part of the meny like hangouts Sep 18 11:38:58 any ideas? Sep 18 11:43:26 you know this woman had been possessed by satan in vietnam and in front of the priest who was trying to drive Satan out of her God make the devil speak these words you must take the sacarment and pray the Hail mary and the Rosary these are very powerful prayers and then the devil said this is my time i own all of you who aren't with God Sep 18 11:46:48 lemonxah: and you need assembly to do that? Sep 18 11:47:02 ? Sep 18 11:47:10 oh Sep 18 11:47:13 Nevermind, similar nicks :-P Sep 18 11:47:25 I thought you === lamedude Sep 18 11:59:29 how do I play an mp3 for 10 seconds? So far I have myMediaPlayer.start(); Sep 18 12:00:25 zquad: there is no callback that fires during playback (e.g. every 250 ms), so what I do is runa timer that checks every second or so how far the player has played.. if the time has reached I do what I want to do (stop in your case) Sep 18 12:00:59 hmmm Sep 18 12:01:11 zquad: you could fire a timer that runs in 10 seconds, however if you stream the mp3 there maybe a difference in when the timer starts and when the playback actually starts, leading to the playtime beeing decreased Sep 18 12:01:33 :) Sep 18 12:01:46 you wont happen to have a snippet on pastbin or something would you? Sep 18 12:02:00 zquad: hold on Sep 18 12:06:10 zquad: https://gist.github.com/anonymous/6608233 Sep 18 12:06:17 zquad: i just wrote this directly into the gist Sep 18 12:06:24 zquad: so dont expect it to copy-past-and-run Sep 18 12:07:01 zquad: especially the start of the player is just abbreviated with player.start() which is of course not sufficient, but i just wanted to indicate that after the task is scheduled you can start the player Sep 18 12:07:36 have any of you converted your maven build to gradle? Sep 18 12:08:26 oh ok so you pretty much run the player wtiwthin the TimerTask Sep 18 12:08:32 zquad: no Sep 18 12:08:35 zquad: it runs parallel Sep 18 12:08:43 zquad: _after_ i schedule the task i start the player Sep 18 12:09:24 zquad: you can even start it before as Timer.schedule() doesnt block, but it seems more clean to me to schedule the timer before the player as the stopTime could potentially be 0 Sep 18 12:09:48 ok Sep 18 12:10:35 zquad: usually my approach would be to listen for an event that fires on playback-progress like html5s