**** BEGIN LOGGING AT Mon Feb 15 02:59:59 2016 Feb 15 03:04:50 what convention are you meant to follow for package naming in the event you have a domain that begins with a digit? Feb 15 03:27:04 Robdgreat maybe spell it out 'fivethirteight' Feb 15 03:27:17 well, spell it correctly :D Feb 15 03:27:38 I thought about that, but however I spell it I'll need to register that domain as well Feb 15 03:28:00 don't need to register anything Feb 15 03:28:02 so what I'm likely to do is choose a different brand and have it operate under my main company Feb 15 03:28:27 yeah, I do, because what if someone registers the domain that I choose to name my packages for and wants to name their packages the same Feb 15 03:28:27 not like google verified your package correlates to some domain Feb 15 03:28:55 whoever gets the package first wins Feb 15 03:28:59 google doesn't give a shit Feb 15 03:29:06 I know google doesn't give a shit, but I do Feb 15 03:29:18 You don't even have to use a domain name, FWIW. Feb 15 03:29:34 domain name provides a built-in means of attempting to avoid namespace collisions Feb 15 03:29:46 I realize it's just a convention, but it's one I like Feb 15 03:30:04 I just wondered how others might have dealt with this Feb 15 03:33:01 sorta having a hard time getting started with ormlite Feb 15 03:33:27 I found a related SO question: http://stackoverflow.com/questions/28666297/package-names-in-android-studio-when-dev-name-starts-with-a-number Feb 15 03:33:28 RustyShackleford whats the matter with plain sqlite Feb 15 03:33:59 Another idea: http://androidforums.com/threads/namespace-when-domain-name-begins-with-a-number.267408/ Feb 15 03:34:07 TacticalJoke i don't really like the Play package name system, i think they should just give us a UUID or something Feb 15 03:34:29 like, if Play kicks you out and says rename your package, well there goes all your users, reviews, etc Feb 15 03:34:41 if your unique ID was just a UUID that wouldn't happen Feb 15 03:34:48 Yeah, that sounds reasonable. Feb 15 03:35:34 and then there is issue of changing ownership from com.foo to com.bar ... Feb 15 03:36:15 g00s: letting a library do the work for me sounds nice Feb 15 03:36:22 Cursors are kind of awkward Feb 15 03:36:23 crap, I have a recyclerView filled with charts - only having 10 items each and it stutters like hell Feb 15 03:36:32 Yeah, I've never liked the idea of using a domain name for a package name. Especially in Google Play. Feb 15 03:36:38 so is handling the database connection Feb 15 03:36:46 RustyShackleford they have boilerplate for sure, but its also very clear what is going on Feb 15 03:36:56 its been a while hah Feb 15 03:36:56 in this case, i take explicit boilerplate > magic Feb 15 03:37:12 well you have a point there Feb 15 03:37:31 I like how the ORM's will give you a model object you can pass around Feb 15 03:38:08 that sounds great - until you realize the same concept can be represented in different types of model objects ;D Feb 15 03:38:23 I got my rest calls all parsed and linked up using mostly annotations. Pretty cool Feb 15 03:38:28 in one part of an app, you may represent a customer like this, another like that Feb 15 03:39:07 granted this is more likely to happen in larger systems Feb 15 03:39:12 maybe I can reused the xml model classes Feb 15 03:40:03 you don't like ORM's huh? Feb 15 03:40:28 no, i guess its the old c++ developer in me - i want complete control Feb 15 03:40:45 Gawd, Java feels so bloated after using Kotlin for a bit. Feb 15 03:41:02 Feels like you're having a conversation with a very young child. Feb 15 03:41:10 In terms of having to speak slowly and so on. :D Feb 15 03:41:22 `this.foo = foo;` x 100 Feb 15 03:42:33 TacticalJoke i have to take another look at kotlin, but i'll be dissapointed if it has essentially the same type system java has Feb 15 03:42:50 maybe when kotlin in action goes on sale again it will be far enough along to read thourgh Feb 15 03:43:10 What do you mean by "type system"? Just curious. Feb 15 03:43:23 multiple inheritance, union types, etc Feb 15 03:43:36 Ah, okay. Kotlin is the same in those respects. Feb 15 03:43:44 At least for now (not sure whether they'll support union types). Feb 15 03:44:01 The guide on the Kotlin site is a good tutorial (though I guess you've read that). Feb 15 03:44:09 a while ago Feb 15 03:44:35 other thing is I want no friction between AS , instant run, jack & jill, etc Feb 15 03:44:45 Yeah, that's a concern of mine, too. Feb 15 03:44:59 instant run would be my first pick for things improving my dev experience Feb 15 03:45:29 and it looks like its going to be great, so excited Feb 15 03:47:09 y’all nerds think winrt will ever catch on? Feb 15 03:47:30 so far it hasen’t Feb 15 03:47:35 There are a couple of things that'd make me happy: 1. Google officially adopts Kotlin. 2. GitHub supports Mercurial. Feb 15 03:49:19 TacticalJoke: you like it better than git, really? Feb 15 03:49:36 at work we use clearcase which can go die in a fire Feb 15 03:50:18 Mercurial's CLI is a lot nicer than Git's. Feb 15 03:51:07 IMO, it's a tragedy that Git won the war. :D (It's also not surprising -- Linus made it and it was used immediately for the Linux kernel.) Feb 15 03:51:07 RustyShackleford omg, CC fucking sucks Feb 15 03:51:29 RustyShackleford tip: when you interview a company and they use CC, just walk away. its a symbol of their culture Feb 15 03:51:29 I think Git is six days older than Mercurial (or something like that). Feb 15 03:52:11 i can see CC being used at DoD contractors, Mitre, etc Feb 15 03:52:17 If everyone had to use Git for six months and then Mercurial for six months, I would bet money that the majority would prefer Mercurial. Feb 15 03:52:57 Though this thought experiment ignores the GitHub factor and so on. Feb 15 03:52:58 TacticalJoke we'll have to see now that the hg guy left the project .. whats next Feb 15 03:53:37 Yeah, I'm wondering who's gonna take over. I've idled in #mercurial for quite a few years, and I have a few names in mind. Feb 15 03:54:53 g00s: I asked mpm whether he'll continue to use Mercurial as a user, and he said probably not and that he's gonna take up watercolour painting. Feb 15 03:54:58 this chatroom should do a feats of strength around the holidays Feb 15 03:55:10 see who truly is the ultimate dork Feb 15 03:56:51 b4b: What would the challenges be? Feb 15 03:58:02 see who can code the fastest Feb 15 03:58:55 but the code cant have bugs Feb 15 04:00:33 if im running an app in android studio, and it crashes, where is the stack trace output to? Feb 15 04:00:45 dcope: LogCat (Alt+6). Feb 15 04:01:06 Clear all filters and search via the text field if you can't find the trace. Feb 15 04:01:19 TacticalJoke: is there some trick to ensure it doesn't get filtered? i've set level to verbose, no filter, etc. and still not seeing a stack trace Feb 15 04:01:56 After clearing filters, try typing "exception" or something. If you still can't find it, you might've had a SIGSEGV or similar. Feb 15 04:02:50 g00s: we're moving to github Feb 15 04:03:10 yeah I dunno about the whole corporate workplace. I'll wait it out a few years Feb 15 04:03:25 I'll say this, my manager let me work from home all week while I was crippled Feb 15 04:04:27 I like the company a whole lot more right now, hah Feb 15 04:19:19 lol watercolor painting Feb 15 04:45:42 Slightly off topic, but anyone here do hiring at their respective companies? How many apps in the store is the norm with most considered candidates? Feb 15 04:46:30 For a jnr level position by the way Feb 15 04:48:13 orbyt_ just guessing, the wiser ones wouldn't care about count per say - but how technically involved yours is Feb 15 04:48:54 architecting this app is fun Feb 15 04:49:09 maybe I can outsource the implementation to india Feb 15 04:49:40 RustyShackleford oh dear Feb 15 04:49:46 Yea thats why I ask, I'm going to be applying to a few positions at some point, and am wondering whether I should keep refining one of my apps or try and speed build another Feb 15 04:54:22 orbyt_: one app people use looks better than a bunch with no users Feb 15 04:54:57 junior level position, i'd say even one app looks good Feb 15 04:55:15 I'm also working on padding my resume hah Feb 15 04:55:43 but it is pretty common to see "must have several apps on Play" whatever several means Feb 15 04:56:02 mhm Feb 15 04:56:10 how many years until a junior developer becomes a senior? Feb 15 04:56:23 orbyt_ if your app does http and talks to rest backend, looks good material, that should be good enough Feb 15 04:56:25 technically I'm an "Associate" Feb 15 04:56:27 it's all bs Feb 15 04:56:46 yeah Feb 15 04:57:13 g00s: I mean the one I was referring to hits 3+ different apis, pulls a live stream, element transitions, bit of Rx Feb 15 04:58:07 I have a cool widget in the store as well... Feb 15 04:58:24 got like 20 downloads though cause i havent told anyone about it lol Feb 15 05:00:36 RustyShackleford: how does your "outsourcing to India" work? Feb 15 05:14:50 vedu: it was a dry joke Feb 15 05:15:00 but I imagine I pay them a few rupees Feb 15 05:15:09 RustyShackleford, nice imagination :P Feb 15 05:15:23 while I sit back in my recliner and watch Always Sunny in Philidelphia Feb 15 05:15:46 I'd get back a program that more or less works, but the codebase is a complete mess Feb 15 05:16:07 hey that sounds like work Feb 15 05:16:47 yeah it seems like they're finally catching on that outsourcing brings a terrible codebase Feb 15 05:17:23 haha. now it makes sense Feb 15 05:17:56 and I should be offfended by this Feb 15 05:18:01 typos everywhere. I was looking for this one class, couldn't find it. SerachMasterFragment.java Feb 15 05:18:14 lol Sera... Feb 15 05:18:22 yeah Feb 15 05:18:27 few rupees Feb 15 05:18:39 and you can something that looks like code and is called crap Feb 15 05:18:47 :) Feb 15 05:18:54 with "I love MainActivity" pattern Feb 15 05:19:15 vedu: you live in india? Feb 15 05:19:21 yep Feb 15 05:19:28 I am guessing so Feb 15 05:19:29 Hah Feb 15 05:19:33 hah. Well this is awkward Feb 15 05:19:34 vedu, hey there, me too Feb 15 05:19:41 RustyShackleford, no problems, all in jest Feb 15 05:19:56 hope you guys do it better than I described ;) Feb 15 05:20:01 I think it also has to do with communication problems Feb 15 05:20:05 It's not like the stereotype doesn't have a lot of truth to it Feb 15 05:20:20 you can see bad code everywhere Feb 15 05:20:34 so whats the reason for this? There are a bunch of indian guys onsite who produce signficantly better code Feb 15 05:20:34 I've worked with tons of companies and consultancies over the past 4 years I've worked with Android and it isn't easy to find excellent code quality Feb 15 05:20:43 not like I'm fixing app now, which has 5k+ lines in main activity ;) Feb 15 05:20:54 my fav shortcut is 'ctrl + alt + m' Feb 15 05:21:04 I'd guess the reason is lack of long term commitment Feb 15 05:21:20 I wouldnt be suprise Feb 15 05:21:27 I've been a developer for only like 4 months. I was just completely suprised how bad this codebase is Feb 15 05:21:30 if you dont need to fix it later Feb 15 05:21:31 who cares Feb 15 05:21:44 I write good code because I myself have to read it a few months later. If I wouldn't I probably wouldn't care Feb 15 05:22:01 vedu: courtesy for the next guy Feb 15 05:22:13 haha Feb 15 05:22:20 on the other hand, you could make your job more secure Feb 15 05:22:27 if you're the only one that can figure it out Feb 15 05:22:36 Open source is good in that way. You won't make it past code review Feb 15 05:22:36 There's a serious lack of proper computer science education Feb 15 05:22:43 problem is when even you can't figure it out though :D Feb 15 05:22:49 explicit > clever Feb 15 05:22:58 vedu, I'm guessing you have some background in open source dev Feb 15 05:23:05 I see terrible things Feb 15 05:23:10 RustyShackleford: I'd never hire someone like that Feb 15 05:23:15 open source might be bad too :D Feb 15 05:23:41 lut4rp: yep. proud contributor to KDE Feb 15 05:24:05 hanging out with a bunch of indian guys is certainly interesting Feb 15 05:24:05 vedu, glad to know :) Do you know shadeslayer? Feb 15 05:24:13 gordon_: are you talking about the 1 contributor repos on github :P Feb 15 05:24:14 I struggle so bad with the names Feb 15 05:24:48 foreigners are interesting hah. Lots of them have cool stories Feb 15 05:25:03 haha. I've seen expats stuggling Feb 15 05:25:13 Man, people *in* India struggle with names across the country. Perils of an insanely multi-cultural society. Feb 15 05:25:16 lut4rp: nope Feb 15 05:25:16 :D Feb 15 05:25:35 vedu, A bunch of my friends were (are?) KDE contribs. Feb 15 05:25:45 they'll do this pissing match where they try show off how many languages they can speak Feb 15 05:25:48 I used to be a contributor to Drupal years ago Feb 15 05:25:49 :) Feb 15 05:25:55 lut4rp: nice Feb 15 05:26:09 RustyShackleford: maybe you can lead if you count programming languages Feb 15 05:26:12 vedu, which city are you in? Feb 15 05:26:23 yeah they asked if I knew any other languages Feb 15 05:26:43 sure, I know tons. python, c++, ... Feb 15 05:27:26 Here we have 3 languages in high school. More, if you end up shifting between states Feb 15 05:27:44 RustyShackleford: For amsuement, I counted 11 Feb 15 05:27:47 vedu: no, large code bases Feb 15 05:27:52 and systemd :P Feb 15 05:28:01 Feb 15 05:28:24 * lut4rp brings out the popcorn Feb 15 05:28:43 haha Feb 15 05:29:08 sorry, was reading post about it today ;) Feb 15 05:30:27 systemd was like hell had broken loose Feb 15 05:32:19 it still is Feb 15 05:32:32 I think they will replace it with something else sooner or later Feb 15 05:45:56 somebody will put a layer over systemd and make a bigger mess Feb 15 05:46:03 exhibit a : linux audio stack Feb 15 05:47:33 hey, please suggest a good pattern for using shared preferences across application. Like a good utility class or something ? Feb 15 05:48:26 g00s: same developer ;) Feb 15 05:48:30 i use singleton for that Feb 15 05:48:57 which has its own shared prefences and just has getters and setters Feb 15 05:52:27 suhas_sm: sharedUserId or something Feb 15 05:52:38 in the AndroidManifest.xml Feb 15 05:53:04 Oops, sorry my bad, Not across different applications Feb 15 05:53:16 oh I misunderstood Feb 15 05:53:27 across all parts of your app Feb 15 05:54:08 Yep Feb 15 05:54:11 As Ashiren mentioned, singleton pattern sounds good Feb 15 05:56:40 is AsyncTask the recommended way to run a cpu intensive task off the ui thread? Feb 15 05:58:31 RustyShackleford hm, no Feb 15 05:58:49 use RxJava or something :D Feb 15 06:01:16 RustyShackleford: that's the standard way of doing things, yes Feb 15 06:01:23 there are some alternatives to it Feb 15 06:02:50 RustyShackleford if you use AsyncTask, make sure its ExecutorService is configured for your workload Feb 15 06:04:25 aw, my DrRacket icon is a <3 for valentines day :D Feb 15 06:13:56 g00s: I was a big fan of RxJava. Once upon a time Feb 15 06:14:23 vedu i only use it in my service / model these days - not UI stuff like click listeners Feb 15 06:14:53 actually problem is my app is heavily data centric and performance critical, and it was making too much garbage Feb 15 06:15:01 so i had to remove it from the high frequency paths Feb 15 06:15:07 so yeah, not all roses Feb 15 06:16:03 vedu what do you use now ? Feb 15 06:17:00 g00s: I shifted to back to plan old java callbacks and android handlers Feb 15 06:17:23 ah. yeah i still use plain callbacks for most UI things, like fragment / activity communication Feb 15 06:18:20 g00s: I was using rx mainly for network calls- sequential calls and error handling Feb 15 06:19:07 and for avoiding AsyncTask and interface callbacks Feb 15 06:32:38 I need to download a 45MB zip file Feb 15 06:32:53 do I have to buffer it? I think thats an acceptable amount of mmemory to use Feb 15 06:33:39 RustyShackleford look at download manager Feb 15 06:34:30 what if I'm already using retrofit? Feb 15 06:35:01 id retrofit meant for that scenario ? Feb 15 06:35:12 i'd use downloadmanager ;) Feb 15 06:35:35 it can handle it, but yeah Feb 15 06:35:46 I have no idea what i'm doing here. Thats why I asked hah Feb 15 06:35:50 I'm sure you can find a device that would run out of memory with that Feb 15 06:36:05 or rather heap size wouldn't be large enough Feb 15 06:37:36 Retrofit is fine Feb 15 06:37:52 If it's HTTP, Retrofit can handle it Feb 15 06:43:23 DownLoadManager does look simpler in this case Feb 15 06:45:04 will this cause the progress notification to show in the notification drawer? Feb 15 07:05:09 If I have a RelativeLayout inside another RelativeLayout, the ripple effect doesn't work on the second one because the background color is different. (example: http://i.imgur.com/xJWmDZZ.png). Is there anyway I can have the ripple effect on the second RelativeLayout as well? Feb 15 07:12:43 yes, you need to create drawable with ripple effect Feb 15 07:13:07 well, you need to create two is you're supporting api < 21 Feb 15 07:22:34 thanks gordon_, I'll look into that Feb 15 07:44:46 "With Instant Run, you only can work with one device at time. Feb 15 07:44:48 lol Feb 15 07:45:25 Heya peeps! Feb 15 07:47:05 hey gordon_, 1 more quick question if you dont mind. when I created the other drawabe and applied it to the second relative layout, there are two ripples now when clicked on. Is there a way to have only one or is it not possible? Feb 15 07:47:43 what do you mean by two ? Feb 15 07:49:22 I mean that when I click on the card, there are two separate ripples, one expanding slightly slower than the other. I applied the "android:background="?android:attr/selectableItemBackground"" one on my outer relativelayout and my custom ripple on my second Feb 15 07:50:21 interesting Feb 15 07:50:25 no idea why Feb 15 07:50:44 if you remove ripple from parent, do they occur too ? Feb 15 07:51:59 nope, now only the bottom relativelayout displays the ripple. oh well, no biggie. just a minor ui issue. Feb 15 07:54:01 dont know why Feb 15 07:54:19 maybe you invoke two on clicks ? Feb 15 07:58:37 hmm yes, maybe. this is what I have at the moment: http://i.imgur.com/y01qoKw.png Feb 15 08:24:41 * Zharf sighs at networkimageview Feb 15 08:29:16 what is that? Feb 15 08:35:04 Good morning to you all :) Feb 15 08:35:51 I know it's Monday, but Let's rock and roll :) Feb 15 08:49:03 Hi all. Quick question about Butterknife. Is it possible to bind a view from an Activity in a Fragment with Butterknife, or am I stuck using getActivity().findViewById()? Feb 15 08:53:49 it is possible Feb 15 08:54:06 but I dont know why you want to look for framgent Feb 15 08:54:32 do you have it declared in xml? Feb 15 09:06:00 Number5, Android and roll Feb 15 09:09:13 Yotta92, :P Feb 15 09:20:58 do you guys know if it's possible to fold if loops in android studio? i have some really big ones that I would prefer if they were collapsed Feb 15 09:21:28 i mean fold the ENTIRE if loop and the if elses Feb 15 09:30:20 god damn it Feb 15 09:30:23 I was just about to answer him Feb 15 09:38:18 Hello guys, after programming in iOS for a while I'm back on Android, so I had to catch up some missing knowled Feb 15 09:38:24 sorry Feb 15 09:40:59 Controless: extract the if/else chain to a separate method, fold the method Feb 15 09:41:36 liuwenhao, he disconnected Feb 15 09:41:41 gordon_: I have a button in a CollapsingToolbarLayout that I am controlling with my fragment (for refreshing Recyclerview data in the fragment) Feb 15 09:42:24 I get an error when using @OnClick even with @Nullable but findViewById + click listener works fine Feb 15 09:42:34 oh, I have join/disconnect hidden @Zharf Feb 15 09:42:51 Hello guys, after programming in iOS for a while I'm back on Android, so I had to catch up some knowledge and new developments. I like Material Design, but it amazes me that I can't do a simple back to previous fragment when clicking on the back arrow. I mean, you navigate up en down, so if I setHomeAsUpEnabled(true) it should by default pop backstack. Now I have an arrow back button that doesn't do anything in AppCompatActivity. Feb 15 09:42:51 Does anyone has a simple guide to handle this? Feb 15 09:42:54 liuwenhao, tab complete would've revealed it :) Feb 15 09:44:45 @Number5 .addToBackStack(null) or .addToBackStack("whatever tag you want") when you are setting up the transaction Feb 15 09:45:16 i.e. transaction.add(R.id.fragment_container, newFragment).addToBackStack("").commit(); Feb 15 09:45:46 thats how I do it at least Feb 15 09:47:34 liuwenhao, it's not about addTobackstack, it's about why the arrow button in toolbar doesn't do anything, it doesn't call onOptionsItemSelected(). Feb 15 09:48:28 does fastlane have any benefits over gradle ? Feb 15 10:31:07 I'm having trouble parsing inner json classes using gson. How to deserialize "property"? Here is the following json Feb 15 10:31:08 { "success": "true", "inventory": { "id": "234-232", "property": [ { "type": "book", "title": "Red Dragon" }, { "type": "bottle", "color": "blue" } ] } } Feb 15 10:32:18 Since "property" is inner class, using .registerTypeAdapter(PropertyItem.class, new PropertyItemDeserializer()) isn't working. Feb 15 10:32:33 Will appreciate any help. Feb 15 10:32:55 just make a new class and have the root class contain the property class as a member? Feb 15 10:33:08 no need for type adapters Feb 15 10:33:27 This was just an example. I'm using a very complicated API which needs deserializing of inner classes. Feb 15 10:33:58 I was going through the documentation. Using static classes for nested object didn't make much sense. Feb 15 10:34:26 if the class is an inner class, making it static will drastically simplify things Feb 15 10:34:44 since non-static inner classes require a reference to the parent instance Feb 15 10:35:56 But the problem in the above problem is, I haven't defined "PropertyItem" inside "Property" class. Feb 15 10:36:05 Will check more into this. Feb 15 10:36:58 I need a proper testcase to understand the problem you're experiencing Feb 15 10:38:14 Hmm, to clarify more into this, if I had this json { "success": "true", "property": [ { "type": "book", "title": "Red Dragon" }, { "type": "bottle", "color": "blue" } ] } Feb 15 10:38:19 it works fine Feb 15 10:38:46 However, If I nest "property" inside "inventory", the custom deserializer isn't even called. Feb 15 10:38:56 Thanks anyway. I'll research a bit more. Feb 15 10:44:52 arun15, I dont really get what you need but this website should hlp you with deserialization: http://www.jsonschema2pojo.org/ Feb 15 10:50:02 Ok guys, how can I make AppBar (in AppCompatActivity) transparent such that the background of the fragment can be seen? Feb 15 10:50:50 Nnabueze, thanks. I was however looking into polymorphism ability in gson library. Feb 15 10:51:46 The question I posted here is just for one fragment, for other fragments the appbar stays as normal. Feb 15 10:51:49 Number5, A toolbar is just a view. you can make it transparent the same way you would do it with any other view Feb 15 10:51:56 ie setting the background to transparent Feb 15 10:52:31 danijoo_, Ok, sorry for the stupid question. My apologise. Feb 15 10:53:34 Number5, lol its not a stupid question Feb 15 10:54:08 danijoo_, I'm sorry, but what happens is that a view I move under the appbar disappears (I move the view using animation). That was my problem. Feb 15 10:54:15 Nnabueze, thnx man :) Feb 15 10:55:51 can you make a mock of what you are trying to do? Feb 15 10:56:08 sounds like something you should use coordinatorlayout and appbarlayout for Feb 15 10:56:17 I set appbar transparent, what happens is the view (like a TextView)I move under the appbar also disappears as if it's covered by the appbar., while the appbar is transparent. Feb 15 10:57:06 danijoo_, I think that's the best thing to do now, to show you an example of what I try to achieve. Well as soon as I'm finished I'll show you what I try to do. thnx guys Feb 15 11:08:08 For some reason my mediaplayer in my foreground service only runs well when the notification drawer is open? Feb 15 11:11:15 anyone using retrofit? Idk why but i'm getting network on main thread exception, shouldnt that be automatically handled by it? Feb 15 11:12:03 If you use a Callback or rxjava, sure Feb 15 11:12:19 no i'm not using any callbacks Feb 15 11:12:43 or rxjava Feb 15 11:12:49 Then it happens on whatever thread you call the method on Feb 15 11:13:11 then it is on main thread -.- Feb 15 11:13:17 what am i supposed to do? Feb 15 11:13:42 Call it on another thread, or use a Callback Feb 15 11:16:20 SimonVT: u know wheres the callback docs? Feb 15 11:17:01 I don't, I manage the threading myself Feb 15 11:17:17 asynctask? Feb 15 11:17:31 Service and a Thread Feb 15 11:17:53 is that better than the callback? Feb 15 11:18:12 No, just different Feb 15 11:32:57 Any of you guys has any experience with disabling AEC-Acoustic Echo Cancellation (on rooted devices)? So idea is to play some sin/cos waves from application on a callers device thru speakers, and that those noises are heard by the call receiver. But every noise that comes out of speaker seems to be ignored by microphone while call is active (even though i managed to disable second mic on device). Help or suggestions? Feb 15 11:37:22 @Twirl, which did you do?: call.enqueue() or call.execute()? Feb 15 11:37:49 Nnabueze: now i'm using the enqueue Feb 15 11:38:08 but it's giving me malformed JSON Feb 15 11:38:16 and idk why Feb 15 11:38:36 ok cuz .execute() on main thread causes NetworkOnMainThread exception too Feb 15 11:38:39 Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $ Feb 15 11:39:03 u might have missed a { or ] Feb 15 11:39:21 no, the json is created with php json_encode Feb 15 11:39:27 it's fine Feb 15 11:39:33 i'm not manually writing it Feb 15 11:40:12 copy that json and paste here to see it if gives the appropriate pojo: http://www.jsonschema2pojo.org/ Feb 15 11:41:09 hello everybody, how to change action bar icon size in android? thanks in advance Feb 15 11:41:27 Nnabueze: it's a list of objects Feb 15 11:42:09 Nnabueze: [{"prop1":val, "prop2":val}, {"prop1":val, "prop2":val}] Feb 15 11:43:17 maybe php's json_encode isnt the right format for gson? Feb 15 11:43:41 I dont know Feb 15 11:43:47 im using it with another json library and it works fine somewhere else Feb 15 11:43:53 json is json Feb 15 11:43:59 Find out what actually reaches the device and validate it Feb 15 11:44:21 that's what i'm trying to do Feb 15 11:44:28 but paste a link to the code, someone here could look at it and help you out Feb 15 11:44:43 Nnabueze: what code? Feb 15 11:45:36 ur code, as in how you are parsing the json Feb 15 11:46:05 i'm using retrofit, pretty much copied the example Feb 15 11:46:07 private static Retrofit.Builder builder = new Retrofit.Builder().baseUrl(API_BASE_URL).addConverterFactory(GsonConverterFactory.create()); Feb 15 11:48:25 wats API_BASE_URL? Feb 15 11:48:26 anyone know a way to automatically add @NonNull to all method arguments when generating code? Feb 15 11:48:30 wats the value? Feb 15 11:49:34 Nnabueze: well, i'm taking a look at the debugger now and it looks like baseUrl = "http://site.com/" and relative url is "/query", that would end up with double "//" probably Feb 15 11:50:38 well, removed the / from query and its the same Feb 15 11:51:22 iirc there was a thing in retrofit docs that said not to have the base url end in / Feb 15 11:52:42 @Zharf, yes dats true Feb 15 11:52:56 still not working Feb 15 11:53:14 OkHttp has a logging interceptor you can use to see the response Feb 15 12:03:13 make sure you are not trying to decode a jsonarray to a jsonobject. that might also raise an invalid jason because it exects one object and not an array Feb 15 12:04:11 I think that would say something about expected BEGIN_ARRAY got BEGIN_OBJECT Feb 15 12:05:18 i dont remember :/ Feb 15 12:06:03 well, looks like the url is fine in the debugger, it's requesting http://site.com/query but i don't know how to see the response Feb 15 12:06:41 how to change action bar icon size? thanks in advance Feb 15 12:08:13 SimonVT: i'm going to try with the logging interceptor Feb 15 12:13:25 bilal, check this: http://stackoverflow.com/questions/9131954/is-there-a-way-to-reduce-the-spacing-between-the-action-item-icons-on-action-bar/10085862#10085862 Feb 15 12:17:30 Hi how can I tell a circle ci to do assembleDebug if its on develop branch and assembleRelease if its on master ? Feb 15 12:34:55 Is there any standard mechanism for handling languages in strings.xml when the language is not taken from system settings but from a preference (stored in SharedPreferences) inside the app? Feb 15 12:48:56 Hello guys, this is my test project: https://github.com/andaluz/MaterialDesign.git At the moment I have a problem to make the back arrow button in the toolbar call the previous fragment. I'm kind of stuck here. Can anyone please help me? The project on github: https://github.com/andaluz/MaterialDesign Feb 15 12:49:40 danijoo_: Have you seen Androids Data Binding lib yet? Feb 15 12:49:51 It also contains a lib for observable attributes on object. Feb 15 12:49:53 *s Feb 15 12:49:59 And maps. Feb 15 12:50:01 And so on. Feb 15 12:50:18 You can just bind an attribute to a view, and when it's changed, the view updates. Feb 15 12:50:41 yes i know that Feb 15 12:51:08 but I dont think its a good idea to mix view/layout definitions with code like that :/ Feb 15 12:55:24 danijoo_, I started an experimental project to solve the transparent toolbar issue in the morning. But first I want to solve the back button on the toolbar, which doesn't call previous fragment. Can you please take a look? Feb 15 12:55:57 When clicking on the back button on the toolbar, it calls the navigation drawer. Feb 15 12:58:40 not without more information Feb 15 12:59:14 also im a bit busy right now. finals.. Feb 15 13:01:15 danijoo_, Ok I'm sorry. I have a main fragment, with 2 buttons, when clicking on it, it opens another fragment, which modifies the toolbar's hamburger menu button to left arrow back button. When clicking on that arrow, it doesn't do anything. I understand if you don't have time. But if you do I really appreciate. Anyway, thank you for responding me. Feb 15 13:02:12 If someone else would like to help, than please :) Feb 15 13:02:39 if you change it to an arrow manually, you have to change it back manually too.. Feb 15 13:06:04 danijoo_, ok, I really googled for this, but it doesn't help. I mean I did override onOptionsItemSelected hoping to catch the event, but it doesn't do anything. Feb 15 13:06:47 I know it's basic stuff I need to know, but apparently I missed some of the knowledge. Feb 15 13:07:16 if the toolbar is part of the activity the onOptionsItemSelected will be called on the activity, not the fragment Feb 15 13:08:57 SimonVT: well, the logging interceptor didn't work with retrofit Feb 15 13:09:02 the id of the click will be android.R.id.home btw Feb 15 13:09:06 danijoo_, yes exactly, it is part of the activity, as I set the toolbar to actionbar with: setSupportActionBar(toolbar); I'll put some more logging Feb 15 13:09:37 Number5, onOpotionsitemSelected will be called with android.R.id.home as menuitem Feb 15 13:09:38 danijoo_: I mean the ObservableString, ObservableInt, etc Feb 15 13:09:43 they fire an event when updated. Feb 15 13:09:52 you can bind them manually to views, too. Feb 15 13:10:20 SimonVT: so, idk what to do to see the response, i keep getting the same error, tried removing the .addConverterFactory from the retrofit builder instance but it says it needs a factory to convert the response body, so idk how to see the response Feb 15 13:10:30 danijoo_, yes I already did that. Glad you said that, so my thought was correct. I'll try to confirm it again. But I'm afraid that NavigationDrawer is like intercepting the event. Feb 15 13:11:06 Number5, that could be the case (navdrawer) Feb 15 13:11:35 danijoo_, so you're not sure either? Feb 15 13:12:08 Number5, im not sure how navdrawer will intercept this without testing it by myself Feb 15 13:12:30 danijoo_, thnx I'll check for it. Thank you for your patient. Feb 15 13:12:30 justjanne, oh i didnt saw that yet. I tested databinding only once when It came out (2014?) Feb 15 13:12:51 and its not compatible with kotlin yet so i never did proper investigation Feb 15 13:15:32 danijoo_, no it's not calling. I think I have to turn navigation drawer off. Feb 15 13:15:33 Yeah, I'm not gonna use actual data binding either, but having the ability to use these days types is awesome. Feb 15 13:16:16 Number5: you know you have to intercept the ActionBarDrawerToggle? Feb 15 13:16:24 Or however it's named now Feb 15 13:17:43 imo you shouldnt change the icon away from the burger when you have a navbar Feb 15 13:17:51 navdrawer* Feb 15 13:17:52 ActionDrawerToggle? No, I thought it's just to coordinate between navigation drawer and toolbar. This whole toggle thing I don't understand. I mean why you need to add another class to intermediate between those two. Feb 15 13:17:53 Anybody know some good camera overlay Libraries? Feb 15 13:18:11 from a design perspective Feb 15 13:18:47 NavDrawer is only for horizontal naviagtion Feb 15 13:19:10 danijoo_, but if you move to another fragment (by adding on the backstack), you have to make the user understand it can go back by pressing on the arrow (or back button). So the user knows where he/she is. Feb 15 13:19:14 anyone knows how to get the response from onFailure from retrofit's enqueue Callback? Feb 15 13:19:26 because, the error message is not helpful Feb 15 13:19:45 keeps saying "malformed json" Feb 15 13:20:15 and the json is perfectly fine, coming from php's json_encode and im also using it somewhere else Feb 15 13:20:34 Number5, if the user can navigate their via a navigation drawer, then no Feb 15 13:20:40 danijoo_, maybe I didn't explain myself right, the navigation drawer is there and stays there, it's about moving to fragment B from A. And the arrow appears in B, when pressing on it , it goes back to A. Feb 15 13:20:44 because its horizontal navigation and not vertical Feb 15 13:21:28 s/their/there Feb 15 13:22:39 danijoo_, ok, what if you have a fragment with a list and you press on one of the item to see the details, when the user finishes reading details, it wants to go back to the list, perhaps to read another item. Feb 15 13:23:37 yes. in this case i agree with you. thats vertical navigation :) Feb 15 13:23:58 danijoo_, ooh ok, you call it vertical navigation, sorry about that :) Feb 15 13:24:02 i tend to open another activity without a navdrawer in this case Feb 15 13:24:10 so i never tried to intercept the drawertoggle Feb 15 13:24:25 danijoo_, well I rather use fragments, but that's just a matter of taste I guess. Feb 15 13:24:44 ok I see Feb 15 13:24:55 so you use activities for vertical navigation? Feb 15 13:25:01 I mean always? Feb 15 13:25:01 yes Feb 15 13:25:07 more or less Feb 15 13:25:07 i think the problem is that it's trying to map a JSON object from a JSON array Feb 15 13:25:41 but as SimonVT, it should say that instead of "Malformed json" Feb 15 13:25:51 but as you said thats preference. i just cant help you with this approach of fragments everywhere Feb 15 13:26:07 Ok, well danijoo_ I think if I can turn off the drawer, it will than call the onOpitonItemSelected method. I'll try it out (hope it works). Feb 15 13:33:26 alright, tried with a single object instead of an array and still giving me malformed json even though the JSON linter from crockford says its 100% valid json Feb 15 13:33:55 maybe an encoding issue (wild guess) Feb 15 13:34:05 where? Feb 15 13:34:12 serverside Feb 15 13:34:15 i'm copy-pasting the response from the browser Feb 15 13:34:19 nope Feb 15 13:34:29 does it send proper headers? Feb 15 13:34:40 utf8 and stuff like that Feb 15 13:35:18 yes, i'm using the same server in other methods with HttpURLConnection and it works fine Feb 15 13:35:29 freaking retrofit, i thought it was going to make my life easier Feb 15 13:35:47 i've already wasted like 3 hours with this malformed json crap Feb 15 13:36:08 show your code Feb 15 13:38:37 OkHttps logging interceptor works fine with retrofit.. Feb 15 13:38:54 SimonVT: can you tell me how? Feb 15 13:39:06 SimonVT: i added it and it didnt show anything on the debugger Feb 15 13:39:10 If you can't get it to work, you might also be able to change the response type to Response or String to get the string value Feb 15 13:40:19 It was made to replace retrofits log level, so it works.. Just add it as an interceptor, set a log level and whatever else it requires Feb 15 13:40:51 I've always found streams kinda confusing Feb 15 13:40:57 there are so many kinds Feb 15 13:41:15 SimonVT: i added it as an interceptor, it didnt show anything on the debugger Feb 15 13:41:50 I don't know what you tell you other than you're probably doing something wrong Feb 15 13:42:28 1.0 is out! http://blog.jetbrains.com/kotlin/2016/02/kotlin-1-0-released-pragmatic-language-for-jvm-and-android Feb 15 13:43:48 danijoo_: is that good pr bad? Feb 15 13:44:11 thepoosh, why would it be bad? Feb 15 13:44:36 idk, Kotlin for now is another niche language for all i care Feb 15 13:44:54 1.0 means no breaking language change anymore which is nice Feb 15 13:45:08 well, util 2.0 Feb 15 13:45:36 yes. but not on weekly basis anymore :p Feb 15 13:46:09 oh, was that a thing for you :S Feb 15 13:46:33 yes Feb 15 13:47:04 where should I start? Feb 15 13:47:20 which kotlin? Feb 15 13:47:40 with? Feb 15 13:47:48 my english is horrible today :s Feb 15 13:47:52 yesir Feb 15 13:48:07 hi Feb 15 13:48:15 t0th_-_: hi hi Feb 15 13:48:16 how i can solve this issue: Fatal Exception: java.lang.IllegalStateException: Fragment{396ffc49} not attached to Activity ? Feb 15 13:48:19 thepoosh, i found the koans very useful to learn the basics Feb 15 13:48:20 isAdded? Feb 15 13:48:36 will have a look Feb 15 13:48:47 t0th_-_: isAdded should return false Feb 15 13:48:56 because Fragment.mActivity is null Feb 15 13:49:10 thepoosh, http://try.kotlinlang.org/#/Kotlin%20Koans/Introduction/Hello,%20world!/Task.kt Feb 15 13:49:22 its like 42 small code challenges to get into it Feb 15 13:50:28 The code -> http://pastebin.com/raw/efLT1Cqx Feb 15 13:50:32 I have an anonymous inner class, which is causing a memory leak. This class calls a method that is defined in the enclosing class. How can I refactor this if the enclosing class requires this method as well? I want to make the anonymous inner class static. Feb 15 13:50:34 danijoo_: that's cute Feb 15 13:50:57 Twirl: set the code to be java for the love of god Feb 15 13:51:08 barq: move to utility method, declare the method static there, call it from both activity and the asynctask with maybe a context instance Feb 15 13:51:22 use applicationcontext from the asynctask rather than any other context if there's a chance that the context could have died Feb 15 13:52:07 the applicationcontext should be singleton and exist as long as any part of the application still is alive, so it should be good Feb 15 13:52:26 By utility method you mean make it static? Feb 15 13:52:43 yeah but I just figured you don't want your activities to accumulate tons of static methods Feb 15 13:52:54 barq: code? leakCanarie? Feb 15 13:53:14 thepoosh: i did Feb 15 13:53:19 thepoosh: that's the raw from pastebin Feb 15 13:53:29 why raw? Feb 15 13:53:35 thepoosh: many ppl don't like pastebin ads so i share the raw version Feb 15 13:53:36 thepoosh: What about leakcanary? Feb 15 13:53:55 if you run it, it might point to the suspicious leaking parts Feb 15 13:53:55 "address": null, -> could this be a problem? Feb 15 13:54:01 barq: the issue is that the method must be static or you will leak memory still because you can't hold a reference to it from the asynctask. Feb 15 13:54:16 hold a reference to the class (e.g. activity) in the asynctask I mean Feb 15 13:54:35 or rather the instance of a class... man, I need coffee or something Feb 15 13:55:47 thepoosh: That's where I got the trace from. Feb 15 13:56:01 I know what is leaking, it's anonymous inner classes Feb 15 13:56:02 what if there is null values on the JSON ? Feb 15 13:58:06 barq: have you ran MAT and checked which object is leaking? Feb 15 13:58:56 kotlin or scala? Feb 15 13:59:40 Yes, the Activity is leaking. Feb 15 14:00:00 leakcanary only checks for activity leaks by default. Feb 15 14:00:40 the activity is leaking because the inner class holds reference to it. This is basically a thorny problem in android, as you can't hold reference to activity or any other platform-managed object from a long-running task Feb 15 14:00:48 there is no guarantee that android hasn't replaced the instance by the time you get to use it Feb 15 14:01:23 the only object that I think is 100% safe is the applicationcontext because there will only ever be 1 of those Feb 15 14:01:25 I am not even doing long running tasks right now, it's a listener Feb 15 14:01:34 why is there asynctask involved then Feb 15 14:02:12 anyone knows if retrofit + gson handle null object properties? Feb 15 14:02:33 Yes Feb 15 14:02:42 The problem is if I pass the Activity to the inner class then I still have a reference to the Activity, so not solving the problem. Feb 15 14:03:10 I don't remember mentioning AsyncTask. Feb 15 14:03:16 oh... err, what on earth Feb 15 14:03:27 oh my guess. Yeah you said only anonymous inner task Feb 15 14:03:36 this is not a good day for me... Feb 15 14:03:54 inner class too. I think I'll just go away until I can make sense again. Feb 15 14:04:14 JakeWharton: was that for me? Feb 15 14:04:17 It's basically the same thing. Feb 15 14:04:26 It could be an AsyncTask, same problem there. Feb 15 14:04:38 yeah, basically what you do is when activity is destroyed you need to destroy that other thing as well Feb 15 14:04:41 Twirl: yes Feb 15 14:04:42 so that the activity doesn't leak Feb 15 14:05:03 JakeWharton: nice, mind taking a little look at this http://stackoverflow.com/questions/35411067/retrofit-2-keeps-throwing-malformed-json-but-its-100-valid Feb 15 14:05:07 So just null the listeners. Feb 15 14:05:10 in a sense, you created this object so it's your responsibility to then destroy it or replace the Activity it holds with something else Feb 15 14:05:52 null where? usually garbage collection is perfectly capable of taking care of stuff without explicit nulling Feb 15 14:06:37 No, not if I have a strong reference pointing at the Activity. Feb 15 14:06:48 yes, but where is the reference to this listener beind held? Feb 15 14:06:50 Twirl: you didn't show the error Feb 15 14:07:05 JakeWharton:  "Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $" Feb 15 14:07:30 that's being thrown on the onFailure Feb 15 14:08:15 Sounds like you're not actually getting the JSON you expect then. Feb 15 14:08:35 In the Activity, but I also pass the Activity to the inner class, which still holds a reference to the Activity. Need to get rid of that as well. Feb 15 14:08:36 Probably getting an HTML or just a String body Feb 15 14:08:38 maybe it's gzip-compressed stream? Shouldn't be hard to dump what you get Feb 15 14:09:10 barq: well, garbage collection is capable of getting rid of cyclical reference such as Activity -> inner class -> Activity Feb 15 14:09:12 JakeWharton: the URL in the browser shows the correct json, i would like to see what is the application receiving or trying to parse but idk how Feb 15 14:09:17 are you sure that your tool reporting memory leaks is reliable? Feb 15 14:09:37 Use the OkHttp logging interceptor Feb 15 14:10:49 Yes, leakcanary is reliable. Feb 15 14:11:13 I can also confirm with MAT Feb 15 14:11:48 do you pass the listener elsewhere? I mean, I assume you do, otherwise what could it possibly listen Feb 15 14:12:11 wherever you put it is probably keeping the listener and the activity alive Feb 15 14:12:35 JakeWharton: http://pastebin.com/aAQ3PiK1 like this? Feb 15 14:12:40 am i missing something there? Feb 15 14:12:50 tried it like that and it doesn't show anything on the debugger Feb 15 14:12:54 danijoo_, I fixed it by adding a listener on fragment change and check what to do (pop back previous fragment or show navigation drawer. Feb 15 14:13:54 I am passing the listener to the inner class Feb 15 14:13:56 Twirl: you have to set a log level. It defaults to none Feb 15 14:14:05 And the inner class does some UI operations via runOnUiThread Feb 15 14:14:35 hmm I thought the inner class *was* the listener. Feb 15 14:15:26 JakeWharton: logging.setLevel(HttpLoggingInterceptor.Level.BASIC); gives me errors, can't find the method setLevel or Level Feb 15 14:16:04 They are nested listeners Feb 15 14:17:42 JakeWharton: alright, fixed it passing it to the addInterceptor constructor Feb 15 14:18:19 it shows response 200 OK but not the body Feb 15 14:19:10 JakeWharton: alright, fixed it changing BASIC to BODY, ty man Feb 15 14:20:11 lol i'm retarded, i had the wrong URL Feb 15 14:22:17 If you have a chain of patch2gc references, which part of the chain do you need to break in order to allow GC to happen? Feb 15 14:22:38 Just the last strong reference pointing at the leaked object I guess. Feb 15 14:37:18 JakeWharton, if I host a navigation drawer and a framelayout which I plug in fragments and I want also to navigate between fragments using the back arrow button on the toolbar, what is the best practice pattern to handle the navigation back button to pop up previous fragment? Feb 15 14:39:13 Can anyone with Android 5.0+ tell me if this app shows as "incompatible with your devices"? https://play.google.com/store/apps/details?id=com.one.abcrepeat.androidpaid Feb 15 14:39:24 NavigationDrawer is like the vertical navigation and toolbar's back button is the horizontal navigation. Is there a best practice solution most developers use, or is everybody dropping its own solution? Feb 15 14:40:00 Jooeeeeee looks fine on mine. What did you build this in btw? Feb 15 14:40:16 Libgdx Feb 15 14:40:27 It shows incompatible for me, but the free version shows compatible.. Feb 15 14:42:11 hey guys, in Android Studio, I’ve a helper .aar project which just connects a few locations together as a kind of shared library between projects Feb 15 14:42:31 and as such, I have no tests on it, but just the eventual projects that utilise it Feb 15 14:42:47 but, when I build it, gradle goes through the test and unit test phases Feb 15 14:43:13 :prepareDebugUnitTestDependencies and :compileDebugUnitTestSources Feb 15 14:43:26 but I can’t find anywhere that’s pointing to the build process to do this Feb 15 14:43:58 it’s not a big deal, but I prefer knowing what’s triggering what, and I can’t find how to stop this from happening, and be in full control of it, from within the IDE Feb 15 14:44:52 the full list is, Feb 15 14:44:52 Executing tasks: [:generateDebugSources, :prepareDebugUnitTestDependencies, :mockableAndroidJar, :compileDebugSources, :compileDebugUnitTestSources] Feb 15 14:46:40 Jooeeeeee I have a HTC One X and it's showing up fine Feb 15 14:46:53 Taios: thank you Feb 15 14:47:15 I was going to create an ad for it, but I was worried that would scare people away Feb 15 14:47:53 Hi guys Feb 15 14:49:22 Jooeeeeee, also no problems here (nexus 5x) Feb 15 14:50:00 is here someone that can help me a bit with an android wear watch face please? Feb 15 14:50:07 danijoo_: thanks Feb 15 14:51:59 I'm getting an OutOfMemoryError trying to download a 45MB file Feb 15 14:52:21 I'm reading all the byes in one go, but I should have plent of free memory right now Feb 15 14:52:54 RustyShackleford, read it in frames and save them to the disk Feb 15 14:53:07 45 mb likely exceeds available memory Feb 15 14:53:56 not that an app is not allowed to use full memory of the phone. its limited to something between 16 and maybe 128 mb depending on the phone model Feb 15 14:55:18 ahhh thats a pain Feb 15 14:55:30 okay gotta write to a buffer and save it Feb 15 14:55:48 I'm not able to get working an animation loaded from an XML in a watch face under ondraw method... someone that can point me in the right direction? Feb 15 14:57:56 danijoo_: can u help maybe... please Feb 15 15:00:13 hi Feb 15 15:00:17 hi Feb 15 15:00:39 does this site work for everyone else: http://developer.android.com/distribute/tools/promote/device-art.html Feb 15 15:00:45 ? Feb 15 15:00:58 yes Feb 15 15:01:03 jonky: Feb 15 15:01:28 meaning, you can drag and drop pngs, edit, etc? Feb 15 15:02:41 i drag and drop Feb 15 15:02:46 and works Feb 15 15:03:21 with chrome and OSX Feb 15 15:03:47 jonky: are u good with app development? Feb 15 15:06:49 weird Feb 15 15:06:56 lol Feb 15 15:07:09 maybe u can help me jonky Feb 15 15:07:17 ok, what's the issue? Feb 15 15:07:33 i have issue strating an animation loaded from an xml in an watch face Feb 15 15:07:41 starting* Feb 15 15:08:03 i added the code under ondraw Feb 15 15:09:42 http://stackoverflow.com/questions/35347155/how-to-add-an-animation-to-android-wear-watch-face Feb 15 15:11:59 I am new to android, can anyone apoint me a function where I can choose between camera (with ability to capture save/register) and gallery Feb 15 15:12:46 andv, take a look at Camera-related *intents* http://developer.android.com/guide/topics/media/camera.html Feb 15 15:13:46 if someone can help me with this would be great http://stackoverflow.com/questions/35347155/how-to-add-an-animation-to-android-wear-watch-face Feb 15 15:13:53 tnx in advance Feb 15 15:15:04 Skin1980, sorry. i dont do much with animations Feb 15 15:15:24 ok... tnx anyway Feb 15 15:16:03 with GCM, if i want to unsubscribe the user from all topics can i simply just refresh the token? Feb 15 15:16:29 er, the instance id i mean Feb 15 15:23:01 Anyone here with experience using Facebook Advertising for their App..... I'm confused why they want me to bid $2.50 per app install... How does that work if most apps are $1 or free.... Feb 15 15:23:24 Jooeeeeee: that 'bid' is how much you're willing to pay per install. Feb 15 15:23:56 also, of course they're going to suggest a high bid :P they need to make money, too. Feb 15 15:24:03 So if I bid $0.20, i'll never get anything Feb 15 15:24:17 Jooeeeeee: maybe. it depends on what other's are bidding Feb 15 15:24:30 you just have to try it for a few days, and see. Feb 15 15:30:46 hello Feb 15 15:30:51 dcope: thanks, i set it to $0.1, FB is crazy Feb 15 15:31:00 are there any books you like for knowing android in depth? Feb 15 15:31:00 they wanted $3.60 for a link click Feb 15 15:31:20 I might be better off just learning as I go Feb 15 15:31:23 they are ripping off a lot of people Feb 15 15:31:26 Jooeeeeee, ads will never pay off like that Feb 15 15:31:30 RustyShackleford: it's a huge book called google :) its depth never ends Feb 15 15:31:51 regedit: i've been reading for a good 15 years Feb 15 15:31:56 still haven't finished Feb 15 15:35:44 RustyShackleford: since you are a good reader... can u help me with my issue please? Feb 15 15:35:48 ;) Feb 15 15:38:43 Does Firebase have an IRC channel? Feb 15 15:39:51 I know a couple of people here mentioned they're using Firebase from this channel. I'm looking at their rules section and it seems like you can grant permission to only logged in users to be able to write to your Firebase databases, however there's nothing mentioned about user groups apart from that they aren't needed. Feb 15 15:40:23 I'm hoping to have two user groups - 1. staff and 2. customers Feb 15 15:41:50 Would I just add information onto the user objects whereby I have usergroup added for each individual user and just add them automatically to customers unless it's manually changed by one of the staff users? Feb 15 15:43:08 Think I actually found something for this, sorry. If anyone's interested: http://stackoverflow.com/questions/14491496/granting-access-to-firebase-locations-to-a-group-of-users Feb 15 15:48:06 Hi! Is it possible to create a TextView subclass that uses a different Layout class than StaticLayout, DynamicLayout or BoringLayout ? Feb 15 16:13:04 yes Feb 15 16:15:23 is here a developer who can help me with a watch face for android wear? I would pay for his time Feb 15 16:16:25 oh tacticaljoke is going to be happy ... Feb 15 16:16:49 skin1980: No advertising, jobs or otherwise Feb 15 16:17:05 sorry, i need only help Feb 15 16:17:07 g00s, yes ^^ Feb 15 16:17:26 SimonVT: i can't find the solution by myself Feb 15 16:17:36 my toe feels so much better its rediculous Feb 15 16:18:01 I can rest my foot on the ground while sitting without pain! Feb 15 16:18:03 RustyShackleford maybe is about to fall off Feb 15 16:18:24 whatever, i'll walk on my stump then Feb 15 16:18:27 all the nerves and tissue died -> no pain Feb 15 16:18:36 first step to becoming a zombie Feb 15 16:20:20 skin1980: You still have to abide by the channel rules Feb 15 16:20:41 SimonVT: Yes, you are right, sorry again Feb 15 16:21:17 SimonVT: i didn't know that rule Feb 15 16:21:25 It's in the topic Feb 15 16:23:19 SimonVT: You are right again. :( Feb 15 16:28:06 Is there a channel, where jobs are allowed? Feb 15 16:39:42 please guys... i need a hint for an android wear watch face, someone can help' Feb 15 16:40:42 skin1980 learn android watch :D Feb 15 16:40:52 that will be $1 Feb 15 16:41:06 no advertising please Feb 15 16:41:10 ;) Feb 15 16:42:24 i need only to know how can i run an animation loaded from an xml in a watch face Feb 15 16:44:32 when i run it under the ondraw it only print the first frame Feb 15 16:49:42 what's the best way to call a method in an activity from an intent? Feb 15 16:53:43 how would i get an intent from activity B back to activity A in activity A's OnResume? Would a broadcast manager be the best way? Feb 15 16:54:05 Why would you need to do that? Feb 15 16:54:51 If activity A has opened activity B, might I suggest using onActivityResult Feb 15 16:55:39 lemme look at what that is real quick :) Feb 15 16:56:35 ok, i'll brb anyway Feb 15 16:58:23 what if i dont want activity B to immediately send the result back? e.g. I have a checkbox that i want the user to be able to check or not, and then when they hit back to go back to activity A is when i want to send the result Feb 15 17:00:03 then on back you would send the activity result Feb 15 17:00:14 you don’t have to do it right when they toggle the checkbox Feb 15 17:01:01 ok cool, ill try that Feb 15 17:09:19 havent been here in months Feb 15 17:09:41 but just updated AS and I get this error: failed to resolve com.android.support:appcompat-v7:23.+ Feb 15 17:10:18 and when i install repository and sync project i get this error Feb 15 17:10:19 Ignoring unknown package filter 'extra-android-m2repository'Warning: The package filter removed all packages. There is nothing to install. Feb 15 17:10:19 Please consider trying to update again without a package filter. Feb 15 17:10:24 any solutions? Feb 15 17:11:23 i suggest doing what it says. - updating without package filters Feb 15 17:11:58 bobbiejim you can close the acitivity by doing finish() which will call onactivityresult in activity A Feb 15 17:12:24 Taios yup! doing that now Feb 15 17:12:37 how do i do that? i haven't used AS in months. Feb 15 17:12:39 Ok =). Is it a settings change you're making? Feb 15 17:14:19 nah im just trying out like a really simple to do list application, havent done android in a while so im trying to refresh my memory Feb 15 17:14:33 Oh :D Feb 15 17:14:42 DarkChaoz, use the sdk manager for updating, and not AS Feb 15 17:17:35 what im looking to update? the support library is updated to rev 23.1.1 Feb 15 17:23:05 I'm getting mHandler.getLooper() == null Feb 15 17:23:39 correction, mHandlerThread.getLooper() == null Feb 15 17:23:46 trying to run this handler on a background thread Feb 15 17:24:00 mHandler = new Handler(mHandlerThread.getLooper()); Feb 15 17:25:54 did anyone use Selendroid ? Feb 15 17:26:02 DarkChaoz, update whatever is outdated and then adjust your gradle file to the new versions Feb 15 17:44:04 RustyShackleford did you call start() on your handlerthread when you created it? Feb 15 17:49:16 <_genuser_> anybody here have moto 360 watch? Feb 15 17:49:17 when using sendActivityForResult, do i need to use a background thread? Feb 15 17:50:35 im asking because my main activity seems to freeze when i want to go to the other activity to get the result Feb 15 17:51:40 <_genuser_> startactivityforresult? Feb 15 17:53:26 bobbiejim you may be thinking about it wrong.. startActivityForResult doesn't actually do much actual work, it returns almost immediately Feb 15 17:53:51 all it does is signal to the android framework, "hey put the user into this activity now, and when it finishes, let me know" Feb 15 17:54:23 hmm im not sure why it would be freezing then Feb 15 17:54:26 your activity is still "running" in the meantime, but that's only in the sense that it hasn't been destroyed - activities aren't like threads where they're all constantly doing something Feb 15 17:54:43 <_genuser_> what exactly do you mean by freezing? Feb 15 17:55:00 <_genuser_> what do you expect it to be doing that it doesn't. I think that's be the question I have for you. Feb 15 17:55:06 activities are all just event-driven interfaces.. the user does something, or some system event happens, and your activity gets called a method runs - once that's done, control goes back to the system to do other things Feb 15 17:58:10 so im expecting it to start activity B, and then when the user goes back get that result and do stuff with it. but when i click the button to go to activity B, the application is unresponsive to any other taps Feb 15 17:58:15 and activity B isnt started Feb 15 17:58:40 is that not how startactivityforresult works? Feb 15 17:59:18 do you get a stacktrace for that freeze? Feb 15 18:00:30 did you declare activity B in your manifest? Feb 15 18:01:44 yeah i declared activity B, no stacktrace but logcat says "explicit concurrent mark sweep GC freed" which has to do with memory right? Feb 15 18:01:54 <_genuser_> so it's not that your main activity is freezing after the second one is launched. You're most likey having an exception during the startActivityForResult call. Feb 15 18:03:26 <_genuser_> if you can log.d() around your startActivityForResult() and then see the log statement from right before, then I'd guess it's in the onCreate of activity B where you might be causing some trouble. Feb 15 18:03:42 if its crashing theres a stacktrace. Feb 15 18:04:30 ok ill try that Feb 15 18:04:33 idk maybe he has some kind of loop thats hanging on Feb 15 18:05:17 <_genuser_> for me printf debugging works much faster on android than actual debugging. Feb 15 18:05:52 <_genuser_> but actual debuggin via AndroidStudio is quite helpful too. You can step thru line by line and see exactly which line causes it to hangup Feb 15 18:07:04 ok i got it. im dumb, i had a random startActivityForResult in my activity B so it was just starting the activity back and forth i guess Feb 15 18:07:27 <_genuser_> oh that's not dumb. that's just being a tired programmer. Feb 15 18:07:28 but now activity B doesnt start at all, so im gonna see what thats about Feb 15 18:17:22 Hello Feb 15 18:20:17 Is it possible (and is there an app that does this) to have a one-tap voice command button on the lock screen? Feb 15 18:20:43 So it can be used before unlocking the screen even Feb 15 18:21:16 regedit, #android Feb 15 18:22:18 danijoo_: I'm not sure whether I want to find this app already existing, or male one... Feb 15 18:22:23 Er Feb 15 18:22:28 Make one heh Feb 15 18:23:00 It seems lockscreen widgets has been ditched? Feb 15 18:23:02 they you should decide that and then ask in the appropriate channel ;) Feb 15 18:24:11 Is it possible to program such an app / widget? Feb 15 18:25:54 my google voice works without any tab. Feb 15 18:28:20 danijoo_: are you able to use it before unlocking the screen? Are you on >=lollipop? Works even without enabling continuous voice listening? Feb 15 18:29:07 Wait Google voice? Meh Feb 15 18:29:23 yes, yes, no, yes ;) Feb 15 18:30:20 Why is it 2016 and I'm the only one expecting a device to be mildly useful... Feb 15 18:34:50 whatever this means.. Feb 15 18:50:04 if i have a bunch of checkboxes in a relative layout, what would be the best way to iterate through them? a loop using relative layouts children? Feb 15 18:50:55 * Robdgreat tries to wrap his head around wanting to have effectively full use of a locked device without unlocking it Feb 15 18:51:23 if someone can help would be great... tnx guys http://stackoverflow.com/questions/35347155/how-to-add-an-animation-to-android-wear-watch-face Feb 15 18:52:00 skin1980, you cant load an xml in for wear devices Feb 15 18:52:23 thanks danijoo_ Feb 15 18:52:25 they work more lowlevel and if you want an animation that would mean you need to write it manually frame by frame (at least i think so) Feb 15 18:52:56 and how can i build an interpolation frame by frame? Feb 15 18:53:02 if it can be done Feb 15 18:53:24 "On February 11th, Adobe released an update to Creative Cloud (v 3.5.0.206) which, as they put it, “…in some scenarios the application may incorrectly remove files with user writeable permissions from the system root directory.” omg lol Feb 15 18:54:34 you don't really need those files, they're trying to help you Feb 15 19:05:33 does this exist, or remains to be created? http://kopy.io/EeiQH Feb 15 19:05:48 danijoo_: ^ more spelled out Feb 15 19:07:09 hi all - when I try and run adb Windows says 'This app can't run on your PC. To find a version compatible with your PC, check with your publisher' Feb 15 19:07:16 it worked fine last night Feb 15 19:07:30 and has worked fine for manyears Feb 15 19:10:06 I did do an update on sdk tools and android studio 2.whatever beta Feb 15 19:10:21 yesterday, but that was prior to the issue today Feb 15 19:10:30 so it should have ceased working after the update if that was the cause Feb 15 19:11:41 LetterRip what version of windows ... Feb 15 19:12:05 i think somebody with win7 had that problem Feb 15 19:12:24 i had to update OSX because they linked against a newer libc Feb 15 19:12:41 linux guys had problems since they switched to 64-bit versions lately Feb 15 19:12:57 so the sdk updater doesn't check your system before hosing the install Feb 15 19:15:18 what is the best way to pass a bitmap from an activity -> fragment Feb 15 19:17:23 When working with the navigation drawer and fragments, as opposed activity's where most of my code is, do I just put all that code into the main activity now? Feb 15 19:17:27 or is there a better way to do it? Feb 15 19:18:56 RivaCom yeah, thats a little tricky. nav drawer works good at top level, switching between list of things which you may jump of into detail activity Feb 15 19:20:05 So better to just load the activity? Feb 15 19:20:30 not sure what you are asking Feb 15 19:21:56 g00s: Windows 10 Feb 15 19:22:04 I've been on it for about 1/2 year Feb 15 19:22:42 Ok so I have a app which I originally just setup as activities, and buttons would navigate between the activities. I than decided maybe the Navigation Drawer would be better. But from what it looks, I don't want to take all the code from my activities and put them in the fragments Feb 15 19:22:47 g00s: i think that maybe it was the update that borked it after all Feb 15 19:23:02 So I would assume I would have to put all the code form the activities in the MainActivity Feb 15 19:23:14 RivaCom ah ok, yeah nav drawer works best as a view / fragment switcher Feb 15 19:23:38 It is possible to have a Nav Drawer switch between fragments Feb 15 19:23:42 err, activities Feb 15 19:23:49 Hey guys, how's it going today? Feb 15 19:23:51 all those sub-activities you launch into, you would ideally pull those into fragments and just have the main activity switch between them Feb 15 19:24:06 it is a little “fighting the framework”, but I’ve done it Feb 15 19:24:43 the way we did it was to move the nav drawer stuff into a common base class, and it would have methods for launching the other activities Feb 15 19:25:04 sounds difficult to maintain the backstack Feb 15 19:25:16 back in a nav drawer doesn't go to the last selection Feb 15 19:25:23 you don’t maintain one when switching nav drawer Feb 15 19:25:35 g00s so should I just be calling the other activities from the fragment? Feb 15 19:25:57 RivaCom take a look at cheese square on github from chris banes Feb 15 19:26:06 oh wait, he doesn't actually switch fragments Feb 15 19:26:36 I got the fragment part down, im just trying to just figure out how to combine the two Feb 15 19:26:38 RivaCom you can do it s73v3r way, or this is good tut on using with fragments https://guides.codepath.com/android/Fragment-Navigation-Drawer Feb 15 19:26:43 how would i iterate through a layout inflater's child views? e.g., i have a relative layout with a single textbox under it, and im using a layout inflater to inflate multiple textviews onto my activity Feb 15 19:28:49 RivaCom in that tut, you can skip 'animate burger icon' i dont see many apps doing that any more Feb 15 19:29:02 g00s: !!! Feb 15 19:29:11 hey thepoosh :D Feb 15 19:29:12 Has anyone here ever had users experience error -505 when trying to install their app? Feb 15 19:29:26 decided to join the hype train Feb 15 19:29:51 and see what Kotlin is all about Feb 15 19:30:06 From looking it up it sounds like it's a lollipop bug, but if that's the case I'd expect a lot more apps to be experiencing it Feb 15 19:30:20 thepoosh: Choo Choo! Feb 15 19:30:28 lol Feb 15 19:30:35 s73v3r you using it also ? Feb 15 19:30:43 haven’t tried Feb 15 19:30:49 g00s: not planing on actually using it Feb 15 19:31:18 i really like swift, even though the type system sometimes seems heavy handed, so I think Kotlin would be a nice match Feb 15 19:31:30 if compile + deploy times with instant run were the same as Java I would give it a try, but seems this is not the case yet Feb 15 19:32:15 but when it is, i'd like to know. my machine is slow so speed improvements in that area help me a lot Feb 15 19:32:38 g00s: does instant run actually work? Feb 15 19:32:42 lol Feb 15 19:32:52 well if it doesn't with java, it isn't with anything else :P Feb 15 19:33:05 thepoosh so where do you think you'll use it first ? Feb 15 19:33:18 sample app Feb 15 19:33:31 one of those download recent lady gaga tweets Feb 15 19:36:46 thepoosh so outside of work then ... Feb 15 19:36:56 yeah Feb 15 19:37:05 i don't see a way to get this in our code base Feb 15 19:37:11 too unmaintainable Feb 15 19:37:16 oops Feb 15 19:37:21 well you could maybe start with unit tests Feb 15 19:37:52 could be Feb 15 19:38:08 since interop is supposedly great, not like you have to go whole hog - maybe start with a few util classes Feb 15 19:38:18 stuff on the periphery Feb 15 19:40:15 can it play nice with java? Feb 15 19:40:34 thats one of its selling points Feb 15 19:41:35 interop is awesome Feb 15 19:41:45 you can just start new classes in kt and throw them in Feb 15 19:41:58 someone on reddit was complaining that it had the interop Feb 15 19:42:07 why? Feb 15 19:42:20 they thought it was a reasonable suggestion to make it optional, and have Kotlin be a natively compiled language Feb 15 19:42:45 Hmm Feb 15 19:42:49 ah, i think thats the way scalas dotty is going Feb 15 19:42:55 then someone whould have to rewrite the whole java stfdlib in kotlin Feb 15 19:43:10 and it wouldnt change anything Feb 15 19:43:14 i know. i said that complaint was ridiculous Feb 15 19:43:33 Is there a way to draw a line and animate it into slowly getting into a line with an applied bezier curve? Feb 15 19:43:58 Like draw a straight line and animate it until it's like this: http://i.stack.imgur.com/GCJF0.png Feb 15 19:55:24 Hi everyone; is there any way that I can run javascript when browswer is minimized on android? Feb 15 19:58:57 monsterco: do you mean from your site on a device? Feb 15 19:59:06 yes Feb 15 19:59:35 we have a web site which we want to use track user location in real-time; it's an employee management system Feb 15 19:59:46 not an android native app Feb 15 20:00:12 I know we can push GCM through web browser now but wondering if we can also *pull* for data Feb 15 20:18:38 can anyone shed some light on why it's not mapping the JSON to the object? http://pastebin.com/qigeSYAg Retrofit 2 + gson, the response shows the 4 ArrayList perfectly, i don't know why it's not binding/mapping to the object as expected Feb 15 20:18:45 this is confusing. I have a handler running on a background thread Feb 15 20:19:31 postDelayed() eventually calls a method which declares an anonymous class. That anonymous class's methods are executed on the UI thread Feb 15 20:19:36 no idea whats going on here Feb 15 20:20:57 RustyShackleford: postגקךשטקג ןד איק גקהןך Feb 15 20:21:05 postDelayed is the devil! Feb 15 20:21:21 especially to the UI thread Feb 15 20:22:15 how are the methods called on the UI thread if the class is created in the context of a handler thread? Feb 15 20:22:31 is there a posting mechanism? Looper.getMainLooper? Feb 15 20:22:34 beats me man. I'm tracing through this again Feb 15 20:22:37 yeah, Looper Feb 15 20:23:02 it seems like that anonymous class is the only thing run on the UI thread in this block Feb 15 20:23:14 sounds like a terrible design Feb 15 20:23:17 where is this? Feb 15 20:23:30 I even used the http://www.jsonschema2pojo.org/ to get the gson Feb 15 20:23:36 so, idk whats going on Feb 15 20:23:54 I think the problem is on the interface though Feb 15 20:24:19 Call> users(); // should I be passing some parameters here or something? Feb 15 20:24:24 thepoosh: terrible design, yeah probably Feb 15 20:24:43 what do you mean by where? Feb 15 20:24:55 Its in the app that I work on Feb 15 20:33:46 is a HandlerThread and Looper not the best way to move something to a background thread? Feb 15 20:34:20 I know it's a little off-topic but does anyone have a desktop regex tester they use? I was using regexr but the desktop version is broken now Feb 15 20:36:44 grekkos: why does it have to be desktop? don't you have internet? Feb 15 20:37:00 Twirl: I do, but i want one that I can use when I don't have internet Feb 15 20:37:13 grekkos if you are on IRC without internet, let me know how you do it Feb 15 20:37:49 grekkos: why you don't have internet? Feb 15 20:37:55 u on the north pole or something? Feb 15 20:38:47 I have it right now, but i'd like one that I can use when I don't have internet. i.e., when I'm traveling Feb 15 20:38:52 I prefer to have it offline Feb 15 20:40:48 grekkos: like, on a plane? Feb 15 20:40:57 or in a train or something? Feb 15 20:41:25 bc ur not supposed to use ur electronics while flying anyways Feb 15 20:41:43 falae Feb 15 20:41:47 false Feb 15 20:42:03 you're not supposed to use electronics while taking off, but in flight is allowed Feb 15 20:42:03 ignore list++ Feb 15 20:42:13 i wouldnt risk it Feb 15 20:42:18 and yes, when I'm on a plan or a train Feb 15 20:42:45 whether or not you risk it is fine, but when everyone else on the plane is using them... does it really matter? if you have no suggestions then that's fine Feb 15 20:43:27 yeah this anonymous class is not instantiated on the same thread Feb 15 20:43:31 wtf is going on here Feb 15 20:43:53 faa no longer restricts electronics on flights Feb 15 20:43:58 took long enough Feb 15 20:44:18 does that mean I don't need airplane mode anymore? Feb 15 20:44:24 some flight companies still do though (at least here in EU) Feb 15 20:44:41 didnt got the memo i guess :p Feb 15 20:45:16 grekkos, just create a .html file and use javascript Feb 15 20:45:20 you can open it in any browser Feb 15 20:49:46 I would have liked to listen to ATC on my scanner Feb 15 20:49:54 it transmits no signals Feb 15 20:49:59 only recieves them Feb 15 20:50:50 it's pretty risky imo Feb 15 20:52:20 not at all Feb 15 20:52:56 I didn't do it, but no its not risky Feb 15 20:53:02 the risk is getting caught and jailed Feb 15 20:53:10 not bringing the plane down Feb 15 21:08:05 is there a way to iterate through all of the views under a View after youve used a layout inflater on it? Feb 15 21:11:19 yes. a for loop Feb 15 21:16:00 I put log statements before and after this anonymous class declaration. They show up on the background thread Feb 15 21:16:15 inside the anonymous class, its on the UI thread. I don't understand how that is possible Feb 15 21:17:23 danijoo_ using the child count? because View doesnt have that method Feb 15 21:17:46 yes Feb 15 21:17:56 cound and getChildAt(int) Feb 15 21:20:40 but Views dont have those methods, are there other ones thatre similar? Feb 15 21:21:18 ViewGroups do Feb 15 21:21:23 and other views cant have childs Feb 15 21:24:02 ok, so should i get the viewgroup from the layout inflater and use its children? Feb 15 21:24:14 not sure if that would be how to do it Feb 15 21:24:49 if your rootview is a ViewGroup, you can cast it after the layoutinflater returns it Feb 15 21:27:42 ok Feb 15 21:37:18 sigh... finished my first app. had a hard enough time trying to pick up graphic design stuff to make an app logo and now the google play store wants me to make a banner image for the account page -__- Feb 15 21:37:26 i do not art. Feb 15 21:37:46 you can hire people to art Feb 15 21:38:42 *watches moths fly out of pocket* with my imaginary money? :( Feb 15 21:39:52 it takes money to make money Feb 15 21:40:22 the art is an investment in your app, just like your computer and any resources you used to learn app development were Feb 15 21:40:36 i mean im putting the app up for free. didnt intend to make money, its my first app Feb 15 21:41:06 my second comment still applies Feb 15 21:41:14 and why not try charging for it? Feb 15 21:41:48 nice figured this out. Fuck threading is complicated Feb 15 21:42:01 so, Runnable, Thread, or AsyncTask? Something else? Feb 15 21:42:09 I just need to run a quick job off the UI thread Feb 15 21:42:35 because i don't really think it is good enough to charge money for Feb 15 21:42:56 if it’s not good enough to charge money for, it probably isn’t good enough to be released at all Feb 15 21:43:20 it probably still needs work Feb 15 21:43:21 your pessimism is noted Feb 15 21:43:41 danijoo_ what if my rootView isnt a viewgroup? Feb 15 21:44:00 bobbiejim, then yhere are no childviews you could iterate over Feb 15 21:44:53 hm..my dilemma is that i have a relative layout with a textview and a checkbox. i then use a layout inflater to print a bunch of these, and i want to be able to iterate over them to change the checkbox status if a user does something in a different activity or not Feb 15 21:45:09 a relativelayout is a viewgroup.. Feb 15 21:45:31 yes, but the relative layout only has the two initial children Feb 15 21:45:41 textview and checkbox, and doesnt hold anything past that Feb 15 21:46:03 so what i want to do works on the very first textview/checkbox in my activity, but not on the following ones Feb 15 21:46:04 huh Feb 15 21:46:19 so they will be 2 first children Feb 15 21:46:34 your design sounds more complex than it needs to be Feb 15 21:47:02 s73v3r i think it is :P but i wanted to see if there were a way to do what i wanted to do without redesigning Feb 15 21:47:22 but it’s going to end up being pretty difficult to maintain Feb 15 21:47:32 eeyup Feb 15 21:48:10 hmm.what would be a better way to do it then? Feb 15 21:49:23 a variable for checkbox :v Feb 15 21:49:31 yup Feb 15 21:49:41 or all the views you plan to update later Feb 15 21:50:31 like, when i got to activity B keep a variable for the specific checkbox to check/uncheck in my main activity? Feb 15 21:50:49 yes Feb 15 21:50:54 thats pretty common 'pattern' Feb 15 21:51:00 that sounds a lot easier than what i was trying to do lol Feb 15 21:51:04 ever heard of findViewById Feb 15 21:51:06 alright ill try that out Feb 15 21:51:10 yup Feb 15 21:51:58 so you just set the variables in onCreate (OnCreateView for fragments) and voila Feb 15 21:55:53 s73v3r pretty nice layout https://medium.com/the-engineering-team/package-by-features-not-layers-2d076df1964d#.kpup5b8xy Feb 15 21:56:08 so top level is layer, then features/ .... Feb 15 21:56:17 Is there any hacky way to add weights to relative layouts? Feb 15 21:56:34 Controless there is PercentRelativeLayout Feb 15 21:56:37 in support lib Feb 15 21:57:16 plain RL do at most do "fill remaining space" Feb 15 21:57:16 I'll take a look at that, thank you. Feb 15 21:57:24 that’s similar to how i’d like to do it Feb 15 21:58:09 although I’ve recently started to sour on the idea of having one “RestAPI” class Feb 15 22:01:55 s73v3r i was going to have top level be layer *and* common, but kinda like how they break the fueatures into its own subdir + shared Feb 15 22:02:02 Ah g00s, I think I misexplained. I basically want to make both the relative layouts 50% of the width of the parent. currently it's like this: http://i.imgur.com/lh2xG08.jpg, I want the 2 layouts to have equal widths. Is this possible? I've looked all over google and stackoverflow and didn't find a solution sadly Feb 15 22:02:31 Ashiren what exactly do you mean by set the variables? i only have 1 "checkbox" in my layout, which is then inflated Feb 15 22:02:51 bobbiejim put them in Top level PercentRelativeLayout :P Feb 15 22:02:59 oops Controless ^^^ Feb 15 22:03:15 you 2 both hash to the same color in irc :D Feb 15 22:03:23 Oh sweet, let me see if that works :) Feb 15 22:04:26 bobbiejim: checkBox = (CheckBox) someView.findViewById(R.id.some_checkbox); eh? Feb 15 22:09:07 Ashiren i guess what im unsure of is how will i know which checkbox this relates to when i come back to my main activity from my secondary one? Feb 15 22:10:35 g00s you are a goddamn genius, it worked perfectly. thank you so much! Feb 15 22:12:16 bobbiejim: the one in the layout? do you inflate it somewhere else as well Feb 15 22:12:29 two words I'd never see connected in the same sentence ;) Feb 15 22:13:01 no i inflate it only when i first generate the view with the checkboxes/textviews Feb 15 22:13:35 so it will be the same checkbox o.O Feb 15 22:13:46 g00s: I don’t think I like having “shared” under features. I guess I’d rather there be some kind of “Core” directory alongside Features, which contains stuff that is common across the app Feb 15 22:17:06 im still confused >.< so i have it so that i know which textview/checkbox combination i need to check when returning to my main activity, but im unsure of how to actually pick that textview/checkbox combination out from my inflated layout when returning Feb 15 22:17:44 uh Feb 15 22:18:09 returning to my main activity* Feb 15 22:18:36 bobbiejim: You’d have to determine that before you go to the activity Feb 15 22:25:11 I'm trying to learn android application architecture. Seems like the safe one to look into is MVP. One thing I keep getting stuck on is the "M" in all of these architectures. What is Model? Is it just the class of my data? Or is it the actually data backed by sqlite and such? Feb 15 22:27:17 it’s different things to different people, but I would include it in being the POJOs, the database, the data managers/repositories Feb 15 22:46:12 hello. Anyone familiar with how to best implement two step verification in a mobile app that uses a web API? The website generates a OATH based TOTP key using a QR code and when enabled users require a OTP when logging into the site. I'm unsure how to best implement this in a mobile app. Any suggestions? Feb 15 23:21:22 Looking at a google android app example, they state "Instead of using a package by layer approach, we have structured the application by package per feature. This greatly improves readability and modularizes the app in a way that parts of it can be changed independently from each other." does anyone else package by feature? I usually put all my activities in one package, all fragments in another. the feature package idea is smart Feb 15 23:27:14 eghdk_: g00s and I talk about this all the time Feb 15 23:27:25 :D Feb 15 23:27:43 I would love the package by feature approach, but sadly most of the projects I join have already been started, and they go with a package by layer approach Feb 15 23:29:22 Wouldnt packaging by feature have less modularity than packaging by layer..? Feb 15 23:29:38 Yeah, I'm just trying to learn MVP in android, and it's just a lot to take in. A lot different than I've been doing stuff by so far. Feb 15 23:34:50 i don’t see why packaging by feature would have less modularity Feb 15 23:35:05 further, packaging by layer generally gets you absolutely nothing Feb 15 23:35:18 a bunch of redundant folder names, that’s it Feb 15 23:36:12 Does the V in MVP in Android basically mean Activity, Fragment, or any View subclass? Feb 15 23:37:17 this is another one of those things where it kinda depends on which interpretation you’re following. Some have the V be an Activity, Fragment, or View. Some have the Activity as the P, and the Fragment/View as the V Feb 16 00:09:04 Anyone have any good "go to" blogs/articles/docs on MVP architecture in Android? I actually don't want github repos, because most github repos introduce a bunch of other things I haven't learned yet. Like rx, and dagger etc; Feb 16 00:12:30 My AudioTrack decoding 5.1 audio is very very quiet Feb 16 00:15:43 5.1 audio tends to be very quiet Feb 16 00:15:57 movies try to maximize use of dynamic range Feb 16 00:30:16 https://www.reddit.com/r/Android/comments/45tm7r/android_for_iot_brillo_has_chromes_update_boot/ Feb 16 00:53:08 The new Kotlin icon is so neat. Feb 16 00:55:10 its 1.0 TacticalJoke ! Feb 16 00:56:51 guys, is it real to reverse engineering android app? Feb 16 00:56:58 want to add some feature to one application. then reassembly it. is it real? Feb 16 00:57:04 hhee no Feb 16 00:57:05 danijoo_: :D Feb 16 00:57:29 TacticalJoke is it real ? Feb 16 00:57:54 g00s, well, tnx for answer Feb 16 00:59:06 "Is it real 'cause I feel fake." -- Robbie Williams Feb 16 00:59:28 Oh, it was "Is this real". Feb 16 01:00:09 hhee: baksmali + smali allows for that, if you don't mind decoding proguarded symbols and writing in jazelle-like assembler Feb 16 01:00:32 hhee: you can't sign it with the original signature unless you actually have the private key for it, though. Feb 16 01:01:11 What happened to JesusFreke. He idles in #kotlin but doesn't come in here. :\ Feb 16 01:01:24 smart man. Feb 16 01:02:04 sup with the nerds? Feb 16 01:02:16 zinx, tnx for answer! cool Feb 16 01:03:06 btw guys, how much time do you spent to start writing normal/usefull android apps? Feb 16 01:03:33 Guess a time frame and then multiply that by 2.7. Feb 16 01:03:36 i mean - after start learning write android app to real results? Feb 16 01:03:46 TacticalJoke, :) Feb 16 01:03:48 Then subtract -0.1. Feb 16 01:03:52 Oops, +. Feb 16 01:04:01 I mean "subtract 0.1". Feb 16 01:04:38 hhee: Are you new to Android Feb 16 01:04:39 ? Feb 16 01:04:53 TacticalJoke, absolutely noob :) Feb 16 01:05:07 hhee: do you know java? Feb 16 01:05:20 zinx, nope. (sad i know) Feb 16 01:05:59 hhee: it will take quite some time. you need to learn java, the android api, and the android application/activity/service/etc lifecycles, which are fairly different from what you might expect in a typical OS Feb 16 01:06:54 hhee: you probably want to learn java in conjuction with the android api - that is, learn it by writing android apps - since android apps have quite a few differences in design from typical java apps Feb 16 01:07:44 zinx, tnx a lot! how do you think - is it real to done this in couple of mounths? (and exists some junior remote job as android developer?) Feb 16 01:07:44 hhee: there are a lot of tutorials and examples online, if that's your thing. note that some will be out of date, though some of the out of date ones may still apply Feb 16 01:08:04 hhee: i wouldn't limit myself to two months if i were in your position. Feb 16 01:08:33 gotta remember the *2.7-0.1 Feb 16 01:08:39 zinx, android 4.1 - appropriate to start learning? (i have a smartphone with that version) Feb 16 01:09:18 hhee: depending on the person, it could be done - if you know a lot of languages/APIs and are very comfortable learning new ones, in particular. if you are relatively new to programming (let's say < 10 languages), it's a bad idea to try to squeeze in to two months. Feb 16 01:09:30 hhee: sure, 4.x is good to learn on Feb 16 01:10:45 hhee: i'm not saying you can't do it, but i wouldn't make plans on it since it'll probably just get you stressed, and most newer programmers would not be able to do it, so don't get distraught if it takes you longer. it's a lot to take in. Feb 16 01:11:04 TacticalJoke so now what ? :D Feb 16 01:11:07 (kotlin) Feb 16 01:11:47 zinx, tnx x10 (definitely i know < 10 languages) :) Feb 16 01:12:18 g00s: I might convert my unit tests to Kotlin today/tomorrow. Feb 16 01:12:22 hhee: np, and good luck, give it time and you'll do well :) Feb 16 01:13:05 zinx, tnx. you motivate me a lot :) have a good day :) best wishes for you! :) Feb 16 01:13:50 hhee: It's a good idea to frequent this channel if you're gonna do Android stuff. Feb 16 01:14:23 There are many landmines whose coordinates are known by people in here. Feb 16 01:15:22 Just waitin' to blow your legs off. Feb 16 01:15:48 did you see me in Android Weekly? :D Feb 16 01:16:10 my good for nothing video was on there Feb 16 01:18:11 TacticalJoke this is a nice package structure https://medium.com/the-engineering-team/package-by-features-not-layers-2d076df1964d#.kpup5b8xy Feb 16 01:18:47 Yeah, I was reading that earlier. Feb 16 01:18:57 I think I'm gonna switch to package-by-feature. Feb 16 01:19:41 i know any huge refactoring in AS is going to result in lots of compile / error / fix cycles though Feb 16 01:21:43 Yeah. I kinda love that, though, breaking up old code. Feb 16 01:21:48 It's like "F*** the system". Feb 16 01:22:23 "fire in the hole!" Feb 16 01:23:59 Imagine doing it without version control. :s Feb 16 01:24:48 some people do, and are proud of it Feb 16 01:25:18 if i remember, moving things around with svn was kinda pita Feb 16 01:26:58 Hello Feb 16 01:27:05 how can a shell script get the number on an incoming/outgoing call? Feb 16 01:27:15 grepping through the logcat output doesn't seem to show it Feb 16 02:22:12 Oh no, the weekend almost over Feb 16 02:26:12 my weekend has ended long time ago ;) Feb 16 02:27:56 Anyone have any interest (desire to user, contribute, or just see) in a project for a variable-speed video playback PlayerView for Android? Feb 16 02:28:03 desire to use** Feb 16 02:28:25 no Feb 16 02:28:29 ;) Feb 16 02:28:34 heh Feb 16 02:29:22 but that might be interesting Feb 16 02:29:30 from stream point of view Feb 16 02:29:51 i just have 1 bug and 1 feature to fix/add and it's ready... Feb 16 02:30:19 From the issues I saw with ExoPlayer, it seemed like it might be a thing worth open sourcing Feb 16 02:34:00 ExoPlayer is not bad Feb 16 02:34:16 I agree it has some boilerplate and it's not that clear Feb 16 02:34:21 but it has many backends Feb 16 02:34:23 Am I right in thinking the only way to test out an IAP is to upload your app to google play and publish it as an alpha, and then have the 'license accounts' download it - and then it works? Feb 16 02:34:29 (I mean streaming formats) Feb 16 02:35:49 sirchopsalot: I'm no authority, it's been a while, but I believe you only need to have uploaded one version of the APK - you can beta test freely - if you want to alpha test then you should go through the alpha distribution Feb 16 02:36:30 explodes: hmmm ok, more testing required tomorrow then I guess Feb 16 02:36:36 the 'offline iaps' tests worked Feb 16 02:36:53 but I get the authentication required warning otherwise Feb 16 02:51:33 how do you do testing? Run them locally, instrumentation tests, mix of both? Feb 16 02:51:57 regular unit tests would be great. You could design a bunch of stuff without having to fire up the emulator Feb 16 02:52:48 can you mock out all the android stuff without a ton of work? Feb 16 02:54:33 RustyShackleford: google andrdoi mvp pattern Feb 16 02:54:33 RustyShackleford: Testing is pain in the ass but I will help you get started :D Feb 16 02:55:04 RustyShackleford: MVP will help you with UI testing, and testing the business logic in your application. Unit tests can cover your library classes. Feb 16 02:55:12 https://www.youtube.com/watch?v=vdasFFfXKOY&list=PLWz5rJ2EKKc_Tt7q77qwyKRgytF1RzRx8&index=16 Feb 16 02:55:31 check that video from android summit 2015 Feb 16 02:56:10 basic idea is like with web: keep views (activity, fragment, whatever) as stupid as they can be, and let them only display data Feb 16 02:59:47 Shipping an app with a photo from online, im assuming this is allowed if the photo has the proper license? **** ENDING LOGGING AT Tue Feb 16 02:59:59 2016