**** BEGIN LOGGING AT Tue Jun 04 02:59:59 2013 Jun 04 03:27:53 hi. i have activity_location for layout and activity_location_xlarge for layout-sw600dp. will it automatically assign both to LocationActivity or I have to do something manually to take care of that? Jun 04 03:27:55 help please Jun 04 03:31:59 Stoob, did you really just double cast something? :P Jun 04 03:32:01 yes Jun 04 03:32:04 shits retarded Jun 04 03:32:28 lol Jun 04 03:32:40 when you call setContentView android will pull from the res-xxx/ folder where xxx matches the device configuration (ie res-landescape/ or res-sw600 can't remember specific flag qualifiers you can look up them) Jun 04 03:32:49 ^Abhijit Jun 04 03:39:07 I'm creating a library project, and a regular project based on that. So far I've only made one simple view. When I load in the emulator I get the error "No Launcher activity found!" and no icon appears unless I put the activity xml in the regular project manifest. I thought it was supposed to use the library project manifest? Jun 04 03:39:21 hi. i have activity_location.xml for layout and activity_location_xlarge.xml for layout-sw600dp. will it automatically assign both to LocationActivity.java or I have to do something manually to take care of that? Jun 04 03:40:29 can any one tell me about how much time does it takes to get a fix of a GPS ONLY enabled phone? NOT by the wifi network Jun 04 03:40:49 lasserix, yes. but how will it know that for xyz.java it has to launch abc.xml and so on ? because name are different? Jun 04 03:41:30 Quest, not sure on the exact time frame but generally GPS is quicker than network location in my experience Jun 04 03:42:33 brx_, hm..... i get network location in a second. but GPS no fix in about 30 minuts Jun 04 03:42:54 brx_, tried tall buildings. used my custom app. used navigator, used maps. Jun 04 03:43:05 iam using samsung galaxy ace Jun 04 03:43:39 brx_, iam really stuck. can you have a look at . the log by eclipse logcat http://pastebin.com/fzdSfgtD Jun 04 03:44:22 are you in a building? Jun 04 03:44:34 brx_, on the top of one Jun 04 03:44:36 the tallest Jun 04 03:45:49 hmm, i would test on another device Jun 04 03:46:14 hm. Jun 04 03:46:33 brx_, it there anything prominent with a bird eye view on the log? Jun 04 03:46:55 brx_, are the galaxy ace devices having bad gps? or all galaxy ones? Jun 04 03:47:18 brx_, i would try another device thought. does cheaper samsung models have irresponsive gps? Jun 04 03:47:56 hmm i dunno mate, ive never heard of this problem before sry :< Jun 04 03:48:08 np Jun 04 03:49:09 lasserix, ?? Jun 04 03:49:55 brx_, i observed that when i run navigator with gps and wifi location tagging enabled. the location is different than the one recienved with only wifi / network based lcoation. still i dont get the ful gps fix means that GPS works but a full fix is not avaialble. so it gives partial info and works in integration of network. Jun 04 03:50:58 brx_, lastly. i would make a strategy, if gps fix is not fetched in 15 seconds. get location by network. end of story Jun 04 03:51:03 brx_, thanks again Jun 04 03:51:26 ye, thats reasonable..however it ould be a buggy device Jun 04 03:51:39 could* Jun 04 03:51:51 which means you write code for nothing Jun 04 03:51:55 brx_, 15 seconds is enought to try gps fix? Jun 04 03:52:56 network location is pretty bad,its not ver accurate Jun 04 03:53:20 gps will get you very accurate to a few metres,network it can be 100s of meters off Jun 04 03:53:42 ya. thats why i prefered gps. Jun 04 03:53:47 well i would try another device.... Jun 04 03:54:02 you need to steal another android Jun 04 03:54:07 brx_, i observ all apps like maps and navigator work in coordination of gps and network. Jun 04 03:54:14 thats whats AGPS Jun 04 03:56:31 is it unprofessinal to deny to add one extra activity in app which client told to add at last minute and it was not written in agrement? Jun 04 03:58:14 Abhijit> you can make chnages in your quote for adding this activity. Jun 04 03:58:44 any one have a galaxy phone? Jun 04 03:58:46 Cafzalone, ok Jun 04 03:59:29 Can any one advice me on working with Launcher app? Jun 04 03:59:54 i have a galaxy s4, Quest Jun 04 04:00:49 You have an s4? Mind if I ask how your experience with flash on it has gone (if you've tried at all)? Jun 04 04:00:52 Quest: AGPS receivers use the augmented portion for faster fixes, they are capable of working even without the network connection, but they will take much much longer to figure out where they are Jun 04 04:00:59 as in Adobe Flash? Jun 04 04:01:16 yea. I have an app with embedded video players that are pulled up in one part of the screen Jun 04 04:01:17 I haven't bothered with it beyond quickly trying to install it and finding it not working Jun 04 04:01:27 oh which are inevitably still flash things Jun 04 04:01:47 and I got reports that even after sideloading flash the s4 just crashes back to the launcher once a flash object attempts to make sounds Jun 04 04:01:51 it actually loads the flash obj Jun 04 04:02:00 but then can't do whatever it does in the background for audio. Jun 04 04:02:14 I haven't been able to even see the video Jun 04 04:02:15 whole app containing the webview/flash panics and crashes. :( Jun 04 04:02:27 doesnt crash but doesnt display anything either Jun 04 04:02:35 Stoob, hm Jun 04 04:02:40 Sorry I cant be more help Jun 04 04:02:49 that's alright, i'm finding a lot of that Jun 04 04:02:56 stack overflow got me zero answers too Jun 04 04:03:02 I don't think anyone knows why it happens Jun 04 04:03:58 the best I could understand is some library file called libmedia.so throws an error in adb which is like, a depth of knowledge about android os I'm clueless on Jun 04 04:04:33 Yeah, generally with flash I just give up on it Jun 04 04:04:37 Stoob, can you look at my log cat Jun 04 04:05:18 depending on the flash videos you're looking at, you may be able to hack out the mp4 video they're using (maybe) Jun 04 04:05:34 It's twitch tv player Jun 04 04:05:46 the main reason I'm stuck with flash here is it's streaming players, not set-length video Jun 04 04:05:55 so html5 video tags are out the window Jun 04 04:06:07 if the problem would be my phone, what should be done? else than replaceing the gps chip? Jun 04 04:07:59 yeah tallest_red i thought as much :< Jun 04 04:08:37 i thought html5 video did work with streaming, though Jun 04 04:09:07 well, i'm not certian if there are video tags for streamining or not, but at the very least if there are i've not seen any of the providers for streaming offer it. Jun 04 04:09:38 *streaming Jun 04 04:23:50 can I inherit the launcher icon from a library project? Jun 04 04:31:08 anybody? Jun 04 04:33:30 god, when is android going to fix downloading from a site protected with http auth Jun 04 04:35:07 http://code.google.com/p/android/issues/detail?id=1353 Jun 04 04:35:10 jeez, since forever Jun 04 04:37:00 whoop tryin out android studio this should be fun Jun 04 04:40:27 pfn: don't worry, HTTP Form authentication scheme will save us (https://tools.ietf.org/html/draft-shanks-http-form-authentication-00) Jun 04 05:07:46 hey. I am trying to "scrape" a forum and download all photos...I know how to do that but how can I login to a forum in code...I know there is HTMLUnit but I have had no success yet. Can anyone please point me to a tutorial or something...anything... to that will help me with this? I would greatly appreciate it Jun 04 05:08:49 probably old news, but has anyone seen the latest android usage stats? 33% for JB (api 16+). good times! Jun 04 05:09:08 bankai_: i havent, link? Jun 04 05:10:06 http://thenextweb.com/google/2013/06/03/android-jelly-bean-hits-33-adoption-ics-falls-to-25-but-gingerbread-still-used-by-over-36-of-play-users/ Jun 04 05:10:29 Breaking down the numbers more specifically, 33.0 percent of Android users are using Jelly Bean, 25.6 percent have devices powered by ICS, 0.1 percent are on Honeycomb, 36.5 are stuck with Gingerbread Jun 04 05:11:03 lol @ honeycomb Jun 04 05:15:46 think all the devices that were even running honeycomb in the first place have moved on to ics Jun 04 05:15:51 or jb Jun 04 05:16:18 just wish i didnt need apk11 for the actionbar stuff Jun 04 05:17:01 Stoob: why don't you use abs ? Jun 04 05:17:38 abs? im assuming that's action bar support? or something Jun 04 05:17:47 ActionBarSherlock Jun 04 05:17:47 http://abs.io Jun 04 05:18:11 wow... daddy like linux mint Jun 04 05:18:21 its one of the most praised libraries by JakeWharton :) Jun 04 05:18:42 one of the most praised libraries around, i'd say.... google music uses it Jun 04 05:18:52 I woudlnt Jun 04 05:18:58 because I'm a jake hater ;-) Jun 04 05:19:07 well i dont because i didnt know it existed :P Jun 04 05:19:24 jake were you guys the ones that wrote a new tcp client all together Jun 04 05:19:26 or just retrofit Jun 04 05:19:38 tcp client? Jun 04 05:19:45 httpclient Jun 04 05:19:47 sorry Jun 04 05:20:03 okhttp Jun 04 05:20:07 thats right Jun 04 05:20:08 to a lesser degree, yes Jun 04 05:20:36 is confidential information (like AWS credentials) safe in source files? Jun 04 05:21:37 that sounds like a bad idea. Doesn't AWS have like oauth connections? Jun 04 05:23:38 look what Android Programming has done to JakeWharton's face lmao http://allthatmagazine.tumblr.com/post/36658649539 Jun 04 05:23:44 benlieb dont do it Jun 04 05:23:55 its super easy to decompile apps Jun 04 05:24:00 I mean you can obfuscate them Jun 04 05:24:07 ron_frown: how do I connect to AWS then? Jun 04 05:24:15 shmooz: yes. new profile picture everywhere! Jun 04 05:24:19 I was googling him to see more of his projects, since his stuff is so impressive Jun 04 05:24:25 I'm no encryption guru Jun 04 05:24:42 but I'd think you'd need to store that shit in encrypted file osmeplace Jun 04 05:25:01 in a perfect world, if nobody could root/custom os their phones Jun 04 05:25:05 you may not have TOO many worries Jun 04 05:25:20 JakeWharton: I dare you Jun 04 05:27:16 haha I'm not that bold Jun 04 05:28:15 well you are my new rolemodel, one day I will write stuff like you :) Jun 04 05:28:35 and your attitude about opensource is great Jun 04 05:28:45 Any here a android developer veteran? Jun 04 05:28:55 androidnewb: stop asking that question Jun 04 05:29:27 shmooz: thanks. it's certainly a lot of work (and might have spun out of control a bit) but it's a lot of fun too Jun 04 05:29:33 So I just ask the question directly? Jun 04 05:29:39 androidnewb: yes. we are all here to help Jun 04 05:29:50 except that one guy over there Jun 04 05:29:55 except mikedg, but he's not here right now Jun 04 05:29:59 COool, I afraid you might block me Jun 04 05:30:35 just ask it, instead of coming by every 3 hours with the same veteran question and then disappearing Jun 04 05:31:04 how do you know the dir or path of your APK, I wanted to display in on a textView or something Jun 04 05:31:15 I was working. Jun 04 05:31:39 heh, shmooz: Jun 04 05:31:41 display in the textView the path using some android function. Jun 04 05:31:49 [01:54] Hi, anyone here a veteran android developer? Jun 04 05:31:49 [01:55] androidnewb: are you handing out compensations ? Jun 04 05:32:13 now we got veteran devs and veteran questions, do we? Jun 04 05:32:14 lol Jun 04 05:32:14 compensation of advice Jun 04 05:32:30 androidnewb: the path to the APK on a device? Jun 04 05:32:38 can I ask why you want to display it? just as an exercise? Jun 04 05:33:09 let's just say a the path of the activity currently running. Jun 04 05:33:49 I have a program that zip's files and I need the absolute path or DIR Jun 04 05:36:25 like getfilepath() then display the result in a textView or something. Jun 04 05:38:47 you want the path to your own APK? I think you can get it via PackageManager, i think PackageInfo rather than ApplicationInfo Jun 04 05:39:52 I think I got it, thank you. Jun 04 05:40:21 it's in the developer website Jun 04 06:48:10 is there any way to see why some our app is not available for certain devices on google play? (it works fine if that apk is installed manually) Jun 04 06:56:05 well i can force my sms app onto a tablet without gsm Jun 04 06:56:12 dont mean it will send texts Jun 04 06:56:25 maybe your not catering for something Jun 04 06:56:50 or you are and it dont exist in an explicit way Jun 04 06:58:53 miha, check your manifest Jun 04 06:59:05 specifically for permissions that imply a required feature Jun 04 07:02:27 alex_PP: it'd be really helpful if admin console told why it filters Jun 04 07:03:16 i though it did? Jun 04 07:05:25 oh yeah Jun 04 07:05:35 that's a bit rubbish Jun 04 07:11:40 hi all, can somebody help me with a little problem: asynctask Jun 04 07:12:19 FrancescoV: no1 is gonna say yes, you should always just ask your question Jun 04 07:12:49 cause you asking "would anyone help with an unknown problem that I have?" Jun 04 07:12:56 and thats a bit silly :) Jun 04 07:14:06 ok, i need to ma a stupid asynctask for caltulation (sum), i need to use multiple integers (array). This is possible: CalculateTask task = new CalculateTask(this); task.execute(1,2,3,4,5,6); Jun 04 07:14:23 but this isn't possible: int[] numbers = {1,2,3,4,5,6}; task.execute(numbers); Jun 04 07:14:42 CalcultationTask extends AsyncTask Jun 04 07:15:05 is the calculationtask wrong or I'm i juist doing something not right? Jun 04 07:15:20 you're just not getting how Java generics work Jun 04 07:15:28 (they're kinda a pain) Jun 04 07:15:42 FrancescoV, you can pass parameters to async task via constructor Jun 04 07:15:53 or use List instead of int[] Jun 04 07:16:17 you can't use primitive types as generic parameters (that is, AsyncTask) Jun 04 07:16:31 oké tnx :) Jun 04 07:18:19 I'm looking for freelance android and iOS developers, what price/hour should i be thinking? Jun 04 07:19:37 $1 per hour to maybe $100 per hour Jun 04 07:19:57 your question is ambiguous Jun 04 07:20:06 and bordering on irrelevant Jun 04 07:22:20 Our application does a lot of interaction with an sqlite database on the device. What is a typical arrangement for executing database queries, triggered by user interaction, on a background thread? Jun 04 07:23:02 Loaders. Jun 04 07:23:36 If you're targeting Gingerbread, you will find Loaders in the support library as well. Jun 04 07:23:58 or service depending on if you have heavy data processing too Jun 04 07:24:00 these operate similarly to asynctask, yes? my qualm is that spawning a task for each query seems hamfisted Jun 04 07:24:07 erisco it is typical to not execute any type of long-running operation on the UI thread Jun 04 07:26:34 erisco those threads are all managed by Android via a thread pool, if that's what you mean Jun 04 07:26:55 in other words, it's kept clean for you under the hood Jun 04 07:28:05 say there are 1000 queries. is it reasonable to start up 1000 threads? that is what I mean. Jun 04 07:29:41 I'm not sure how they work internally, but I don't think it will start a thousand threads Jun 04 07:30:12 erisco sure that's reasonable for some circumstances, maybe not others Jun 04 07:31:29 well, if I was solving this problem apart from any particular platform, what seems reasonable is creating a queue of queries to do. the UI thread enqueues and the background task dequeues. Jun 04 07:32:02 there is nothing preventing you from building such a thing if you think it's appropriate Jun 04 07:32:16 rly much depnds on how and when your application is executing these queries Jun 04 07:33:04 its potentially necessary, given my cursory understanding that write attempts from multiple threads can cause queries to be dropped Jun 04 07:33:08 but again, realize that with AsyncTask for example you're dealing with a thread pool under the hood which gives you a lot of thread management out of the box Jun 04 07:33:55 but regardless, for such a design, with what tools do you construct that? is a Service necessary? Jun 04 07:36:10 service would be necessary if you needed to keep that message loop running indefinitely Jun 04 07:36:32 Hey... if I lost my source code and my original keytool, am i screwed when it comes to trying to update my app in the play store? Jun 04 07:37:31 erisco you would need to read up on application and activity lifecyle to better understand if a service would be appropriate for your scenario Jun 04 07:37:41 ( it's a simple app that takes like a day to write, i was gonna just redo it ) Jun 04 07:38:31 s3b`, if you can't sign with the same signature, then you're screwed, yes. as far as source code, you can decompile, but it can be illegible Jun 04 07:40:16 I'm not worried about the code, just the signing. ah so i just gotta suck it up and take the 'author isn't updating the app!' reviews :( lol Jun 04 07:40:42 how many users ? Jun 04 07:40:43 s3b`, did you lose a hard drive or something? Jun 04 07:40:56 s3b`, you for sure don't have your keystore hanging aroung? Jun 04 07:41:16 haha i reinstalled my OS and backed up the wrong /android file (i was in a hurry) Jun 04 07:41:30 StingRay_: 9k active i believe Jun 04 07:41:39 Not the biggest thing tbh, just a personal project Jun 04 07:41:42 ah, yeah prob there then Jun 04 07:42:01 tip: backup to more than one drive. if possible, use a drive in a different building Jun 04 07:42:45 omfg Jun 04 07:42:55 i just realized i put it in dropbox Jun 04 09:18:26 Can I get the parent of the child, and the sibling above ? Jun 04 09:18:53 https://gist.github.com/bluesm/5704721 Jun 04 09:19:17 How to get the EditText above. Jun 04 09:19:27 In addGrade method ? Jun 04 09:20:35 something like getparent or / and getindex (as child) then getChildatIndex(n+1 or n-1) Jun 04 09:32:22 Hi all, I have a problem. I am trying to flash a CM10.1 based ROM to my Nexus 7 3G. The previous version of this ROM flashed fine, but the latest keeps failing. I'm flashing with TWRP 2.5.0 Jun 04 09:32:49 Here is the fail message http://imgur.com/HOsoY19 Jun 04 09:32:59 #android-root Jun 04 09:33:32 ah, sorry Jun 04 09:33:38 so many android channels! :) Jun 04 09:36:54 bluesm: if you're looking up views like that, you probably want to give it an id Jun 04 09:38:32 pjdelport: But i would like to have only one method. Jun 04 09:38:46 pjdelport: Not three, with different EditText to get. Jun 04 09:42:44 bluesm: parameterize the id? Jun 04 09:42:52 it depends how your code looks, and what you're trying to do Jun 04 09:45:13 bluesm: you can give the button a tag, for example, which your addGrade method can use to do the appropriate thing Jun 04 09:46:27 bluesm: umm can't you just do android:id="@+id/edittext_waga1" in the xml defination of the edit text Jun 04 09:46:50 and later pull it with EditText mWagaEditText = (EditText) findViewById(R.id.edittext_waga1; ? Jun 04 09:47:07 right, or tags Jun 04 09:47:10 then you can use mWagaEditText.text or whatever the thing is to get its current text Jun 04 09:47:17 hi, can anyone point me to a tutorial to add a view to the right of my default one? Jun 04 09:48:22 bluesm: it would be a bad thing to use low-level parent or sibling for this, even if you could reliably do it for a particular layout Jun 04 09:48:31 your code would break with any other layout Jun 04 09:48:59 for example, if you define different XML layouts for landscape or larger/smaller screens Jun 04 09:49:05 pjdelport: So how add this tag. Jun 04 09:49:19 pjdelport: You mean add tag with say link to appropriate editText ? Jun 04 09:49:32 bluesm: android:tag="foo" in your XML Jun 04 09:49:51 pjdelport: And how get it from the "View" object passed ? Jun 04 09:50:18 view.getTag() Jun 04 09:51:06 it might be simpler to use ids, though Jun 04 09:52:04 bluesm: how have you not used ids to get reference to things before? edittexts are the same... Jun 04 09:54:40 Why is there never anyone who has worked with an AccessibilityService before? Jun 04 09:57:05 lasserix: Ok. But how I can pass the tag, and get appropriate editText ? Jun 04 09:57:46 lasserix: How to get appropriate out of 3 editTexts ? Jun 04 09:59:31 bluesm: you can give them different tags/ids Jun 04 10:00:16 pjdelport: Different tags ? And check Jun 04 10:00:26 you may be able to simplify your code by wrapping that structure into a compound widget Jun 04 10:00:43 that contains a set of EditText + buttons Jun 04 10:00:48 if that makes sense for your application Jun 04 10:01:37 if(tag = x) {findVieById(R.id.firsEditText} else if(tag = y) {findViewById(R.id.secondEditText )} ? ? Jun 04 10:01:44 It doesn't make sense to me. Jun 04 10:03:14 bluesm: you can do a lookup from the root for whatever the tag was that was attached to the button Jun 04 10:03:44 it'll be easier if you have a compound widget Jun 04 10:03:48 Ah, still the same problem as yesterday, bluesm? Jun 04 10:04:03 then your widget can just lookup its button id, without worrying about other instances Jun 04 10:04:20 pjdelport: findView by attached tag ? Jun 04 10:05:47 bluesm: well, you probably want to look at http://developer.android.com/guide/topics/ui/custom-components.html#compound Jun 04 10:06:21 make a subclass of LinearLayout (or whatever), and have it contain the EditText and buttons Jun 04 10:06:54 then your main layout will just instantiate three times Jun 04 10:07:27 and in the Java class, your widget then only needs to worry about its own text and buttons Jun 04 10:07:59 so your addGrade will not need to worry about the others Jun 04 10:08:23 you'll just have one id for the EditText Jun 04 10:08:57 and each widget instance's findViewById will find the correct one, because it only searches its own subsection of the hierarchy Jun 04 10:16:55 hello, is there a simple tutorial on how to create a new view? Jun 04 10:19:40 eruditehermit: developer.android.com ? Jun 04 10:19:41 there are billions Jun 04 10:19:58 super simple Jun 04 10:19:59 well maybe billions - (billions + 1000) Jun 04 10:20:01 I am so confused Jun 04 10:20:32 eruditehermit: start at http://developer.android.com/training/index.html Jun 04 10:21:13 http://developer.android.com/training/basics/firstapp/building-ui.html Jun 04 10:25:05 in the TrafficStats utility class what exactly is meant by "mobile interface" i.e. what does getMobileRxBytes return Jun 04 10:27:40 and interface that is mobile and erm, bytes ? Jun 04 10:27:42 :) Jun 04 10:27:44 pjdelport, is there anything that can be a parent of LinearLayout? Jun 04 10:28:21 eruditehermit: any viewGroup Jun 04 10:28:31 the documentation is very frugal Jun 04 10:28:49 getMobileRxBytes getTotalRxBytes.... total - mobile = wifi? Jun 04 10:29:26 seems logical Jun 04 10:29:31 eruditehermit: what do you mean? Jun 04 10:30:27 eruditehermit: you can put a LinearLayout more or less anywhere; there's nothing special about it being the root element, if that's what you mean Jun 04 10:30:53 any layout class can be the root element of a layout XML file Jun 04 10:31:48 pjdelport, this is my current layout: http://paste.ubuntu.com/5732164/ Jun 04 10:32:06 it currently displays on 1 page Jun 04 10:32:11 I want to have a page on the right Jun 04 10:32:13 that I swipe to Jun 04 10:32:21 it seems that I need a fragment? Jun 04 10:32:34 eruditehermit: you need to go through the tutorials Jun 04 10:32:36 basics Jun 04 10:32:47 till you get a firm understanding of the 101 stuff Jun 04 10:32:50 trust me on this Jun 04 10:33:03 or you will rely too heavy on asking everything of everyone Jun 04 10:33:05 eruditehermit: look at http://developer.android.com/training/implementing-navigation/lateral.html Jun 04 10:33:09 and thats never a good place Jun 04 10:33:21 but yeah, back up as necessary Jun 04 10:34:02 eruditehermit: it's perfectly fine to ask where to go read things up, though Jun 04 10:34:13 ok Jun 04 10:34:28 so this page Jun 04 10:34:37 http://developer.android.com/training/basics/firstapp/building-ui.html Jun 04 10:35:00 they talk about View heirarchy Jun 04 10:35:10 do they mean Views are parents of layouts? Jun 04 10:35:43 ok eruditehermit , you need to search for "android view" and "heirachy" cause if you know what they both mean Jun 04 10:35:47 it becomes logical Jun 04 10:36:12 but to shorten it a bit, look at what a "view" is and a "viewGroup" Jun 04 10:37:39 also layout != view/viewGrou[ Jun 04 10:37:42 p* Jun 04 10:38:26 layouts as in linearLayouts, RelativeLayouts etc are extended viewGroups Jun 04 10:38:44 layouts in android probably refer to xml layout files Jun 04 11:02:11 thanks guys Jun 04 11:02:18 sorry about the questions Jun 04 11:03:55 questions are fine, except when they are clear and answered in the basic intro docs :) Jun 04 11:04:09 haha Jun 04 11:04:20 I don't understand the answers =p Jun 04 11:04:28 I'll spend more time on them Jun 04 11:11:11 if you dont understand something, search google for it Jun 04 11:11:18 there is always a path Jun 04 11:11:22 to learn Jun 04 11:20:55 hi Jun 04 11:22:33 how much time would it cost for an android developer to build an app with the following features: *Register/ Log-in screen, Jun 04 11:22:34 *People can register an account, or log-in with FacebookRegister request goes to a web server into a MySQL database Jun 04 11:22:34 Email validation link to user's email Jun 04 11:22:57 3 screens with some features Jun 04 11:23:00 retina support Jun 04 11:23:18 interaction between users by editing the content content in the screens Jun 04 11:26:05 rved: $10 to unlimited Jun 04 11:26:06 http://www.freelancer.com/ Jun 04 11:26:08 go find out Jun 04 11:26:29 hmm Jun 04 11:26:39 is there a way of forcing Roboto font on Android 4.x+? Jun 04 11:26:42 no seriously StingRay, i understand your point, i won't pin you down to it, but like 100-100 hours, or 10.000 hours Jun 04 11:26:48 that being, preventing Samsung from overriding the base styles? Jun 04 11:27:09 for a decent app Jun 04 11:27:41 rved: silly question Jun 04 11:27:49 true, its not detailed Jun 04 11:28:00 and too subjective Jun 04 11:28:19 too many unknown variables Jun 04 11:28:28 and this is not the right place for it Jun 04 11:28:31 StingRay, are you for hire? Jun 04 11:28:32 ;) Jun 04 11:28:33 that freelancer site is Jun 04 11:28:52 well, I'm doubting to learn Android myself, or hire some one Jun 04 11:28:59 im a webdesigner/developer Jun 04 11:29:08 so i can do a lot in the design bit Jun 04 11:29:27 so design it then Jun 04 11:29:39 then it can be spec'd out properly Jun 04 11:30:45 full design doc + tech design doc = accurate quote Jun 04 11:30:48 :) Jun 04 11:31:26 hehe, yes i understand, but this is a lot of work at the moment, for today i just want to make the decision if i should learn it myself, or hire some one :) Jun 04 11:32:15 hello everybody Jun 04 11:34:07 Man, this coding is...*puts on sunglasses*...intents Jun 04 11:41:56 anyone done camera for opengl for android, that is, recomend any UI patterns for doing things like flight etc? Jun 04 11:46:05 I'm showing a camera preview on a SurfaceView and I've the problem that preview stream orientation is not correct (Nexus 7 in Portrait mode, but camera shows video stream in landscape, to an 90° angle to the view). So I've set the camera rotation in order to show the preview stream in the correct orientation. Now I've tried the app on the Nexus 10, and it's wrong again. Is there a way to get the camera orientation so I can show th Jun 04 11:49:34 What is needed to make the calendar app know that it can create entries in the calendars managed by my sync adapter? I've been looking for ages but I can't work it out. Jun 04 11:54:59 dgp: time ? Jun 04 11:55:01 :) Jun 04 11:55:33 ugh, yeah Jun 04 11:55:45 anyone knows a good file/directory chooser library that allows to select multiple directories (not necesarily at the same level), and to initially show the chooser with a set of directory marked as selected ? Jun 04 11:56:19 bubbleguuum: not sure there is one Jun 04 11:56:27 but sounds like 2 listViews Jun 04 11:56:29 :) Jun 04 11:56:58 some chooser library are close but will allow multiple folder selection only at the same level. I could hack them to do what I want I suppose Jun 04 11:57:09 reinventing the wheel... Jun 04 11:58:11 imagine if every Windows program had to include its own file chooser Jun 04 11:58:22 thats different Jun 04 11:58:37 bubbleguuum: it's annoying that android doesn't have a standard library for that stuff Jun 04 11:58:40 on a full computer SYSTEM your expected to manage file systems Jun 04 11:58:49 on a mobile or tablet, less so Jun 04 11:59:14 still there are acessible filesystems that must be managed in some apps Jun 04 11:59:30 StingRay_: You still have files and there should be a standard ui component for that Jun 04 11:59:31 well there is little need to select a folder in the OS Jun 04 11:59:37 Is there a utils class to get a date in like "Today, Yesterday, A long time ago"? Jun 04 11:59:43 so no, there is little need Jun 04 11:59:48 https://www.youtube.com/watch?v=48F2BpteMVY - also on bias. (somewhat nsfw) Jun 04 11:59:49 more so in a full OS Jun 04 12:00:04 StingRay_: Linux is a full os.. Jun 04 12:00:06 StingRay_: what ? There are plenty of ue case where user mus select one or more directories Jun 04 12:00:10 man the stock app drawer is soooo terrible, why isn't a recent / popular tab at the top ugh Jun 04 12:00:16 if you need a file/directory chooser it's usually a sign of bad design ;) Jun 04 12:00:18 dgp: erm no Jun 04 12:00:31 linux if your refering to kernel is whatever you want Jun 04 12:00:45 appel1: tell that to my user with additional storage to setup a download location of large files Jun 04 12:00:48 eg my microwave has a linux kernel Jun 04 12:00:56 and it dont have a folder chooser Jun 04 12:00:59 StingRay_: The OS is the kernel.. Jun 04 12:01:12 this is comp sci 101 Jun 04 12:01:38 bubbleguuum: that's bad device design, OEMs are not really supposed to multiple external storage locations.. Jun 04 12:01:48 bubbleguuum: doesn't help your users though =) Jun 04 12:01:58 If Android was running on top of some embedded os that didn't support proper filesystems etc.. there would be no need for being able to choose files etc Jun 04 12:02:01 My Nexu4 just arrived :) Jun 04 12:02:05 Nexus* Jun 04 12:02:08 yes it doesn't help that manufacturers do things thhey are not supposed to do Jun 04 12:02:08 Rejoice! Jun 04 12:02:11 Congrats Jun 04 12:02:36 tanks tanks Jun 04 12:02:43 I'm off to pick it up Jun 04 12:02:58 appel1: mmm but the android source seems to support multiple external storage locations ;) Jun 04 12:03:16 dgp: only one for app data Jun 04 12:03:37 I have multiple "sd cards" in my AOSP build Jun 04 12:04:11 https://developer.android.com/reference/android/text/format/DateUtils.html#getRelativeDateTimeString(android.content.Context, long, long, long, int) Jun 04 12:04:12 useful Jun 04 12:04:38 Nice job IRC client. That one is totally clickable. Jun 04 12:18:28 := Jun 04 12:41:00 kakazza: Try urlserver.py for WeeChat. Jun 04 12:42:37 I'm using that. I meant it probably won't work because of the spaces. Jun 04 12:57:42 kakazza: It did shorten the url for me. I can't verify if it works though, because I'm outside the network my IRC box is in. Jun 04 13:09:25 Can I have different names of my App in different locations ? Jun 04 13:09:28 I mean in google play ? Jun 04 13:09:53 bluesm: yes, you can change the name per language Jun 04 13:15:08 Ge0rG: Thanks :) Jun 04 13:18:29 should i run the acceleremoter in its own runnable and put it to sleep since on sensor changed fires off like crazzzyy Jun 04 13:18:32 anyone know? Jun 04 13:27:29 Why are you using the accel? Jun 04 13:27:56 Hello all :) I have looked away for many times now, but I was not able to find a complete and precise tutorial about fading effects when you make a long press on a ListView item. Somebody can give a hint please ? Jun 04 13:29:08 helo Jun 04 13:29:32 mithrop, fading effects on what? Jun 04 13:29:43 other list items? current list item? window? Jun 04 13:29:47 I cant get a GPS fix on my android phone. what can be the reason. I have tried on tall building roof tops too. http://pastebin.com/fzdSfgtD Jun 04 13:30:42 Mavrik, on the selected effect. I found some way to modify the background color with a selector and an item with android:state_pressed=true, but the background color is not fading anymore... Jun 04 13:30:57 Actually, I apply this selector on the LinearLayout of my selected item. Jun 04 13:36:29 Mavrik, does it answer to your question ? Jun 04 13:36:46 nope, I still have no idea what are you trying to achieve Jun 04 13:36:50 or what a selected effect is. Jun 04 13:39:02 ok. I have a ListView. Inside of it, each item is actually a LinearLayout including a button and a TextView. When I long press one of this item, a graphic effect start : the background becomes light blue, then slowly dark blue until the long press event is actually throwing. Jun 04 13:39:43 I would like to change these "light blue" and "dark blue" colors. Jun 04 13:40:15 is it more precise and clear now ? maybe I should try with snapshots ? Jun 04 13:42:43 no, it's very clear now :) Jun 04 13:43:35 \o/ sorry for the bad first try ^^ Jun 04 13:44:10 mithrop, there is an "enterFadeDuration" and "exitFadeDuration" property on select Jun 04 13:44:11 or Jun 04 13:44:16 that is probably what you seek Jun 04 13:44:24 I'd have to dig into android source to see how exactly the drawable is set Jun 04 13:45:11 hello. I'm trying to understand ContentResolver. Is there exactly one of them on a running system? Some description sound a little like there is one per application, but then I don't understand that because it should manage ALL contentProvider right?. Jun 04 13:45:30 Mavrik, I don't want to change the duration, only the colors. but I really don't know where to look for. Can you give me some hint of where should I look in the Android source code, eventually ? Jun 04 13:46:08 mithrop, sadly, you'll have to rewrite it probably since I don't think there's an easy way of just replacing the color and keeping the transition Jun 04 13:46:36 you can find default background in "list_selector_background.xml" in frameworks/base/core/res/res/drawable/ Jun 04 13:46:55 Im trying to do a custom android launcher, can any one explain how can i change the design by working on the sample in android sdk Jun 04 13:47:04 and it seems they just use drawable magic to make it, doesn't look compilcated Jun 04 13:48:03 drawable magic ?? I actually found the color but didn't understood how everything works ^^ I found something with some .png Jun 04 13:51:09 mithrop, meaning using XML ;) Jun 04 13:52:42 SpeedEvil: i am using the accel to trigger some graphic action in an opengl surfaceview Jun 04 13:53:41 mithrop, this answer explains how it works: http://stackoverflow.com/a/4338911 :( Jun 04 13:53:42 :) Jun 04 13:54:28 android launcher any one knows?? Jun 04 13:55:55 If I would like to make not editable EditText, I should rater go with textView ? Jun 04 13:57:08 bluesm, yes, a text view is a view to show non-editable text :) Jun 04 13:58:29 are applications required to access contentProviders through THE contentResolver or can they access them directly? Jun 04 13:59:14 Mavrik: So why some people want not editable textview ? http://stackoverflow.com/questions/3928711/how-to-make-edittext-not-editable Jun 04 14:00:02 some times you want to make an illusion of a text view without the user being able to edit it Jun 04 14:00:05 it's bad UX though Jun 04 14:06:18 Mavrik, thank you very much !!! :) so it's with 9Patched pictures that I will be able to change colors ? Jun 04 14:06:44 mithrop, changing colors is done by a transition drawable in xml Jun 04 14:06:54 they just use 2 9-patches and transition between them Jun 04 14:07:57 Mavrik, I mean "changing start color and end color". these two colors are set via .9.png aren't they ? Jun 04 14:08:19 yep, those are two images, not colors per se Jun 04 14:08:51 good morning folks, how are you? Jun 04 14:09:20 \o& Jun 04 14:09:52 i've a question, does anybody knows how to use Base64 class of InAppBilling v3 Jun 04 14:12:00 Mavrik, it still strange to use images to display colors :) thank you anyway Jun 04 14:12:03 i have a relativelayout, with a textview that has 'center in parent' set to 'vertical'. Now i have another textvew that i want to be below this one. When i set its layout_below it does not show up below the other textview, instead it shows up on top, leaving a space where the first textview would have fit.. Jun 04 14:12:40 mithrop, I think it's a leftover from previous versions where the background had a gradient :) Jun 04 14:13:23 oh yes ! it's a possibility ! Jun 04 14:15:40 Mavrik, do you think using color instead of drawable will work ? Jun 04 14:15:48 *-drawable +png files Jun 04 14:15:55 never tried it honestly :) Jun 04 14:17:25 mithrop you want some kind of animation tween Jun 04 14:18:20 lasserix, what do you mean ? Jun 04 14:18:44 nevermind not animation but you can use transition defined in xml Jun 04 14:18:51 this should do the trick: http://stackoverflow.com/questions/4768977/listview-item-longclick-state-for-selector Jun 04 14:19:01 sad something so simple is fairly code heavy :) Jun 04 14:19:42 kroot, yeah, right :) Jun 04 14:20:13 Mavrik, FYI using drawable setting as colors doesn't work ;) Jun 04 14:20:20 lasserix, I will take a look to your link. Jun 04 14:22:40 lasserix, it's so hard to implement this behavior... and being forced to used 9patch images just to display colors is REALLY a strange way... thank you anyway Jun 04 14:23:00 your not forced to Jun 04 14:23:09 you want to add a fade effect on the release of a long click on a listview row? Jun 04 14:23:27 on the release and on the long press itself. Jun 04 14:23:53 actually, the fade effect is already here and already ok, I just want to change the colors of it.. Jun 04 14:26:38 mithrop ahh here this should do your trick: http://nishantvnair.wordpress.com/2010/10/05/fading-color-effect-with-transitiondrawable-android/ Jun 04 14:26:47 start the transition on the click event you want Jun 04 14:26:50 and voila! Jun 04 14:26:55 should be a simpler way but i dont know Jun 04 14:26:58 Is there a way to concatenate striings in xml ? Jun 04 14:27:09 I mean I have "three strings that are" Jun 04 14:27:29 "Weight 1" "Weight 2" "Weight 3" i would like to set on "Weight" string . Jun 04 14:27:32 lasserix, ok. I will try it :D Jun 04 14:27:50 hmm actually Jun 04 14:27:51 bluesm: google 2.5 seconds http://stackoverflow.com/questions/5764548/how-to-concatenate-multiple-strings-in-android-xml Jun 04 14:27:57 wonder if that will work with listview rows... Jun 04 14:28:28 StingRay_: Exactly. I've read that. And it says that this is "undoable" Jun 04 14:28:55 But I was Apr 23 '11 Jun 04 14:28:58 *it was Jun 04 14:29:32 then is that not your answer ? Jun 04 14:30:47 StingRay_: As I've said. I ask here, becasue i hoped that something was changed :] Jun 04 14:31:24 chance of in here information more comprehensive that S/O hmmmm not great Jun 04 14:31:32 than* Jun 04 14:45:09 I am looking to get started with apps for android. The language i use is Python. does anyone here use python to make apps for Android? Jun 04 14:45:45 unschooled: Learn java and have fun Jun 04 14:46:10 lol. is that really the best way? Jun 04 14:46:32 yeah Jun 04 14:46:44 as in yes it's probably best Jun 04 14:47:22 cause I knew python a bit, but at the end of the day, using it would be putting another wall between you and development Jun 04 14:47:45 alright Jun 04 14:47:47 i like java too :) Jun 04 14:48:15 i dont have anything against java. just didnt want to have to learn another language. Jun 04 14:48:45 pick a platform that uses python as primary language for dev then Jun 04 14:48:49 oh….wait…. Jun 04 14:48:51 :) Jun 04 14:49:07 yes. point was well taken earlier Jun 04 14:49:10 :) Jun 04 14:49:12 lasserix, it's working :) I have to launch the transition manually ... it's clearly a discutable way of doing it, but it's a working one :) Jun 04 14:49:15 thank you for help Jun 04 14:49:52 but I have to put the component at it's initial state manually too... Jun 04 14:50:02 unschooled: It's best not to get yourself in the position where you can only ever use one language Jun 04 14:51:38 hi, whats the diff between a service and a bound service? service runs independent of your actions, like download a file and you cannot stop, sending a command. But bound service you can control what do to with it? is that it or no ? Jun 04 14:52:30 a service is a service, the way you control it may differ and what you use it for…..as with everything I would have thought :) Jun 04 14:52:42 A service runs until it's stopped.. A bound service runs until noone's bound to it anymore Jun 04 14:53:07 except when the service is both bound to and started ;) Jun 04 14:53:16 SimonVT: is that really true if the service is still "doing" something ?? Jun 04 14:53:27 dgp, but python is so awesome. :-D Jun 04 14:53:29 Lets not confuse him Jun 04 14:53:43 StingRay_: Define "doing something" Jun 04 14:53:46 iam using https://play.google.com/store/apps/details?id=com.eclipsim.gpsstatus2 app to see why I dont get a GPS fix. Its showing some cordinates of pitch/rol mag, field , accel. and "looking for GPS locaion" . I see a yellow circle and a small blue circle too. A gps satlite and locking try icon on top right. but a satelite and a 'x' cross with it on the left top. whats to look or what can be wrong? Jun 04 14:54:05 ok, I am building a service to make connection and send messages, so it is better to use a bound service, because when activity stops i will no use the service anymore, right ? Jun 04 14:54:07 Quest: in what way is this a -dev question? Jun 04 14:54:18 SimonVT: unfinished computation, dunno, running a delay recusive check on something etc Jun 04 14:54:49 If you're blocking the main thread, it wont be stopped until you finish blocking.. Since, yeah.. If you started a thread, the service will be stopped but the thread will keep running Jun 04 14:54:51 akan01n: why put it in a service if you only want to communicate with the server when your activity is in the foreground? Jun 04 14:55:09 appel1, its about my gps tracking app Jun 04 14:55:55 Quest: you wrote that app? Jun 04 14:56:00 StingRay_: Same as if you finish an activity that's still "doing something" :p Jun 04 14:56:03 appel1, heres a dev question for you if you insist. I cant get a GPS fix on my android phone. what can be the reason. I have tried on tall building roof tops too. http://pastebin.com/fzdSfgtD Jun 04 14:56:09 appel1, no. iam using it to debug Jun 04 14:56:15 appel1: because the messages are async, so I need to keep running and when something is received I need to update the UI. Jun 04 14:56:30 akan01n: a service doesn't make it async Jun 04 14:56:48 akan01n: the service runs on the same thread as your activity Jun 04 14:57:28 hummm... Jun 04 14:57:47 Quest: if the gps doesn't work with any gps app from Google Play it sounds like it is the device that is broken and not a problem with your app Jun 04 14:57:48 akan01n: have you looked at IntentService? Jun 04 14:58:17 it's the simplest to just start using, and it manages most of the service lifecycle for you Jun 04 14:58:22 appel1, i have tried with two phones. just wanted to be Sure. Jun 04 14:58:42 pjdelport: yes, ok! Jun 04 14:58:51 Quest: and other apps get a gps lock but your app doesn't? Jun 04 14:58:57 on both devices? Jun 04 14:59:25 This free starbucks machine at work would probably excite me more if I drank coffee lol Jun 04 14:59:44 akan01n: IntentService implements all the plumbing to run and communicate asynchronously; you just send it messages / requests as intents Jun 04 15:00:07 and it can update data in response Jun 04 15:00:09 appel1, none of the apps lock Jun 04 15:00:16 appel1, not even google navigator Jun 04 15:00:28 Quest: then it is the devices and not your app Jun 04 15:00:46 or the area! Jun 04 15:00:53 or surroundings Jun 04 15:01:02 if your UI uses a CursorLoader, you can have the IntentService save results to the DB / content provider, and the UI will update in response Jun 04 15:01:02 or take your phone out of the microwave Jun 04 15:01:04 StingRay_: well, he said he'd tried from the roof of a tall building =) Jun 04 15:01:17 appel1: that can be good bad Jun 04 15:01:20 pjdelport: ok Jun 04 15:01:22 depends whats on the roof Jun 04 15:01:29 ;) Jun 04 15:01:35 StingRay_: Don't tell me how to live my life Jun 04 15:01:40 Maybe my phone needs to be defrosted Jun 04 15:01:44 how else am I supposed to thaw it out Jun 04 15:01:57 oven ffs Jun 04 15:02:13 gas oven to be more specific Jun 04 15:02:47 or lightly fry it for 5 minutes each side Jun 04 15:02:51 take your pick Jun 04 15:03:27 pjdelport: so it is better to use IntentService instead of a bound service, so when to use bound service ? Jun 04 15:03:39 Ooh Jun 04 15:03:42 Tempura Android Jun 04 15:03:43 lul Jun 04 15:04:45 Let's coauthor a book, "How to Cook Your Android" Jun 04 15:06:11 team up with the will it blend guy Jun 04 15:06:16 in all seriousness though many "micro waves" can bottle up L1 and L2 sat transmissions Jun 04 15:06:38 that includes microwave ovens to some extent :) Jun 04 15:07:20 Microwaves have quarter wave traps, specifically tuned for 2.4GHz. Jun 04 15:07:31 they will not be strongly attenuating for GPS signals. Jun 04 15:07:40 ^door seals Jun 04 15:07:53 SpeedEvil: Hence their annoying behavior in combination with 2.4 GHz phones and routers... Jun 04 15:08:43 The door seal is designed to trap almost all 2.4GHz Jun 04 15:08:48 From getting out Jun 04 15:09:10 I know my laptop works fine sitting on my (operating) microwave Jun 04 15:09:26 SpeedEvil: you'd thing Jun 04 15:09:29 think Jun 04 15:09:50 i have master-detail layout with a listview. when clicking the listview the detailfragment is changed. but how can i keep the listitem selected? Do i need to set a drawable myself? Is there some method for this? Jun 04 15:10:01 But not so much, with many of them. Of course the "enough to not be dangerous" level is very different from the "enough to disrupt communications" levels. Jun 04 15:10:55 Today, most homes emit more from wifi routers than microwaves. Jun 04 15:11:07 Emissions from an oven are well under 30mW typically Jun 04 15:11:22 not mine Jun 04 15:11:26 hard wired ;) Jun 04 15:11:31 or I get headaches Jun 04 15:12:00 * StingRay_ needs a replacement for cigarets, I seem to have nothing joyful in my life no more :( Jun 04 15:12:03 You need a tinfoil hat Jun 04 15:12:26 Fire up a spectrum analyzer and microwave something and you might be surprised Jun 04 15:12:40 Dark-Side: my home office is sound/light proofed with fire walls too, so I have that ...ish Jun 04 15:12:44 StingRay_: I hard wire, but more becuase I have a wireless headset and it gets tons of interference from routers(Old janky headset, I know) Jun 04 15:13:32 here we go; http://durandal.kismetwireless.net/~dragorn/images/mar-microwave.png Jun 04 15:13:57 that was a microwave ~30 feet away Jun 04 15:14:07 pjdelport: I am reading here about IntentService, but I have a chat window, so when I am going to send a message to the server it creates the IntentService, but how I am going to be listening to receive other messages ? the IntentService is no longer running, right ? Jun 04 15:15:20 akan01n: they're not really comparable; you can think of IntentService as a pre-packaged service base class that implements a common service pattern for you, and handles most of the plumbing Jun 04 15:16:06 akan01n: implementing a custom service (bound or unbound) from scratch involves significantly more work Jun 04 15:16:24 ahnn.. ok! Jun 04 15:17:18 akan01n: ah; for that you might need your own service, yeah Jun 04 15:17:42 pjdelport: ok, thanks. Jun 04 15:18:03 akan01n: what kind of chat protocol? Jun 04 15:18:59 for a bidirectional / socket-based chat protocol, you'll probably want a started service Jun 04 15:19:08 http://developer.android.com/guide/components/services.html#CreatingStartedService Jun 04 15:21:35 if it's a server-polling-type chat protocol (e.g. HTTP-based) you can maybe get away with an IntentService still Jun 04 15:21:55 pjdelport: I already have implemented a started service, but my doubt is how to call methods on the service, thats why I was looking at bound service. I dont know if this is the right way, the service creates the connection to the server and send messages to it, but I need a way to interact with the service from the activity, right ? Jun 04 15:22:23 akan01n: ah, okay Jun 04 15:22:45 well, you'll probably not want to communicate too directly Jun 04 15:22:48 akan01n: Generally you make a handler and pass messages to the service via that Jun 04 15:23:07 akan01n: there's a tutorial on the developer site which shows doing that in a relatively simple way Jun 04 15:23:28 akan01n: you end up just passing bundles over the handler to exchange data and initiate actions Jun 04 15:23:31 your activities hava a lifecycle independent of the service, generally speaking Jun 04 15:24:08 dragorn: ok, I didnt know about that. thanks Jun 04 15:25:09 akan01n: how are you storing your chat buffer? Jun 04 15:26:05 just out of pure curiosity why can't I create or define fragments in an existing activity java file? it says "blahblahblahFragment must be defined in its own file" Jun 04 15:26:16 pjdelport: yes, I have already tested that... I have created a started service and send it a Toast every 5 seconds and closed the activity... ;) Jun 04 15:26:36 KillmeSoftly: Curious, why would you need to create a fragment class inside an activity? Jun 04 15:26:45 I generally keep all my fragments/activities in different classes Jun 04 15:26:59 as well as having a package for activities, a package for fragments, for loaders, etc Jun 04 15:28:10 pjdelport: I havent taken a look at yet, any suggestions ? Jun 04 15:29:08 akan01n: No toasts pls :S Jun 04 15:29:17 Brian|CB: hahahaha Jun 04 15:30:28 hi, is it theoretically possible to get the application list installed on android and make a shortcut panel that can be changed dinamically from the list of installed app? Jun 04 15:31:18 akan01n: Seriously, don't use toasts Jun 04 15:31:42 Brian|CB: I was just testing the service, learning android.. ;) Jun 04 15:32:02 akan01n: To test stuff, use Log Jun 04 15:32:11 Trust me, it's much easier to change now than later Jun 04 15:32:16 bad habits are easy to form Jun 04 15:32:48 Brian|CB: ok, I am using now Log.d(..) Jun 04 15:32:55 akan01n: you could persist the chat buffer in a DB / content provider Jun 04 15:33:17 BrianCB -- I don't put fragment classes inside activity class files... well there is one big reason and that was in my question..why can it NOT be done? you used to be able to do that. But your response did not answered the question. Jun 04 15:33:41 pjdelport: ok Jun 04 15:33:46 akan01n: then you can base your UI around a CursorLoader, and just have your service insert into the database, and trigger update notifications Jun 04 15:34:16 the UI should update automagically Jun 04 15:34:55 pjdelport: nice, ok! the DB is a sqlite, right ? Jun 04 15:34:57 ok, another question then, i have a nanohttpd server running in my app, how can i track the session id of a connection ? Jun 04 15:35:08 yeah Jun 04 15:35:33 akan01n: i'm actually using this library for something similar: https://github.com/mitmel/SimpleContentProvider Jun 04 15:35:35 KillmeSoftly: I've learned to stop questioning google. Usually if they tell me not to do something, there is a simpler solution, a more efficient solution, or a more elegant solution Jun 04 15:36:12 appel1, i was disconnected. just wanted to be sure that both of my devices are failing in hardware by that application. Jun 04 15:36:43 it takes care of the ContentProvider plumbing, and gives you a bit more convenient interface to a SQLite DB Jun 04 15:36:44 pjdelport: ok, i will take a look. thanks Jun 04 15:37:35 the library takes care of things like triggering update notifications when you insert from a service, so that the UI's CursorLoaders update Jun 04 15:37:47 Hello, in myApp there is a listview of textview. The textview may contains a link and i use android:autoLink="web" to make them clickable! Now when i tap a textview the function onListItemClick(..) in more called! How can i solve this issue? thanks! Jun 04 15:38:57 akan01n: otherwise, if you use a different strategy to back your chat buffer (e.g. some persistent array), that will determine how your service and UI update each other Jun 04 15:40:10 e.g. you could just use an in-memory chat buffer representation, and organize thread-safe shared access to it Jun 04 15:41:38 KillmeSoftly: Because a fragment is a top-level item and can be defined directly in a xml; if it was a sub-class it would, at minimum, have to be static, and I'm not sure that's possible w the fragment requirements (and would otherwise present issues for instiantiating it twice anyhow) Jun 04 15:41:53 i know that the weblink steals the focus to textview so i tried to use android:descendantFocusability="blocksDescendants" but without results... Jun 04 15:41:59 KillmeSoftly: as I understand it, anyhow Jun 04 15:42:49 pjdelport: I think the DB solution is easier to implement and maintain Jun 04 15:43:44 akan01n: yeah Jun 04 15:44:02 hi, how to push an update to a jsp file in an already live app, without asking users to re-install the app? Jun 04 15:44:25 akan01n: it makes it easy for your activity to resume from any state Jun 04 15:44:53 KillmeSoftly: dragorn seemed to explain what you wanted. Sorry I didn't have a more technical answer for you. Jun 04 15:46:01 Should be no issues having a fragment as an inner class, as long as it's a static class Jun 04 15:46:35 rsz: if it's an asset, too bad. if it's a file you created, you can just recreate it. Jun 04 15:46:48 rsz: but you'd have to have some sort of mechanism in the app for recreating it Jun 04 15:47:23 StingRay_, I just checked out the vogella tutorials on using the ADT, etc... the code examples for java dont look all that different from what i'm used to in python. just have to declare what it is the function does and what it returns instead of just blindly creating one in python. -- anyway -- thanks for pointing me in the right direction. Jun 04 15:48:08 unschooled: Python for what? Jun 04 15:48:45 Brian|CB, when i came into the room earlier, i had asked if anyone here uses python for android dev. i was advised to just learn java Jun 04 15:49:17 Ah. Jun 04 15:49:28 unschooled: I use Java for the Android side, but I do use Python for my backends Jun 04 15:49:34 not sure if that is the kind of thing that would be of use to know Jun 04 15:50:12 Brian|CB, you mean for web services, etc... external to the device? that makes sense. i would think one could code that in whatever they liked. Jun 04 15:50:54 unschooled: Yeah, I do like all of the frontend functionality of most of my apps in Java/Android, and then connect them via REST API to Google App Engine services running Python Jun 04 15:51:13 Brian|CB, I've been wanting to get in on the android app action, but i've never coded anything for a mobile device and have been trying to figure out where to start and with what, etc... etc... Jun 04 15:51:15 thanks dragorn, could you point me to a link that describes this process in a bit more detail... Jun 04 15:51:52 Brian|CB, The only other problem I have is that I don't really have an idea for an app yet... lol!! Jun 04 15:52:03 unschooled: Yeah, thats the hardest part for me honestly :P Jun 04 15:52:12 rsz: not really, I guess look at the data storage functions available to you in the android dev docs. Basically you get a directory and can make whatever files you want in it Jun 04 15:52:13 Brian|CB, I just know it would be cool to make some money from the play store. Jun 04 15:52:14 Thats why I love work. People just shout ideas at me and I make them happen Jun 04 15:52:24 unschooled: Thats getting into it for the wrong reason Jun 04 15:52:40 you want to make a good name for yourself first. Only money to be made for new devs should be ads or consultancy honestly Jun 04 15:52:48 Why does this condition false? setContentView(R.layout.news_article);if (findViewById(R.layout.news_article) != null) { Jun 04 15:52:56 Brian|CB, well, perhaps. maybe i am thinking about it from the wrong angle. Jun 04 15:53:10 just looking for multiple streams of cash Jun 04 15:53:42 unschooled: Honestly there isn't much money to be made by selling apps in the store :S Jun 04 15:53:52 The real money comes from being a salaried developer Jun 04 15:54:06 but to get there, first you need to build a portfolio of experience Jun 04 15:54:12 and to do that, the best way is to make FOSS apps Jun 04 15:55:09 Brian|CB, i am a systems administrator, but i've been teaching myself Python and have written a good number of programs so far. They mostly have to do with automation of office processes, and such. http://jaredfields83.wordpress.com Jun 04 15:55:27 Brian|CB, ranging from console to GUI Jun 04 15:55:55 unschooled: You need to meet some graphic designers :P Jun 04 15:56:12 or at least visit the graphic design IRC, I forget the channel name Jun 04 15:57:16 you dont need design for function Jun 04 15:57:28 that is to say that list of tools wouldn't gain much Jun 04 15:57:29 :) Jun 04 15:57:35 with a designer Jun 04 15:57:51 * monsti loves designer Jun 04 15:57:55 they have big boobs! Jun 04 15:57:56 dragorn,I will start reading them. :-) do you think refactoring the project into bundles(osgi) can make sending updates a bit easier? Jun 04 15:58:13 monsti: WHAT ?? Jun 04 15:58:32 Honestly I want to take a graphic design class sometime Jun 04 15:58:38 my (female) collegue - she has big breasts Jun 04 15:58:42 not only because I need the experience Jun 04 15:58:49 but also they are predominately filled with women Jun 04 15:58:51 gonna say, I'm art/design and I dont Jun 04 15:58:51 and she does the design ;) Jun 04 15:58:55 something my major is extremely lacking in Jun 04 15:59:46 oh wait…maybe I do Jun 04 15:59:53 dam I need to exercise more! Jun 04 16:00:13 Dangit, no matter where I go I can't escape JakeWharton Jun 04 16:00:23 StingRay_: I know that feel Jun 04 16:00:30 My man boobs are bigger than most of my girl friends D: Jun 04 16:00:52 well my man boobs are not even close to g/f Jun 04 16:00:57 but she has huge tits Jun 04 16:01:06 yes so i love desinger (girls) ;) Jun 04 16:01:07 so mine still could be medium Jun 04 16:01:37 you need a male boobs app ;) Jun 04 16:01:37 :-o Jun 04 16:01:41 :-s Jun 04 16:01:43 I am everywhere and I am nowhere Jun 04 16:01:58 * Abhijit checks which channel is it Jun 04 16:02:14 JakeWharton: I was just like randomly browsing through some cool libraries that had been recommended to me at a tech talk, and I see the most recent commit, and its you Jun 04 16:02:16 and I was like Jun 04 16:02:17 wuutt Jun 04 16:02:27 JakeWharton: Can you explain to me the benefits of using retrofit? Jun 04 16:04:56 calling code knows nothing about HTTP, it just calls a method on an object. API declarations are all in one place and are very declarative. It's type safe, all the serialization happens behind the scenes. Jun 04 16:05:07 i'm trying to create an AVD because i left my nexus7 at a friend's house... Note that I have never used an AVD, I always test on an actual device....but every time I try to launch my AVD it gives me this error message: "Failed to allocate memory: 8 Jun 04 16:05:07 This application has requested the Runtime to terminate it in an unusual way." Jun 04 16:05:46 JakeWharton: So no major like performance increases etc? Just a cleaner way of doing REST API interactions? Jun 04 16:05:56 it increases developer performance Jun 04 16:06:08 (so, yes) Jun 04 16:06:28 Hmm Jun 04 16:06:39 Maybe I'll give it a try on some personal projects and if I like it I'll integrate it at work Jun 04 16:07:35 JakeWharton: what json library is used? Jun 04 16:07:59 GSON by default. It's pluggable. Doesn't even have to be JSON. We use it for proto serialization as well. Jun 04 16:08:05 KillmeSoftly: try androvm.org on virtual box Jun 04 16:08:20 JakeWharton: what about proxy support? Jun 04 16:08:23 JakeWharton: If I have the choice in personal projects I always use JSON. ALthough at work we do sometimes have to interface with XML Jun 04 16:08:35 although at my new office this project I'm on I get the choice, so I can pick JSON which is nice Jun 04 16:08:36 JakeWharton: what about customizing the connection timeouts? Jun 04 16:08:39 monsti: that's an HTTP client configuration. Retrofit is an abstraction on HTTP Jun 04 16:08:41 same thing Jun 04 16:09:28 JakeWharton: i have wcf and fault contracts - can i thow me that as exceptions? Jun 04 16:09:56 i don't know what that is Jun 04 16:10:21 Ok so it definitely just took me way too long to figure out the ratio to scale a rectangle down to fit inside another rectangle Jun 04 16:10:25 I'm dumb sometimes >.> Jun 04 16:10:27 JakeWharton: in .net/WCF you define a contract e.g. "MyCoolClassDoesDevisionStuff" Jun 04 16:10:42 JakeWharton: and i have a Device(int a, int b) method Jun 04 16:11:00 in case of a service fault, it can throw a user defined FaultContract - which is also an object Jun 04 16:11:28 Brian|CB, i was away for a moment. call me dense, but I'm not entirely sure what you mean. Jun 04 16:11:29 in case of Device(0,0) i get a devision by zero exception - and i need this on the client as well Jun 04 16:11:42 s/Device/Devide sry Jun 04 16:11:56 no. you'd have to wrap if you want application-specific logic Jun 04 16:12:18 what about the json object that the server creates? Jun 04 16:12:24 is running accel input in its own runnable a good practice (so i can put it to sleep) since it fires off constantly otherwise Jun 04 16:12:50 it's mapped to an object using a converter Jun 04 16:13:21 unschooled: I forget, what did I ping you about last? Jun 04 16:13:33 Brian|CB, needing a graphics designer Jun 04 16:13:36 Ah Jun 04 16:13:48 * monsti needs a steak Jun 04 16:13:50 brb Jun 04 16:13:55 * StingRay_ needs a cig Jun 04 16:13:56 unschooled: Well, everyone needs to be told sometime or another that their UI sucks. I tell it to people all the time, and people tell it to me, and vice versa Jun 04 16:14:11 and some people can't take that kind of criticism, but once you learn to grow from it it becomes a lot more helpful Jun 04 16:14:21 * StingRay_ needs 1 less designer on his app!!! Jun 04 16:14:23 Honestly I'd rather have someone tell me 10 features about my app that they hate than tell me 10 features they love Jun 04 16:14:51 StingRay_ if you live in CA you can always get low-grade medicinal and roll it up ;p Jun 04 16:14:56 Brian|CB, oh, so whether or not it does actually suck, or do you really not like my interfaces. I am not offended. Jun 04 16:15:22 lasserix: UK, we are more up our own arses here Jun 04 16:15:30 ahh Jun 04 16:15:46 unschooled: Honestly your interfaces remind of the the first interfaces I made for apps back in C# during my sophomore year of highschool. Jun 04 16:15:46 but the point of stopping was not to switch to weed Jun 04 16:15:48 :) Jun 04 16:15:57 unschooled: Not trying to say thats bad, but you've got a lot of room to grow. Jun 04 16:16:19 I recommend reading the graphic design subreddits, as well as idling in their IRC channels if you like to do that Jun 04 16:16:24 cause I like to idle in useful channels as much as possible Jun 04 16:17:17 Brian|CB: graphics design is not something you can get infected with … in an idle way Jun 04 16:17:24 Brian|CB, lol! I only just discovered wxFormBuilder a couple of months ago. I'm sure I'll get into skinning at some point, but it wasnt necessary for those apps. they were practical solutions to an issue. Jun 04 16:17:53 also it's not something you read a few guides on either Jun 04 16:18:10 well I say that, I know many designers who just "copy" something good lol Jun 04 16:18:26 StingRay_: But the good ideas and practices people bring up can seep in to your subconscious Jun 04 16:18:28 which I feel is good Jun 04 16:18:38 I disagree Jun 04 16:18:46 thats inherited passive stuff Jun 04 16:18:54 I also feel like just learning a good idea of how colors work is incredibly helpful Jun 04 16:18:57 and not what I would call active design skills or knowledge Jun 04 16:19:02 I just learned about the difference between RGBA and HSV and such the other day Jun 04 16:19:02 it presumes the mind is ever passive Jun 04 16:19:05 originality vs inspiration? Jun 04 16:19:05 and its helped me immensely Jun 04 16:19:13 maybe when you're in a coma, but otherwise it is always crunching... Jun 04 16:19:56 Brian|CB: the diff between RGB and HSV is not really an artistic consideration Jun 04 16:20:32 and example of tech artistic tie-in is something like …erm…. ah 16bit color Jun 04 16:20:42 why is it 565 etc Jun 04 16:21:14 cause thats perceptual theory with a grounding in real life design considerations Jun 04 16:21:16 :) Jun 04 16:21:39 "beauty is in the eye of the beholder" Jun 04 16:21:48 as in the reason green has 6bit and the rest 5 Jun 04 16:23:30 is that why motherboards are green? Jun 04 16:23:49 No motherboards are green because they grow on trees Jun 04 16:23:49 duh Jun 04 16:24:00 lol…or thats the grade of fiber for the pcb Jun 04 16:25:57 if you need a stand while developing, it's easy to make out of cardboard and hot glue Jun 04 16:26:31 https://www.dropbox.com/sc/d18il71uc3w0qz9/KzSVrX1GK8 :) Jun 04 16:26:46 lasserix: I did better Jun 04 16:26:55 for oracle VM i need a boot disc right??? or image of an OS? Jun 04 16:27:09 one of my macbooks (old white) screen got destroyed Jun 04 16:27:10 lasserix: I might be getting a used Transformer tablet. So now I'll have an S3, N7 and TF Jun 04 16:27:18 so phone, small tablet, and large tablet. Jun 04 16:27:25 I kinda wanna build a test bench for them to sit in lol Jun 04 16:27:27 so with wood and glue I made a pretty good xbmc pc Jun 04 16:27:46 hehe cool Jun 04 16:28:09 although if you want some class you got to check out this: https://www.youtube.com/watch?v=kggb0yPzEn0 Jun 04 16:28:16 man i wish i still did woodworking Jun 04 16:34:50 can any one help me with the sample launcher code with android sdk Jun 04 16:35:26 I checked the code but i cannot understand how they designed the launcher view Jun 04 16:35:35 I got confused Jun 04 16:35:36 :( Jun 04 16:35:57 Cafzalone: you would fair better in here with short direct questions I think Jun 04 16:36:18 not sure anyone would be able to spare the time to look/guide/walk throught it with you Jun 04 16:36:19 Cafzalone: Not really sure what you're asking Jun 04 16:36:23 are you asking how to start an activity? Jun 04 16:36:37 StringRay_ sry Jun 04 16:36:49 I'm working on custom launcher app Jun 04 16:38:25 have you checked the sample custom launcher comes with sdk?? Jun 04 16:38:45 Hey, I am extending AsyncTask for a non-main thread and I am still getting android.os.NetworkOnMainThreadException. Jun 04 16:39:16 I have an external class that is public scope w/ the AsyncTask extension. Jun 04 16:41:07 Any clues? Jun 04 16:41:34 Snicers-Work: Might I ask what you're using the ASycnTask to do Jun 04 16:41:45 http request for json data Jun 04 16:42:16 Snicers-Work: Why not throw it in an ASyncTaskLoader? Jun 04 16:43:20 not sure how those work, but shouldn't extending asynctask on the class work fine? Jun 04 16:43:30 yes Jun 04 16:44:08 Snicers-Work: As long as you keep the network calls to the background thread Jun 04 16:44:23 protected String doInBackground(String... uri) correct? Jun 04 16:44:52 http://stackoverflow.com/questions/6343166/android-os-networkonmainthreadexception Jun 04 16:45:13 That is the one I already had up Brian|CB Jun 04 16:45:31 I have it exactly like that but with HttpClient instead Jun 04 16:45:44 Snicers-Work: are you running it with execute(), etc.? Jun 04 16:45:56 pastebin your code? Jun 04 16:45:59 httpclient.execute(new HttpGet(uri[0])); Jun 04 16:46:36 Snicers-Work: Did you try all of the solutions on that thread? Jun 04 16:46:48 http://pastebin.com/jmpGVUBL Jun 04 16:47:03 I don't want to run network on the main thread Jun 04 16:47:06 I need a new thread. Jun 04 16:48:04 Snicers-Work: hmm, what's the traceback look like? Jun 04 16:48:46 Snicers-Work: Did you try this answer? http://stackoverflow.com/a/9289190 Jun 04 16:48:54 erm, would not HttpGet be a network call ? Jun 04 16:49:09 how does the newest android api recognize driving activity? using accelerometer? or GPS? Jun 04 16:49:12 and since you passing to async it needs result to pass into itself Jun 04 16:49:16 Brian|CB I refuse to run network communication on the main thread. Jun 04 16:49:23 so thats outside the aync and thread Jun 04 16:49:59 HttpGet is a network call, on the AsyncTask new thread yeah? Jun 04 16:50:05 What do you mean by traceback? Jun 04 16:50:16 Snicers-Work: your passing the result of HttpGet Jun 04 16:50:21 the stack trace? Jun 04 16:50:43 Snicers-Work: can you post the stack trace of the NetworkOnMainThreadException? Jun 04 16:50:43 so your saying gonna start this async, now go fetch this (HttpGet) and pass into the async Jun 04 16:50:57 HttpGet is a network call though right ? Jun 04 16:51:05 right i think I see it. Jun 04 16:51:50 StingRay_: HttpGet is just the request representation; httpclient.execute() is what does the network I/O Jun 04 16:52:14 oh, never used HttpGet, well thats odd then Jun 04 16:52:28 so I am fine inside of execute right? Jun 04 16:52:49 i read a few lines about HttpGet and said follows re-directs so thought it was network I/O Jun 04 16:53:09 Snicers-Work: looks like it, yeah Jun 04 16:53:25 so what is getting ran on the main thread? Jun 04 16:53:52 Snicers-Work: the exception might be coming from someplace else, hence wanting to see the stack trace Jun 04 16:54:13 the stack trace should say what :) Jun 04 16:54:34 e.printStackTrace() is what you mean pjdelport? Jun 04 16:55:25 Snicers-Work: well, just adb logcat should be fine Jun 04 16:55:38 log cat what exactly? Jun 04 16:55:57 make it crash, run adb logcat -d | less, and you should see the traceback near the end Jun 04 16:56:14 http://developer.android.com/tools/help/logcat.html :) Jun 04 16:56:42 I know log cat, just not a trace back. Jun 04 16:56:52 or if you're not developing with the command line, there's a logcat tab in DDMS Jun 04 16:56:57 oh Jun 04 16:57:05 well, the traceback should be in the logcat output Jun 04 16:57:20 brb for lunch Jun 04 16:57:46 Classic lunch break Jun 04 16:57:55 I'm gonna wait for my coworkers to get the chinese they ordered and eat with them Jun 04 17:00:12 in my hotel there are 80 chinese people Jun 04 17:00:20 i never ever eat them! Jun 04 17:01:36 I made a co-worker say the worst thing once when we were all working late, looking to order food and had a cute chinese girl just started working for us Jun 04 17:01:56 ah, memories of employment, wonderful Jun 04 17:09:01 hi all, anyone has an idea how to visualize like a waveform on audiorecord? in real time.. Jun 04 17:10:42 erm, yeah, and if you google search it and look at images you will too Jun 04 17:10:44 :) Jun 04 17:10:59 mbarisa: its quite, straight forward when you read the buffer, dup it and pass it on to a thread that renders to a bitmap Jun 04 17:11:33 are there any examples of similar thingie.. i am not that much of an expert :D Jun 04 17:11:51 mbarisa: if your bitwidth is say 16bit signed then you know your limits are -32,767 to 32,768 Jun 04 17:12:21 but thats for simple amplitute Jun 04 17:12:30 thats what he wants Jun 04 17:12:30 you have pitch variange/average too Jun 04 17:12:36 variance* Jun 04 17:12:41 a waveform Jun 04 17:12:43 yeah i need to have it nicely represented.. Jun 04 17:12:54 which is amplitute/time graph Jun 04 17:13:27 mbarisa: with 16bit you would take your ByteBuffer and get a ShortBuffer from it, for each sample, determine its scale in relation to your view's height Jun 04 17:13:38 now draw a line or rect on your canvas Jun 04 17:14:22 ok let me give it a try :) Jun 04 17:14:25 you can then enhance this basic idea with horiz scale Jun 04 17:14:43 so, there is no need to take every sample if your can only display say 100 verticals Jun 04 17:14:55 thanks .. i didnt think of it yet much.. but i thought there could be some library that would create some nice graphics on surfaceview or something.. Jun 04 17:16:31 so take your width() and divide it by how much time you want visible in the on screen waveform, say 5 seconds, now take your sample rate and determine at what pitch of samples you need to skip and therefore only draw what you can see on Jun 04 17:16:39 your bitamp/canvas/view Jun 04 17:23:06 StingRay_: do you have any good example of that waveform.. if not ill start from scratch Jun 04 17:23:30 you mean the visual look of it ? Jun 04 17:23:43 anything is good Jun 04 17:23:57 well like I said, look at google images Jun 04 17:24:00 there are many ways Jun 04 17:24:10 ok :D that is not going to help much but thanks :D Jun 04 17:24:13 winamp used to have some funky ones Jun 04 17:24:26 back Jun 04 17:25:17 alright, so is it the HttpGet(uri[0]) within the asynctask that is causing a main thread execution, if so, why? Jun 04 17:26:17 Do we have some rooting experts available? Jun 04 17:26:37 Brendan55: wrong channel Jun 04 17:26:38 I root, but not expertly. Why? Jun 04 17:26:40 ah Jun 04 17:26:44 yeah that is true Jun 04 17:26:53 Uh oh. What's the right channel? Jun 04 17:27:03 #android-root ??? Jun 04 17:27:08 #xda-devs Jun 04 17:27:09 ah, thank you. Sorry Jun 04 17:27:13 take ya pick Jun 04 17:27:13 Has anyone else noticed that the shareintent, with plain text, doesn't work w/ the Facebook app? Jun 04 17:27:16 xda devs would be best Jun 04 17:30:23 anyone here interested in working a android project with me? Jun 04 17:31:05 andrewcarter> yea Jun 04 17:32:58 Cafzalone: SOUNDS GOOD :D Jun 04 17:33:32 andrewcarter> whats nxt?? Jun 04 17:34:21 Cafzalone: LIMP BIZKIT PROBS Jun 04 17:35:35 It is this line that kills it Jun 04 17:35:35 response = httpclient.execute(new HttpGet(uri[0])); Jun 04 17:35:47 andrewcarter> lets solve it, :) Jun 04 17:35:49 but shouldn't .execute happen on the async thread? Jun 04 17:36:21 wtf, why is setText() in textview final?!?! :( Jun 04 17:37:02 lol Jun 04 17:37:09 Snicers-Work: do what I said 1st, just to see Jun 04 17:37:10 hey pfn Jun 04 17:37:27 What did you say first? Jun 04 17:37:45 dont use that HttpGet Jun 04 17:37:51 pfn: override setText (CharSequence text, TextView.BufferType type) Jun 04 17:37:52 use what? Jun 04 17:37:52 just pass a string to it Jun 04 17:37:58 pfn: all the other methods call that Jun 04 17:38:24 Napalm, indeed, thanks, I thought they were all final Jun 04 17:38:43 Can't pass a string to httpclient Jun 04 17:38:52 no to async Jun 04 17:39:05 move httpGet inside the do in background Jun 04 17:39:19 httpget is inside do in background Jun 04 17:39:23 async is getting a string Jun 04 17:41:12 so.... no clues? **** BEGIN LOGGING AT Tue Jun 04 17:53:04 2013 Jun 04 17:57:49 Snicers-Work: probably the way your calling it Jun 04 17:57:54 as in calling your async class Jun 04 18:05:03 anyone too got issues with usb host support? if i connect a usb device (f.e. a stick) it says the sd card was unmounted and that i had to put in a new one Jun 04 18:05:49 after click on that, the usb device blinks for a few seconds and then stopped working and get detached from usb Jun 04 18:07:04 Hello, i have a clickable textview that contains a weblink. I would like that user can open the link tapping on it and to do this i use android:autoLink="web", but now the textview is no more clickable! I think that the link steal the focus to the textview! Any help? Thanks Jun 04 18:09:11 anyone here ever tried MX Player package in their app ? ? Jun 04 18:09:13 im surprised ive never built an app that takes advantage of the fact that Service has a dump() method call on it and dumpsys can invoke it Jun 04 18:09:14 https://sites.google.com/site/mxvpen/api Jun 04 18:14:38 any way/hack to bypass ANR ? ? Jun 04 18:14:40 does anybody knows how alpha and beta testing works in google play Jun 04 18:14:41 popers: yeah Jun 04 18:14:41 Looney: uh, what? Jun 04 18:14:41 Looney: do background tasks... Jun 04 18:14:43 no, not my app Jun 04 18:14:58 it is MX Player Jun 04 18:15:06 Looney: then the programmer must do background tasks Jun 04 18:15:50 I know, I use AsyncTask for anything that is on network Jun 04 18:15:59 but MX Player gets funny for some streams Jun 04 18:16:49 Looney: then i don't know how to do it my friend but maybe try to contact MXPlayer programmers and comment the bug Jun 04 18:17:02 how StingRay_ Jun 04 18:17:12 yup, this is what I have in my mind ;-) Jun 04 18:17:19 popers: like it's supposed to Jun 04 18:17:26 I dont understand the question Jun 04 18:17:28 how does it work ? Jun 04 18:17:30 app in alpha and beta testing will be available for everybody Jun 04 18:17:44 Hi. I need to add the Android browser to my website's list of accepted browsers. What would be a decent version to start supporting from? I.e. all versions from version X and up. Jun 04 18:17:53 popers: have you read about it ? Jun 04 18:17:56 or only for acconts set for testing in my Android Developer Console Jun 04 18:17:59 cause thats not what it says Jun 04 18:18:01 nothing Jun 04 18:18:08 g+ groups Jun 04 18:18:11 and signup Jun 04 18:18:13 etc Jun 04 18:18:34 is there any official webpage for check it? Jun 04 18:20:05 popers: and videos from IO to watch Jun 04 18:22:42 popers: https://support.google.com/googleplay/android-developer/answer/3131213?hl=en Jun 04 18:26:25 so much join/leave Jun 04 18:26:31 no actual talk Jun 04 18:26:36 so quiet... Jun 04 18:26:40 im here Jun 04 18:26:55 * Looney thinks of idea to make smalltalk Jun 04 18:27:00 Honesty... http://i.imgur.com/HcZOX6m.jpg Jun 04 18:27:30 a certain website has a google-maps embedded on it...within the google maps there are various links that popup with an image.....is there anyway I can grab all of the urls to those images? Jun 04 18:27:43 nice on Xabster **** BEGIN LOGGING AT Tue Jun 04 18:36:00 2013 Jun 04 18:36:50 * LuxuryMo_ Can't seem to get nested fragments working in DialogFragment Jun 04 18:45:25 hmm, I don't see anyting in the Bundle class that lets you put an ArrayList< ArrayList > on it. Jun 04 18:45:36 i want to add an array of arrays, Jun 04 18:52:10 kc8hfi_, you can use putSerializable Jun 04 18:53:24 EPG: hmm. So i would need to create my own object, extending Serializable, then make an array of my own objects? Jun 04 18:53:46 no, ArrayList and String already implement Serializable Jun 04 18:54:01 you should be able to simple put the object in Jun 04 18:54:25 EPG: ok, i see Jun 04 18:55:00 ok I'm a bit baffled, how when I deserialize a sparseArray from gson does it give me doubles ? Jun 04 18:55:33 even if I deserial to a sparseArray they are doubles Jun 04 18:55:42 is that normal ? Jun 04 18:57:25 You probably want to write a custom type adapter for SparseArray Jun 04 18:57:40 not sure that passing it straight through Gson is smart Jun 04 18:58:06 StingRay_, found this thread: https://groups.google.com/forum/?fromgroups#!topic/google-gson/SYRDR6JHBkc Jun 04 18:59:04 "...or register a type-adapter for it." Jun 04 18:59:38 JakeWharton: you mean a Type as in new TypeToken>(){}.getType() ? Jun 04 18:59:53 no, a type adapter tells Gson how to (de)serialize things Jun 04 19:00:01 oh arses Jun 04 19:00:04 really ? Jun 04 19:00:16 http://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/TypeAdapter.html Jun 04 19:00:53 a SparseArray should be serialized to a map in JSON Jun 04 19:01:56 but a sparseArray is supposed to be quick right ? so worth keeping if I have loads of them Jun 04 19:02:49 the JSON representation of a SparseArray is an object with key-value pairs Jun 04 19:03:09 {1: "Foo", 4: "Bar", 3455677: "Baz"} Jun 04 19:05:43 netsplit Jun 04 19:07:13 hi guys, I have an issue. I have an activity which has a spinner, this spinner gets populated with entries dynamically inside onCreate(), then I have an onItemSelected() that waits the user to select an option from the spinner and opens a new activity. The problem here is that whenever I open my activity it opens automatically the second activity (without the user selecting anything from the spinne Jun 04 19:07:13 r) Jun 04 19:07:41 basically this http://bpaste.net/show/9Xx3GGcNvXS0Y7BI6qyE/ Jun 04 19:08:07 any help appreciated Jun 04 19:08:40 Phr33d0m: spinner.setOnItemSelectedListener(this); Jun 04 19:09:14 Napalm if I remove that line, whatever I select from the spinner doesn't trigger onItemSelected() Jun 04 19:09:20 Phr33d0m: you set the adapter after you registered the listener, so the listener will get notified about the change Jun 04 19:09:35 Phr33d0m: your using a selection listener and thats your problem, use a click listener Jun 04 19:11:40 woo hopefully my app is compatible all the way back to api 7 now Jun 04 19:11:56 Stoob: what does lint say? Jun 04 19:12:41 ? Jun 04 19:13:12 does it complain about methods incompatible with your minsdk version? Jun 04 19:14:01 Napalm so change that like with "spinner.setOnItemClickListener((OnItemClickListener) this);" and then control the "click" instead the selection? Jun 04 19:14:09 havent bothered reading through it but i dont believe so Jun 04 19:14:10 yes Jun 04 19:14:29 * Stoob is just launching it in an emulator Jun 04 19:14:35 mostly im worried about theming Jun 04 19:14:56 perhaps you should read through the lint output Jun 04 19:15:04 Yep, my theming's off Jun 04 19:15:13 because it is meant to be read Jun 04 19:15:13 perhaps I would if I was worried about it? Jun 04 19:15:39 you sounded like you was worried about your backward compatibility :) Jun 04 19:15:50 and there is a lot of lint output that tells you that Jun 04 19:15:52 There are enough "warnings" to make it obnoxious to read through even for a perfectly well written app Jun 04 19:16:25 okay we seem to have different understandings of 'well written app'. a well written app doesn't produce any lint warnings Jun 04 19:16:57 I'd say the API Demo apps should be considered well written, and they have literally hundreds of warnings across them Jun 04 19:17:24 i would say the api demo demonstrate a very specific api, and from what i've seen yet, doesnt' always follow 'well written' Jun 04 19:17:41 Unused imports, deprecated fields, they are not terribly important to me within an app that's "beta" as far as im concerned Jun 04 19:17:52 e.g. they demonstrate new methods, so why would they bother doing all the backward compatibility stuff, if their sole purpose is to demonstrate that api Jun 04 19:18:38 They aren't backward compatibility lint warnings, they're just general annoying warnings that "everyone" ignores on a regular basis Jun 04 19:19:04 Napalm eclipse says I can't use setonclicklistener on a spinner and recommends me to use setonselectedlistener... Jun 04 19:19:19 onitemclicklistener Jun 04 19:19:27 Anyway, nah, my lint output is clean Jun 04 19:19:45 hi all. how long is the lifecycle of a BroadcastReceiver that is not defined in the manifest? does it depends on who registers it? an activity, a service... thanks a lot. Jun 04 19:20:10 Phr33d0m: onitemselectedlistener is the right one Jun 04 19:20:20 Does service app , that run audio in background, could access the "volume keys" when device is "dimmed" Jun 04 19:20:21 ? Jun 04 19:20:54 Phr33d0m: have you tried moving `spinner.setOnItemSelectedListener(this);` to the end of your onCreate method (so the adapter will be set before that line) Jun 04 19:21:10 timroes yes, I already tried that and same effect Jun 04 19:22:31 Phr33d0m: you hide your spinner, when do you show it? Jun 04 19:23:05 timroes I don't show it, that's why I have spinner.performClick(); which opens the spinner list Jun 04 19:23:18 I'm looking for beta testers for my touch input record&replay app RepetiTouch (free version is on google play). Requires root and ICS or later. If interested, please contact me. Jun 04 19:23:36 spinner will automatically have a selected item no ? Jun 04 19:23:53 and when created would select that item Jun 04 19:24:07 yeah but as long as the listener registers after it is selected, I thought it shouldn't be a problem Jun 04 19:24:12 StingRay_ yeah, that's my issue most probably, that's why I was suggested to track 'click' instead of 'select' Jun 04 19:24:54 a spinner should use OnItemSelectedListener (as you figured out right) so the problem is somewhere else Jun 04 19:26:53 Phr33d0m, as a workaround, could you just ignore the first trigger of the OnItemSelectedListener? Jun 04 19:27:25 EPG not possible to ignore it Jun 04 19:28:10 Phr33d0m: dont start an activity and just log how many times it triggers Jun 04 19:28:25 just the once or for every item as you add Jun 04 19:28:40 or it adds rather Jun 04 19:29:05 then whatever that figure, keep a count and only do what you want if curren > count Jun 04 19:29:08 does the itemselectedlistener recieve the selected item as a parameter? Jun 04 19:29:08 current* Jun 04 19:29:12 :| Jun 04 19:29:18 Guys I am going through Youtube Data API and I understood correctly it should not be problem to create Android APP which uploads video to one youtube account ? Jun 04 19:29:31 Phr33d0m, why isn't it possible I thought like if(firstRun) { firstRun = false; return; } Jun 04 19:30:11 EPG: that if it triggers once :) Jun 04 19:30:27 yep, I guess I should read the whole backlog then Jun 04 19:32:30 seems I can't use onitemclicklistener... and I think I found the reason "For Spinner you have to use OnItemSelectedListener because the behaviour of of Spinner is selecting Item from a List of Spinner Items. OnItemClickListener is used for ListView where you have all the List Items and you have to click the items that are in the ListView and listen its action." Jun 04 19:35:01 how often does your listener is triggered without selecting an item by user? Jun 04 19:35:23 *how often is your listener triggered Jun 04 19:36:50 Hi devs boys and gals, anyone know any video tutorial about android aside from whats in code.org? Jun 04 19:37:45 EPG the listener should be only triggered after clicking a button which opens the spinner and *then* the user should select an item and the listener should trigger Jun 04 19:37:57 this does not happen, as soon I start my activity, the listener is triggered Jun 04 19:38:06 Phr33d0m: okay this is kind of not the best solution, but its always called whenever the layout gets inflated. you need to set a flag that the intatiation call ahs already been made (see also http://stackoverflow.com/questions/5624825/spinner-onitemselected-executes-when-it-is-not-suppose-to/5918177#5918177) Jun 04 19:38:32 timroes, that's what i meant with the firstRun stuff above Jun 04 19:39:00 yeah i know, I just thought it cannot be that dirty, that this is just a matter of the way you call it, but as it seem you have no chance to supress that call Jun 04 19:39:20 androidnewb, put android boot camp" into youtube. you should find some stuff by marakana. Jun 04 19:39:42 well, I guess Spinner isn't intended for operations like starting an Activity onItemSelected Jun 04 19:39:53 timroes thanks I'll have a look at that Jun 04 19:45:50 timroes I can't set setCallbackDuringFling(false); on a spinner, am I doing something wrong here? Jun 04 19:48:08 yeah it's not a method of Spinner :) Jun 04 19:48:13 only of Gallery Jun 04 19:49:07 then... what will be a solution for me? http://bpaste.net/show/hwHIGYNBAuE2dCGmrVdQ/ now the listener never triggers Jun 04 19:50:21 if you just have one spinner, just compare mSpinnerInitiailzedCount to 1 Jun 04 19:55:06 where's a good place to find beta testers? Jun 04 19:56:10 Phr33d0m: okay i digged now through the sources and I assume that is even a bug Jun 04 19:57:59 timroes, where do you assume the bug? Jun 04 19:59:07 I changed my mind, read something wrong :) Jun 04 19:59:11 so still looking what it does Jun 04 19:59:29 ok :D Jun 04 20:00:24 timroes okay I think I managed to do it with the last link you gave me, now I have one last problem to deal with, if an item is already selected and I click the spinner and select the same item, the listener is not triggered - any ideas on that? Jun 04 20:00:26 but if somethign calls `checkSelectionChanged()` (what eventually causes the listener to be called, if something changed) while the layout phase isn't finished yet, the AdapterView posts the task until the layout has finished. As soon as it finished it checks if something changed, and if so notifies the listener Jun 04 20:01:46 as it seem something did change for it, though from the moment on you call setOnItemSelected listener, to the moment the layout is finished, nothing really changed. So I assume the checkSelectionChanged, gets called before the adapter is set, posts the check to after the layouting, after the layouting the adapter is set and it detects a change in dataset Jun 04 20:02:13 Phr33d0m, here you could use onClickListener Jun 04 20:02:27 Phr33d0m: yeah that is how it should behave :) Jun 04 20:02:35 because the spinner didn't change its selection Jun 04 20:02:50 okay, then I'll find a workaround for that Jun 04 20:02:50 I guess you are using a spinner in a very bad situation where you shouldn't actually use it Jun 04 20:02:55 do you have a specific reason to use Spinner for what you do? Jun 04 20:03:00 Guys I am going through Youtube Data API and I understood correctly it should not be problem to create Android APP which uploads video to one youtube account ? Jun 04 20:03:01 anyways, thank you very much timroes and everyone that helped me on this :) Jun 04 20:03:09 since you are anyway hiding it, i guess you even don't want its look and feel? Jun 04 20:03:29 EPG: you cannot use onClickListener on a spinner, it will throw an exception afaik Jun 04 20:04:00 timroes if you want I'll make a small video on what it looks like so you might understand better why I'm doing it like that Jun 04 20:04:06 Does service app , that run audio in background, could access the "volume keys" when device is "dimmed" Jun 04 20:04:06 :) Jun 04 20:04:23 * onItemClick Jun 04 20:04:25 Phr33d0m: you can also try to explain :) Jun 04 20:04:45 bluesm1: try re-wroding , it seems your question is muddled Jun 04 20:04:49 EPG: same :) Jun 04 20:05:02 425 @Override Jun 04 20:05:03 426 public void setOnItemClickListener(OnItemClickListener l) { Jun 04 20:05:03 427 throw new RuntimeException("setOnItemClickListener cannot be used with a spinner."); Jun 04 20:05:03 428 } Jun 04 20:05:26 thanks, learning something again :) Jun 04 20:05:52 hmm i would like debugging through the android sources in android Studio Jun 04 20:05:59 timroes I'm bad at explaining but well - I want, when the activity is opened only 2 buttons to appear, the first button is "Read files" (which means the user wants to read a file from the available ones), when that button is clicked *then* it shows the list of files using the spinner (that's why I'm hiding it initially - because it shouldn't show unleast the user clicks that button) Jun 04 20:06:26 timroes the best practice would have been to show a linearlayout with the files, but I wanted something different to practice with, like the spinner I'm using currently Jun 04 20:07:10 Phr33d0m: yeah tahts Jun 04 20:07:13 ooops Jun 04 20:07:15 thats a Jun 04 20:07:27 ffs, me and my keyboard are not doing well Jun 04 20:07:55 Phr33d0m: http://developer.android.com/guide/topics/ui/menus.html#context-menu scroll down to creating a floating context menu Jun 04 20:07:58 thats actually what you want :) Jun 04 20:08:01 what I wanted to say was : Phr33d0m yeah, thats a bit odd and not brilliant design Jun 04 20:08:02 at least iguess so Jun 04 20:08:46 timroes yes I did initially the context-menu thing, then, as I said, I wanted to try something I haven't used for that purpose (for practice) Jun 04 20:09:10 timroes first I did the linearlayout thing, then the context-menu and ended up with the spinner... that's how I learn best - with lot of practice Jun 04 20:09:21 yeah and what you learn from this: Jun 04 20:09:29 (a) spinner is somehow a bit broken in its behavior Jun 04 20:09:31 Phr33d0m: I think the problem is your using a widget for a purpose and function that it's not really suited to Jun 04 20:09:31 * don't use spinners for that purpose :D Jun 04 20:09:35 (b) don't use a spinner for that :D Jun 04 20:09:54 if you make a view invisible to use it, your alarm bells should ring anyway :D Jun 04 20:09:59 StingRay_: I saw the app that will move the song (audio) Jun 04 20:10:29 StingRay_: For 10 second forward, when you click volume up button (when device is dimmed) Jun 04 20:10:45 Phr33d0m: another idea with a spinner Jun 04 20:10:48 why hide it at all? Jun 04 20:11:03 just let the text of spinner be Select file Jun 04 20:11:06 and list all files when opened Jun 04 20:11:44 timroes because it's not needed when the activity starts, there are 2 buttons: "Read files" and "Write a file" if the user wants to write a file he doesn't need to see a spinner with currently written files unleast he clicks "Read files" Jun 04 20:12:40 hard to say without seeing what you exactly want to do, but no matter, you now know, spinner is not a good idea for that if you hide it :) Jun 04 20:13:07 though i still think you can hardly argue, that it is a feature, the onItemSelected method gets called when instantiating a spinner Jun 04 20:13:45 report it as a bug if you think it is, I doubt I will be able to explain it better than you Jun 04 20:14:04 hey guys Jun 04 20:18:21 Phr33d0m: another perhaps cleanr (maybe not) approach with the hidden spinner: http://pastebin.com/twvgUxbE just change the listener on the first time :) Jun 04 20:18:46 due to implementing the switcher listener anonymous, I wouldn't even consider this so much worse then the couting approach :) Jun 04 20:18:48 damn Jun 04 20:18:48 google maps support requires api lvl 8 Jun 04 20:18:48 ohwell Jun 04 20:19:37 I have a question about service receivers Jun 04 20:20:05 especially since you can wrap this method into a new class you can use everywhere, so you would only need to call spinner.setOnItemSelectedListener(new WrappedSelectionListener(this)); Jun 04 20:20:08 I have a service that does an http request. On error (like a timeout) it just sets msg.what = ServiceReceiver.STATUS_ERROR; Jun 04 20:20:19 but then from within my code I don't know if it timed out or what Jun 04 20:20:39 so I added special handling for timing out and msg.obj = "TimeOut"; (probably not the best solution, here) Jun 04 20:21:02 so in my receiver I ened to set the error handling to check if msg.obj is a string, and if so, check if it equals "TimeOut" Jun 04 20:21:08 feels like a crappy solution to this problem Jun 04 20:21:14 is there a standard, good way to do this? Jun 04 20:21:22 How do services report what caused the error? Jun 04 20:24:10 Seems reasonable to me. Jun 04 20:25:36 0 is false? Jun 04 20:25:39 1 is true? Jun 04 20:25:51 and 0.5 is maybe Jun 04 20:26:08 or Object = e; Jun 04 20:26:08 ok, haha Jun 04 20:26:34 kc8hfi_: if this was a real question, depends on where and what Jun 04 20:26:37 unless your not catching exceptions for anything Jun 04 20:27:12 i just need to set something and then check it, figured i'd use numbers for easier comparisn Jun 04 20:27:31 you are talking about java? Jun 04 20:27:33 if (ok == 1) Jun 04 20:27:43 why would you do that? Jun 04 20:27:55 whats about ok == true (or even shorter if(ok) Jun 04 20:28:37 i reckon that would work too Jun 04 20:29:14 timroes an issue I had before with the context menus was that I had to longpress the button... is it possible to make it appear with a normal click? Jun 04 20:30:24 yeah Toast! Jun 04 20:31:26 is there something like Eclipse Memory Analyze (MAT) for intellij ? Jun 04 20:31:35 Phr33d0m: openContextMenu(context); Jun 04 20:33:09 the parameter should be the view sorry not the context Jun 04 20:35:20 Phr33d0m: also see http://stackoverflow.com/a/7997266/1044403 Jun 04 20:35:36 timroes I was just looking at that, thanks Jun 04 20:52:31 what does binding to a service mean? also, are services inherently singletons? how do multiple activities communicate with the same service instance? Jun 04 20:54:05 by binding to it Jun 04 20:54:44 My list selector seems to getting darker every so often. It's almost like the list selector is on top of another one... I cant seem to figure out why this is happening. Jun 04 20:54:47 what does that mean? Jun 04 20:55:04 what "bind" ? Jun 04 20:55:08 yes Jun 04 20:55:33 http://www.thefreedictionary.com/bind Jun 04 20:55:39 dude, come on Jun 04 20:56:10 I wish ddms had a built in 'top' so I could see wtf is eating all my cpu Jun 04 20:57:10 erisco: http://developer.android.com/guide/components/bound-services.html Jun 04 20:59:12 the only explanation it provides, that I can see, is that "binding" allows multiple processes to work with the service. alright, but I don't care about that. I just want a local service Jun 04 20:59:43 is Google+ the only way to authenticate with Google Game service? Jun 04 20:59:58 who's using google+ anyways Jun 04 21:00:19 what I'm expecting is a persistent background task (one that persists when the active activity changes) and for any of my activities to communicate with it Jun 04 21:00:30 I am using this for sqlite database interaction. Jun 04 21:01:20 erisco: so you need a started service, start the service with startService() and now you can close the activity and the service will still be running Jun 04 21:01:45 fine, but it hasn't been made very clear how an activity is intended to communicate with the service Jun 04 21:02:00 if it is necessary to do this ServiceConnection thing in every activity, that isn't acceptable Jun 04 21:02:13 erisco: you can use messenger or a broadcast receiver Jun 04 21:02:35 erisco: http://androidexperinz.wordpress.com/2012/02/14/communication-between-service-and-activity-part-1/ Jun 04 21:03:06 have seen it already... their damn line wrap lol Jun 04 21:06:15 hm, this looks like an ugly event bus of sorts Jun 04 21:06:27 string filtering... lovely Jun 04 21:06:42 Guys I am going through Youtube Data API and I understood correctly it should not be problem to create Android APP which uploads video to one youtube account ? Jun 04 21:08:38 So, is there a way to get an activity result aside from overriding onActivityResult. Jun 04 21:09:35 Trudko, I haven't done it, but issues that stand out to me would be authentication (I have done openauth and it was a complete PITA) and also resumable uploading. Maybe you can find a java lib which handles that for you Jun 04 21:09:48 svm_invictvs, no Jun 04 21:10:18 svm_invictvs, I ran into that problem too. what I did was make a non-static private nested class that extended from activity Jun 04 21:10:26 erisco: well there is OAuth for authetication and – Resumable Uploads from 2.0 api Jun 04 21:10:29 svm_invictvs, in that way I could receive the result and still communicate with the parent activity Jun 04 21:11:38 Trudko, yeah like I said, oauth is a pita. I was working with google calendars, but maybe you'll have a better experience. Issue mainly was that there had been numerous API changes and documentation was sparse, misleading (version mismatches) Jun 04 21:12:07 erisco: How did you use the nonstatic nested class as an Activity? Jun 04 21:12:09 of course blogs and stuff had the same problems due to varying approaches, versions, APIs, etc Jun 04 21:12:10 svm_invictvs: Whatever you end up doing, don't do what erisco said Jun 04 21:12:28 SimonVT: Well, what was proposed was already confusing me... Jun 04 21:12:30 erisco: I can't even begin to comprehend how you think that a nonstatic private nested class which extends Activity makes sense Jun 04 21:12:31 SimonVT, there is no alternative if he has the same issue I do Jun 04 21:12:57 What you said made no sense at all Jun 04 21:13:01 evanc, I didn't design this convoluted inheritance scheme, so I'd start there with what's actually wrong Jun 04 21:13:24 Yeah, you can't kickoff an activity instance... Jun 04 21:13:45 I was more looking for a way to nab the intent when the pushed activity returns. Jun 04 21:13:56 erisco: that's like saying a hammer has a poor design because you can smash your thumb Jun 04 21:14:31 SimonVT, it does make sense in a particular edge case where you have to receive a result after the activity that started the intent has ended Jun 04 21:14:56 Nope, still doesn't make sense Jun 04 21:15:09 isnt that what registering a receiver in the manifest is for? Jun 04 21:15:12 Where do I run a .execute() when I have an AsyncTask? Jun 04 21:15:22 well, when you run into that, you'll find out. if it isn't Trudko's problem then nevermind Jun 04 21:15:46 I have a helper class which kicks off an activity. That helper class (not the activity that launched it) needs to know when the activity exits. Jun 04 21:15:52 Snicers-Work: whenever you need the AsyncTask to execute Jun 04 21:16:06 Can I run an execute within the async task? Jun 04 21:16:07 evanc, hm, I see it as saying a hammer has a poor design because the problem actually doesn't call for a hammer Jun 04 21:16:09 when the launched activity exits. Jun 04 21:16:15 erisco: so much wat Jun 04 21:16:21 evanc: +1 Jun 04 21:16:43 svm_invictvs: Pass the result to your helper class Jun 04 21:16:58 Don't go making non-static private inner classes that extends Activity Jun 04 21:17:22 SimonVT: Yeah, I suppose i could do that. Just seems like it's a bit convoluted :) Jun 04 21:17:34 SimonVT: Less so that other suggestions. Jun 04 21:17:50 man #eclipse is bad Jun 04 21:17:52 SimonVT: Is there another way to sense when an activity exits? W/o overriding that code? Jun 04 21:17:57 now i udnerstand why people come here with eclipse questions Jun 04 21:18:47 SimonVT: Some code I'm using is able to do it, but I highly suspect it's being passed through a static member somewhere. Jun 04 21:18:51 canadiancow: never been to #eclipse Jun 04 21:19:01 svm_invictvs: There's ActivityLifecycleCallbacks, but I don't think that solves anything Jun 04 21:19:03 canadiancow: but intellij owns :) Jun 04 21:19:17 Pass the result Jun 04 21:19:24 It's probably the simplest solution Jun 04 21:20:34 svm_invictvs, your situation is somewhat different, but something close might help if you don't know which activity you are kicking off ahead of time Jun 04 21:20:56 svm_invictvs, is it always the same type or does it vary during runtime? Jun 04 21:20:58 birbeck, i'll switch soon Jun 04 21:21:24 canadiancow: i havent tried groovy yet, but intellij + android + maven = win Jun 04 21:21:42 so i cant go changing our build system arbitrarily Jun 04 21:21:44 :P Jun 04 21:21:47 Gradle doesn't play well with IDEs Jun 04 21:21:50 has to be a team effort Jun 04 21:21:55 one sad downside of the new build system Jun 04 21:22:04 canadiancow: yeah, i understand Jun 04 21:22:29 I've gotta get an instance of Application to use that callback as was suggested by SimonT Jun 04 21:22:38 JakeWharton: looking forward to you doing a presentation... 'Overcoming Gradle downfalls' :-) Jun 04 21:22:39 But that seems like it's too much for what I'm doing. Jun 04 21:22:41 Hey canadiancow, why haven't I gotten the gmail update yet? Jun 04 21:23:02 Hey canadiancow, why are the action items so far away from everywhere they should be? Jun 04 21:23:42 svm_invictvs, is it one activity type or varying? if its one, it would be simplest to implement the callback on the Activity to communicate with your helper directly Jun 04 21:24:14 birbeck: I'm too opinionated to talk about build systems. Jun 04 21:24:49 Isn't opinionated what Square is all about? Every talk I watched had "we're very opinionated" in it ;) Jun 04 21:25:01 JakeWharton: well I dont see myself switching anytime soon, maven still works fine with Android Studio Jun 04 21:26:00 Someone just gotta push an ABS aar to maven central, then I'm off to gradle Jun 04 21:26:17 aar? Jun 04 21:26:20 i'll push it with an r7 dependency Jun 04 21:26:25 android archive Jun 04 21:26:30 gradle version of apklib Jun 04 21:26:32 you can use maven repositories in your gradle build Jun 04 21:26:43 But you can't use apklibs Jun 04 21:26:47 Hoyven Maven! Jun 04 21:26:49 hmm Jun 04 21:27:04 i still havent used gradle, so im speaking out of my ass Jun 04 21:27:29 And since google isn't going to push anything useful to maven central.. Jun 04 21:27:50 besides guava and guice Jun 04 21:28:14 hey guys. is this a good place to get development help, or is that elsewhere? Jun 04 21:28:27 Either android-maven-plugin gotta update so they support aars, pick up the local repos in the sdk and pick up android.jar from the sdk as well.. Jun 04 21:28:34 Or I'll switch :p Jun 04 21:28:53 Corporalist: Android related dev help? Jun 04 21:29:09 SimonVT: let's just write a new build system Jun 04 21:29:28 birbeck: yeah. I'm having issues with NFC Jun 04 21:29:33 build files are written in Objective-C Jun 04 21:29:42 Corporalist: this is the place to ask then Jun 04 21:29:52 * birbeck punches JakeWharton Jun 04 21:31:55 awesome. here goes. I'm trying to catch empty nfc tags and start an activity when one is scanned. The problem I'm having is that when an empty tag is scanned it wanted to open maps saying that "the url can't be 'something another'". It leaves my app completely Jun 04 21:31:55 JakeWharton: I'm in Jun 04 21:32:08 * SimonVT googles Objective-C tutorial Jun 04 21:32:17 does anyone know if there are massive performance implications in enabling code coverage for instrumentation tests? Enough so that you would just always include the flag? Jun 04 21:33:00 Corporalist: are you sure that the tag is empty? Jun 04 21:33:03 We use Emma Code Coverage and have 2hrs worth of UI tests. I can run without coverage and compare. Jun 04 21:33:16 because I doubt maps try to fetch empty tags Jun 04 21:33:26 two HOURS?!? Jun 04 21:33:41 What we detected was that since emma is collecting information, we ran into some trouble with loops and memory usage which doesn't occur without. Jun 04 21:33:44 Yes, hours. Jun 04 21:33:55 inb4 use robolectric Jun 04 21:33:55 how does emma measure coverage on ui tests? Jun 04 21:34:05 Corporalist: did you look with an generic nfc tag reader app on the tag and checked it is empty? Jun 04 21:34:16 timroes: you are probably right about that. I'm using TagWriter to erase them and write to them. Do you know any better app on the store for this? Jun 04 21:34:22 e.g. NFC TagInfo Jun 04 21:34:24 Just as it normally would. Jun 04 21:34:42 Corporalist: i have only written to them with my own code yet Jun 04 21:34:51 so no i don't no anything :) Jun 04 21:34:59 how do you keep two hours worth of tests passing? Jun 04 21:35:07 we have 6 instrumentation tests and they break all the time Jun 04 21:35:08 Requirement, nothing is allowed to go untested. Jun 04 21:35:09 http://developer.android.com/guide/topics/connectivity/nfc/nfc.html#tag-dispatch -> How NFC Tags are Dispatched to Applications Jun 04 21:35:11 makre sure you read this Jun 04 21:35:13 several times :) Jun 04 21:35:23 damn Jun 04 21:35:36 timroes: doing so now. Thanks much :) Jun 04 21:35:39 our 1500 unit tests cover logic and run in 90 seconds Jun 04 21:35:39 It works fairly well, though we ran into some flaky tests recently. But 97% are stable. Jun 04 21:35:40 SimonVT, because yuo're blacklisted Jun 04 21:35:45 JakeWharton, you're holding it wrong Jun 04 21:36:11 but I can't read text upside-down Jun 04 21:36:13 Corporalist: just guessing, because i don't know whats on the tag: your writer wrote an ndef tag with a mime type to the tag just empty payload Jun 04 21:36:17 can you add a setting to flip the text? Jun 04 21:36:23 ok Jun 04 21:36:27 i'll put it in 4.6 Jun 04 21:36:28 JakeWharton: I had about two dozen robotium tests and they were always randomly failing Jun 04 21:36:37 so its not empty and perhaps maps listen to that mimetype, so your "lowlevel" intent filter never gets called Jun 04 21:36:54 Jake, heh, we have less tests, but probably bigger ones. And I have to say, sadly the way the core logic is written makes it hard to test without dependency injection. Jun 04 21:37:12 we inject our tests too Jun 04 21:37:16 birbeck: Robotium 4.1 is a lot better in that regard. But it's still a hazzle. Jun 04 21:37:30 timroes: that's gotta be the case. The tag is definitely still Ndef. So if it's still formatted it's not technically empty then? Jun 04 21:37:39 nope Jun 04 21:37:40 ugh Robotium, we used to use that Jun 04 21:37:48 ndef is a format you can write on nfc tags Jun 04 21:37:50 kakazza: yeah, thats what ive heard, but i havent written a new (non concept) app in a while Jun 04 21:38:11 its the recommended format to use with android, and is the only format that really makes sense, since you can create detailed intent filters for it Jun 04 21:38:21 JakeWharton: i've yet to try the new roboelectric or spoon Jun 04 21:38:21 Also, the requirement makes it impossible to not write UI tests. Test if deletion of an list item works. Logic test: mere milliseconds. UI Test: 10-20 seconds. :| Jun 04 21:38:57 you can test that with Robolectric Jun 04 21:38:59 JakeWharton: You only use the uiautomator+Spoon and Robolectric? Jun 04 21:39:07 timroes, but as long as it's formatted ndef then my app isn't seeing it as empty, right? Jun 04 21:39:10 we use instrumetnation+Spoon and Robolectric Jun 04 21:39:29 Does the instrumentation runner provide a nice api to click around? Jun 04 21:39:29 Corporalist: depends on your intent filter and if someone else is listening on a more specified intent filter Jun 04 21:39:45 findViewById(R.id.whateveR).performClick() Jun 04 21:39:51 Ok Jun 04 21:39:52 as long as no other app is listening more specified you will be informed (that's the link above, the way android maps an nfc tag to an app) Jun 04 21:39:55 but we wrote our own API on top of instrumetnation Jun 04 21:39:59 gief Jun 04 21:40:08 similar in concept to Robotium but without the abysmal, awful, hacky, shitty API that it has Jun 04 21:40:31 timroes, understood. you da man :). I'm gonna read through this documentation. Jun 04 21:40:33 Give now! Jun 04 21:41:06 Guess I should really get down to business and rewrite the tests with Robolectric. I just have to find out if we can still have emma coverage that way. Jun 04 21:41:07 Corporalist: have fun :) if you haven't done so read the whole nfc doc. even though it isn't complete and is lacking several (sometimes important) information it is a good start for trial'n'error Jun 04 21:41:39 Corporalist: i am off now, but if your problems still persist tomorrow, i am happy to help as good as I can :) Jun 04 21:43:01 timroes, thanks man :) Jun 04 21:43:03 kakazza: you can. it's just a custom JUnit runner Jun 04 21:43:18 Nice Jun 04 21:43:36 Although IIRC we currently use a custom JUnit runner already. Jun 04 21:43:54 so do we, it's extendable Jun 04 21:44:10 I forgot why. Probably because we needed the JUnit output as XML for emma and later analysis. Gotta talk to the responsible guys. Jun 04 21:44:29 Extendable in what way? Can you just "chain" JUnit runners? Jun 04 21:44:46 Also, will you release the better instrumentation API at any point? Jun 04 21:44:49 no, we just extend Robolectric's test runner override a method or two and call up to super Jun 04 21:44:53 kakazza: maybe :) Jun 04 21:44:57 \o/ Jun 04 21:46:39 Just how much trust do you have in Robolectric tests and how easy are they to debug? With Robotium I can see what went wrong on my device. Jun 04 21:47:15 hi Jun 04 21:47:27 kakazza, I just use them for mocks, really Jun 04 21:47:29 I know the first part of the question is kind of dumb, but still. It feels weird at the beginning to have UI tests without the actual (visible) UI. Jun 04 21:47:40 kakazza: they're just unit tests. Run and debug in the IDE Jun 04 21:49:04 has anyone used Android Studio yet? Jun 04 21:49:11 I can't imagine it's that easy. With Robotium you _see_ if it clicks the wrong button (and which) or does not scroll down a list. Jun 04 21:51:34 there's no need for that though. you just call the click listener for the listview directly and verify what it does Jun 04 21:52:03 or even better, you call the method directly that the click listener calls Jun 04 21:52:25 Which then does not verify the click listener behaviour. Jun 04 21:52:43 Or in a sense, the actual app behaviour. Jun 04 21:53:10 why should I test a one-line click listener that just delegates to another method? Jun 04 21:53:55 It verifies that there _is_ a one-line click listener that just delegates to another method. Jun 04 21:54:12 Verifying that everything is wired up correctly. Jun 04 21:54:20 What is the purpose of android:clickable="true" Jun 04 21:54:43 Why view isn't just clickable when I assign event to it ? Jun 04 21:54:53 so then call the click listener directly them Jun 04 21:55:41 By using findViewById().performClick() you mean? Jun 04 21:55:57 no, by calling listener.onItemSeelcted(whateveR); Jun 04 21:56:16 otherwise you're just wasting time verifying Android can deliver touch events Jun 04 21:56:16 ಠ_ಠ Jun 04 21:56:31 Android might break randomly!!1 Jun 04 21:57:21 I'm verifying that an actual workflow a user would have actually works. Wasting some time on overhead, yes. Jun 04 21:57:36 I'm talking integration tests here. Jun 04 21:57:44 Not logic alone Jun 04 21:58:56 yeah that sounds awful Jun 04 21:59:19 you can do that too, but you shouldn't have to Jun 04 21:59:37 Shouldn't have to? Jun 04 22:00:05 JakeWharton: So this suggest that I could later assign event to that element ? Jun 04 22:00:08 I'm not sure what the alternative is besides using actual humans. Jun 04 22:00:08 JakeWharton: Via code ? Jun 04 22:00:55 Can anyone point me to a tutorial for advice on how to make Calendar style alerts that beep the phone, and require user interaction (like a swipe) to dismiss? Jun 04 22:02:13 we don't do it at all Jun 04 22:02:32 I imagined so after seeing the Spoon example Jun 04 22:02:35 we have 6 instrumetnation apps that walk through flows in the app testing the stupid crap all at once Jun 04 22:02:47 but there's no logic validation Jun 04 22:03:40 Ok, so you don't have separate tests for each dialog and error case but one huge that walks from start to end? Jun 04 22:04:19 Basically, when the walkthrough is done, everything is assumed to have worked without asserting each and everything like Robolectric lets you do with assertCurrentActivity() etc. Jun 04 22:04:31 hi, this is not an android-specific question, but i have this android phone and i have successfully set up a serial communication via bluetooth to it. now I can list contacts via AT-commands, but all SMS commands don't seem to be working. Is the OS blocking these commands or what should I look for to troubleshoot this? I've googled the phone type in combination with at-commands but there's no documentation around. Jun 04 22:05:37 kakazza: yeah basically. this way we get a high-level assurance of things that almost never break vs. unit tests on things that actually change and break all the time Jun 04 22:06:04 obviously it won't work for everyone, but it lets your instrumetnation tests be less comprehensive and hopefully save you time writing them Jun 04 22:06:37 I see. Jun 04 22:07:09 Once you have code coverage, ping me the results if not confidential. I wonder how far you can go with this kind of testing. Jun 04 22:08:45 Does Square use any special kind of development process (e.g. TDD with Kanban or Scrum)? Or its own? Jun 04 22:09:04 nothing formal on Android, no Jun 04 22:09:48 So you just have something like Jira set up with tasks/tickets and milestones? Jun 04 22:10:01 Programming Motherfucker™ Jun 04 22:10:07 and we're not adding code coverage because nobody cares about it. I occasionally will run it on a single method or class but not all the time Jun 04 22:10:59 I see. We care a lot about coverage and also static analysis. Jun 04 22:11:39 exit Jun 04 22:11:46 Android code is 50% boilerplate already Jun 04 22:12:02 mmm boilerplate Jun 04 22:12:15 like I said, running code coverage on specific things is the only place I find them useful Jun 04 22:12:15 Sometimes it does hurt development time, when something is just a bitch to test and you spend a good portion of the time on getting the test to run. But those are maybe 5% of the tests which I'd personally test on a higher level, like you do with your walkthrough approach. Jun 04 22:14:11 Interesting to see just how different testing approaches can be. Jun 04 22:14:30 Especially at Square, which seems to take testing very seriously. Jun 04 22:14:50 we do, hence only testing the bits that matter Jun 04 22:15:18 The argument from above here is "What bits don't matter and why would they be there if they don't?" :D Jun 04 22:15:42 well that's easy, Android requires them Jun 04 22:15:57 Btw, how do you simulate intents sent to your application? Robotium can only instrument your own .apk, so we cannot do things like starting our app from a browser with it. Jun 04 22:16:26 heh, I'll keep that in mind. Jun 04 22:17:13 Robolectric.buildActivity(FooActivity.class).withIntent(intent).create() Jun 04 22:17:35 That's it, I'm sold. Jun 04 22:18:05 boom. code coverage just went up a percentage! Jun 04 22:18:22 lol Jun 04 22:18:37 From 88 to 89% line coverage! Jun 04 22:18:56 I have a class that derives from ServiceReceiver Jun 04 22:19:01 Hello . . . what is the procedure for configuring an AVD that simulates a Samsung Note II? Jun 04 22:19:06 it overrides handleMessage and switches over msg.what Jun 04 22:19:17 in my case STATUS_ERROR: I have just mReceiver.onError(); Jun 04 22:19:28 is there any way to know what error happened? And to tell that to the receiver? Jun 04 22:20:09 The service code treats all errors the same (just sets msg.what to STATUS_ERROR) but I want to be able to distinguish if it was a timeout or something else Jun 04 22:20:17 Anyone here used to using GoogleMaps for android API V2 Jun 04 22:20:24 The supportmaps specifically Jun 04 22:20:32 I can't seem to get it to zoom out worth a damn Jun 04 22:20:46 The minimum zoom level seems like zoomlevel 2 on PC :| Jun 04 22:21:22 Stoob: http://developer.android.com/reference/com/google/android/gms/maps/model/CameraPosition.Builder.html Jun 04 22:21:34 I have used such a thing Jun 04 22:21:39 and it still seems to be rather zoomed Jun 04 22:22:00 I do have android:theme="@android:style/Theme.NoTitleBar" in my activty. Jun 04 22:22:04 Stoob: i recently built an app with maps api v2, didn't have any issues with zooming out Jun 04 22:22:09 heck i'll grab a screenshot Jun 04 22:22:14 Stoob: some code? Jun 04 22:22:17 well i can zoom in and out just fine Jun 04 22:22:25 But It has default the black background color, how to change it ? Jun 04 22:22:28 but it seems like there's a minimum zoom level that's rather zoomed in Jun 04 22:23:04 Stoob: which type of map are you using? map, hybrid, satellite, etc have different min/maxes, maybe thats the issue? Jun 04 22:23:15 standard Map Jun 04 22:23:23 I am using the SupportMapFragment, though Jun 04 22:23:31 which I figure is a huge part Jun 04 22:23:45 i used it as well Jun 04 22:23:56 i can zoom out enough to fit most of north america no problem Jun 04 22:24:33 including all the desolate portions of northern canada and central america Jun 04 22:24:50 http://i.imgur.com/ZdOuhIY.png Jun 04 22:24:53 furthest zoomed out i can get Jun 04 22:25:05 (note the greyed - for zooming) Jun 04 22:25:23 Even trying to manually set it further out through code was unsuccessful Jun 04 22:26:01 thats about the same i see Jun 04 22:26:29 i think that is the min on it Jun 04 22:26:47 Thats pretty lame :( Jun 04 22:26:58 there is a getMinZoomLevel() or something i believe you can call on the GoogleMap object, log that out Jun 04 22:27:16 With MapFragment (not Support), you can zoom out far enough to see the whole world at once, iirc Jun 04 22:27:44 final float getMinZoomLevel() Jun 04 22:27:47 My default ListView selector sometimes has a darker shade to it, not sure why this is happening... http://i.imgur.com/EWdePS8.png the color on the left is the normal color and the color on the right is the one that sometimes appears... Jun 04 22:29:31 speakingcode-wor: hm ok. The thing just annoys me because i've got lines across the globe and doing the animated camera move to a latlng bounds ends up centered on it, but with neither endpoint visible Jun 04 22:30:01 Stoob: ah. yeah, the v2 android map sdk is much more limited than the javascript one, not sure why Jun 04 22:30:21 because they're DICKZ Jun 04 22:30:22 i had to implement a lot of custom stuff to set a limit on max zoom level, transparent tiles, etc Jun 04 22:30:22 :p Jun 04 22:30:36 pretty much Jun 04 22:30:45 I had to do a streetview through a WebView Jun 04 22:30:50 alexfu: code for your selector? Jun 04 22:31:13 may just do a damn webview for the map too Jun 04 22:31:58 Stoob: yeah, could do that. webview isn't as performant n slick though Jun 04 22:32:07 innnnnnnndeed Jun 04 22:32:16 least it works, though :| Jun 04 22:32:21 it grays out around the edges when you pan n such, really annoys me. sucks you have to choose :-\ Jun 04 22:33:16 yeah it is amazing that they have such lame support for maps API in android, considering that google maps JS API is one of the most widely used APIs for mashups in the world Jun 04 22:34:59 yeah, seems like the v1 was better too, they just seem to be locking down, dunno Jun 04 22:35:35 the whole google play services deal and how you can't even test it in emulators (not that those shitty things are good for much) is pretty annoying too Jun 04 22:36:44 yeah you CAN hypothetically if you steal the APKs and put it on the emu yourself Jun 04 22:36:52 but yeah. obnoxious Jun 04 22:37:00 indeed Jun 04 22:37:35 the openness and supportive culture is quickly diminishing Jun 04 22:37:54 does the Galaxy Nexus have USB Host capability using stock kernel and rom ? Jun 04 22:38:19 vvu usb host meaning? Jun 04 22:38:27 hosting usb devices? Jun 04 22:38:33 Because bundling libraries that can't be updated independently is the future Jun 04 22:38:39 speakingcode-wor: probably USB OTG Jun 04 22:38:40 yes. like HID or Mass Storage Jun 04 22:38:44 speakingcode-wor: I'm using the system default selector Jun 04 22:38:57 speakingcode-wor: I'm not even setting one. Jun 04 22:39:08 Can I edit android:theme="@android:style/Theme.NoTitleBar" Jun 04 22:39:10 I mean theme ? Jun 04 22:39:22 alexfu perhaps the occasional difference is a different mode... like focus vs touch? Jun 04 22:39:41 dfferent *state Jun 04 22:40:18 SimonVT: huh? Jun 04 22:40:31 bluesm1: you can extend it Jun 04 22:40:39 speakingcode-wor: I doubt it. sometimes when I click, it's fine, others, it's darker. as if the selector is on top of another one Jun 04 22:40:39 JakeWharton: How ? Jun 04 22:40:40