**** BEGIN LOGGING AT Sat Nov 22 03:00:00 2014 Nov 22 03:45:48 HEY Nov 22 03:45:53 anyone awake? Nov 22 03:46:06 goblgoblgoblgobl Nov 22 03:46:14 yes Nov 22 03:46:21 i have a question Nov 22 03:46:25 about databses Nov 22 03:46:40 its the weekend, things get quiet :) Nov 22 03:46:46 how should one syncronize them between a phone and devices; Nov 22 03:46:50 er servers Nov 22 03:47:18 i have a transaction table in my database, which ill create on the phone and send it to the server Nov 22 03:47:25 id like it to be unique between them Nov 22 03:47:49 but obviously the phone will have less transactions than the dserver Nov 22 03:47:53 so... Nov 22 03:48:11 its kinda a pita. thats why google grabbed firebase Nov 22 03:48:42 well, i could do something silly like request a transaction id from the server Nov 22 03:48:53 which the db will use Nov 22 03:49:02 but... Nov 22 03:49:05 thats work Nov 22 03:49:08 this isn't my area, so i can't help :( Nov 22 03:49:20 goose you let me down bro Nov 22 03:49:56 :( Nov 22 03:52:10 "Once he was able to get everything up and running, turns out his Nexus 6 was running some kind of Android 4.4.4 KitKat test build — not 5.0 Lollipop. L.O.L" Nov 22 03:52:15 http://phandroid.com/2014/11/21/att-returns-nexus-6-stock-because-of-software-bug/ Nov 22 03:52:16 haha Nov 22 03:52:44 its like the whole google ecosystem is run by a bunch of clowns Nov 22 03:54:57 :| Nov 22 03:55:41 how many people work at google? Nov 22 03:55:53 i just asked that question to mysql Nov 22 03:56:05 and someone suggested its not a database question Nov 22 03:56:06 ugh Nov 22 03:56:16 what type of question could it be then? Nov 22 03:56:41 probably more software architecture Nov 22 03:56:56 distributes systems, specifically Nov 22 03:58:10 its not that off the beaten path Nov 22 03:58:19 sure I'm not asking how to do a join Nov 22 03:58:20 ... Nov 22 03:59:17 noones in the sqlite room Nov 22 03:59:19 ... Nov 22 03:59:21 hmmm Nov 22 04:03:20 g00s loves to blame google for everything Nov 22 04:03:28 when it was the oem at fault Nov 22 04:03:52 gobl this is when its nice to be able to write native extensions for sqlite Nov 22 04:04:16 gobl, is syncml still a thing Nov 22 04:04:20 for example, what sync often does is calc md5/sha/crc on a range of data and see if the db has the same md5 for that range Nov 22 04:04:24 sync is always a tough problem Nov 22 04:04:48 but if you try to do atht by iterating over a cursor yourself, its slow and shitty Nov 22 04:05:39 well, i could do something like generate a random gigantic number Nov 22 04:05:50 and pass it to the central Nov 22 04:05:53 i wrote sw at my previous job to sync the billing systems running on informix. they had master/slave but that didn't work so well over wan Nov 22 04:05:59 then issue requests off that? Nov 22 04:06:45 those are my competing ideas Nov 22 04:07:04 ask the central to create a row then pass the id back to the client server Nov 22 04:07:58 pfn if its a nexus, its a google experience :) Nov 22 04:07:59 or have the client generate a large number then submit the row, then sync based on that Nov 22 04:08:10 my nexus5 is decent Nov 22 04:08:19 its still google flagship Nov 22 04:08:23 doesn't matter, it's oem Nov 22 04:08:26 nexus6 looks like rubbish Nov 22 04:08:46 i don't get how gold thinks the nexus 6 is progress... Nov 22 04:08:48 Nexus 6 is awesome, minus the 6" craziness Nov 22 04:08:49 google** Nov 22 04:08:55 well, yeah Nov 22 04:09:05 but... thats a big mistep Nov 22 04:09:05 it is progress Nov 22 04:09:10 im 6' tall guy Nov 22 04:09:14 one phone, works on all us carriers Nov 22 04:09:22 *that* is progress Nov 22 04:09:27 i don't need a purse for my phone Nov 22 04:09:51 plus, they are $600 phones Nov 22 04:10:16 that's the most exciting thing, I can get an unlocked 6 from play store and run it on vzw Nov 22 04:10:18 and frankly, compared to the nexus 5 from last year, cost/benefit isn't there Nov 22 04:10:28 seems like at&t is putting shit on the device, so afaik the nexus name doesn't mean shit any more Nov 22 04:10:46 g00s, you don't have to buy it. from att Nov 22 04:11:01 and you can always flash a stock image Nov 22 04:11:12 fastboot? Nov 22 04:11:17 1 sku, all 4 US providers Nov 22 04:11:19 who the hell is going to do that? Nov 22 04:11:20 i'll have to ask my friend at vz what they do Nov 22 04:11:35 perhaps a android dev Nov 22 04:11:53 if you get a Nexus, you generally want to fastboot Nov 22 04:12:04 but noone outside a small group of people will flash random roms Nov 22 04:12:37 and they still haven't sorted out the divergence between phone apis Nov 22 04:12:42 android L looks great Nov 22 04:12:52 but nouns going to be using it for another year Nov 22 04:12:55 I want L on my moto x Nov 22 04:12:55 noone* Nov 22 04:13:10 I've got it on my nexus... Nov 22 04:13:14 * pfn is very happy with his 2014 x Nov 22 04:13:17 its fancy and slick Nov 22 04:13:22 I have L on my 7 Nov 22 04:13:35 i don't use it much since the screen is cracked Nov 22 04:13:43 but you can't target the nice features ofL because none has it... Nov 22 04:13:50 no one* Nov 22 04:14:09 and no one will, until android 6 is out. Nov 22 04:14:17 rinse repeat Nov 22 04:15:06 so you get this weird confluence of apps- some which are going to have material, the others holo Nov 22 04:17:24 reto is asking for all devs to take more risks :) Nov 22 04:17:40 http://sdtimes.com/google-shows-developers-android-possibilities/ Nov 22 04:18:21 "urged developers in their keynote talk at the Android Developer Conference in San Francisco today to find new ways to take risks in Android" Nov 22 04:18:25 you can take all the risks you want, if you don't have visibility... Nov 22 04:21:07 please take risks, but don't mind the Kafka-eque Agency that may suspend your app by mistake :) Nov 22 04:21:53 google or apple? Nov 22 04:22:06 lol g00s !!! check my pm Nov 22 04:22:10 you had that happen to you? Nov 22 04:22:14 happened to me recently.. Nov 22 04:23:17 what over, if you don't mind me asking? Nov 22 04:23:54 explained in pm gobl Nov 22 04:46:54 crazy led bulb http://www.gizmag.com/philips-75-watt-slimstyle-led-light-bulb/34881/ Nov 22 05:03:31 Why I need special permission to get token after I sign in with google+ ? Nov 22 05:16:51 anyone know where these are from http://google.github.io/material-design-icons/ Nov 22 05:17:11 oh, uhh Nov 22 05:17:13 google ? Nov 22 05:19:04 yes g00s https://github.com/google/material-design-icons/releases/ Nov 22 05:19:37 Can I use those icons in an ActionBar? Nov 22 05:19:45 Because they're not 32dpx32dp. Nov 22 05:19:46 it's even recommended Nov 22 05:20:08 TacticalJoke lol, they are svg Nov 22 05:20:22 make them whatever x whatever Nov 22 05:20:25 in the pack, you have many size as png too Nov 22 05:20:29 sizes* Nov 22 05:49:23 What do you guys do for personal/small private projects: do you use a version control system? nothing? use github? bitbucket? Nov 22 05:50:01 * private Nov 22 05:58:49 surf2b1, yes, i'm using mercurial (hg), but it's up to you to choose whatever you like Nov 22 05:59:27 anyone able to get setHideOnContentScrollEnabled to work? Nov 22 05:59:31 for actionbar api 21 Nov 22 06:00:35 surf2b1: Mercurial and Bitbucket. Nov 22 06:00:41 adq: :D Nov 22 06:00:47 Mercurial master race checking in. Nov 22 06:01:29 TacticalJoke: with a Bitbucket account or something else? Nov 22 06:01:36 With a Bitbucket account. Nov 22 06:01:49 Bitbucket is secondary, though, really. I use it mainly to back stuff up. Nov 22 06:01:52 Mercurial is the key thing. Nov 22 06:01:54 (Or Git.) Nov 22 06:02:16 git seems so popular but Mercurial just seems more simple and Bitbucket has free private repos so why would anyone use Github o.O Nov 22 06:03:17 Git got popular because it was used for the Linux kernel. Nov 22 06:03:22 Then it got popular because it was popular. Nov 22 06:03:31 Mercurial is essentially Git with a simpler, saner UI. Nov 22 06:03:52 Unfortunately, GitHub (the big player) doesn't support Mercurial. That's the main drawback of Mercurial, IMO. Nov 22 06:04:03 agree Nov 22 06:04:13 Bitbucket is good, though. Nov 22 06:04:20 Bitbucket also supports Git. Nov 22 06:04:43 before github hype, google code repo supported git & mercurial & svn Nov 22 06:04:59 Right. I think even CodePlex supported Mercurial. Nov 22 06:05:03 I forget whether it supported Git. Nov 22 06:05:03 TacticalJoke: free or paid account? Nov 22 06:05:12 also mercurial is not "essentially git", sorry to contradict Nov 22 06:05:15 surf2b1: Free on Bitbucket. Nov 22 06:05:33 it's a dcvs with its own specificities and common factors too Nov 22 06:05:38 adq: It has all of the power of Git (except octopus merging, which Mercurial's author refuses to implement because {I think} he thinks it's a stupid idea). Nov 22 06:05:46 Yeah, but they're both very, very similar. Nov 22 06:05:59 yeah becayse they both inherits from a c v s is Nov 22 06:07:37 They both stem from the BitKeeper debacle. Nov 22 06:07:45 They were started in the same week, I think. Nov 22 06:07:51 I think Mercurial is something like seven days younger than Git. Nov 22 06:07:52 i'm pretty ok with the author enforcements :) and at worst you can still bypass with some extension, example: "history should never be rewritten" (i like that) Nov 22 06:07:57 but you can use mq extension Nov 22 06:08:02 to alter any history Nov 22 06:08:18 You can do it without MQ. Nov 22 06:08:22 "hg commit --amend" Nov 22 06:08:39 TacticalJoke: What IDE are you using? I keep trying to switch over to Android Studio but I guess I'm just stuck on Eclipse Nov 22 06:08:56 I'm staying on Eclipse until Android Studio supports JVM unit testing. Nov 22 06:09:08 adq: Don't you rebase? Nov 22 06:09:16 I love rebasing to clarify branches. Nov 22 06:09:22 sometimes Nov 22 06:09:34 The new Evolve will be nice. History mutation without any risk. Nov 22 06:09:35 i'm not an expert or a deep user of mercurial though Nov 22 06:09:35 TacticalJoke: are you using gradle with Eclipse? Nov 22 06:09:38 Propagation of history mutation, too. Nov 22 06:09:45 surf2b1: Maven. Nov 22 06:09:50 <3 bisect feature Nov 22 06:10:42 Phases are nice. As are anonymous heads that never get garbage collected. :D Nov 22 06:11:14 Then branches can be named after creation. Nov 22 06:11:23 No up-front decisions required. Nov 22 06:11:38 :) Nov 22 06:11:52 i kinda wish hg came out earlier so linus enever gave us git Nov 22 06:11:58 but it didn't work out that way Nov 22 06:11:59 Same here. Nov 22 06:12:06 The world would simply be better. Nov 22 06:12:06 now everybody uses git :( Nov 22 06:12:12 Do you use Mercurial? Nov 22 06:12:27 no, i use git since everyone else does Nov 22 06:12:31 ahah Nov 22 06:12:33 I can understand that. Nov 22 06:12:40 It's hard to avoid the Git ecosystem. Nov 22 06:12:49 i'm totally avoiding it :) Nov 22 06:13:01 I'm glad we're not stuck with centralised revision control, though. Nov 22 06:13:03 Subversion sucked. Nov 22 06:13:20 ./trunk, /branches... eww. Nov 22 06:13:28 i heard evil things about github but i dont want to create FUD here Nov 22 06:14:02 but i think it's the damnation of opensource project, being plundered in any ways possible Nov 22 06:14:02 hg sucks Nov 22 06:14:11 and hg came out long ago Nov 22 06:14:18 Mercurial is better than Git, though. Nov 22 06:14:25 As much as Mercurial sucks, Git sucks way more. Nov 22 06:14:29 in what ways Nov 22 06:14:32 they have all pros & cons Nov 22 06:14:37 no need to troll on that :) Nov 22 06:14:43 hg doesn't do anything better really Nov 22 06:15:03 it doesn't even handle complex projects any better Nov 22 06:15:09 Phases, anonymous branching without problems, a simpler UI, a powerful extension system, the upcoming Evolve. Nov 22 06:15:17 openjdk hg repo stinks Nov 22 06:15:20 Mercurial does so many things better Nov 22 06:15:21 . Nov 22 06:16:31 Sorry. This is religious topic for me. :D Nov 22 06:17:11 and the fact that hg is all python makes it a pain for Windows Nov 22 06:17:36 O.o i thought that have it a leg up over git on windows wuuut Nov 22 06:17:40 The opposite is surely true. Git doesn't even support Windows. Nov 22 06:17:59 That's one of the key wins Mercurial has over Git: Windows support. Nov 22 06:18:16 To use Git on Windows, you rely on some guy spinning a Windows distribution. Nov 22 06:18:22 hi, my nexus 7 2013 flo, rom won't unlock and TWRP is unresponsive, how do i wipe dalvik and cache? Nov 22 06:18:30 apparently I haven't been using git on windows for the past 5 years Nov 22 06:18:37 You have, but you're using a Windows distro. Nov 22 06:18:41 fortheloss, i mean ForTheWin please read topic Nov 22 06:18:53 Git wasn't written with Windows in mind at all. Nov 22 06:19:01 neither was hg Nov 22 06:19:05 Mercurial was, and they do testing specifically for Windows. Nov 22 06:19:08 Wrong. Nov 22 06:19:21 TacticalJoke is right about this one Nov 22 06:19:29 unfortunately :) Nov 22 06:19:36 They have whole suites of tests just for Windows. Documentation just for Windows. Nov 22 06:19:40 hg interface has always sucked on windows for me Nov 22 06:19:42 Why is that unfortunate? Nov 22 06:19:48 vi vs emacs, hg vs git, android vs ios... next? Nov 22 06:19:49 * pfn shrugs Nov 22 06:20:00 adq emacs, git, and WP ! Nov 22 06:20:07 lol Nov 22 06:20:09 Vim and Emacs both suck. :D Nov 22 06:20:19 i'm using ST atm Nov 22 06:20:27 hey whatever happened to that atom editor Nov 22 06:20:52 https://atom.io/ Nov 22 06:21:07 don't hear much about it Nov 22 06:21:42 I used to use Vim, but the problem is that then you forgot how to use general text boxes. Nov 22 06:21:52 I tried to use hg for a while before git, couldn't get into it Nov 22 06:22:51 i'm going to try sleeping tonight under my space blanket :D Nov 22 06:22:53 mozilla, openjdk and others using still couldn't make it worthwhile Nov 22 06:22:58 effing cold :( Nov 22 06:23:07 The upcoming Evolve will make Mercurial hugely better than Git. Nov 22 06:23:18 Safe, simple, propagated history mutation. Nov 22 06:24:25 pfn does the win git require bash ? Nov 22 06:24:36 g00s, comes with. Nov 22 06:24:56 You can use Mercurial with PowerShell. Nov 22 06:25:11 Though I actually am not keen on PowerShell. I even use cmd.exe sometimes. Nov 22 06:25:26 powershell sucks as a ui Nov 22 06:25:44 good for working with net components. Nov 22 06:25:52 but that's it. Nov 22 06:26:49 What do you folks think about this pattern for dealing with onClick stuff in adapters: http://pastebin.com/cpkisfi4 Nov 22 06:27:02 Also the ViewHolder thing? (I guess that class should be renamed since it isn't a pure "view holder" anymore.) Nov 22 06:28:11 I'm trying to find the lesser evil here. Nov 22 06:28:22 Main thing I dislike about it is having to use setTag for the data. Nov 22 06:28:27 (Talking about the onClick stuff.) Nov 22 06:28:28 ast adapter i made, the viewholder was the presenter Nov 22 06:28:31 *last Nov 22 06:29:11 I never use view holders Nov 22 06:29:18 Hmm. I could call it ViewPresenter, I guess. Nov 22 06:29:23 for recyclerview you have to though Nov 22 06:29:29 I always encapsulate within a composite view Nov 22 06:29:44 yeah i did that too Nov 22 06:29:50 What about the onClick stuff? Nov 22 06:30:02 It seems that the lesser evil is to give the adapter a View.OnClickListener. Nov 22 06:30:04 TacticalJoke this was good http://blog.xebia.com/2013/07/22/viewholder-considered-harmful/ Nov 22 06:30:14 I don't really want my adapter doing the stuff itself (e.g., starting new activities). Nov 22 06:30:23 Yeah, I considered that, but what SimonVT said yesterday made me go against it. :D Nov 22 06:30:31 what did he say ? Nov 22 06:30:36 just curious Nov 22 06:31:07 I think he said that he prefers layout classes to simply lay stuff out (and not bind data). Nov 22 06:31:14 I think that was the argument that won me over. Nov 22 06:31:27 I could be misquoting him. Nov 22 06:31:37 thats not an argument - but i dont want to sidetrack you :D Nov 22 06:31:44 lol Nov 22 06:31:52 I like the simplicity of that code I just posted, though. Nov 22 06:31:58 It's basically a view holder without all the mess. Nov 22 06:32:04 Or a "view manager" or something. Nov 22 06:32:16 I hate the word 'manager', though. It usually means I have no idea what a class does. Nov 22 06:32:39 Is there any expert for google+ in here? Nov 22 06:33:41 it's #android-dev .. Nov 22 06:33:51 The key drawback of that code is that the ViewHolder isn't a *static* nested class. Nov 22 06:33:57 Awkward coupling. Nov 22 06:34:29 *google+ signin for android. Nov 22 06:34:37 But I guess it's not a huge deal. The class is nested anyway (suggesting an imtimate relationship). Nov 22 06:34:53 ah ! :) Nov 22 06:35:21 slani, describe your problem properly and wait for answer from someone who believes he can you Nov 22 06:35:30 can help you* Nov 22 06:35:53 Haha. "Someone who *believes* he can help you". So true. :D Nov 22 06:36:05 :D Nov 22 06:36:22 That reminds me of all those blogs. Nov 22 06:36:29 "I don't have a clue, but I'll write a blog post anyway." Nov 22 06:36:52 and they got ads of course Nov 22 06:36:56 Though I guess I'd take that over a world with almost no blog posts. Nov 22 06:36:57 Ya. Nov 22 06:39:31 Is there any risk that calling "someView.setTag(foo);" won't work? (Would Android ever remove my tag?) Nov 22 06:39:47 no, the tag is application defined Nov 22 06:39:48 I'm guessing not, since the documentation says that the tag thing is a convenient way of storing data. Nov 22 06:39:52 and managed Nov 22 06:39:54 K. Nov 22 06:44:14 ugh, github desktop site sucks on mobile so bad Nov 22 06:45:44 The new Wikipedia mobile site is so neat. Nov 22 06:46:54 Wait, it's the desktop site. Hmm. It looks so different on my tablet. Nov 22 07:01:09 On android app I implemented Google+ signin. All those scopes (Scopes.PLUS_LOGIN, Scopes.PLUS_ME, Scopes.PROFILE) are included. Because app need to access some data on app engine backend I try to get token with GoogleAuthUtil.getToken where socpe is "oauth2:https://www.googleapis.com/auth/plus.me". The problem is that again confirmation is needed that app can access basic profile info. Nov 22 07:08:52 So...I want alerts...basically lets say an API request fails. I'd like to display the message to the user Nov 22 07:09:00 Is it standard to use an Alert dialog? Nov 22 07:09:11 yes Nov 22 07:09:22 And people just kinda style that to make it look pretty? Nov 22 07:09:28 ciree you could also use something like crouton Nov 22 07:09:29 well, i just discovered adb hell Nov 22 07:09:33 http://www.google.com/design/spec/patterns/errors.html#errors-user-input-errors Nov 22 07:10:41 Is that that new stuff I've been reading about? Nov 22 07:11:45 oh i guess its snackbar Nov 22 07:12:13 I like the snackbar, is that new? Nov 22 07:12:33 would be nice if they added snackbar and bottom sheets to support lib Nov 22 07:12:49 shiieeeet Nov 22 07:13:01 I mean its really just a view thats aligned to parent bottom no? Nov 22 07:13:21 i've never seen it Nov 22 07:13:37 I'll just stick with an alert dialog Nov 22 07:13:45 XD Nov 22 07:13:59 least resistance ;) Nov 22 07:14:39 ciree thats what google does Nov 22 07:14:43 Do I have to have a positive button and negative button? Or can I just have an Ok Nov 22 07:14:49 Like "deal with it" Nov 22 07:15:04 either Nov 22 07:15:10 Cool Nov 22 07:15:11 Thanks Nov 22 07:15:18 You could even use a TextView. Nov 22 07:15:23 Show it when there's an error. Nov 22 07:15:27 Basically a poor man's crouton. Nov 22 07:15:57 Showing an alert dialog isn't ideal. It's confusing for people to suddenly get a popup out of nowhere (thinking of async requests going wrong). Nov 22 07:16:26 If it's not async then I guess that's less bad. Nov 22 07:18:25 It is async, but its a ecommerce app Nov 22 07:19:28 With my app, I'm gonna show a crouton/TextView at the top of the activity if something goes wrong. Nov 22 07:19:35 And they can click it to retry the download or whatever. Nov 22 07:19:48 Or click to get more info. Nov 22 07:19:57 What do you do to keep its z-index above everything else? Nov 22 07:20:35 Hmm. I don't know what your layout is like, but in my case I can simply show it above the main ListView. Nov 22 07:20:43 Set it from invisible to visible. Nov 22 07:20:54 Then does it push the listview down? Nov 22 07:20:57 Yeah. Nov 22 07:21:07 Seems a little off Nov 22 07:21:10 It'll show something such as "Error: could not download comments". Nov 22 07:21:19 Can you animate the showing of the textview? Nov 22 07:21:35 I dunno. I guess that's possible. I'm not much of a View expert. Nov 22 07:21:50 It's not ideal, but IMO it's way better than a popup. Nov 22 07:21:58 People will hate the app if stuff pops up out of nowhere. Nov 22 07:22:11 Like those websites you go to. "Fill in our survey!" :D Nov 22 07:23:02 I'm guessing it'd be easy to animate the appearance of a TextView. Nov 22 07:23:08 Or even show a colour-change animation. Nov 22 07:23:16 It could flash red. lol Nov 22 07:23:21 Well I mean I guess its not async....just implemented. I'm working on a daily deals ecommerce site...basically, if the add to cart button says unavailable...I throw a popup saying...you can't add this product etc Nov 22 07:23:45 Still think thats poor ux? Nov 22 07:23:57 Hmm. Couldn't you just disable the button? Nov 22 07:24:08 Maybe I misunderstood. Nov 22 07:24:23 Not a bad idea... Nov 22 07:24:33 I might just do that Nov 22 07:24:34 Disabling buttons can make for a good UX, IMO. Nov 22 07:24:35 Good call Nov 22 07:24:37 It's vital info. Nov 22 07:25:19 Another good question, it used to be a button, but I needed the text to resize automagically. What do you use to make text autofit? Nov 22 07:26:30 you programmatically compute the size and set it via setTextSize Nov 22 07:26:46 adq: Care you explain a bit more? Nov 22 07:28:09 you need to know the "desired" height, and know how much takes (depending on the dpi) your textsize, and then you cross multiplicate Nov 22 07:29:20 but it's not really common to have a variable textsize, it's probably not recommended except in rare cases Nov 22 07:30:52 I find myself using it a lot actually...say...the title of a product in a gridview Nov 22 07:41:31 Can I transfer paid apps from one Google account to another? I want to delete one of my Google accounts and I want to move the apps I've paid for on it to my new account. This page: https://support.google.com/accounts/answer/58582?hl=en says there are "no data move options" for Google Play :( Nov 22 07:43:02 Why? Nov 22 07:43:19 This is wrong, I want my paid apps to be avaiable on my new account, I want to delete my old account! Nov 22 07:44:30 is this a development question? Nov 22 07:48:39 Of course! e.g. a company gives access given to a developer to purchase paid apps for the companies competitors on the developer's Google account with the company credit card , after a while the developer leaves the company but the company wants to *MOVE* the paid apps from the developer account to another developer instead of buying them again. Nov 22 07:49:36 sounds like a poor company decision Nov 22 07:52:07 DrSkyLizard, https://support.google.com/googleplay/android-developer/checklist/3294213?hl=en Nov 22 07:52:20 maybe it appears after you checked everything (like unpublishing) Nov 22 07:54:40 I need loli for my tmo gs5 ... Nov 22 08:14:55 Is there a way to listen for an incoming call and automatically answer the phone call programmtically? There are several things that my code needs to do, 1. turn off mobile data 2. turn on airplane mode 3. turn off airplane mode 4. turn on mobile data 5. turn on youtube and play random video for five minutes 6. make phone call to reference device and stay on call for 1 minute and hang up, repeat 1 to 6 10 times. Nov 22 08:17:38 I think I can use uiautomator to pretty much perform all those tasks, but for step 6, when I have two devices connected to the PC (one device under test, and another as a reference device), I have to make a call from DUT to the reference device, in this case I can have it so that the code will sleep for relatively about 10 seconds or depending on how quickly the phone call goes through and then have uiautomator answer the c Nov 22 08:17:39 all after that set time. But I believe there is a better way to do this... maybe have the test code listen to a phone call and answer it when it actually comes in? Nov 22 08:19:02 thisandthat: I think it must be possible to do what you want. apps like Contacts+ implement their own incoming call activity that sits on top of the default. Nov 22 08:19:10 (or at least thats how it looks to me) Nov 22 08:19:42 you can answer the call by interacting with this activity, so there must be some code there that picks up the phone Nov 22 08:20:01 i don't know how... but at least it should be possible :) Nov 22 08:20:45 try looking for documentation on any intents that are used when a call comes in. you just need to implement an activity that picks up that intent Nov 22 08:22:05 If we have a TextView that displays messages, we refer to it as "messageTextView" in code. But isn't "messageView" always sufficient? Is the View type ever really significant? Nov 22 08:22:11 we might refer* Nov 22 08:22:19 to Nov 22 08:22:25 gsteinert: thanks I'll look into that Nov 22 08:22:42 I guess it's significant when we have multiple views for the same data. Nov 22 08:23:09 TacticalJoke: an image and text both conveying the message perhaps? Nov 22 08:23:37 it all comes down to convention. there's no real right or wrong answer as long your code is still easy to understand and you apply it consistently Nov 22 08:23:47 Ya. Nov 22 08:25:04 i tend to use a short prefix to indicate a variables type (tvMessage for a text view for example) a bit VBish maybe, but it does the job for me Nov 22 08:25:33 Yeah, I remember that from VB6 and earlier. :) Nov 22 08:25:46 btnOK.Caption = "OK" Nov 22 08:26:18 i do confess to favouring easy to type over easy to understand for variables that are only used for a few lines... my intents are invariably called `i` Nov 22 08:26:34 I just use Ctrl+Space for easy typing. :D Nov 22 08:26:43 I hate that I have to press Enter, though (in Eclipse). Nov 22 08:26:48 Should be able to autocomplete with '.' and stuff. Nov 22 08:27:48 I use Android Studio, it has the same problem, but the autocomplete will carry on through so you only have to press Enter once. Nov 22 08:28:17 e.g. th.cont.getSys will match this.context.getSystemService() Nov 22 08:28:22 Oh, nice. Nov 22 08:28:33 Though it's annoying that they don't autocomplete on the period. Hmm. Nov 22 08:28:40 Visual Studio was so good here. Nov 22 08:28:44 Almost anything would accept the candidate. Nov 22 08:28:57 I think it should accept unless we press Esc or something. Nov 22 08:29:38 I think that would annoy me, I have a few occasions where I try to move up or down a line after correnting a typo and just end up scrolling the autocompletes Nov 22 08:29:46 I don't want more excuses for that to happen! Nov 22 08:54:17 hi Nov 22 08:57:15 how do you get the path to the SD card if one is attached? Nov 22 08:57:48 Environment.getExternalStorageDirectory().getAbsolutePath() Nov 22 08:57:48 environment.getexternalstoragedirectory() Nov 22 08:58:20 btw anyone love immersive mode in android ? Nov 22 08:58:52 Yeah, it's good. Nov 22 08:59:07 God dammit. Candy Crush Saga gets so difficult. Nov 22 08:59:21 TacticalJoke : but this doesn't work on below 4.4 Nov 22 08:59:24 http://stackoverflow.com/questions/21652352/immersive-fullscreen-below-4-4 Nov 22 08:59:52 does anyone know a solution of it ? Nov 22 09:00:23 I'm facing same problem. Nov 22 09:01:06 ok thanks alot Nov 22 09:01:45 is it better to use getAbsolutePath rather than getPath? Nov 22 09:03:52 They should return the same value here. Nov 22 09:03:56 ok Nov 22 09:03:57 I think "getPath" probably makes more sense. Nov 22 09:04:16 getAbsolutePath returns "path" if it can detect that it's absolute. Nov 22 09:04:20 Else, it constructs an absolute path. Nov 22 09:04:24 or getCanonicalPath Nov 22 09:04:28 As you can see here: https://android.googlesource.com/platform/libcore.git/+/android-4.2.2_r1/luni/src/main/java/java/io/File.java Nov 22 09:04:34 which would clean .. .. and etc Nov 22 09:05:26 getCanonicalPath says "return realpath(getAbsolutePath());", where "realpath" is a native method. Nov 22 09:05:57 oh well it might work differently in android ~ Nov 22 09:05:58 does the OS merge the contents of the SD card and internal storage in the getExternalStorageDirectory? Nov 22 09:06:45 I wouldn't expect it to, ChrisUK. Nov 22 09:07:36 that call seems to give me the directory of my internal storage Nov 22 09:10:33 [ Every Android-compatible device supports a shared "external storage" that you can use to save files. This can be a removable storage media (such as an SD card) or an internal (non-removable) storage. ] Nov 22 09:10:41 Which path do you get? Nov 22 09:12:19 Hello, Is it a huge job to add icons to the navigation drawer menu items ? Nov 22 09:12:51 Tactical: /storage/sdcard0 Nov 22 09:13:19 which seems to contain the folders from my interal storage Nov 22 09:14:28 Unknown0BC: No. Plenty of tutorials and documentation on it. Nov 22 09:15:14 surf2b1, I am just looking at some of that seems like its not going to be just specifying a drawable... :\ Nov 22 09:15:30 hmm it seems getExternalStorageState() returns to internal Sd point mount, which in some devices would be internal memory or sdcard :s Nov 22 09:15:50 ChrisUK: Are you looking for shared internal storage or the path to a removable micro sdcard? Nov 22 09:16:06 surf: I am trying to make a lil file browser Nov 22 09:16:12 that allows the user to browse their files Nov 22 09:16:54 are you having any fun ChrisUK ? Nov 22 09:18:12 Environment.getExternalStorageDir() will get the internal storage. There is no public API to get the micro sd path but you could do something like this for a micro sd: http://pastebin.com/RpUEsa3P Nov 22 09:18:13 a lil bit :) Nov 22 09:22:35 ChrisUK: Also take a look at Environment.java: https://github.com/android/platform_frameworks_base/blob/master/core/java/android/os/Environment.java They use environment variables to determine paths for the sdcard which are set in init.rc at boot Nov 22 09:23:47 you guys should read this http://commonsware.com/blog/2014/04/08/storage-situation-external-storage.html Nov 22 09:23:53 ^^^^^^^ Nov 22 09:24:01 System.getenv("SECONDARY_STORAGE"); seems to work kinda :) Nov 22 09:24:04 interesting article Nov 22 09:25:06 ChrisUK: On some devices it will return a few locations so make sure you split the String like in the pastebin Nov 22 09:37:11 I’m reading a 1.4mb csv-file from the assets directory, and it takes forever to load (5min+). Any ideas on what might cause it? I’m a little lost at the moment Nov 22 09:39:11 mask90: Android is slow at reading large files. How are your reading it? Why not convert the csv to a database? Nov 22 09:40:16 mask90, first don't read your file from the UI thread Nov 22 09:40:20 surf: thanks alot Nov 22 09:40:33 ChrisUK: NP :) Nov 22 09:44:29 surf: is it possible to get the path where sdcard0 and sdcard1 folders are stored? Nov 22 09:44:42 so I just start my app in that folder? Nov 22 09:44:45 adq: My UI depends on the content of the file Nov 22 09:45:49 sdcard0 and sdcard1 might not even be on many android devices. I know ES File Explorer just open up to /sdcard Nov 22 09:46:39 so I could just start in the /storage directory? Nov 22 09:47:22 most just use Environment.getExternalStorageDir() though because you know your app can read/write to that directory whereas if you open up, to lets say, /storage/emulated/legacy you cannot read/write Nov 22 09:49:12 surf2b1: I read it using opencsv. Nov 22 09:49:31 maybe it is best if I only allow them to browse that directory Nov 22 09:50:10 I wanted to create a custom button. I created a relative layout, added a textview and an imageview. Why does the onclicklistener for the relative layout never fire? There are no listeners on the text or imageview Nov 22 09:51:29 danijoo: Did you add android:clickable="true" to the RelativeLayout? Nov 22 09:52:04 mask90: hmmm.. never used it before. I would convert it to a sqlite database though if possible. Much faster Nov 22 09:52:23 surf2b1: thanks, I’ll look into that Nov 22 09:52:45 surf2b1: wow.. and this is the reason why i shouldnt code right after getting up.. thanks ^^ Nov 22 09:56:00 you stop the night before right before you are about to finish something, like add a few lines... then in the morning you either finish something and feel good or have the enrgy to debug it ;p Nov 22 09:57:13 Had some beers while coding yesterday. now I have a lot of those "what the hell did I do there?" moments.. Nov 22 09:57:15 ^^' Nov 22 09:59:18 in the future you'll get a ticket for that Nov 22 09:59:23 thats when you do git checkout -b project_beernuts Nov 22 10:00:14 just missed the ballmer peak :) Nov 22 10:01:15 http://xkcd.com/323/ Nov 22 10:04:02 http://stackoverflow.com/questions/27075988/get-token-with-googleauthutil-gettoken-after-user-was-signed-in-with-google Nov 22 10:11:06 The v7 search view auto close when I type something. why? Nov 22 10:23:34 I have a edittext field and I want to check if that contains any error Nov 22 10:23:52 I did edittext.getError().toString().isEmpty Nov 22 10:24:07 but it gives a nullpointer exception Nov 22 10:24:27 y? Nov 22 10:24:29 niru: did you read the documentation for that? Nov 22 10:24:56 public CharSequence getError(): Returns the error message that was set to be displayed with setError(CharSequence), or null if no error was set or if it the error was cleared by the widget after user input. Nov 22 10:27:35 ah so I am receiving a null Nov 22 10:27:40 :) Nov 22 10:28:46 so which inbuilt function will show if at all no errors Nov 22 10:29:25 if(editText.getError() == null) noError(); Nov 22 10:30:17 fragment transction collapse the searchview, why?!" Nov 22 10:30:44 can someone tell me whats wrong with that code ? https://dpaste.de/LNrk#L3,18,19,21,28 Nov 22 10:30:52 thanks danijoo it worked Nov 22 10:33:51 mustafa666: not if you cant tell where the error is Nov 22 10:34:02 with a stacktrace Nov 22 10:34:22 danijoo: no error or exceptions at all thats the point .. look at line 3 comment Nov 22 10:34:47 wrong id I guess Nov 22 10:35:27 danijoo: its the correct ID because look at line 28 Nov 22 10:35:48 this is a bug in android :P Nov 22 10:37:09 sorry never worked with contacts Nov 22 10:37:28 Napalm: ^ Nov 22 10:37:33 I think such a bug would have been noticed and fixed earlier so i dont think so. But you can check the bugtracker. Nov 22 10:38:07 mhmm.. Nov 22 10:43:23 fragment transction collapse the searchview. why?!? Nov 22 10:44:15 yoavst: do your fragments have menu options that get added to the actionbar? Nov 22 10:44:24 danijoo: not Nov 22 10:44:37 is it working with searchview v4? Nov 22 10:44:42 wait a min Nov 22 10:44:47 it got setHasOptionsMenu Nov 22 10:44:54 (true) ? Nov 22 10:44:57 yes Nov 22 10:45:01 thats the reason Nov 22 10:45:02 thanks Nov 22 10:45:10 never thought about that :/ Nov 22 10:45:26 it tells the activity that it wants to add a menu item, so the menu has to be redrawn Nov 22 10:45:49 https://code.google.com/p/android/issues/detail?id=78377 Nov 22 10:46:12 if I use toolbar as actionbar, should this bug happen? Nov 22 10:46:18 still not fixed :D so funny Nov 22 10:46:24 yoavst: yes Nov 22 10:46:26 because tried on Samsung S4 mini on 4.2.2 Nov 22 10:46:29 and it worked Nov 22 10:46:34 on the debug with no progaurd Nov 22 10:46:57 you have to touch the actionbar Nov 22 10:47:15 also I think the s4 s none of the phones where this happen Nov 22 10:47:18 yes, clicked on menu items Nov 22 10:47:23 see https://code.google.com/p/android/issues/detail?id=78377#c68 Nov 22 10:47:33 #68 Nov 22 10:47:36 oh Nov 22 10:47:55 all the phones I saw Nov 22 10:48:03 in the issue where us varients Nov 22 10:48:08 US Nov 22 10:48:23 you can check if you are affected by using appthweck Nov 22 10:49:54 maybe it is AT&T or T-Mobile that put the old support library Nov 22 10:50:09 because they were too lazy to add it to each app Nov 22 10:52:05 danijoo: I just choose devices and upload apk? Nov 22 10:52:20 yeah Nov 22 10:52:29 if you want the monkey runner thats the way to go Nov 22 10:52:37 or you write unit tests Nov 22 10:53:13 btw Nov 22 10:53:16 https://scontent-b-lhr.xx.fbcdn.net/hphotos-xpa1/t31.0-8/10517666_1041486732543528_8406711140678919675_o.jpg Nov 22 10:53:29 what do you think on the design? it is a redesign of my old Jokes app Nov 22 10:55:42 materialish ;) Nov 22 10:56:59 java.lang.NoClassDefFoundError: android.support.v7.internal.view.menu.MenuBuilder - 1 occurrence Log Samsung Galaxy Light (4.2.2): Exerciser Monkey Nov 22 10:57:01 damn Nov 22 10:59:04 i dont think google will fix this, since its a samsung issue Nov 22 10:59:17 and i dont think samsung will fix this because they dont give a fuck Nov 22 11:03:47 Hello Nov 22 11:04:23 Do anyone know if recovery_ui.cpp is working under CM9/ICS? Nov 22 11:04:34 wrong channel Nov 22 11:04:39 see topic Nov 22 11:04:44 Oh okay :D Nov 22 11:15:53 whats the difference between cardviews cardElevation and cardMaxElevation? Nov 22 11:22:16 danijoo: and how to check if the ImageView field does not have a Tag? Nov 22 11:22:30 image.getTag()==null will do? Nov 22 11:22:35 test it Nov 22 11:25:16 lasserix: This is the pattern I went with in the end: http://pastebin.com/3bv0jQdG Nov 22 11:25:35 A modified ViewHolder along with the Activity setting the View.OnClickListener. Nov 22 11:26:28 It uses View.getTag. It's neat and resistant to change. :D Nov 22 11:44:48 I wish variables were final by default in Java Nov 22 11:44:49 . Nov 22 11:44:59 Would be nice to have to request mutability. Nov 22 11:45:32 does anyone know which property hold an URI that looks like this (content://contacts/people/) in here: http://developer.android.com/reference/android/provider/ContactsContract.html Nov 22 11:46:13 TacticalJoke, you made an oxymore, a varaible variable is not a constant :) Nov 22 11:46:17 variable* Nov 22 11:47:01 An immutable variable (a final variable) is a variable. :) Nov 22 12:04:00 or: whats the People.CONTENT_UTI replacement (since its deprecated) in ContactsContract ? http://developer.android.com/reference/android/provider/Contacts.People.html#CONTENT_URI Nov 22 12:05:09 mustafa666: Have you considered looking at the code? Nov 22 12:05:28 I don't have a clue about the topic, but whenever I need inner knowledge of Android I read the code. Nov 22 12:11:43 This field was deprecated in API level 5. see ContactsContract Nov 22 12:11:52 i think you should see COntactsContract :p Nov 22 12:15:02 Do you guys prefer Integer.toString(int) or String.valueOf(int)? Nov 22 12:15:11 I usually pick the second, but I'm always uncertain. Nov 22 12:15:18 The first seems clearer, kinda. Nov 22 12:16:13 hi Nov 22 12:16:17 is there an app template that is much like the play store? http://stackoverflow.com/questions/27006664/app-template-for-activity-with-navigation-bar-and-tabview Nov 22 12:19:26 does anyone know how do i inflate ContactsContract.Contacts.Photo.PHOTO ? Nov 22 12:21:57 what does that mean "Thumbnail photo of the raw contact. This is the raw bytes of an image that could be inflated using BitmapFactory." Nov 22 12:22:10 http://developer.android.com/reference/android/provider/ContactsContract.Contacts.Photo.html Nov 22 12:23:03 how do i inflate it using BitmapFactory Nov 22 12:26:50 how the hell do i change a contact photo .. Nov 22 12:27:00 wow its so complicated Nov 22 12:41:16 Is there a listener for recyclerview finish inflating the visible views? Nov 22 12:44:23 no Nov 22 12:45:07 so If I want to do something with the first child (ShowCaseView) just one time Nov 22 12:45:21 it is impossible? (without saving a boolean and...) Nov 22 12:47:43 Do it in your adapter Nov 22 12:50:03 My Reddit client's coming along well. :) Nov 22 12:50:04 I can't wait to release. Nov 22 13:03:02 in android studio, how do I avoid the line break at 80 chars? Nov 22 13:03:15 i mean this gray line at the right https://www.dropbox.com/s/xk5gu6znr0qluwh/Screenshot%202014-11-22%2014.02.53.png?dl=0 Nov 22 13:03:16 is it just me or does the use of cardview double nearly double the number of layouts that must be used? Nov 22 13:03:22 that really pisses me off :D Nov 22 13:03:54 wrapping linearlayouts and relativelayouts in CardViews feel so wrong.. Nov 22 13:04:47 smart_ptr: That's probably switch-off-able. Nov 22 13:04:55 I don't use AS, but I'm sure there's an option. Nov 22 13:05:04 i am looking for ~15 for this thing Nov 22 13:05:10 15 min :O Nov 22 13:05:44 smart_ptr: File > Settings > Editor > General > Appearance > Show right margin. Nov 22 13:06:00 smart_ptr: somewhere in editor settings. search for "wrapping" Nov 22 13:06:19 Why do they have Settings under File? Weird. Nov 22 13:06:48 http://lmgtfy.com/?q=intellij+change+line+length Nov 22 13:07:40 well, in AS there's a tab "wrapping" containing around 100 checkboxes :) Nov 22 13:08:24 it really tends to be a UI hell on times Nov 22 13:09:35 I don't get why everyone raves about IntelliJ. It's kinda "meh" to me. Nov 22 13:09:47 Even Martin Fowler goes on about how amazing it is. Nov 22 13:10:23 because eclipse is worst TacticalJoke Nov 22 13:27:04 Is there any way to get a datepicker in a fragment rather then in a dialog or dialogfragment? Nov 22 13:49:35 isn't "www.google.com" a valid URL? Nov 22 13:50:00 no Nov 22 13:50:23 pragma-: what is it then? Nov 22 13:50:42 a canonical address Nov 22 13:51:19 hmm that explains why my app was failing Nov 22 13:51:23 thanks pragma- Nov 22 13:51:31 http://www.google.com would be a URL Nov 22 13:55:28 heyhey Nov 22 13:55:30 help Nov 22 13:55:47 isn't there any class I can use to hash passwords? Nov 22 13:55:49 How do I get the current width of device? for example nexus 5: on portarit it will return 1080 and on landscape 1920 Nov 22 13:56:50 getWindowManager().getDefaultDisplay().getSize Nov 22 13:57:05 and the value is changed on orientation change? Nov 22 13:58:53 I believe so Nov 22 13:59:41 well, it works on phone, I'll test it later on tablet Nov 22 13:59:53 thanks Nov 22 14:02:34 cheers Nov 22 14:07:16 do I have to validate URL if I include try to catch MalformedURLException? Nov 22 14:10:14 sandman13: What do you mean? Nov 22 14:11:49 TacticalJoke: doing something like this: https://bpaste.net/show/1be766f3db86 Nov 22 14:12:47 If you wanted, you could say "(catch MalformedURLException e) { throw new RuntimeException(e); }". Nov 22 14:13:00 Really, MalformedURLException should have been an unchecked exception. Nov 22 14:13:11 (In fact, checked exceptions were a terrible idea in general.) Nov 22 14:14:31 I think wrapping it in a RuntimeException is about the best solution here. I can't think of anything better. Nov 22 14:15:01 Even if you're sure that you'll never catch that exception, you never know. There could be some weird bug in your code. In that case, swallowing the exception just makes debugging difficult. Nov 22 14:16:34 hmm okay I will look at it Nov 22 14:16:38 thanks TacticalJoke Nov 22 14:17:26 In any case, sandman13, it's almost always bad to swallow exceptions (which is what "e.printStackTrace();" does). Nov 22 14:18:16 In fact, I'm not sure what "e.printStackTrace();" would do on Android. Possibly nothing. Nov 22 14:24:12 sandman13: Now that I think of it, could you just use the exception mechanism? Nov 22 14:24:16 i.e., forget about checking before hand. Nov 22 14:24:23 Not sure whether that's a good solution in your case. Just an idea. Nov 22 14:24:40 lemme try that Nov 22 14:24:53 brb Nov 22 14:36:22 TacticalJoke: Generally printStackTrace prints to logcat Nov 22 14:36:36 Okay. Nov 22 14:36:59 Although I'd recommend you use Log.w or something simimar Nov 22 14:37:14 passing in a Throwable will print it to logcat with your required log level Nov 22 14:37:58 Yeah, though I think I'd prefer, in most cases, an app to crash in these cases. Nov 22 14:38:06 So many people swallow exceptions and just log them. Nov 22 14:38:09 TacticalJoke: Indeed Nov 22 14:38:31 TacticalJoke: Don't take me wrong, I agree with you fully. I just pointed out how to print your stack traces in case you want to Nov 22 14:38:36 :) Nov 22 14:38:44 Yeah, it can be handy. Thanks. Nov 22 14:39:01 Didn't know about the Throwable overload. Nov 22 14:39:27 I'd recommend Log.wtf(), but the implemenetation of it is stupid. The docs suggest that it will log the error and terminate the process (which would be perfect is such situations). However, it doesn't and the program keeps running. Nov 22 14:40:01 Ah. Log.wtf is a really nice idea. Shame it doesn't work, then. Nov 22 14:40:42 TacticalJoke: The docs are quite unclear on what it actually is suppsoed to do, so I created a small wrapper which does Log.wtf followed by a throw RuntimeException Nov 22 14:40:52 That's the best I could think of as a handler for such cases Nov 22 14:41:01 Hah. Nice idea. Nov 22 14:41:19 LogExtras.wth Nov 22 14:41:31 I call it Log.wtf but in a different package :-) Nov 22 14:41:43 :D Nov 22 14:41:45 Passes a hardcoded log tag as well Nov 22 14:42:28 Hmm. I'm looking at the code for Log.wtf. Nov 22 14:42:43 It ultimately calls "Process.killProcess(Process.myPid()); System.exit(10);". Nov 22 14:42:44 TacticalJoke: I never did that. Nov 22 14:42:47 Looks like it should work. Weird. Nov 22 14:43:00 That's the 4.0.1 code, anyway. I got lazy and used GrepCode. Nov 22 14:43:06 Hmm... I can't remember what version I tested it on. Probably something like 4.2 or something Nov 22 14:43:08 maybe it changed Nov 22 14:43:49 Whatever, my solution is still safe :-) Nov 22 14:44:01 I don't do enough Android development to keep track. Nov 22 14:44:02 In the context of deploying my own apps to my own device, are there any costs or limits involved? Nov 22 14:44:11 TomWij: no Nov 22 14:44:12 Though it does that only if "ActivityManagerNative.getDefault().handleApplicationWtf(mApplicationObject, tag, system, new ApplicationErrorReport.CrashInfo(t))" evaluates to true. Nov 22 14:44:32 TomWij: You can deploy to anything without any cost or any processes. Nov 22 14:44:48 TomWij: The only time you have to pay something is if you want to register for the Google AppStore Nov 22 14:44:56 loke_: So, I download the SDK, create thousands of apps and deploy them to the device? Nov 22 14:44:59 that's a one-time fee of... hmm... was it 10 USD? Nov 22 14:45:06 I think $25. Nov 22 14:45:07 TomWij: Yes Nov 22 14:45:13 TacticalJoke: Yeah, read up on that. Nov 22 14:45:38 TomWij: You create an APK file and the users can download it on their own. You only have to pay 25$ if you want to deploy through the app store Nov 22 14:45:39 loke_: Thanks; coming from a WP background, that's interesting. Nov 22 14:45:54 What are the costs with Windows Phone? Nov 22 14:46:07 TomWij: Yes. I think the windows devices are locked down in a similar way as the Iphone is. Nov 22 14:46:19 The iPhone situation is crazy. I forget the cost, but it's some yearly fee. Nov 22 14:46:26 I'm glad this isn't the case with Android. Nov 22 14:46:42 Dreamspark free dev account, then there is an annual fee for home developer and a higher annual fee for bussiness developer. Nov 22 14:47:00 TomWij: The Android devices has a config menu option that says "Allow installation of third-party applications" or something to that effect. With it enabled, you simply download the APK from a browser (or as email attachment or whatever other way you get the file) and it installs. Nov 22 14:47:14 TacticalJoke: I think it's 100$/year Nov 22 14:47:32 That's unfortunate, because it discourages free apps. Nov 22 14:47:53 So, created some app in my free time; but once it expired, the apps got removed from the phone. Given I'm near the end of student time, I'd rather be able to use own written apps on my own phone without extra costs or limitations. Nov 22 14:48:01 Nice to hear that on Android this is possible. Nov 22 14:48:02 TacticalJoke: Right. I'm not sure that's actually "unfortunate" from the point of view of the operating system vendor though :-) Nov 22 14:48:18 Yeah. Nov 22 14:48:34 loke_: Yeah, found that information too; with the malware / careful warnings. Nov 22 14:48:42 TomWij: Wait a second... You can't even run your own applications on your own device without a subscription? Nov 22 14:48:48 loke_: Do I need to enable that config menu option for my own apps too? Or are mine signed? Nov 22 14:48:50 TomWij: Android seems fairly libre. Nov 22 14:48:54 Well, not *that* libre. Nov 22 14:48:58 But not insanely locked down eithert. Nov 22 14:49:00 either* Nov 22 14:49:09 Stallman surely hates Android. Bad example. Nov 22 14:49:33 loke_: They've removed some of these limits, but I haven't been keeping track of them. Apps now stay and I think you no longer need to have the account. Nov 22 14:49:48 TomWij: No. I don't think so, because you generally install the applications through ADB (the development protocol that the development tools uses to talk to the device) Nov 22 14:49:56 But I guess there still is a maximum amount of side loaded apps ('cause they really want to fill marketplace). Nov 22 14:50:01 I didn't have to enable that option to do development. Nov 22 14:50:13 Also, the developer tools do the signing for debug builds, I think. Nov 22 14:50:20 There's basically no setup in that respect. Nov 22 14:50:30 We have to sign release builds. Nov 22 14:50:34 TacticalJoke: Yes, you're right. I tried installing a purely unsigned build once, and it refused :-) Nov 22 14:50:50 TacticalJoke: Debug builds are signed with a debug certificate I think. Nov 22 14:51:51 How does the compatibility of applications work on Android? Nov 22 14:52:00 TomWij: What do you mean? Nov 22 14:52:01 If I have a 4.3 apps, can it run on 5.0? Nov 22 14:52:07 TomWij: Yes. Of course. Nov 22 14:52:19 The compatibility system is good. Nov 22 14:52:20 But not the other way around? Nov 22 14:52:26 Or does 5.0 on 4.3 work too? Nov 22 14:52:40 You can specify "I've tested my app only 4.3 only", and then the system might enable compatibility behaviours for 5.0 (though it's rarely needed). Nov 22 14:52:46 TomWij: When Google adds new major API's, they often add implementations of those API's for older OS'es too so that you can use them, and they fall back to the campatibility libraries if you don't have native support Nov 22 14:53:01 The behaviours are documented. Nov 22 14:53:56 ('cause I'm one of those guys that is affected by the lack of a WP7 -> WP8 upgrade) Nov 22 14:54:18 TomWij: Hmm... what? Nov 22 14:54:24 I'm guessing that the only nice thing about WP development is C#. Nov 22 14:54:30 But even that's got baggage now. Nov 22 14:54:32 TomWij: So if you have a 7 application, it doesn't run on 8? Nov 22 14:54:51 TacticalJoke: hmm, in what way is c# nicer than Java? Nov 22 14:55:09 Reified generics, functional programming, little things such as 'var'. Nov 22 14:55:13 loke_: WP8 doesn't run on WP7 at all; the other way around I don't know, 'cause I own a WP7. Nov 22 14:55:15 Lambdas, of course. Nov 22 14:55:17 Depending on preferences, they are both horrible or both good. :-) Nov 22 14:55:28 C# is basically a superior Java. Nov 22 14:55:29 TacticalJoke: Well, Java has them too Nov 22 14:55:31 Java++. Nov 22 14:55:42 Yeah, but we "can't" use them for Android. Nov 22 14:55:48 TacticalJoke: Ah, yes. You're right Nov 22 14:55:50 Scare-quotes. :D Nov 22 14:55:50 Thanks Oracle Nov 22 14:55:51 <_flip> I agree, C# is nicer Nov 22 14:56:02 It's more Google's fault. Nov 22 14:56:06 I'm using Xamarin atm \o/ Nov 22 14:56:06 If we can use the word 'fault'. Nov 22 14:56:18 MS is making build tools for Android now. Nov 22 14:56:25 MS could destroy Google's efforts. Nov 22 14:56:32 They're "the man" when it comes to development tools. Nov 22 14:56:33 TacticalJoke: I'm assuming that Google isn't brining in the Java 8 API's because of Oracle lawsuits about the API's Nov 22 14:56:34 * TomWij doesn't mind writing Java if the surrounding Android environment gives a better experience altogether. Nov 22 14:56:46 That might be part of it. Not sure. Also that they haven't gotten around to it yet. Nov 22 14:56:53 TacticalJoke: I don't agree there. I haven't seen anything nicer than IntelliJ Nov 22 14:57:01 Have you used Visual Studio? Nov 22 14:57:17 TacticalJoke: Yes, of course. Nov 22 14:57:25 I'm not keen on IntelliJ. Nov 22 14:57:29 It's one of those things I don't "get". :D Nov 22 14:57:37 Everyone raves about it. I don't see it. Nov 22 14:57:37 <_flip> I do like what MS is doing recently, but I doubt it will really threaten Google Nov 22 14:57:59 TacticalJoke: Well, I've used it since version 3, so I'm very comfortable with it. However, I can understand that a lot of things can be confusing to a newcomer to it Nov 22 14:58:24 I'm looking forward to trying it seriously, when Android Studio supports JVM unit testing. Nov 22 14:58:28 Hey, so I have a custom view(in xamarin but they work the same) that draws on the canvas, do I have to manually set the view size to the canvas size? Other views don't seem to lay out next to the custom view properly if I set below/above to the custom view. Nov 22 14:58:29 I'm not hugely keen on Eclipse. Nov 22 14:58:38 It's more of a lesser evil (for me at this moment). Nov 22 14:58:51 <_flip> I'm trying to get a drawable overlay on a Bitmap. How would i do that? I've tried using a LayerDrawable, and it works, but it seems both bitmaps have to be the exact same size. Nov 22 14:59:09 <_flip> and i want a drawable in the corner of a bigger bitmap Nov 22 14:59:32 Do you use Android Studio, loke_? Nov 22 14:59:34 Just curious. Nov 22 15:00:36 TacticalJoke: Well, you could say that. After all, Android Studio is a stripped-down free version of IntelliJ IDEA. Nov 22 15:00:58 At work there Nov 22 15:01:21 At work there's plenty of Java, so I also use IDEA there. But for other things I prefer using Emacs. Nov 22 15:01:46 Then agan, for other projects I generally don't use Java either :-) Nov 22 15:06:04 God, Candy Crush Saga gets hard if you don't pay. Nov 22 15:06:18 TacticalJoke: Yes, that's when I stopped playing Nov 22 15:06:26 I utterly despise pay-to-win games Nov 22 15:06:28 Yeah. Nov 22 15:06:36 They exploit people's addictions. Nov 22 15:06:41 And children's cluelessness. Nov 22 15:06:50 I can't take screenshot from Nexus 9 Emulator Nov 22 15:06:53 I found a free clone that has all the features, but no in-application puchases Nov 22 15:06:53 why? Nov 22 15:06:58 Nice Nov 22 15:06:58 . Nov 22 15:07:03 It was good until I got to a level that was practivally unbeatable :-) Nov 22 15:07:26 If only I could remember what the clone was called. Nov 22 15:07:57 pay to win is the only way to make money on mobile now, markets too saturated. Unless you coume out with the one in a million app. Nov 22 15:08:28 Personally, I don't seek to make money. I'm just creating a Reddit client that (hopefully) doesn't suck. Nov 22 15:08:35 zbcm: I think the problem is the expectation that you can make money on mobile applications in the first place Nov 22 15:08:37 In some areas, there's a serious lack of decent apps. Nov 22 15:08:42 yeah I'm working on a free app too Nov 22 15:08:43 TacticalJoke: I'd use that Nov 22 15:08:54 loke_, you can, if you are a big company that can spend lots on marketing Nov 22 15:09:04 The idea is that it supports basically all of Reddit and has a nice, clean, fun UI. Nov 22 15:09:13 My favourite Reddit client on Android is RedReader. Nov 22 15:09:21 But it doesn't support much of Reddit. Even "view more posts". Nov 22 15:09:22 don't like baconreader? Nov 22 15:09:27 I hate ads. :/ Nov 22 15:09:29 I'm working on one free application, and one commercial. However, for the commerical one it's not the application that'll cost money, but it's a client for a larger corporate system Nov 22 15:09:30 ah right Nov 22 15:09:41 yeah thats fair Nov 22 15:09:41 I guess I'd pay if it were really good. Nov 22 15:09:47 My free application, although I haven't worked on it lately: https://github.com/lokedhs/android-gnu-apl Nov 22 15:10:00 But I wasn't hugely keen on it when I first tried it (though I admit that this didn't last long, as I hated the ads so much). Nov 22 15:10:08 TacticalJoke: Do you have an alpha release or somethign one could try? Nov 22 15:10:19 Not yet; sorry. Just started one week ago. Nov 22 15:10:21 And do you have Android Wear support? :-) (just asking, because i have an LG R) Nov 22 15:10:26 Though I'm putting basically *all* of my spare time into it. :) Nov 22 15:10:30 Oh, I know nothing about Wear. lol Nov 22 15:10:39 I hope to release in a few months. Nov 22 15:10:44 I know that's optimistic. Nov 22 15:10:56 I've done a lot of this stuff before, really. Nov 22 15:10:59 Little of it is new to me. Nov 22 15:11:23 I cannot for the life of me get other views to react to this custom view. I'm just rendering the board with a canvas, do I have to manually set the view size or something before I set other views below/above parameter to the custom view id? http://i.imgur.com/54WmITF.png Nov 22 15:11:56 if I set the avatar layout's below parameter to the game board it just disappears. Nov 22 15:12:27 loke_: Might buy a Samsung Gear Live along Sony Xperia Z3 as I like the Android Wear from what I see. Nov 22 15:13:06 loke_: I'll ping you before release. :) Nov 22 15:13:16 I don't know whether to do a test release or just go crazy. Nov 22 15:13:18 I'm considering the latter. Nov 22 15:13:39 Does anyone knows why layout-sw600dp-land not work on emulator Nexus 7 2013 landscape? Nov 22 15:15:16 switch order of qualifier Nov 22 15:15:26 loke_: Which Reddit client do you use, if you don't mind my asking? Nov 22 15:16:32 pfn: well, I checked and it doesn't work also on sw600dp Nov 22 15:16:35 without the land Nov 22 15:17:21 TacticalJoke: The web page Nov 22 15:17:25 My G pad 8.3 works fine, and also the nexus 9 emulator, but the 7 emulator seem to use phone resources Nov 22 15:17:33 I wasn't even aware there was such a thing as clients for it Nov 22 15:17:34 'o Nov 22 15:17:36 ;o * Nov 22 15:18:23 Also, I'm gonna try to keep this client similar (in functionality) to the web page. Reddit clients shouldn't deviate too much, IMO. Nov 22 15:18:28 damn, I'll just take the screenshots on 4.4 in Genymotion instead of 5.0 with emulator :/ Nov 22 15:18:43 emulator... Nov 22 15:19:42 pfn: I need a tablet with 5.0, and I need to keep my G pad with stock firmware :/ Nov 22 15:20:30 emulator configured wrong Nov 22 15:21:20 I even installed the intall HSFM Nov 22 15:21:23 or something like that Nov 22 15:21:25 still slow :P Nov 22 15:21:35 haxm* Nov 22 15:22:54 x86 Nov 22 15:24:02 pfn: x86-64 Nov 22 15:25:36 yoavst, no, the emulator Nov 22 15:26:46 yes Nov 22 15:26:49 emulator x86-64 Nov 22 15:27:21 why emulate 64bit Nov 22 15:28:18 https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager Nov 22 15:28:35 If I get it right from reading, AOSP means I can modify the Android OS itself if I want to? Are there any gotchas? Nov 22 15:29:09 Yes, why emulate 64bit Nov 22 15:29:26 TomWij, a device you can install it on Nov 22 15:29:38 TomWij, not all devices are bootloader unlocked Nov 22 15:30:16 pfn: well, I thought that it will be easier to the processor using this HAXM Nov 22 15:30:24 and faster then 32bit Nov 22 15:30:33 but it is emulator, you can say fast in the same sentence Nov 22 15:30:38 can't* Nov 22 15:30:53 pfn: Sony brings out their own AOSP device configurations; so, I guess that should work. Nov 22 15:31:43 pictures that are displayed within the UI can be saved in the res folder. But in which folder do i have to copy them if i want to use the same for all display types? (hdpi, xhdip etc...)? Nov 22 15:32:55 Oh, looks like it depends on the release... (need to check in service menu) Nov 22 15:33:55 And it seems to affect camera performance if u unlock; okay, won't go down that road unless I have enough reasons to. Android already looks great by itself for now... :P Nov 22 15:36:37 Okay, thanks for the answers; gonna do some review reading and make the decision soon. Nov 22 15:36:52 * kuldeepdhaka is trying to remake http://qt-apps.org/content/show.php/QScale?content=148053 for Android Nov 22 15:37:12 no success. :( Nov 22 15:42:27 hey guys Nov 22 15:42:40 I've been trying to get my nexus 5 to talk to android studio Nov 22 15:42:51 by following http://developer.android.com/tools/device.html Nov 22 15:43:27 but I'm not able to get it to work :( Nov 22 15:45:05 figured it out! Nov 22 15:45:07 finally! Nov 22 15:45:13 thanks guys! Nov 22 15:46:13 yoavst, the emulator is fast, and emulating 64bit would not. be any faster Nov 22 15:46:19 palomer: You're welcome. Nov 22 15:51:22 hurray for unideal workarounds. http://i.imgur.com/juATTQq.png Nov 22 15:51:34 'tis working Nov 22 15:54:02 zbcm, go is awesome :) Nov 22 15:54:18 \o/ Nov 22 15:54:19 have you made an AI for Go too? Nov 22 15:55:22 Hey guys, I'd like to ask for your suggestions if I want to launch an Activity from the main one, and then from that new one, send data to the main. How should I do that? Nov 22 15:58:37 startActivityForResult Nov 22 15:58:48 (From the main Activity.) Nov 22 15:58:56 thanks TacticalJoke Nov 22 16:06:00 Can I use google+ token to access app engine backend??? Nov 22 16:06:34 if your backend supports + tokens Nov 22 16:06:48 appengine supports google tokens, not + Nov 22 16:14:38 pfn: I implemented google+ sing in android app. I also have backend on app engine. How can user access this backend from android app. (google acount is needed to access backend) Nov 22 16:16:34 you don't Nov 22 16:19:18 pfn: so it is imposible??? Nov 22 16:20:24 + is not google Nov 22 16:20:26 not for signin Nov 22 16:23:13 pfn: what can I do then? Nov 22 16:35:43 is there a way to check if a directory on external storage is avaiable? Nov 22 16:35:56 or if external storage directory is avaiable at all Nov 22 16:36:41 ChrisUK: https://developer.android.com/guide/topics/data/data-storage.html#filesExternal Nov 22 16:36:55 I’m ripping my head apart here. I’m getting this super casual numberformatexception, but I just don’t understand why it’s not able to parse a double from this string? Double.parseDouble(“65.00”); Nov 22 16:38:58 Hmm, I'm looking into ListView's recycling mechanism. It seems to keep a *lot* of "convertView"s around for recycling. Nov 22 16:39:01 Localization? Nov 22 16:39:07 I thought it'd only keep one or so. Weird. Nov 22 16:39:12 i.e. does 65,00 work? Nov 22 16:39:34 Do you guys know exactly how it works? Like, how many cached views does it hold at most? Nov 22 16:39:45 Let's say my list has 1,000 homogeneous items. Nov 22 16:41:00 It should only keep as many as it has displayed at once Nov 22 16:41:09 anyone know of a good meter ui library for Android like http://qt-apps.org/content/show.php/QScale?content=148053 [this is in qt] Nov 22 16:41:44 s/a good/any/ Nov 22 16:42:01 I see. Nov 22 16:44:26 could someone enlighten me why the "example" would be cause an error? (example cannot be resolved or is not a field) http://dpaste.com/1RZYMGD Nov 22 16:44:37 i thought that R.drawable. expects a string Nov 22 16:44:38 I believe it caps the recyclebin at Adapter#getCount, in case you don't recycle Nov 22 16:44:51 SimonVT: 65,00 also throws numberformatexception Nov 22 16:47:58 how does okhttp's request queueing work? Nov 22 16:48:02 seems like it's fucking my app somehow Nov 22 16:50:46 Okay, with 275 items (not sure why that number), my ListView uses 11 recycled views. Nov 22 16:51:04 what a fuckn joke....only filenames with 0-9a-z are allowed???? welcome back to the '80s Nov 22 16:51:09 And there are maybe six on the screen at one time (though they're variable height, so that changes). Nov 22 16:51:45 Pretty cool, I guess. Nov 22 16:53:08 There are sometimes almost 10 on screen, so it kinda makes sense. Nov 22 16:54:23 SimonVT: actually, it parses the string “65.00” but I have a variable containing the exact same value (without whitespaces), and it throws an exception Nov 22 16:54:24 I'm making a Reddit client, and I'm not sure what is the best strategy for minimizing memory use when the user scrolls down indefinitely. Nov 22 16:54:35 Should I remove the higher (out-of-view) items completely? Nov 22 16:54:48 Or set the items in the list to null, to reduce memory use? Nov 22 16:54:56 (And then re-download them if the user scrolls back up.) Nov 22 16:55:29 I'm guessing setting to null is better (so that the ListView doesn't suddenly show fewer items {e.g., with the scrollbar}). Nov 22 16:55:52 mask90: If it parses "65.00" correctly, then your variable isn't "65.00" Nov 22 16:56:19 pfn: Do you have any thoughts on the best approach here? :) Nov 22 16:56:56 TacticalJoke, listview does not run out of memory when scrolling infinitely Nov 22 16:57:13 TacticalJoke, your underlying data structure will, use a circular buffer Nov 22 16:57:31 Thanks. Googling. Nov 22 16:57:37 ringbuffer Nov 22 16:58:43 If I use this, will my ListView still think I have a large number of items? (e.g., will the scrollbar still be low down?) Nov 22 16:59:07 Maybe that's a dumb question. Nov 22 16:59:15 TacticalJoke, it is, your adapter tells you what the count is Nov 22 16:59:23 and that determines scrollbar position Nov 22 16:59:31 Ahh. Of course. Nov 22 17:00:09 This stuff is so much clever than what I'm used to (ListBoxes on Windows). Nov 22 17:00:12 cleverer* Nov 22 17:00:27 recyclerview is supposed to be even better Nov 22 17:00:28 * pfn shrugs Nov 22 17:00:31 I haven't tried it yet Nov 22 17:00:37 Yeah. I hope to switch to that soon(ish). Nov 22 17:01:30 any good book to start android programming? Nov 22 17:01:47 SimonVT: I know, but it’s really weird. When I print it out , it says “65.00” and the debugger also claims the value of the variable is “65.00” Nov 22 17:02:27 ovrflw0x: I think the best approach is using the tutorials on developer.android.com and just *doing*. Nov 22 17:03:00 But others disagree, I guess. Nov 22 17:03:34 hey guys Nov 22 17:03:46 I want to store a set of predetermined key/value pairs in a file Nov 22 17:03:54 as constants Nov 22 17:03:59 where should they go> Nov 22 17:04:00 ? Nov 22 17:04:37 What kind of key/value pairs? And how many? Nov 22 17:04:49 I'm trying to create a bluetooth app, the server work, but the client fail Nov 22 17:05:15 Exception: java.io.IOException: read failed, socket might closed or timeout, read ret: -1 java.io.IOException: read failed, socket might closed or timeout, read ret: -1 Nov 22 17:05:19 TacticalJoke: 30 key value pairs. things like ["eat", "manger"] Nov 22 17:08:11 I'm not sure, palomer. Haven't done that. String resources are a possibility, but I don't know whether they're the best one. Nov 22 17:08:23 Or I guess you could just bundle a text file with your app and read that at runtime. Nov 22 17:08:30 hi guys Nov 22 17:09:26 pfn: A circular buffer seems perfect. :) Nov 22 17:09:34 TacticalJoke: got it. thanks! Nov 22 17:10:05 You can also use string-array resources if you have a one->many key->value relationship. Nov 22 17:10:52 https://github.com/pfn/qicr/blob/master/common/src/com/hanhuy/android/irc/model/MessageAdapter.scala#L304 Nov 22 17:10:56 a simple ringbuffer implementation Nov 22 17:11:59 im trying to understand something, Im new to android dev and i have added a framelayout to my activiy. the framelayout has a couple of imageview. I have also created a subclass of Framelayout. Now Im wondering how I can assign the subclass to my Framelayout in my activity. Coming from an iOS background, there was a property on each view where you could enter th class. how would i do this in android Nov 22 17:13:07 Nice and concise. Nov 22 17:13:45 is there no support for cursors on the new recyclerview and cardview? Nov 22 17:14:16 I love problem domains that use modulo operations. Not sure why. Nov 22 17:14:32 Feels like completing a jigsaw puzzle. Nov 22 17:14:40 s/use/call fo/ Nov 22 17:14:42 for* Nov 22 17:14:54 because modulo is computationally cheap and very useful :) Nov 22 17:15:46 I guess it's also similar to counting on fingers. Simple and neat. Nov 22 17:16:16 cooldman224, it's really not hard to write your own adapter for cursors Nov 22 17:16:23 http://www.keithschwarz.com/interesting/code/ring-buffer/RingBuffer.java.html <- i'm using this ringbuffer in a project, I also saw this one but never tried it, yet: http://mechanitis.blogspot.fr/2011/06/dissecting-disruptor-how-do-i-read-from.html <- Nov 22 17:17:15 I wonder how many items I should store. Not sure whether to measure their screen or just use a high-enough number. Nov 22 17:17:22 pfn: any sudo code you could make or resource you can point me to? Nov 22 17:17:43 cooldman224, the source for cursoradapter in aosp Nov 22 17:21:29 and is there no way to have an empty view for recyclerview/cardview like in listview? Nov 22 17:21:58 which token do I need that I can access app engine backend from android app? Please help me Nov 22 17:22:05 having an empty array linked to your adapter should do the trick cooldman224 Nov 22 17:22:15 empty != null Nov 22 17:25:20 adq: right but what about an empty cursor? Nov 22 17:25:30 idk for that Nov 22 17:25:56 sweet support library... Nov 22 17:40:44 Hi guys.. I would like to put an object to my ContentProvider... but the ContentValues doesnt accept objects just raw data... is somebody there with a hint to work with objects on a ContentProvider? Nov 22 17:41:37 I just inherited a firly simple project. A list view with 4 large images. But scrolling seems to lag because of a GC. Whats the best way to debug whats going on? Could this be a recycler issue in getView or something about bitmaps? Nov 22 17:42:26 how long does downloading "Gradle" take in android studio? Nov 22 17:43:58 ovrflw0x: I think the the canary 1.0 release gradle is built in? Nov 22 17:44:06 eghdk: What does the getView method look like? Nov 22 17:45:17 It has some code related to view holder... Nov 22 17:45:36 nvm Nov 22 17:46:09 TacticalJoke: It seems to be set up the right way. But I'm getting jank. Nov 22 17:46:41 How is it loading the bitmaps? Nov 22 17:47:51 TacticalJoke: simply viewholder.myImageView.setImageResource(ID); Nov 22 17:48:36 for testing what should i select for testing apps? i want virtual device Nov 22 17:48:51 "This does Bitmap reading and decoding on the UI thread, which can cause a latency hiccup. If that's a concern, consider using setImageDrawable(android.graphics.drawable.Drawable) or setImageBitmap(android.graphics.Bitmap) and BitmapFactory instead. Nov 22 17:48:52 any random will do or is there any generic Nov 22 17:48:55 " Nov 22 17:49:19 ovrflw0x: I do JVM unit testing. But I don't test my Android-specific stuff. Nov 22 17:49:45 TacticalJoke, i mean running app on emulator Nov 22 17:49:53 which virtual device do i need Nov 22 17:50:33 Oh. Not sure. I just choose "Nexus" and so on. Nov 22 17:50:53 I guess it's good to try different screen types. Nov 22 17:51:40 Skipping 'Intel x86 Atom System Image, Android API 21, revision 1'; it depends on 'SDK Platform Android 5.0, API 21, revision 1' which was not installed. Nov 22 17:51:40 Done. Nothing was installed. Nov 22 17:52:37 do i need to install system image separately? i downloaded android studio Nov 22 17:52:40 These circular buffers are so easy to implement. Especially with modulus. Nov 22 17:52:58 TacticalJoke: This does bitmap reading and decoding on UI thread? Nov 22 17:53:03 How do you know that? Nov 22 17:53:11 **goes to look at docs** Nov 22 17:53:11 eghdk: I googled. :) Nov 22 17:53:34 Hi guys.. I would like to put an object to my ContentProvider... but the ContentValues doesnt accept objects just raw data... is somebody there with a hint to work with objects on a ContentProvider? Nov 22 17:53:50 Scaling your bitmaps to the size they're displayed also greatly speeds up your app Nov 22 17:55:16 TacticalJoke: Thanks. I guess I should always go to the docs first... but idk. I figured setImageResource should be a super clean way to do it. Nov 22 17:55:32 deadpoint: use gson Nov 22 17:56:01 SimonVT: Calculating the size and then resizing to that size takes less time than just trying to use the bitmap itself? Nov 22 17:56:44 Scale bitmaps on a separate thread Nov 22 17:57:51 Drawing a 100x100px bitmap is faster than drawing a 1000x1000px bitmap Nov 22 18:00:38 that should work yeahh... thanks cooldman224 Nov 22 18:02:02 sdk manager doesn't show intel image for emulator what to do? Nov 22 18:02:09 deadpoint: np Nov 22 18:03:21 ovrflw0x: install the intel x86 accelerator under extras in the sdk manager Nov 22 18:04:52 cooldman224, there's no intel x86 acc listed in Extras Nov 22 18:05:37 SimonVT: What should I do If I want to save the scaled bitmaps... lets say they have to be drawn a lot... so it makes more sense to scale it once and then save it for reuse? right? Nov 22 18:06:06 Yes Nov 22 18:07:03 How do I know how many images I can actually cache though... without taking up way too much space? Nov 22 18:07:35 ovrflw0x: ummm that can't be right Nov 22 18:07:40 too much space aka causing an out of memory Nov 22 18:07:45 what to do? Nov 22 18:07:49 You should probably just use a library to do this for you Nov 22 18:08:42 anyone using android studio on mac? Nov 22 18:08:55 is your simulator freezing every time Nov 22 18:09:11 SimonVT: Which lib is your go to? Nov 22 18:09:16 Picasso Nov 22 18:09:24 ovrflw0x: what is shown under extras then? Nov 22 18:09:33 screenshot Nov 22 18:09:42 android support library and google usb driver Nov 22 18:09:43 SimonVT: Also, last question about this. So drawing 100 px x 100 px is faster than 1000 by 1000, but when I give an imageView an 1000 x 1000 image to draw... won't it figure out that the imageView is 100 x 100 and just do all the scaling of the bitmap for me? Why should I do the scaling before hand? Nov 22 18:10:29 pangelovski i am using Android Studio on Mac.. have always trouble with Simulators.. very slow and so on.. I am just use Devices to debug Nov 22 18:10:54 Sure, and it'll scale it down for you.. On the ui thread Nov 22 18:10:57 deadpoint: i even installed haxm 1.1.1 and still the same thing, it will work for a couple of times and then feezes Nov 22 18:11:02 Which takes time Nov 22 18:12:44 cooldman224, http://picpaste.com/Untitled-tJW9tRJU.png Nov 22 18:13:30 deadpoint: im wondering if you can help me understand something. I have an activity with a framelayout with id. Inside the framelayout i have imageviews with ids. Now i have created a custom class that extends the framelayout. How can i reference the childen of the framelayout inside my custom class? Nov 22 18:14:38 pangelovski: sorry have not yet used framelayouts Nov 22 18:15:04 cooldman224, ? Nov 22 18:15:08 deadpoint: how about another view that has children. how would i reference the children from a custom class Nov 22 18:16:33 pangelovski: dont know Nov 22 18:17:10 getChildren? :-) Nov 22 18:18:01 deadpoint: by id. i need to find a specific child Nov 22 18:18:46 ovrflw0x: your sdk manager seems to be an older version? looks different from mine Nov 22 18:19:05 cooldman224, i just download android studio Nov 22 18:19:09 downloaded* Nov 22 18:19:17 and the version of that is? Nov 22 18:19:37 and the revision of the sdk manager? Nov 22 18:19:47 i have been struggling with this for days now Nov 22 18:20:39 cooldman224, 0.8.14 android studio Nov 22 18:20:42 pangelovski findViewById ??? Nov 22 18:20:51 i need more Nov 22 18:22:12 deadpoint: I have a custom class that extends FrameLayout. Now the constructor takes a context as input parameter. Since the framelayout is added to the main activity. I guess I need to pass the activity as a input to the Custom Class, right? Nov 22 18:23:02 SimonVT: So it'll do the scaling on the UI thread!? Whaaaaat? Really? That's insane. Nov 22 18:23:13 can I use the Cursor.setNotificationUri for a single item (instead of a list) ? Nov 22 18:23:28 cooldman224, Nov 22 18:23:30 ? Nov 22 18:23:56 eghdk: Uhm, yeah, all the views does everything on the ui thread Nov 22 18:24:07 I am not so experienced with Custom View Classes, maybe someone here could give better advice Nov 22 18:24:41 Except webview Nov 22 18:25:48 ovrflw0x: and the revision of the sdk manager Nov 22 18:26:11 pangelovski: there's a getChildAt(int) Nov 22 18:26:18 cooldman224, 20.0/3 Nov 22 18:26:23 20.0.3 Nov 22 18:27:11 mine is 23.0.5 Nov 22 18:27:23 cooldman224, so what to do? Nov 22 18:27:32 update it Nov 22 18:27:51 shmooz: what i am trying to achive is the following. I have created a subclass of Framelayout. My framelayout in my activity has 3 imageviews, im1, im2 and im3. Now how can i reference the im2 from my subclass. i want to change the alpha Nov 22 18:28:26 shmooz: i need to be certain that it is im2 and with getChildAt theres a risk it might be different Nov 22 18:28:52 findViewById Nov 22 18:29:18 SimonVT: I know it is findViewById but the context does nto have an findViewby id. Nov 22 18:29:41 FrameLayout does Nov 22 18:29:44 Any View does Nov 22 18:37:16 maybe getView().findViewById(R.id.im2) ?? Nov 22 18:44:59 deadpoint: this is what i have https://gist.github.com/pangelovski/4ff8c46d2156c6d10463 Nov 22 18:45:31 now the logolayout has imageViews as children, first i want to set the alpha of the logolayout, but it is not working Nov 22 18:49:14 interesting i dont see any specials.. if its there then it should found it Nov 22 18:49:33 deadpoint: right? Nov 22 18:49:39 currently it is not setting the alpha Nov 22 18:54:41 sorry man cant help you out there.. hope you will solve the problem soon Nov 22 18:57:13 Hi, is there a way to send file on Bluetooth 3.0? (min api doesn't issue here) Nov 22 18:57:47 I mean Bluetooth 3.0 HighSpeed (yea, I know 3MB/S isn't a lot, but better then 200KB/s for sure) Nov 22 18:59:00 yoavst I think it should do with a generally Bluetooth Socket or not? Nov 22 18:59:37 deadpoint: I need to send file Nov 22 18:59:49 (byte stream) Nov 22 19:00:05 send the file as a byte stream Nov 22 19:00:21 I send Nov 22 19:00:22 android is not intuitive at all :( Nov 22 19:00:30 but currently, between 2 android 4.0 devices Nov 22 19:00:35 it is less then 150kb/s Nov 22 19:00:45 android Bluetooth 4.0 devices* Nov 22 19:07:04 On my git project in Android Studio I always get .iml changes even though I don't do anything. Is it safe to add those to gitignore or something? Nov 22 19:08:09 How do you accomplish 3mb/s on bluetooth??? Nov 22 19:12:18 On my git project in Android Studio I always get .iml changes even though I don't do anything. Is it safe to add those to gitignore or something? Nov 22 19:21:36 does android-studio 0.9 take out the layout preview ability? Before I upgraded it showed a preview of my xml layout files with the images and stuff. Does that just mean that something is not working on my new upgraded version? Nov 22 19:21:53 hi, im getting a Error:Could not determine Java version. when trying to build Nov 22 19:22:18 running android studio Nov 22 19:23:07 is it because im running openjdk 8? Nov 22 19:25:31 ah nvm Im an idiot Nov 22 19:27:07 Bump: is there a way to send file on Bluetooth 3.0 HighSpeed? (min api doesn't issue here) Nov 22 19:27:44 i think ive fixed it Nov 22 19:27:47 i ran archlinux-java set java-8-openjdk/jre Nov 22 19:28:09 ah no :D Nov 22 19:28:11 damnit Nov 22 19:31:24 question, is there a rule of thumb about how you number your versions? Nov 22 19:31:44 so rather than version 1.2 why not call it version 2? does 1.2 denote a minor update and version 2 denotes a major? Nov 22 19:31:51 You usually count up Nov 22 19:32:08 Other than that, whatever you think makes sense Nov 22 19:32:17 If I'm removing a FragmentA, and adding a different one, FragmentB. Can I still have it so that pressing the back button takes me to FragmentA? Or do I not remove FragmentA and simply replace() it or something? Nov 22 19:32:54 Many use major.minor.patch Nov 22 19:33:33 The definition of a major or minor update is up to you Nov 22 19:34:30 okay. I just wasnt sure if there was some normative way to go about it Nov 22 19:35:20 Basically, noone but the developer cares Nov 22 19:45:02 is it possible to extract a string-array? It doesn't seem to be working when I use android:text="@string/changelog" which I have setup in strings.xml as a string-array Nov 22 19:45:17 it says cannot resolve symbol Nov 22 19:46:05 okay i’m going to need some basic help regarding this: „How in the hell am I supposed to learn android development when there are SO many packages, SO many classes, interfaces and SO many methods???? (I already know the basics, but i’m talking about being a GOOD developer, that can find it’s way with easy in all of the packages, classes and methods android provides)” Nov 22 19:46:24 What in the heck do they expect of me, to really know all of these??? Nov 22 19:47:12 Strat, lots of trial and error, start small and work your way up Nov 22 19:47:22 am seriously stressed out because of this, been working my ass for for the past 5 weeks and even if i spend a whole week on ONE topic, it seems it never ends, it only goes deeper and deeper, with more methods, etc. etc. etc. Nov 22 19:47:44 find a book or tutorial series and press through it as they slowly add more and more Nov 22 19:47:54 Strat: Do you enjoy your life as it is now? Nov 22 19:48:08 Darklust: to be honest, yes and no lol Nov 22 19:48:34 i love creating things, but sometimes it’s just too much (only sometimes though) Nov 22 19:48:58 Strat: Well, I'd suggest if you want to keep the status quo, run. Nov 22 19:49:20 I don’t understand Darklust Nov 22 19:49:31 what do you mean by run and status quo Nov 22 19:49:52 Run through the streets of you village in only a kilt, screaming like a dying rabbit all the while. Nov 22 19:50:02 lel Nov 22 19:51:33 I mean, use the lower appendages of your body (the longer ones mind you), and carry yourself distances. Status quo would maintain your current state of sanity. Nov 22 20:02:20 so with a native activity that renders to opengl... what am i expected to do when i lose focus? Nov 22 20:02:27 (if i want to be able to regain focus) Nov 22 20:06:58 hi there. Im struggling about TTS and google maps navi and samples. Nov 22 20:08:28 to begin with - is it possible to relatively easily find out if a tts engine contains the samples needed by google navi for a language? /Or does the google maps navi Nov 22 20:09:19 how do I output versionName as a string? Nov 22 20:09:25 not ask for samples at all and just uses a .speak method of the tts engine? Nov 22 20:11:48 tho if i do that (just call .speak method) it sounds differently than what google maps say (and what google maps save in testdata/voice/.../voice_instructions.zip Nov 22 20:12:31 also if i do echo "" > voice_instructions.zip and set it readonly - google maps navi than says way more robotic Nov 22 20:19:41 anyway I have can my listview scroll under the actionbar? So the action bar is transparent and you can see the upward scrolling? Nov 22 20:21:48 hmm Nov 22 20:25:25 cant for the life of me figure this out Nov 22 20:37:54 I hate asking people on stackoverflow questions. they are all assholes Nov 22 20:39:02 All the best questions get closed as being off-topic or not suitable for the site. Nov 22 20:39:18 Closed by 18 people. Nov 22 20:43:03 oh god Nov 22 20:43:11 another default use of AsyncTask.execute bites us in the ass Nov 22 20:43:13 I hate asynctask so much Nov 22 20:43:16 so so so so fucking much Nov 22 20:43:56 Which default use? Nov 22 20:44:39 I asked a simple question and they said please do not post code I dont understand..??? Isnt that the point of the site?? Nov 22 20:44:48 if I understood it, I wouldnt be asking about it. duh Nov 22 20:46:23 I'd imagine that personality disorders are significantly overrepresented on SO. Nov 22 20:48:40 so no thanks to SO, I am still trying to figure this out lol Nov 22 20:51:37 this is going to result in me doing it the sloppy way and just creating a string I have to update every single time I post a change Nov 22 20:54:08 does anyone know how to output versionName as a string? Im trying to use the Package manager class but Im getting some unresolved symbols Nov 22 21:02:24 z4rd0z, paste? Nov 22 21:05:10 TacticalJoke, using asynctask.execute is almost always the wrong intent Nov 22 21:05:17 fucking google changing the behavior in 4.0 Nov 22 21:12:27 I add fragmentTransaction.addToBackStack(null); to my frag transaction... now when I press back, I see the fragment go back to the other fragment properly... but the my activity closes/exists? What should I do? Nov 22 21:36:18 I add fragmentTransaction.addToBackStack(null); to my frag transaction... now when I press back, I see the fragment go back to the other fragment properly... but the my activity closes/exists? What should I do? Nov 22 21:37:21 Your activity closes when you press back Nov 22 21:37:21 ? Nov 22 21:37:37 That doesn't make sense. You must be doing something wrong. Nov 22 21:38:39 TacticalJoke: My onBackPressed isn't overrided or anything Nov 22 21:38:46 Can you post the code? Nov 22 21:38:58 Probably everything to do with FragmentTransaction and FragmentManager. Nov 22 21:39:42 TacticalJoke: http://pastebin.com/H1vbq30x Nov 22 21:41:06 this.detailFragment is a Fragment created at runtime, right? Nov 22 21:41:13 Yeah. Nov 22 21:41:28 Nothing in my xml inserting fragments. I think thats the right way to do it. Nov 22 21:41:33 idk. Fragments confuse me. Nov 22 21:41:44 Just a plain framelayout Nov 22 21:42:28 How are you adding the fragment in the first place? Nov 22 21:43:34 Uhhh how am I adding the first fragment? Nov 22 21:44:04 Yeah. Nov 22 21:44:16 let me paste bin it Nov 22 21:46:11 TacticalJoke: http://pastebin.com/XqLrXh9j Nov 22 21:46:53 That looks weird. Nov 22 21:47:04 Again... when I added add to back stack... the fragment started to pop off by itself. Which is awesome. and exactly what I wanted... but it was closing the activity Nov 22 21:47:08 Aren't you calling FragmentTransaction.add ever? Nov 22 21:47:16 No? Nov 22 21:47:21 I guess not? Nov 22 21:47:28 I think you should be calling .add first. .replace later. Nov 22 21:48:19 Just replace "replace" with "add" and try again? Nov 22 21:48:43 In setupFragment. Nov 22 21:49:36 Okay. I'll give it a go now. Nov 22 21:51:26 i thought it adds if the map for the id is empty or null when you replace Nov 22 21:51:31 so should not really make a diff Nov 22 21:51:31 TacticalJoke: Eh. I think I'm doing something wrong. Now it works properly (YAY) but I can see one of my fragments below the other. Nov 22 21:52:23 Are you sure you're not declaring a Fragment in XML? Nov 22 21:52:34 Or adding twice, or something. Nov 22 21:52:37 TacticalJoke: Works properly as in the backstack stuff works fine without quitting the app. Nov 22 21:53:14 BTW, "setupFragment" shouldn't be called if savedInstanceState is non-null in Activity.onCreate. Nov 22 21:53:50 The FragmentManager is persisted across Activity restarts. Nov 22 21:54:14 And trying to re-add will cause issues (such as one activity on top of another). Nov 22 21:54:19 s/activity/fragment/ Nov 22 21:54:28 TacticalJoke: Sure about the XML. And the adding twice... I'm sure I'm not adding twice because I wasn't adding at all in the first place. Do I have to remove after I add? replace doesn't seem to be doing the job. Nov 22 21:54:38 You don't have to remove. Nov 22 21:54:46 Maybe you could show the entire Activity? Nov 22 21:56:08 how can i verify that a function returns what i want it to return? Printing it into a textview is kind of annoying :/ Nov 22 21:56:20 day-: Log.i ? Nov 22 21:56:20 TacticalJoke: I'm gonna work on it in the debugger for a little. I appreciate your help as always. Nov 22 21:57:09 day-: Yeah. You should be using logs... or a Toast. But mostly logs. Never a textView hahaha Nov 22 21:57:18 :D Nov 22 21:57:19 Okay. Just be sure to call FragmentTransaction.add one time and FragmentTransaction.replace one time. Nov 22 21:57:44 TacticalJoke: Okay, I think I know whats causing it to be called a second time. Nov 22 21:58:08 LogCat is a life-saver. Nov 22 21:58:10 i used blink codes with uCs to debug...until i read about the rs232 output debugging :X Nov 22 21:58:52 Is there any way to say like if (listFragments.exists in fragmentmanager) don't call add again? The issue I guess is that I have all of this running in two tabs. Nov 22 21:59:09 You can search for it by tag. Nov 22 21:59:18 When is it getting added twice? In onCreate? Nov 22 22:01:06 TacticalJoke: Basically you come into the app with the first tab selected and I call setupFragment(). This calls add. Then if you click on the second tab it does a replace. The second tab is a list, so if you click on a list item it does another fragment replace addToBackStack. But if I click on the first tab then it calls setupFragment again (which calls add). How would you fix that? Nov 22 22:01:53 I guess call add once in onCreate. Then call replace if they click a tab header. Nov 22 22:01:56 I haven't used tabs, though. Nov 22 22:02:41 Be sure to do it if and only if savedInstanceState is null. Nov 22 22:02:50 I had a problem with my app closing on back instead of popping the fragment stack. I had to override onBackPressed Nov 22 22:03:06 ciree: Hmm. It shouldn't do that. Nov 22 22:03:27 TacticalJoke: It worked for a while...then one day kept closing the app Nov 22 22:03:35 programming -_- Nov 22 22:03:43 I hope you use a revision-control system. :p Nov 22 22:03:48 of course Nov 22 22:03:54 Okay. lol Nov 22 22:03:59 Did you catch the change? Nov 22 22:04:29 Nope...it just kinda needs it now Nov 22 22:04:33 TacticalJoke: Thanks. Will do. I'll let you know what happens. Nov 22 22:04:34 Unless it was an Android change. Hmm. That's why I use support Fragments. Nov 22 22:04:57 ciree: You could go back in history and find the changeset that caused the issue. Nov 22 22:05:01 Assuming one did. Nov 22 22:05:16 I gotta run, eghdk. Sorry. Good luck. Nov 22 22:17:56 any idea whats wrong with this regex line? Pattern.compile("src\" href=\"(\S+)"); Nov 22 22:18:14 apparently im using an invalid escape sequence :/ Nov 22 22:34:27 I have a quick question. Is it possible to use the new DatePickerDialog used by Google Calendar other than using a third party library? Nov 22 22:39:53 hello, is it possible to run native code within a frame inside of an otherwise SDK activity? Nov 22 22:48:44 you can call native code from pretty much anywhere i think Nov 22 22:49:10 otherwise your quesiton is not very clear Nov 22 22:50:05 how do you now detect an 'item click' in recyclerview? Nov 22 22:50:25 certainly is not onItemClick like in a ListView Nov 22 22:50:33 You set an OnClickListener on your item view Nov 22 22:51:38 for a native activity that renders using opengl... what am i expected to do when the app loses focus? Nov 22 22:51:50 kill the gl context and recreate it whenever the focus is back? Nov 22 22:52:04 or just stop rendering? Nov 22 22:52:46 DrBenway: https://www.youtube.com/watch?v=NHVtLC5QOpo Nov 22 22:53:00 thx Nov 22 22:59:45 so... pause rendering on focus los and then re-create everything that deals with window/gpu whenever the focus comes back... Nov 22 23:00:01 and try not to lose program states in the process Nov 22 23:00:30 plz help... Android Studio (arghhh!!!) keeps giving me a Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED] error on build... take a look at my manifest. what is wrong?? http://pastebin.com/T0fkJBMK Nov 22 23:02:26 i seriously haven't directly touched my manifest for days Nov 22 23:04:52 no one??? Nov 22 23:05:20 android studio bug?? ain't nothing wrong with my manifest, that's for goddamn sure Nov 22 23:08:41 I think you can "clean" the project and try again Nov 22 23:08:48 tried it Nov 22 23:09:12 Did you add a service to your manifest recently? Nov 22 23:09:39 i have a service in there as you can see via the pastebin.. that was like a week ago Nov 22 23:09:43 this just started happening Nov 22 23:10:05 i made some packages and moved some files around but nothing that is stated in he manifest Nov 22 23:10:13 That's likely what's breaking it Nov 22 23:10:24 Packages shouldn't have upper case characters Nov 22 23:10:30 no shit Nov 22 23:10:32 does mine? Nov 22 23:10:38 Yes Nov 22 23:10:44 where? Nov 22 23:10:48 Nov 22 23:11:07 ahhh typo, good call bro Nov 22 23:11:37 I have a quick question. Is it possible to use the new DatePickerDialog used by Google Calendar other than using a third party library? Nov 22 23:12:15 No, their date picker is not part of the sdk Nov 22 23:12:52 Okay, thanks :) Nov 22 23:13:09 DrBenway: it is important to me to have native code within an activity that is otherwise not native.. is that doable? Or must the entire screen be native? Nov 22 23:16:11 basically, you can build a .so and expose native functions to java and then call them whenever you want Nov 22 23:16:29 check out the examples in the ndk Nov 22 23:16:36 it's "relatively" straight forward Nov 22 23:18:14 DrBenway: but I can have a shared activity? I want to be drawing part of the screen natively and then the rest using the Android SDK Nov 22 23:18:43 rendering in opengl? Nov 22 23:19:02 i think you can share the context but i can't guarantee that statement Nov 22 23:19:23 for the UI, i havent looked into native ui if there's such thing Nov 22 23:20:26 hello-gl2 sample seems to have code both in java and in C Nov 22 23:20:40 i went for a full native activity Nov 22 23:20:47 DrBenway: thanks... The specific example I am thinking of is the ffmpeg library (which is native) within an activity; basically I want to insert and render some parts of the screen natively.. maybe I can do this with shards? Nov 22 23:21:16 the other option for ffmpeg is that you decode your frames and then pass them back as raw buffers to java Nov 22 23:21:18 and then render that Nov 22 23:21:24 (im guessing thats what you're trying to do) Nov 22 23:21:38 DrBenway: ahhh that is genius :) Nov 22 23:23:44 im surprised that there isn't some kind of video decoding in java though Nov 22 23:24:01 there seems to be plenty of video playback softwares on android Nov 22 23:24:46 (there's a java version of ffmpeg which im not sure if it's just a wrapper around the native lib or a re-implementation) Nov 22 23:25:04 im also curious of what performance you'll get on decoding Nov 22 23:29:14 thanks DrBenway ! Nov 22 23:29:19 np Nov 22 23:29:50 they are all wrappers to the native code as far as I can see Nov 22 23:34:46 FYI: http://stackoverflow.com/questions/11321825/how-to-use-hardware-accelerated-video-decoding-on-android Nov 22 23:34:54 if you can get hardware decoding, that'll probably be a win Nov 22 23:35:25 brb back to windows Nov 22 23:42:43 Is it possible to draw a shape to the canvas, capture/store a bitmap of the current state of the canvas (with the newly drawn shape included), and clear the canvas to repeat the process all without unlocking it? Nov 22 23:46:44 canvas draws to bitmap doesnt it Nov 22 23:58:03 So I have an idea that I want to know the feasibility of. Nov 22 23:58:28 everything's possible Nov 22 23:58:31 I want to pair two android devices together and send their camera data to each other, and then use that under the Cardboard API/functionality so that two people can see through "each other's eyes." Nov 22 23:59:04 use hangouts? Nov 22 23:59:27 DrBenway, say what? Nov 22 23:59:28 (as in, there are some video chats programs out there so the answer is probably "yes") Nov 22 23:59:37 Ah, I see. Nov 22 23:59:55 I just mean on a local scale, can video be streamed between each device within line of sight, or would I need an intermediary network? Nov 23 00:00:29 you mean via bluetooth? Nov 23 00:01:37 DrBenway, is that the only way two android devices can network together ad-hoc? Nov 23 00:02:08 whatitis-: Yes the canvas does draw to a bitmap. I'm just unsure if the bitmap stays updated even if the canvas never gets unlocked (and therefore refreshed) Nov 23 00:14:51 On Android Lollipop is there a way to set the theme of a view programmatically? Nov 23 00:28:55 agh Nov 23 00:29:19 oreilly android app tut videos, this guy is talking into the mic, lots of windnoise and p-pops etc Nov 23 00:29:44 and a slight amount of reverb/feedback Nov 23 00:31:50 JakeWharton, how do I make pidcat colors work on windows? Nov 23 00:32:02 JakeWharton, python keeps printing the escapes, if I pidcat into a file, then it shows up... Nov 23 00:33:00 hah, if I do pidcat.py tags | cat Nov 23 00:33:01 it shows up Nov 23 00:33:03 stupid python Nov 23 00:37:39 I cannot get other views to react to this custom view. I'm just rendering the board with a canvas, do I have to manually set the view size or something before I set other views below/above parameter to the custom view id? http://i.imgur.com/54WmITF.png Nov 23 00:37:50 If I set the avatar layout's below parameter to the game board it just disappears. Nov 23 00:37:53 For reference, it's impossible to update the canvas behind the scenes (which is unfortunate since that'll slow the overall process by adding the extra step of updating for the user) Nov 23 00:39:11 what do you mean? CAn't you invalidate it? Nov 23 00:39:27 Forgive my typos, very tired. Nov 23 01:16:09 I'm having an issue making a string a clickable link to the browser. I set the string to direct to the website via strings.xml and my textview has the properties: android:autoLink="web" Nov 23 01:16:10 android:linksClickable="true" Nov 23 01:16:23 It looks like a link as it us underlined but it does nothing when tapped Nov 23 01:17:53 did you set onClick to open the url? Nov 23 01:17:58 oh Nov 23 01:18:00 linksClickable nvm Nov 23 01:18:05 Out of my expertise Nov 23 01:18:30 yeah I started to creat an onClick until I read to just use linksclickable but its not completely working. hmm Nov 23 01:23:27 may have to use linkify Nov 23 01:33:22 i have a TextView inside a LinearLayout. View view gives me the LinearLayout, how can I access the TextView? Nov 23 01:34:49 Textiew tv = (TextView) findViewById(R.id.textView1); Nov 23 01:34:59 doesnt matter what its inside Nov 23 01:35:51 as long as you get the name right Nov 23 01:36:38 but im doing it inside a item click listener, so I don't know the id Nov 23 01:37:00 I just get the view Nov 23 01:39:16 zbcm, Im getting an error with findViewById Nov 23 01:39:19 of a listview? just find on the view for that item Nov 23 01:39:26 cannot resolve method Nov 23 01:40:14 ohYeah if you are crating it in code I would have set some sort of reference for it so that you could access it. Nov 23 01:40:28 So I'm not actually sure Nov 23 01:40:32 how do you set a reference to findviewbyid Nov 23 01:40:41 I mean a reference to the View Nov 23 01:41:25 Im trying to use terms_link = (TextView) findViewById(R.id.terms_link); but findViewById isnt working Nov 23 01:41:38 oh uh Nov 23 01:41:45 I use xamarin so I'm not 100% sure lemme check Nov 23 01:42:13 says cannot resolve method 'findviewbyid(int)' Nov 23 01:42:34 then you arent in scope to call it Nov 23 01:43:46 It's part of Activity afaik Nov 23 01:44:10 ohno? Nov 23 01:44:12 context? Nov 23 01:44:36 im just tryign to get a link to work Nov 23 01:44:43 to my company website Nov 23 01:45:21 wait, didn't you define that in xaml? Nov 23 01:45:47 xml, whatever it is on android Nov 23 01:45:50 in the java class Nov 23 01:46:11 can't you jsut store it there? Nov 23 01:46:13 jsut Nov 23 01:46:16 just.. Nov 23 01:46:18 sorry tired Nov 23 01:46:21 doesnt work that way Nov 23 01:46:38 in the xml I have a string that stores the web address, but I have to make it a link somehow Nov 23 01:47:02 I tried android:autoLink="web" Nov 23 01:47:02 android:linksClickable="true" but it doesnt do anything Nov 23 01:47:10 is that on a textview? Nov 23 01:47:13 its underlined like a link, but doesn't open a browser or anything Nov 23 01:47:18 yes Nov 23 01:47:34 so you ahve the id for the text view Nov 23 01:47:36 have Nov 23 01:47:40 you jsut cant use findbyid Nov 23 01:47:43 right? Nov 23 01:48:30 yeah I have the Id its called terms_link Nov 23 01:49:00 are you trying to get the textview in an activity Nov 23 01:49:00 ? Nov 23 01:49:02 but terms_link = (TextView) findViewById(R.id.terms_link); doesnt work as findViewById isnt defined for some reason Nov 23 01:49:30 you are probably in wrong scope, such as anonymous inner class etc Nov 23 01:49:43 its in a fragment Nov 23 01:49:46 get reference of your activity and call it on that Nov 23 01:49:58 yeah a fragment doesnt have findViewById afaik Nov 23 01:49:58 then use view fron onCreateView Nov 23 01:50:03 use getView().findViewById() then Nov 23 01:50:12 ^ genius Nov 23 01:50:13 its in the onCreateView scope Nov 23 01:50:33 you have to call it on the view for fragment Nov 23 01:50:43 I Shouldn't be helping with my zero java knowledge Nov 23 01:51:07 http://pastebin.com/nyrRwJS8 Nov 23 01:54:13 everything after your return statement is ignored. I'm surprised this even compiles Nov 23 01:55:02 I just added it in havent complied yet Nov 23 01:55:11 and just realized it was after return lol Nov 23 01:55:51 how is getview() used? I tried terms_link = getView(TextView).findViewById(R.id.terms_link); but it no worky Nov 23 01:56:36 you cast your view, dont pass as arg Nov 23 01:57:01 or would I use my text_view ID within getview()? if thats the case it cant be used with a fragment Nov 23 01:57:03 getView returns the view that onCreateView creates Nov 23 01:57:11 read the docs on it. or simply in onCreateview get a reference of inflated fragment layout and call on that Nov 23 01:57:55 bankai_au, that is confusing lol Nov 23 01:58:35 it's not really Nov 23 01:58:40 if its confusing you need to read more Nov 23 01:59:42 even the documentation is chinese to me Nov 23 01:59:50 probably have the wrong locale set Nov 23 02:01:25 onCreateView is similar to onCreate and setContent of activity. your fragment is in a container. it gets inflated and that view is your content. use that to access children Nov 23 02:01:26 so dont use it under onCreateView? Nov 23 02:01:39 you can't directly set the width/height of a view can you? Nov 23 02:01:49 sure you can Nov 23 02:01:54 how Nov 23 02:02:07 I didn't look very hard tbh Nov 23 02:02:11 get the layoutparams of view and set whatever Nov 23 02:02:18 then look more Nov 23 02:02:49 I just wanted to check because it wasn't completely obvious by the intellisense Nov 23 02:02:53 save some time Nov 23 02:02:54 thanks Nov 23 02:03:00 so none of you know how to make a string link to a website? Nov 23 02:04:09 z4, uhhh, you have more issues than that Nov 23 02:04:38 I do? Nov 23 02:05:25 yea like who cares if you cant send an intent to open browser, as you cant even find your views Nov 23 02:06:27 thats what im trying to figure out Nov 23 02:06:48 it seems every reference I've looked up tells me do try one thing, but that thing doesnt work Nov 23 02:06:50 so dont get ahead of yourself, those are seperate issues Nov 23 02:07:09 gotta learn to walk before running Nov 23 02:07:11 its a completely related issue. find my views, it finds the link Nov 23 02:07:48 then figure out your first problem before suggesting we cant spoon feed you your complete intents Nov 23 02:08:30 So I have this custom view, draws a game baord on canvas, works great, except I can't seem to get any other view to paly with it on a relativelayout, I set stuff to go below it and they just disappear. I assumed it was the size of the custom view being larger than the canvas so I manually set the size, still doesn Nov 23 02:08:32 't work. Nov 23 02:08:34 Any ideas? Nov 23 02:08:46 I should I just hammer at it some more Nov 23 02:09:08 I feel like it's a simple quirk that I'm not aware of. Nov 23 02:09:22 post layouts, and maybe screenshots and a mockup of what you are expecting Nov 23 02:09:32 sure Nov 23 02:09:36 and getView() cannot be used on a fragment Nov 23 02:09:52 of course it can Nov 23 02:10:11 im looking at a msg that says it cannot Nov 23 02:10:14 but in onCreateView you can inflate your layout to an instance variable and call on that Nov 23 02:10:31 "getView() in fragment cannot be applied" Nov 23 02:10:44 but you also dont understand what you are using, so errors are most likely yours Nov 23 02:10:51 whatitis-, sure, whatever that is Nov 23 02:11:02 haha exactly Nov 23 02:11:10 im already doing thatm am I not, with public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ Nov 23 02:11:54 take the time to look over and understand some fragment 101 tutorials Nov 23 02:12:41 thanks for the help Nov 23 02:12:45 http://i.imgur.com/3fqW6du.png So thats what it looks like, works reat on this resolution but the bottom stuff isn't connected to the game board so on different aspect ratios you get overlap. Nov 23 02:13:07 layout https://gist.github.com/EReeves/7105ab84e41bbcdff9ab Nov 23 02:13:16 exceuse the mess I need to clean it up/rename stuff Nov 23 02:13:19 excuse Nov 23 02:13:45 z4, you really need to understand the tools you are using, or youll get stuck with just using anything and complaining that the api is broke, or android has a bug Nov 23 02:14:45 and I thought the people on StackOverflow weren't helpful.. sheesh Nov 23 02:15:12 then leave. are spoons are being cleaned Nov 23 02:15:23 specifically relativeLayout2 if I connect it to the SGFView android:layout_below="@+id/SGFView" it disappears Nov 23 02:15:38 I need to pick up a big ass book or something to start from hello world crap then Nov 23 02:15:57 Good luck :p Nov 23 02:16:20 Also I'm using xamarin but it works basically the same Nov 23 02:16:21 no, you just need to have a focus. if using fragments read up on them so you understand. they are similiar to activities Nov 23 02:17:08 zbcm im thinking about xamarin, is it good enough to pay for 2 indie licenses? (IOS and android) Nov 23 02:17:28 depends how much you like C# vs java Nov 23 02:17:38 I haven't used Xamarin.Forms Nov 23 02:17:43 so I can't say for sure Nov 23 02:17:50 the native android stuff is good though Nov 23 02:18:23 oh ok, ill check Nov 23 02:18:30 cliffreich: look at robovm too Nov 23 02:18:38 its a lot cheaper now Nov 23 02:18:43 $40 a month was it? Nov 23 02:19:37 Is there a way to determine what is valid unicode set for android? Nov 23 02:19:43 bankai_au thats new to me Nov 23 02:20:16 no need to learn a new language and very easy for code reuse Nov 23 02:20:34 If I Was a Java developer I Would jump on that Nov 23 02:20:37 looks pretty good Nov 23 02:20:39 or, no need to use a language that's not native to either platform* Nov 23 02:20:41 isn't visual studio now supposed to support android dev? Nov 23 02:20:43 w* Nov 23 02:20:53 any recommendations on a good book to start with? Nov 23 02:20:57 Xamarin Pro has VS support Nov 23 02:21:01 expensive Nov 23 02:21:03 most ive found were for older versions of android Nov 23 02:22:16 http://tinyurl.com/k44ejho seems good Nov 23 02:23:50 I wish I had some android devices with weird aspect ratios Nov 23 02:23:56 I hate emulators Nov 23 02:24:11 cant you customize the aspect ration on a custom emulator? Nov 23 02:24:24 yeah but emulators are slow in my experience Nov 23 02:24:29 jus tnot fun to debug on Nov 23 02:25:08 bankai_au thats enough, ill try it Nov 23 02:25:16 true. I use my phone to test with Nov 23 02:25:42 and a guy who wants my app once its complete has a different phone and he tests stuff for me as well to let me know if I need to change any visuals etc Nov 23 02:31:48 eh I give up, lunch time Nov 23 02:33:23 as I say that I figured out that the view is indeed unaware of its actual size Nov 23 02:33:27 even though I set it Nov 23 02:33:59 lunch time? you in .au ? Nov 23 02:34:31 yeah Nov 23 02:34:37 Ooh onMeasure() perfect Nov 23 02:46:09 eh Nov 23 02:53:15 why Nov 23 02:53:20 wont the layour parameters set Nov 23 02:53:24 layout **** ENDING LOGGING AT Sun Nov 23 03:00:00 2014