**** BEGIN LOGGING AT Wed Apr 30 02:59:59 2014 Apr 30 03:08:04 If I;m trying to build neat class structure, and somewhere inside a method needs application context to be invoked, it is a normal practice to pass a "Context context" argument all the way down to it, right? Apr 30 03:12:43 creitve, you can add them to build config if you're using gradle Apr 30 03:15:35 leslie: I have build.gradle, gradle,properties, local.properties, settings.gradle Apr 30 03:17:26 if you expect to use different settings for different configurations (think debug/release), set it in build.gradle, otherwise just make a static class Apr 30 03:21:03 leslie: thanks! Apr 30 03:26:34 leslie, I never done anything beyond adding dependencies inside build.gradle. Is there anything more I can explore, like what you have describe to put Activity context or API URL in it? Apr 30 03:26:53 one sec, piracyd3 Apr 30 03:26:59 sure Apr 30 03:29:03 Hey #android-dev Apr 30 03:29:23 hey xWolfz Apr 30 03:29:25 I have a samsung galaxy s4, with the Android OS, not sure what version #. Apr 30 03:29:42 Where is there info on the OS, and how to develop app's and whatnot Apr 30 03:29:48 S4 is Jelly Bean bundled, if im not mistaken Apr 30 03:30:01 I find that there isn't much info when it comes to the Android OS, etc. Apr 30 03:30:03 piracyd3, you can setup proguard, for one thing Apr 30 03:30:18 piracyd3, I think it's upgraded to Kit Kat Apr 30 03:30:31 If Kit Kat is an actual version # name that's > Jelly Bean. Apr 30 03:30:53 leslie, okay I'll take a look at it Apr 30 03:31:36 xWolfz, d.android.com Apr 30 03:31:52 pfn, I love you, thanks Apr 30 03:32:41 someone is easily pleased :) Apr 30 03:32:42 awww young love Apr 30 03:33:29 lol :3 Apr 30 03:34:24 Leeds: do you code for HK companies or non-country specific ? Apr 30 03:35:26 bankai_au: mostly local at the moment... Apr 30 03:35:52 do you do anything that you'd consider 'country specific' ? Apr 30 03:36:12 sure Apr 30 03:36:28 not sure how to elaborate on that .... ummm ... i guess do you make UI considerations for HK stuff that you wouldn't do for something you'd target for western society Apr 30 03:36:46 i know .jp is very 'cute' and the 'cuter' you can make it the more appealing Apr 30 03:37:03 ah... well, not so much that, no Apr 30 03:37:37 Why is when I apply clipRect to a Canvas, the result is that antialiasing is not preserved ? Apr 30 03:42:05 Does anyone know of a nicer way to build a sectionable GridView with headers other than using library projects such as https://github.com/TonicArtos/StickyGridHeaders Apr 30 03:42:41 i.e. A nice standard library approach that wouldn't end up becoming that StickyGridHeaders library project Apr 30 03:46:24 Hi there. Quick question. I am trying to implement a videoView that streams from a http source. I am trying to see if there is a way to cache the video, so that i can play it from my local storage even when I am offline Apr 30 03:46:54 I already have a working videoView which would stream from the source. Apr 30 03:49:37 Ram_: while I'm not familiar with videoview, i assume it takes an outputstream. I'd expect you could feed it from a http connection or from a local file? Apr 30 03:50:31 well the way it works is, videoview.setVideoURI(uriLink); Apr 30 03:50:31 then videoView.start() Apr 30 03:50:47 if it accepts any uri you should be able to make a uri to a local file Apr 30 03:50:53 i'd expect? Apr 30 03:50:58 I'm vaguely guessing here, mind you Apr 30 03:51:09 but I dont want to wait untilit downloads, Apr 30 03:51:18 as its playng , it has to store the stream somewhere, Apr 30 03:51:26 I just want to be able to access that stored location. Apr 30 03:52:21 you'd have to write your own http fetcher and write it to a file and send it to the videoview then. I'd expect them to have a steam method too. Apr 30 03:54:03 I have troubles generating "blank fragment", using android studio wizard. It creates the layout, but it doesn't create the fragment itself. It does work with list and +1 fragments type. Is this a known bug? Apr 30 03:54:30 How buggy is it in general. I see it is in a preview state, but I thought it is widely used already. Apr 30 03:54:35 *? Apr 30 03:56:56 dragorn, that jus loses the advantage, Apr 30 03:57:20 waiting for an entire video to download before playing is not the approach i m looking for Apr 30 03:57:35 people lose their patience :-) Apr 30 03:57:39 Hi, I had a method called setListAdapter which takes a List<> as parameter, inside an Activity class, also I have another class that extends AsyncTask which I call inside a method in the Activity class. Apr 30 03:58:01 Ram_: if you start downloading and then check size to see if it has enough to play, can't you just play it as it's downloading ? Apr 30 03:58:16 I haven't tried it myself so I'm asking Apr 30 03:58:37 I believe thats not the correct approach. Is it ? Apr 30 03:58:52 can you play a file while its downloading half the way ? Apr 30 03:58:55 should be, it's simple Apr 30 03:58:57 players dont like it really Apr 30 03:59:02 In the onPostExecute method of the AsyncTask class I called the setListAdapter method like this: ((myActivity) this.context).setListAdapter(myList); where this.context is a Context variable Apr 30 03:59:10 I can on my windows box Apr 30 03:59:21 the only option if you're going to cache it is to download it to disk and play it from disk. It's up to you to be clever enough to figure out how to play a partial file or split the stream from the httpclient Apr 30 03:59:24 haven't tried it on android, but I will Apr 30 03:59:38 now I would like to know how I can convert that code for a class that extends Fragment Apr 30 04:00:27 well i was hoping there exists an easy way to deal with this mess. Apr 30 04:00:30 I can open a file with VLC that is downloading on my windows Apr 30 04:01:07 shmooz, if there exist a solution, it doesnt make sense to implement it. A while ago, I rmember there was a class related to media player which lets one set the cachedirectory Apr 30 04:01:25 I dont konw what it is, and i was hoping someone might be able to point em to the correct direction Apr 30 04:02:02 I am not convinced that i actually have to do the heavy lifting, esp when the videoView would in fact download adn store the buffer video "somewhere" Apr 30 04:10:23 video-streaming is such a PITA on android Apr 30 04:13:01 hello all Apr 30 04:42:28 what do you guys think of this http://phandroid.com/2014/04/29/android-silver-rumor/ Apr 30 04:43:03 have to wait for the details, but "OEMs who offer Android Silver handsets will commit to timely updates." <-- hasn't quite worked out in the past Apr 30 04:55:21 g00s: I'll wait for the gold thank you Apr 30 04:55:34 no way, platinum :| Apr 30 04:59:42 palladium ftw Apr 30 04:59:58 It'll weight 4 pounds Apr 30 05:01:42 capella i hope this doesn't come to pass, a nexus device is about all i can tolerate Apr 30 05:03:40 they got too many brainstormers , I wish they'd stop trashing stuff they came up with Apr 30 05:06:52 interesting Apr 30 05:29:33 hello — i'm trying to automate installation of the android sdk in a docker container. when i try to install the platform tools, i'm getting: "Failed to rename directory /opt/android-sdk/default/tools to /opt/android-sdk/default/temp/ToolPackage.old01. Apr 30 05:29:33 Failed to create directory /opt/android-sdk/default/tools" Apr 30 05:29:44 the tools directory is then empty Apr 30 05:31:19 also, the install seems to be doing something very odd. i get odd permissions-related issues being unable to access tools/ant/ when running from non-root accounts. however just moving the sdk directory seems to resolve the issue for some reason. Apr 30 05:54:08 interesting, Facebook switching to Hg? Apr 30 05:56:20 hello dev, can i use arabic fonts on device 1.6 android os, i have try to call dejavu fonts on asset folder and it's work but not well cause broken view word by word Apr 30 06:01:37 Mercurial 3.0 just released :) Apr 30 06:01:48 yeah Apr 30 06:02:34 i decided to go with git a while ago; i may regret that decision some day. i certainly don't like it much. it was just where the inertia was Apr 30 06:04:13 * capella wish there was an hg qpush --moveup fooPatch Apr 30 06:04:43 but meh ... minor annoyance Apr 30 06:06:58 capella does ff29 have that new GC ? Apr 30 06:07:39 whats Nilium been up to these days ? Apr 30 06:07:57 Not familiar ... seen the nick though Apr 30 06:08:12 Getting my tooth crowned and applying for jobs. Apr 30 06:08:23 Which reminds me, the Yahoo recruiter person who contacted me has decided to not respond to my response to his email. Apr 30 06:08:27 Which is frustrating. Apr 30 06:09:07 uh, recruiters :/ Apr 30 06:09:21 another kind of parasite Apr 30 06:09:28 I wish they'd read the resume before they contact me the first time Apr 30 06:09:41 Or know anything at all about IT Apr 30 06:10:11 the best is when they email/call and say "hey, we've looked at your resume and it looks reall good, can we talk"... Apr 30 06:10:19 and then you call them and they are like, who the fuck are you ? Apr 30 06:10:26 I sort of assume Yahoo's "technical acquisitions" people aren't as stupid because it's a company big enough to pay for a good recruiter but who knows Apr 30 06:10:45 Yahoo seems like a cutthroat work environment Apr 30 06:10:52 i'd pass that one over myself Apr 30 06:10:55 hi, I work at Yahoo Apr 30 06:10:59 waaaaabz Apr 30 06:11:01 What I do know is that he sent an email to a friend of mine with more or less the same content (each one's slightly different to mention what the person he's sending it to did) Apr 30 06:11:35 Job's a job, pay me and I'll slit throats if you want me to. Apr 30 06:11:39 I don't work in sunnyvale, but I wouldn't say it's cutthroat Apr 30 06:11:45 Hi all, new to the channel. I'm wondering if I can get some advice.. I've built an image loader for async bitmap loading & caching, and for some reason my disk cache is becoming corrupt. So I'm hoping to implement a third party libary, such as Ion, Volley or Picasso. The thing is, Most image loading libraries are based on the premise that you already know the url of your image when you make a request. Apr 30 06:12:08 hey Nilium did you get my prvmsgs? Apr 30 06:12:10 As long as it's not Microsoft's disturbing culture of screwing everyone else Apr 30 06:12:10 how would you not know the URL? Apr 30 06:12:10 Internally, that is. Apr 30 06:12:13 In my particular implementation,I need to query a server, parse the json to get the image url, and then load that image Apr 30 06:12:14 wabz were you there before Marissa showed up ? Apr 30 06:12:24 yeah I've been at yahoo for 7 years now :p Apr 30 06:12:26 tmalseed: those are two separate requests Apr 30 06:12:37 my stock options are finally worth something again!! Apr 30 06:12:38 the latter of which will work with any of the listed libraries Apr 30 06:12:48 JakeWharton: yes - and ah, well met :) Apr 30 06:13:37 Nilium well good luck, hope it works out Apr 30 06:14:17 wabz i don't know, i read that article the other day about yahoo being worth negative money :) Apr 30 06:14:26 hi anyone can help me? i want to use arabic fonts on 1.6 android os ? maybe you have a solutions Apr 30 06:14:33 lol Apr 30 06:14:34 The thing is, I've got a listview, and as entries are populated, the process begins: 1) Make a request to obtain the url. 2) parse the response 3), request for the image 4) cache image & display in listView. I'm basically using the Bitmaps are Fun implementation Apr 30 06:14:48 i still have no idea wth yahoo does, beside email ;) you guys need that prophet from AOL Apr 30 06:14:49 JakeWharton: Come to think of it, I believe I'm using your cache! Apr 30 06:15:47 I think our android flickr app is ok Apr 30 06:15:50 JakeWharton: Scratch that, I'm using the DiskLruCache from the JB source - but I did try your implementation of the cache just in case - and I'm still getting this problem. Apr 30 06:16:06 we have a long way to go with android -> ios parity Apr 30 06:16:09 they're the same thing Apr 30 06:16:19 jbq is helping to move things along :p Apr 30 06:16:34 Yeah, pretty much Apr 30 06:17:03 But.. err I did not expect to bump into you here. Now that I've got you, maybe you have an idea of what could be going wrong. Apr 30 06:17:19 I'm not sure how familiar you are with the bitmap fun example, but I've just extended that. Apr 30 06:17:29 never heard of it Apr 30 06:18:11 Hm, I should probably sleep. Apr 30 06:18:16 Oh, damn - it's somewhere in the docs, Google's example of how to efficiently load and cache bitmaps, using both a memory lru cache and disk lru cache Apr 30 06:18:37 I wrote something that does that. It's called Picasso. Apr 30 06:18:44 Getting my tooth crowned meant I couldn't sleep last night because of dentist-fear, so now I'm well beyond exhausted. Apr 30 06:19:17 Insert Jake's smuggest possible grin here. Apr 30 06:19:20 Yes, I'm well aware of picasso - although I'm reluctant to use it, because I'm not sure how to efficiently tie it in with my code.. As you say, I'm performing 2 separate requests Apr 30 06:19:48 g00s: you should use this too http://getaviate.com/ Apr 30 06:20:19 The thing is, the request is fired from the getView() method in my adapter - and I'm reluctant to asynchronously request for a url, and then asynchronously request for an image after that url returns Apr 30 06:20:35 wabz looks nice :) but i dont have a phone, i think it makes me stupid Apr 30 06:20:54 It... feels dirty. Making chained async request calls for an imageView which may no longer be relevant by the time one or both requests return Apr 30 06:20:55 tmalseed: unless you pre-load everything, you have no choice Apr 30 06:21:13 heh Apr 30 06:21:26 wabz i have a n7 though ;) Apr 30 06:21:53 Understood - but then.. Do you think it seems reasonable to say, use a Volley JsonObjectRequest, and in the onResponse() method, use Picasso to then handle the image loading ? Apr 30 06:22:08 sure Apr 30 06:22:32 I guess what I'm worried about, is Picasso, by default will make 3 attempts to retrieve the image, correct? Apr 30 06:22:57 it will make three attempts if the network is flaky Apr 30 06:23:05 Bear in mind I am way out of my league here ;) Apr 30 06:23:24 a non-200 response, exception, etc. won't trigger a retry Apr 30 06:23:46 Yep, I understand Apr 30 06:24:15 It's hard to explain what my concern is here - I guess I find it hard to test how efficient these things are, and it just seemed wrong to fire Picasso from a Volley response Apr 30 06:25:01 I understand the concern but you either have to pre-load the image URLs before showing the list or do subsequent http requests Apr 30 06:25:23 Mostly because - the JsonObjectRequerst is made for a particular item, so when that item is moved to the scrapheap, I need to cancel the volley request.. But then also cancel any associated in-flight picasso request Apr 30 06:25:34 Which is quite possibly beyond me Apr 30 06:25:53 requestQueue.cancel(convertView); picasso.cancel(convertView); Apr 30 06:26:23 OK haha, not so difficult. Apr 30 06:26:45 Mind you, having the approach OK'd by Mr. Picasso himself is enough to give me the confidence to proceed with this method Apr 30 06:28:05 wabz "Yahoo To Produce Sci-Fi Streaming Sitcom" i guess Yahoo finally figured out what it wants to do :) Apr 30 06:28:26 I think we got more pageviews than google over the last few months Apr 30 06:28:28 (compete with netflix, amazon? ) Apr 30 06:28:31 g00s: yahoo has wanted to be a media company for a long time Apr 30 06:28:31 excluding tumblr Apr 30 06:28:37 JakeWharton: Well, I'll move on to that shortly - but since you're familiar with the DiskLruCache (and I'm merely using it, I don't understand it's inner workings very well at all), I'll describe the reason I'm looking for an alternative to what I've got: Apr 30 06:28:44 it depended on the CEO Leeds :p Apr 30 06:29:02 we lost a lot of eng. talent when carol bartz declared we were a sales company Apr 30 06:29:09 wabz: the current CEO isn't exactly a media insider... hasn't changed the goal Apr 30 06:29:38 but I guess you know better than I do :) Apr 30 06:29:42 If I switch off wifi & mobile data, so the app won't download any further images to populate the listview - and I open the app, I see all of my images there as expected; They're sitting in the diskLruCache, and they're loaded into the LRU memory cache as well. Apr 30 06:30:03 I find Yahoo confusing from the outside, but they make nice looking apps. Apr 30 06:30:09 But if I open and close the app, maybe 1 in 10 times, the cache is completely cleared, and from that point on the images are lost until I re-download them. Apr 30 06:30:45 The only reason I'm sitting here opening and closing the app, is I'm trying to reproduce the issue my users are having - after some time, downloaded images don't stick around and they need to be re-downloaded Apr 30 06:31:05 I can't catch any log calls pointing to the journal becoming corrupt, but I have absolutely no other leads. Apr 30 06:35:48 My dad uses Yahoo for his news / home page Apr 30 06:36:09 Do you have any suggestions as to how I might isolate the issue - or test why/how the disk cache is becoming corrupt? Apr 30 06:36:09 Hey guys, what is the best, safe way to store user credentials? Apr 30 06:47:00 not storing them Apr 30 06:47:40 I thought about saying that, but nobody takes that answer seriously. Apr 30 06:50:20 crap, I wrote it down :( Apr 30 06:53:01 this is cool http://www.gizmag.com/scio-pocket-molecular-sensor/31840/ Apr 30 06:54:45 nice :) Apr 30 06:56:07 and then the pop-up Apr 30 06:56:29 Neat. What happens if you use it on eyeballs? Apr 30 06:56:48 Nilium let us know, for science ! Apr 30 06:58:10 Ok, buy me one Apr 30 06:58:39 maybe safer to do your tooth first Apr 30 06:58:40 I want it for my foods Apr 30 06:58:53 My tooth is now half a tooth Apr 30 06:59:16 It's 50% not tooth Apr 30 06:59:49 'not tooth' … we must find out what the not tooth part is made of Apr 30 06:59:50 I was hoping for a metal crown so I could claim I was part robot but it's not. Apr 30 07:01:34 Porcelain, mainly. Apr 30 07:02:43 well, it just temporary. i'm sure on day google will come out with a wearable tooth running android Apr 30 07:04:21 No, the porcelain is very much permanent Apr 30 07:04:39 Nilium what if they filed it down to be fang-like Apr 30 07:05:07 than you could be werewolf robot Apr 30 07:05:10 Then it wouldn't have a very good base for the crown. Apr 30 07:05:18 gah Apr 30 07:07:12 I'm also disappointed the crown has a normal tooth color Apr 30 07:07:20 I wanted a neater color than off-white. Apr 30 07:07:46 Like pink or something. Apr 30 07:07:46 It'd be neat to have a pink tooth that nobody could see. Apr 30 07:08:18 The weird part is just adjusting to the fact that there's a thing in my mouth and it's taking up space where a tooth would be but it has no sensation on its own Apr 30 07:09:22 I think I might rewrite my VM in C rather than using C++ Apr 30 07:09:38 Nilium try rust yet ? Apr 30 07:09:50 how did the Go experiment go? Apr 30 07:10:18 i get the impression you're sampling a bunch of techs Apr 30 07:10:41 Tried Rust a while back but Go and Rust both don't play too nice with existing UI frameworks or OpenGL Apr 30 07:11:36 Side-effect of them both having their own sort of coroutine things and both hijack thread 0 and can't guarantee code will run on it Apr 30 07:12:15 So they're good if you don't need UI or anything, but if you're going to be interacting with a windowing system or trying to get events from the OS and the OS demands that this be done on a specific thread, you might be in trouble Apr 30 07:12:32 hmm, interesting Apr 30 07:13:13 Basically, Go's good for writing tools and server stuff, you shouldn't bother with anything graphical Apr 30 07:13:26 I don't have as much of an idea of where Rust is these days since I don't feel like there's much of a reason to try it righ tnow. Apr 30 07:13:48 *right now Apr 30 07:14:20 when i heard about MS M# it sounded like a system-level programming language too; i wonder if it works fine with GUI things Apr 30 07:14:26 Go was the only thing I was trying out recently. Beyond that, I've stuck to my usual choice of C++11, Objective-C (OS X/iOS specific bits), and Scala (for Android). Apr 30 07:14:37 still way too early to know Apr 30 07:15:31 I didn't spend too much time with MSVC recently, but it's not in great shape. Apr 30 07:16:36 Might fiddle with C# or F# later if I manage to get the motivation to try either again after so many years Apr 30 07:17:14 Nilium use git or hg ? Apr 30 07:17:36 git. Apr 30 07:17:46 I occasionally think I should learn to use hg but I figure if I ever need to it probably won't take long to get up to speed. Apr 30 07:18:14 i just saw this today http://www.cakebrew.com/ Apr 30 07:18:45 Nifty. Not sure why anyone would need a GUI for that, but nifty nonetheless. Apr 30 07:19:18 I ask the same thing of people using GUI tools for git though, so I think I'm just sort of bad at giving up my shell. Apr 30 07:19:47 yeah i'm using git cli or tig Apr 30 07:20:56 git-gui is pretty good and more or less sufficient for most stuff, too. Had line and hunk adds, which is about all I need for most stuff. Apr 30 07:21:48 yeah, i like GUI sometimes for visualization; cli for actions Apr 30 07:21:55 atlassian had a nice one Apr 30 07:22:11 interactive staging would be nice in gui i suppose Apr 30 07:24:02 sourcetree? Apr 30 07:26:29 SourceTree is Atlassian's Apr 30 07:26:29 Also probably the best out of the git GUI tools Apr 30 07:29:29 after todays update... Apr 30 07:30:59 gordon_ ? Apr 30 07:39:45 sourcetree got update today with gui changes Apr 30 07:41:26 gordon_ were they good changes ? Apr 30 07:41:44 no Apr 30 07:41:44 JakeWharton: not sure if you missed the above, or you're busy.. or otherwise Apr 30 07:42:24 Mmm, blood in my spit. Expected, but still unpleasant. Apr 30 07:42:41 thanks for sharing ? Apr 30 07:43:32 Hm, looks like SourceTree 1.9 has slightly less texture to its UI. Apr 30 07:43:32 That's nice. Apr 30 07:44:05 Cat has decided to lay down on my lap and start biting my arm's skin and pulling on it. Apr 30 07:44:12 The jerk. Apr 30 07:48:49 Does anyone here use Android Studio while using an external monitor? Because AS crashes when disconnecting my monitor from my macbook. Apr 30 08:19:51 Can't say I've ever run into that problem on Windows Apr 30 08:45:39 hey all Apr 30 08:45:47 hi Apr 30 08:46:32 I created a project using the latest Android Studio. I get this error when trying to run it - "Gradle project sync failed" Apr 30 09:26:38 I seem to have been charged for a test purchase, I'm trying to refund it but can't find the correct order? Apr 30 09:36:26 hi! does android native function "write" is expected to be thread safe? Apr 30 09:37:52 http://pastebin.com/r4wKpG38 <- why doesn't the imageview fill parent (height) when using a color as background? It works when I change background to a drawable like ic_launcher... Apr 30 09:41:22 my IDE (android studio) tells me "thread exiting with uncaught exception", but doesn't tell me which esception or where it occured Apr 30 09:42:31 there is no stacktrace or anything similar. Apr 30 09:45:00 apple741 did your app finally show up ? Apr 30 09:48:16 It seems that the appcompat is buggy, in "appcompat/res/values-large/themes_base.xml" I get a "Error retrieving parent for item: No resource found that matches the given name" for