**** BEGIN LOGGING AT Tue Aug 13 03:00:00 2013 Aug 13 03:05:35 what is the best way to get a bitmap from one activity to another that is to big to fit in a bundle? Aug 13 03:06:25 i'm currenty writing it to the internal storage and getting it out when the new activity starts but there's a small flicker when I add it to the layout and call setContentView Aug 13 03:06:57 actually that flicker is somewhat random..sometimes (liek the first time you transition from one activity to the next after starting the app) it doesn't flicker at all and looks awesome Aug 13 03:07:02 but most times it flickers Aug 13 03:08:07 Dumb idea, but why not create another class BitMapStorage and have a public static BitMap, so when it's created, do BitMapStorage.myBitmap=this.myBitmap Aug 13 03:10:13 hmm Aug 13 03:14:07 hmmmmm Aug 13 03:14:27 that's a lot of hmmming Aug 13 03:14:42 5 m's worth Aug 13 03:15:00 just reading about memory leaks and stuff when storing bitmaps in static variables Aug 13 03:15:07 wondering if my case applies here Aug 13 03:16:58 you could cache it Aug 13 03:18:16 bankai_: using internal storage? Aug 13 03:18:19 or is there a faster way Aug 13 03:18:43 using LruCache Aug 13 03:19:05 so it just resides in memory? Aug 13 03:19:12 http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html Aug 13 03:19:29 shit yeah Aug 13 03:19:33 problem is going to be a 'miss', i don't know how your bitmaps are stored, but you'll need to account for a missed hit on the cache Aug 13 03:20:07 its really going to be 1 bitmap Aug 13 03:20:24 and it will only need to live in the cache for the duration of the transition from the previous to the current activity Aug 13 03:20:24 may not be beneficial, but give it a go Aug 13 03:20:40 thanks Aug 13 03:24:28 tnzr: are you using 4.3 out of interest? Aug 13 03:25:09 minSdkVersion is 14 and target is 17 Aug 13 03:25:17 how come? Aug 13 03:26:34 there were some tweaks to 4.3 gc that did some 'flicking', sometimes it looks a bit odd with bitmaps. unrelated it seems, so carry on ;) Aug 13 03:26:47 ahh I see Aug 13 03:27:04 i wish I understood the graphics subsystem better and other things along those lines Aug 13 03:27:49 i don't really even understand how overridePendingTransition works, and how a built-in transition from one activity to another actually happens Aug 13 03:28:03 that's why im kinda doing this thing where I'm passing a bitmap of the previous activity along to the next and doing an animation from there Aug 13 03:28:50 probably not that crazy of an idea if you are doing something like in the google io video with romain and chet where they transition to a transparent activity and do animations from there Aug 13 03:29:43 * pfn ponders Aug 13 03:29:54 hmm I wonder if I could reduce the flicker by starting my 2nd activity as transparent and just taking a bitmap at that point Aug 13 03:30:07 * tnzr hmm's some more Aug 13 03:32:44 man, having proguard-cache in my sbt plugin makes scala builds so stupid fast Aug 13 03:33:53 ActivityManager.getRunningTasks is throwing Security Exception even though i have the right in the app manifest Aug 13 03:37:16 kirankenz: could we get a stacktrace? Aug 13 03:38:55 ollienx: sure, one sec Aug 13 03:40:42 * g00s tries AS Aug 13 03:40:49 don't do it, man!! Aug 13 03:40:57 hehe Aug 13 03:41:17 if this doesn't work, i'm going to try eclim-emacs Aug 13 03:41:22 i hate this crap Aug 13 03:41:28 wow you really are insane, aren't you ? Aug 13 03:41:30 ollienx: http://pastebin.com/GWSZQa9D Aug 13 03:41:35 bankai_ bwahahahaha Aug 13 03:41:59 kirankenz: what exactly does your manifest say ? Aug 13 03:42:27 so, has the ADT gotten any gradle-ability at all? i haven't used it in about 3mos Aug 13 03:42:35 I'm assuming is in your manifest? Aug 13 03:42:50 Also, is it within your tag? Aug 13 03:42:57 Rather than the tag? Aug 13 03:44:51 Aug 13 03:45:12 kirankenz: using eclipse ? Aug 13 03:45:16 yes Aug 13 03:45:26 might wanna do a clean and rebuild then Aug 13 03:45:47 bankai_: yes, i was thinking i should do that too, hold on let me try Aug 13 03:49:07 forgot the android:name whoops Aug 13 03:57:38 i haven't heard anything about Kotlin lately. Aug 13 03:58:48 * pfn <3 stupid-fast builds Aug 13 03:59:22 http://pastie.org/8231559 Aug 13 03:59:23 :) Aug 13 04:00:19 cool pfn Aug 13 04:05:44 bankai_: yup, it worked. Clean build works Aug 13 04:22:22 stupid eclipse Aug 13 04:27:38 bankai_ are you using eclipse with gradle ? Aug 13 04:27:53 this feels like a conversation i had yesterday - IJ and no gradle Aug 13 04:48:24 Hi, anyone here have any idea on how to use a stl library (stlport) with the r9 ndk in standalone mode? I've searched and can't find any information and following the instructions does not work. Following the instructions and adding --stl=stlport I just gives: arm-linux-androideabi-g++: error: unrecognized command line option '--stl=stlport'.. I've been stuck on this for days, so any hints would be awesome :) Aug 13 04:51:21 is it compulsor to use preference-headers for preferences in sdk v11+ ? Aug 13 04:51:28 *compulsory Aug 13 05:05:27 ot, but http://mdswanson.com/blog/2013/08/11/write-things-tell-people.html Aug 13 05:20:48 Google Cast, y u no support flash! Aug 13 05:21:13 because that would be a security headache :P Aug 13 05:21:58 D; Aug 13 05:22:08 ironically, the only reason why i use Chrome browser is because it comes bundled with a semi up-to-date flash, for those shitty sites that need it on occasion Aug 13 05:22:26 Basically one of the best applications of this device(Streamed user content, e.g. Twitch TV, Justin TV, Azubu TV, etc.) is not possible due to lack of swf Aug 13 05:22:26 D: Aug 13 06:14:35 I need Location objects in my unit tests, how can I create one? Aug 13 06:35:36 heh, i'm so used to working with a subset of java runtime, i keep forgetting my gradle plugin can access far more :| Aug 13 06:36:07 * g00s isn't used to java outside of android these days Aug 13 06:51:36 g00s: And I haven't touched android programming for a long time now (despite finally having a proper dev device!) Aug 13 06:51:45 ... instead, I do desktop/server java Aug 13 06:52:01 and have to code for JRE6 anyway -_- Aug 13 06:52:07 p_l using java proper, or lojure :P Aug 13 06:52:15 *clojure Aug 13 06:53:01 g00s: Java 6. Aug 13 06:53:30 technically, what I am actually doing is scripting IE with Java 6 over HTTP :> Aug 13 07:02:16 argh, driving me crazy... I need two Location objects for my unit test..... how the **** do I create Location objects? Aug 13 07:02:53 It there a mock location class? Aug 13 07:02:58 It there a mock location class? Aug 13 07:03:23 nope Aug 13 07:03:27 http://developer.android.com/reference/android/location/Location.html#Location(java.lang.String) Aug 13 07:03:56 thats the constructor I have available to me... and the arg is "provider the name of the provider that generated this location" Aug 13 07:05:29 have you tried just putting whatever you want there? Aug 13 07:05:37 ahhughes_ just use "GPS" or something Aug 13 07:05:49 accordingn to stackoverflow "the provider string is entirely up to you" Aug 13 07:05:53 I dont have a gps, this is a unit test. Aug 13 07:06:02 so put "foobar" Aug 13 07:06:14 you can put it to null Aug 13 07:06:29 wow, that was hard ! Aug 13 07:06:49 i thought this was one of those classes with a private ctor or something Aug 13 07:06:57 no and no, but thanks for the suggestions. Aug 13 07:07:47 cant use null, laguage issue, and can't use "foobar", get an init<> error in the cstor Aug 13 07:08:06 if you set it to null, either explicitly or via .reset(), though .isComplete() will return false Aug 13 07:08:22 set it to "?" Aug 13 07:08:29 man, just look at the source code Aug 13 07:08:43 makeComplete sets mProvider to '?' Aug 13 07:09:10 can't you provide your own provider? Aug 13 07:09:49 java.lang.RuntimeException: Stub! at android.location.Location.(Location.java:5) Aug 13 07:09:59 thats the exception from the sdk. Aug 13 07:10:21 Location loc = new Location("GPS_PROVIDER"); Aug 13 07:11:06 or Location loc = new Location("foobar"); has same result. Aug 13 07:11:50 i dont see how that is possible Aug 13 07:11:54 ahhh I think I know what it is... Aug 13 07:12:09 junit is only running agast the sdk, and not the impl. Aug 13 07:12:48 deeper problem than I expected but oh well... better go fix it, thanks guys Aug 13 07:39:30 how to avoid need in showing preference header and dive straight into preferences ? Aug 13 07:55:19 Hi all, is it possible to go to a certain item inside a listview ? example : go to position X (= my custom object with id "abc") Aug 13 07:59:10 I think you can do smoothScrollToPosition(int position) Aug 13 07:59:34 If by go to, you mean scroll to Aug 13 08:00:03 http://developer.android.com/reference/android/widget/ListView.html#smoothScrollToPosition(int) Aug 13 08:09:03 hello. Aug 13 08:10:02 i'm a little confused implementing some dialogfragment from another fragment and its backcommunication. Aug 13 08:12:05 any clue, why every intent i do create inside my dialogfragments onCreateDialog() is null when i trying to putExtras on in the AlertDialog.Builder ? Aug 13 08:35:00 what's the best way to highlight the selected item inside a listview (keep highlight active until another item is selected) Aug 13 09:20:09 Hi to all. I'll explain quickly. I'm developing by command line, with ant. I want to use new v7 actionbar support library. Until now, the procedure to add a library was just to copy the jar into your project's libs, but with the new libraries, which have resources, there is a more elaborated procedure, although there're only instructions for eclipse or Android Studio. How could I achieve it from the Aug 13 09:20:10 command line? Aug 13 09:22:31 holy crap Aug 13 09:22:33 I've been searching about add classpath to the project, but I'm not sure how. I've tried wth android update project --library but when building it says error, ../v7/appcompat/ doesn't have project.properties for myproject Aug 13 09:22:45 * Gaz` gets on his knees and worships Geny Motion for 6 months Aug 13 09:23:06 this has quite literally changed my life Aug 13 09:24:15 hello.. does anyone know how to setup email notifications from the google developer console? Aug 13 09:33:28 Hello *, what is the best way to communicate data between client (android) and server? Currently im Using POST-Requests? Data can be TEXT only and/or files in some cases. Is it possible / or a good idea to use JSON with binary files? For example transfering them to BASE64 and send by text. It must include UTF8 and Unicode (Chinese, ...) Aug 13 09:34:02 misterli: I personally prefer just post requests myself. Aug 13 09:34:34 currently i use simple POST Requests yeah but im not happy with that solution Aug 13 09:34:36 misterli, that's silly Aug 13 09:34:40 supporting encodings is possible if you add 'Content-Type: text/plain; charset=UTF-8' type header, which allows the remote end to correctly interpret the binary data it receives as text. (All text is fundamentally binary during transmit) Aug 13 09:34:42 just use JSON and that's it. Aug 13 09:35:02 use UTF-8 for other country charset support and don't make life hard on yourself Aug 13 09:36:40 yeah. UTF-8 is great. Currently i use it but in some cases it's "???" as a char instead of real chars. Like in chinese Aug 13 09:36:46 the server needs to be smart enough to look at the charset declaration at content type when giving body data as text Aug 13 09:38:34 and since URL namespace isn't in any danger of running out of endpoint names, there's no reason why you couldn't have separate endpoints which for instance receive binary files, so you don't have to base64-code them and then stuff them into json after that. That sort of thing is waste of memory and bandwidth. Aug 13 09:39:27 yeah, thats true Aug 13 09:39:38 so you mean i should check the charset while receiving the post? Aug 13 09:40:54 well you should use some competently engineered server library. The conversion from the byte stream to String is not implicit, this conversion needs to check the charset if it's there and use that to decode the post body Aug 13 09:41:18 apache httpclient has a utility method to do this Aug 13 09:41:40 because the problem is there also when client receives server response Aug 13 09:42:03 hmpf. Is there not a better solutions? In my case im reading the SMS and forwarding it to a server (management-system) Aug 13 09:42:13 and when you have your correctly interpreted unicode data, the ways you store and retrieve the data better be encoding capable too Aug 13 09:42:33 well, it is stored in a SQL-Database which has the UTF8-general charset Aug 13 09:42:54 and hoepfully client library smart enough to understand this sort of thing. It's usually not a problem though. Aug 13 09:43:19 this shounds very complex Aug 13 09:44:06 * alankila shrugs Aug 13 09:45:20 it's just a fundamental thing whenever strings are converted to byte streams and back. They need an encoding so that the characters in strings can be represented, and this encoding is generally UTF-8 because it can represent any character there is while being friendly to most western text. Aug 13 09:45:41 programs at the boundary need to know that when sending you encode to particular encoding, when reading you decode from particular encoding. Aug 13 09:46:36 http has a place where to place the name of the encoding used, so it's clearer as system than most Aug 13 09:47:42 okay. So it seems to be the easiest solution to convert the stuff int he client to utf-8 before sending to server. The Server itself handles everything as UTF-8. I dont need to send data back to the client. Database stores at UTF-8. All charsets should fit into utf8, right? Aug 13 09:48:12 or convert it straight ont he server to utf8 with iconv or similar Aug 13 09:48:16 misterli: all charsets can be transformed into Unicode and transported over UTF-8 Aug 13 09:48:25 the transformation step, however, is funky :> Aug 13 09:48:58 and these days all strings are expressed in unicode... Aug 13 09:49:16 but unicode is the abstract, utf-8 is merely a way to represent unicode text as byte stream. Aug 13 09:49:21 Hello, does anyone know if it is possible to receive an onSaveInstanceState() callback _without_ the activity then being destroyed? Or is the activity guarenteed to be destroyed without being restarted or resumed? Aug 13 09:49:31 okay, i c Aug 13 09:55:25 misterli: you need to develop debugging skills for this though. You want to see the exact bytes sent by the client to make sure the data representation is correct when it leaves & then see the bytes as received by server & then as understood as server & then as stored in database Aug 13 09:55:41 you have to validate that the data is OK step by step like that Aug 13 10:05:37 using iconv ( mb_detect_encoding ( $utf8string, mb_detect_order (), true ), "UTF-8", $utf8string ); on serverside fixed my issue Aug 13 10:08:57 hi all, how to avoid need in showing preference header and dive straight into preferences ? Aug 13 10:12:22 php detected. but don't use awful crap like mb_detect_encoding Aug 13 10:12:39 either KNOW what the encoding is, or read it from the request. Don't use heuristics. Aug 13 10:13:04 unless you absolutely have to. And in this case, you don't have to. Aug 13 10:13:27 okay Aug 13 10:16:08 also not sure if php isn't supposed to deal with encoding itself already. Apparently not. Are all php strings actually binary for the programming language, or does it understand something like 'unicode string'? Aug 13 10:19:15 alankila, PHP doesn't know encoding, the user have to pass it to dedicated functions for that (mb_** for unicode). By default it uses ISO-8891-1 or something like that, but it handles it like a binary string in strlen() and other string functions Aug 13 10:20:43 yeah, that's sort of what I remembered. It's 2013 and they don't know how to do strings properly -- good job Aug 13 10:21:32 And hi everyone, is there any performance issue related to usage of RelativeLayout in a ScrollView instead of a ListView for small lists? (Max 3 pages) Aug 13 10:22:51 how to avoid showing of preference headers on the phone and get straigh preferences themselves ? Aug 13 10:24:17 hey guys, have anybody wrote GPUImageMovieWriter for android? Aug 13 10:31:12 yeah but is it more effective to use java server applets instead of PHP? i dont think so Aug 13 10:34:52 can i have one handleMessage method in my activity and use handlerObj.sendEmptyMessage(0) several times in several location of my activity to invoke a different UI task each time? Aug 13 10:41:53 * omid8bimo looks like a server somewhere went south! Aug 13 10:46:09 Can anyone help me set up Android Studio to upload my changes to github? Aug 13 10:48:42 you need a gitignore? Aug 13 10:49:07 Android Studio has "Import Into Github" Aug 13 10:49:18 But I dont know how to use it or it doesnt work Aug 13 10:52:05 just login with your github account and publish i would say Aug 13 10:52:25 of course you should have a git repo for your project first Aug 13 10:52:45 else it sets up an empty repo on github Aug 13 10:52:58 http://stackoverflow.com/questions/16640566/which-files-shouldnt-be-checked-in-into-version-control-in-android-studio Aug 13 10:53:07 here is a link to a gitignore for android studio Aug 13 10:53:16 Ah! Aug 13 10:53:20 That was the problem Aug 13 10:53:26 It creates an empty repo on github Aug 13 10:53:54 How do I make a git repo for my project so I can then push it to github? Aug 13 10:55:17 where is sms that you try to send but failed located? Aug 13 10:55:49 zyngawow: a new repo: Menu>VCS>Import into Version Control>Create Git Repo Aug 13 10:56:08 and don't forget to create a gitignore manually Aug 13 10:56:23 skullcrasher, can the repo be in the same folder as the project? Aug 13 10:56:55 it even must Aug 13 10:58:17 http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository Aug 13 10:59:05 ok so Aug 13 10:59:12 here is my first hurdle with scala and android Aug 13 10:59:13 WakefulBroadcastReceiver Aug 13 10:59:25 i have import android.content.{ Context, Intent, ComponentName } Aug 13 10:59:40 but startWakefulService is not accessible Aug 13 10:59:42 :/ Aug 13 10:59:53 Alright, gitignore than. Now just Import into Github? Aug 13 10:59:54 any scala devs have some ideas? Aug 13 11:00:20 There is no git-tool like the cli. Aug 13 11:02:51 oh nvm :/ Aug 13 11:03:11 scala doesn't know about static methods in itself cause .. there aren't any Aug 13 11:03:14 zyngawow: i guess, yes Aug 13 11:03:15 but the java does Aug 13 11:03:18 WakefulBroadcastReceiver.startWakefulService fixed it Aug 13 11:03:40 could also be, that it always generates an empty project in github, und you have to fill it "manually" then Aug 13 11:05:43 zyngawow: in general i always do it like that http://stackoverflow.com/questions/17035085/add-an-android-studio-intellij-project-to-a-code-google-com-project-with-git Aug 13 11:06:05 of course not code.google but bitbucket/github whaterver ;) Aug 13 11:07:55 can anyone tell me where the theme combo box is in the new adt/eclipse? Aug 13 11:09:22 it wont let me preview some xml weirdly and says i need to change theme in the combo box Aug 13 11:10:48 the builds are slow as hell too Aug 13 11:10:51 :( Aug 13 11:11:02 literally a 2 minute affair Aug 13 11:27:54 Hello, is anybody aware of any libs that provide an implementation of ModernAsyncTask, similar to the one in the android support lib thta isn't public? Aug 13 11:32:35 hi Aug 13 11:33:47 I have a problem to read json data. there is no array in the json and I can not access the data. Aug 13 11:33:47 the code: http://pastebin.com/uzTaEhUx Aug 13 11:34:14 who's else feels gradle builds are taking longer than ant? Aug 13 11:34:46 how can I access group_order_id Aug 13 11:39:04 dot8, What does you data look like? Aug 13 11:39:45 skants: https://openligadb-json.heroku.com/api/current_group?&league_shortcut=bl2 Aug 13 11:42:28 paste bin, line: 6 should be String groupOrderId = json.getJSONObject("group_order_id"); Aug 13 11:42:46 sorry line 5 I mean Aug 13 11:43:00 how to set default value for listpreference inside xml ? Aug 13 11:43:51 nam3l3zz, android:defaultValue="foo" Aug 13 11:45:40 skants: merci boku Aug 13 11:45:56 *merci beaucoup :) Aug 13 11:46:13 skants: cannot convert from JSONObject to String Aug 13 11:48:51 agh sorry ?. String groupOrderId = json.getString("group_order_id"); Aug 13 11:49:37 nam3l3zz, welcome :) Aug 13 11:54:09 dot8 - do json.getString("group_order_id"); Aug 13 11:54:21 youre making another object u dont need to Aug 13 12:07:50 skants: ok, I try it. thanx Aug 13 12:12:17 skants: yippi it works Aug 13 12:25:38 I hate html so much Aug 13 12:25:50 nothing makes sense in html Aug 13 12:26:23 if something in html appears to be making sense it turns out it's actually javascript Aug 13 12:28:28 which means it made sense when you thought it was HTML, but won't make sense once you start thinking in JS Aug 13 12:30:03 I'm trying to do something in ruby on rails Aug 13 12:30:44 the rails is confusing, the javascript is a head-scratcher but the html doesn't make any goddamned sense Aug 13 12:30:55 can I design webpages in xml instead? Aug 13 12:31:25 that's why it's the web. Once it meant something different, now it means broken protocols, with broken runtimes, slinging broken content Aug 13 12:33:48 question, between 5am and 7am the password on my s4 was changed.. Aug 13 12:34:17 is there anyway I can pull a system log to see when and who did it? Aug 13 12:34:48 ? Aug 13 12:35:05 jr3: your Galaxy S4? Aug 13 12:35:08 yes Aug 13 12:35:24 the password was changed locally? Aug 13 12:35:28 my company has root access through ms exchange.. Aug 13 12:35:43 so if it was them im about to give them an ear ful,l Aug 13 12:35:43 hmm Aug 13 12:36:02 jr3: I suspect the log buffer will be already overran Aug 13 12:37:27 p_l I would still like to look Aug 13 12:37:38 there is a way to get your device to email you a massive logfile Aug 13 12:37:59 jr3: dump logcat to file Aug 13 12:38:11 anyway to hop in the debugger Aug 13 12:38:16 p_l okay. Aug 13 12:39:22 there's a root app someone can build Aug 13 12:39:32 a security logger for android Aug 13 12:40:04 actually it might not even need root, admin access might do it Aug 13 12:59:27 hey Aug 13 12:59:29 another attemp - any clue why i cannot create an intent (always null) inside my onclick-method of my ondialogcreate() in a dialogfragment? Aug 13 12:59:47 dialogfragmet is instanciated from another fragment Aug 13 13:02:37 still cant scroll the view in the gui editor in eclipse ;/ Aug 13 13:03:54 which i find mind boggling Aug 13 13:04:13 hi guys, im trying to write a home screen widget. its basically an image view that updates its drawable every x seconds. I'm guessing using onUpdate is the wrong way because google says should only update every hour. how should i do it? Aug 13 13:18:26 Does guava have anything for making something like categories and products? And so that I can then easily show them on a List? Aug 13 13:18:38 An Android List, not Java List. Aug 13 13:44:17 how easy would it be to right a hook into the logger to also save log data in a different location Aug 13 13:44:32 write* Aug 13 13:52:37 which view exactly does adjustPan scroll ? Aug 13 13:55:26 hello, for make beacon should I use -j2 or -j4 ? Intel Core 2 Duo P8400 / 2.26 GHz ( Dual-Core ) Aug 13 14:04:50 So my bitchin regarding GCM yesterday wasn't entirely out of place. I've now successfully managed to route messages back and forth from my own application server, to both devices and browsers. Let me just say that "GCM for Chrome" is nothing like "GCM for Android". Those are completely different networks, with totally different APIs and authentication mechanisms. Aug 13 14:08:16 I'm building a simple widget app, I have a broadcast receiver as a static inner class of the widgetProvider, will this cause any issues? should I make the broadcast reciever as a seperate class? Aug 13 14:13:44 If the broadcast receiver is a static inner class, does that mean you can still reference it from the AndroidManifest? Aug 13 14:18:17 Heya guys - did anyone here work with the instagram api before? Aug 13 14:18:36 Tee_Pee, You a pollster? Aug 13 14:18:42 Hi all, does somebody know a good Android 4.0 (or +) UI kit (psd file or something)? Aug 13 14:18:45 a what? Aug 13 14:18:52 A pollster, one who gives polls Aug 13 14:19:33 no Aug 13 14:20:06 the instagram api doesn't like my httpclient, I was hoping someone had this issue before and would help me pinpoint the problem Aug 13 14:20:32 if you're too lazy to even type out your question, why should anyone work to help you with it Aug 13 14:23:11 Well, if no one here worked with the instagram api before chances are no one will be able to help me out as this issue is related to said api. Aug 13 14:23:46 Tee_Pee, what's your issue? Aug 13 14:24:09 Albeit, it's irrelevant, I just fixed it. Aug 13 14:24:12 The limit of my Instagram API experience is in logging in, but if that's your issue I can probably help Aug 13 14:24:13 Ah Aug 13 14:24:15 FrancescoV: there's about 30 https://www.google.com/search?q=android+ui+kit+psd Aug 13 14:24:21 Nah, I am using public methods Aug 13 14:24:30 The thing is, when I call it through my browser, I get a json as I should Aug 13 14:24:35 but via httpclient I get a 404 page Aug 13 14:24:43 sounds like a pebkac Aug 13 14:24:45 You're doing it wrong. Aug 13 14:25:00 I replaced the apache httpclient with an inputstream method and it worked. Aug 13 14:25:36 no other api I work with gives me this crap :| Aug 13 14:27:15 You're relying on defaults which happen to be "right" in the one library, and "wrong" in the other. Aug 13 14:27:54 Am aware. Aug 13 14:28:19 So I know Gradle is slow, but should it really take 2-3 minutes to build my project, that takes about 20-30 seconds with ant? Could I possibly have some excess dependencies or something slowing it down? Aug 13 14:29:45 yiati: No it shouldn't I believe. You're sure you are building the same amount of projects from a clean state? Aug 13 14:30:23 And you're not mixing debug and release releases (proguard is slow)? Aug 13 14:30:36 kjeldahl: There's the one root project, and 7 library projects Aug 13 14:31:25 kjeldahl: And I have all 8 projects listed in settings.gradle Aug 13 14:37:24 yiati: And that's the same amount of projects that Ant builds? Aug 13 14:39:03 I mean it's the same project, would there be any reason it would be building a different amount? Aug 13 14:39:41 Only if the "clean" task on ant does not do a proper clean.. ;-) Aug 13 14:40:19 Or potential different target types (debug/release, but probably only big difference if proguard is involved). Aug 13 14:40:44 Hmm well ./gradlew build takes 1.5 minutes Aug 13 14:40:58 ./gradlew clean build takes 3 minutes Aug 13 14:42:05 Not sure exactly what the build target does. For android, it's usually "assembleDebug" or "assembleRelease". Aug 13 14:45:28 Hey all Aug 13 14:45:32 I've got a weird issue Aug 13 14:45:54 sometimes every or most textviews in this app will display random chinese or korean characters Aug 13 14:46:27 it's very rare Aug 13 14:47:17 Hey guys, I have an application listening on a UDP socket in the SDK's android emulator. I see with `ifconfig` it's IP is 10.0.2.15. How can I send stuff to this? Aug 13 14:47:32 (it's behind a nat or something) Aug 13 14:47:43 open the port on your router? Aug 13 14:48:01 matt_j, it's on my local machine, in the emulator Aug 13 14:49:16 ac_slater: telnet? Aug 13 14:49:32 In most tutorials (android-dev site included) uses a callback to the activity to make communication possible between fragment? Is it good/bad to directly search the Fragment (FragmentB) in the current fragment (FragmentA) with the fragmentmanager? Aug 13 14:49:34 oh I thougt you wanted to access outside your nat Aug 13 14:49:40 It should work, see http://developer.android.com/tools/devices/emulator.html Aug 13 14:49:52 It appears I have to use `adb forward` Aug 13 14:49:55 instead of making a callback to the activity and then search the fragment (also with the fragment manager) Aug 13 14:50:09 ac_slater: ah, cool Aug 13 14:50:10 I can access my network FROM the emulator, but not the emulator FROM my network Aug 13 14:50:31 I got a sample project with webview, it worked but i need that all my url opens in webview not in the default browser... i found the code to do that but dont know where to put it... PLEASE HELP!!!! Aug 13 14:52:04 I know that these kind of questions are boring but im stuck and i need help! Aug 13 14:52:30 android_fool, learn to write software first before making an application ;) Aug 13 14:53:15 i dont need that, i have built the application in php mysql Aug 13 14:53:32 i just need to open the php app inside the android app Aug 13 14:54:42 any help from here....? Aug 13 14:55:23 hi all! Aug 13 14:55:36 i am looking for some weakset to stere listeners Aug 13 14:55:45 without keeping objects in memory Aug 13 14:55:52 android_fool: You don't have a question Aug 13 14:55:56 i have found some implementation around Aug 13 14:56:03 android_fool: So we can't answer anything Aug 13 14:56:14 but their methods take object and return object Aug 13 14:56:17 G10h4ck: well, the various Weak reference classes should suffice for your need. Just make it a Map> or something Aug 13 14:56:47 yiati i need to open all the links inside the webview not calling default browser Aug 13 14:56:49 alankila while should use a map ? Aug 13 14:57:01 while? I don't quite undertand you. Aug 13 14:57:07 sotty Aug 13 14:57:10 *sorry Aug 13 14:57:14 *why Aug 13 14:58:00 alankila: i was trying to do something like public class WeakHashSet extends HashSet> Aug 13 14:58:07 G10h4ck: ... oh, well, no reason. Just use any WeakReference or SoftReference type thing. Aug 13 14:58:13 but when i try to ovveride the add method i get some problem Aug 13 14:58:40 "some problem"? Aug 13 14:59:03 it compline saing that is has same erasure but not override Aug 13 14:59:11 even if i put @Override Aug 13 14:59:16 android_fool: There are very thorough tutorials online about WebView's such as http://www.mkyong.com/android/android-webview-example/ which is a good one. If this is too confusing then you need to start from square 1 with Android. You can't just skip learning the basics. Aug 13 14:59:44 what is supposed to happen in View.onSizeChanged() ? Aug 13 15:00:31 yiati i tried that as i have spent hours on that, i found the solution but when i add the code in eclipse is shows me error, i dont know where the hell should i put that code Aug 13 15:00:41 i got an working example Aug 13 15:01:03 yiati i dont need to learn androidsh Aug 13 15:01:07 i just need this Aug 13 15:01:10 G10h4ck: "public boolean add(WeakReference e) { ... }" ? Aug 13 15:01:42 alankila the fact is that i want to hide the referencing to the user Aug 13 15:01:42 are you possibly trying public boolean add(Object e) { ... } ? Aug 13 15:01:55 sdaq: Uh.. Stuff you want to happen when the size changes? Aug 13 15:02:09 android_fool: If you don't need to learn android to answer the question then this is not the channel to discover the answer to your question Aug 13 15:02:13 i am trying to do public boolean add(E e) Aug 13 15:02:16 Hi all, is it possible to archive an installed sdk installation? Aug 13 15:02:38 G10h4ck: I see. Yes, this is a limitation of java. The type erasure prevents the compiler from distinguishing E and WeakReference at runtime Aug 13 15:02:44 yiati cmon man Aug 13 15:02:45 I'm trying to setup automated testing, and installing all the sdks takes forever Aug 13 15:02:46 SimonVT: thanks ;) Aug 13 15:02:58 so it can't do the overloading. Do a method by different name, or implement the interface differently. Aug 13 15:03:12 ok Aug 13 15:03:14 thanks alankila Aug 13 15:03:15 G10h4ck: for instance you can always declare 'implements Set' and then internally manage it as weakrefs Aug 13 15:03:38 using some HashSet> as the backend Aug 13 15:04:17 so put one inside instead of interithing it Aug 13 15:04:59 Hello Aug 13 15:05:17 I'm trying to make an application which takes a screenshot of the current screen and saves it Aug 13 15:05:31 it works, but it's not capturing the top bar which shows the battery, time, etc. Aug 13 15:05:49 I am using getDrawingCache to get the bitmap Aug 13 15:05:51 actually thinking about it the method resolution could be done at compile time for the add(E e) vs. add(WeakReference e) case... but the fact of the matter is, the compiler would have to generate two methods of same signature Aug 13 15:05:52 I'm guessing you're using v1.setDrawingCacheEnabled(true);? Aug 13 15:06:10 in both cases the signature would end up being add(Object o), so I guess that's the reason Aug 13 15:06:19 I'm using this Aug 13 15:06:19 try grabbing the viewroot element Aug 13 15:06:20 http://www.androidjavadoc.com/1.0_r1_src/android/view/ViewRoot.html Aug 13 15:06:23 View content = findViewById(android.R.id.content).getRootView(); Aug 13 15:06:23 content.setDrawingCacheEnabled(true); Aug 13 15:06:23 Bitmap bitmap = content.getDrawingCache(); Aug 13 15:06:29 ooh Aug 13 15:06:30 woops Aug 13 15:06:31 I personally think that it would be dirty solution even if it worked. Aug 13 15:06:32 i don't know then Aug 13 15:06:36 its getting everything except the top bar Aug 13 15:06:42 The status bar isn't part of your app Aug 13 15:06:53 yeah, that would cause privacy concerns Aug 13 15:06:55 You're just taking a screenshot of your app Aug 13 15:06:58 if you could see text from other people's notifications Aug 13 15:07:09 If there are any fellow norwegians on, multicom.no today announced the availability of the new Nexus 7. :-) Aug 13 15:07:09 any way to include the status bar in the bitmap? Aug 13 15:07:11 There's probably a way to do it with root Aug 13 15:07:14 Without, not so much Aug 13 15:07:23 yeah I know you can do it with root Aug 13 15:07:39 kjeldahl, already got one, and not a Norwegian :-) Aug 13 15:07:43 you might be able to find the intent associated with the system screenshot tool Aug 13 15:07:55 understood alankila Aug 13 15:07:58 hmm I'll try some things, thank you Aug 13 15:07:59 the powerbutton+volumn screenshot feature Aug 13 15:08:25 pfn: Yeah, I remember you wrote about. Now I can join the party, already ordered mine. Aug 13 15:08:45 it's awesome, can't fault it Aug 13 15:09:14 although some people have problems with gps on it, supposedly Aug 13 15:09:37 is the notification led rgb? I haven't bothered figuring that out yet Aug 13 15:09:48 Yeah, I've read the reports. Hopefully not a hardware issue, but who knows. Aug 13 15:09:48 only seen white so far Aug 13 15:13:29 even if it is, wifi location works great Aug 13 15:16:21 Hi, how do you guys implement "tags" visually in layout? (think hashtags). Is there a GroupView that would float to next line if there was more than X elements for example? Aug 13 15:25:47 pfn have you tried using one of those apps that shows gps satellite status ? Aug 13 15:26:41 seems like it would be pretty easy to determine; if its a hw issue one thing that would be obvious is reception from the satellities would be poor Aug 13 15:26:51 they had that problem in previous hardware Aug 13 15:37:48 Hi. I'm working with the ActionBar in navigation mode tabs. I also implemented onCreateOptionsMenu(). Now I'm wondering how to get the options menu icon into the same line as my ActionBar. Currently it is beneath the ActionBar. Aug 13 15:38:49 does anyone know if there's hardware accelerated vp8 decode/encode on omap4-based android devices? Aug 13 15:49:02 Eh, I dont really want to use eclipse, what are my options? Aug 13 15:49:12 and is there a way to create command line apps for android :D Aug 13 15:49:48 you don't have to use any IDE, or you can use intellij or Android Studio Aug 13 15:50:04 and since Android doesn't *have* a command line... that question doesn't make much sense Aug 13 15:50:07 well Aug 13 15:50:25 you could technically make an application that's available on the built-in shell. Aug 13 15:53:27 g00s, nope, I really don't care about gps Aug 13 15:55:06 and yes, you can run basic commands either piped through an app or a local she'll, like with connectbot Aug 13 15:55:35 local she'll Aug 13 15:55:37 you can write it in your language of choice as well, as long as you can make it run on android Aug 13 15:55:46 autocorrect ftl Aug 13 15:55:55 i lol'd Aug 13 15:56:30 on my n7 atm Aug 13 15:57:35 in any sense of non-strange-person-ness, CLI and Android are just things that don't go together Aug 13 15:58:17 for arbitrary tools, it's fine Aug 13 15:59:55 RyanM bubbleguuum http://www.androidpolice.com/2013/08/13/play-store-team-acknowledges-pervasive-package-file-invalid-error-when-installing-or-updating-apps-no-fix-yet/ Aug 13 16:01:09 g00s: seen it but the problem doesn't seem to be with apk signing but corrupted downloads from some servers: http://cafbit.com/entry/android_package_file_is_invalid Aug 13 16:01:39 which is more or less confirmed by people saying using a VPN "fixes" it Aug 13 16:01:44 hm, but i thought just copy via adb failed also Aug 13 16:02:12 g00s: nope didin't got report o a user using adb for install failing Aug 13 16:02:32 I had a problem with my new N7, when it tried to restore 240 or so apps - they started failing after a while... had a look at the log, was getting 403 from the server, decided it was a rate-limiting thing... Aug 13 16:02:43 waited a while, installed the missing apps manually, no problem since then Aug 13 16:02:59 app restore on new device is weird Aug 13 16:03:04 and I made a recent update to my app with r22 signing and it fixed the issue for a user having a problem, so it is definitely not signing related Aug 13 16:03:18 I have no idea what it uses as its list to restore Aug 13 16:05:09 Leeds hm, often i leave my android phone of for long periods of time (months) and when its time to update, there are tons of apps that need updating. weird that play or whatever service underneath the hood tried to d/l too many things at once and they all hang Aug 13 16:05:18 *phone off Aug 13 16:06:02 as if its just iterating through a list and creating new Threads or something Aug 13 16:06:40 the issue for me was server-side, I'm pretty sure Aug 13 16:21:18 Got my Cast setup for development purposes, built a test app and it all works Aug 13 16:21:19 Wooh Aug 13 16:21:20 :D Aug 13 16:23:12 the easily impressed duck Aug 13 16:26:18 Never having done oauth stuff before, I'm a little lost with using api requests. Once I've defined specific apis in the console against a project, I'm just getting a token for that project right? Not a specific API. Aug 13 16:26:44 both i think Aug 13 16:28:05 Ugh. Always feel really dumb when I can't work out stuff that "plenty of other people have" as it were Aug 13 16:28:34 that's it Aug 13 16:28:35 not sure though Aug 13 16:28:36 oops Aug 13 16:29:10 This example uses a url for tasks, but I can't actually find an oauth url/token/whatever for the api I'm wanting Aug 13 16:29:35 Sometimes find there are too many examples online Aug 13 16:29:57 So I can't single out which is relevant to my use case Aug 13 16:30:04 lol, I got really bored last night playing with my google cast Aug 13 16:30:14 http://www.youtube.com/watch?v=5a4xzFOlUaU Aug 13 16:32:06 "here's a snippet from a working project.." ugh Aug 13 16:32:35 My turn today kjeldahl :p Aug 13 16:32:57 zulaxia: First you'll need to get a refresh_token, and this has to be done in a browser, typically using the oauth2 playground. To get that you need a client_id and client_secret, which is project and user specific. With a refresh_token, you can get an access_token (typically good for an hour) and call the services you asked for in your scope. Aug 13 16:33:05 zulaxia: lol Aug 13 16:34:00 zulaxis: I learned this through the god damn "GCM for Chrome" spectacle from yesterday! Aug 13 16:34:12 zulaxia: I learned this through the god damn "GCM for Chrome" spectacle from yesterday! Aug 13 16:34:41 It's the scope bit I'm lost on atm Aug 13 16:34:52 I need to setup gcm, I haven't touched it since c2dm Aug 13 16:35:06 zulaxia: Each API has it's own scope. You need at least one, but can ask for more than one. Aug 13 16:35:31 I don't know the one for what I want Aug 13 16:36:09 I can't actually work out where you find them unless you luck out in an example Aug 13 16:36:33 zulaxia: You can click select them from the oauth2 playground, or you can paste them in manually. For the GCM that I needed there was nothing to select, had to paste it in manually. Aug 13 16:36:49 zulaxia: Well, what are you trying to accomplish? Aug 13 16:37:22 Right now, store a single byte to app state api as a test Aug 13 16:37:43 I've read all the app state stuff, and all that I can do in my sleep Aug 13 16:38:10 It's just the oauth token/sign on bit that is beyond me Aug 13 16:38:32 The scope for that one is https://www.googleapis.com/auth/appstate Aug 13 16:39:15 Go to the "google oauth2 playground". Press the "tools" symbol top right. Things should become a bit clearer. Aug 13 16:39:27 Ok. Thanks. It's always something small that derails me ;) Aug 13 16:40:46 zulaxia: Yeah. And the next thing is that you need to "exchange authorization code" to get a refresh_token. With the refresh_token, you can get access codes whenevery you need in your apps. Aug 13 16:41:44 refresh_token is what you need to use the apps server side, or anywhere else without your own explicit approval every time. Aug 13 16:41:44 Right. At least knowing the scope I can adapt almost any other example Aug 13 16:42:04 The appstate api is in the dropdown. My GCM stuff from yesterday was not. Aug 13 16:42:13 Heh Aug 13 16:42:17 It was painful to figure out. Aug 13 16:42:44 Whoever said it was just a REST call can go suck a duck! (Kidding, parts of it is simple, like the device bit) Aug 13 16:42:58 rest calls are stupid, they're never simple Aug 13 16:43:11 REST calls are actually really nice...... Aug 13 16:43:40 as with most stuff, the tech is simple, filling the right data in the right place...f is it Aug 13 16:43:45 not really, the underlying data-transfer is ill-defined Aug 13 16:44:48 need something to standardize on, like wadl Aug 13 16:44:51 but no one does Aug 13 16:50:02 groovy seems to have some insanely bizarre features; like "svn --help".execute() …. adding process execution method to String class ? wtf Aug 13 16:56:42 if I have 2 overlapping ImageViews, both of which are on top of a layout, how would I make part of the top ImageView transparent so that you can see through to the bottom one, and also make part of the bottom one transparent so that you can see through to the layout? I tried drawing the regions with Color.TRANSPARENT but that doesn't work.. also been dabbling with PorterDuff things that I don't really understand Aug 13 16:58:02 try setting their alpha? Aug 13 16:58:24 And speaking of GCM/push: http://aws.typepad.com/aws/2013/08/push-notifications-to-mobile-devices-using-amazon-sns.html Aug 13 16:58:25 Phineas5: you mean by just using some color with opacity set to 0? Aug 13 16:58:33 like fillin the region with that color? Aug 13 16:58:36 filling* Aug 13 16:58:44 imageViewVar.setAlpha(127); Aug 13 16:58:49 almost half of 255 which is the max alpha Aug 13 16:58:56 so it should become transparent, give it a try Aug 13 16:58:59 1million msgs/month free, $.50/million thereafter Aug 13 16:59:07 hmm well I only want a small region of the imageview to be transparent Aug 13 16:59:12 oh Aug 13 16:59:21 so i have a path constructed on each one's bitmap Aug 13 16:59:28 hm I don't know about that Aug 13 17:07:50 Does guava have anything for making something like categories and products? And so that I can then easily show them on a ListView? Aug 13 17:08:08 Or any other library for that matter Aug 13 17:09:02 guava makes it easy to work with collections Aug 13 17:09:03 that's it Aug 13 17:09:10 I bet $1 that the Amazon cross-device messaging stuff does not support GCM for Chrome! Aug 13 17:09:49 considering amazon has stripped all the google-specific stuff out of their devices, I'd say that's a safe bet Aug 13 17:09:58 pfn, perhaps a MultiMap? Aug 13 17:10:35 dragorn: Not quite; considering their most recent announcement. What is an issue however is that Google call both things GCM, although they are totally different things (GCM for Android and GCM for Chrome/Servers). Aug 13 17:11:01 zyngawow, depends on what you need, maybe Aug 13 17:11:06 I dunno what multimap does... Aug 13 17:12:15 pfn, just like a Map, but allows to do map.put(1, item), map.put(1, item2) Aug 13 17:12:29 hmm, multimap Aug 13 17:12:39 ok, if that's what you need to model your data, use it :p Aug 13 17:12:48 feels listy Aug 13 17:13:35 Like a Map> Aug 13 17:18:56 zyngawow: You aren't actually a Zynga employee, are you? Aug 13 17:23:03 * zyngawow must find a new nickname Aug 13 17:23:19 Lol Aug 13 17:23:27 I have a Zynga t-shirt Aug 13 17:23:30 its pretty cool Aug 13 17:23:33 got a bunch of game logos on it Aug 13 17:23:43 one of mthe better free t-shirts I've been given at career fairs Aug 13 17:31:49 Hello Folks :-) Aug 13 17:31:50 Is there a way to force an ExpandableListVIew NOT to expand on ListItem Click, so I can do this programmatically only? Aug 13 17:32:21 * mank319 is afk for a few minutes eating something, hoping for someone to have an answer meanwhile :-))) Aug 13 17:33:14 this is good :) http://qz.com/114601/all-those-people-with-cheap-android-smartphones-have-finally-started-buying-apps/ Aug 13 17:33:50 "US, Japan and Korea" Aug 13 17:34:07 hey, and now even the north koreans have their own android phone ! Aug 13 17:36:23 Is there a straightforward way to convert a WAV file to an MP3 or OGG from Android Java, preferably without having to visit the NDK? I am generating WAV files that sound correct, but I cannot set them to ringtones and I think it's because they're WAV files and my existing ringtones are OGG. Aug 13 17:37:43 do you guys notice a bug with the android sdk manager on mac; it seems like it loads some stuff and stalls unless i move my mouse Aug 13 17:39:30 g00s, I notice that happen a lot with X11, never with native cocoa interfaces, though Aug 13 17:39:40 the eventloop gets fucked up or something Aug 13 17:39:53 hmm, nevermind, it wasn't x11, it was an applet that I had a problem with Aug 13 17:39:55 Hey guys, I have an android kernel build that I've applied like 200 patches to. Whats the easiest way to get a mega-diff of everything? (repo) ? Aug 13 17:40:04 repo diff Aug 13 17:40:23 Mathuin: you should use lame, probably, it's the only way Aug 13 17:41:29 veloc1raptor: can you recommend a particular flavor of lame? So far this looks best: http://openinnowhere.sourceforge.net/lameonj/ Aug 13 17:41:31 http://www.100percentindie.com/ <-- check this out guys, they test your android games for you for free and you don't need to keep in contact with anyone Aug 13 17:42:43 https://github.com/vincentjames501/libvorbis-libogg-android <-- this also looks like ithas potential Aug 13 17:43:30 http://developer.samsung.com/android/technical-docs/Porting-and-using-LAME-MP3-on-Android-with-JNI Aug 13 17:44:11 So with either tool I have to use the NDK. Aug 13 17:44:33 I'm a little surprised that there's no black box that I can pour a WAV file into and get MP3 or OGG out the other side. :-) Aug 13 17:45:46 It's too consuming process Aug 13 17:46:43 I'm working through a demo app (https://github.com/CodeUniverse/SplashScreen) for which I've built a new project. I'm running into an error though that I can't seem to resolve. In the MainActivity I'm calling setContentView(R.layout.activity_main). Eclipse thows an error "activity_main cannot be resolved or is not a field" yet I do have activity_main.xml in my layout folder. What might lead to this/ Aug 13 17:47:40 zanberdo: clean->build->check gen folder, and R.java Aug 13 17:47:46 Last time I got that I googled for it and I think I had to add an import for R that was app-specific. Aug 13 17:47:54 Cleaning wasn't enough for me. :-( Aug 13 17:50:01 http://developer.android.com/guide/appendix/media-formats.html <-- WAV is supported. Hrm. Wonder why it won't work. Aug 13 17:51:05 .WAV is the worst Aug 13 17:51:07 lol Aug 13 17:51:17 .wav files drove me to the edge of insanity Aug 13 17:51:25 What specifically was the problem? Aug 13 17:52:02 not really a problem Aug 13 17:52:14 just doing music playing of all types and analysis of metadata and amplitudes etc. Aug 13 17:52:15 using Java Aug 13 17:52:16 >.> Aug 13 17:52:35 I am building ringtones by assembling PCM waveforms, so WAV is a natural choice. Aug 13 17:52:37 Basically I wrote the music library for this project me and some friends started Aug 13 17:54:29 So, I've patched 4.1.1 for ad-hoc networking. In `wpa_cli` I can connect to my IBSS networks but then get kicked off after 30 seconds, probably due to some dhcp daemon. Any thoughts Aug 13 17:54:30 ? Aug 13 17:54:31 The waveforms look right in Audacity and play well there. They're being stored in MediaStore correctly. I just can't play them on the phone. Aug 13 17:54:54 are they stereo or mono? Aug 13 17:55:13 and, is this a samsung device :/ Aug 13 17:56:00 Yes, it's a Samsung device. I've tried both stereo and mono. Aug 13 17:56:47 blame samsung tbqh Aug 13 17:57:12 try a non Samsung device Aug 13 17:57:30 Mathuin: what format are you saving it in? like, sample rate, sample type Aug 13 17:57:53 I'm having an interesting debate over what the most performant way to show some centered text with an icon next to it. The options: A textview with an ImageSpan as the first character, with the text centered. A LinearLayout + ImageView + TextView or a Button... I'm thinking the Spannable TextView or the Button should be the most efficient but my colleagues argue a LL + 2 views is just as fast... Sigh Aug 13 17:58:13 32bits wide, sample rate 44100, 2 channels. Aug 13 17:58:18 I should try 16 and 8. Aug 13 17:58:21 compoundDrawableWithIntrinsicBounds Aug 13 17:58:26 yeah, do 16 bit Aug 13 17:58:33 i doubt it handles 32bit Aug 13 17:58:38 hey guys, i need to call the settings of the calendar app, from my own app to set something. Is this possible? Aug 13 17:58:47 i wouldn't be incredibly surprised if it didn't even handle 8 bit Aug 13 18:01:19 No on 16, now trying 8. Aug 13 18:01:35 Mathuin: don't bother w ith 8 Aug 13 18:01:59 Mathuin: really odd that it won't play 16bit/44.1kHz/2ch Aug 13 18:02:34 I wonder if there are any existing samples out there I can go fetch. Aug 13 18:04:21 Found one that's mono, 44.1k, 16bit. Aug 13 18:06:32 And it plays. Now to do file surgery. Aug 13 18:12:13 hi... i have downloaded ADT, but when I try to start eclipse with the eclipse binary the launcher hangs after selecting the workspace and eats up my ram... when starting eclipse with java -jar path/to/ecilpse/launcher.jar it works... this happens on arch linux... on OS X the launcher binary works as expected Aug 13 18:12:16 any ideas whats wrong? Aug 13 18:13:37 ohcibi, i have debian gnu/linux . and it's working fine Aug 13 18:13:48 nice Aug 13 18:13:52 i have debian wheazy Aug 13 18:14:04 sorry "wheezy" Aug 13 18:14:28 ohcibi, what's your CPU? Aug 13 18:14:50 amd 64 bit Aug 13 18:15:14 i mean has it many cores like i7 or so? Aug 13 18:15:29 is there an amd 64bit single core?? Aug 13 18:15:34 but yes, its dualcore Aug 13 18:15:35 veloc1raptor, I did try that (clean and build) before asking. I've done it a second time but still no love. Oddly enough I have two other activities, both with setContentView calls to custom layouts, both of which resolve without error. It's just this MainActivity which won't resolve activity_main (note: R.java and BuildConfig.java are found in gen under my package namespace) Aug 13 18:16:12 anyways.. you have to check the preferences of your eclipse Aug 13 18:16:22 and try to increase your RAM Aug 13 18:16:31 if you have Ubuntu, just ditch it Aug 13 18:16:32 superlinux-hp: what preferences? it has nothing to do with eclipse, eclipse launches fine Aug 13 18:16:42 its the binary launcher Aug 13 18:16:43 so? Aug 13 18:17:29 superlinux-hp: did you read what I wrote? i have issues when starting ecilpse with the binary launcher Aug 13 18:17:38 and i'd like to find out why Aug 13 18:18:07 ohcibi, what is the binary launcher here? Aug 13 18:18:23 superlinux-hp: its the binary file called eclipse that comes with every eclipse download Aug 13 18:18:36 ah ok Aug 13 18:18:47 what is your current eclipse? Aug 13 18:18:52 kepler? Aug 13 18:18:54 superlinux-hp: the one that come with ADT???? Aug 13 18:19:10 Woo. Turns out I *wasn't* making 16bit. :-P better now. Aug 13 18:19:23 Mathuin: hehe :) Aug 13 18:19:24 superlinux-hp: have you downloaded the ADT by sourself yet? or are you using the new SDK based on intellij? Aug 13 18:19:42 I am using the ADT Aug 13 18:19:50 then why are you asking which eclipse? 8-)) Aug 13 18:19:56 and I am updating as usual Aug 13 18:20:14 ah so you installed ADT into your current eclipse and did not download the complete package? Aug 13 18:20:45 ohcibi, i used the one that comes in the eclipse market Aug 13 18:20:55 superlinux-hp: interesting Aug 13 18:21:30 superlinux-hp: there is a download package on the android-dev-pages which includes a (presumably recent) version of eclipse with ADT-plugin preconfigured Aug 13 18:21:36 superlinux-hp: thats what i am talking about Aug 13 18:22:01 ohcibi, sorry for wasting your time. Aug 13 18:22:31 I am using that eclipse-with-ADT thing, and I kinda like it. Aug 13 18:23:10 I have three ListViews, products, cart, and shoppingList. Products go in them. What would be best, to have three ArrayLists, or have one and the products have a boolean value (isInCart, isInShoppingList)? Aug 13 18:23:11 Mathuin: the launcher binary eats up my ram and I have no clue why....is there any log? Aug 13 18:23:56 Haven't found one yet. Aug 13 18:30:22 g00s: Yep, it's at the top of r/android too :-) Aug 13 18:31:24 Is there a command I can use to find out what version of the build tools I have? Aug 13 18:32:22 yiati: android Aug 13 18:32:34 then look at the version numbers it shows you having installed Aug 13 18:34:52 still no api 18 x86 image? Aug 13 18:35:09 RyanM: Thanks. Didn't realize Rev. is what I have currently installed :P Aug 13 18:39:10 If I use http://developer.android.com/sdk/installing/migrate.html to migrate my project to Gradle, and my project has library projects then on Step 4 of Export From Eclipse, do I need to checkbox the library projects as well? Aug 13 18:39:50 So I'm iterating through a cursor in onLoadFinished, and I am sending a toast once per iteration. I'm only seeing one toast, and that's at the end. Any ideas why? Aug 13 18:40:54 the cursor only has 1 item? Aug 13 18:41:15 print out a getCount Aug 13 18:41:54 Reusing same Toast pointer, making the previous one become GC before showing? Wild guess... Aug 13 18:42:53 if not using the static makeText that may be the case Aug 13 18:44:45 Mathuin: Paste link some code and it should be easy to spot. Aug 13 18:47:38 I'm also doing a buttload of work in onLoadFinished because I don't know any better. ;-) Aug 13 18:49:44 kjeldahl: http://pastebin.com/8emqNdv5 Aug 13 18:51:38 Near the bottom you can see a Log.v() right before the Toast.makeText. I see all the Log.v()'s, but only the last Toast. Aug 13 18:51:47 Mathuin: line 15: while (cursor.moveToNext()) { ... } Aug 13 18:52:05 it won't fix the bug, but it's much nicer to read Aug 13 18:52:22 So, is the web based Feed dialog in their Android SDK the intended way that Facebook wants us to share/post to them? The Intent/ACTION_SEND hack is not that fine grained. Aug 13 18:52:24 I wasn't sure if calling .moveToNext() before calling .moveToFirst() would work. Aug 13 18:52:39 But yes, I agree, the while is easier to read than the for. Aug 13 18:52:39 Mathuin: when you get a cursor, it's before the first item Aug 13 18:53:09 Good to know. Aug 13 18:55:32 I have three ListViews, products, cart, and shoppingList. Products go in them. What would be best, to have three ArrayLists, or have one and the products have a boolean value (isInCart, isInShoppingList)? Aug 13 18:56:34 zyngawow probably one listview with 3 adapters Aug 13 18:57:15 g00s, and how would you call each adapter so it only gets the Objects in the list it is meant to get? Aug 13 18:58:05 see stuff like https://github.com/commonsguy/cwac-merge Aug 13 18:58:34 i haven't used it though; your mileage may vary :D Aug 13 19:11:59 hargh Aug 13 19:32:47 man Aug 13 19:33:11 I can't get part of a bitmap to be transparent for the life of me Aug 13 19:33:40 what you talkin bout tnzr Aug 13 19:34:50 @romainguy: I know you said you work on the android platform team right? But like, what is your specialty? Aug 13 19:35:18 tnzr: After this summer I'm very familiar with transparency and Bitmaps. What is your issue? I'd love to take a look. Aug 13 19:36:30 hey guys anyone knows the agenda/calendar app from google? how do i set settings from my app? Aug 13 19:36:36 oh sorry guys went afk a sec Aug 13 19:36:44 well basically I have this bitmap, and it's mutable Aug 13 19:36:57 and I've selected part of it with a path.. and I would like to make that part transparent Aug 13 19:37:21 I can fill it with colors ok Aug 13 19:37:44 but I can't seem to just remove all color, and i've tried all kinds of stuff, including various incantations of PorterDuff black magic Aug 13 19:37:50 lol Aug 13 19:38:02 tnzr: Pastebin? Aug 13 19:38:07 sure one sec Aug 13 19:41:34 Mathuin: Did you resolve the problem? Do the toasts appear correctly if you skip calling finish at the end? Aug 13 19:42:09 Gah, toasts, why toasts Aug 13 19:42:40 Brian|CS: https://gist.github.com/anonymous/6224900 Aug 13 19:42:47 I cleaned it up a little, hopefully I didn't leave anything out Aug 13 19:43:26 Brian|CS: so I know the path is correct because I can fill it with color so I can see it's the right region... I don't know if I've set up the paint properly or whether or not clipPath is necessary (or working), etc Aug 13 19:44:55 To make transparent you need to use PorterDuff.Mode.CLEAR Aug 13 19:45:12 kevinb: I've tried that and it's just black Aug 13 19:45:33 does the bitmap support transparency (ARGB_8888 ?) Aug 13 19:45:36 I got SRC from this thread: https://groups.google.com/forum/#!topic/android-developers/WwpJhmSxeqA Aug 13 19:45:43 tnzr: you can edit at the pixel level Aug 13 19:45:51 it should, 8888 means ARGB (or RGBA) right? Aug 13 19:46:01 You are supporting alpha correctly yes Aug 13 19:46:16 The part where you say Bitmap.Config.ARGB_8888 sets that up for you Aug 13 19:46:20 So thats not an issue Aug 13 19:46:20 right Aug 13 19:46:32 So how do you know it's not being drawn? Aug 13 19:46:34 SInce it's transparent Aug 13 19:46:45 can you show me how it looks when you draw the transparency? VIa screenshot or whatever Aug 13 19:46:48 because there's a view behind it that is obscured until it animates out of the way... currently it's just filled with black Aug 13 19:46:53 sure, sec Aug 13 19:47:02 for the paint, try just doing paint = new Paint(); paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR)); without any of the setcolor or setalpha or anything Aug 13 19:47:02 that's how i do it, and it works Aug 13 19:47:18 you shouldn't have to set alpha Aug 13 19:47:23 if you've already set the color to transparent Aug 13 19:47:29 kevinb: hmm perhaps then it's the way I'm using clipPath(), drawPath() or both? Aug 13 19:47:37 but like, if there is something behind the transparency with a color that you are seeeing maybe Aug 13 19:47:37 idk Aug 13 19:47:52 can you show a screenshot of what happens when you try to draw with transparency tnzr? Aug 13 19:48:45 yah Aug 13 19:48:48 getting one for ya Aug 13 19:49:28 tnzr: i'm using drawRect with my transparent paint, i don't think i've tried drawPath. clipPath isn't right. Aug 13 19:49:58 kevinb: yeah, the thing is I need to make a triangle transparent Aug 13 19:50:00 screenshot inc Aug 13 19:51:41 Brian|CS: https://dl.dropboxusercontent.com/u/4461195/screenshot.png Aug 13 19:52:17 can you send one with the "transparent" part colored in? Aug 13 19:52:21 so we know what we're looking at Aug 13 19:52:24 yeah that's the black triangle Aug 13 19:52:43 so what should you see there Aug 13 19:52:44 instead of black Aug 13 19:52:47 is what I'm getting at Aug 13 19:52:48 green Aug 13 19:52:51 oh i see Aug 13 19:53:01 yeah, i want to be able to see underneath it to the green beneath Aug 13 19:53:46 sorry I just realized that looking at this screenshot, it would be hard to figure out exactly what you're looking at Aug 13 19:54:25 What does the setXfer mode do? Aug 13 19:54:28 I've never used that call Aug 13 19:54:38 also, remove the line where it does setAlpha Aug 13 19:54:45 your Color.TRANSPARENT should take care of the alpha values Aug 13 19:54:54 ok Aug 13 19:55:20 I read somewhere that Color.TRANSPARENT is the same as just painting nothing.. different from actually painting transparency over the existing color Aug 13 19:55:58 the PorterDuff.Mode.CLEAR is what takes care of erasing, rather than painting a transparent color Aug 13 19:56:01 If I use http://developer.android.com/sdk/installing/migrate.html to migrate my project to Gradle, and my project has library projects then on Step 4 of Export From Eclipse, do I need to checkbox the library projects as well? Aug 13 19:56:59 trying CLEAR Aug 13 19:57:06 I'm unfamiliar with porterduf honestly Aug 13 19:57:15 kevinb sounds like he knows what it does tho ugh Aug 13 19:57:18 I'd try that Aug 13 19:57:24 hmm clear no worky either Aug 13 19:57:41 try removing the setColor/setAlpha and everything else. just make a new paint and set it to CLEAR Aug 13 19:57:44 I used PorterDuff before but it was to basically draw a bg image, then draw a fg image ontop of that with part of it masked out Aug 13 19:58:02 ok Aug 13 19:58:04 * tnzr tries Aug 13 19:58:16 i think maybe Color.TRANSPARENT or setAlpha(0) causes the paint to basically do nothing, which is why even with CLEAR it doesn't work Aug 13 19:58:21 the other thing to try removing is the clipPath Aug 13 19:58:39 ^^ Aug 13 19:58:41 ok Aug 13 19:58:53 clipPath is part of the canvas, not the bitmap, so it just acts as a way of disregarding draw commands to certain areas. preventing them from ever hitting the bitmap Aug 13 19:58:58 I removed clipPath, the paint has no color associated wtih it, but PorterDuff is set to CLEAR Aug 13 19:59:04 oh really ok Aug 13 19:59:23 ok well...that doesn't work either :( still black Aug 13 19:59:31 Why could I be getting "Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]" on Android Studio when trying to run my app on my Nexus 4? Aug 13 19:59:47 tnzr: okay as a quick test, comment out the CLEAR line and put a setColor(Color.RED); Aug 13 19:59:53 does that make the black part red? Aug 13 20:00:25 yep! Aug 13 20:00:26 are you sure the immediate background after that is green, and not black? Aug 13 20:00:30 zyngawow: Because you've signed the apk with another cert? Aug 13 20:00:36 i have a feeling the layers of backgrounds are just wrong Aug 13 20:00:40 kjeldahl, not that I know Aug 13 20:00:41 Brian|CS: well it's just a View underneath with background="@color/green" Aug 13 20:00:50 err Aug 13 20:00:51 zyngawow: Try uninstalling and see if that fixes it. Aug 13 20:01:08 this whole thing is in a RelativeLayout whose background is green, the bitmap is in an ImageView Aug 13 20:01:09 whats the background of the view you're drawing on? Aug 13 20:02:26 kjeldahl, yep, that fixed it Aug 13 20:02:32 :-) Aug 13 20:02:43 Could be debug/release issue as well (different certs). Aug 13 20:02:45 Brian|CS: does that make sense? Aug 13 20:02:55 How can I add an external JAR to the project? I would like to use Guava for MultiMaps Aug 13 20:03:05 kjeldahl, yeah, seems like my phone had a different cert Aug 13 20:03:22 kevinb: https://dl.dropboxusercontent.com/u/4461195/redscreen.png Aug 13 20:03:33 that's with paint.setColor(Color.RED) Aug 13 20:04:00 evening all Aug 13 20:04:03 something else changed, the triangle is much bigger than the last screenshot Aug 13 20:04:12 like Aug 13 20:04:16 zyngawow: Stuff it in libs, add "compile files('libs/my.jar')" in dependencies in your build.gradle file. Aug 13 20:04:16 this canvas you're drawing on Aug 13 20:04:18 it's part of a veiw right? Aug 13 20:04:22 is it a custom view? Aug 13 20:04:30 kevinb: ignore that, it gets dynamically generated (the bitmap) Aug 13 20:04:40 no, jsut a RelativeLayout! Aug 13 20:04:59 Brian|CS: the canvas is backed by a bitmap, the bitmap is going into an ImageView. tnzr: does the imageview have a background? Aug 13 20:05:02 I do all this stuff, then set it as the bitmap for an ImageView and add that ImageView to the RelativeLayout Aug 13 20:05:44 I'm looking for a way to keep an object across configuration changes. I've already had a look at http://goo.gl/NJkvGp, but that only states how to use Retained Fragments for AsyncTasks. I would like to store a whole object though. Should I just Aug 13 20:05:53 store the object in the fragment? Aug 13 20:06:03 tnzr: another thing just as a test is to do a drawRect rather than drawPath. i don't imagine it will change anything, but my code works and is just a new paint with the CLEAR set, and then a drawRect Aug 13 20:06:35 another thing to test would be to try setting a background color of the imageview Aug 13 20:06:44 to see if it changes the color that you see when you set it to transparent Aug 13 20:07:17 kevinb: hmmmm Aug 13 20:07:20 i dont think it has a background Aug 13 20:07:27 yeah do Brian|CS's first. Go back to CLEAR and set the background color on the ImageView Aug 13 20:07:38 ooh!! Aug 13 20:07:44 * tnzr tries Aug 13 20:08:47 ok well Aug 13 20:08:50 wait Aug 13 20:09:23 ok Aug 13 20:09:34 I set the imageview's bg to Color.TRANSPARENT and switched PorterDuff back to CLEAR Aug 13 20:09:39 and its still black Aug 13 20:09:58 set the imageview's bg to blue and see if it's still black Aug 13 20:10:49 still black :( Aug 13 20:11:19 instead of doing Color.TRANSPARENT try using #00000000 maybe? Aug 13 20:11:25 Idk hjow Color.TRANSPARENT is interpreted though Aug 13 20:11:28 so that might not make a difference Aug 13 20:11:33 ill try that Aug 13 20:13:10 yeah, that's black too :( Aug 13 20:13:38 kjeldahl: I have not tried, I was away at a meeting. I will remove finish() and give it a try! Aug 13 20:13:53 jumping ahead a bit. the plan is to do this as part of an animation? so even if this worked, you'd be creating a new bitmap on every frame of the animation? Aug 13 20:14:12 Not necesarily Aug 13 20:14:17 he could also just do a value animator Aug 13 20:14:20 and not be creating new bitmapos Aug 13 20:14:22 bitmaps* Aug 13 20:14:26 yeah Im definitely not doing that Aug 13 20:14:34 I mean if it does that under the hood, that's another story (i don't know if it does) Aug 13 20:14:41 I'm using a TranslateAnimation to just move it up Aug 13 20:15:01 oh so the triangle stays the same, just the imageview is translated up? Aug 13 20:15:05 yeah Aug 13 20:15:47 another approach would be to use a bitmap shader, so you keep the full bitmap, but only draw part of it Aug 13 20:16:14 hmm I haven't heard of that, I will google it Aug 13 20:16:35 tnzr: I'm gonna make some cahnges to your code Aug 13 20:16:37 and send it back Aug 13 20:16:39 1 sec Aug 13 20:17:01 ok Aug 13 20:17:02 if you were animating the triangle it'd have the clear advantage of not creating extra bitmaps. but since you are not i'm not sure if it's necessarily a better approach than erasing the triangle from the bitmap Aug 13 20:17:12 and thanks for taking the time to troubleshoot this with me, guys Aug 13 20:17:23 kjeldahl: ... it's now in an infinite loop, not stopping. Aug 13 20:18:09 I am now very tempted to use onLoadFinished to generate the pointers, then move the code that does the work into another method. Aug 13 20:19:07 clipPath isn't supported with HW accel until API18 Aug 13 20:19:13 Can anyone recommend a way of storing data across config changes? My data is slightly too complex to store in a Bundle, but I don't want to have to load it from the DB on every config change... Aug 13 20:19:31 SimonVT: do you think a clipPath is needed in this situation? Aug 13 20:19:51 Dunno really Aug 13 20:19:53 Just sayin Aug 13 20:20:02 Mathuin: A busy loop? That's messed up, no toasts I guess? Try calling finish after a 30 second delay then, using a handler.postDelayed(new Runnable() { @Override public void run() { finish(); } }, 30*1000); or similar construct... Aug 13 20:20:20 clipPath would be needed if you were not using a bitmap backing. and even on API18 it's pretty slow so use during an animation would be murder Aug 13 20:20:36 ok Aug 13 20:20:49 kjeldahl: the problem appears to be that updating the ringtones causes the query to refresh. Aug 13 20:20:59 so it tries over and over and over. Aug 13 20:21:02 i see an example using a BitmapShader, I might give that a run Aug 13 20:21:03 Mathuin: Just to figure out if the finish call is to blame. You shouldn't be getting a busy loop anyway, but the code you posted was a bit long and not formatted for easy reading. Aug 13 20:22:03 Mathuin: But based on what you're describing, sounds like there are more things you're not doing the best way. Aug 13 20:22:13 tnzr: What is the bitmap you are copying in the first couple lines? Aug 13 20:23:45 Brian|CS: a bitmap that was pulled from the cache dir in PNG format Aug 13 20:23:51 just a screenshot of the previous activity Aug 13 20:24:40 like, what does it look like? Aug 13 20:24:41 O.o Aug 13 20:24:46 is the bitmap you're copying that green stuff? Aug 13 20:25:59 kjeldahl: It's not a busy loop. It goes through my contacts, exits, then re-enters because the contacts have changed. Aug 13 20:26:09 the initial bitmap is the content view of the previous activity (a RL with a white bg, and a textview that says Hello World) Aug 13 20:26:39 As for formatting, that's the raw output from github. :-) Aug 13 20:27:18 tnzr: So where does this green come into the picture? Aug 13 20:27:46 Brian|CS: that createBitmap() call basically takes a subset of that initial bitmap (which is the one with the triangle, before the triangle is carved out by the path) Aug 13 20:28:05 oh, I think I see what you're sayin Aug 13 20:28:05 ok Aug 13 20:28:06 Mathuin: You probably should be doing all this model stuff in your contentprovider, and then when it's all done, then onLoadFinished will be called when everything is ready to be displayed. Aug 13 20:28:20 the green comes into the picture in the next activity - the bitmap is inserted into the parent ViewGroup on the second activity before setContentView is called Aug 13 20:28:26 that ViewGroup has a green BG Aug 13 20:28:33 is there an XML for this viewgroup? Aug 13 20:28:38 or is it just created in the code Aug 13 20:28:51 kjeldahl: my problem is that the most common use-case for onLoadFinished is to iterate through something like contacts to populate something like a dropdown list or another view element. Aug 13 20:30:05 Mathuin: That IS the use case, iterate through the stuff that needs to be displayed when processing is done. Do the model manipulation stuff outside of the GUI stuff, only show the final result. Aug 13 20:30:20 there's an XML Aug 13 20:30:23 But I'm not using a GUI, except for the toast thing, which doesn't count. Aug 13 20:30:24 that's where the BG is defined Aug 13 20:30:50 tnzr: Pastebin the XML? Aug 13 20:30:57 So I can get a better idea of how these things are all pieced together Aug 13 20:30:58 :S Aug 13 20:31:10 So what class implements the LoaderManager? Aug 13 20:31:42 Brian|CS: https://gist.github.com/anonymous/6225375 Aug 13 20:31:53 So what class implements the LoaderManager.LoaderCallbacks? Aug 13 20:32:04 onCreate() calls getSupportLoaderManager().initLoader(LOADER_ID, null, FinleyBreeseActivity.this); when a button is pressed. Aug 13 20:32:07 Is that what you mean? Aug 13 20:32:11 and so you're adding the imageview as a child of that relativelayout tnzr? Aug 13 20:32:33 Mathuin: Activity::onCreate? Aug 13 20:32:42 FragmentActivity::onCreate, but yeah. Aug 13 20:32:48 That's a GUI class. Aug 13 20:33:06 If it doesn't have a GUI, it's the wrong place to do what you do. Aug 13 20:33:21 'public class FinleyBreeseActivity extends FragmentActivity implements LoaderManager.LoaderCallbacks' Aug 13 20:33:39 Brian|CS: yah let me gist that Aug 13 20:33:48 So I should create another class, implement LoaderManager on it, generate a data structure with that class, and call it from within my activity. Aug 13 20:34:22 tnzr: So I'd imagine this would work, but I suppose this also just draws black for you. http://pastebin.com/9BHk938b Aug 13 20:34:35 Mathuin: How is your loader initialized, the initLoader stuff? Aug 13 20:34:52 Brian|CS: i can try it! Aug 13 20:34:54 ... ugh. After rereading the docs of onLoadFinished, I think I can see part of what I am doing wrong, but I'm not exactly sure how I'm going to fix it. Aug 13 20:35:28 kjeldahl: initLoader has three arguments, the loader ID which is just a constant, 'null', and the activity. Aug 13 20:35:38 ok Aug 13 20:35:44 I'm gonna guess it still draws black, right tnzr? Aug 13 20:35:55 onCreateLoader builds a CursorLoader from the raw contacts stuff. Aug 13 20:36:31 Brian|CS: https://gist.github.com/anonymous/6225432 Aug 13 20:36:34 Ok, so you're not in control of the content provider... Aug 13 20:36:42 No. Aug 13 20:36:49 R.id.activity_new is the XML i pasted, and activity is the 2nd activity Aug 13 20:37:09 kk. ANd tnzr that code I poosted still draws black right? Aug 13 20:37:15 trying now Aug 13 20:38:39 Mathuin: There are several ways to do it. One way is to write your own contentprovider. In your view, you initialize two contentproviders. The first one being the contactstuff, and when that is done, you initialize the second one which does the stuff you are doing now. And when that's done, THEN you update your view. Aug 13 20:38:56 Sry, in your fragmentactivity I meant... Aug 13 20:39:36 Brian|CS: yeah still black :( Aug 13 20:39:43 Ok Aug 13 20:39:46 Heres what I want you to do next Aug 13 20:40:01 in that last paste you sent me, ther eis line 8, top.setBackgroundColor(0x00000000); Aug 13 20:40:11 Hrm. Reading the content provider creation pages on developer.android.com makes me think that's overkill for these purposes. Hmm. Aug 13 20:40:22 yeah Aug 13 20:40:38 You don't need to implement the entire content provider for it to work Aug 13 20:40:45 i want you to change that like to be top.setBackgroundColor(Color.parseColor("#0000FF00")); Aug 13 20:40:48 line* Aug 13 20:40:53 Mathuin: Or you could do it "directly" in the database, with getWriteableDatabase, cursor = db.rawQuery(sql); then while (cursor.moveToNext()) { ... } etc. Aug 13 20:41:10 Mathuin: Ideally, in it's own thread as usual, or the GUI thread will bark! Aug 13 20:41:34 It's that not-in-the-GUI-thread that pushed me down this LoaderManager path... Aug 13 20:41:44 Brian|CS: ok, but it's the same effect Aug 13 20:41:48 I agree the contentprovider stuff and database abstractions offered are quite poor for anything but very basic usage (your's probably isn't). Aug 13 20:41:58 parseColor just returns 0x00000000 if given "#00000000" :) Aug 13 20:42:24 tnzr: Leave it like top.setBackgroundColor(Color.parseColor("#0000FF00")); Aug 13 20:42:27 and then what I want you to do Aug 13 20:42:33 is go back to the canvas part Aug 13 20:42:35 My goal is pretty simple: for every raw contact that has a notes field matching a certain regular expression, return the raw contact id, the contact id for that raw contact id, the display name, and the custom ringtone if any. Aug 13 20:42:39 Mathuin: Yeah, but you're starting your work when you're supposed to be finished! That's why the fragmentactivity gets messed up! And you finish it immediately. As I said, it's the wrong place and way. Aug 13 20:43:08 kjeldahl: I've learned while talking with you and reading the docs that onLoadFinished is the worst place to do waht I need to do. Aug 13 20:43:13 Its only benefit is that it wroks. Aug 13 20:43:25 lol Aug 13 20:43:27 and after canvas.drawPath I want you to do canvas.drawColor(Color.parseColor("#0000FF00")); Aug 13 20:43:32 try that tnzr Aug 13 20:43:36 just blank the whole canvas Aug 13 20:43:38 and tell me what happens Aug 13 20:43:42 I mean, I do generate custom ringtones in taht loop and it works. I just don't get toasts. :_) Aug 13 20:44:07 So I'm going to break that code into two pieces -- one that generates a table of those values I mentioned above, and another that uses those values to Do The Stuff. Aug 13 20:44:22 tnzr: http://imgur.com/8Jir1zj https://gist.github.com/teslacoil/d3b78aef6c83c05a669d Aug 13 20:44:24 That sounds like a very good idea. Aug 13 20:44:46 Separate the work (modeL) from the presentation (view). Aug 13 20:45:01 It's really hard to put that 'for every ... regular expression' bit into the projection/selection/selectionargs model, btw. Aug 13 20:45:18 Mathuin: Skip that shit! Aug 13 20:45:32 kevinb: awesome, I will try it Aug 13 20:45:35 Brian|CS: same thing :( Aug 13 20:45:44 Mathuin: Use db.rawQuery and cursors. Much easier! Those abstractions suck bigtime! Aug 13 20:45:44 tnzr: So it made the whole thing black? Aug 13 20:46:07 How could I use a Multimap (Guava) on an Adapter? Aug 13 20:46:14 no, it was still just the triangle Aug 13 20:46:17 kjeldahl: I thought db.rawQuery and friends did not work on the contacts databases. Aug 13 20:46:20 err only the triangle was black Aug 13 20:46:27 tnzr: Thats a problem right there then Aug 13 20:46:36 show me your code after you added the .drawColor line Aug 13 20:46:37 O.o Aug 13 20:46:44 Mathuin: Create and fill a MatrixCursor to return the rows to whatever consumes it; it's like an array. Unless you need it stored in a table of course. Aug 13 20:47:24 Mathuin: For reading the contacts, you need to stick with the program. Use the contactprovider. For your own data, you can do whatever you want. Aug 13 20:47:49 I don't need a table, I think a MatrixCursor may work. Aug 13 20:50:07 And if you decide to go with a contentprovider, it can return MatrixCursor as well. It does not have to be backed by a database. Aug 13 20:51:01 Oh, I hadn't considered that. Aug 13 20:51:24 There may be better ways though. I went down the same path as you did probably, and it took a while until I got the contentprovider stuff, and when I finally did everything worked. Others here may suggest easier alternatives IF you are able to describe exactly what your input, processing and presentation requirements are. Aug 13 20:52:14 Brian|CS: https://gist.github.com/anonymous/6225554 Aug 13 20:52:55 Brian|CS: sorry, I re-ran it, the triangle is now gone Aug 13 20:53:53 Mathuin: Yeah, my contentprovider does all sorts of calculation and aggregations, stuff that definitively should not be backed by tables. MatrixCursor works great for that stuff, and has the same cursor interface as db stuff. Aug 13 20:54:33 Is there a way to give the speech recognition engine a list of 'allowed words' so that if you don't need free-form text search you can get more accurate results matching words you want, than less-accurate results possibly including irrelevant words. I thought i recaled seeing something about this in the docs, but can't find anything along those lines looking now Aug 13 20:54:40 tnzr: Sow now its just a black rectangle, right? Aug 13 20:55:13 Mathuin: You may also want to close your eyes about all that "projection" stuff. When you call just let it return all columns, and when/if that becomes a performance issue or what not, then MAYBE projections can help, but I doubt it unless you are pushing large amounts of data. Aug 13 20:55:30 when you call your contentprovider that was supposed to say Aug 13 20:55:32 It's already been a noticeable performance issue, alas. Aug 13 20:56:30 You've benchmarked it and know that projection is to blame? Based on the code you showed, I somewhat doubt that... ;-) Aug 13 20:57:17 Roughly one percent of my contacts get custom ringtones. Aug 13 20:57:25 I think those are primarily for when you are pushing large amounts of columns and rows. Aug 13 20:57:26 Filtering on those notes meant I was doing one-tenth the work. Aug 13 20:57:37 That's not projection, that's selection. Aug 13 20:57:42 Sorry, had them backwards. Aug 13 20:58:14 Though it would be nice to have the contact notes and display name natively in the projection instead of having to run separate cursors on them, I understand why. Aug 13 20:58:16 Brian|CS: actually the triangle is gone now :\ Aug 13 20:58:25 I think im going to try the BitmapShader real fast Aug 13 20:59:15 everyone isa JesusFreke ! Aug 13 20:59:55 hope you guys got that joke :| Aug 13 21:00:10 awkward Aug 13 21:01:12 nice. Aug 13 21:03:31 so Aug 13 21:03:51 i thought i'd learn gradle and Groovy, so I picked up the PragProg Groovy book , 2e Aug 13 21:03:56 terrible Aug 13 21:04:47 * g00s likes K&R style language books. short, concise. this is more like a 'look at this kewl feature' + more advanced topics Aug 13 21:05:25 I've bitched and moaned about it already; java/groovy - those aren't languages suitable for making customizeable build systems IMHO. Have you looked at what you need to do simple tasks like copying and moving files around? Terrible! Unfortunately, gradle is currently the ooo-aaaah system the kids love... Aug 13 21:05:32 no section dedicated to defining classes, methods … what kinds of types are available, etc Aug 13 21:06:06 kjeldahl actually, i thought groovy was more popular back in 2008 or so Aug 13 21:06:16 nowadays, i don't really hear much about it Aug 13 21:06:26 Then again, if it HAS to run on Windows, maybe that explains it. Aug 13 21:06:34 kjeldahl can you image writing a parser for groovy, omg Aug 13 21:07:00 g00s only in my nightmares. Aug 13 21:07:15 i bet it would be easier to write a perl parser :) Aug 13 21:08:07 A simple dynamic language with good shell integration, that's all it takes. Perl/Python/Ruby etc. Much better choices, but probably less "Windows" friendly. Aug 13 21:08:16 dunno what the language designer was thinking. more like, oh i dont like this Java syntax, how can i abbreviate this Aug 13 21:08:30 add some dynamic typing Aug 13 21:09:17 Anyway, I've used up my bitching quota for this week; time to go to bed. Night all. Aug 13 21:09:24 gnight kjeldahl Aug 13 21:09:26 kjeldahl: thank you! Aug 13 21:09:30 gl! Aug 13 21:09:50 kevinb: wow ok..that works except the triangle is from the original and all the rest of hte bitmap is transparent! Aug 13 21:10:15 tnzr: switch the path around Aug 13 21:10:29 tnzr: the bitmap shader identifies a region to keep, whereas porterduff identifiers a region to erase Aug 13 21:11:08 ohhhh Aug 13 21:11:09 bad ass Aug 13 21:11:18 tnzr: the really cool thing about the bitmapshader is that you could implement it into a drawable of it's own (or a custom view) so you wouldn't even need a second bitmap. romainguy has some examples of cool other uses of the bitmap shader as well Aug 13 21:11:21 so there's 2 bitmaps involved Aug 13 21:12:08 err a src and a dst.. I see Aug 13 21:12:21 in my example there is, just to keep it simple and similar to what you were trying before. but you could also do it with a custom drawable and no "dst" bitmap Aug 13 21:13:03 i see Aug 13 21:13:07 coooool Aug 13 21:13:14 that is awesome Aug 13 21:15:32 kevinb, Brian|CS: thank you both for your help Aug 13 21:15:36 it is very much appreciated Aug 13 21:16:49 no problem Aug 13 21:18:56 is the gallery app in the emulator (2.3) broken? Aug 13 21:42:14 I'm trying to render a button that has its text + icon both centered with a bit of padding in between them like so: [ icon 5dp text ] . So far the only options I've seen available when googling around are a LinearLayout + ImageView + Textview or a single TextView with centered text + an ImageSpan to hold the icon (seems to be performing worse than previous solution when I check the measure/layout/draw times Aug 13 21:42:15 in Hierarchy Viewer). Does anyone have a good pattern for doing this that would be faster than the LL + 2 views? Aug 13 21:43:08 Button (or TextView) has a setCompoundDrawable that can be used for this Aug 13 21:43:29 i have to go, but check out http://developer.android.com/reference/android/widget/TextView.html#setCompoundDrawablesWithIntrinsicBounds(int, int, int, int) Aug 13 21:43:50 kevinb I thought I tried that but the icon stays left of the text view Aug 13 21:43:59 there's a way to move it but the API is 14+ Aug 13 21:44:09 my app needs to support GB+ Aug 13 21:44:13 (API 8 and up) Aug 13 21:45:07 Hello. If i have res/values/styles.xml and res/values-v11/styles.xml... will Android 4+ devices fallback to res/values or res/values-v11 ? Aug 13 21:45:29 4+ will goes to values Aug 13 21:45:37 seriously 4+, impressive Aug 13 21:45:57 4+ - 11 that is Aug 13 21:46:11 11+ will go to values-v11 Aug 13 21:46:21 hello all Aug 13 21:47:21 im looking for some advise on a project im doing. How do i connect (bind) an android application to an application on windows (this is because the windows application will be a "listener" for the android application) Aug 13 21:48:29 unfortunately I doubt anyone will be of help with that Aug 13 21:49:25 ahhh Aug 13 21:50:04 nseidm1, thanks for answering but i don't understand you. Let me rephrase (this is not my native language): In that scenario, Jelly Bean devices will fallback to values-11/ or values/ ? Aug 13 21:50:24 values-v11 Aug 13 21:50:37 Thanks a lot... ;) Aug 13 21:54:08 How could I use a Multimap (Guava) on an Adapter? Aug 13 21:54:15 Can anyone point me in the right direction. Im creating an application for android where it gets variables from a WIndows application, how can i connect/bind the android app to the windows app over wifi etc Aug 13 21:55:25 zyngawow eh, i haven't looked at multimap in a while. i'm too lazy to even google it Aug 13 21:55:35 Topham: have the application running on the pc act as a server Aug 13 21:55:37 but its a map, so you're going to have trouble using it in an adapter Aug 13 21:56:18 im using a viewswitcher to show loading animation and when i press back button i get a blank page and have to press back twice to exit app Aug 13 21:57:14 g00s, what I'm doing is a shopping list app. I have categories and products, and I display them on a ListView. I chose Multimaps because they are great to store them like Multimap. What could I use instead that can be put into an adapter? Aug 13 21:58:10 hi all, i need some help, got a big problem with my moto droid 3 Aug 13 21:58:19 well adapters want something position indexed Aug 13 21:58:26 i did a factory reset and my ESN is now set to "Unknown" Aug 13 21:58:28 why would i have to press back button twice to exit app? Aug 13 21:58:37 i no longer get a signal Aug 13 21:58:39 deker see topic Aug 13 21:58:48 g00s, so I guess nothing is good for what I want to do Aug 13 21:58:48 Maestro any tutorial out there for that? Aug 13 21:58:52 g00s, any channel that i could get help in? Aug 13 21:59:10 maybe #android-root Aug 13 21:59:26 okay, it's stock firmware, but i'll give it a try Aug 13 21:59:29 thanks Aug 13 22:00:24 zyngawow i think you want an ArrayList of Arraylists :P Aug 13 22:01:10 Topham: there might be Aug 13 22:01:11 or ArrayList> Aug 13 22:01:24 I just wrote a web server myself and have that serve json over http Aug 13 22:01:51 g00s, I prefer the pair.. but there must be a better way.. Aug 13 22:02:50 I converted my project from Eclipse over to gradle, and it builds, but the app keeps crashing with OOM :P It builds and runs fine in Eclipse Aug 13 22:03:13 O.o Aug 13 22:03:48 so for once, eclipse is doing something right ? :P Aug 13 22:04:28 Nope, it is lazy and allows exceptions out the wazoo, and Gradle is a nazi and won't do anything that doesn't follow every rule Aug 13 22:04:36 Topham: have you done any networking before? Aug 13 22:06:56 Maestro yes ive done networking, my house has 1gbit netword Aug 13 22:06:59 network Aug 13 22:07:14 I mean networking as in code Aug 13 22:07:24 ie. sockets or something like that Aug 13 22:09:08 i havent Aug 13 22:09:17 but u learn by doing it i suppose Aug 13 22:23:53 huh, eclipse vs. gradle build should not affect OOME stuff Aug 13 22:23:58 you're doing something wrong... Aug 13 22:24:31 like gradle merges manifests Aug 13 22:24:38 and if some manifest requests a small heapsize (is that even possible) Aug 13 22:25:41 hey pfn Aug 13 22:27:30 sup homey Aug 13 22:27:32 I'm eatin' popeyes Aug 13 22:27:33 yum Aug 13 22:27:41 hehe Aug 13 22:27:57 im working on a way to take a HLS stream to RTSP Aug 13 22:28:16 major pain on android Aug 13 22:28:19 relatively easy on server side Aug 13 22:28:28 easier to license akamai Aug 13 22:28:28 i dont see the issue Aug 13 22:28:31 and use their hls player Aug 13 22:28:36 no can do Aug 13 22:29:04 the original content is video/mp2t so first i have to strip the ts off back into mpeg packets and then stream them Aug 13 22:29:04 also, 3.0+ supports hls, so if you can minSdk it Aug 13 22:29:09 i dont see the big deal Aug 13 22:29:15 nope Aug 13 22:29:30 i need 2.3 app to use a HLS stream Aug 13 22:29:45 that's too bad Aug 13 22:29:47 im just looking at the google source Aug 13 22:30:07 i believe it has mpeg-ts container support in gingerbread Aug 13 22:30:34 pfn: You mentioned "gradle merges manifests" could be my problem. What does that mean? Aug 13 22:30:38 https://android.googlesource.com/platform/frameworks/av/ < but i dont see tags for it Aug 13 22:30:55 yiati, library manifests can override primary manifests if you don't specify values Aug 13 22:31:05 pfn: https://android.googlesource.com/platform/frameworks/av/+/cda17c606b0fe3ccda4dc68a6d43882410ea2462 Aug 13 22:32:14 initial checkin was 3 years, 2 months Aug 13 22:32:17 ago Aug 13 22:32:28 sounds gingerbready sort of time Aug 13 22:32:30 2010 Aug 13 22:33:02 http://pastie.org/8234187 Aug 13 22:33:10 not even 4.0 Aug 13 22:33:51 oh, wait Aug 13 22:33:51 but since 3 years ago, 2 months we didnt even have v3 let alone v4.. i think they've just removed the tags Aug 13 22:33:54 tags don't even go back that far Aug 13 22:34:03 need to look at another repo Aug 13 22:34:07 iirc av moved from somewhere else Aug 13 22:34:33 well perhaps the best option since this is Apache licensed is to pull the latest source into a native lib Aug 13 22:36:47 probabnly Aug 13 22:38:09 im wondering if i even need to pull the streams out of the ts Aug 13 22:38:10 http://tools.ietf.org/html/draft-begen-avt-rtp-mpeg2ts-preamble-06 Aug 13 22:38:25 looks like i might be able to wrap the ts packets in rtp Aug 13 22:38:27 and job done Aug 13 22:39:18 http://www.envivio.com/files/white-papers/RTPvsTS-v4.pdf Aug 13 22:39:22 ooo, handy Aug 13 22:39:35 thats exactly what i want to do Aug 13 22:39:48 8 year old whitepapers are handy? Aug 13 22:39:54 yup Aug 13 22:44:00 yes, rtp wraps ts handily Aug 13 22:44:10 trivially, too Aug 13 22:44:20 the question is whether android will render mpegts Aug 13 22:44:28 it's not officially supported until 3.0 Aug 13 22:47:08 the only other way is to extract the raw video and audio streams from the ts packets.. pretty trivial and then recompose them in another container format that is supported Aug 13 22:54:53 if it isn't 10 lines of code, it isn't trivial Aug 13 22:55:04 I think you need to fix your definition of trivial ;-) Aug 13 22:55:23 not all ten lines of code are trivial Aug 13 22:55:33 what evanc said :) Aug 13 22:55:36 indeed Aug 13 22:55:45 * pfn packs a shitton of code into 10 lines... Aug 13 22:56:16 well, 1000 lines of code in some languages can be called trivial ;) Aug 13 22:56:33 * pfn squashes a memory leak Aug 13 22:56:34 yay Aug 13 22:56:43 but yeah, dealing with RTP is never trivial, easy or stress-free :P Aug 13 22:56:57 rtp itself is trivial Aug 13 22:57:11 it's just thinly wrapped raw-data Aug 13 22:57:59 right. Aug 13 22:58:05 like a simple crc and a packet order tag Aug 13 22:59:44 not even a crc, just a continuity/sequence counter Aug 13 23:24:11 <_flow_> Hi there. I want to "send" an InputStream from one service to another service with help of a ParcelFileDescriptor. But I get an IOException. More info here goo.gl/OdX9AX Aug 13 23:24:21 hey guys. can you use ddms to debug services? after a bit of debugging, the service's process just dies Aug 13 23:24:27 <_flow_> Are there any other ways to make an InputStream available to another process/service? Aug 13 23:24:47 <_flow_> I'd like to avoid any ContentProviders Aug 13 23:26:44 My app permits the user to take a picture using the native camera app. On the Samsung Galaxy S3 (and possibly others) when the camera activity starts the calling activity is destroyed (this having to do with rotating the display). Before I call the camera activity I construct a file and pass the file Uri to the intent via intent.putExtra. When the camera app returns the intent passed to onActivityResult is null. This then throws a NP Aug 13 23:26:44 E when I attempt to manipulate the photo file. Is there a way to call the activity such that the intent is preserved and the extra data for the intent is not lost? Aug 13 23:28:45 I've search and found a number of suggestions on stackoverflow in which the solution involved iterating through all photos searching for the latest added to the system then using this. This seems overly complicated and more of a hack as I would anticipate that the intent would preserve the extra data. Aug 13 23:41:18 _flow_, inputstreams cannot pass process boundaries Aug 13 23:41:51 <_flow_> pfn: I know, that's why my approach uses ParcelFileDescriptor.createPipe(), see the provided link Aug 13 23:42:57 pipes can't cross process boundaries Aug 13 23:44:13 <_flow_> pfn: but ParcelFileDescriptor can? Aug 13 23:44:27 <_flow_> I wonder why they put createPipe() in ParcelFileDescriptor at all then... Aug 13 23:45:07 <_flow_> but i was suspecting someting along these lines, but was haping that the kernel has some mechanism to allow that Aug 13 23:46:17 * pfn shrugs Aug 13 23:46:25 I haven't explored that at all Aug 13 23:46:53 <_flow_> so what makes you sure that pipes can't corss proces boundaries? Aug 13 23:47:15 they way they work Aug 13 23:47:27 _flow_ like you mentioned, content provider is required Aug 13 23:47:44 <_flow_> g00s: thanks, why? Aug 13 23:47:59 <_flow_> what makes a content provider different? does it run within the calling process? Aug 13 23:48:33 oh, shit, i'm getting rusty. well, CP is required if the file is in yor provate area Aug 13 23:48:45 *your private area Aug 13 23:48:50 _flow_: are the 2 services in the same process? Aug 13 23:48:59 <_flow_> JesusFreke: Aug 13 23:49:01 <_flow_> no Aug 13 23:49:14 ok. just making sure :) Aug 13 23:49:27 <_flow_> the one process receives an InputStream from somewhere that needs to get passed to a different service/process Aug 13 23:50:00 this is a common use case creating an attachment for gmail Aug 13 23:50:19 _flow_: the process doesn't receive an InputStream Aug 13 23:50:28 _flow_: it probably receives a file descriptor Aug 13 23:50:32 <_flow_> ? Aug 13 23:50:49 InputStream is a java specific thing, that only makes sense in the context of a single process Aug 13 23:51:01 <_flow_> there is no source file involved Aug 13 23:51:16 a file descriptor isn't necessarily attached to a file, despite its name : Aug 13 23:51:17 :) Aug 13 23:51:17 <_flow_> just file descriptors from pipes Aug 13 23:51:23 <_flow_> i know Aug 13 23:51:24 it can be a socket, etc. Aug 13 23:51:24 yea Aug 13 23:51:33 <_flow_> but I don't get what you want to tell me :) Aug 13 23:51:48 you're asking about passing an InputStream, which makes no sense Aug 13 23:51:53 you need to pass the file descriptor Aug 13 23:52:09 if both processes can get to it, you may also be able to use nio memory mapped files Aug 13 23:52:10 <_flow_> again, there is an input stream that needs to be made available to another sprocess Aug 13 23:52:20 you can't. Aug 13 23:52:48 <_flow_> JesusFreke: I am passing a file descriptor, see http://goo.gl/OdX9AX Aug 13 23:53:39 <_flow_> that's why I use ParcelFileDescriptor and createPipe Aug 13 23:54:21 because pipes can't cross process boundaries, and createPipe probably works differently from what you're expecting Aug 13 23:54:54 <_flow_> pfn: then I wonder how CommonsWare got the same conecpt working with a ContentProvider Aug 13 23:55:10 because it's a contentprovider, it works differently Aug 13 23:55:13 w/o using createPipe Aug 13 23:55:24 <_flow_> he is using createPipe Aug 13 23:55:28 <_flow_> https://github.com/commonsguy/cw-omnibus/blob/master/ContentProvider/Pipe/src/com/commonsware/android/cp/pipe/PipeProvider.java Aug 13 23:55:32 afaik in theory a file descriptor can be passed between processes in linux using some scheme which I'm not familiar with. This sort of thing occurs extremely rarely Aug 13 23:55:57 Binder does support sending file descriptors across processes Aug 13 23:56:00 File descriptor is primitive and can be easily passed Aug 13 23:56:05 (and services use binder) Aug 13 23:56:33 (in Linux) Aug 13 23:56:55 you pass it, but it doesn't open to anything on the receiving side Aug 13 23:57:00 <_flow_> JesusFreke: then what is ParcelFileDescriptor for? Aug 13 23:57:03 e.g. you pass fd 2 to another process, and it'll write to its own fd2 Aug 13 23:57:57 keep in mind content providers don't have to execute in a different process Aug 13 23:58:12 <_flow_> pfn: sure basically a fd is just an int. But I think you can pass fd via IPC in linux (and even POSIX) Aug 13 23:58:18 you can't Aug 13 23:58:20 _flow_: it's for exactly that - interacting with file descriptors that you receive from a binder Aug 13 23:58:28 fd 2 in your process is not fd 2 in the other process Aug 13 23:58:37 _flow_: you can't, typically. but binder has special sauce that allows this to work Aug 13 23:58:47 you can't just share an fd int and expect the receiving side to be able to use it Aug 13 23:58:57 pfn: you can via binder.. :p Aug 13 23:59:00 there's more magic that needs to happen Aug 13 23:59:08 JesusFreke, presumably it should just work in his case, then Aug 13 23:59:10 if the file descriptor is passed over unix domain socket, then it apparently happens Aug 13 23:59:20 receiving process needs to be given the correct permissions Aug 14 00:00:27 <_flow_> pfn: "you can't just share an fd int..." absolutly correct, but I never claimed that. I use ParcelFileDescriptor Aug 14 00:00:28 JesusFreke, since he's communicating over aidl/binder Aug 14 00:00:40 _flow_, parcelfiledescriptor is a thin wrapper around the fd Aug 14 00:00:56 pfn: right. he's taking the right approach, looking at his sample source. Aug 14 00:01:06 so... what's missing Aug 14 00:01:21 woo, att uverse is finally available in my area Aug 14 00:01:24 time to upgrade my internets Aug 14 00:01:35 do not look forward to the service outage that will accompany the upgrade, though Aug 14 00:01:44 <_flow_> dcow: I think the receiving process has the correct permissions Aug 14 00:01:58 fuckers Aug 14 00:02:06 their office is closed... already? lazy bums Aug 14 00:02:16 <_flow_> pfn: so it's thin wrapper? still there could be some magic happen within the kernel. And I think thats what it's for Aug 14 00:02:29 wouldn't be in the kernel, it'd be over a local socket Aug 14 00:03:04 <_flow_> the kernel is repsonsible for populating the fd table of a process, so he has to do the trick Aug 14 00:03:37 I doubt they'd hack the kernel to implement this Aug 14 00:03:40 so no Aug 14 00:03:47 yes, binder is a kernel module Aug 14 00:03:51 really? Aug 14 00:03:54 <_flow_> pfn: I think a vanilla kernel is already capable of doing so Aug 14 00:03:58 it's an IPC mechanism implemented by the kernel Aug 14 00:04:03 hmm, ok Aug 14 00:05:45 binder isn't in vanilla Aug 14 00:05:46 _flow_: like I said, I don't immediately see anything wrong with your sample code. I think you're on the right track, but I don't specifically know what's going wrong Aug 14 00:06:34 <_flow_> JesusFreke: thanks. if you find my q interesting the pls upvote. I guess I have to dig into the sources now :) Aug 14 00:06:37 binder basically got a fast-path through kernel Aug 14 00:08:10 _flow_, for shits and giggles, reverse [0] and [1] Aug 14 00:08:25 <_flow_> pfn maybe I really try that Aug 14 00:08:30 and really, did you extend Thread? Aug 14 00:08:31 quit that Aug 14 00:09:12 <_flow_> I stop doing it right now if you tell me why and what else I should do Aug 14 00:09:47 <_flow_> because as of now, I don't see a problem there Aug 14 00:10:44 pfn: meh, reversing fd 0 and fd 1 is, iirc, a pretty common trick (or rather, crossing them over to make a bidirectional pipe...) Aug 14 00:13:20 <_flow_> p_l: I don't think that you can create bidirectional pipes. 'man 3p pipe' says that the have only a read end and a write end Aug 14 00:13:48 _flow_: that's why I mentioned "cross over" :) Aug 14 00:14:04 dup() on fds 0 & 1, rebind them etc. Aug 14 00:14:18 that's how shells implement i/o redirection Aug 14 00:15:29 of course, if you reverse direction of 0, 1 and 2, expect software to spectacularly combust ;) Aug 14 00:15:47 it's already broken Aug 14 00:15:49 but a crossover, just like a crossover serial cable (null-modem) works Aug 14 00:16:02 anyway, try reversing, sometimes you just happen to have the wrong perspective on what's in/out Aug 14 00:16:16 _flow_, and extending any concrete class is always a bad idea when there are alternatives Aug 14 00:16:28 in the case of Thread, the correct approach is to use a Runnable Aug 14 00:18:06 Hi, in android studio there is a way to increase buffer, to prevent ".. more 22 lines" ecc Aug 14 00:18:08 ?! Aug 14 00:18:15 that's not buffering Aug 14 00:18:19 it's a nested stack trace Aug 14 00:18:46 e.g. stack-part-1, 22-lines-here, stack-part-2, n-lines here (22 more lines) Aug 14 00:18:51 guess where the 22 more comes from Aug 14 00:19:11 the 22 is not revelant? Aug 14 00:19:17 ... Aug 14 00:19:20 look closer Aug 14 00:19:21 *are Aug 14 00:19:35 m8: you have 2 exceptions. the outer one, and the inner one. And you have a stack track from both Aug 14 00:19:43 good Aug 14 00:20:08 the "22 more lines" replaces those entries in the inner exception that are identical to the outer exception Aug 14 00:21:17 so you're not missing those entries, because they are identical to the other stack trace Aug 14 00:22:00 it just doesn't print them so you don't get insanely long stack traces with tons of repeated entries, if you have multiply nested exceptions Aug 14 00:22:10 mm Aug 14 00:22:57 the same exception repeated two times? Aug 14 00:23:04 Hi everyone :), Aug 14 00:23:23 not the same exception Aug 14 00:23:26 one exception nested in another Aug 14 00:23:42 e.g. throw new Exception(..., nestedException) Aug 14 00:24:09 ok Aug 14 00:24:18 I am new to android world :) , i want to start build applications for it using Microsoft Visual Studio (any language) , how can i do that ? , any help is ver appreciated :) Aug 14 00:24:32 pfn, but the trace is the same Aug 14 00:24:39 the trace isn't the same Aug 14 00:24:40 if i've understand Aug 14 00:24:46 the new Exception occurs a few frames later Aug 14 00:24:56 and nestedException would repeat those frames Aug 14 00:25:26 think of it as a timeline, nestedException tells you there's stuff 100-50, and there's 50 more, the new Exception contains 50-0 Aug 14 00:26:42 the 50 is the same Aug 14 00:27:13 pfn, excuse me it's too late for this :) Aug 14 00:27:59 thanks Aug 14 00:31:52 pfn just noticed Manning has a forthcoming 'SBT in Action' . i thought maybe you were writing it :P Aug 14 00:32:27 nope Aug 14 00:32:35 bye Aug 14 00:35:16 _flow_: you might take a look at frameworks/base/core/java/com/android/internal/os/TransferPipe.java Aug 14 00:35:26 it looks pretty similar, except it goes in the opposite direction Aug 14 00:35:31 <_flow_> JesusFreke: I already found that one a few hours ago Aug 14 00:35:40 the receiver sends a pipe to the sender, and then the sender sends the data through that pipe Aug 14 00:35:49 so the opposite process creates the pipes in that case Aug 14 00:35:59 not sure if that matters or not :) Aug 14 00:36:25 You wouldn't think so, but *shrug* Aug 14 00:36:31 <_flow_> Androids docu isn't quite clear on that Aug 14 00:37:35 _flow_ have you looked at com.android.internal.util.AsyncChannel as a similar but different thing ? Aug 14 00:37:36 not at all Aug 14 00:37:50 <_flow_> I think I have read somewhere that PFD go (only?) as "result" Aug 14 00:41:28 I am learning about Binder IPC and I am wondering ... are the 'services' in this context different than the Services I can setup - the ones with onCreate, etc. Aug 14 00:41:35 hey guys, so i am trying to build the libcore subsystem for android without having build the entire tree. is this possible? Aug 14 00:41:40 carbohydrate, no different Aug 14 00:41:55 s/build/built*/ Aug 14 00:41:56 carbohydrate: no, but they often overlap :) Aug 14 00:42:00 OK that is what it looks like - do Services use Binder behind the scenes? Aug 14 00:42:28 carbohydrate, they implicitly do, in their design Aug 14 00:42:50 carbohydrate: yes, they can, but don't necessarily do so Aug 14 00:43:10 OK, so when I do something like startService - is it querying the Context Manager - or is that only for AIDL-style services Aug 14 00:43:16 for example, when you use bindService from another process, the calling process gets an IBinder object Aug 14 00:43:30 all calls on that IBinder object go through Binder Aug 14 00:43:31 So only when I use bindService Aug 14 00:43:49 The services I have written so far only have mostly empty stubs for onBind Aug 14 00:44:12 right - that's fine for when you don't need to access the services from another process Aug 14 00:44:23 access the service* Aug 14 00:44:53 I see. That makes sense since so far I've only been using my service for updating the appwidget for my app only. So all in the same package. Aug 14 00:45:04 during the last i/o fireside , someone asked DH something like "when are binders going to work" … anyone know what that was referring to ? i never really heard many issues with them Aug 14 00:45:28 The only example I have for the Binder-style-AIDL is the in-app billing code so I'm trying to use that as a basis to understand it Aug 14 00:45:37 g00s: especially given they are used all over the place in the system Aug 14 00:45:50 carbohydrate: http://developer.android.com/guide/components/aidl.html Aug 14 00:45:56 yeah O.o Aug 14 00:46:14 thanks Aug 14 00:55:53 My launcher activity has some logic which controls which activity is loaded when the app launches. I need to add a new simple activity which will display a logo (for branding purposes) and when done the activity needs to return to the calling activity. I've worked out how to start the new activity but i'm unclear how to return to the previous activity so the additional logic can persist. Question: is that even possible or will I hav Aug 14 00:55:54 e to change my logical flow to load the branding activity which in turn would load the launcher activity? Aug 14 00:57:45 zanberdo: finish()? Aug 14 00:57:55 carbohydrate, just now read that! d'oh Aug 14 00:57:55 thanks Aug 14 00:59:31 <_flow_> JesusFreke: omg, it now works if I move the PFD from the arguments to the return value! :-D Aug 14 01:00:09 <_flow_> can't believe it. going to run some tests and then maybe answer my own question on SO Aug 14 01:02:58 _flow_: ah, nice. So you have the opposite process creating it? Aug 14 01:03:02 Yeah, I guess it would have to :) Aug 14 01:03:09 <_flow_> yep Aug 14 01:03:41 life cycle question: when starting the camera activity with startActivityForResult passing an intent how can one ensure that when the activity returns the intent won't be null? Aug 14 01:03:45 That's slightly unexpected, but I'm glad it works :) Aug 14 01:18:23 I have three native libraries that I have built into three separate libXXX.a static libraries using ndk-build. Now I want to bundle these three static libraries into a single shared library, how can this be done with ndk-build (and Android.mk)??? Aug 14 01:18:54 I don't know how to specify the static libraries to link? Aug 14 01:19:04 use ar and re-bundle the library Aug 14 01:19:10 oh, as a shared lib Aug 14 01:19:15 use gcc -Wl,shared... blahblah Aug 14 01:20:00 Are you saying I should avoid using ndk-build and just call on the tool chain binaries? Aug 14 01:22:36 dunno, I imagine you'd just set an appropriate target in Android.mk Aug 14 01:22:40 like any other makefile... Aug 14 01:22:49 JakeWharton and/or anyone who knows about OkHttp: if it encounters a server code >= 400, does it just keep retrying forever? Aug 14 01:25:44 pfn: that's what I want to do, but I can't seem to locate how to specify the static libs to link... Aug 14 01:26:15 RyanM: it doesn't retry at all Aug 14 01:26:26 larku, can't you just specify your own target and rule? Aug 14 01:26:39 my-final-so-target:\n $(LD) ... Aug 14 01:27:01 * pfn knows nothing of ndk-build really Aug 14 01:27:06 but presumably it's just a makefile... Aug 14 01:27:35 it is just a makefile but doesn't seem to share much with gnu make... Aug 14 01:27:44 it's all gnu make, but there's a shitton of macros Aug 14 01:27:59 oh ... (show's ignorance) Aug 14 01:28:09 hmmm... Aug 14 01:30:05 Hey guys I'm trying to open adb but it opens and closes on its own straight after Aug 14 01:32:26 you don't open adb, you run it from the command line Aug 14 01:33:22 one does not simply open adb Aug 14 01:34:35 oh Aug 14 01:34:40 when there is a service ending in Impl, is that implying that the service that doesn't end in impl is just there as a stub? Aug 14 01:34:56 How silly of me to forget Aug 14 01:35:13 thanks RyanM Aug 14 01:35:39 carbohydrate: in that case, I would expect the non Impl class to be either an abstract class, or an interface. Aug 14 01:36:10 OK, I'm reading through AOSP and there are lots of Impls Aug 14 01:36:30 Why not put the Impl stuff into the abstract class? Aug 14 01:36:50 (i know that would make it no longer abstract - maybe better worded is - why have the abstract class) Aug 14 01:38:16 larku: it does use gnu make. It's just that the NDK (and the Android platform in general) has a whole system built on top of gnu make. So it works a bit differently Aug 14 01:38:41 carbohydrate: in case of services, you typically have an interface class that is automatically generated from the .aidl file Aug 14 01:39:01 since it's generated code, you can't really put the implementation in there - it would just be overwritten when the code was re-generated. Aug 14 01:39:19 So is there an IInAppBillingServiceImpl somewhere probably? Aug 14 01:39:37 and that is what actually responds to my requests Aug 14 01:40:11 Not necessarily. There's nothing that forces you to use that naming convention Aug 14 01:40:39 okay but there would have to be something behind the scenes to do the heavy lifting - i'm guessing that is part of the play store or play services Aug 14 01:40:40 It's just one possible naming convention Aug 14 01:40:59 I'm not that familiar with the in app billing stuff in particular Aug 14 01:41:00 so that's why i can't find code for it Aug 14 01:41:19 Thanks JesusFreke and pfn, I've got a make file that looks like: http://www.hastebin.com/punabijawi.coffee but my shared library is always empty (well 5088 bytes - always) Any ideas what I'm missing? Aug 14 01:43:04 larku: well, you can use "make showcommands", to get it to print out the actual commands its running Aug 14 01:43:38 i wonder if any of the internal apps like gmail are using gradle yet Aug 14 01:44:12 I would say undoubtedly Aug 14 01:44:16 or even android studio ;) Aug 14 01:44:24 I would guess no on android-studio Aug 14 01:44:26 I wonder if there would be some way to inspect the apk to see Aug 14 01:45:19 the onest hat would use android-studio, I'd imagine are just using intellij with the plugins on top of it Aug 14 01:46:04 since google is such a big java shop, there's really little reason for most people to use android studio... unless their job is just android Aug 14 01:47:25 i heard all the android studio specific stuff is going to make its way back into intellij anyway Aug 14 01:47:35 correct Aug 14 01:47:45 android studio is a slimmed down intellij for android-development-only Aug 14 01:47:49 that's all it is Aug 14 01:48:55 larku, I don't plan on figuring out ndk until I actually have a personal need for it, sorry Aug 14 01:49:23 JesusFreke, how can I run "make showcommands' ndk build is invoked using Aug 14 01:49:30 ndk-build that doesn't Aug 14 01:49:35 support such an option. Aug 14 01:49:53 no probs pfn, thanks for you input regardless :) Aug 14 01:54:43 JesusFreke: ndk-build does support '-n' which prints commands instead of running them - this shows very little going on for that makefile... I'm about to go out for an hour or so... Aug 14 01:55:43 lets ask canadiancow . you cow, you guys use gradle on gmail ? Aug 14 01:55:48 *yo Aug 14 01:56:38 out to pasture :( Aug 14 01:56:55 task graze { nom nom } Aug 14 01:59:30 hey, i have a really weird issue. i have an activity with 2 tabs, and when i select the 2nd tab, change the orientation, go back to the 1st tab, and change orientation again, it will display the contents of the 2nd tab underneath the 1st one Aug 14 01:59:49 i have no idea what the hell could be causing this Aug 14 02:01:07 it calls onCreateView() in the 2nd tab's fragment even though the fragment has been detached Aug 14 02:03:11 Hi everyone, how to resolve "dexopt failed" error ? I have my code compiled successfully, but I encounter this problem when installing. Any hints ? Thanks a lot. Aug 14 02:08:50 delete classes.dex, try again Aug 14 02:12:56 dex sometimes fails in incremental mode Aug 14 02:12:58 it's quite infuriating Aug 14 02:14:49 pfn: After "ant clean emma debug install" , I got a same results unfortunately. Aug 14 02:15:04 take out emma? Aug 14 02:15:24 also, $ANDROID_HOME/build-tools/18.0.0/dexdump bin/classes.dex Aug 14 02:15:44 I kept getting dexopt failing because my classes.dex was malformed Aug 14 02:15:49 in your case, it might be something else Aug 14 02:15:59 pfn: Taking out of emma works well. Aug 14 02:16:05 logcat -s dalvikvm and pastebin Aug 14 02:16:12 does anyone actually use emma? Aug 14 02:16:17 the new gradle builds don't even support it... Aug 14 02:17:13 pfn try 18.0.1 ? Aug 14 02:17:23 I suppose I should update Aug 14 02:18:13 ugh, there's a builder 0.5.6 already? Aug 14 02:18:44 * pfn checks it out Aug 14 02:19:02 pfn: http://pastebin.com/xsMF60pU Aug 14 02:19:39 dexdump output? Aug 14 02:19:42 pfn: dexdump outputs the same error as "E/dalvikvm( 6305)" tag Aug 14 02:19:46 yeah Aug 14 02:19:49 bad dex Aug 14 02:19:53 just don't emma then Aug 14 02:19:55 since you say that works Aug 14 02:20:29 like I said, does anyone actually use it? Aug 14 02:21:14 pfn: Yes, I use it for code coverage calculating while doing unit test. Aug 14 02:21:20 bummer for you Aug 14 02:21:52 new gradle builds don't even support it, heh Aug 14 02:24:44 pfn: Since I get my code compiled, there may be something wrong while translating jar to dex ? Aug 14 02:24:53 there's a problem with emma Aug 14 02:24:57 since you said it works without Aug 14 02:25:04 update your sdk, I suppose and try again Aug 14 02:25:50 * pfn twiddles thumbs while tools repo syncs Aug 14 02:26:28 pfn: BTW, "diasble merge" doesn't work for I reach the 65535 limit; so does"dex.force.jumbo=false". Aug 14 02:26:36 damnit, they don't tag the tools repo Aug 14 02:26:44 huh? Aug 14 02:26:47 rephrase please Aug 14 02:27:21 0.5.6 Aug 14 02:27:21 - Enable support for 1.7 Aug 14 02:27:23 oh, nothing important Aug 14 02:27:38 thats builder; 18.0.1 came before that Aug 14 02:27:45 & gradle Aug 14 02:27:49 ? Aug 14 02:27:58 0.5.5 fixed an issue with 18.0.1 Aug 14 02:28:23 pfn: If I try to change property like "dex.disable.merger" or "dex.force.jumbo", they don't work too. Aug 14 02:28:25 no need for me to release a new plugin version since 0.5.6 is unimportant Aug 14 02:28:35 fish47, simple answer, don't exceed 65k method limit Aug 14 02:29:28 * g00s wonders what google has in store for 65k fix Aug 14 02:29:42 that's those magic options fish47 is using Aug 14 02:29:55 and as far as I understood, 64k limit went away in ics+ Aug 14 02:30:03 i thought dvm also has that limit Aug 14 02:30:09 ics+ Aug 14 02:30:10 so its dex and dvm Aug 14 02:30:17 hmm Aug 14 02:31:13 There's a new flag to force "jumbo mode" for dex which allows a larger number of strings in the dex files; set dex.force.jumbo=true in project.properties Aug 14 02:31:15 interesting Aug 14 02:31:45 pfn: I have already set it in my project.properties Aug 14 02:32:17 sounds like they aren't getting picked up Aug 14 02:32:26 pfn: Maybe there's a solution to multiple dex ? Or loading classes dynamically ? Aug 14 02:32:53 * pfn shrugs Aug 14 02:32:55 my solution is proguard Aug 14 02:33:18 why don't previous build-tools versions get uninstalled Aug 14 02:33:25 that's kind of annoying to keep them around Aug 14 02:34:04 fish47, yes, you can load classes/dex dynamically Aug 14 02:34:07 but that's so ugly... Aug 14 02:34:13 and iirc, facebook is a big app that does that Aug 14 02:34:16 * pfn has no idea why.... Aug 14 02:38:19 pfn: I think it's worth to try proguard. Aug 14 02:39:40 pfn: Thanks for you help. Aug 14 02:42:30 ugh, published my plugin in the wrong version number Aug 14 02:42:31 stupid thing Aug 14 02:42:48 * pfn re-publishes Aug 14 02:47:12 'how to grow beef in a lab' , man this is scary = especially the exercise part Aug 14 02:47:50 * g00s wonders if some day people will grow beef in their apartments along with tomatoes **** ENDING LOGGING AT Wed Aug 14 02:59:59 2013