**** BEGIN LOGGING AT Fri Jan 30 03:00:00 2015 Jan 30 03:01:21 Square almost seems like an advertisement for Github, at times. so much useful code, all on github, with github pages. Jan 30 03:01:26 heh Jan 30 03:01:35 groxx, totally Jan 30 03:01:58 if square were on bitbucket, would you (all of you!) be using bitbucket instead? Jan 30 03:02:19 I'd probably use github still, I just prefer it to bitbucket Jan 30 03:02:20 One thing I'm surprised about is that Google hasn't acquired JW and co. There seems to be close interplay between Square and Google. Jan 30 03:02:37 I used svn ten years ago, and github is revolutionary to me lol Jan 30 03:02:42 TacticalJoke: the passing poor excuse for thoughts by a nameless, faceless person on the internet who is clearly not educated on the company mean nothing Jan 30 03:03:09 * drinfernoo gives JakeWharton a subtle thumbs-up Jan 30 03:04:00 could be shortened to: "person on the internet" as well Jan 30 03:04:10 ^ Jan 30 03:04:34 question for annotations (butterknife specifically): what should my import look like? 'import butterknife.*;' looks a little funky Jan 30 03:04:44 drinfernoo: star imports are the devil's work Jan 30 03:05:09 your IDE will import what it needs as you use them Jan 30 03:05:10 I usually cut out unnecessary ones after everything works lol Jan 30 03:05:22 JakeWharton, my IDE won't lol Jan 30 03:05:29 oh, no. you're one of those? Jan 30 03:05:45 lol I suppose? Jan 30 03:05:47 don't judge me Jan 30 03:05:56 I'm a revolutionary Jan 30 03:06:02 butterknife.* is perfectly fine Jan 30 03:06:03 You might have to enable "Optimize imports on the fly". Jan 30 03:06:23 I checked out the source and yup :) Jan 30 03:09:37 also, I figured it out TacticalJoke Jan 30 03:09:50 ill get around to fixing them all at some point lll Jan 30 03:10:02 What did you figure out? Jan 30 03:10:58 optimizing my imports Jan 30 03:11:47 I've just realised that part of my design issue revolves around the fact that, when reddit sends a comment list, it sends a post list containing a single post (rather than sending a single post). So my code has to jump through hoops to get around that. Jan 30 03:12:27 drinfernoo: Ah, cool. I agree that the star thing isn't great (though I guess some love it). Jan 30 03:12:48 it's fast, easy, and terrible Jan 30 03:13:05 I even don't use star imports for JUnit stuff. That is the level of my hatred. :D Jan 30 03:13:10 i don't see how it's faster than letting the IDE handle it Jan 30 03:13:21 i haven't typed an import in years Jan 30 03:13:42 I can't remember ever typing an import since coming to Java. Hmm. Jan 30 03:14:05 JakeWharton, my IDE auto-imports, but it imports whole packages by default and I never dug around to change it Jan 30 03:14:29 drinfernoo: Hmm, I don't think that's a default IntelliJ setting. You might've customised it at some point. Jan 30 03:14:56 TacticalJoke not IntelliJ :) Jan 30 03:16:09 well there's your problem! Jan 30 03:16:27 I don't remember that being a default setting in Eclipse, either. Jan 30 03:17:52 I'm guessing you're using Eclipse and not something like a vim-based integrated development "environment". :) Jan 30 03:21:51 trust me, if I could use AS, I would Jan 30 03:26:37 <_genuser_> JakeWharton: picasso is doing wonders. very fast in a gridview. even loading 15MB pictures. Jan 30 03:27:07 <_genuser_> JakeWharton: but one problem. on a single image activity, it's not doing anything. not reporting any errors, not loading any pictures. Not sure how to debug. Jan 30 03:28:38 _genuser_: you need to build your own Picasso instance and attach a listener to it. Jan 30 03:28:59 <_genuser_> JakeWharton: I did. Jan 30 03:31:12 <_genuser_> JakeWharton: http://pastebin.com/q0r5KtX6 Jan 30 03:32:04 <_genuser_> JakeWharton: so I added the onImageLoadFailed method and it doesn't report any errors. on the other hand, .load().resize(500,500).centerInside().into(ImageView) doesn't show anything on screen. Jan 30 03:32:52 You aren't using the instance you create Jan 30 03:34:41 <_genuser_> JakeWharton: I see, I should the var picasso to load it. I thought it was strange that it was requiring an instance to attach a listener whereas the image load is on a static method. :) Jan 30 03:34:45 <_genuser_> thanks. Jan 30 03:36:18 <_genuser_> JakeWharton: I got it responding to me, thanks. gonna to debug this .resize().centerInside stuff. Jan 30 03:40:40 morning all Jan 30 03:41:02 does anyone have any idea how routing works on android devices?? Jan 30 03:41:44 when i'm connected to a wifi network with no internet connection and cellular data i can't access devices on the wifi Jan 30 03:41:56 with cellular data disabled and on the wifi, it works fine Jan 30 03:46:46 <_genuser_> JakeWharton: working now. thanks again. picasso is just so much faster than I could have imagined. Jan 30 03:48:38 Can anyone recommend software/method for sketching/designing app screens? Preferably something that isn't as involved as photoshop but still powerful enough to go a LITTLE custom. Jan 30 03:58:24 heh alex_PP Jan 30 03:58:34 hi g00s Jan 30 03:59:23 alex_PP two new books coming out, you may dig Jan 30 03:59:49 seems like street photography, from a well known guy Jan 30 03:59:55 http://www.peachpit.com/store/light-gesture-and-color-9780134032269 Jan 30 04:00:00 http://www.peachpit.com/store/its-not-about-the-f-stop-9780133814880 Jan 30 04:00:17 how are things going ? Jan 30 04:00:45 pretty good Jan 30 04:00:53 been avoiding android for a bit Jan 30 04:00:57 and taking loads of photos Jan 30 04:00:59 :D Jan 30 04:01:24 :D Jan 30 04:01:38 alex_PP which camera are you using atm ? Jan 30 04:01:45 5Diii Jan 30 04:01:59 and a fuji x100s that i've borrowed from a friend Jan 30 04:02:13 lost my 20D, 3 and A1, got burgled Jan 30 04:02:25 x100's a cute little thing Jan 30 04:02:52 that olympus omd-em1 looks nice too Jan 30 04:03:25 yeah, I hear about them every now and again Jan 30 04:03:29 yeah i remember now about that Jan 30 04:03:29 seem pretty popular Jan 30 04:03:47 and the whole world's gone sony a7 mad Jan 30 04:04:29 the samsung nx1 us apparently good too Jan 30 04:04:33 *is Jan 30 04:05:04 my dad got a nikon 5300, handling was terrible imho. like a big P&S Jan 30 04:05:13 * g00s likes canon Jan 30 04:05:51 Yeah, me too. but mostly because i've always used canons Jan 30 04:06:06 and the buttons stay in the same place, which is awesome Jan 30 04:06:18 i dont think i could get myself to buy anything from samsung though Jan 30 04:06:20 used a d810 a little while back, hurt my head Jan 30 04:06:22 even bubblegum Jan 30 04:06:49 yeah, the nikon ui seems annoying Jan 30 04:07:26 alex_PP still programming though? just not android ? Jan 30 04:07:47 just started on android again Jan 30 04:08:08 for this Jan 30 04:08:08 http://www.toshiba-memory.com/cms/en/products/wireless-sd-cards/flashair-wireless-sd-card.html Jan 30 04:08:42 little side project, camera to card to twitter Jan 30 04:10:07 alex_PP is that the same one as http://www.onephotodestination.com/2015/01/toshiba-launches-sd-card-nfc-technology/ Jan 30 04:10:10 using NFC ? Jan 30 04:10:25 no, this one's just wifi Jan 30 04:10:29 like an eyefi card Jan 30 04:10:34 but a little bit more open Jan 30 04:10:38 ah, k Jan 30 04:10:49 https://flashair-developers.com/en/documents/api/commandcgi/ Jan 30 04:11:08 has a fairly ghetto api, but it seems to work ok Jan 30 04:13:02 thats cool they have some docs on the api Jan 30 04:13:42 omg Jan 30 04:13:52 why are PorterDuff modes so annoying Jan 30 04:13:58 they never do what you want them to do Jan 30 04:14:15 they're quite difficult to get your head around! Jan 30 04:14:31 this site sort of helped: http://ssp.impulsetrain.com/porterduff.html Jan 30 04:14:51 yea, been there. doesnt help when your doing lots of multi-layer work Jan 30 04:15:30 heres some of my previous porterduff magic https://github.com/slightfoot/android-painter-example Jan 30 04:16:03 ooh tricky!! Jan 30 04:23:45 MUTHA FUCKER! Jan 30 04:23:54 Hardware Acceleration Jan 30 04:23:56 !!!!1 Jan 30 04:25:35 lol Jan 30 04:26:26 Napalm hw accel messing it up? Jan 30 04:26:38 fucking yes Jan 30 04:26:43 but i've solved it Jan 30 04:26:46 so i dont fucking care Jan 30 04:26:47 fuck Jan 30 04:26:48 fuck Jan 30 04:26:49 fuckers Jan 30 04:26:51 :| Jan 30 04:26:59 hahaha Jan 30 04:27:02 like 3 hours of my life i cant get back Jan 30 04:38:45 Nothing feels better than deleting code. Jan 30 04:40:59 Okay, there are some things. Jan 30 04:52:54 Hmm, do field-watchpoint breakpoints work for you guys? Can't get them working here in Android Studio. Jan 30 04:53:19 Oh, I read that Dalvik doesn't support them. Jan 30 05:02:55 im done Jan 30 05:02:55 yes Jan 30 05:03:19 g00s TacticalJoke.. wanna see this counter thingy? Jan 30 05:04:32 https://d13yacurqjgara.cloudfront.net/users/107759/screenshots/1221770/passit-final.gif Jan 30 05:04:37 did the animated counter from here Jan 30 05:05:24 Oh, nice. Jan 30 05:05:36 How would I see it? Jan 30 05:05:46 just making an animated gif Jan 30 05:10:37 I managed to get 440GB of screen capture whilst i wrote this custom constrol Jan 30 05:10:38 control Jan 30 05:10:48 will whack it up on YouTube if anyone is interested Jan 30 05:11:10 Sure. Jan 30 05:16:47 brb Jan 30 05:20:35 wb TacticalJoke Jan 30 05:20:41 Thanks. :) Jan 30 05:20:44 https://www.youtube.com/watch?v=MZgBXfY86C4 Jan 30 05:22:19 That's really neat. How did you do it? Jan 30 05:22:39 You'll find out soon.. i'll upload my coding video Jan 30 05:23:06 just debating if I should put it on fast-forward or something Jan 30 05:23:09 neat Jan 30 05:23:13 Do you talk in coding videos? Jan 30 05:23:29 Hmm, I could watch it back and make vocal comments Jan 30 05:23:32 hell, you should slowmo some parts Jan 30 05:23:34 add a little background music Jan 30 05:23:59 lets see how long the unedited video is Jan 30 05:24:09 and a girl in a bikini near the end Jan 30 05:24:14 for the poster frame Jan 30 05:24:24 haha Jan 30 05:24:45 I missed it Jan 30 05:24:48 what did Napalm do? lol Jan 30 05:25:20 Uploaded this video: https://www.youtube.com/watch?v=MZgBXfY86C4 Jan 30 05:25:27 your numbers go in both directions Jan 30 05:25:29 the gif does not Jan 30 05:26:11 the tens place always resets to 1 and counts up, actually Jan 30 05:26:32 true, finer details can come later Jan 30 05:27:03 what sense of the word "regular" is used in "regular expression" Jan 30 05:27:06 i would bet the ones place resets to 1 each time and counts up doing at least two full iterations as well Jan 30 05:27:06 Mozart is such happy music. Jan 30 05:27:08 Haydn too. Jan 30 05:27:32 Levite: https://en.wikipedia.org/wiki/Regular_language Jan 30 05:27:46 thank you! Jan 30 05:28:47 probably could have picked a better word for them Jan 30 05:30:12 i always thought it would be a good idea to start a service where people tell you what you want and you make a regex for them Jan 30 05:30:29 not sure if the process can be automated Jan 30 05:30:52 i'm sure one of you CS guys can make a proof that it can't Jan 30 05:31:33 regexps can't match everything, that's a known fact Jan 30 05:31:44 fuck, regex.me is taken Jan 30 05:31:48 my screen capture software adding mouse click sounds and visual cues.. hmm... wish it captured a key-press sound Jan 30 05:31:49 welp so much for that idea Jan 30 05:34:16 you could even have prepackaged tricky ones. like "strip HTML tags" or "parse domain name" Jan 30 05:34:56 strip HTML tags is impossible Jan 30 05:35:05 right, but you can get pretty close Jan 30 05:35:10 yes Jan 30 05:35:12 i captured 6.5 hours of video Jan 30 05:35:27 wow.. sometimes you forget how long these things take Jan 30 05:35:28 Levite: that's a bad idea: http://stackoverflow.com/a/1732454/162410 Jan 30 05:35:41 Wouldn't it fail if any element contained a child with the same name? Jan 30 05:36:08 Trying to match the end-tag of the element would match the end-tag of the child of the element, for example. Jan 30 05:36:13 saying it's impossible is missing the forest for the trees Jan 30 05:36:13 and this answer on the same question explains why: http://stackoverflow.com/a/1758162/132047 Jan 30 05:36:34 "Even Jon Skeet cannot parse HTML using regular expressions." Jan 30 05:36:39 like saying you can't use pi because it's an irrational number Jan 30 05:36:53 no, very different Jan 30 05:37:10 html fundamentally is not a regular language Jan 30 05:37:14 if you have a known domain of tags that could be used, you can surely do it Jan 30 05:37:24 like for a scraper Jan 30 05:37:25 html is a known domain Jan 30 05:37:53 i'm not saying you can't use regex to parse data from targeted pieces of html Jan 30 05:39:03 The only issue is nesting, right? Jan 30 05:39:32 anyway, a lot of programmer man hours could be saved and the average quality of code would be raised if someone could do that Jan 30 05:40:02 that's like writing a regex for rfc-compliant email addresses Jan 30 05:40:08 nobody wants it Jan 30 05:40:11 yes, nesting, like a complex xml document would have Jan 30 05:42:46 heh, maybe you could charge people based on level of completeness Jan 30 05:43:29 very nice Napalm Jan 30 05:43:38 that should be a library ;) Jan 30 05:43:45 Napalm: You recorded yourself programming for hours? Jan 30 05:43:55 yes Jan 30 05:44:33 with commentary? Jan 30 05:44:35 I'd love to see that. I'm quite nosy. Jan 30 05:45:01 that could actually be really useful, if the person had charisma Jan 30 05:45:40 I wonder if it would be good to perhaps do a group commentary on it.. like a couple of people watch it and we can comment on the code and whats going on .. how we might do it differently. Jan 30 05:45:46 might make it a bit more interesting Jan 30 05:46:12 that would take this channel to a whole other level Jan 30 05:46:14 then the recording of the commentary can be overlaid on the video Jan 30 05:46:23 Then we could do commentary on the commentary. Jan 30 05:46:47 lol Jan 30 05:46:52 inception time Jan 30 05:47:17 Are you gonna upload tonight, Napalm? :) Jan 30 05:47:29 I want to see it Jan 30 05:47:47 perhaps, if I can get Premiere Pro 2014 installed.. my current video editor failed with the 430GB load Jan 30 05:48:04 is it just that view or is there an actual app behind it? sorry if you said already Jan 30 05:48:06 I used to do YouTube chess videos. Jan 30 05:48:29 just an intro to custom view programming would be fantastic though Jan 30 05:48:30 I think I used Windows Movie Maker or something. lol Jan 30 05:49:31 i've been paying for Premiere Pro CC for like 6 months Jan 30 05:49:37 it's not expensive enough that i can be bothered to cancel Jan 30 05:49:46 and i keep rationalized that i'll use it. and i never do. Jan 30 05:50:26 same Jan 30 05:50:29 now i found a use Jan 30 05:50:32 hopefully Jan 30 05:50:32 i refuse to pay adobe monthly, so i'm still using CS 6 or whatever Jan 30 05:51:17 i'd rather pay as-i-go than pay the $5000 for all the non-CC versions Jan 30 05:51:25 where I == work Jan 30 05:51:27 indeed Jan 30 05:51:49 hi guise Jan 30 05:52:06 i'd probably choose up front, given the option Jan 30 05:52:47 they must be banking it Jan 30 05:53:06 and they're using it to pay developers to improve the products which get pushed weekly to CC subscribers Jan 30 05:53:24 I want to make a list of interactive "cards" loaded from a couple of database tables. The cards should display a few bits of data and have some controls in them. ListView or RecyclerView? It would be a bonus if the adapter could support different types of card layouts (different number of child views in them) Jan 30 05:53:57 cardview works nicely with recyclerview, so I'd choose that Jan 30 05:54:14 it does support multiple view types/layouts Jan 30 05:55:40 hmm, cool cool Jan 30 05:56:02 is there a library I need to compile to get CardView? Jan 30 05:56:18 one of the new support libraries Jan 30 05:56:40 yeah it's in the v7 library Jan 30 05:57:10 hesperaux: Are you using AS? Jan 30 05:57:21 still has some bugs -- patiently waiting for an update Jan 30 05:57:25 I am using AS preview 2 yeah Jan 30 06:11:40 anyone ever used Distimo for analytics? Jan 30 06:16:58 woohoo Jan 30 06:20:25 lol TacticalJoke #kotlin is dwinding fast Jan 30 06:20:39 *dwindling Jan 30 06:21:39 more like returning to its normal self Jan 30 06:21:58 are and of the language designers there ? Jan 30 06:22:04 damn it, effing kb Jan 30 06:22:05 yes Jan 30 06:22:41 Doh. Jan 30 06:23:02 In an ideal world, we'd all be switching to Kotlin like we switched to Android Studio. Jan 30 06:23:22 somebody in /r/androiddev posted an issue using kotlin with proguard, i wonder if that was expected Jan 30 06:23:24 I'd totally endure the temporary pain. Jan 30 06:24:05 but I just learned java Jan 30 06:24:26 You could see it as a stepping stone to Kotlin. :D Jan 30 06:24:36 Levite kotlin is not a big departure. kinds like java minus some fuckups Jan 30 06:24:37 looking at some samples, it looks like JS Jan 30 06:24:54 with a pinch of Swift Jan 30 06:25:00 Ugh, JavaScript. Jan 30 06:25:03 and with types Jan 30 06:25:08 and dash of bat wing Jan 30 06:25:34 i just want better async options Jan 30 06:25:34 In a way, I dislike that Kotlin can compile down to JavaScript. Jan 30 06:26:01 Ignore that part, just enjoy that it compiles to some pretty good bytecode already Jan 30 06:26:20 I hope that doesn't affect their focus, though. Jan 30 06:26:35 I like the Do One Thing Well principle. :) Jan 30 06:27:08 ah, they used the optional types that Swift has, that's nice Jan 30 06:27:29 at least i'm assuming that's what the ?s are for Jan 30 06:27:54 Isn't that for nullable types? Jan 30 06:28:02 right Jan 30 06:28:17 i'm trying to decide where to use kotlin; in some self contained area, in the android crap (activities, etc) or what Jan 30 06:28:21 and you use ! to unwrap it Jan 30 06:28:27 Oh, Swift defines 'optional' in that way. Interesting. Jan 30 06:29:19 TacticalJoke: same Jan 30 06:29:23 re: JS Jan 30 06:29:28 g00s, use it everywhere Jan 30 06:30:02 If I wanted to target JavaScript, I think I'd use Dart or something. Jan 30 06:30:02 yeah i hope targeting 2 runtimes doesn't require sacrificing of the 'least common denominator' variety Jan 30 06:30:10 Or TypeScript. Jan 30 06:31:21 I suppose it's too late to convince the Kotlin guys to forget about targeting JS. Jan 30 06:31:36 i wonder what their motivation was Jan 30 06:31:41 Targeting JS is important Jan 30 06:31:48 probably says someplace i just missed it Jan 30 06:31:54 deuteros__: Did you know about #kotlin? Just wondering. Jan 30 06:32:05 TacticalJoke: Of course Jan 30 06:32:26 what 2 run times Jan 30 06:32:30 Why is targeting JS important? Jan 30 06:33:30 First of all, it keeps the compiler honest by forcing it to support multiple back ends Jan 30 06:33:44 Never a bad thing Jan 30 06:34:17 Second, Javascript has become more and more important these past years, leaving the door open to writing code in Kotlin and generating JS for the front end is a smart bet Jan 30 06:35:06 A lot of developers who enjoy statically typed languages will not touch dynamically typed languages with a pole. With this backend, they can write front end code Jan 30 06:35:29 scalajs Jan 30 06:35:30 heh Jan 30 06:35:40 no one uses it Jan 30 06:35:44 There are so many, though. TypeScript looks really nice. Jan 30 06:35:48 no one uses scala :) Jan 30 06:35:52 very neat how it's done Jan 30 06:35:58 that's false and you know it Jan 30 06:36:12 Fine, very few people use scala Jan 30 06:36:25 they prefer clojure Jan 30 06:38:00 scala has more developers the clojute Jan 30 06:38:44 JakeWharton retrofit shows up on the latest edition of thoughtworks tech radar under languages & frameworks Jan 30 06:38:51 NO SHIT Jan 30 06:38:54 http://www.thoughtworks.com/radar/languages-and-frameworks Jan 30 06:39:37 umm Jan 30 06:39:51 the simplest way to do startService(intent, blocking=True) ? ;-) Jan 30 06:40:10 guess i shouldn't fuck it up then... Jan 30 06:40:21 i really dont mind the app will take 0.1s more to start Jan 30 06:41:02 i will happyly trade that off for the monstrous code simplication b/c i wont have to care about doing everything async Jan 30 06:43:45 in python it would be a matter of event.wait() and event.set() Jan 30 06:47:04 nevermind i will just broadcast messages back and forth then Jan 30 06:47:13 What was the question? Jan 30 06:47:47 the simplest way to call startService and block the thread untill it returns Jan 30 06:47:50 luv sometimes i use rx to combine the service connected event with other logic that needs to be chained, using combineLatest or something. Jan 30 06:48:03 what? Jan 30 06:48:08 nm Jan 30 06:48:15 helpful, thanks Jan 30 06:48:32 Hi. Is the Galaxy Note 3 a buggy handset Jan 30 06:48:38 Is there a specific reason you'd ask? Jan 30 06:48:43 i mean all my service does is it spawns an extra thread Jan 30 06:48:56 Binder? Jan 30 06:49:10 You want to start a service, to start a thread, to return when its done, for the service to return when its done? Jan 30 06:49:24 i want to start a service and return when it's done Jan 30 06:49:30 I ask because a user complained in the play store that the app doesn't work on Note 3. But I tested on Note 3 Jan 30 06:50:21 i really dont need to do that in an async fashion because i take care of running everything in an extra thread anyway Jan 30 06:52:11 i was thinking i wouldn't use a service at all - all I'm doing in the service is listening on a tcp port Jan 30 06:52:46 im using the service to tell android - hey dont kill this app when you feel like it, it's actually doing something Jan 30 06:53:50 i really see no reason why startService should not support blocking for cases where it makes sense Jan 30 06:54:06 Its not really the purpose of a service. Jan 30 06:54:32 All the service is doing is running a thread, why couldnt you just run this thread within an activity or whatever? Jan 30 06:54:36 how to download apk file from google store directly to pc any scripts? Jan 30 06:54:47 wut Jan 30 06:54:55 that would be against how the play store is supposed to work. Jan 30 06:55:01 g00s: How do you steal apps? Jan 30 06:55:14 heh Jan 30 06:55:14 While you are at it, how can I get away with murder? Jan 30 06:55:26 you can get the apk from your (rooted) phone Jan 30 06:55:27 lol? Jan 30 06:55:29 anyhow, yeah. you're asking a bunch of developers how you can rip them off? :P Jan 30 06:55:53 haven't seen you around in a long time Anthaas how are things Jan 30 06:55:56 well if your income is based on people not being able to get .apk files Jan 30 06:56:00 that good luck :) Jan 30 06:56:03 then Jan 30 06:56:07 there are numerious stupid tutorials on youtube, there is evn some chrome extention for that, but i need some pythonish script fordpwnloading this apk files Jan 30 06:56:14 luv: Even Activity.startActivity is asynchronous. Jan 30 06:56:20 luv: income tends to derive from selling things, for most indies. Jan 30 06:56:24 g00s: haha, I've been stupidly busy. I was complaining last night I don't do enough Android stuff, I miss it! Im great thanks though, how are you? Hows things? Jan 30 06:56:39 Anthaas good thanks :) Jan 30 06:56:52 Anthaas: right, so I just spawn a thread in my Application class - makes everything easier, indeed. Jan 30 06:57:13 As long as Android doesn't kill it when your app is running in the background, I guess. Jan 30 06:57:21 that's it Jan 30 06:57:31 g00s: Brilliant :D Glad to hear. Getting somewhat tired of this PhD. I miss coding for fun! Jan 30 06:57:32 heh. that's a fun thing to turn on in the dev tools :D Jan 30 06:57:35 Why is the asynchronicity a big deal? Jan 30 06:57:42 how can i tell android "this is app is doing something in background" ? Jan 30 06:57:58 luv: It will know. A thread will be running belonging to your app. Jan 30 06:58:05 Anthaas PhD in ? Jan 30 06:58:10 TacticalJoke: why is the code maintainability a big deal? ;-) Jan 30 06:58:12 g00s: Artificial Intelligence. Jan 30 06:58:19 g00s: (because I dont have my own... haha) Jan 30 06:58:29 TacticalJoke: or are you saying async code is as simple as sync code? Jan 30 06:58:29 Anthaas i was just reading bill gates on reddit AMA said if he did something different, it would be AI Jan 30 06:58:37 Anthaas: i'll be happy when they make artificial strawberry that tastes like strawberry. then i'll start asking for ai. ;) Jan 30 06:58:41 and then he also said we should be worried about ai XD Jan 30 06:58:54 Anthaas: Qualitative Preferences in Spatiotemporal reasoning. Logic Programming is an...interesting paradigm. Jan 30 06:59:17 Yeah, I saw that. Superintelligence. On its simplest scale, imagine if programs could write their own API/code. Jan 30 06:59:22 "Because a process running a service is ranked higher than a process with background activities, an activity that initiates a long-running operation might do well to start a service for that operation, rather than simply create a worker thread—particularly if the operation will likely outlast the activity." Jan 30 06:59:24 http://developer.android.com/guide/components/processes-and-threads.html Jan 30 06:59:43 Anthaas: that's already becoming a reality, on a small scale. Jan 30 06:59:59 luv: I'm asking what about asynchronicity in this particular case is a big deal. I'm curious. Jan 30 07:00:08 What is it exactly that's harming your code maintainability? Jan 30 07:00:09 It is, important to remember that their are a LOT of different areas of AI though. Jan 30 07:00:32 I haven't done anything with services yet. Jan 30 07:01:07 yup. i've done a bit with knowledge systems. and even that niche start spiraling out of control fast when you start trying to pin down exactly what's covered. Jan 30 07:01:18 TacticalJoke: in this case i dont have to worry about async ... so xxx.doThis() is way easier to read and understand than messing around with message broadcasting, waitting for answer etc Jan 30 07:01:42 i should write an app that uses an expert system soon. just because. Jan 30 07:01:45 Exactly. Then you look at the things my Professor knows. He is what people refer to as "offensively smart" Jan 30 07:01:48 stick a tts on it. Jan 30 07:01:53 Anthaas: as TacticalJoke said - I actually do have to worry about making it a service and just spawing a thread is not good enough :( Jan 30 07:01:57 sh*te Jan 30 07:02:08 This seems to be a necessary evil at times on Android. Jan 30 07:02:11 Not just in obvious cases. Jan 30 07:02:12 luv: What kind of work is that thread/service supposed to do? Jan 30 07:02:16 Even startActivity takes some consideration. Jan 30 07:02:17 that's what was missing from my last expert system. a human feel. sticking in some snark didn't quite suffice. Jan 30 07:02:30 arg, videos take too long to process Jan 30 07:02:33 :( Jan 30 07:02:41 can anyone tell me what's going on here? http://pastebin.com/0Azn4jbQ Jan 30 07:02:50 I believe this is the culprit: https://github.com/drinfernoo/Cuber/blob/master/app/src/main/java/com/blango/cuber/adapter/GridViewAdapter.java Jan 30 07:02:54 I just had to create a lexer to parse one encoding into like 12 different ones. Jan 30 07:02:59 Learn the Visitor design pattern though :D Jan 30 07:03:03 ew. Jan 30 07:03:07 TacticalJoke: so basically just "live with it" ? :/ Jan 30 07:03:17 I don't know. I wish I knew more about services. Jan 30 07:03:32 hey no worries, thanks for trying to help! :) Jan 30 07:03:56 It was actually something very interesting and useful to learn. Its like Regex on steroids Jan 30 07:05:40 drinfernoo: it looks like somewhere else you are calling setTag on the same view returned by getActualView or your AsymmetricGridViewAdapter is and replacing the tag with the data of Cube rather than your ViewHolder Jan 30 07:05:52 ok so, androidstudio no longer finds RecyclerView Jan 30 07:06:01 even though i have it in my gradle dependencies Jan 30 07:06:05 anyone else having this issue? Jan 30 07:06:05 OK I'll figure that out Jan 30 07:07:13 g00s: So, you working on anything interesting these days? Jan 30 07:08:19 is there an Android Studio equivalent to vim's :set scrolloff=3? Jan 30 07:08:54 If app doesn't run on Note 3 for T-mobile, but works on Note 3 for AT&T, what could be wrong Jan 30 07:09:08 Anthaas well, i think you did the right thing (ai) .. i'm getting kinda restless wondering what to do next. can't do android forever Jan 30 07:09:16 panda81: Are you going on the wording of a vague review? Jan 30 07:09:17 panda81: what do the crash logs say? Jan 30 07:09:22 curiousity always drags me in different directions Jan 30 07:09:47 yup, its the adapters fault Jan 30 07:09:56 TacticalJoke: yes Jan 30 07:10:04 g00s: Thats the good thing. I wouldn't leave Android completely, theres always Windows Phone :P Or Web stuff? I'm like you though, I like to learn new things. Jan 30 07:10:29 panda81: then who knows. maybe someone disabled something you need. :P Jan 30 07:10:30 Users are often clueless. Jan 30 07:10:33 lewellyn: don't have it. From a reviewer. Jan 30 07:11:00 yeah. leave a reply for them to contact you for support and wash your hands of it. Jan 30 07:11:21 unless you have a good crystal ball, you're not going to figure it out. you're more likely to break it for someone else. Jan 30 07:11:40 Anthaas i was thinking ai or data science ... guess i'd have to go back to school Jan 30 07:12:08 Most of AI is only worth knowing if you are thinking about going down a Computer Science route or have a specific application. Jan 30 07:12:41 and in the latter, if you're a skilled general technologist and plan appropriately, you can learn it as needed. at least the subsets applicable to you. Jan 30 07:12:58 then you can chase that rabbit down the hole once you have some foundation from your first failures. :D Jan 30 07:13:38 g00s: Or academia obviously. Jan 30 07:15:24 Napalm, ditch the ViewHolder, or rewrite his adapter without the tag nonsense? Jan 30 07:15:33 Anthaas would you like to stay in academia ? Jan 30 07:15:50 lewellyn: I think in terms of permissions, I need photo and internet access. Jan 30 07:15:56 drinfernoo: na Jan 30 07:16:23 panda81: are you using any system services which don't require special permissions Jan 30 07:16:27 ? Jan 30 07:16:37 which na? lmao Jan 30 07:16:41 for example, are you using a webview and they disabled webview? Jan 30 07:16:47 drinfernoo: simple solution... add a to your resource values Jan 30 07:17:04 g00s: That's difficult. Its both a great place to be, with the research and the constant learning (and teaching), but a hellish place to be with the stupid amount of work when teaching, and the high expectations (really high), and the fact that a lot of professors/lecturers don't actually get to use their holiday time each year. Even when you can you are restricted as to when you can. Whereas in Jan 30 07:17:26 lewellyn: Such as? It's a photo viewing app essentially. Jan 30 07:17:31 g00s: industry, you are often working on a new challenge each day (to an extent) and have a lot more freedom. Pay could often be better too... Jan 30 07:17:38 lewellyn: oh yes I use webview Jan 30 07:17:41 panda81: that's where the crystal ball comes in. Jan 30 07:17:57 drinfernoo: then instead of calling convertView.setTag(holder); and convertView.getTag(); use convertView.setTag(R.id.gridViewHolder, holder); and convertView.getTag(R.id.gridViewHolder); Jan 30 07:18:05 there are entirely too many possible things a clueless user can do. they're not necessarily your fault. :P Jan 30 07:18:10 g00s: So, to answer your question, I'm really unsure, I mean I teach undergraduates, I do research, and Im not sure if I'd want to do both for the rest of my life. Jan 30 07:18:45 lewellyn: how could you disable webview? that's system level right Jan 30 07:19:25 Anthaas and getting funding for your research is kinda diddifcult too Jan 30 07:19:32 lol, difficult Jan 30 07:19:50 g00s: Oh theres that too. If you don't bring in funding then you are almost seen as a failure. Jan 30 07:19:58 I've added the recyclerview nad cardview support libraries to my gradle project and rebuilt them. Anyone know why I can't get autocomplete in AS when I'm editing XML in the cardview? Jan 30 07:20:15 There is an expectation to bring in funding, attend conferences, and produce a certain number of papers. Jan 30 07:20:25 Napalm, same as using a constant key, right? Jan 30 07:20:46 panda81: on some devices, it's able to be turned off. i think it can be on one of my samsung devices. Jan 30 07:22:11 and, of course, if you root, all bets are off. Jan 30 07:22:53 lewellyn: I'm compelled to tell the user the Note 3 is the second most commonly installed handset I see Jan 30 07:23:06 drinfernoo: did you get my last message? Jan 30 07:23:11 I wanna see Napalm's programming video. :D Jan 30 07:23:27 dont think its going to be up tonight Jan 30 07:23:33 I wanna spend hours watching other people doing what I spend hours doing every day. Jan 30 07:23:35 panda81: if it's a free app, i'll install it on the note 3 in my hand to validate that you've got a working app. and if it fails, i'm clueful enough to try to help figure out why. :P Jan 30 07:23:40 BlockingQueue in java is neat :) Jan 30 07:23:44 When it is up, someone ping me it in a private message please :D Jan 30 07:23:45 its taking ages to convert from huff to h264 Jan 30 07:23:53 Okay. lol Jan 30 07:23:59 it's a sprint one, too. so even more likely to be wonky than tmo. Jan 30 07:24:07 Napalm, R.id.gridViewHolder would basically just be a constant string, no? Jan 30 07:24:22 I really want Mark Murphy's book on Android programming. Being a student is an arse though - I can't be affording stuff like that right now :( Jan 30 07:24:25 a constant int Jan 30 07:24:32 My last PhD book cost £82. Jan 30 07:24:41 but! android wont fire up the callback in bindActivity until onCreate has finished Jan 30 07:24:41 lewellyn: sure. Please do https://play.google.com/store/apps/details?id=com.visitvr.cardboard Jan 30 07:24:41 Don't books go out of date really quickly? Jan 30 07:24:41 drinfernoo: then instead of calling convertView.setTag(holder); and convertView.getTag(); use convertView.setTag(R.id.gridViewHolder, holder); and convertView.getTag(R.id.gridViewHolder); Jan 30 07:24:44 I expected it to be made of gold. Jan 30 07:24:55 so making startService blocking using BlockingQueue leads to a deadlack Jan 30 07:24:55 They do, to an extent. Jan 30 07:24:56 yaaay Jan 30 07:25:01 ok Jan 30 07:25:02 gah. i forgot how much i hate the stock samsung keyboard. Jan 30 07:25:04 I just want a look through really.. Jan 30 07:25:05 guess im stack doing it all async than :/ Jan 30 07:25:10 stuck Jan 30 07:25:30 at least i tried :) Jan 30 07:25:31 Welcome your asynchronous overlords. Jan 30 07:26:28 so I'm trying to implement a navigation drawer, where can I find the icon for that 3 line (menu) thing ? Jan 30 07:26:37 Napalm: Do you know the answer to luv's question? Is it possible to start a service synchronously? Jan 30 07:26:41 is there a set of icons that can be downloaded put into the project and reused ? Jan 30 07:26:56 shmoon_: Google have a list of drawable free for download on d.android.com Jan 30 07:27:02 its not possible to start a servie synchronously Jan 30 07:27:04 ^ Jan 30 07:27:27 the callback will happen on the UI thread, and you can't block it Jan 30 07:27:29 luv's code cries out in horror. Jan 30 07:27:29 what question? Jan 30 07:27:33 https://developer.android.com/design/downloads/index.html Jan 30 07:27:42 oh Jan 30 07:27:48 hi guys Jan 30 07:28:09 panda81: i see a sunflower Jan 30 07:28:11 i downloaded the action bar icon pack https://developer.android.com/design/downloads/index.html but there'sno drawer menu icon in there Jan 30 07:29:19 lewellyn: does it move as your phone tilts Jan 30 07:29:23 did anyone used Microsoft PlayReady SDK for android (client side) and Wowza for video streaming (server side ) ? I have problems with smooth streaming my device is doing DDOS when I try to play smooth streaming stream Jan 30 07:29:52 TacticalJoke: well yea, but i wouldnt recommend it. Assuming your Activity and Service are in the same process you can simple use a static Lock and have the Activity wait on it after calling startService.. but why?? Jan 30 07:30:27 Yah. Seems unnatural. Jan 30 07:30:29 luv: ^^ Jan 30 07:31:11 panda81: yup. works fine. Jan 30 07:31:15 Napalm: wont do Jan 30 07:31:24 Napalm: that will be deadlock Jan 30 07:31:32 strange action bar icon pack won't have drawer icon Jan 30 07:31:56 luv: oh wait.. yea.. onStart in Service on main thread Jan 30 07:32:35 Napalm, that fixed it :) thank you! Jan 30 07:32:40 your welcome Jan 30 07:32:52 panda81: so pebcak :) Jan 30 07:34:26 btw. originally I wanted to avoid using bindService to communicate with the service is this sentence in the docs "The service will be considered required by the system only for as long as the calling context exists." Jan 30 07:34:28 lewellyn: thanks! What's pebcak Jan 30 07:34:30 http://developer.android.com/reference/android/content/Context.html#bindService%28android.content.Intent,%20android.content.ServiceConnection,%20int%29 Jan 30 07:34:37 Right guys, I've gotta go and take a few classes. I'll be back in about...11 hours. Til next time take care of yourself, and each other. Jan 30 07:34:45 Good night, Jerry. Jan 30 07:34:47 panda81: ask google/bing/whatever. ;) Jan 30 07:34:50 TacticalJoke: ;-) Jan 30 07:35:05 panda81, problem exists between chair and keyboard Jan 30 07:35:26 haha Jan 30 07:35:27 drinfernoo: i could have actually answered, but i'd prefer pointing panda81 at the tons of hilarious timewasters online :D Jan 30 07:35:29 People use Bing? ;o Jan 30 07:35:37 lol Jan 30 07:35:37 TacticalJoke: they pay me to. so yeah. Jan 30 07:35:48 I'd prefer to make up my own answer than Bing something haha Jan 30 07:35:52 Who pays you? Just curious. Jan 30 07:35:57 kuv: thats not exactly true Jan 30 07:36:02 luv: ^ Jan 30 07:36:06 Though, to be completely fair, haven't tried on a t-mobile one. User's is Galaxy Note3 (hltetmo) Jan 30 07:36:09 personalized results are better than google's and bing rewards is nice. i can give a referral link if you're .us ;) Jan 30 07:36:34 panda81: i expect it is irrelevant. what'd be interesting is if the knox warranty was tripped. ;) Jan 30 07:36:40 Zomg. Fixed my code. It's all beautiful and perfect. Jan 30 07:36:45 It was hazy and horrible. Jan 30 07:36:53 Only took around six hours of thinking. Jan 30 07:36:58 congrats Jan 30 07:37:02 (And about 10 minutes of typing.) Jan 30 07:37:24 Napalm: good to hear ;-) ... If I do startService in onCreate in my Application class, and use bindService in activity and do stopService in Application onDestroy - can I assume do service is running as long as the application? Jan 30 07:37:24 sometimes thinking is a better use of time than beating your head into a wall of code. Jan 30 07:37:31 Yah. Jan 30 07:37:34 Thanks. haha Jan 30 07:37:41 luv: that wont work Jan 30 07:37:48 lewellyn: oh by the way, is the Crashes & ANRs console reliable or not? Jan 30 07:37:58 panda81: i don't know :D Jan 30 07:38:08 my gut says no. Jan 30 07:38:08 Napalm: why so? :/ Jan 30 07:38:10 luv: first application doesnt get a callback when its destroyed and second the application wont be destoryed as long as any component is running Jan 30 07:38:14 luv: if you start your service when the app starts and kills it on destroy, why use a service at all? Jan 30 07:38:41 deuteros__: "Because a process running a service is ranked higher than a process with background activities, an activity that initiates a long-running operation might do well to start a service for that operation, rather than simply create a worker thread—particularly if the operation will likely outlast the activity." Jan 30 07:39:00 luv: keyword here: "long running" Jan 30 07:39:00 lewellyn yeah google's search results have been ... dissapointing Jan 30 07:39:06 luv: why do you want this service to exist? what are you actually trying to do? Jan 30 07:39:16 If it runs the same duration as your activity, not the best idea to use a service Jan 30 07:39:17 I kinda feel like I've been taken out of context. Jan 30 07:39:27 deuteros__: not activity - application Jan 30 07:39:44 Napalm: because what I just pasted to deutrues Jan 30 07:39:44 Same remark Jan 30 07:39:53 services outlast applications, that's their point (with a few exceptions) Jan 30 07:40:05 g00s: yup. and, again, if microsoft will pay me to get more relevant results, it's foolish to ignore that. Jan 30 07:40:06 ok Jan 30 07:40:20 What do you need to do in that service? Jan 30 07:40:22 i see Jan 30 07:40:23 liv: you miss my point Jan 30 07:40:25 lewellyn this is a very interesting looking engine http://www.gizmag.com/scinet-search-engine-interactive-intent-model/35832/ Jan 30 07:40:25 luv Jan 30 07:40:27 i'm a pragmatic technologist, not a zealot. Jan 30 07:40:40 i won't kill the service when the application is killed Jan 30 07:40:49 luv: better understand of what your trying to achieve will help us tell you how to achieve it. Jan 30 07:40:53 lewellyn zealots have no sense of humor :D Jan 30 07:41:36 g00s: hm. while interesting, such an engine is not generally useful for me. i'm usually looking for *very* precise data. Jan 30 07:41:40 somehow I assumes process wont outlive an Application Jan 30 07:41:43 assumed Jan 30 07:41:49 g00s: whereas it's hard to tell when i'm being serious ;) Jan 30 07:41:57 so I can have a process running a service instance running Jan 30 07:42:08 luv: hmm, kinda, you can have multiple processes and each will have an instance of your Application class Jan 30 07:42:10 i keep thinking luv is lov Jan 30 07:42:13 and doing getApplication() or getApplicationContext() in that service instance will return null?? Jan 30 07:42:13 also, google keeps screwing up their advanced search operators. which is no end of irritating :( Jan 30 07:42:46 luv: getApplication/getApplicationContext will never return null Jan 30 07:43:01 i thought ctate said that was possible in one case Jan 30 07:43:11 luv: the Application context is guarenteed for so long as a Component is in a resumed state. Jan 30 07:43:41 luv: this includes any type of context.. best way to think about it is anything in your AndroidManifest Jan 30 07:43:47 ofcourse Jan 30 07:43:54 so .... luv: if you start your service when the app starts and kills it on destroy, why use a service at all? Jan 30 07:44:00 for so long as any of those Components are running your Application object will exist and so will the process Jan 30 07:44:02 how can service outlive an app? Jan 30 07:44:51 luv: they dont remain active. they only outlive the activity. the only way to continue your service is to have an intent for it to process Jan 30 07:45:14 luv: like a battery state change .. or other type of broadcast that can be detected and the broadcast receiver can start your service Jan 30 07:45:40 luv: for it to perform its task and then stop itself Jan 30 07:46:34 Services can outlive applications (that's how broadcast receivers work) Jan 30 07:46:37 "Another application component can start a service and it will continue to run in the background even if the user switches to another application." Jan 30 07:46:59 deuteros__: exactly what i just said Jan 30 07:47:01 However Force Stop will kill everything, even services (even if they have a broadcast filter) Jan 30 07:47:11 You'll stop receiving GCM until you restart the app Jan 30 07:47:33 Napalm: in what application context the service runs in that case? Jan 30 07:47:56 luv: Somehow you still avoid saying what kind of work you want to do in that service Jan 30 07:47:57 luv: the one you define in your manifest Jan 30 07:48:12 deuteros__: exactly what i was thinking Jan 30 07:48:33 Napalm: so if app A request a service from app B and app B is not running, android starts app B ? Jan 30 07:48:36 Napalm: Yeah I'm running out of energy Jan 30 07:48:57 yes Jan 30 07:49:12 it's kinda perpendicular to what im trying achieve but good to know :) Jan 30 07:49:31 a different use case ... Jan 30 07:49:38 you still have not explained what you are trying to achieve Jan 30 07:49:51 Just about to leave, but.... Jan 30 07:50:17 luv: Be more abstract about what you are trying to do, don't explain in technical terms, but the functionality you are trying to implement. Jan 30 07:50:21 Cheerio! Jan 30 07:50:36 well, i did a few times already but no harm going into more details ... Jan 30 07:51:50 listening on a TCP port and processing the incoming data (for example Log.i the incoming data) and do this since the user starts the app until she clicks a "stop" button either in the app or in a notification Jan 30 07:52:27 and indeed it must run in the background and she must be able to do whatever else she wants on the phone while it's running Jan 30 07:52:59 at any time she can either start the app again from the launcher and click "stop" or click "stop" in the notification Jan 30 07:53:00 g00s, content providers Jan 30 07:53:30 SyncAdapter? Jan 30 07:53:35 Right, really going now, bye! Jan 30 07:53:50 g00s, on create occurs out of order Jan 30 07:53:50 luv: sounds like you want to start a service with context.startService and have your activity bind to it.. then have your service show a foreground notification with a stop button in it Jan 30 07:54:15 thank you Jan 30 07:54:43 does startService guarantee the service wont be stop until stopService is called? Jan 30 07:54:43 pfn interesting - i think maybe also BackupAgent Jan 30 07:54:57 luv: yes or the system ends your service Jan 30 07:55:04 perfect :) Jan 30 07:56:14 and i should I worry about calling stopService in onTerminate in my Application class? Jan 30 07:56:29 onTerminate will never be called Jan 30 07:57:16 luv ideally you will terminate the service on a certain trim level Jan 30 07:57:30 part of ComponentCallbacks2 i think Jan 30 07:57:38 Napalm: I see. Thanks again. Jan 30 08:20:11 are you allowed to put a link to your own website on your app's menu screen? Jan 30 08:21:26 I don't see why not. Jan 30 08:21:34 Though if your site has a donation link then it could be risky. Jan 30 08:22:13 no donations anywhere... just my website will have information about that app and my other apps (screenshots, tutorials etc) Jan 30 08:25:39 "Exchangers may be useful in applications such as genetic algorithms and pipeline designs." Jan 30 08:25:42 GAs O.o ? Jan 30 08:29:52 deuteros__ still there ? Jan 30 08:30:11 yup Jan 30 08:30:26 deuteros__ do you know if using kotlin precludes using proguard ? Jan 30 08:30:46 g00s: Never tried Jan 30 08:31:01 hm, k thanks. saw this and was wondering http://www.reddit.com/r/androiddev/comments/2u5avi/since_kotlins_the_hip_thing_this_week_has_anyone/ Jan 30 08:31:12 g00s: Best way to get an answer is to post on the JetBrains Kotlin forums, they usually answer fast Jan 30 08:31:28 deuteros__ ah, good idea. never thought Jan 30 08:31:47 and they value Android Jan 30 08:31:56 thats - a nice thing Jan 30 08:32:27 groovy does too, and ceylon project has stated android is a priority for their next release also ;) Jan 30 08:32:44 nice when projects acknowledge android Jan 30 08:32:54 Ceylon I'm a bit more skeptical, even though I really like the language too Jan 30 08:33:22 i think their goal was to replace all of java's libraries, to be 'self contained' Jan 30 08:33:30 maybe i am wrong Jan 30 08:33:52 No you're right about that Jan 30 08:34:03 but last time I heard from Gavin, it wasn't a priority for them Jan 30 08:42:00 how can I hide the overflow menu? Jan 30 08:43:04 basically when the naigation drawer shows up i wanna hide the 3dots Jan 30 08:43:08 put electric tape over it Jan 30 08:43:29 i would prefer to do it in code Jan 30 08:43:51 lol Jan 30 08:44:29 ? Jan 30 08:44:49 hide the items inside of it Jan 30 08:45:01 shmoon_: Isn't the standard behaviour to keep the overflow button visible? Jan 30 08:45:16 if I have 5 items, I'll have to write the same disabling code 5 times (loc) ? Jan 30 08:45:39 put all the stuff you want to disable in a group Jan 30 08:45:45 i think I read that if navigation drawer is opened, all the irrelevant options from overflow should be removed, I think all of them are irrelevant to the drawer Jan 30 08:46:02 if the drawer is open you can't interact with that stuff anyway Jan 30 08:47:06 it works for me JakeWharton , when the drawer is open I'm able to tap on the items in the overflow menu and go to different activities specified Jan 30 08:47:35 menu group is probably a good idea, didn't know about it Jan 30 08:47:41 ¯\_(ツ)_/¯ Jan 30 08:49:31 whats that? Jan 30 08:49:57 in colors.xml, which is better to use? the tag with type="color"(as on the developer site, or the more simple tag which seems more commonly used elsewhere? Jan 30 08:51:30 I use . Didn't think there was another way. Jan 30 08:52:00 ok cool Jan 30 08:52:49 This shows "": http://developer.android.com/guide/topics/resources/more-resources.html#Color Jan 30 08:53:58 Where are you seeing ""? Jan 30 08:54:16 https://developer.android.com/samples/BasicMediaRouter/res/values/colors.html Jan 30 08:54:20 There's no difference, both create a color resource Jan 30 08:55:20 odd someone would choose the longer way then Jan 30 08:55:45 Yep Jan 30 08:56:02 That code looks old-school. Jan 30 09:09:15 they're the same thing Jan 30 09:09:18 oh that was said Jan 30 09:10:02 how do I take an ALPHA_8 bitmap and paint it on a Canvas using a color? Jan 30 09:10:29 my throw-porter-duff-modes-at-it-until-it-works approach isn't working Jan 30 09:21:53 it would be cool if the AS project view could collapse java / kt files into one tree Jan 30 09:22:09 JakeWharton, im using something similiar to the U2020 debug drawer you have on github Jan 30 09:22:26 g00s: you can just put them in the same tree Jan 30 09:22:27 Whenever I change the endpoint, it still uses the previously set one Jan 30 09:22:36 unless it forcefully terminate the app Jan 30 09:22:42 and start it again Jan 30 09:22:44 JakeWharton :O really? i don't need a separate kotlin/ directory Jan 30 09:22:51 probably not Jan 30 09:23:04 javac and kotlinc certainly don't care Jan 30 09:23:18 that would be cool in some cases, keeping things together Jan 30 09:27:49 I added android:scrollbars="vertical" to a multiline EditText to make it scrollable, but it seems to only work when the keyboard is minimized / not showing. How can I make it always be scrollable? Jan 30 09:35:52 it may be because the form is in a ScrollView which only has to scroll once the keyboard reduces the available size Jan 30 09:55:42 the answer is EditText.onTouch v.getParent().requestDisallowInterceptTouchEvent(! ((event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_UP)); return false; Jan 30 10:26:40 https://github.com/magnetsystems/r2m-sdk-android/issues?q=is%3Aissue+author%3AMoter8+ D: Jan 30 10:26:45 I feel bad for reporting so many issues Jan 30 10:30:17 is it normal for the app to be terminated when pressing the back button in the main activity? Jan 30 10:32:15 Levite: if it's the last activity on the stack, then pressing back generally goes to the home screen Jan 30 10:32:31 It's not necessarily terminated, background services won't necessarily be killed if you do that Jan 30 10:32:32 I mean terminate in the sense that it's completely killed Jan 30 10:32:41 seems like pressing the home button keeps it alive Jan 30 10:32:51 not sure if that's something i did or what Jan 30 10:33:19 It might be your ROM, or the app that terminates all services if the app is not visible anymore Jan 30 10:38:12 Levite: that's normal Jan 30 10:39:35 shmooz sonOfRa ok, thanks Jan 30 10:39:51 I figured, since I was seeing it on stock L and kitkat Jan 30 10:47:25 so is using code folding in AS pointless? i made a bunch of regions and now they’ve disappeared Jan 30 10:50:17 Hello Jan 30 10:50:53 I am using onEditorAction on an EditText, to remove focus from it when i close keyboard Jan 30 10:51:08 but doesnt work when i close keybord with back button Jan 30 10:52:51 so is there any way to know if keyboard is visible on screen ? Then i can remove focus from editText with onBackPressed, if i detect keyboard is open Jan 30 10:53:16 everything i found about this not working Jan 30 11:24:17 For the action bar icon pack https://developer.android.com/design/downloads/index.html#action-bar-icon-pack can I get a list of all the images along with the folder name ssomewherE? its a pain to go into each folder and check Jan 30 11:24:28 also is it the only set of icons android docs provides? Jan 30 11:25:30 but digging through the icon pack is the fun part... Jan 30 11:26:36 heh Jan 30 11:26:45 folder hierarchy is deep thats the problem Jan 30 11:26:52 there an .ai in there but one of them is messed up Jan 30 11:27:12 well if you're on a mac you can hit the spacebar and view them in quicklook Jan 30 11:27:19 if you're not using a mac, i'm afraid i can't help you Jan 30 11:28:25 i am on a ma Jan 30 11:28:27 mac Jan 30 11:29:27 this is what I get on hitting spacebar http://puu.sh/fegnn/4ed2f057af.png Jan 30 11:30:04 command-down arrow to open the folder Jan 30 11:31:17 then use list view by hitting command-2 or the icon thing with command-4 Jan 30 11:31:41 or you can open them all in preview Jan 30 11:33:38 just need that home icon that i cant fine Jan 30 11:33:40 find Jan 30 11:34:16 you mean the one that looks like an actual house? Jan 30 11:34:22 ya Jan 30 11:34:30 i have a navigation drawer that will have the default option as Jan 30 11:34:32 i don't think they want you using that anymore Jan 30 11:34:33 "Home" Jan 30 11:34:37 i want to show an icon beside the text Jan 30 11:34:44 I think i got icons for about, settings, profile, etc. in the pack Jan 30 11:35:17 home doesn't make sense. use a hamburger button, which makes slightly more sense Jan 30 11:35:39 but if you want a winning design, don't use a navigation drawer at al Jan 30 11:37:05 i have settings, about that are not that useful and the user would use once or twice in a long time, so thought would shove them into a navigation drawer, thought that makes sense Jan 30 11:37:24 i am using hamburger button for the menu to slide in/out ofcourse, but the first item in the menu will be home so thought for that Jan 30 11:37:33 are you using a toolbar? the overflow menu is a better place to put settings Jan 30 11:38:22 actionbar Jan 30 11:38:45 hmm so no navigation drawer? shove them into overflow? Jan 30 11:38:57 i have seen apps using navigation drawer so thought would use it, made sense Jan 30 11:39:08 you should really avoid it Jan 30 11:39:17 the drawer only makes sense in a library type app Jan 30 11:39:39 check out the calendar, contacts, downloads, drive, messenger apps etc for examples of good, generic android design Jan 30 11:41:34 if you can stick the settings items into the overflow menu itself that would be even better Jan 30 11:42:33 I still don't get why the "burger button" of the actionbar/toolbar is animated, since the guidelines enforce the fact that the meny drawer must hide the actionbar/toolbar Jan 30 11:42:49 it's like around 1/4 of the total animation is being show Jan 30 11:43:43 said differently, "let's animate something, then let's hide it almost completly" Jan 30 11:45:17 another thing to consider is that most users are right handed Jan 30 11:45:33 so I place things on the right hand side if possible Jan 30 11:45:54 the home/back paradigm worked when phones had 4" screens Jan 30 11:46:21 debatable on this one, because a right-handed might held his device with his left hand Jan 30 11:46:26 and use the fingers of his right hand Jan 30 11:48:35 i feel like the effort put in to reach a place is same with both overflow and drawer Jan 30 11:48:38 2 taps/clics Jan 30 11:48:48 and a drawer can be designed, whereas overflow can't be changed in its appearance Jan 30 11:48:59 well, since you said they won't be accessing it frequently, it doesn't *really* matter Jan 30 11:49:02 i have settings, about that are not that useful and the user would use once or twice in a long time, so thought would shove them into a navigation drawer, thought that makes sense <- nope, probably first because settings need to be separated from the rest, and especially because you said "once or twice in a long time", they (the settings) then need to be far from one or two actions Jan 30 11:49:06 just a matter of aesthetics Jan 30 11:49:09 so for instance if I want to show profile pics as the first itme like gmail, i can do in drawer Jan 30 11:49:17 hm Jan 30 11:49:56 adq, I've read the doc page you've linked me Jan 30 11:50:04 what kinds of settings are we talking here Jan 30 11:50:10 cristian_c, which one lol, have been days Jan 30 11:50:12 checkboxes? lists? Jan 30 11:50:23 right now I'm actually only referring to app preferences with checkboxes, profile pic upload, etc. Jan 30 11:50:26 edittexts Jan 30 11:50:33 can't think of "app settings" like notification turn off/on Jan 30 11:50:36 adq, http://developer.android.com/guide/topics/data/data-storage.html Jan 30 11:50:40 ah Jan 30 11:50:41 meh, stuff it in the overflow menu, it would be easier too Jan 30 11:50:43 so thougt would just have a preference screen/section Jan 30 11:50:55 hm Jan 30 11:51:03 you don't have to dick around with the nav drawer stuff Jan 30 11:51:19 adq, but there isn't any reference to creating new android permissions Jan 30 11:51:22 i want to have the profile section like gmail really, it looks so cool Jan 30 11:51:31 big box with your pic in a circle, if you know what i mean Jan 30 11:52:07 cristian_c, There is a ref for getting access to external storage, and in this case indeed, you don't need to "create" a permission Jan 30 11:52:07 yeah Jan 30 11:52:30 adq, I said this Jan 30 11:53:01 adq, and I've already added those elements to the manifest Jan 30 11:54:11 cristian_c, logcat should tell you the error and if a method/function needs a permission which has not been declared Jan 30 11:54:22 so basicall i just need a home icon :D Jan 30 11:54:25 I'm not sure what you mean by "creating a permission" Jan 30 11:54:28 lol Jan 30 11:55:12 adq, but I've already posted the logcat message Jan 30 11:55:13 what color? Jan 30 11:55:15 I said this Jan 30 11:55:33 adq, you've told me about the new permission Jan 30 11:55:39 grey, like the action bar pack Jan 30 11:55:57 "Carefully explaining your problem is half the solution." Jan 30 11:57:02 adq, as I explained, I'd like to find a way package manager grants me a permission Jan 30 11:57:13 you have the source code for that Jan 30 11:57:18 this part is open-source Jan 30 11:57:37 but adding these further 'uses-permission' elements to the manifest doesn't solve the issue Jan 30 11:57:47 and package manager rejects my request Jan 30 11:57:52 ok Jan 30 11:57:54 shmoon_ https://dl.dropboxusercontent.com/u/24899691/m/home.zip Jan 30 11:58:01 but what does logcat say, cristian_c? Jan 30 11:58:09 it should dump the error including the permission needed Jan 30 11:58:49 adq, as I posted previously, it says: Not granting permission android.permission.MOUNT_UNMOUNT_FILESYSTEMS Jan 30 11:58:57 for external storage Jan 30 11:59:45 I recall now, I already told you Jan 30 11:59:47 you cannot use that Jan 30 11:59:52 ? Jan 30 11:59:53 protection level is too high Jan 30 11:59:59 Levite: did you just make that for me? Jan 30 12:00:00 you will not have your apk signed by google or an oem Jan 30 12:00:10 http://developer.android.com/reference/android/Manifest.permission.html#MOUNT_UNMOUNT_FILESYSTEMS <- Not for use by third-party applications Jan 30 12:00:11 lol no, it's part of a pack i purchased Jan 30 12:00:21 adq, and I asked how to sign it Jan 30 12:00:26 you cannot!! Jan 30 12:00:43 thanks a lot, where did you purchase it from, i might wanna go through the list :) Jan 30 12:00:48 PM? Jan 30 12:00:50 adq, and how developers do it? Jan 30 12:01:00 cristian_c, http://developer.android.com/guide/topics/manifest/permission-element.html > android:protectionLevel > Jan 30 12:01:04 they write code with these APIs Jan 30 12:01:04 cristian_c, they don't Jan 30 12:01:07 shmoon_ http://androidicons.com/ Jan 30 12:01:08 or they need root Jan 30 12:01:32 adq, ok, but I told that app is for root devices Jan 30 12:01:37 my device, for example, is root Jan 30 12:01:45 *rooted Jan 30 12:01:52 lol, it was $25 a few months ago, now it's free Jan 30 12:02:08 cristian_c, Is your app process running as root? Jan 30 12:02:27 FlipBill, mmmmmm, how to verify that? Jan 30 12:02:28 sorry Jan 30 12:02:30 cristian_c, your app needs to also elevates its privilege, but to be honnest, you have no idea what you are doing Jan 30 12:02:33 its open source now, but seems black, how did you change the color? Jan 30 12:02:43 hi Jan 30 12:02:44 you should not touch the filesystem or require mount/umount Jan 30 12:02:46 they come in all different colors Jan 30 12:02:50 for all the themes Jan 30 12:02:57 :) Jan 30 12:02:59 cristian_c, I don't know precisely. Just have an idea. Jan 30 12:03:00 adq, the app does this Jan 30 12:03:04 thanks man Jan 30 12:03:04 *makes Jan 30 12:03:12 np Jan 30 12:03:18 cristian_c, i don't know more, good luck Jan 30 12:03:19 FlipBill, ok Jan 30 12:03:55 cristian_c, in Linux, a process is spawned with and effective user ID and a real UID Jan 30 12:04:19 Your challenge is to extend this facility into the JVM running your app. Jan 30 12:04:41 his challenge is to understand what is he doing and what he needs Jan 30 12:04:44 Precise path is not clear to me because I've never coded for it personally. Jan 30 12:04:58 But this is the start of the trail you probably need to follow Jan 30 12:05:01 cause it's not going to fly lol Jan 30 12:05:24 FlipBill, thanks for the answer Jan 30 12:05:29 I speculate that the permission in question (mount) is (reasonably) restricted to higher privileges. Jan 30 12:05:52 FlipBill, yeah, the app is thinked for rooted only devices Jan 30 12:05:54 There was mention of third-party sig too. Jan 30 12:05:58 *thought Jan 30 12:06:24 I suspect that if one could sign an app with the signature used to for higher privs, that could do the trick. Jan 30 12:06:53 But that signature is cryptographically based and restricted to one who builds the system. Jan 30 12:06:56 but one would have to be/work for Google or a device vendor in order to do that Jan 30 12:07:05 This is all guess work on my part. Jan 30 12:07:11 so that is not relevant Jan 30 12:07:16 Just speculating in case it gives you some clarity. Jan 30 12:07:53 FlipBill, ok Jan 30 12:07:58 speculation tends not to increase clarity Jan 30 12:08:26 Leeds - correct, one would have to build the ROM. Jan 30 12:09:25 I don't know what is relevant for cristian_c. I was speaking in general terms in order to provide orientation. Jan 30 12:09:48 As were you with your reference to Google and/or device vendor. Jan 30 12:10:12 FlipBill, I know package manager assignes all the permissions Jan 30 12:10:20 to the app Jan 30 12:10:44 My caveat about specualtion was to warn the reader that my statement should be regarded cautiously. I.e., food for thought. Jan 30 12:11:16 As to whether it provides clarity - that depends on the reasoning powers of the audience. Jan 30 12:13:03 Since your device is rooted, that leaves open the possibility, if not the probability that you can generate a system for which you have access to a signature that may be used for higher privileges. Jan 30 12:13:12 Again, I don't know your circumstances. Jan 30 12:13:50 FlipBill, for now, I can do tests Jan 30 12:13:53 thanks Jan 30 12:14:26 FlipBill: that is also the wrong answer Jan 30 12:15:22 Leeds, what answer, and how? Jan 30 12:16:12 using the root access on a rooted device is a completely different mechanism from signing with a system key Jan 30 12:16:32 I understand Jan 30 12:16:43 so, I can some tests, for now Jan 30 12:16:56 Leed, I agree. I did not mean to imply otherwise, but I understand why you drew the inference. Jan 30 12:17:04 argh Jan 30 12:17:12 indeed. argh. Jan 30 12:17:25 go ahead with your random speculation... whatever Jan 30 12:17:54 One who can root a device is likely to have the possibility of installing custom ROM. Jan 30 12:18:18 One who can do that can theoretically build from AOSP - with their own key. Jan 30 12:18:30 Leeds, are those incorrect statements? Jan 30 12:18:51 in context, they are misleading and/or irrelevant statements Jan 30 12:19:01 but I've got better things to do than this, so, have fun Jan 30 12:19:17 Good point, Leeds. I have better things to do too. Jan 30 12:19:58 great, we all have better things to do Jan 30 12:20:11 but my things are better than your better things..to do Jan 30 12:20:36 Odaym, hehe Jan 30 12:20:41 hehe x2 Jan 30 12:22:12 cristian_c, it might be more practical to consider addressing your app requirements without mount Jan 30 12:23:02 As Leeds probably speculated, all of what I wrote might be irrelevant given the particulars of your situation. Jan 30 12:23:29 precise Jan 30 12:32:32 https://play.google.com/store/apps/details?id=com.fortysevendeg.translatebubble Jan 30 12:32:38 that is cool Jan 30 12:33:26 sweet Jan 30 12:33:28 is it yours? Jan 30 12:33:37 no Jan 30 12:33:52 just a new scala app Jan 30 12:35:13 but the concept and UX and UI are slick Jan 30 12:59:33 hey hi ho ... anyone any experience with Android Wear ? Jan 30 13:11:19 Sirolf: yea, i’ve got a couple of apps with wear integration on the store Jan 30 13:29:02 oh - heh - "keyboards can generally be found located near computer devices, and often are useful for entering programming instructions that sequenced properly sometimes produce desired results" Jan 30 13:32:27 desire Jan 30 13:43:09 Do i need barcode for the store to scan my app? Jan 30 13:43:59 I hope it make sence. Jan 30 13:44:56 if you mean the question: no, it doesnt make sense. Jan 30 13:45:41 Sorry Jan 30 13:45:42 Asking if your app needs a barcode to be available for submittal to the play store? Jan 30 13:46:00 hi to all Jan 30 13:46:55 I make a android app that show you different store prices and i was think of them scan it in the store?Can you do this in android if i am right? Jan 30 13:47:34 i mean lsomething like a shopping list Jan 30 13:49:13 capella,I try to make a shopping list that look for price match but i not sure if i need a barcode scanner for it?:) Jan 30 13:49:36 it's your app, you can design it's capabilities Jan 30 13:49:40 well... if you want to scan barcodes, you obviously have to make a scanner for tht. Jan 30 13:50:12 you can force users to key in the UPD codes, or provide a scanner Jan 30 13:50:17 *UPC Jan 30 13:50:29 thanks Jan 30 13:50:48 provide *scanner support*, you don't need to bundle hardware ofc :) Jan 30 13:51:01 cappella,I hope this app will work:) thanks Jan 30 14:12:19 If a method onDataChanged gives back info I want to put in a TextView ... it says it can only update the view from the thread that started it. I understand .. but how to work around that properly? Jan 30 14:13:07 Sirolf: you probably want to use activity.runOnUiThread() or a handler Jan 30 15:01:49 pfn: that is impressive Jan 30 15:01:58 i dig the usage of wear Jan 30 15:06:16 Microsoft is investing in Cyanogen, I wonder what will be the impact on Android? Jan 30 15:06:35 more fragmentation to deal with? Jan 30 15:07:51 "CyanogenMod is an open source operating system for smartphones and tablet computers, based on the Android mobile platform." Jan 30 15:07:58 hm, why would they do this, they have their own windows Jan 30 15:08:31 may be they want to take Android away from Google/OHA ? Jan 30 15:10:33 I wonder if that is even possible, its not just about OS now I guess, its also about the tight integrtion from backups to emails to an app store to others across all devices of the account Jan 30 15:11:41 app-store is the key Jan 30 15:12:11 Google has clauses to make sure all OEMs include play-store Jan 30 15:13:04 AOSP or its forks doesn't have to include playstore - thats the deal http://goo.gl/y2YXgc Jan 30 15:13:47 Should developers be concerned? thats the question :) Jan 30 15:14:03 no, absolutely not Jan 30 15:14:34 napster, then why do I get crashes on amazon devices and so on because they don't have playstore installed? Jan 30 15:15:07 If they get enough market share, I think we should Leeds Jan 30 15:15:17 firstly, no Jan 30 15:15:27 secondly, they won't - unless you're already worried about China Jan 30 15:15:31 Syzygy If you are using PlayServices SDk, probably yes. Jan 30 15:15:51 Mi? Jan 30 15:16:13 Yoo? Jan 30 15:16:44 MiUi was like an entirely different SO tho Jan 30 15:16:52 s/SO/OS Jan 30 15:17:36 anyway, if they make Nokia devices with Cyanogen, it would be seriously cool. :) Jan 30 15:18:52 what I mean is... Jan 30 15:19:24 if you're not currently worried about the - probably - hundreds of millions of Android devices in China right now without the Play Store... you probably don't need to be worried about the odd CM device that might come out Jan 30 15:20:04 not to mention the damage they've done to their reputation with the OPO/Micromax crap, which will probably set back their OEM adoption somewhat Jan 30 15:21:50 hmm Jan 30 15:23:05 cyanogen is only cool becauseit runs on a bajillion different devices Jan 30 15:23:26 take that away and you have just another bloated confusing shitty package of oem modifications Jan 30 15:24:21 in theory they should be trying to achieve more professional-like quality now, given the millions - tens of millions now? - of dollars of investment cash they've got Jan 30 15:24:45 I use cyanogen, and I find it a bit better than stock images. Jan 30 15:25:22 $70m Jan 30 15:26:55 I created a new project in order to develop a custom view (including xmls, java files ,...). Now it's done, and I'm kind of happy with it. Is it possile to create a .jar file to use my view in other projects ? Jan 30 15:27:00 Syzygy: Yeah, if anything depends on Play Services (like Google Maps) then you will get a crash with no Play store Jan 30 15:27:37 blusky probably if you don't have custom xml attributes I think. Jan 30 15:27:49 which is funny when people sideload our app :/ Jan 30 15:27:59 Syzygy: What Play services are yall using? Jan 30 15:28:14 inapp purchases, maps Jan 30 15:28:17 gcm Jan 30 15:28:26 Syzygy you can check if the target device has playservices or not, and serve the user accordingly. Jan 30 15:28:32 I think we're not using maps in the current version Jan 30 15:28:47 well, working on backend stuff right now Jan 30 15:28:57 Syzygy: Got ya. Yeah, I was only using maps so I decided to just get rid of the embedded one and put a button that just launches an Intent with a geo Extra, haha. Jan 30 15:29:15 purchase verification, server to server Jan 30 15:29:21 documentation sucks. Jan 30 15:29:56 hi guys i want to send a header and a string with using REST API Jan 30 15:29:57 can we enable flash in webview? Jan 30 15:30:08 any good tutorial ? cuz i havent found till now Jan 30 15:30:18 Someone mentioned yesterday that it would be cool if Amazon, Cyanogen, some others come together and make a single replacement for Google Play Services. Very interesting idea. Things could get really crazy really fast if we get fragmented on the library level Jan 30 15:30:55 mappe definitely take a look at http://square.github.io/retrofit/ Jan 30 15:31:06 theblang: ty Jan 30 15:31:26 in reality, Android might get "very" fragmented in the future. Jan 30 15:32:16 theblang:i want to use apache this is not good for me right now :D Jan 30 15:33:13 mappe what do you mean? Apache is your back-end Jan 30 15:34:21 for example i get a data from rest api with using httpClient and httpResponse Jan 30 15:34:40 can't i send datas similar to this way ? Jan 30 15:34:58 mappe yeah, you can do both the get data and the send data using Retrofit Jan 30 15:35:06 mappe I am assuming you have an Apache back-end setup already? Jan 30 15:35:54 yes i dont want to use gson or something now Jan 30 15:36:00 this is my first rest project Jan 30 15:36:10 i want to keep it simple and usual Jan 30 15:36:29 Hi all, I have set up Parse with my android application and it crashes when running it on the emulator. I'm using android studio and this is the error message http://pastebin.com/N9UAdTzA Jan 30 15:36:38 does this lib have any advantag egiven android has navigation drawer https://github.com/jfeinstein10/SlidingMenu ? Jan 30 15:37:31 theblang: something like this http://stackoverflow.com/questions/25782582/send-put-request-in-android-to-rest-api Jan 30 15:39:49 mappe got ya. Unfortunately I can't be of help then. I can't stand doing http and JSON by hand. Jan 30 15:41:05 :D Jan 30 15:41:47 thanks again Jan 30 15:42:00 Hello! What do you guys use to automatically report crashes? Jan 30 15:44:07 Anyone know why i'm getting this error message with Android Studio? http://pastebin.com/N9UAdTzA Jan 30 15:48:18 luc4: check out ACRA https://github.com/ACRA/acra Jan 30 15:49:09 lamflam: ok, the same I found. But I read that android also has something built in for this as well. Is this false? Jan 30 15:49:11 luc4 we are using Google Analytics Jan 30 15:50:44 can webview play flash? Jan 30 15:51:26 anyone help me sending a data to database with REST api Jan 30 15:51:48 that's a pretty broad question that has tons of answers on google Jan 30 15:52:14 i tried a lot Jan 30 15:53:31 Hello. I have gradle plugin enabled in my android-studio but I when I open another project it says `gradle location location is unknown` Jan 30 15:56:02 does anyone use GeckoView? is it stable? Jan 30 15:57:43 literally from GeckoView's homepage: "Note that GeckoView is NOT ready to be used in a production environment. It is currently possible to load webpages, but that's about it." Jan 30 15:59:37 and thats on the first page Jan 30 15:59:40 at the top. Jan 30 16:00:47 trevor-e: oh that sucks… and webview cant play flash Jan 30 16:02:02 Anyone have links to good sources discussing whether support-v4 and appcompat-v7 should be used even with a minSdk > 7? Jan 30 16:03:45 yiati, yes Jan 30 16:03:47 no links Jan 30 16:03:48 just use it Jan 30 16:06:48 pfn: Yes I know "I" do. A client I am working with needs to know. I plan on telling them myself, but having something from Google would be nice too. Jan 30 16:08:45 hey guys… any solution to play flash on a webview? or load a page with flash :( Jan 30 16:09:43 luist why flash and not html5? Jan 30 16:10:23 wordToDaBird: because the government educational department has tons of educational flash content and they don’t wanna throw them all away Jan 30 16:11:13 wordToDaBird: so i must be able to open their website and play their amazing flash contant ¬¬ Jan 30 16:11:29 you're going to need to get a flash player Jan 30 16:11:52 yiati, write a page then Jan 30 16:13:53 macromedia has one, just override shouldovverideurlloading on webviewclient Jan 30 16:14:06 pfn: Yep I have. I would also like to cite outside sources. If you don't have anything to contribute then thank you. Jan 30 16:14:11 check for .swf file extension Jan 30 16:14:38 hmm... does a webview natively load a flash page? Jan 30 16:14:41 citing outside sources = if you want material theme on pre-lollipop, you must use appcompat and support Jan 30 16:14:43 tbh, I don't know Jan 30 16:16:35 luist: i'm pretty sure flash is close to, or already, dead on android. The stand-along plugins are all being killed off in favor of html5 Jan 30 16:17:08 pfn: Cool relevant to that I found this reference to cite http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html Jan 30 16:17:13 luist, yea you're going to have to setup an activity that calls a flash player. You could also script out converting the video from flash to another more easily usable format. .mp4 comes to mind. Jan 30 16:17:14 luist: I also THINK there is no way to load plugins in a webview. You're in a bad spot, in other words. Closed source format and all that isn't going to make it any easier. Jan 30 16:17:31 webviews can't support plugins Jan 30 16:17:37 wordToDaBird: if there are even any flash players any more, adobe killed most of that on android back around what, 2.3? Jan 30 16:17:39 if you want plugins in a webview, you must supply your own webview implementation Jan 30 16:17:46 pfn: that's what I thought Jan 30 16:18:05 that is google's recommendation for pre 4.4 devices Jan 30 16:18:16 in any case (security issues) Jan 30 16:19:23 ffmpeg will let you do the conversion Jan 30 16:19:24 any suggestion to send data using REST APi ? Jan 30 16:19:38 volley Jan 30 16:19:44 or retrofit Jan 30 16:19:57 I'm quite happy using retrofit tbh Jan 30 16:20:46 retrofit does it, question is how indepth is the rest calls coming back. you don't really need retrofit could just use gson. But, if you have a large formalized API you want retrofit. Jan 30 16:21:07 any tutorial about sending a json object Jan 30 16:21:21 look up volley json example Jan 30 16:21:30 "volley json post example" Jan 30 16:21:42 or go to github and search volley json Jan 30 16:22:13 here's my problem: I have a HorizontalScrollView and a ScrollView in a FrameLayout which overlay each other. If the user swipes horizontally, I want to detect that gesture and delegate the TouchEvent to the HorizontalScrollView, if he swipes vertically the TouchEvent should go the the ScrollView. Any ideas on how to do this properly? Jan 30 16:28:00 MrMaffen GestureDetector Jan 30 16:29:21 wordToDaBird: yea I have already played around with that a lot. I can detect the gesture, but I don't know how to delegate the touchevent to the correct ScrollView. simply calling ScrollView#onTouchEvent() throws and illegalstateexception :/ Jan 30 16:30:22 and I can't use onInterceptTouchEvent because the two ScrollViews are on the same hierarchy level. one is not the parent of the other. both are childs of one FrameLayout Jan 30 16:30:35 you have to override it on your scrollview class and that should handle the call Jan 30 16:30:56 luc4: from what I can tell, the built in feature doesn't require any work on your part. The user is prompted if they would like to send a crash statisitics and the logs show for oyu in the market Jan 30 16:31:13 wordToDaBird:i get a data using http://paste.ubuntu.com/9959051/, i just want to use similar way. it doesnt have to be that hard Jan 30 16:31:35 For quite some time now, everytime I release a new APK on GooglePlay, I get the following crash report (http://pastebin.com/AQmWHE1x). It is showing that my ApplicationLauncher code cannot be found (ClassNotFoundException) yet when I double check, I do see that the APK has the missing class. Also, this is intermittent. Jan 30 16:31:40 has anyone experienced something like this? Jan 30 16:31:50 lamflam: so there actually is such a feature... if my app crashes I see nothing. Probably because this is not a market app yet... Jan 30 16:31:53 lamflam: thanks! Jan 30 16:31:58 I am thinking this is caused by GooglePlayServices doing an update incorrectly Jan 30 16:32:44 wordToDaBird: I tried that, but here's the problem I ran into. I would override onTouchEvent and return true if the correct gesture has been detected, false otherwise. This however means that I can't finish with detecting the gesture, because onTouchEvent returns false and therefore never gets the subsequent MotionEvents Jan 30 16:36:15 sleepster check your package name in your manifest Jan 30 16:38:25 I'm trying to implement payment verification on our server which then contacts the google servers to check the data. Right now I'm having a hard time finding a list of scopes and their useages for the google credentials. Can someone help me find the right scope?. Jan 30 16:38:53 Syzygy what happens if instead of returning false when its not true, you return to super? Jan 30 16:39:41 sorry that was for MrMaffen Jan 30 16:39:41 I'm not sure how that is related. Are you sure you wanted to reply to me? Jan 30 16:39:46 alright Jan 30 16:41:10 Syzygy what do you mean by scopes? Which API are you using to connect to google's servers? Jan 30 16:42:40 I believe it's the Google Play Developer API via OAuth 2.0 Jan 30 16:43:31 thanks wordToDaBird but the error only occurs on updates and is intermittent Jan 30 16:43:41 wordToDaBird: I think there is something much deeper Jan 30 16:43:43 Hey, anyone using Magnet rest2Mobile here? I'm having some issue... http://i.imgur.com/0Wna4gC.png Jan 30 16:43:43 that is causing the problem Jan 30 16:44:49 Syzygy if you are implementing an API and working with it you should be sure of what version it is and should constantly keep the API open. Jan 30 16:45:25 https://developers.google.com/android-publisher/#subscriptions Jan 30 16:45:32 wordToDaBird, right now I'm just trying to find out how to connect to it. that alone is a huge issue imho Jan 30 16:45:43 rtfm Jan 30 16:46:01 google's api are usually pretty well written out, they give you a lot of information on the docs. Jan 30 16:46:20 all the problems you usually run into are covered right in the docs. Jan 30 16:46:21 I am, but the manual sucks and carries me over all those other APIs (which I can only assume connect the same way) Jan 30 16:47:10 tbh, I haven't messed with this API, others though and I always end up kicking myself when I skip reading and jump in. Jan 30 16:47:28 check the link you just sent me, I'm not interested in the publishing API, just in subscriptions and in app purchase API. Jan 30 16:49:13 that;s the second link Jan 30 16:49:43 click it. Jan 30 16:51:06 the first 3 links on that page link to a somewhat unhelpfull API reference page, the last link links you to how to implement purchases into android which got me here in the first place Jan 30 16:51:17 and then the rest is about publishing again Jan 30 16:51:35 Syzygy http://developer.android.com/google/play/billing/index.html Jan 30 16:51:36 all the code samples are also about publishing, but I assume I can try to adjust the connection code Jan 30 16:52:51 Does anyone know why I'm getting this error message, fairly new to android http://pastebin.com/3upMH6aB Jan 30 16:53:09 I'm trying to use geocoder.getFromLocationName("852 rang Montcalm, Chertsey, Quebec, Canada J0K 3K0", 20) and it returns no results. Does anyone have a clue? The Geocoder is in an AsyncTask. The Activity context is passed in Jan 30 16:53:14 again, if you read that it says that purchase verification should be done on a secure backend. not really anything more. I assume I should use the Google Play Developer API Jan 30 16:53:20 which I'm trying to do right now. Jan 30 16:53:49 grill, is it looking for a class that isn't public? Jan 30 16:55:16 grill, are you using the parse api or facebook? how are they included? Jan 30 16:55:35 Parse API, i have built a separate class that include the keys Jan 30 16:55:41 ParseInitialize Jan 30 16:56:18 I think the library itself (not the keys) isn't added to the project correctly. Jan 30 16:57:47 is it a submodule? a jar? Jan 30 16:57:54 a jar Jan 30 16:57:57 maybe a dependency of the library is missing? Jan 30 16:58:27 e.g. bolts Jan 30 16:58:37 I got a textswitcher, with some animation for transition Jan 30 16:58:51 if I do in the same method setText("a");setText("b"); Jan 30 16:59:01 the animation for A is skipped Jan 30 16:59:07 and I just have B Jan 30 16:59:25 is there a way to tell the textswitcher to wait current animation to finish Jan 30 16:59:28 a added it by pasting it into libs folder and added to gradle Jan 30 16:59:31 in order to go to he next transition ? Jan 30 16:59:47 I added dependency via gradlee Jan 30 16:59:53 blusky, textSwitcher.onAnimationEnd() Jan 30 17:00:08 grill, try also adding the bolts library Jan 30 17:00:16 how do i do that? Jan 30 17:00:31 the same way you added the previous lib Jan 30 17:01:03 Syzygy: it's not really what I want, cause what about if I make 5 chained "setText" ? Jan 30 17:01:42 grill, compile 'com.parse.bolts:bolts-android:1.1.4' assuming you have maven central in your repositories Jan 30 17:02:26 i don't have that in my repositories Jan 30 17:02:38 blusky, get some case management going I guess. I'm pretty sure you'll have to implement that one yourself. Jan 30 17:03:29 a simple way to implement it yourself would be to build a queue and let onAnimationEnd read from the queue Jan 30 17:03:53 there are no "onAnimationEnd" :( Jan 30 17:04:11 grill: in build.gradle repositories{ Jan 30 17:04:11 mavenCentral() } Jan 30 17:04:51 blusky, according to http://developer.android.com/reference/android/widget/TextSwitcher.html there is Jan 30 17:05:31 oh, ok, I need to make a class taht extends textswitcher Jan 30 17:05:33 i'll try that :) Jan 30 17:06:16 trying that now syzygy Jan 30 17:08:49 Does no one know the valid scopes for the google play developer API? Jan 30 17:08:52 hi Jan 30 17:09:52 Here is my code for the GeoCoder problem, please take a look. http://pastebin.com/sq3VFvp1 Jan 30 17:12:14 Syzygy: strange... when I overrite "onAnimationEnd()" and call super(), I got a "Cannot resoler super method" :/ Jan 30 17:12:35 dunno Jan 30 17:12:43 got it ... Jan 30 17:12:47 super.onAnimationEnd() ... Jan 30 17:12:52 He literally called super()... Jan 30 17:13:03 1000 sorries :D Jan 30 17:13:30 I've seen worse errors. Jan 30 17:14:29 Syzygy https://developers.google.com/+/api/oauth Jan 30 17:15:53 do i add mavenCentral() to build script or allprojects Jan 30 17:16:14 upload your build.gradle Jan 30 17:16:23 it shouldn't be surrounded by anything in any case Jan 30 17:17:14 http://pastebin.com/XcA5wY9y Jan 30 17:17:19 like, if you have stuff in repositories already then it should be like repositories { mavenCentral() stuff{} } Jan 30 17:18:05 thats the one within my project, then i have one outside my project which has repositories { jcenter() and mavenCentral() } - mavenCentral just added Jan 30 17:18:21 as long as it's not in scope of dependencies or android it shouldn't matter. I suggest you put it in line 2, and put dependencies under it. Jan 30 17:19:12 wordToDaBird, thanks, that's what I've been looking for. was finally closing in on that link, but would probably still have taken a bit to find it. Jan 30 17:19:48 only problem now is that none of them seem like they give me access to the purchase history of the user :/ Jan 30 17:21:59 didn't work same error messagee Jan 30 17:30:23 wordToDaBird, In case you're interested in my issue. This should actually help me. http://stackoverflow.com/questions/12427479/am-i-getting-the-steps-right-for-verifying-a-users-android-in-app-subscription Jan 30 17:30:42 errr &$^^! x11-proto/fonts-proto-2.1.3:0/0::gentoo ebuild schedule for merge conflits with x11-proto-fontsproto-2.1.3 required by.... Jan 30 17:30:45 I really hope that will work, but for now I'm taking a break and going home. Jan 30 17:30:54 err version 2.1.3 conflicts with verison 2.1.3 ? Jan 30 17:31:22 does Bluetooth suck for >= Jelly Bean or is it just me Jan 30 17:31:25 I440r, that doesn't seem to be an android related issue Jan 30 17:31:36 I have nothing but connection problems with bluetooth on newer versions of android Jan 30 17:32:03 MooGoo, 4.4.4 is ok for me Jan 30 17:32:14 "read failed, socket might closed or timeout, read ret: -1" is it's favorite Bluetooth exception Jan 30 17:32:16 MooGoo, in 4.2.1 it's broken Jan 30 17:33:34 maybe it's just the tablets I'm using, but everything newer than ICS gives me nothing but trouble, usually refusing the connection entierly, sometimes it works like once rarely Jan 30 17:34:51 usually resulting in that engrish exception Jan 30 17:41:56 oopts wrong channel lol Jan 30 17:42:03 my bad, that was for #gentoo Jan 30 17:51:04 Hi all! Jan 30 17:51:29 I have a question about Android ART. It is not a virtual machine like Dalvik is, right? Jan 30 17:54:55 mdim http://source.android.com/devices/tech/dalvik/ Jan 30 17:55:44 wordToDaBird: yeah, I've read that, but that doesn't answer my question Jan 30 17:56:17 ART and its predecessor Dalvik were originally created specifically for the Android project. ART as the runtime executes the Dalvik Executable format and Dex bytecode specification. Jan 30 17:56:55 I thought ART compiles .dex files into ELF files Jan 30 17:57:19 and then simply executes ELF files like a regular GNU/Linux system Jan 30 17:57:34 is there a way to decompile an apk and run it in a debugger, or even run a debugger on it on the android tablet its on? Jan 30 17:57:46 (I have an APK that's crashing, trying to find relevant debug data) Jan 30 17:57:55 (It's been 50 minutes, so I'm reposting this :) ) Here is my code for the GeoCoder problem, please take a look. http://pastebin.com/sq3VFvp1 Jan 30 17:59:06 MikeWallaceDev_: Your pastebin doesn't say what the issue is Jan 30 18:00:13 I think he's just telling us to look at it. Jan 30 18:01:39 mdim I think you are essentially correct. As I understand it, ART moves JIT compilation by a JVM to the install phase of the APK. Jan 30 18:02:29 these days there's this trend to have profile image as rounded image with a thin/thick white border, is it easy to achieve ? supported by api 21 or sorta complicateD? Jan 30 18:03:13 mdim but your phrasing probably oversimplifies the comparison with the ELF environment under Linux Jan 30 18:03:23 shmoon_, there's at least two libs on androidarsenal that do that for you :P Jan 30 18:03:58 FlipBill: yeah, that's my understanding. So, ART executes ELF files. What is an equivalent in the GNU/Linux/Unix world? Jan 30 18:04:53 mdim, I think it executes .oat files. Jan 30 18:04:57 okay :D Jan 30 18:05:52 Anyone here have experience with reading the compass sensor (particularly on android wear) Jan 30 18:05:53 ELF files are the typical binaries on Linux boxes. Jan 30 18:06:29 And as promise, roughly 11 hours later, I'm back! Jan 30 18:06:40 mdim, note that ELF .so is just a container for ART artifacts Jan 30 18:06:44 FlipBill: yeah, I know that about the ELF format. So, what's the output of dex2oat and where is it used? Jan 30 18:06:57 ...now Im back Jan 30 18:07:00 ...technically Jan 30 18:07:03 mdim, inside you can still get two types of payloads: compiled with LLVM to "native" matchine code or bytecode that has to be interpreted Jan 30 18:07:18 But the difference, I suppose, is in the general file structure, as opposed to the low-level content, which is machine code. Jan 30 18:07:26 in both cases. Jan 30 18:07:48 Thank you Mavrik Jan 30 18:07:58 I have a shared library module which both my android app and wear app use to calculate compass direction. The readouts match expected values when using the phone's compass sensor, but the watch compass sensor is always extremely off, even while other android wear compass apps work perfectly on the same device. Anyone know what I might be doing wrong? Jan 30 18:08:10 so, does an ELF on an Android with ART have machine code or something else? Jan 30 18:08:18 https://github.com/culmor30/cgeo-wear/blob/master/locationUtils/src/main/java/com/javadog/LocationUtils/LocationUtils.java#L94 Jan 30 18:08:32 So it's a hybrid, whereas ELF would be pure machine code + additional attributes for load/execution guidance. Jan 30 18:08:41 mdim, as I said, it can contain both. Jan 30 18:09:15 mdim, either OAT machine code (so-called "quick" payload) or a so-called "portable" payload which is still bytecode and is JITed Jan 30 18:10:27 also, OAT files can have DEX code as well ;) Jan 30 18:10:44 going back to my original question, would this mean ART is a virtual machine? Jan 30 18:11:47 mdim, http://newandroidbook.com/files/Andevcon-ART.pdf Jan 30 18:12:03 mdim, no and yes. Jan 30 18:12:21 sorry, we're past software design with simple answers. Jan 30 18:12:28 its replacing dalvik which is a VM so it should be probably also with a GC Jan 30 18:12:34 hello Jan 30 18:12:39 hello fer Jan 30 18:13:09 mdim, does it really matter whether you call it a virtual machine? Jan 30 18:13:18 how could I add ActionBarSherlock in Android Studio ? Jan 30 18:13:49 I think compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' Jan 30 18:13:51 FlipBill: I'm just trying to understand it Jan 30 18:13:52 I'm trying create add like a module but doesn't works Jan 30 18:13:58 mdim, what problem are you trying to solve that requires that question to be answered yes or no? Jan 30 18:14:30 fair enough. - I would say the label does not matter. How do you define a virtual machine? Jan 30 18:14:44 Something being a "virtual machine" is such a anachoristic terminology Jan 30 18:14:52 most modern VMs don't interpret most of the code anymore Jan 30 18:14:52 you should not be using ActionBarSherlock anymore Jan 30 18:14:57 the lib is deprecated Jan 30 18:15:01 good point Jan 30 18:15:02 shmoon_, volley is the same way ? Jan 30 18:15:37 FlipBill: not sure. I'd use a definition from Wikipedia or something like that Jan 30 18:15:46 I suppose if it can contain byte code that must be interpreted at any run time phase, then it can be called a VM. Whatever. Jan 30 18:16:16 mdim, Well, then go edit Wikipedia and you'll have your answer. Jan 30 18:16:23 so ART does AOT compilation, but it uses JIT as well at runtime? Jan 30 18:16:42 I defer to Mavrik on that. Jan 30 18:17:14 But I assmue it must, or the app won't run with hybrid content in the apk Jan 30 18:17:29 or the installed version of the apk, more precisely. Jan 30 18:17:31 mdim, it certainly supports loading dex byte code at runtime. You can dynamically load classes from dex files Jan 30 18:18:05 Anyone know why i'm getting the error message within the code in this pastebin ? http://pastebin.com/3qb58dhn Jan 30 18:19:23 FlipBill, yeah, also dynamic code loading would be problematic Jan 30 18:19:24 :) Jan 30 18:19:35 as lamflam said. Jan 30 18:19:39 yup Jan 30 18:20:45 hmmm, Camera2 api looks kinda neat Jan 30 18:22:07 does it see through walls or sumpin'? Jan 30 18:24:32 grill: probably because of this loginbutton = (Button) findViewById(R.id.login); Jan 30 18:24:37 R.id.login doesn't exists Jan 30 18:26:04 are there nice material design templates or somethig using which i can quicly code my login, signup, settings, etc. screens ? Jan 30 18:26:13 some place where I can quickly grab them and use Jan 30 18:28:49 login does exist in sign_in.xml Jan 30 18:29:19 sorted it :) Jan 30 18:29:35 what was wrong? Jan 30 18:29:48 guys, thanks for the discussion on ART! Jan 30 18:29:50 so long Jan 30 18:30:05 i named login wrong in the xml file doh! Jan 30 18:30:48 use android studio , you won't make the mistake of typing in the wrong resource id name in the activity then Jan 30 18:34:32 http://www.addictivetips.com/android/art-vs-dalvik-android-runtime-environments-explained-compared/mdim: Jan 30 18:34:35 Jan 30 18:34:49 remove your name from the end of that mdim Jan 30 18:35:02 Can annyone help me with my problem Jan 30 18:35:12 gregor2: Dont ask to ask, just ask Jan 30 18:36:05 I just want to extract the android ndk on debian wheezy but it says i dont have the glibc 2.14 Jan 30 18:37:55 I tried 7z to but only got a lot of source code files!\ Jan 30 18:43:33 anybody here have used this: https://github.com/jd-alexander/Google-Directions-Android Jan 30 18:43:35 ? Jan 30 18:43:56 nope Jan 30 18:44:00 no one Jan 30 18:44:18 I'm trying add this project in my Android Studio Jan 30 18:44:20 nope, never heard of it. Looks reasonable, though I thought a lot of that got put into the v2 maps api already Jan 30 18:44:40 I need create a how to get in my application Jan 30 18:45:08 http://stackoverflow.com/questions/28240840/how-to-get-using-googlemap-source-and-target/28241237?noredirect=1#comment44844403_28241237 Jan 30 18:46:30 if anybody could help me I will be happy Jan 30 18:47:26 so you want us to make you happy? Jan 30 18:47:38 SimonVT, Awww geez, I'm sorry, I had wrote it above. I should have added it in the pastebin too. Jan 30 18:47:55 The problem is that no addresses are returned. I get a null address list. Jan 30 18:48:38 Anyone have any idea why the same piece of code would correctly read the compass on a phone but appear extremely inaccurate on an android wear watch? Jan 30 18:48:56 Other wear compass apps seem to work fine on it, but I can't find any open-source ones :( Jan 30 18:49:14 JavaDog, it could actually be a hardware problem... the compass gets out of whack Jan 30 18:49:48 shmoon_, I need create that ...I'm looking for a how to make this Jan 30 18:50:54 MikeWallaceDev_: I can start up another compass app immediately after using mine and it will work fine. It seems to just be my code, somehow Jan 30 18:51:16 I went as far as to try the deprecated Sensor.TYPE_ORIENTATION route Jan 30 18:51:35 then you will have to show some code :) Jan 30 18:51:54 https://github.com/culmor30/cgeo-wear/blob/master/locationUtils/src/main/java/com/javadog/LocationUtils/LocationUtils.java#L94 Jan 30 18:54:59 someone helped me write that low pass filter and now that I look at it I'm not sure whether it's even right Jan 30 19:02:33 i really need to understand the concept of themes especially their connection with action bars, is there some article to clarify it ? Jan 30 19:07:10 JavaDog, I don't see how this can ever NOT fail : if(gravity != null && geomagnetic != null) { Jan 30 19:07:39 so line 101 Jan 30 19:08:07 gravity and geomagnetic are class members, they get set above there Jan 30 19:08:24 onSensorChanged is called many times by the system Jan 30 19:08:56 that block most assuredly gets entered Jan 30 19:12:43 Ok, gotcha, it might not be entered right away, but eventually it goes through. Jan 30 19:13:06 yup Jan 30 19:17:24 wow i've just seen the issue tracker is having a bad time with spammers Jan 30 19:18:09 The only thing I can think of is that maybe I need to be accounting for the device's orientation? Jan 30 19:18:47 I know the compass on my phone begins to behave very strangely if it gets turned upside down Jan 30 19:22:02 why is debugging native code in Android Studio all messed up Jan 30 19:22:06 all the line numbers are wrong Jan 30 19:22:55 O.o Jan 30 19:23:09 since when is there a C debugger in AS? Jan 30 19:23:16 the blue execute line passes over random parts of the code even comments Jan 30 19:23:20 er Jan 30 19:23:24 I mean Jan 30 19:23:38 native as in SDK functions and stuff Jan 30 19:23:56 You need to have the exact source file used when compiling the rom for that device to accurately step through framework code Jan 30 19:24:17 oh Jan 30 19:24:43 yp Jan 30 19:24:52 It ~works for nexus devices/emulator, assuming you attached sources for the right api level Jan 30 19:24:56 so exact same source version on a Nexus :) Jan 30 19:25:06 I got some crazy samsung Jan 30 19:25:23 cant use the emulator cause need bluetooth Jan 30 19:27:16 MooGoo: Feel your pain Jan 30 19:27:24 Open the source file in another editor, step through the code.. Try and guess where it is based on what it's calling, etc Jan 30 19:27:35 That's about as good as it's going to get Jan 30 19:28:07 Should still be able to inspect variables then Jan 30 19:28:18 ^ yeah. it sucks, but at least it works. and you can often figure out where you are by the local variables. Jan 30 19:32:48 on an unrelated note: why did I not know about this before? http://androidxref.com/ Jan 30 19:33:00 that might remove my need for local source code... Jan 30 19:33:27 I still prefer having the source code available in IDEA Jan 30 19:33:45 so you can simply "go to definition", or actually debug into it, if you have the exact source. Jan 30 19:34:32 yeah, but "sources for sdk" solves that. I mean the whole AOSP repo Jan 30 19:35:47 I've just cloned frameworks/base/ for the cases where sdk sources isn't enough Jan 30 19:36:05 that does cover the vast majority of what I look at, yeah Jan 30 19:36:43 packages is also useful Jan 30 19:38:05 If I find myself looking at a repo often enough, I clone it Jan 30 19:38:12 I'd love to see the source for the rom running on this device, because something about it is causing Bluetooth to fail for my app Jan 30 19:38:32 Other than that, I just use googlesource Jan 30 19:39:05 MooGoo which device, btle or rfcomm ? Jan 30 19:39:16 rfcomm Jan 30 19:39:18 https://www.youtube.com/watch?v=Sz2C7_nU1jw thats pretty cool Jan 30 19:40:16 I love how friendly this channel is. Jan 30 19:40:49 I spent a few days in ##java not long back and had some knobhead shit on me because I had the audacity to make a new programmer aware of the existance of hungarian encoding. Jan 30 19:41:25 So, in short, I appreciate you all :-) Jan 30 19:41:28 Anthaas: DO YOU REALIZE WHAT YOU'VE DONE YOU'VE DESTROYED US ALL Jan 30 19:41:29 Anthaas, agreed. It's a good place. Jan 30 19:41:37 lol Jan 30 19:41:41 No honestly though Jan 30 19:41:45 I have never seen someone get so pissed. Jan 30 19:41:59 Anthaas java changes people /// Jan 30 19:42:04 word. Jan 30 19:42:05 Apparently I dont respect anything didactic in nature. Jan 30 19:42:16 It's typical IRC. But there is a lot of patience and tolerance here. Jan 30 19:42:17 im going to have to start being extra pissed off so i get asked less questions :| Jan 30 19:42:21 joke. Jan 30 19:42:45 Apparently his social value in that channel was so high I had no right to argue with him. Jan 30 19:43:18 Which is the IRC equivalent of a celeb walking into a group of people shouting "Do you know who I am?" Jan 30 19:43:48 JakeWharton shouting in here "Do you know who I am?" Jan 30 19:44:01 i know who you are, gman23 Jan 30 19:44:07 You have no idea Jan 30 19:44:11 i have always know you Jan 30 19:44:15 i will always know you Jan 30 19:44:20 we are one Jan 30 19:44:20 lol Jan 30 19:44:21 He's watching you Jan 30 19:44:30 Do we...do we do the fusion now? Jan 30 19:44:39 Im not even naked yet though Jan 30 19:44:42 Better not. We'd be too...something. Jan 30 19:44:49 FABULOUS Jan 30 19:44:53 We'd be too fabulous Jan 30 19:45:39 It's 1.30am and am I drunk or what is even happening Jan 30 19:45:41 :p Jan 30 19:46:15 you appear to be in a temporal anomaly, since it's ??:45 in most of the world Jan 30 19:46:20 your confusion is understandable Jan 30 19:46:36 Jake stated that he has always known me, that he will always know me, and that he and I are one. Jan 30 19:46:57 gman23 is JakeWharton Jan 30 19:47:14 yes. now fix all these bugs Jan 30 19:47:19 tl;dr: he said what we've all known, deep inside, but couldn't admit. Jan 30 19:47:52 Bugs! HA! I have my own pile to fix Jan 30 19:48:48 And bonus! I get to continue to deal with Android's inability to simply expand/collapse in RecyclerView Jan 30 19:49:51 For quite some time now, everytime I release a new APK on GooglePlay, I get the following crash report (http://pastebin.com/AQmWHE1x). It is showing that my ApplicationLauncher code cannot be found (ClassNotFoundException) yet when I double check, I do see that the APK has the missing class. Also, this is intermittent. Jan 30 19:49:59 has anyone experienced something like this? Jan 30 19:50:04 I am thinking this is caused by GooglePlayServices doing an update incorrectly Jan 30 19:52:29 sleepster: yeah, you sometimes see some weird exceptions Jan 30 19:52:44 unless it's happening a lot.. I would say just ignore it Jan 30 19:54:00 JesusFreke: it seems to happen every update Jan 30 19:54:11 like I can track the crash spikes Jan 30 19:54:18 on each release of my app Jan 30 19:58:36 gman23: you mean that's still broken? sweet! now I don't have to even attempt to make it work! Jan 30 19:58:37 Hi all, parse comes with some built in methods i.e. setEmail, setUser, setPassword ... is there anyway i can make my own, if so where would the file be Jan 30 19:58:39 So, I can call ndef.getNdefMessage() right after ndef.writeNdefMessage to verify that everything was written correctly. However, if I try to call Ndef.get(tag) after formatting a tag, it always returns null. Any suggestions on how to verify that the NFC tag wrot correctly? Jan 30 20:00:17 third party google now cards! http://insidesearch.blogspot.de/2015/01/google-app-update-get-now-cards-from.html Jan 30 20:00:33 sleepster: I see that at times when the app is open and I install over / update the app, while developing. small possibility it's the same thing? Jan 30 20:00:40 or at least something very similar Jan 30 20:02:34 "Now cards from apps are currently under development and are not available to all apps. We'll let you know when we are able to onboard more partners." Jan 30 20:02:48 hm. not open = less interesting :( Jan 30 20:03:21 might be a good sign for opening it up in the future though? Jan 30 20:03:53 yeah, but too open could be pretty bad as well I think Jan 30 20:04:04 hopefully Jan 30 20:04:15 good evening Jan 30 20:04:15 most of these examples are pretty us centric :/ Jan 30 20:05:49 hello Jan 30 20:17:41 has anyone read "Android Programming: Pushing the Limits" and have any opinions on it? debating buying a copy. Jan 30 20:19:07 most android books seem especially poor Jan 30 20:19:17 agreed. hence my asking :) Jan 30 20:19:57 its like there is a curse over the authors or something. the few people that really understand the stuff don't write books, the writers don't know what they are talking about :D Jan 30 20:21:23 I watched a Parleys presentation by the author, it did have some solid information in it, which is why I'm a bit interested. Jan 30 20:21:43 since the pirate bay is back why dont you buy it from them? Jan 30 20:21:45 * Ashiren hides Jan 30 20:21:56 idiot. Pirate Bay doesn't sell books. Jan 30 20:22:24 then how come i have this huge collection :v Jan 30 20:22:41 https://parleys.com/play/5300f217e4b0c04daeac9de5/chapter0/about if anyone is interested. (you can get around the sign-up-wall by just deleting the dom node, or using bugmenot, or something) Jan 30 20:22:41 They don't sell them Jan 30 20:23:00 thus it's impossible to buy it from them Jan 30 20:33:30 Hey is there a way to get the launching program from an intent? Jan 30 20:33:47 How can I tell which program launched my app? Jan 30 20:35:08 you can't, unless they used startActivityForResult Jan 30 20:35:23 then I think it's sometimes possible, but I don't recall how offhand :) Jan 30 20:36:07 so I recently had to change the package name of my project, and since then I'm getting ClassCastExceptions everywhere Jan 30 20:36:30 well, when running tests, I do Jan 30 20:36:48 shekibobo: tried cleaning? I would _hope_ it's not necessary, but yeah. Jan 30 20:36:57 well, that's the weird thing Jan 30 20:37:11 if I run $ ./gradlew clean testDebug, I don't get the errors Jan 30 20:37:28 if I run $ ./gradlew clean ; ./gradlew testDebug, I get the errors Jan 30 20:38:40 our jenkins server was getting these problems, I wasn't until split the commands Jan 30 20:40:01 I don't know if that's a gradle bug or what Jan 30 20:42:21 so in my gradle, I have applicationId "com.myapp.new" Jan 30 20:42:46 I didn't change the folder structure, since I use full package paths in the android manifest Jan 30 20:43:11 I did have to change my assets package to match 'com.myapp.new.R' Jan 30 20:43:34 and packagename in AndroidManifest was changed to 'com.myapp.new' Jan 30 20:48:47 definitely strange. dunno, never seen that one. Jan 30 20:57:06 g00s: Isnt Commonware guy's book supposed to be good? Mark Murphy Jan 30 20:57:48 I wish they'd release an RC/beta of the Android Gradle plugin. Jan 30 20:58:21 TacticalJoke it already is rc/beta Jan 30 20:58:29 :D Jan 30 20:58:39 it's a fairly decent reference imo. covers a heck of a lot, in decent detail, and is mostly correct code. not necessarily _optimal_, but he clearly knows the framework. Jan 30 20:58:46 Anthaas: ^ Jan 30 20:59:01 the early editions were poor imho, i haven't looked in the last few years Jan 30 20:59:08 I'd still love to look at the latest version of it. Jan 30 20:59:08 I kinda feel that manually doing stuff and looking at the AOSP code is more useful, given time constraints. Jan 30 20:59:13 Compared to reading even the best book. Jan 30 20:59:15 i think he still has a section recommending loaders though :( 'tis quite saddening. Jan 30 20:59:48 TacticalJoke: yeah. which is why I label it a reference, not really a "learn to program android" book :) Jan 30 21:00:43 also: I'm explicitly not claiming much beyond "fairly decent". that + how much content there is = more useful than most, but YMMV. and that's not a high bar. Jan 30 21:01:04 i look at the aosp when the docs aren't sufficient, but then you're looking at implementation details Jan 30 21:01:19 the contracts you program to should be in the documents Jan 30 21:01:35 Right. It's not ideal. Jan 30 21:01:49 Yeah, the number of libraries Ive seen with Javadocs is beyond belief. Jan 30 21:01:54 How am I supposed to know how to use it?? Jan 30 21:02:06 did you mean "without"? Jan 30 21:02:13 or, I guess it goes both ways Jan 30 21:02:26 I hate auto-generated JavaDoc. Jan 30 21:02:29 They'd have public methods with no docs Jan 30 21:02:34 Oh same, but they should create some! Jan 30 21:02:49 Actually thats a lie Jan 30 21:02:53 I dont have auto-generated Jan 30 21:02:59 I hate insufficient docs Jan 30 21:03:38 People used to go crazy with redundant documentation comments in C#. It seemed to be worse there, for some reason. Jan 30 21:03:50 And their XML documentation-comment syntax was so bloated. Jan 30 21:04:40 Anthaas: oh, one other bit of input for the commonsware book: a not-insignificant reason I bought it is because his SO replies are numerous and valuable. I figured he'd earned at least that much from me :) Jan 30 21:04:41 It was full of stuff like "public void ShowMessage(string message)" with 'documentation' like "Shows the message" and "message: the message to show". Pointless noise. Jan 30 21:05:12 i thought his SO replies were often rude and flippant Jan 30 21:05:29 Yeah, I get that impression, g00s. Jan 30 21:06:09 and wront too often, to be an authority writing a book Jan 30 21:06:55 i also thought code in cwac- libraries was seriosuly wtf Jan 30 21:07:39 This is the kinda stuff I used to see all the time in C#: http://stackoverflow.com/questions/778611/how-do-you-avoid-redundancy-in-documentation-comments Jan 30 21:08:48 eh, maybe I just haven't seen those replies. entirely possible. Jan 30 21:09:01 by naming your variables and methods properly Jan 30 21:09:14 Exactly, shmooz. Jan 30 21:10:18 The accepted answer to that question is also so typical, suggesting that pointless bloat-comments are find because they occasionally contain information that isn't redundant. Jan 30 21:10:21 fine* Jan 30 21:11:02 You can make your methods/parameters less descriptive, making the documentation necessary Jan 30 21:11:12 :D Jan 30 21:11:26 I believe java8 requires all that crap as well Jan 30 21:11:36 Or rather, spams you with warnings Jan 30 21:11:50 The compiler complains about the lack of JavaDoc on public methods? Jan 30 21:12:02 Oops, "Javadoc". Jan 30 21:12:13 Yeah Jan 30 21:13:18 doclint, that's what the feature is called Jan 30 21:14:18 hey guys, i want a spinning progressDialog which spinns while i`m finishing an activity with "finish()" but i dont know how to make it spinn since i`m not doing anything in a loop.I need something like:"start spinning until function finish() is done" Jan 30 21:15:20 * mikedg spears SimonVT Jan 30 21:15:25 adkins: doesn't it just spin anyway ? Jan 30 21:15:38 no it doesnt Jan 30 21:15:58 adkins: calling finish should be quick Jan 30 21:16:00 only if i do a endless loop and setProgress(someValue) ;) Jan 30 21:16:04 if its not you are doing something wrong Jan 30 21:16:04 can someone help me? my app isn't ever listed in the "Running" menu and i have no idea why not Jan 30 21:16:17 Yeah, why would you need to show a progress widget just for finishing an Activity? Jan 30 21:16:20 it's running a service, and i can switch to the app Jan 30 21:16:25 well i`m resuming from preferenceActivity and applying settings there Jan 30 21:18:08 mikedg: settings like reassigning different images to buttons, rescaling them etc.....would you say that is wrong if it takes 2 or 3 seconds? Jan 30 21:21:40 adkins: To be clear, are you saying that you're blocking the UI thread for 2-3 seconds in this situation? Jan 30 21:23:42 well, i think you can forget my question........i`m just doing a lil work at onResume in MainActivity after comming from PReferenceActivity, so i think if i want a progressDialog on that work in MainActivity i should let it spinn there and not at finishing in PreferenceActivity Jan 30 21:24:13 Yes, but if you're blocking the main thread then the user won't see a spinning ProgressBar. Jan 30 21:24:16 That requires a non-blocked thread. Jan 30 21:26:53 TacticalJoke: some more information? i come in onResume, i start a non-blocked thread? where do i start the progresDialog? Jan 30 21:27:53 This guide gives the basic idea: http://developer.android.com/training/displaying-bitmaps/process-bitmap.html Jan 30 21:28:02 I think (though I'm not certain) that AsyncTask is actually good in this case. Jan 30 21:28:25 Because it's short-term UI-specific processing. Jan 30 21:29:54 In any case, you'll want to use some kind of background thread (whether via AsyncTask or not) for any processing that's taking several seconds. It's just not reasonable to block the main thread for that long. Jan 30 21:30:24 Then you can just start the task, show a Progress[Whatever], and get a callback when the task has finished. Jan 30 21:30:29 TacticalJoke: thx, i already played with asyncTask......gotto play with it some more at the right place ;) Jan 30 21:35:19 adkins: and probably the reason you don't see it spinning is because of the blocking Jan 30 21:35:43 shmooz: yea i figured that out too now ;) Jan 30 21:36:17 what's the easiest way to communicate between notification action and a service? currently my notifications extras have pending intents with special intent extras and the service checks for them in onStartCommand, but that seems pretty clunky to me Jan 30 21:38:16 groxx: Thats a fair shout Jan 30 21:38:50 Although g00s is right. Even I have corrected one of his posts once. Jan 30 21:40:50 adkins: I may have missed something above, but: you want a progress spinner, and you're animating it in a loop? can you just make it indeterminate? that'll "spin" without any further work. Jan 30 21:41:25 Anyone know how often the google group posts are moderated? I posted like 3 days ago and it hasn't shown up :( Jan 30 21:41:28 I took it that he was blocking the main thread and expecting a ProgressBar to spin. Jan 30 21:41:57 groxx: it is spinning ;) Jan 30 21:41:59 yea, that part I caught Jan 30 21:42:24 adkins: great, I'll go back to whatever :) Jan 30 21:43:57 Memorion: that's basically the only option. if for some reason it's easier / you want to store a lot more data, you can save it to disk however is convenient and put the uri in the intent. Jan 30 21:45:34 groxx no I just want to enable/disable a broadcastlistener in the service and it works, it just seemed a little weird and I wanted to make sure I wasn't overlooking a simpler alternative, thanks! Jan 30 21:46:03 sadly, yeah, nothing simpler :) Jan 30 21:47:04 Anyone here that has experience with serial communication over USB that could help a noob out? :D Jan 30 21:47:23 is there a way to loop through the values stored with Data(In/Out)putStream? Jan 30 21:48:19 More than likely, my problem however is that I'm not actually able to read anything. Regardless of what/how I send I never receive data Jan 30 21:50:45 newbQ: I don't believe so. Can't you just read it in order and then process it? Jan 30 21:51:36 What I mean is that there's no random access. Once you've read it, though, you're free to do whatever you want with the data. Jan 30 21:51:52 How do you guys organise your code and methods in a single class? Jan 30 21:52:02 TacticalJoke: I'm trying to read in the dat file to an arrayList without knowing how many elements exist within the dat file Jan 30 21:52:14 Reader? Jan 30 21:52:24 Read a file using something like a BufferedReader Jan 30 21:52:31 read it line by line that way Jan 30 21:52:45 oh DAT file Jan 30 21:52:46 sorry Jan 30 21:53:41 wait. DAT wont work either because I want to keep the GregorianCalendar objects too Jan 30 21:55:21 newbQ: What exactly are you storing and retrieving? You'll avoid wasting time by figuring out exactly what you need in advance. :) Jan 30 21:56:14 You can keep reading DataInputStream until EOF (and appending a List every time you read), but whether DataInputStream is best depends on your requirements. Jan 30 21:56:49 TacticalJoke: I'm trying to store and retrieve a table with two columns being GregorianCalendar objects and the third column being a double (the difference in hours between the two previous fields). Jan 30 21:57:36 I think I might be better off with just three separate ArrayLists. But I still dont know how to save the Greg objects Jan 30 21:58:12 gregorian calendars are entirely defined by their milliseconds-since-unix-epoch afaik Jan 30 21:58:18 you just need to store a long Jan 30 22:00:05 has anyone encountered Duplicate zip entry classes.jar/path/to/file/BuildConfig.class when proguard runs? Jan 30 22:00:24 ok, so then I should be able to write a Greg to a DAT? Jan 30 22:02:14 newbQ: you'd call calendar.getTimeInMillis(), save that long to the DAT. when you load, read the long, make a calendar, and call .setTimeInMillis(the_long). I don't know what the DAT format is in particular though. Jan 30 22:02:31 brb Jan 30 22:03:24 i'll give it a shot and see if it works. Jan 30 22:03:36 calendars are essentially _relative_ date-calculation (and date-display) objects, not absolute. a unix timestamp is absolute, and almost everything can get or set a unix timestamp. Jan 30 22:05:53 Does that mean I should be using a unix timestamp? I just want to capture the time and date in one variable and be able to use the calendar functions and read/write it to a file Jan 30 22:07:05 yeah. use the calendar to do math on the date (like adding days / months / etc), use unix timestamps for storage or transferring. Jan 30 22:08:01 I take it that means there's already a method to convert them back and forth? Jan 30 22:08:05 the calendar will correct for things like leap years / different concepts of months, where "timestamp + [365 days in milliseconds]" will not Jan 30 22:08:20 calendar.getTimeInMillis() and calendar.setTimeInMillis(long) Jan 30 22:09:06 it's part of Calendar, which GregorianCalendar extends. Jan 30 22:09:33 so I dont even need to use greg? Jan 30 22:09:45 dunno. what are you using it for? Jan 30 22:10:20 just to collect clock in and clock out data and computing total hours. Jan 30 22:10:37 oh, interestingly, GregorianCalendar implements Serializable (because Calendar does). so you should be able to read and write those directly to a stream. Jan 30 22:10:54 and knowing which week of the year and day of the week it is Jan 30 22:11:27 afaik computing hours should be safe by just subtracting unix timestamps... _as long as_ you don't change time zones between in and out, and if you don't care about leap-seconds. Jan 30 22:11:48 time zones or daylight savings time Jan 30 22:12:19 though if you make sure you're in UTC it should be fine. Jan 30 22:12:50 GregorianCalendar might protect you from that, I'm not 100% certain :) Jan 30 22:12:57 I'm trying to use the user's local time Jan 30 22:13:17 the java date classes are generally not very good, with java 8 there will be a new date class, you might want to look at a specialized library like http://www.date4j.net/ Jan 30 22:13:31 there is that, yeah. or joda-time. Jan 30 22:13:58 oh man. I am more confused about how to store the data than when I joined Jan 30 22:14:05 joda-time is java 8's time system, in some ways I'd recommend that over others for that reason alone (unless you know why you want date4j / something else) Jan 30 22:14:20 yeah, but for just subracting dates date4j is maybe even simpler Jan 30 22:14:47 "The main goals of date4j are: Jan 30 22:14:47 easy manipulation of dates/times in the Gregorian calendar. Jan 30 22:14:47 easy storage and retrieval of such dates/times from a relational database. Jan 30 22:14:47 a simplified model of civil timekeeping, similar to the model used by many databases." Jan 30 22:15:13 how often are the android tzdata files updated? just on OTA ? Jan 30 22:15:13 newbQ: that may not be a bad thing, tbh. date/time calculations can be _enormously_ complex, and there are lots of minor (and not so minor) flaws that can pop up unless you're extremely specific about what you want to do and how. Jan 30 22:15:57 Memorion: that does sound like it could be a good fit, yeah Jan 30 22:16:03 there is also https://github.com/dlew/joda-time-android Jan 30 22:16:06 if you want to be more confused watch this https://www.youtube.com/watch?v=-5wpm-gesOY :D Jan 30 22:16:48 http://blog.danlew.net/2013/08/20/joda_time_s_memory_issue_in_android/ Jan 30 22:17:15 I think I'm gonna stick with Greg because it seems simpler for me to work with right now Jan 30 22:17:27 getResourceAsStream ftl Jan 30 22:17:56 Does anyone here use the sqlite3 tool to look at their sqlite database? Jan 30 22:18:11 I can't get it to work, it tells me its unable to open the databse Jan 30 22:18:17 AKK9_: ofc Jan 30 22:18:34 g00s: lol, that's interesting. I suppose that's what joda-time-for-android fixes? Jan 30 22:18:34 Napalm: Any luck with the video? Just curious. :) Jan 30 22:18:37 AKK9_: sounds like you have a bad database file or an out-of-date sqlite3 app Jan 30 22:18:46 (among other things, no doubt) Jan 30 22:18:55 TacticalJoke: Nope, my machine has kinda died twice whilst encoding Jan 30 22:18:57 :| Jan 30 22:19:00 I still dont know how to read a DataInputStream until EOF Jan 30 22:19:02 Ah, damn. No worries. Jan 30 22:19:13 apparently 430GB huff video is too much to process Jan 30 22:19:15 :P Jan 30 22:19:29 newbQ: I think it throws an EOFException (?) when hitting the end. Jan 30 22:19:32 Napalm, the db works in my app that I'm testing. Jan 30 22:19:34 Napalm: trying to transcode it? what are you using? Jan 30 22:19:36 Not ideal, but it's something. Jan 30 22:19:38 Is sqlite3 on the device? Jan 30 22:20:25 AKK9_: the command-line tool? only sometimes, I think Jan 30 22:20:27 TacticalJoke: so infinite loop and tell it to break on exception, or something? Jan 30 22:20:43 groxx: yea, well source material is huff lossless encoding.. and premiere pro doesnt understand that codec.. so I have to re-encode as avc/mp4 Jan 30 22:20:49 Yeah. As far as I can see, that's the only way. Jan 30 22:20:56 groxx, yeah. it works when when I use adb shell, but it doesn't want to open my db Jan 30 22:20:57 Napalm: ah. explains why it's so big :) Jan 30 22:21:09 groxx: then i can edit it together and export it Jan 30 22:21:57 TacticalJoke: how do you get it to acknowledge the exception and just resume after the loop? Jan 30 22:21:59 I'm getting a strange error from intelliJ. I fixed it yesterday, damned if I can remember how; http://i.imgur.com/a0i3Ecg.png Jan 30 22:22:05 Napalm: I haven't tried anything that big, but fwiw I haven't had any problems with ~20gb via handbrake, and it's crazy-simple Jan 30 22:22:11 Seems it can't find a resource in a compiled package. Jan 30 22:22:13 It's probably cuase I have a rooted phone Jan 30 22:22:23 I probably have crappy software on it Jan 30 22:22:52 Catching the exception could break the loop (or set an 'eofDetected' flag to true, which means that the loop will break in a moment). Jan 30 22:23:22 AKK9_: if you can copy the file to your computer, there are plenty of sqlite-reading programs. e.g. there's a small possibility that your sqlite command-line tool came from your rooting kit, and it's older than the sqlite that android uses. Jan 30 22:23:36 I don't know if you'll get that error in that case, but it might be worth a shot Jan 30 22:23:50 groxx, yeah just foudn one, ill do that thanks Jan 30 22:24:38 groxx: shame the files are too big to put on my ssd or a ram-disk Jan 30 22:25:05 hmm, i might make a scratch partition on my ssd Jan 30 22:25:07 Napalm: probably won't make a difference, really. video encoding doesn't result in lots of random seeking, and your cpu/gpu are likely the bottlenecks Jan 30 22:25:23 ttrue Jan 30 22:25:49 or, I would _assume_ the encoder is smart enough to buffer enough in memory to not be ludicrously slow. that may be incorrect. Jan 30 22:26:11 i think its just the nature of my source material Jan 30 22:26:29 im just seeing if i can find a plugin or codec or something for premier pro Jan 30 22:26:51 good luck \o Jan 30 22:27:22 thanks for all the help Jan 30 22:29:51 Go ahead.... Ask me if I just moved my project from one directory to another WHILE it was open in Android Studio... Jan 30 22:30:16 Napalm: what's up man! Jan 30 22:30:32 hey blang Jan 30 22:30:58 just trying to get some video encoding working effectively Jan 30 22:31:47 Napalm: oh fun, haha Jan 30 22:33:20 cause MikeWallaceDev don't give a damn, amirite Jan 30 22:33:56 not a single damn was given Jan 30 22:34:26 and you guys suck! You totally ruined my joke! I wanted to answer "Of course not. What a dumb thing to ask me!!" HAHAHA Jan 30 22:34:40 (But not that dumb, cause I really did do it...) Jan 30 22:35:00 loL! Jan 30 22:37:05 Hm.. I think i just accidentally nul byte attacked myself Jan 30 22:37:36 trying to insert a null buyte deep inside a file and it ends up at the beginning Jan 30 22:37:38 MikeWallaceDev: what happened when you did move it ? Jan 30 22:38:06 I'm not 100% sure yet shmooz , but it would appear : nothing. Jan 30 22:38:17 I resynced Gradle, and voila! Jan 30 22:38:23 also, about 256 bytes before the offset where I intended to insert the byte.. RANDOM bytes Jan 30 22:38:27 idk where they’re coming from.. Jan 30 22:41:20 Ok, 100% sure. Compiled and is now running. Changing the directory was not a biggie Jan 30 22:42:52 tricknology: Sounds like something's going srsly wrong. Jan 30 22:43:10 lol no shit TacticalJoke Jan 30 22:43:16 :D Jan 30 22:43:24 How are you writing the data? Jan 30 22:43:30 TacticalJoke == Sherlock Jan 30 22:43:30 it’s complicated lol Jan 30 22:43:46 has to do with TIFF tags Jan 30 22:44:38 Oooooh TIFF tags are the devil. Jan 30 22:44:39 btu my problem was/is that I’m taking the file into hex string (for readablility during debugging) and where I wanted to insert a null byte, I was inserting a null char Jan 30 22:44:47 ‘\0' Jan 30 22:45:21 absolutely MikeWallace.. whoever came up with the encoding rules is demented Jan 30 22:45:27 And now the hex editor won't let you modify the \0 because it's not in the file, right? Jan 30 22:45:42 nah ever more weird Jan 30 22:45:48 that 0 ends up at the beinning of the file Jan 30 22:45:54 before the 4949 Jan 30 22:46:04 so the file doesn't exist... nice. Jan 30 22:46:14 then where I wanted the 0 there is a bunch of garbage Jan 30 22:46:24 abotu 256 bytes of garbage Jan 30 22:46:31 but wait, does that file actually matter? Can't you just scrap it and start over? Jan 30 22:46:43 nah it doesnt matter at al Jan 30 22:46:48 all* Jan 30 22:47:04 so there ya, shut 'er down and start over Jan 30 22:47:05 i copy the original beforehand lol Jan 30 22:47:20 well I got it to function properly. I needed to add 2 chars instead of one Jan 30 22:47:31 btu now I’m trying to figure otu wtf jsut happened Jan 30 22:47:43 null byte injection maybe? but I don’t understand that concept Jan 30 22:47:49 if only datainputstream had a readObject() Jan 30 22:47:49 If I have an object I need to update in a sqlitedb, shoudl I put the dbupdate methods in the object itself? Jan 30 22:47:54 Or is this a bad idea Jan 30 22:48:10 it can be confusing Jan 30 22:48:17 I would make a db helper Jan 30 22:48:21 well i do.. Jan 30 22:48:25 or a db wrapper class even Jan 30 22:48:36 all the prepared statements are in there Jan 30 22:48:41 update methods, whatever Jan 30 22:48:52 then you don’t have to hunt for it when you need to change somehting Jan 30 22:49:07 I have a dbhelper which has those methods, but I find that I'm updating certain objects from different places in my app. different activities. Jan 30 22:49:28 that’s normal? Jan 30 22:49:32 what’s the issue? Jan 30 22:49:35 So i was thinking i put it all in the object so that it's in a central place? Jan 30 22:49:56 the central place should be your db helper Jan 30 22:50:04 anythign to do with the db goes there Jan 30 22:50:39 Oh yh okay Jan 30 22:50:45 AS 1.1 Beta 2 Jan 30 22:51:09 im looking for a good example for you AKK9_ Jan 30 22:51:37 no its alreight i get it. Jan 30 22:51:39 im being stupid Jan 30 22:51:41 somethign like this maybe: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/database/sqlite/SqliteWrapper.java Jan 30 22:51:41 is it possible to write my own readObject() for datainputstream that will read whatever the next object is regardless of it's type? Jan 30 22:52:21 tricknology, lol thanks. i actually have it like this already. im being stupid Jan 30 22:52:25 im half as leep Jan 30 22:52:30 yes newbQ, look into method overriding Jan 30 22:52:36 it happens AKK9_ Jan 30 22:55:13 tricknology: looking at the other read methods, they all know how many bits the object will be. how do I get my own method to sort of auto detect the bit length? Jan 30 22:56:03 is it good practice to declare my variables as final whenever I can ? Jan 30 22:56:17 Does this have a negative impact on performance? Jan 30 22:56:19 or can I just store a double as a long? Jan 30 22:56:51 lets say i have a bluetooth device that has a bunch of sensors on it. im now getting the data for each sensor and writing then into an array list (the array list already exists, im just updating one field in each). this aray list is associated with a listview... well... i dont see the list items at all Jan 30 22:57:16 blah. I just need to step away for awhile Jan 30 22:57:34 i see no listview so i must be doing it wrong Jan 30 22:59:24 ugh, crap. BluetoothGattCharacteristic / Descriptor have no .equals() / .hash() methods Jan 30 22:59:29 lame asses Jan 30 22:59:37 MikeWallaceDev: I don't see why it'd negatively affect performance. Readability, though, is another question. :p Jan 30 23:00:17 you have to use .getservice.getuuid() Jan 30 23:00:23 everyone who worked on the btle needs to be punched in the crotch Jan 30 23:00:40 characteristic.getService.getUuid() Jan 30 23:00:44 I440r no that doesn't work Jan 30 23:00:49 it does for me Jan 30 23:00:50 because they can have unique instanceIds Jan 30 23:00:54 some other uuid? Jan 30 23:01:45 they can? Jan 30 23:02:02 oh, it's readable TacticalJoke , no less than if they weren't final... Jan 30 23:02:07 g00s its weird that you are working on ble at the same time as me lol Jan 30 23:02:14 I'm more concerned about the Java aspect. Jan 30 23:02:19 Ooh, I see a "Unit test support" balloon in AS 1.1 Beta 2. Jan 30 23:02:24 When I open "Build Variants". Jan 30 23:02:27 my ble is generic. my api will work with ANY ble device (well... up to a point :) Jan 30 23:02:56 MikeWallaceDev: I suspect that if you look at the bytecode you'll see no difference. Not sure, though. Jan 30 23:03:13 what is the default notification period? Jan 30 23:03:18 i thought it was 1 second Jan 30 23:03:24 oh, you think it's compile time only? Could be... Jan 30 23:04:09 Ctrl-F12 is my new best friend. Jan 30 23:04:15 I440r a device can have multiplic characteristics with the same UUID Jan 30 23:04:17 afaik in theory finals allow the compiler to make different kinds of optimizations. but it seems to me like it should be possible to infer most finals _anyway_, so I'm not sure it makes a difference. Jan 30 23:04:47 but on different services Jan 30 23:05:14 personally, final should be default, because you should be explicit about mutating state. Java does make that a slightly painful decision though. Jan 30 23:05:34 but still, these classes aren't well behaved value classes, so you can't really stick them in a hash table, for example Jan 30 23:06:25 i stick them in an aray list with their serive and characteristic uuids. on read and on change search the list and update the item that matches Jan 30 23:06:46 Yeah, I'd like to use 'final' everywhere but it's so noisy in Java. :/ Jan 30 23:07:21 groxx, I see your point about mutation. However, I find that I have more variables than constants. So I guess it's ok to make them mutable by default. (Then again, they are called "variables" not "finals" :) ) Jan 30 23:07:40 Also, there are arbitrary limitations relating to final fields. If you set a final field in the constuctor, all is well. If you now refactor this method (and now you're setting the field in a method called only by the constructor), you can no longer use 'final'. Jan 30 23:07:55 agreed tho, would be nice if i could use a hash table instead of a for loop to search the array list Jan 30 23:08:05 MikeWallaceDev: if you include local variables / arguments in that, I'd be surprised. counting those, I have a few times more finals. Jan 30 23:08:27 Yeah, I almost never mutate a local variable. Jan 30 23:08:41 In fact, probably never. I like using another variable if I'm gonna do that. :) Jan 30 23:08:53 I was counting those too... Anyway, it's just opinion, not like we can do anything about it :D Jan 30 23:08:54 TacticalJoke: well, "arbitrary" in that "final fields are guaranteed to be fully initialized when the constructor exits", where normal fields are not (even if they're set in the constructor). but you shouldn't be writing code that allows that to make a difference. Jan 30 23:09:24 groxx: But if my method is called only by the constructor then that guarantee is there. Jan 30 23:09:29 It's just that the compiler isn't smart enough to see that. Jan 30 23:09:47 yeah. and it basically only matters if you make something and then pass it to another thread without synchronization. Jan 30 23:09:58 (I think. probably.) Jan 30 23:10:54 TacticalJoke: ah, yeah, the "you can't use an init function to help with your dozen constructors" problem. _that_ is definitely annoying. Jan 30 23:11:37 Yeah. I also like extracting methods a lot, so my constructors sometimes end up calling nice little private methods. :) Jan 30 23:11:48 is it possible to instantiate an AttributeSet programaticly ? (in order to create a view) Jan 30 23:11:51 Though I guess it's not that common, since my classes are pretty small. Jan 30 23:12:00 TacticalJoke: having good results with asyncTask and progressDialog. vodka time ;) Jan 30 23:12:25 One example where I'm doing it right now is when my class is reading its data from a JSON stream. Jan 30 23:12:37 adkins: Great. :) Jan 30 23:13:52 I think that normally, when it comes to background tasks, it's best to use a thread pool rather than an AsyncTask. But this case might be where an AsyncTask actually makes sense: short UI-related tasks. Jan 30 23:14:46 speaking of extracting methods... I finally found out how to extract an inner class to become a top class in its own file : it's the Move command (F6), not the refactor command (Shift-F6). Works like a charm Jan 30 23:15:14 TacticalJoke: well short is relative, how long is it allowed to take? Jan 30 23:17:27 I440r are you bonding to the device or using "just works" ? Jan 30 23:17:45 Anyone explain how to do a form with buttons, whereby if a button is clicked it will use that when form submits. Obvious problems are if clicking another button to deselect previous Jan 30 23:19:38 hi there.. I'm getting a weird problem in my app, I had a loop statement with and if condition that returns a value... outside the loop i have a return null incase all fails.... now the problem is... when i break the inside return, the app would break... however, it will continue and until it reaches the return null. Jan 30 23:20:36 I should have said, that's the case when the statement is called from a widget... but that same statement works flawlessly from within the app Jan 30 23:21:12 adkins: There is no real limit. I think the reason the documentation recommends the use of AsyncTasks only for short tasks is that AsyncTasks tend to be tied with Activities, and Activities can be destroyed (e.g., when the screen rotates). If such an AsyncTask were to perform some task lasting for 30 minutes, say, there could be issues relating to that AsyncTask trying to push data to Jan 30 23:21:12 an *old* Activity instance. Jan 30 23:21:15 That's my understanding, anyway. Jan 30 23:21:48 I can't see any other reason that AsyncTasks should be for short tasks only. (Under the hood, AsyncTask just uses a normal thread pool.) Jan 30 23:22:25 fwiw asynctask can accept a thread pool, and you should _almost_ definitely be using it (by default it's only a single thread) Jan 30 23:22:27 TacticalJoke: damn, rotating while asyncTaskinging=>crash ;) Jan 30 23:23:02 adkins: The example I linked you to used WeakReferences to avoid issues, but there are other ways. Jan 30 23:23:19 You probably wouldn't get a crash in general, I think. The biggest issue in general would probably be a temporary memory leak. Jan 30 23:23:20 personally, I'd recommend staying away from anything longer than, say, a quarter of a second. especially while it's single-threaded. otherwise, say it takes a couple seconds - you may cause something unrelated to wait for a couple seconds, when it could proceed. Jan 30 23:23:36 adkins: thats cause the activity changed... my hacky way was to use a context reference that's also updated when the screen rotates Jan 30 23:24:21 My app (though it's not using AsyncTasks) has its Activities unregister themselves in onDestroy (and re-register themselves in onCreate). Then there's no leak or confusion or whatever. Jan 30 23:25:00 Also, I've read in various places that a screen rotation guarantees that onCreate will come directly after onDestroy (with nothing in between). Jan 30 23:25:20 for config changes, yes. Jan 30 23:25:41 Holy shiiet. I'm loading an image as a bitmap, making it smaller and saving it. Jan 30 23:26:00 When I load the bitmap my app goes from 19 to 75mb mem usage Jan 30 23:26:07 heh Jan 30 23:26:09 Back down after I discard it Jan 30 23:26:14 But how can I avoid this! Jan 30 23:26:17 D: Jan 30 23:26:19 depends. Jan 30 23:26:29 is it actually that big, or could you be making copies of it by accident? Jan 30 23:26:50 adkins: What is the longest your task will take? Three seconds? Jan 30 23:27:07 Nah it's actually that big, when I choose smaller pictures the memory usage is smaller. Jan 30 23:28:01 I thoguht the same thing so I stepped through code to double check Jan 30 23:28:08 AKK9_: there is a BitmapRegionDecoder that will let you read only part of the file at a time - you can e.g. split it into 4 pieces, load one, do whatever, discard, load the next, etc. Jan 30 23:29:20 if you split it into identically-sized pieces, you can even reuse the same piece of memory on most versions of android (KitKat+ can reuse if it's the same or smaller than the reused-bitmap-size, iirc) Jan 30 23:29:53 groxx, I'm using ThumbnailUtils.extractThumbnail though. Jan 30 23:29:54 TacticalJoke: well its a launcher, it depends on how many buttons are assigned with certain type of functions/images, ....... can be many of them => more than 3 seconds, can be less than 3 seconds.... Jan 30 23:30:07 which products a thumbnail of the bitmap I provide Jan 30 23:30:35 Interesting: Gradle > Experimental > Enable Unit Testing support. Jan 30 23:30:45 Though it needs 1.1 of Android-Gradle. Jan 30 23:30:55 AKK9_: ah. downsizing will cause problems with a region-based approach, regardless. Jan 30 23:31:20 adkins: I don't know, but I doubt it'd ever be an issue. Jan 30 23:31:53 If you were worried, you could just make the AsyncTask static (or use a thread pool instead) and have the Activity subscribe/unsubscribe for callbacks. Jan 30 23:32:11 Or, I guess, simply use WeakReference as in that article. Jan 30 23:32:12 AKK9_: alternatively: if the thumbnail you want is 1/2 the size of the bitmap (on each side, so 1/4 the actual space), or smaller, you can use inSampleSize to pre-shrink the bitmap as you load it Jan 30 23:33:32 groxx, that would depend on the size of the bitmap. i need to get a 500 x 400 size image from it Jan 30 23:33:42 regardless of original size Jan 30 23:33:48 AKK9_: another option is to load the bitmap with a Bitmap.Config of RGB_565 (and add dithering) - it'll be a lower quality image, but it'll take ~ 1/2 the memory, and you might not notice the difference. Jan 30 23:33:59 Ã…Dô2dU#Ã’s"r5U$d4SÃ’te$ôåBróå Jan 30 23:34:00 groxx, I'll try that out Jan 30 23:34:01 565 won't give you transparency though Jan 30 23:34:02 blah Jan 30 23:34:09 QUICK PLUG THAT INTO EVERY WEBSITE EVAR Jan 30 23:34:19 that shouldn't be an issue Jan 30 23:34:22 lol what is this? Jan 30 23:34:26 http://Ã…Dô2dU#Ã’s"r5U$d4SÃ’te$ôåBróå.com Jan 30 23:34:27 lol Jan 30 23:34:33 lol Jan 30 23:34:40 it’s the junk coming out of my null byte bug Jan 30 23:34:50 aaah. it looks like some of my passwords Jan 30 23:34:56 jesus... Jan 30 23:35:12 adding non-ascii breaks quite a few sites, sadly :) Jan 30 23:35:19 TacticalJoke: well, pretty tired now, i`ll save your words and get back some later time or will see how it`s gonna behave at testing time....pretty thankfull for everybodys support in here today. Happy coding! ;) Jan 30 23:35:20 and disturbingly Jan 30 23:35:42 make sure your javas are updated Jan 30 23:35:43 http://blog.c2b2.co.uk/2013/11/poison-null-byte-and-importance-of.html Jan 30 23:36:04 I did not know this existed until yesterday Jan 30 23:36:09 I440r are you still there ? Jan 30 23:36:18 No worries. I think AsyncTask + WeakReference might be simplest here. But all of the options seem good to me. Jan 30 23:36:47 I've worked at a place where their entire website propagation system fails when there are certain non ascii chars in a items title or info Jan 30 23:39:01 Is there a good way to be notified as soon as a new version of the Android Gradle plugin is available? I know there's , but I wonder how quickly that is updated. Jan 30 23:39:36 TacticalJoke :"1.+" #yolo Jan 30 23:39:42 Ah, true. lol Jan 30 23:39:49 I'm a Gradle noob. Totally forgot that. Jan 30 23:39:53 why not "+"? Jan 30 23:40:04 well, gotta play it somewhat safe Jan 30 23:40:06 hehe Jan 30 23:40:18 i'm having one of those experiences - where i'm either going grazy, or i don't understand java concurrency at all Jan 30 23:40:24 Would I notice that it had updated to 1.1[...]? Jan 30 23:40:43 looking at some of these btle classes, these don't seem thread safe at all Jan 30 23:40:45 g00s: I think that's called "using java concurrency" Jan 30 23:40:46 e.g., 1.1-rc1 or whatever. Jan 30 23:41:06 My strategy is to use + while I'm working, and then use a number when I tag a release Jan 30 23:41:52 MikeWallaceDev: yeah, same here. and I just discovered that intellij lets you alt-enter and can fill in the version for you Jan 30 23:42:10 previously I was diving around in gradle's caches, trying to figure out wtf it finally imported D: Jan 30 23:42:22 nice Jan 30 23:43:06 groxx can you take a look at something? this is kinda involved though Jan 30 23:43:19 g00s: I can look, can't promise comprehension or speed :) Jan 30 23:43:32 lemme get the links together Jan 30 23:44:59 groxx ok, the story starts here https://github.com/android/platform_frameworks_base/blob/master/core/java/android/bluetooth/BluetoothGatt.java#L298 Jan 30 23:45:42 basically, the bluetooth service has discovered all the characteristics and descriptors, stuck them in a list, and is now calling the android app in 304 Jan 30 23:45:52 this happens on some binder thread Jan 30 23:46:38 now lets say you want to write a characteristic. you say BluetoothGatt.writeCharacteristic( the characteristic ) Jan 30 23:47:08 but, you don't create that char yourself. you ask android for it Jan 30 23:48:36 im trying to style the status bar, but it require minSdkVersion 21, but the current version is 21, i dont get how i can solve this Jan 30 23:48:44 but now look at this https://github.com/android/platform_frameworks_base/blob/master/core/java/android/bluetooth/BluetoothGattCharacteristic.java#L523 Jan 30 23:48:46 does any 1 have any idea? Jan 30 23:49:16 the value, held by the characteristic, is not guarded in any way Jan 30 23:49:22 john67 set minsdkVersion to 21 in your manifest Jan 30 23:49:36 i doesnt want it Jan 30 23:49:53 then use appcompat Jan 30 23:49:55 v21 Jan 30 23:49:56 then, when that completed, again android call you on another binder thread with that characteristic instance. its the same instance. so i don't see how they can get away with mutating this state on different threads Jan 30 23:50:41 tricknology: how? Jan 30 23:51:06 http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html Jan 30 23:52:13 g00s not all lol Jan 30 23:52:29 I440r what was that ? Jan 30 23:52:40 g00s i think they are not thead safe Jan 30 23:52:53 g00s ithink its on googles todo list to make them thread safe Jan 30 23:53:06 you asked if i was still here... "not all here" Jan 30 23:53:12 ah, k Jan 30 23:53:17 they don’t look threadsafe at all Jan 30 23:53:32 g00s: lemme pm you, I think I need more details (haven't done bluetooth) Jan 30 23:53:37 following along somewhat, but not enough I think Jan 30 23:53:39 this is eithe a major fuckup, or i'm just missing something Jan 30 23:53:49 tricknology, googles ble api is "lets cut a bunch of corners to get the shit out asap" Jan 30 23:53:52 groxx ok Jan 30 23:54:01 I would like to view the convo you guys have Jan 30 23:54:02 for science Jan 30 23:54:24 its kinda hard to follow if you don't know how the btle apis 'flow' Jan 30 23:54:28 thers something im not understanding about listview :( Jan 30 23:54:33 i dont get ANYTHING displayed Jan 30 23:54:41 ah i see Jan 30 23:54:55 l440r, what’s the issue? got code? Jan 30 23:55:12 tricknology, i cant share the code, it belongs to my boss lol Jan 30 23:55:18 ah i see Jan 30 23:55:53 well where do you think you went wrong? Jan 30 23:56:03 did you set the adapter? Jan 30 23:56:12 yes i have the adapter set Jan 30 23:56:18 is there anythign in the array? Jan 30 23:56:37 not at first but it gets populated later Jan 30 23:56:51 do you re-set the adapter afterward? Jan 30 23:57:21 adapter.notifyDataSetChanged() Jan 30 23:57:24 how do i do that? Jan 30 23:57:31 aha Jan 30 23:57:39 so update your list and then call that Jan 30 23:58:09 should be â–¡ Jan 30 23:59:49 still dont see any list :/ Jan 31 00:00:51 oh wait lol Jan 31 00:00:58 i might nknow why Jan 31 00:01:05 heh Jan 31 00:01:11 lemme know what it was, im curious Jan 31 00:01:54 no. still dont get any list Jan 31 00:02:10 its BLE sensor data, one list item per ble service Jan 31 00:02:32 i had commented out the setAdapter() part Jan 31 00:02:42 just to put the data in a textivew to see it was getting updated Jan 31 00:02:45 it is Jan 31 00:02:52 but my listview is awol Jan 31 00:04:00 my adapters getView is never called Jan 31 00:07:29 its like my view isnt getting set at all Jan 31 00:12:22 my adapters public View getView() is never called Jan 31 00:12:24 why ? Jan 31 00:12:37 count = 0 Jan 31 00:12:57 adapter view not visible Jan 31 00:12:59 etc Jan 31 00:13:18 view is visible Jan 31 00:13:21 why is count = 0 ? Jan 31 00:14:18 that's for you to answer Jan 31 00:14:47 or you're overriding the wrong method Jan 31 00:14:53 I440r groxx i'm not the only one wondering https://groups.google.com/forum/#!msg/android-developers/v65-0hNYI7w/1_X6DV3yqz4J Jan 31 00:16:05 just found that, pretty much sums it up Jan 31 00:16:17 will add it to my reading list :) Jan 31 00:16:21 heh Jan 31 00:18:10 well im calling it quits for the day, to do my ble dev i have to borrow someones PERSONAL phone here at work Jan 31 00:18:15 he is going home... so so am i lol Jan 31 00:19:42 Is there a way to detect the size of a bitmap loaded from a url in picasso? I cannot find this method? Jan 31 00:20:11 it does certainly sound dubious. in _some_ of the cases like that that I've looked into, it's fine as long as you do something very specific and not documented :| Jan 31 00:21:03 but that can be stupidly hard to find, if it even exists. Jan 31 00:21:23 in_deep_thought: after it's loaded? Jan 31 00:21:43 groxx: yeah. or as its loading Jan 31 00:22:03 would be better Jan 31 00:22:13 after: bitmap.getWidth() :| Jan 31 00:23:27 so if I do Bitmap bitmap = Picasso.load(url).into(imageView)…… and then bitmap.getWidth Jan 31 00:24:16 basically, can I get the width before the bitmap appears on the screen? Jan 31 00:24:21 or only afterwards? Jan 31 00:26:06 to what purpose would you want such information? Jan 31 00:26:47 JakeWharton: um I just want it. Ok fine what I really want to do is load it at half size. so if its 500px wide, I want to display it as 250px wide Jan 31 00:26:56 if its 200px wide, I want to display it as 100px wide Jan 31 00:26:56 use a Transformation Jan 31 00:28:32 ooh that sounds really good. .transform(new BitmapTransform(something)) Jan 31 00:29:08 except don't create it every time Jan 31 00:29:13 re-use one instance Jan 31 00:32:55 I can’t really find information on BitmapTransform. Would that be a java method? or an android specific method? Jan 31 00:33:49 Transform is a Picasso thing Jan 31 00:33:56 groxx, thanks for the tips man. fixed my app. it now goes from 17 to 20mb :) Jan 31 00:34:00 instead of 75mb Jan 31 00:34:03 in_deep_thought: it's relatively easy to figure out if you check the source code Jan 31 00:34:12 AKK9_: good to hear :) Jan 31 00:34:12 the Picasso source code? Jan 31 00:34:14 I used inSampleSize in the end Jan 31 00:34:15 It’s an interface in Picasso, you implement the transform method to manipulate your bitmap Jan 31 00:34:16 in_deep_thought: yep Jan 31 00:34:24 and then got the thumb from that Jan 31 00:34:45 AKK9_: yeah, that's the most-correct way to approach that. faster loading, less memory, not too complex Jan 31 00:34:51 typically :) Jan 31 00:37:13 in_deep_thought: I think there's a sample section of picasso too, and maybe U2020 has something too? Jan 31 00:38:01 (maybe not U2020) Jan 31 00:38:38 U2020 does have an AspectRatioTransformation or something similar Jan 31 00:39:11 oh wait, it’s done in the ImageView, nvm Jan 31 00:39:54 there's a sample Jan 31 00:43:48 so would I just pass it in directly to transform? like https://bpaste.net/show/084c59096411 Jan 31 00:55:09 Ok, so I have a private String stringName Jan 31 00:55:22 I assign that value with stringName = response.body().string() Jan 31 00:55:32 Then I should be able to use that field anywhere throughout the class? Jan 31 00:56:36 Anywhere where the variable is in scope. Jan 31 00:56:54 Where would it be out of scope? Jan 31 00:56:57 If you have an inner (possibly anonymous class) then it is somewhat different. Jan 31 00:57:01 ^ Jan 31 00:57:14 Actually I am assigning it inside an inner class Jan 31 00:57:58 That might be your issue then. Use breakpoints and watches to make sure you are getting the functionality you expect. Jan 31 00:57:59 It works inside that inner class, but everywhere else if I try to use it, its null Jan 31 00:58:03 Yep Jan 31 00:58:08 That is to be expected. Jan 31 00:58:20 How can I define it so its not null? Jan 31 00:58:42 Pass it back to the caller class somehow and let the caller class assign it. Jan 31 00:58:46 Maybe call a method from the inner class, pass it the string, and have that method assign the field Jan 31 00:59:08 Ill try that, thanks for the help Jan 31 01:00:26 What is it about inner classes that messes with field assignment though, Anthaas Jan 31 01:00:44 Well, you aren't in the parent class any more when you are doing the assignment Jan 31 01:00:53 Ah, true Jan 31 01:01:01 Imagine it was a separate class completely, and you were trying to change a private variable in A while in B. Jan 31 01:01:04 Doesnt make sense right? Jan 31 01:01:09 RIght Jan 31 01:01:14 Although because it is an inner class there are a few tricks you can use. Jan 31 01:01:22 Such as making the variable final. Jan 31 01:01:36 So the string I needed in the inner class was grabbed with response.body().string() Jan 31 01:01:44 so I passed that to a method Jan 31 01:01:49 and had that method assign to the field Jan 31 01:01:52 Gonna test that Jan 31 01:02:20 As long as that method isnt a member of the inner class it could work, otherwise you are just doing the same thing again Jan 31 01:02:31 Right Jan 31 01:03:58 ah, didnt work Jan 31 01:04:16 Figured haha Jan 31 01:04:18 Got some code? Jan 31 01:04:27 pastebin / w/e Jan 31 01:04:27 Yeah wanna see? Jan 31 01:04:30 Aye Jan 31 01:05:42 Anthaas: What are you referring to? There's no issue with assigning an outer instance's field from an inner instance. Jan 31 01:05:55 An inner class is tied with an instance of the outer class. Jan 31 01:06:02 http://pastie.org/9875303 Jan 31 01:06:14 check out getData and setResponse Jan 31 01:06:50 TacticalJoke: Its been a while, but I remember coming across a similar issue. Jan 31 01:08:07 Could it be because the field is private Jan 31 01:08:23 drose379: There's no issue with assigning serverResponse anywhere in that code. You don't even need setResponse. Jan 31 01:08:24 No, because a public method accesses it. Jan 31 01:08:47 TacticalJoke may be right actually. Jan 31 01:09:07 So how come using serverResponse only works when im inside the inner class Jan 31 01:09:08 I have come across some problems with using inner classes though. Jan 31 01:09:20 But once I use it outisde the inner class its NullPointerException Jan 31 01:09:28 For Exmple, now that youve seen the code: Jan 31 01:09:38 If I assign serverResponse inside the inner class Jan 31 01:09:51 and call buildList() and pass it serverResponse Jan 31 01:09:54 it works Jan 31 01:09:54 I think you're calling buildList before the response is ready. Jan 31 01:10:06 but if I call buildLust() and not pass it, then its null Jan 31 01:10:37 How could that be? In the activity Im calling getData() then buildList() Jan 31 01:10:51 serverResponse is assigned onReponse inside of getData() Jan 31 01:11:00 Yeah, you're calling getData, which *starts* the HTTP transaction, and then immediately calling buildList. Jan 31 01:11:15 You need to wait till the transaction is over till you call buildList. Jan 31 01:11:17 Hmm, I need to wait until getData() is done Jan 31 01:11:26 Is there a way to do that? Jan 31 01:11:34 onResponse has to call back to something. Jan 31 01:11:45 call back? Jan 31 01:12:01 I guess onResponse would be where you call buildList. Jan 31 01:12:17 Right, I was doing that and it worked Jan 31 01:12:32 But then I ran into another problem Jan 31 01:12:35 Which I forget now Jan 31 01:12:42 Cause I had to cut myself off last night :D Jan 31 01:13:05 Oh ok, can I ask another question? Jan 31 01:14:10 Anyone know anything about USB Serial communication? I'm having some trouble reading data... Jan 31 01:15:16 Of course, drose379. Whether anyone can answer is the only uncertainty. :) Jan 31 01:15:35 Ok, so I create a List in buildList Jan 31 01:15:59 and at the end of buildList, I need to pass the build list to another method, which assigns that list to a field of the class Jan 31 01:16:16 I tried to do private List list; Jan 31 01:16:29 and then just do this.list = list Jan 31 01:16:36 But this.list was always returning null Jan 31 01:16:52 Do i have to copy the contents of the list built by buildList to the List field? Jan 31 01:17:25 "public void getList(final List list) {" should be "public void getList(final List****** list) {". Jan 31 01:17:55 But I don't think that'd cause the issue you describe. Jan 31 01:17:58 drose379: No. Are you sure this.list = list is not assigning the field to itself? Jan 31 01:18:41 Im gonna try it again now and see if I re create the problem Jan 31 01:21:15 So in my activity if I call buildList() Jan 31 01:21:18 then getList() Jan 31 01:21:31 getList() will not fire until everything called in buildList is complete? Jan 31 01:21:34 drose379: just pastebin your code (the relevant part) Jan 31 01:21:48 Ok, one sec Jan 31 01:21:58 Your activity should not be calling buildList. Jan 31 01:22:04 Its not Jan 31 01:22:08 I meant getData() Jan 31 01:22:08 sorry Jan 31 01:22:34 Ok, lemme show you guys some code Jan 31 01:23:47 http://pastie.org/9875327 Jan 31 01:24:53 You're making the same mistake. Jan 31 01:25:03 Trying to access the list before the HTTP response has been returned. Jan 31 01:25:22 but im calling buildList only on the response Jan 31 01:25:25 Your activity shouldn't be calling testList. Jan 31 01:25:30 Yeah. For async calls, I usually avoid this by passing a callback to the async call and I invoke that callback once the async completes. No more race conditions Jan 31 01:25:37 testList requires that the HTTP response already be finished. Jan 31 01:25:41 Also, way too many void methods in your code, return values instead Jan 31 01:25:55 i try to style the buttons in my project in the theme, but it has change the size and deform the button layout how can i solve that? Jan 31 01:25:57 I need a method that returns that list Jan 31 01:26:06 hi Jan 31 01:26:34 Ok so getData runs the request and calls buildList Jan 31 01:26:39 drose379: buildList should call back to the activity. Then, once the activity is called, it does the Toast thing. Jan 31 01:26:42 Not until then. Jan 31 01:26:55 Right now, you're trying to show a Toast before the HTTP server has responded, which doesn't make sense. Jan 31 01:26:57 There's no data yet. Jan 31 01:26:58 What do you mean by call back Jan 31 01:27:13 try to style the buttons in my project in the theme, but it has change the size and deform the button how can i solve that? Jan 31 01:27:34 Ive never done a call back Jan 31 01:28:10 Well, if setList were to call testList, that should work. That's *similar* to what I'm talking about. Jan 31 01:28:17 TacticalJoke: any idea? Jan 31 01:28:32 If you add a call to testList at the end of setList, I presume that'll work. Jan 31 01:28:44 a call? Jan 31 01:28:52 testList(); Jan 31 01:28:54 Oh wait ok Jan 31 01:28:55 has anybody completed the Udacity course for android? Jan 31 01:28:58 sorry :D Jan 31 01:29:38 TacticalJoke but I need a way to access the List by calling a method Jan 31 01:29:39 \ Jan 31 01:29:42 john67_: Not sure, but posting what you did might enable someone to help. Jan 31 01:29:48 A getter method for the list Jan 31 01:30:01 drose379: Ultimately, you probably want the list to be passed to the activity via a callback. Jan 31 01:30:09 Your activity can't *get* stuff. It has to be called back. Jan 31 01:30:17 Your activity has no clue when the stuff will be ready. Jan 31 01:30:26 What is a callback? Jan 31 01:30:36 Like a "button has been clicked" method. Jan 31 01:30:52 ah ok, how do those work when there is no button Jan 31 01:30:56 http://pastebin.com/rWJDQwbm Jan 31 01:31:22 I'd like some suggestions. I've just started development on android with androidstudio. I've added a SettingsActivity using the right click menu and customised it to only show one EditTextPreference. Now I'd like to be able to modify the preference (set it back to its default) if the user clears the input and presses OK. Can this be done using an OnPreferenceChangedListener? I can't find a way to modify the user input in the list Jan 31 01:31:25 try to style the buttons in my project in the theme, but it has change the size and deform the button how can i solve that http://pastebin.com/rWJDQwbm Jan 31 01:32:32 drose379: It just boils down to a method call, really. But a good pattern here is the "Listener pattern". This would involve the activity register itself as a listener of the downloader. The downloader then notifies its listener when it's downloaded stuff. Jan 31 01:32:36 TacticalJoke calling testList from setList works Jan 31 01:33:01 That sounds great, actually. Jan 31 01:33:22 drose379: In my app, my listener gets given a (processed) list. Then it does whatever it wants with that list. Jan 31 01:33:32 It's basically the same as what you're doing. Jan 31 01:33:50 So the activity is the listener Jan 31 01:34:16 The downloader class notifies the listener of when say buildList is done, then the activity calls another method? Jan 31 01:35:02 I think, optimally, the Activity should be given the List. Jan 31 01:35:07 It shouldn't have to do anything else. Jan 31 01:35:27 It shouldnt have to call methods from the downloader class? Jan 31 01:35:37 Right. Apart from just "download()". Jan 31 01:35:51 today's reddit "doesn't understand copyright" moron http://www.reddit.com/r/androiddev/comments/2u6zvu/i_have_received_the_second_strike_for_my_first/ Jan 31 01:35:54 (Unless we're counting 'register me as a listener' and 'unregister me'.) Jan 31 01:35:58 So the downloader calls all its methods internally? Jan 31 01:36:10 actually this one doesn't understand keyword stuffing Jan 31 01:36:55 TacticalJoke so the downloader class needs a method like run() that calls everything Jan 31 01:37:13 john67_: what is deformed and what size is problem? and curious about the 12pt for size, never used pt before so not sure how that works Jan 31 01:37:46 whatitis-: the button size, Jan 31 01:38:09 or the download method will return the list Jan 31 01:38:12 hello people. Jan 31 01:38:15 drose379: Here's an example (from my app; though I'm gonna change this code to us OkHttp's async model): http://pastebin.com/9mpXKiGM Jan 31 01:38:16 along with calling all the other methods Jan 31 01:38:37 john67_: button size to small, too large, can you show a screenshot of the issue Jan 31 01:38:42 drose379: The downloader will post the list to the activity when the list is ready. Jan 31 01:38:55 All the activity does is register itself as a listener, ask for a download, and wait to be called. Jan 31 01:38:55 How is that done? Jan 31 01:39:04 Via the callback method. Jan 31 01:39:11 So I need to learn that Jan 31 01:39:15 The method takes a List parameter. Jan 31 01:39:40 What class is the callback method part of? Jan 31 01:40:01 The activity. Jan 31 01:40:12 It's just an elaborate way of calling a method of the activity. Jan 31 01:40:14 help? Jan 31 01:40:35 Ok, should I read something before using it? I have no idea how to use it Jan 31 01:41:00 Did you see my paste thing? That's the basic pattern. Jan 31 01:41:10 Yeah Jan 31 01:42:03 So i do new Callback() Jan 31 01:43:04 Basically, withing your Runnable.run override, check whether 'listener' is null and if it's not then say "listener.downloadedList(list);" or similar. Jan 31 01:43:22 Or "onListDownloaded" or something. :) Jan 31 01:43:46 What about in the activity? Jan 31 01:43:52 Dont I have to register it or something Jan 31 01:44:24 whatitis-: https://drive.google.com/file/d/0B1aH_yFA-4WcWXJ0YzZqVF9VTm8/view?usp=sharing Jan 31 01:44:25 Or just call testList from the activity Jan 31 01:44:26 https://drive.google.com/file/d/0B1aH_yFA-4WcWXJ0YzZqVF9VTm8/view?usp=sharing Jan 31 01:44:49 Then if the value is null it will call everything Jan 31 01:45:55 john67_: guessing you are talking about the width? if so, you need to give it a width other than match_parent Jan 31 01:46:04 yeah Jan 31 01:46:18 Man TacticalJoke I'm lost Jan 31 01:46:22 whatitis-: yeah Jan 31 01:46:26 and maybe add some padding to give your text some room Jan 31 01:46:32 drose379: Your activity says "grabber.setListener(this);". Jan 31 01:46:47 Ok Jan 31 01:46:52 this being the context Jan 31 01:47:00 This being the activity itself. Jan 31 01:47:04 john67_: do you have a selector for it? Jan 31 01:47:27 Note that this is slightly complex. You are wading through slightly deep waters at this point. Jan 31 01:47:39 Im completley down Jan 31 01:47:47 whatitis-: no, why? Jan 31 01:47:57 I'll go through the whole thing with you if you want. It's not hugely complex, but it's not 100% simple either. Jan 31 01:48:20 yeah thatd be great Jan 31 01:48:23 As far as I can think, there is no better way of doing this than what I'm thinking of. Jan 31 01:48:37 Do you think I should just start from scratch on my downloader class? Jan 31 01:48:47 Just keep the basic request method Jan 31 01:48:47 john67_: so your button has colors for state of selection to act like a button,instead of just a view with a solid lime background. my aswell make it just a textview and add OnClickListener if you don't want state Jan 31 01:48:58 How do you mean? Jan 31 01:49:20 TacticalJoke do you think it would be better if we just started from scratch Jan 31 01:49:31 or just worked with what I have already written, if you think its not trash? Jan 31 01:49:33 No, I wouldn't say so. There's not much for you to do. Jan 31 01:49:38 You've done most of it. Jan 31 01:49:54 Sweet, alright. Im ready :D Jan 31 01:50:05 whatitis-: no, its just a simple button with onClickListener Jan 31 01:50:28 Okay, one sec. I'll paste something. Jan 31 01:51:07 Ok Jan 31 01:51:41 john67_: what i'm saying though is if you set a background on your button it won't have any other state color except the lime, for example on click or selected or disabled the button will always stay same color. Don't need a button for that if you aren't utilizing state. Can just use a TextView with a click listener and get same result Jan 31 01:52:30 whatitis-: i see, u mean the background color? Jan 31 01:52:33 drose379: When exactly are you calling LessonListGrabber.grab? Jan 31 01:52:40 When they click a button or something? Jan 31 01:52:47 Oops, I mean 'getData'. Jan 31 01:53:09 Yeah, the activity is created when they click a button Jan 31 01:53:20 And the method that calls getData is called in onCreate Jan 31 01:53:23 I see. Jan 31 01:53:23 john67_: yeah the background color, when you override it with a new item, it overrides the selector states of the android button. so you have to provide your own, so you can still mimick a click state,or disabled state etc.. Jan 31 01:53:42 whatitis-: oki no problem Jan 31 01:53:58 Does the Activity stay on screen after the list has been downloaded? Jan 31 01:54:06 Yes Jan 31 01:54:24 It will create the ListView next Jan 31 01:54:49 john67_: as far as the size issue, you can just give it a wrap_content size, or if gonna use linearlayout can use weights, or can give it an actual VALUEdp size etc Jan 31 01:55:06 whatitis-: yeah Jan 31 01:55:41 Ah, here's the problem. My OnPreferenceChangeListener is a static method, so I can't access my defaults set in strings.xml via getString() Jan 31 01:55:47 john67_: and if wanting text aligned with more padding so isn't right on borders, and can create a clickable size, you can add padding to the button Jan 31 01:56:15 Hmm. Trying to think of how you'll handle Activity rotation. Don't want this becoming complicated. Jan 31 01:56:44 Rotation? Jan 31 01:56:57 Yeah, Activities are destroyed and recreated upon screen rotation. Jan 31 01:57:22 Wont it work the same after it is re created Jan 31 01:57:47 Just thinking about whether it should be calling LessonListGrabber.getData every time onCreate happens. Jan 31 01:58:08 Not gonna be a huge request Jan 31 01:58:09 so sure Jan 31 02:01:17 whatitis-: i used this instead style="@style/buttonColor" Jan 31 02:06:40 Okay, drose379, it'll look something like this: http://pastebin.com/Uz55xfwZ Jan 31 02:06:54 I couldn't really create a compilable sample. Jan 31 02:07:19 I'm not sure of the best way to handle 'grabber' in your case, but making it a static variable is probably wise. Jan 31 02:09:24 Actually, there's a bug there -- 'subject' is being set only the first time onCreate runs. You might need a 'setSubject' thing in LessonListGrabber. Jan 31 02:09:26 Using static fields is never wise, especially mutable ones :) Jan 31 02:10:03 What's the alternative, Deuteros_? It wouldn't be wise for that instance to be lost on every screen rotation. Jan 31 02:10:04 also, Listener is an interface, not a class with a static field, so you can’t call onLessonListGrabbed on it Jan 31 02:10:04 Why is onLessonListGrabbed overrided? Jan 31 02:10:35 new Grabber(new Runnable() { … do things once you have the results }) Jan 31 02:10:51 Or just AsyncTask, that’s what it’s for Jan 31 02:11:06 Yeah, that should be 'listener.onLessonListGrabbed(list);'. Typo. Jan 31 02:11:41 Deuteros_: Can you substantiate what you said about statics? Jan 31 02:12:03 An AsyncTask doesn't seem like a good idea here. He's downloading HTTP stuff. Jan 31 02:12:14 drose379: That's the callback method. Jan 31 02:12:42 I would use Rx for this personally but probably too advanced for drose379 so let’s keep things simple Jan 31 02:12:46 Also, this is not a mutable static variable. It's a set-once one. Jan 31 02:13:02 I'd rather set it in the initializer, but he has that (awkward) constructor. Jan 31 02:13:08 TacticalJoke: It’s set once but still mutable (see the setter) Jan 31 02:14:09 TacticalJoke: why do you think AsyncTask is not appropriate here? Jan 31 02:14:09 Right, it's a mutable object, but it has to be. Jan 31 02:14:12 alright, sorted Jan 31 02:14:38 Are you talking about using an AsyncTask subclass as an inner class of an Activity? Jan 31 02:14:43 Download the stuff in doInBackground(), process the result in onPostExecute() Jan 31 02:15:04 It’s almost text book what the doc uses as an example: http://developer.android.com/reference/android/os/AsyncTask.html Jan 31 02:15:13 It's not recommended for stuff like this. Jan 31 02:15:32 Why? Jan 31 02:15:33 It's also a bad idea to use an inner class for something like this. That just invites context leaks. Jan 31 02:15:49 As well as coupling an Activity (a UI component) with something that has nothing to do with the UI. Jan 31 02:16:11 AsyncTask decouples that, that’s the reason it exists Jan 31 02:16:16 You’re just reinventing what AsyncTask does Jan 31 02:16:22 "AsyncTasks should ideally be used for short operations (a few seconds at the most.) If you need to keep threads running for long periods of time, it is highly recommended you use the various APIs provided by the java.util.concurrent package such as Executor, ThreadPoolExecutor and FutureTask." Jan 31 02:17:04 You can pass your own executor to AsyncTask but it’s irrelevant to the discussion Jan 31 02:17:07 Anyway, he's using OkHttp's async model, so it's out of the questoin. Jan 31 02:17:10 question* Jan 31 02:17:28 TacticalJoke why is onLessonListGrabber overrided Jan 31 02:17:44 How he does http is completely orthogonal Jan 31 02:17:54 drose379: The activity implements the interface containing that method. The "@Override" annotation actually means 'implement' here. Jan 31 02:18:15 Ok, im pretty lost Jan 31 02:18:20 Java just happens to use '@Override' for both overriding and implementing. Jan 31 02:18:54 Ok Jan 31 02:18:58 orivate Handler handler; handler.post(new Runnable() { public void run() { ... } }); Jan 31 02:19:03 Im gonna read through it a couple times and see what I can make of it Jan 31 02:19:35 Hm, so I managed to overwrite the preference with the default value if the user enters "" and it's shown in the SettingsActivity but when I tap on it again, the EditTextPreference input dialog doesn't show the new settings but "" instead Jan 31 02:19:51 how can I update that without closing the settingsActivity? Jan 31 02:19:51 Thanks alot for this TacticalJoke , ill BRB Jan 31 02:20:21 Deuteros_: It's not orthogonal. He's using OkHttp's async model; OkHttp handles the thread pool for him. Jan 31 02:20:41 Actually, even if I close the SettingsActivity and open it again, the input dialog still shows "" Jan 31 02:26:43 where can i find R.id.xxxxx? Jan 31 02:27:35 It’s generated, based on your .xml files Jan 31 02:28:24 AirStar: you should have defined it in your xml somwhere with id="@+id/xxxxx" Jan 31 02:28:39 yes Jan 31 02:28:43 i know it Jan 31 02:28:51 but i want see R.id.xxxx Jan 31 02:28:56 where can i see it? Jan 31 02:29:06 teegee: Jan 31 02:29:08 find -name "R.java" Jan 31 02:29:10 in your project dir Jan 31 02:29:16 oh thanks jesperj Jan 31 02:29:22 JesusFreke: Jan 31 02:30:17 i want to create multiple screen for the app, Jan 31 02:30:20 there is no R.java. Jan 31 02:30:31 AirStar: build your app first Jan 31 02:30:53 i built my app already Jan 31 02:31:37 there is only manifests, java res Jan 31 02:31:41 only 3 Jan 31 02:32:04 i want the app to be used by multiple multiple screen size for the app how can i do that? Jan 31 02:32:20 buy many monitor Jan 31 02:33:03 AirStar: In Eclipse, you should be able to Ctrl+click "R.id.whatever" to get to that file. In Android Studio, you can get there via Right Click > Find Usages. Jan 31 02:33:25 i use AS Jan 31 02:33:27 now Jan 31 02:34:03 ctrl+b Jan 31 02:34:07 to go to definition Jan 31 02:34:13 (in AS/IDEA) Jan 31 02:35:20 i want the app to be used by multiple multiple screen size for the app how can i do that? is the in the manifest is enough? Jan 31 02:35:29 i can’t see it Jan 31 02:36:35 AirStar: Otherwise try Ctrl+Shift+I when the caret us on 'R'. Jan 31 02:36:36 AirStar: Seems to me you need to spend some time reading a few docs Jan 31 02:36:47 john67_: unless you're _blocking_ some screens, it'll work on any size by default Jan 31 02:37:02 i use mac Jan 31 02:37:04 and AS Jan 31 02:37:10 cmd-B Jan 31 02:37:22 groxx: shouldnt create layouts for those screens? Jan 31 02:37:25 so how do I update the value of a SharedPreference so that the user input dialog shows it? I tried getting the Editor of the preference and then using putString and apply() but that doesn't do it Jan 31 02:37:46 john67_: if you have something in res/layout/ it'll be used for _any_ size screen. you already have one. Jan 31 02:38:13 you can add e.g. res/layout-w300dp/file.xml to handle things 300dp wide and wider, but it's not necessary to run. Jan 31 02:38:39 groxx: cool , then let me try the tablet to se Jan 31 02:38:41 see Jan 31 02:38:56 john67_: https://developer.android.com/guide/topics/resources/providing-resources.html has more info Jan 31 02:39:34 groxx: thnx Jan 31 02:39:39 http://developer.android.com/training/multiscreen/index.html is probably a better link Jan 31 02:39:51 for what he wants Jan 31 02:40:06 err, http://developer.android.com/guide/practices/screens_support.html Jan 31 02:40:12 good thinking ^ Jan 31 02:40:23 john67_: what JesusFreke said ^ Jan 31 02:40:41 eh, both are good Jan 31 02:42:34 soo, anyone help me with my OnPreferenceChangeListener? Jan 31 02:44:17 teegee: after you .apply() you probably want to update your UI. OnPrefChangeListener might work out, yeah, or you can just do it immediately after in your code. Jan 31 02:44:27 there's no magical data-binding though Jan 31 02:45:03 groxx: the UI update isn't the problem I think. It sets the summary of the preference alright and it shows it Jan 31 02:45:19 but when I click on the setting to change it again, it's still empty Jan 31 02:45:33 I'm guessing, this is because I only changed the summary, not the setting itself Jan 31 02:46:06 depends on your code, probably :\ mind sticking some in pastebin or something? Jan 31 02:46:08 that's what I wanted to use the preference.Editor for Jan 31 02:47:12 http://pastebin.com/BWQPWX28 Jan 31 02:48:33 teegee: is the problem that putting in your own value (not leaving it blank) doesn't get saved? Jan 31 02:49:10 Ok TacticalJoke back\ Jan 31 02:49:40 I need some advice Jan 31 02:50:15 Problem is when I click on the setting to change it. the dialog shows "" instead of the value I used to overwrite the summary with Jan 31 02:50:38 Hey. Jan 31 02:50:49 Tactical I just dont know where to start with this Jan 31 02:51:51 teegee: hm :\ I'm going to have to go afk for a while soon. I'm not too familiar with the preferences fragment unfortunately. Jan 31 02:51:57 I was looking for a couple of developers to form a "company" with for the purpose of developing apps for Google Play Jan 31 02:52:20 And I'm not sure where to look Jan 31 02:52:28 drose379: The basic idea is that the activity register itself as a listener (like calling setOnClickListener on a button). It then gets called back when a List has been downloaded. Jan 31 02:52:37 l_ol Jan 31 02:53:02 hm, thanks for looking at it groxx Jan 31 02:53:02 teegee: ah. it looks like EditTextPreference (I assume that's what it is) has a "setText" method on it that it claims saves the value. try that. Jan 31 02:53:19 Ok, got that. How does it know when List has been downloaded? Jan 31 02:53:28 Any ideas? Jan 31 02:53:50 It knows because its callback method (onListGrabbed, or whatever it was called) is called. Jan 31 02:54:09 It's like an onClick(View view) method. Jan 31 02:54:09 groxx: you mean in line 35, put a preference.setText? Jan 31 02:54:19 So I call onListCalled when I get the list back? Jan 31 02:54:34 When the list is ready, yeah. Jan 31 02:54:47 teegee: yes. you may have to make sure it's the right preference, in case that callback could be used for others (I'm not sure if it is or not) Jan 31 02:55:04 teegee: hopefully that works ¯\_(ツ)_/¯ Jan 31 02:55:12 groxx: this particular preference doesn't provide a setText method Jan 31 02:55:27 Ok, I may have to start from scratch Jan 31 02:55:29 with eclipse we have multiples screen device with android studio we re limited Jan 31 02:55:29 teegee: in your xml, is it an EditTextPreference? Jan 31 02:55:31 can i typecast it? Jan 31 02:55:38 it is Jan 31 02:55:43 And take it step-by-step Jan 31 02:55:53 teegee: yeah, you can cast it Jan 31 02:56:20 teegee: if you want to make sure it's safe to do so, you can check `if (preference instanceof EditTextPreference)` Jan 31 02:56:54 drose379: Is this the first time you've encountered the keyword 'interface'? Jan 31 02:57:01 No :D Jan 31 02:57:07 Ah, okay. Jan 31 02:57:33 If I implement the interface on the activity it just means I have to use the methods inside the interface right? Jan 31 02:57:47 It means you have to implement the methods of the interface, yeah. Jan 31 02:58:00 Inside the activity. Jan 31 02:58:00 So I need to create an interface Jan 31 02:58:13 groxx: it lets me do it but the input is still empty afterwards :( Jan 31 02:58:15 Yeah. Containing any method that takes a List. Jan 31 02:58:24 Why did you create the interface inside the class? Jan 31 02:58:27 Preferably with a name like "onListDownloaded". Jan 31 02:58:41 Just because it's so tied to that class. The interface will never be used anywhere else. Jan 31 02:58:51 groxx: at least now, if I close the settings and go back in, it's updated Jan 31 02:58:52 It's basically an implementation detail of that class. Jan 31 02:59:05 Well, an interface detail, I guess. Jan 31 02:59:31 Ok, so im gonna create that first Jan 31 02:59:52 teegee: :\ hm. progress, at least... I've gotta head out, hopefully someone else here is feeling helpful :) Jan 31 02:59:56 BTW, are you busy? Dont want to disturb you too much if youre doing something :D **** ENDING LOGGING AT Sat Jan 31 02:59:58 2015