**** BEGIN LOGGING AT Sun Mar 20 02:59:58 2016 Mar 20 03:27:05 I think Unity was failing to access the Jar properly because it...I don't even know something wrong in the XML file I...maybe Mar 20 03:42:04 In android studio you know how you ALT + enter to import Mar 20 03:42:11 can I import all at the same time? Mar 20 03:43:37 ctrl shift o Mar 20 03:43:40 maybe Mar 20 04:48:44 Without using a library, is there a way to decode html entities in a string? Html.fromString strips html tags, which I do not want. Mar 20 04:49:36 *Html.fromHTML(s) Mar 20 04:50:04 Without a library, tricky. It's a very hard problem, especially for malformed HTML (which is a pleonasm) Mar 20 04:50:13 If you are open to a library, JSoup Mar 20 04:51:05 Anyone here that's done Android Plugins for Unity? Mar 20 04:56:22 : JSoup is a good library. Maybe I can just copy the function without importing the whole lib. Thanks. Mar 20 04:56:39 I very much doubt it will be that easy but good luck Mar 20 04:56:44 Why don't you want to use a library anyway? Mar 20 04:58:25 I don't need all the functionality of the library, and I'd like to keep the app size as small as possible. Mar 20 04:59:20 My Unity side code isn't progressing past: bridge = new AndroidJavaClass(CLASS_NAME); The string in CLASS_NAME matches a class in my .JAR (Plugin)... Mar 20 04:59:23 I'm thinking there's something wrong in my XML file that Unity doesn't properly know that the class exists? Mar 20 04:59:26 But I don't know what I'm doing with AndroidManifest.XML (like I haven't used that dialect of XML before). Mar 20 05:06:04 StringEscapeUtils.unescapeHtml4 (from apache commons lang) seems to do job. Mar 20 05:14:01 android offers localization whenever you ship an app Mar 20 05:14:04 are they any good? Mar 20 05:30:53 hi all, when doing "repo sync ", if there's an error (bad uri in the manifest), repo stay stuck fro some minutes and Ctrl+C can't quit it, any idea what repo is doing during this time ? Mar 20 05:31:25 punishing the dev for his/her typo ? Mar 20 05:34:52 Hello Mar 20 05:35:00 Any clue why this is not working? https://gist.github.com/anonymous/71e4a0a174d3cdb785ff Mar 20 05:42:33 nilsi nope; but I have one piece of advice that could help a bit output to the debug console on every line and see if it's actually breaking at some point or just not doing anything. Mar 20 05:43:34 Android isn't my thing I'm here trying to get Unity to communicate with a native package and got ittle help on that...so >_< Mar 20 05:46:11 Bcadren: Thanks Mar 20 05:46:24 on the line under my print statement im getting: Mar 20 05:46:37 W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 3297 Mar 20 05:46:45 D/ViewRootImpl: #3 mView = null Mar 20 05:47:12 But not sure really what it means Mar 20 05:48:10 I dont think its related my problem Mar 20 06:03:36 nilsi sounds like it can't call a function because of protection level or similar. Try googling the specific error, I'm sure someone has raised that issue on stackexchange and there will be a solution there. Mar 20 06:14:06 Bcadren: Yeah, I suspect its the ViewPager that is the problem now having cached views or similar. Mar 20 06:15:23 Second time I call the method I see that the text is updated in the view, it is just not reflected in the app. Mar 20 06:15:53 I tried called destroyDrawingCache, invalidate, notifyDataSetChanged on the ViewPager but doesn't work... Mar 20 06:58:39 Is there any way to specify slicing for vector drawables? Mar 20 07:13:43 #owncloud-design Mar 20 07:14:04 * sudhirkhanger forgets join Mar 20 07:16:51 nice, I found a job post Mar 20 07:17:04 I can definitely get an interview here Mar 20 07:17:15 and it looks like a place I wouldn't hate working at Mar 20 07:45:54 burger king? Mar 20 07:48:33 home depot Mar 20 08:12:46 morning all Mar 20 09:35:01 is Lenovo ThinkPad T420 Core i5 2520M 2,5 GHz good for android programming ? Mar 20 09:41:09 yes Mar 20 10:19:12 Hello everyone! Can anyone clarify one question with android activity-fragment lifecycle? Mar 20 10:20:17 I'm newbie and I want to create some simple application. I think MVVM pattern is the most suitable for me. I'm already used it earlier. Mar 20 10:20:44 I examined several examples at github but I cant get one moment. Mar 20 10:21:24 just ask it.. Mar 20 10:22:04 In every example ViewModel created at Activity-Fragment onCreate method directly. But ViewModel can perform some continuous tasks. If activity will be reconfigured - VM will be created one more time. Mar 20 10:22:35 What is your question? Mar 20 10:22:51 how should I create and store ViewModels or Presenters Mar 20 10:23:03 What have you tried? Mar 20 10:23:04 and save state Mar 20 10:23:47 could you please help me with retrofit 2 define API interface for this https://randomuser.me/api/?results=2 ? Mar 20 10:24:01 SiN_Bizkit, im not doing MVP much but there are like 1 million MVP tutorials :/ Mar 20 10:24:06 seems this does not work @GET("api/") Call> groupExamples( @Query("results") int search); Mar 20 10:25:13 SiN_Bizkit: Have a look at http://thefinestartist.com/android/mvp-pattern and https://github.com/antoniolg/androidmvp Mar 20 10:27:03 ok, I will try to ask it simplier. In every android-related article-tutorial I read that I need to separate domain logic from presentation. But domain layer created directly by Views in onCreate method. I don't get how can I restore my state with Activity lifecycle. Mar 20 10:27:57 I would recommend learning Android first and then worrying about MVVM or MVP Mar 20 10:28:45 maybe you're right. I will read refs one more time, I think I miss something. Mar 20 10:30:06 sorry for the disturbance Mar 20 10:43:13 Hello, I was told that if I choose a package name for my application which starts with a me. that means I don't need to own this domain, is that true? Mar 20 10:43:29 Because I am interested in developing an application but I don't want to buy a domain jut yet Mar 20 10:45:18 Itay, you can chose whatever you want but its good practice to use a domain you own Mar 20 10:45:27 Itay: afaik, the domain rule is more to avoid choosing a package name that's already taken Mar 20 10:45:36 Itay: as someone will already own the domain in such a case Mar 20 10:45:54 you might not be able to deeplink into your app if you dont know the domain though Mar 20 10:46:08 Thanks, so basically that won't give me any problems if I choose a package name of a domain I don't own, right? Mar 20 10:46:18 For example, me.myfullname.applicationname Mar 20 10:46:39 yes Mar 20 10:46:45 And can I publish to google play if I don't own that domain? Mar 20 10:46:50 yes Mar 20 10:46:50 yep Mar 20 10:46:53 thanks :D Mar 20 10:48:37 package names don't need to be domains, it's just convention Mar 20 10:48:43 oh he left Mar 20 11:17:55 Question.. I've been poking around a few android repos of late, and I notice something.. Many of the methods are rather large.. Now being a fan of "clean code" I wonder if there's a reason for the large size? Is it common to have 20 or 30 line methods? Mar 20 11:19:35 Actually Now that I count, I'm seeing an average of 40 or 50 lines.. Is there some reason for the large functions. I only ask because I wouldn't mind moving to android dev and I want to know if the 10 line limit I strive for is an anti-patern Mar 20 11:23:01 baash05: probably runtime optimization Mar 20 11:23:16 to avoid deepening the call stack Mar 20 11:24:09 I remember it had an effect on java in the early days, but I thought they inlined things now? Mar 20 11:26:03 Wouldn't JIT flatten the call stack? Mar 20 11:26:34 That's really not the reason anyone cares about :P Mar 20 11:26:43 :) Mar 20 11:27:29 I guess people tolerate longer methods in Android world :) Mar 20 11:27:42 What’s the best way to perpetually run a service in background, with a guarantee that it’s never killed? Mar 20 11:27:57 I need a sensor event to be received under ANY circumstances. Mar 20 11:28:14 justJanne, plug in a separate hardware module that collects data. Mar 20 11:28:20 Mavrik: not possible. Mar 20 11:28:21 or adjust your expectations. Mar 20 11:28:24 Requirements are clear: Mar 20 11:28:24 So it is common for larger methods in Android.. Why do they tolerate it? Mar 20 11:28:46 Collect step counter data, on Android, no external hardware, no sharing of the data with any third party. Mar 20 11:28:58 Mavrik: the requirements can’t be changed. Mar 20 11:29:01 baash05: well, you could argue that obsessively splitting stuff up makes it more difficult to read Mar 20 11:29:29 baash05: but I've never really done Java EE so I don't know about the arguments in favor of it Mar 20 11:29:36 *shrug* Mar 20 11:29:52 Reading code that's forcefully split on tiny methods is hugely painful and hard to maintain. Mar 20 11:29:56 Same as overly long methods. Mar 20 11:30:29 Humm.. I always figure if I'm writing a comment there's a great chance it could be a method name. Mar 20 11:30:30 The point is grouping code in a way that does a single thing and can be read / grasped together. Mar 20 11:30:34 I guess Java is a bit more verbose. Mar 20 11:30:50 But the clean code book was written in java. Mar 20 11:30:58 Or well targeted java. Mar 20 11:32:04 I'm not sure what kind of answer do you expect. Mar 20 11:32:16 People who wrote that code thing that's the size that makes sense for them :) Mar 20 11:33:23 No.. I grew up on C so method size matters.. I was wondering if there was a reason, or if it was just pref. Mar 20 11:33:38 if it's just a pref that's cool. Mar 20 11:34:36 Pretty much a pref Mar 20 11:34:40 I thought perhaps the interpreter had call stack issues, and that it was by design that we wrote larger functions. Mar 20 11:34:44 Nah. Mar 20 11:34:51 Thing is that Android APIs can be a bit more verbose Mar 20 11:34:57 So handling touches or stuff may take a bit more lines of code Mar 20 11:35:10 And splitting it up rarely makes sense due to some statefulness about it. Mar 20 11:35:16 It's not the best API under the sun :P Mar 20 11:36:33 I'm looking at a method that has "final Runnable fileCleanup = new Runnable() { ... 10 lines of code ... }" and wondering why not call "createFileCleaner" isn't in it's place. Mar 20 11:38:06 All good.. Not having to worry about that stuff makes my future a bit more fun :) Mar 20 11:38:20 Oh I wouldn't write that kind of code Mar 20 11:38:30 baash05, lots of GitHub code is awful :D Mar 20 11:38:30 Eh? Mar 20 11:39:26 That was in a google sample :D Where sharding to smaller well named methods might have helped the reader. Mar 20 11:39:48 Google samples are awful too :P Mar 20 11:39:50 But Yeah.. github isn't super.. Mine included :) Mar 20 11:39:59 Write code so it's readable to you :) Mar 20 11:40:39 I try to write it so I can read it. but I do account for the thing that's going to be reading it the most. Mar 20 11:41:44 thanks Mav'.. Mar 20 12:30:47 Anyone got this before? http://tinypic.com/view.php?pic=z5mk4&s=9#.Vu6Xed8zrCI I get this when I go "Edit Configurations" or try to run application Mar 20 12:31:17 Bernzel_: wow, that is just a sucky website Mar 20 12:31:23 what's wrong with imgur Mar 20 12:31:40 also, no pic for me Mar 20 12:37:57 thepoosh: Sorry, here: http://imgur.com/GZgHuA6 Mar 20 12:52:47 Anyone know how to resolve that? Mar 20 13:04:09 nvm , solved it Mar 20 13:21:28 Hey, gradlew hangs for some reason with no output when running any command. Is there a fix for this? Mar 20 13:21:38 rm ~/.gradle? Mar 20 13:22:06 shodan`: what task is it hanging on? Mar 20 13:22:12 no output Mar 20 13:22:15 resolveDependencies? Mar 20 13:22:28 try using the --info Mar 20 13:22:30 tag Mar 20 13:22:59 one second, reinstalling gradle atm. Mar 20 13:26:51 It seems to be trying to fetch play services 7 Mar 20 13:27:08 but all requests are miss Mar 20 13:31:45 are you using a vpn/proxy or somethig Mar 20 13:31:57 Anyone here designing their UI without XML ? Mar 20 13:32:22 Bernzel_, its horrible to do that in java Mar 20 13:32:33 My gradle config: https://nnmm.nl/?D3Y Mar 20 13:32:34 there are okish solutions for that in kotlin/scala though Mar 20 13:33:04 shodan`, do you have the local maven repos installed? Mar 20 13:33:15 danijoo: hm okey. Guess I'll have to persevere Mar 20 13:33:40 danijoo: No clue man, been about a year since I've done Android dev. https://sicp.me/p/nUKiN Mar 20 13:33:48 Bernzel_, the java syntax makes it horribly verbose to do android-ui Mar 20 13:34:04 shodan`, you should start by updateing your sdk then Mar 20 13:35:44 Yeah I can imagine danijoo . I'm coming from a long time using Libgdx where you handle everything with pure "Java" so it's a bit unusual for me this Mar 20 13:43:48 danijoo: but I want to do this correctly from the start. Making the ui fit on all screen sizes. Is that something I need to have in mind from the beginning when designing the ui? Mar 20 13:44:35 It's still trying to fetch stuff it can't find Mar 20 13:44:59 Bernzel_, you should read http://developer.android.com/training/multiscreen/index.html Mar 20 13:44:59 compile 'com.android.support:support-v4:22.0.0' Mar 20 13:45:12 no wait wrong one Mar 20 13:45:17 shodan`, as I said you should update your stuff first Mar 20 13:45:19 compile 'com.google.android.gms:play-services:8.4.0' Mar 20 13:45:24 22.0.0 is horribly outdated Mar 20 13:45:24 I just updated Mar 20 13:47:57 I fear that my build.gradle is the problem. Mar 20 13:48:02 https://nnmm.nl/?D3Y Mar 20 13:48:35 what error messages do you get Mar 20 13:48:42 this looks fine beside the outdates libs Mar 20 13:49:22 I'm not getting any errors. It just hangs when trying to fetch resources that don't exist (anymore?) https://sicp.me/p/nUKiN Mar 20 13:50:25 it just keeps telling me resouce missing for each lib I use and it tries to fetch them using an url that 404shttps://sicp.me/p/dmMVn Mar 20 13:50:43 AudioFlinger: read failed: framesRead=-1 <- why does this be sapmmed on my logcat Mar 20 13:50:52 shodan`, 8.4 is the current version. Mar 20 13:51:30 shodan`, did you install " Google Repository" in your sdk manager? Mar 20 13:51:39 and all the other google related extra stuff Mar 20 13:52:03 danijoo: any idea? Mar 20 13:53:53 danijoo: yup Mar 20 13:54:17 bubbely, is it from your app? Mar 20 13:54:22 nop Mar 20 13:54:24 nope* Mar 20 13:54:26 app isnt even running Mar 20 13:54:35 dont care the Mar 20 13:54:37 then Mar 20 13:55:28 thing is Mar 20 13:55:33 when my app is runnig its still spamming Mar 20 13:55:38 and i cant even see my other msgs Mar 20 13:55:42 filter the log Mar 20 13:55:49 bubbely: are you filtering? Mar 20 13:56:14 shodan: no Mar 20 13:56:28 side question: anyone know how to convert an entire InputStream to a string, i can onlym anage one line Mar 20 13:57:22 bubbely, easy googleable Mar 20 13:57:44 no luck Mar 20 13:57:50 i tried first 5 googlez Mar 20 13:58:05 try other keywords Mar 20 13:58:19 danijoo: thanks that cleared it up. Is it recommended to use AssetManager ? Very little documentation about it as far as I can see Mar 20 13:58:34 Bernzel_, for what? Mar 20 14:01:20 its fine if you dont abuse it for stuff like images Mar 20 14:01:41 Sounds like it isn't something that will benefit my app massively then? Mar 20 14:02:17 it really depends on what you put there Mar 20 14:02:30 its the only way for shipping a database with your apk or stuff like that Mar 20 14:02:38 not a good solution for images though Mar 20 14:03:20 wouldnt be easier to download the database from a site? Mar 20 14:03:53 bantard, if its static data that never changes? Mar 20 14:04:50 i am not saying to download it every time you open the app Mar 20 14:05:04 just check if its not up to date and then download Mar 20 14:05:29 If it never changes? Mar 20 14:06:19 If it NEVER changes ok, but will it really never change? Maybe I am just missing the context here, I just joined Mar 20 14:06:58 the context was just what to put in assets and what not Mar 20 14:07:10 oh Mar 20 14:07:16 nvm then :D Mar 20 14:07:24 and I said assets are fine for static files you need like databases etc, but not so much for images Mar 20 14:08:01 yeah you're right Mar 20 14:42:34 Anyone have any opinion on which is better to receive results from an IntentService: EventBus or using ResultReceiver as a callback Mar 20 14:45:48 anyone knows decent lib with Tree implementation? Mar 20 14:54:49 I want to modify the sqlite database of an app I didn't develop - what's the best way to go about it? Can I do that with the debugger? Mar 20 14:55:13 hi everyone Mar 20 14:55:45 how can i handle a javaScript method inside a web page in webview android ? Mar 20 14:55:47 using the Support Navigation Drawer that uses a menu to show it's elements, how can I set the active item? Mar 20 14:58:36 esfboy_25: I think this is what you're after: http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface%28java.lang.Object,%20java.lang.String%29 Mar 20 15:03:29 anyone ever managed to compact a DatePicker or TimePicker? Mar 20 15:26:15 Leeds: sup? Mar 20 15:54:10 Hey all Mar 20 15:58:47 thepoosh: upgraded and re-installed PC this afternoon... parents will be in town briefly this week... Mar 20 15:58:58 good(?) Mar 20 15:59:04 it's good :) Mar 20 15:59:08 Win10? Mar 20 15:59:16 God no Mar 20 15:59:22 Slackware 14.2rc1 :) Mar 20 15:59:33 lol Mar 20 16:01:00 and then a month left in HK, a month left (fulltime) on current project, before Pesach in the UK and hopefully new work after Mar 20 16:04:28 I ♥ win10 Mar 20 16:04:56 Hi all, I'm trying to send an ACTION_CALL from a system service but receive android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.CALL flg=0x10000000 } Mar 20 16:21:03 how should i implement a fading pop up that informs the user about something? Mar 20 16:21:11 i have seen this used in my apps Mar 20 16:24:39 Toast is the answer Mar 20 16:24:41 a toast? Mar 20 16:25:42 HELLo anybody here did an app using instagram api ? Mar 20 16:34:14 anyone? :( Mar 20 16:34:35 murosai_ or snackbar Mar 20 16:38:43 im sure this sounds weird, but what would cause a program to just completely exit without any warning or anything when i look up a hostname with InetAddress.getByName ? Mar 20 16:39:19 my app is just doing really weird shit right now. its like not possible to debug when it just quits...i had it working fine connecting to my server before. changed a ton of code, then changed it back, and of course its broken now... Mar 20 16:40:24 its just weird...im looking up a generic hostname too right now just to test. like bestbuy.com. if i look up google.com it just hangs Mar 20 16:43:19 its not even throwing an exception. it just flat out exists hard Mar 20 16:44:38 do I set the text of a TextView in my layout xml file or in the Activity java file? Mar 20 16:44:49 I also want it to be clickable Mar 20 16:48:11 Whats up all. I have a question. Mar 20 16:48:20 When I String pin = (Arrays.toString(userpin)); Mar 20 16:49:28 Pin comes out as [1, 1, 2, 3] how do i just get 1123 without the commans and square brackets? Mar 20 16:49:42 do i have to use regex or is there a simpler way? Mar 20 16:53:12 you could extend your array class and return what you want in an overriden tostring method, or use String replace to remove "[" ", " and "]" Mar 20 16:54:28 overriding tostring seems cleaner to me Mar 20 16:54:58 extending array is absolutely incorrect though Mar 20 16:55:08 use something like guava Joiner Mar 20 16:55:12 ye i mean like looping and appending to stringbuilder Mar 20 16:55:42 i shouldn't be working now... :( Mar 20 16:56:09 then don't Mar 20 16:56:17 there's a version to put out Mar 20 16:56:20 for(String s : array) sb.append(s); return sb.toString(); soemthing like that Mar 20 16:56:21 and much work to do Mar 20 16:56:43 bantard: that is an ugly way to do TextUtils.join Mar 20 16:57:22 well yeah I guess but does join do somethign different or just to have a one-line solution? Mar 20 16:57:24 why do today what you can force an underling to do tomorrow? Mar 20 16:58:02 * thepoosh is sorry he's the underling Mar 20 16:58:27 oh, well something to look forward to then lol Mar 20 16:58:34 wyrdtrtle: we are a pretty small company Mar 20 16:58:51 only 7 android devs and 2 are senior who are doing other shit this week Mar 20 16:59:03 that left five of us slaving away Mar 20 16:59:31 lol, one hopes you may grow Mar 20 17:00:59 well, we grew a lot in the past 2 years Mar 20 17:01:17 I am the second employee of a 78 employee company Mar 20 17:02:29 g00s where are you?!?!?! Mar 20 17:07:38 can I just announce that I'm sick of reading RxAndroid, Kotlin and MVP posts Mar 20 17:08:38 Then stop? :P Mar 20 17:08:44 lol Mar 20 17:09:06 Mavrik stop making him read those posts! Mar 20 17:09:09 I'm reading only titles now Mar 20 17:09:23 Mavrik: did you subscribe to AndroidWeekly Mar 20 17:09:24 ? Mar 20 17:09:28 mhm Mar 20 17:10:07 I agree there's lotsa Kotlin / Rx lately. Mar 20 17:10:17 for the past 6 months all they have there is MVP, Kotlin and RX Mar 20 17:10:56 add to that r/androiddev Mar 20 17:11:00 and all you have is this Mar 20 17:12:19 stop reading? Mar 20 17:18:02 God don't go to /r/androiddev :P Mar 20 17:20:36 ahahah agreed, damn he left Mar 20 17:20:49 https://github.com/patloew/RxWear < they mentionned it in androidweekly Mar 20 17:20:56 -_-" Mar 20 17:21:00 rx-ification Mar 20 17:29:46 So it's not just me? The entire world is not moving to Rx and Koltin everything right? Mar 20 17:30:05 Rx <3 Mar 20 17:30:32 +1 Mar 20 17:31:40 hmmm... sarcam or genuine? Mar 20 17:31:48 (honest question) Mar 20 17:32:19 rowan7 still vanilla here Mar 20 17:32:19 I'm vigilancer and I love Rx Mar 20 17:32:38 I really like /r/androiddev Mar 20 17:33:16 RxJava, Dagger2, Kotlin, MVP... very much the buzz words of Android atm Mar 20 17:33:38 I'm going to look into them all to see what the hype is about, once I get the time :P Mar 20 17:35:05 vigilancer were we talking about the sqlite.org android bindings the other day? i could be confused Mar 20 17:35:28 g00s: yes Mar 20 17:35:53 vigilancer ah ok. well i went ahead to go build those, and noticed poking around the code that sadly - there were more extensive changes then i thought Mar 20 17:36:15 so its not just a simple copy android.database.sqlite.* -> new package Mar 20 17:36:36 so that has me a bit more nervous :( are you using them ? Mar 20 17:37:09 can't find time to play around sadly Mar 20 17:37:11 Anyone here has any experience in android audiorecord? Mar 20 17:37:29 but I've expected damn thing to work straght forward Mar 20 17:38:28 "The stock Android code to populate CursorWindow containers with the results of Mar 20 17:38:28 a SELECT statement uses a C++ interface that is not available to NDK builds. So Mar 20 17:38:28 this code is rewritten to call the CursorWindow java interface via JNI methods." Mar 20 17:38:50 i guess it should work, not sure how well tested it is though Mar 20 17:39:47 also "The "LOCALIZED" collation and some miscellaneous user-functions added by the Mar 20 17:39:47 sqlite3_android.cpp module are not included." Mar 20 17:40:02 hrmf Mar 20 17:41:09 http://imgur.com/qTxL087 when you close AS, genymotion, avd and tabs related to dev.. Mar 20 17:41:40 adq lol Mar 20 17:41:51 fucking overengineered java shit Mar 20 17:42:03 i think i'm gonna extend my ram again (got 8 slots, 4 are still free) Mar 20 17:42:52 * p_l is still waiting on leasing decision for his 32G laptop beast Mar 20 17:44:05 i disabled windows compressed memory features, it could be a bit less worse than that Mar 20 17:44:20 adq what is that graph from ? Mar 20 17:44:27 win10 task manager Mar 20 17:44:31 ah k Mar 20 17:45:59 it's sunday, almost evening, I allowed myself to stop android dev for few hours (lol) and gonna produce some music instead :3 Mar 20 17:46:18 adq, so you're still having like 4GB of mem unused? :) Mar 20 17:46:27 Such a waste. Mar 20 17:46:34 :)) Mar 20 17:46:53 i only had 1 genymotion vm and 1 avd running though Mar 20 17:47:59 also it was barely 2GB remaining, the 3.9 is what's used after freeing all-the-things Mar 20 17:50:54 hi guys, what is the best way to downloads files from a remote server? Mar 20 17:54:46 I was wondering, I am going to be using activated for highlighting one item in a list view, but does it set the activate for other list items to false ... if not do either of these do that so I do not have to find the other activated child item and set activation to false? Mar 20 17:55:17 setActivate or setSelected Mar 20 17:57:00 listview handles that choice_mode_single i think. recyclerview you are on your own Mar 20 17:57:46 What's the difference between a .wav file and pcm file? Mar 20 17:58:08 seems like a question for google Mar 20 17:58:15 Why can’t I write the data from buffer straight to the wav file instead of going through pcm file? Mar 20 17:58:17 anyhowput, a .wav contains 44bytes of header describing the data payload Mar 20 17:58:32 then the pcm file? it will get deleted right? why is that so o.o Mar 20 17:58:42 pcm is not a file but a format, usually uncompressed containing sample amplitude value interleaved if stereo Mar 20 17:59:23 Yeah, PCM isn't a file :) Mar 20 18:00:06 >.< Mar 20 18:00:23 hmm , gimmi a moment Mar 20 18:00:24 anyhowput, what are you trying to achieve? writting to a file recorded audio data? Mar 20 18:00:34 g00s I am using neither of those Mar 20 18:00:49 i chanced upon a link which could be useful and i am trying to understand why is it implemented this way that way etc Mar 20 18:01:15 a horizontal scroll view wrapping a horizontal linear layout with imageviews in them (simple dots) that if active want a bigger dot showing --- like the dots under a gallery for images Mar 20 18:01:28 anyhowput, link about what? Why is what implemented? Mar 20 18:02:24 gimmi a sec , i digging out now :p Mar 20 18:05:22 is there a way to remove all fragments added with a containerId ? Mar 20 18:05:50 i guess i have to keep references to them and remove each , one by one - O.o Mar 20 18:06:21 trying to do stereo recording on android - (https://github.com/krvarma/AudioRecorder/blob/master/src/com/varma/samples/audiorecorder/RecorderActivity.java) Mar 20 18:06:32 regarding the copyWaveFile Mar 20 18:06:59 for line 171,172 Mar 20 18:07:29 is the inFilename the pcm file? while outFilename is the wav file? Mar 20 18:12:25 it looks like, anyhowput Mar 20 18:12:40 hmm then i assume the pcm file will get deleted? Mar 20 18:12:42 why is that so ? Mar 20 18:12:45 you can see he write the header of the wavefile (out) prior to copying data from in Mar 20 18:12:56 why??? i have no idea lol Mar 20 18:13:17 he seems to use a temporary raw file containing only the pcm data Mar 20 18:13:28 and then copy these ones into a .wav after the header Mar 20 18:13:50 probably to fill some fields of the wave file header, like data length Mar 20 18:14:04 could you point to me which line is that ? 178? @@ sorry Mar 20 18:14:27 yes, at 178, he wrote the wav header file inside out Mar 20 18:14:56 you can see he passes to it some needed information, like samplerate, number of channels (mono or stereo), etc Mar 20 18:15:22 so the final wav file will contain a header with information matching the pcm data inside it Mar 20 18:16:06 hmm, interesting.. Mar 20 18:16:06 otherwise, how would you know if the file is mono or stereo, if the samplerate is 44100 or something else, etc without a header Mar 20 18:16:28 magick! Mar 20 18:16:35 hmm what does the header (wav file header i presume) do? It determines the stereo/mono? Mar 20 18:18:16 read about it online Mar 20 18:18:31 http://soundfile.sapp.org/doc/WaveFormat/ cc anyhowput Mar 20 18:18:41 it's an ancestral format Mar 20 18:19:02 (it suffers of few issues, like adressing wave files bigger than 4GB ... :p due to 32 bits for len) Mar 20 18:21:13 hmm , thanks , but i have another question @@ Mar 20 18:21:33 could i ask what does the writeAudioDataToFile (103) do? Mar 20 18:21:47 is it .. Mar 20 18:21:49 adq, there's also the question why not save to mp3 since you have an AAC encoder for it :) Mar 20 18:21:55 eh Mar 20 18:22:02 *save to AAC Mar 20 18:22:07 To write audio data to file, the data will be written into the PCM file first before using the copyWaveFile? Mar 20 18:22:44 Mavrik, I would agree but there are special use case where you want to avoid that at the expense of more memory Mar 20 18:22:51 like for music production or audio edition :) Mar 20 18:23:00 if you want to process it yeah Mar 20 18:23:14 saving end result to wav is a bit problematic tho :) Mar 20 18:23:23 also feeding an audio buffer, is usually directly raw pcm Mar 20 18:23:39 but i see what you mean, it all depends on the use case anyway Mar 20 18:24:06 @adq you mean Mar 20 18:24:09 problem is audiorecord class (and audiotrack) on android are not capable of handling Mar 20 18:24:12 other things than pcm Mar 20 18:24:14 To write audio data to file, the data will be written into the PCM file first before using the copyWaveFile. It lso feeding an audio buffer, is usually directly raw pcm? Mar 20 18:24:22 adq, yeah but that makes sense Mar 20 18:24:26 since that's raw audio :) Mar 20 18:24:26 yup Mar 20 18:24:31 hmm Mar 20 18:24:32 You really can't do anything with encoded audio Mar 20 18:24:57 anyhowput, you should run the code you have and try to understand it Mar 20 18:25:11 i did... Mar 20 18:25:19 i still don't sigh. i know i suck :( Mar 20 18:25:42 Did you write that code? Mar 20 18:25:46 i think (but i only looked quickly) they write on a temporary raw file which only contains pcm data Mar 20 18:25:52 I mean, what are you even trying to do? Mar 20 18:26:00 and then copy the content of this file inside a wav file with a header matching the format Mar 20 18:26:07 i did not write that code, i chanced upon it online :/ Mar 20 18:26:16 not so expert to write something like that :/ Mar 20 18:26:39 Huh. Mar 20 18:26:56 adq used confusion on anyhowput LOL Mar 20 18:36:50 is there some way of center the placeholding text in a "EditText" in lower api levels than 17? Mar 20 18:43:37 Hello everyone Mar 20 18:44:03 is there a style I can apply to a textview to use it as a header? Mar 20 18:44:23 I know I can create my own style, but I was wondering if there was an android built-in style for headers Mar 20 18:44:37 appcompat has some Mar 20 18:44:39 I am trying to integrate GCM.. I am able to generate tokens for devices and send them to server, however, the device doesn't receive the push notifications. The GCM Api returns "success: 1" Mar 20 18:44:40 http://pastebin.com/CTAQ4EdP Mar 20 18:44:51 Here's my Manifest.. I think it has something to do with this. Mar 20 18:46:13 I think it might have something to do with the "receiver" tag. Please help Mar 20 18:46:19 Figured it out, it's `style="?android:attr/listSeparatorTextViewStyle"` Mar 20 18:46:40 yeah thats one of them Mar 20 18:49:51 Anyone... Mar 20 19:11:09 anyone knows how to set a timeout in retrofit 2? Mar 20 19:11:20 Napalm how is the bottom nav library going ? Mar 20 19:12:17 Twirl: set it on the OkHttpClient instance and pass that in Mar 20 19:14:18 i had to suspend work on it for a bit so I could get some work done. Mar 20 19:14:21 g00s: ^ Mar 20 19:14:31 lol Mar 20 19:15:16 If anyone would mind talking a peak at my SO question, I'd love your input http://stackoverflow.com/questions/36118271/how-can-i-properly-test-this-custom-android-view Mar 20 19:15:21 Napalm since JakeWharton is here, maybe he'll let you use Sherlock trademark :P BottomBarSherlock Mar 20 19:15:38 hhaha Mar 20 19:20:12 why would someone put APKs in /system/app, then not install them? Mar 20 19:21:37 ? Mar 20 19:22:10 why the hell would someone ask that in an app dev channel ;) Mar 20 19:22:31 i followed this guide, and it had no effect: http://www.securitylearn.net/2013/08/31/google-play-store-on-android-emulator/ Mar 20 19:22:45 i think this is a little too technical for #android folks Mar 20 19:24:56 I think whats in there counts as installed? Mar 20 19:24:58 not sure Mar 20 19:25:15 maybe -root knows more about that Mar 20 19:29:03 which is a better choice for a new phone for game dev, Galaxy S7 , S7 Edge, or LG G5. in your opinions? Mar 20 19:29:34 same cpu/gpu, better price ont he g5, but other features wise Mar 20 19:31:00 tripknotix: you should get the slowest phone you would target that the game would run acceptably on Mar 20 19:31:25 tripknotix shmooz has some of those to sell you Mar 20 19:31:41 no way, my old phones are priceless! Mar 20 19:33:20 priceless antiquities :) Mar 20 19:34:00 shmooz: i have a tmobile g2, 512mb of ram, android 2.3, 800mhz processor. and my game has "auto select opengles" version, and in my game i determine if they are running in es3.0 or higher version and then i load a different camera into the scene with additional graphics options such as post effects. https://play.google.com/store/apps/details?id=net.RealDefinition.ZombieOpsOnlineFree Mar 20 19:35:12 i am currently looking for the fastest gpu, with a super fast cpu. the x1 i was looking at seems to be bested by the 820 running in both of those handsets in benchmarks, and would make a prime candidate for vr testing, however i would target google cardboard in order to maintain compatibility with not only cardboard but also would accept any other vr headset at that point Mar 20 19:35:36 so removing the gearvr limitation Mar 20 19:35:45 tripknotix: from an ethical standpoint, supporting Samsung is a bad idea. Samsung supported CISPA and CISA (unwarranted info sharing bills) in the US. Mar 20 19:35:46 im just asking, from your guys perspectives, lg g5, or s7/edge Mar 20 19:36:02 cybrNaut: lolz Mar 20 19:36:07 samsung also has the 2nd highest number of craplets Mar 20 19:36:27 i see more of those RCA $50/100 tablets running my game then anything Mar 20 19:36:34 atleast since 2015 Mar 20 19:36:42 44 craplets on their galaxy note 3 (even below China's consumer protection standards) Mar 20 19:36:43 before that, nexus devices, then 2013 was samsung tabs Mar 20 19:37:37 so anywayz, im most interested in getting the best device, if someone knows a reason to pick 1 or the other, from performance perspectives, maybe one runs standard vanilla ui, maybe they both have horrible ui's but one uses less resources Mar 20 19:37:45 tripknotix: samsung's S7 is probably a tiny bit faster but I would get the G5 for the price and replacable battery and friends Mar 20 19:38:03 yeah planning to sell the camera for under $200 on fleebay Mar 20 19:38:09 <--tmobile Mar 20 19:38:26 so that would bring the price down nicely to about $429 if i invested it into paying off the phone Mar 20 19:38:55 replaceable battery is nice, unless i sold those too =X but ... replaceable battery and charging dock... man... that does sound tasty Mar 20 19:39:02 even from an every day useability... Mar 20 19:39:15 yeah shmooz i like hearing you talk, its better than hearing myself repeat a features list Mar 20 19:39:22 u know what i mean? Mar 20 19:40:02 I saw a preview of the G5, it looks very nice Mar 20 19:40:28 the lg g5 is what 3g of ram? so vs 4gb in s7... and benchmarks show that they are neck and neck in most graphics benchies, but g5 has a few numbers behind in cpu use Mar 20 19:40:28 much nicer than the G4 with the stitched leather Mar 20 19:40:42 how about this shmooz, for vr, did the screen look flat? Mar 20 19:41:00 because im hearing thtat the s7 edge may have light bleeding issues, due to the curved screen Mar 20 19:41:00 oh I never checked for that Mar 20 19:41:25 its like, s7 is 5.1in, s7 edge is 5.5in, then g5 is 5.3 in Mar 20 19:41:57 im hearing that the fov difference can be, from s7 85-90degree fov, to up above 100-120 Mar 20 19:42:13 so im thinking, under those conditions, 5.3 should be about 100-105deg Mar 20 19:42:46 I heard they got rid of the app drawer in LG G5, and people don't like the LG modifications to the stock OS but that can mostly be disabled and you can install a different launcher Mar 20 19:43:14 or reflash with a different rom Mar 20 19:44:30 http://www.androidcentral.com/vulkan-samsung-galaxy-s7-potentially-very-big-deal Mar 20 19:44:34 oh man, how did i miss that Mar 20 19:44:56 that must be similiar to how nvidia enabled vulkan apis on their version of android preview edition. Mar 20 19:45:04 to the k1 tab and x1 shield console Mar 20 19:45:31 so as soon as they are available in game dev kits, i could potentially take advantage immediately Mar 20 19:45:48 So I'm following an android tutorial and it tell me to use this line: grid.setAdapter(new ImageAdapter(this)); but "ImageAdapter" is red and says it can't find that symbol. There's no option to import a class for it. Mar 20 19:46:43 damnit, this is a tough situation, because i bought the kindle back when it had the fastest cpu/gpu , with the qual 800 w/ adreno 320, and my problem was, their flavor of android did not have the Opengl ES3.0 drivers !!! Mar 20 19:46:52 infact, they took so long to get those, they are barely available since last year Mar 20 19:47:17 ... with samsung supporting vulkan on day 1, theres no question as to when i will have vulkan support Mar 20 19:47:29 but what about lg g5... when would i have support for vulkan then Mar 20 19:51:44 hi guys Mar 20 19:51:49 what is the best practice to download files inside an application Mar 20 19:51:54 is the DownloadManager the best solution? Mar 20 19:52:05 icemanbp, depends Mar 20 19:52:52 danijoo: depends on what? Mar 20 19:53:06 the context Mar 20 19:53:34 tripknotix: that sounds exciting but I would avoid stuff that would make the app depend on a certain architecture, if it can take advantage when available and fallback to more standard mode that's fine Mar 20 19:53:39 danijoo: I've to download images and sounds that I need inside application Mar 20 19:54:16 then no Mar 20 19:54:43 icemanbp, what are you using the images and sound for once you have them? Mar 20 19:54:47 i think downloadmanager is more for files the user need Mar 20 19:54:52 like downloading a pdf Mar 20 19:55:05 zzxx: I need to play Mar 20 19:55:40 danijoo: so is better if I write my own code? Mar 20 19:55:51 i think so Mar 20 19:56:00 why dont you ship that sounds with the apk? Mar 20 19:56:13 use something like picasso for the images if you are displaying them in a view Mar 20 19:57:06 because I will do regular update on them, on the server Mar 20 19:57:18 Does anyone know why the line grid.setAdapter(new ImageAdapter(this)); could be failing in the tutorial I'm following? It "can't resolve symbol ImageAdapter", and I'm not seeing an option to import anything to make it work Mar 20 19:57:24 make an update of the apk instead Mar 20 19:57:53 shmooz: yeah auto selection for graphics, then i can determine in the app which arch its using Mar 20 19:58:56 neochronomo, did you wrote an ImageAdapter class? Mar 20 19:59:36 danijoo: Oh is that not a class that's imported? It's written by oneself? Mar 20 20:00:31 neochronomo, yes Mar 20 20:00:35 theres no such thing Mar 20 20:00:52 anyone remember a strange class added to the support lib, it was for handling empty state when loading a list, it kept a indeterminate progress showing for a minimum amount of time Mar 20 20:01:09 danijoo: okay, thanks Mar 20 20:01:20 so that there would not be too much flicker Mar 20 20:11:42 android geniuses of the world, http://stackoverflow.com/questions/36118920/getting-error-when-trying-to-inflate-a-2nd-layout-within-fragment-oncreateview Anyone know what I am doing wrong here? Mar 20 20:13:53 youre trying to add the same view more than once Mar 20 20:14:58 you need to inflate every time you want to add the view Mar 20 20:15:12 use RecyclerView [solved] Mar 20 20:17:17 I dont think recyclerview is necessary Mar 20 20:17:21 too many unexplained variables to tell whats wrong but I guess what Ashiren said Mar 20 20:17:27 it is working now Mar 20 20:17:38 the inflate had to be in the loop Mar 20 20:22:09 anyone has any idea why sonar is difficult to be implemented in smartphone ? Mar 20 20:23:53 can typical (especially low-mid end) smartphone's speakers/microphone emit/receive infra and ultra sounds :? Mar 20 20:24:44 considered they are not engineered for that Mar 20 20:24:46 unlikely Mar 20 20:25:09 I doubt Mar 20 20:26:14 would you rather be at a startup or a more corporate place? Mar 20 20:27:01 Maurits-, is that not what Nearby(TM) uses though? at least partly Mar 20 20:27:01 depends on the working conditions ;) Mar 20 20:27:16 can't be worse than where I'm at :/ Mar 20 20:27:22 my concern would be getting laid off Mar 20 20:27:43 when they're business idea doesn't do so well Mar 20 20:27:55 at a startup that is Mar 20 20:29:59 pro is they usually offer things like working whenever you want Mar 20 20:30:12 at least here Mar 20 20:30:54 well thats a perk of where I'm at. I can work from home like 3 days per week if I want Mar 20 20:31:20 as long as I get my 55 hours in, they're happy :p Mar 20 20:33:45 liefer: no clue, but it's doubtful you could rely on implementation details like that across the board Mar 20 20:33:55 some smartphones might work, others might not Mar 20 20:34:41 danijoo: do you have some snippet for a downloads? Mar 20 20:36:22 icemanbp, no Mar 20 20:36:29 but its a common task. just google it Mar 20 20:36:39 Any reason not to use picasso here? Mar 20 20:36:53 zzxx, he said he also needs to load sounds Mar 20 20:37:01 danijoo: yes yes, I already found it. Just to know if there's some best practise Mar 20 20:37:22 I still think you should ship them in the apk Mar 20 20:37:28 (thats best practive ;) ) Mar 20 20:37:42 I would like to replace the text at the "top bar" for an image instead, if anyone knows what I mean. How can it be achieved? Mar 20 20:37:46 zzxx: it's a game, where I've to display an image and play a sound. Mar 20 20:38:18 danijoo: I don't know, if for example I've to change just one image over 100, I've to make a release Mar 20 20:38:35 you wont change them weekly, will you Mar 20 20:38:41 danijoo: instead I can just download that single image from the server Mar 20 20:38:56 danijoo: I don't know how often I will change them Mar 20 20:39:10 danijoo: it's a "medical" game Mar 20 20:39:47 well, if you load them externally you lose a lot of the convenience like auto-selection based on screen DPI etc Mar 20 20:39:49 danijoo: so, maybe the doctor can upload sounds and images and then the application will download them Mar 20 20:39:53 if your app downloads every single image/sound while playing over and over again, it would be uninstalled immediatly on my phone. just saying Mar 20 20:40:33 I would not go that route unless it's absolutely necessary Mar 20 20:40:48 (or overengineer it before you know it's absolutely necessary) Mar 20 20:40:58 the first time the application have to download every images/sounds, then just check on the boot if something is changed Mar 20 20:41:32 so i download your game. and then im already annoyed because i cant play it immediatly Mar 20 20:41:47 for no reason Mar 20 20:41:57 I would take the simple approach, you can always load them externally later Mar 20 20:42:04 but also with apk it's "annoyed" :D Mar 20 20:42:05 if it turns out to be an issue Mar 20 20:42:10 icemanbp, no Mar 20 20:42:22 because thats part of the installation Mar 20 20:42:27 rather than trying to solve a possibly nonexistant issue beforehand Mar 20 20:42:34 ^ Mar 20 20:43:02 I don't know, I think that could be more flexible Mar 20 20:44:01 is it going to be a marketplace app? Seems like if it's just a matter of changing an image because you need to maybe change it at some point.. you can roll it out as an update like any other update Mar 20 20:44:32 it will, but also with a backend for statistics Mar 20 20:44:51 it's a sort of medical application, to learn speaking Mar 20 20:45:06 all you are doing is adding uneccessary complex algorithms for no gain Mar 20 20:45:17 if you want statistics, add an analytics library Mar 20 20:45:39 my point is you can always overthink stuff Mar 20 20:45:49 IME it's better to just build something and see what does and doesn't work Mar 20 20:46:03 Maurits-: what is IME? Mar 20 20:46:08 in my experience Mar 20 20:46:27 I created a CanvasWatchFaceService with a digital wear face layout Mar 20 20:46:27 oh, ok Mar 20 20:46:44 all these acronyms lol Mar 20 20:46:44 if you feel like image loading might be a big problem, you can always design it so you could easily load it externally Mar 20 20:46:58 ie, have some manager class which loads the drawables for you Mar 20 20:47:16 GoogleApiClient is connecting and correclty calling ResultCallback, but DataListener is never called Mar 20 20:48:12 both package names matches and the mobile app onResult is returning success Mar 20 20:48:13 don't underestimate the time it takes to get stuff like downloading data files right Mar 20 20:48:21 wht could be wrong? :’( Mar 20 20:48:25 if the platform does it for you, why not use it? Mar 20 20:48:29 sup guys Mar 20 20:50:06 Maurits-: because I feel that it will be better to have do it on your own Mar 20 20:50:17 maybe I've to develop also an IOS application Mar 20 20:50:30 maybe also a web game in angular Mar 20 20:50:31 yes, but it's easy to get bogged down in these details Mar 20 20:50:52 in the end you're building a game, not a downloader for data files Mar 20 20:50:56 or an analytics platform Mar 20 20:51:08 again, this is just my experience Mar 20 20:51:36 analytics platform is an important part of the system Mar 20 20:52:12 icemanbp, you didnt name a valid reason to do that yet. if you want analytics, use analytics. If you want to do updates, update the apk Mar 20 20:52:21 thats what every other app does - for reasons Mar 20 20:52:41 right, but if you're building this yourself, be realistic Mar 20 20:52:48 dynamic loading adds a huge amount of code and possible bugs. dont do that if you dont absolutly havce to imo Mar 20 20:53:10 about a feasible feature set Mar 20 20:53:43 it's very easy to say that you want an analytics dashboard, and external data files which are incrementally downloaded, and an angular app, and an ios app Mar 20 20:54:04 but keep in mind each of these will likely at least cost you a few hundred hours to build Mar 20 20:55:40 I've to think about, you guys told right things for sure, and thanks for these :) Mar 20 20:59:17 make the app as simple as possible. you can still implement this later if you absolutly need to Mar 20 21:10:38 hi, is it known to exist a stand-alone version of apkbuilder? I'm trying to compile a project with make instead of ant Mar 20 21:16:17 apkbuilder is zip Mar 20 21:16:45 and no, don't build with make Mar 20 21:19:14 why would you even want to Mar 20 21:19:26 unless it's all C/C+h Mar 20 21:20:09 in which case, calling ant from make is trivial and takes no time anyway Mar 20 21:23:14 I'm new to android, but I'm much more versed than gnu tools that I'd ever be with ant and java, so if it's possible and you could tell me where to start from, that would be appreciated Mar 20 21:24:04 documentation on going that path is nearly non-existant Mar 20 21:24:32 oh, but it just call zip then? Mar 20 21:25:43 pfn: ? Mar 20 21:28:04 >.> Mar 20 21:28:34 man so john carmack worked with samsung really hard to get it going decently at 60hz on the galaxy s7 to feel like a 90hz experience Mar 20 21:28:51 my guess is that partnership started when they were using galaxy s3 displays in their developer units Mar 20 21:29:20 not only that, but the viewing angle on the g5 is worse than the s7, because of the backlit Mar 20 21:29:44 so if one side of the phone is brighter or has more lightleak for whatever reason, that eye will be annoyed to view through Mar 20 21:30:40 my eyes are always annoyed when they look at something made by samsung :p Mar 20 21:31:04 so the samsungs use amoled, whcih every pixel is the same because of it Mar 20 21:31:11 super amoled or w/e Mar 20 21:31:33 so not onyl would the lighting look the same in vr, but its also been optomized for vr Mar 20 21:31:43 by john carmack himself =D and the engineers at samsung ofcourse Mar 20 21:31:56 somethign about 120hz camera updates, i didnt understand that Mar 20 21:32:04 like in game camera updates Mar 20 21:32:20 sort of like how games can render more than 60hz,even if the actualy monitor only is 60hz Mar 20 21:32:31 like, vsync off kinda situation Mar 20 21:32:34 who knows Mar 20 21:33:03 the game can write with more than the displays hz, but it wont make any difference Mar 20 21:44:26 guanche, going that approach is dumb Mar 20 21:50:02 why pfn, I want to do a small project, rather than waiting minutes for an ide to start, compile, ... Mar 20 21:50:17 lies Mar 20 21:50:27 ant takes seconds Mar 20 21:50:31 the android build system should be more open to other build systems Mar 20 21:50:34 sure Mar 20 21:50:37 and is as fast as make Mar 20 21:50:53 I'll solve this one on my own Mar 20 21:50:56 it's completely open to Mar 20 21:51:01 have fun Mar 20 21:51:02 bye Mar 20 21:51:06 hi, i don't know why but my onBindViewHolder only works for LinearLayouts but not for TextViews, it keeps setting the wrong colour but leaves the text and drawable fine, why? Mar 20 21:51:58 that is, when you scroll and the recyclerview recycles the view and the viewholder Mar 20 21:52:12 it recyclers only the TextViews colors apparently? Mar 20 21:52:22 your code is buggy. thats why Mar 20 21:52:34 Twirl, are you manually resetting everything? Mar 20 21:52:39 danijoo: and your comment doesn't add anything, thanks Mar 20 21:53:03 if it were completely open to there would no need to spend any time looking for the apk-builder tool, or learn java/ant to find out how it works Mar 20 21:53:15 konk3r: nope, it just works for the LinearLayout and the TextView setText but not for setTextColor... ? wtf Mar 20 21:53:33 Twirl: The view will be in the exact same state as the last time it was used Mar 20 21:53:39 You have to manually reset everything Mar 20 21:53:52 no i don't Mar 20 21:54:14 you mean re-set? as in set again? Mar 20 21:54:14 or some xml idiom crap for instance Mar 20 21:54:43 So how RecyclerView works is that it takes a view that has just gone off screen and gives it back to you, but it doesn't modify anything on it Mar 20 21:54:48 guanche you are talking nonsense Mar 20 21:54:51 konk3r: actually, it works for the LinearLayout but not the TextView, i don't know why and it's pretty weird Mar 20 21:54:52 So all values and subviews will be exactly the same as they were before Mar 20 21:55:10 konk3r: that doesn't make sense since it's working for everything except the TextView color Mar 20 21:55:30 If things are set properly when you get them back it means you're randomly getting back views that have been set the the right values before Mar 20 21:55:48 i'm setting the LinearLayout background Resource and the TextView text but it doesn't work for TextView setTextColor Mar 20 21:55:52 You're going to want to manually set everything to the exact state you want every time you bind it Mar 20 21:55:54 unless you've ever worked on embedded, you don't even know what I'm talking to g00s Mar 20 21:56:12 konk3r: alright, how Mar 20 21:56:14 guanche i have worked on embedded, you are talking nonsense :) Mar 20 21:56:33 guanche is just clueless Mar 20 21:56:40 ignore and carry on Mar 20 21:57:11 konk3r: ? Mar 20 21:57:54 sure you have Mar 20 21:58:02 I like to make a bind method in my ViewHolder classes that I call in onBindViewHolder Mar 20 21:58:15 konk3r: alright man please show me Mar 20 21:58:51 https://gist.github.com/konk3r/38ae70baf7d8b10cf229 Mar 20 21:59:35 guanche yep lots. z80, 68k, 68hc11, superH, 8051, gcc, greenhills, strongarm, i960 Mar 20 21:59:35 konk3r: mmh idk why but looks really similar to what i'm doing Mar 20 22:00:21 cpp, make with perl/bash? g00s Mar 20 22:00:34 https://gist.github.com/konk3r/96c63c2a4e3ded48e3f2 Mar 20 22:00:34 lets compare our dicks.. Mar 20 22:00:39 autoconf/automake? Mar 20 22:00:40 but any how android's build system is open, so i have no idea what you want Mar 20 22:01:07 should you have used them, you wouldn't be using ant anyways Mar 20 22:01:11 konk3r: it looks like mine but i'm going to try it Mar 20 22:01:32 konk3r: wait, where is textView ? Mar 20 22:01:38 konk3r: where did u get the reference Mar 20 22:01:43 is it a filed Mar 20 22:02:07 You need to pull it out in your constructor Mar 20 22:02:12 Let me update the gist Mar 20 22:02:31 i have the ViewHolder extends RecyclerView.ViewHolder Mar 20 22:03:13 dragorn i saw a snowflake :) Mar 20 22:03:22 nor the gradle crap, nor you'd define items on a layout on an xml file but in the same source file, etc. Mar 20 22:03:53 i can't parse anything you are saying, sorry. if you are doing an android app, use gradle and java Mar 20 22:04:34 Twirl, updated it for you: https://gist.github.com/konk3r/96c63c2a4e3ded48e3f2 Mar 20 22:05:06 konk3r: yea i'm doing the same Mar 20 22:06:08 konk3r: alright let me try Mar 20 22:06:16 So how RecyclerView works is every time it needs another view it checks to see if there's one waiting in the pool. If there's not, it creates a new one from scratch. Whenever a view goes off the screen, it gets put into the view pool. Mar 20 22:06:35 It's super efficient because it literally does no extra work, it gives you the view exactly how it was when it left the screen Mar 20 22:07:11 konk3r: it's doing the same Mar 20 22:07:33 What exactly is displaying wrong? Mar 20 22:07:45 Post a gist of your ViewHolder class Mar 20 22:07:48 everything works except changing the color man Mar 20 22:07:50 its like yours Mar 20 22:07:59 it keeps changing the color every time i scroll Mar 20 22:08:07 Post it so I can see exactly what's happening Mar 20 22:08:09 as if it was getting the wrong position Mar 20 22:08:19 but only for the color which is extremely weird Mar 20 22:08:29 I can't help unless I can see what's going on Mar 20 22:08:46 Where are you setting the color? Mar 20 22:09:07 in the exact same place i'm setting the other properties Mar 20 22:09:30 for example i have some rows with different background color Mar 20 22:09:34 so i'm changing the drawable Mar 20 22:09:47 and it works, but it doesn't work for the text color Mar 20 22:09:49 Post you're code, there's something happening there but I can't help if I can't see it Mar 20 22:09:51 your* Mar 20 22:10:15 it's extremely weird trust me, maybe because i've set a style to the element Mar 20 22:10:22 Twirl is a pro at not showing code while asking for help Mar 20 22:10:43 it's exactly the same i copy pasted the gist Mar 20 22:10:51 yeah dont waste your time .. Mar 20 22:11:22 Alright man, if you won't paste it I'm done. I'm more than happy to help if you do Mar 20 22:13:31 hello all. I have an app I'm doing in Qt using the NDK Mar 20 22:13:45 aww qt is still a thing? nice ... Mar 20 22:13:49 It deploys as a shared object which is then wrapped with JNI Mar 20 22:13:51 konk3r: http://pastebin.com/raw/iz60aNAQ Mar 20 22:14:06 Because it's a shared object I can't strip the symbols Mar 20 22:14:24 Twirl: You'll need to set the TextColor in the firs tpart Mar 20 22:14:27 Twirl, the very first line of your bind method already makes the viewholder worthless Mar 20 22:14:29 I was wondering if there was anyone else using the NDK that found a good way to send out a release build with either no symbols available or obfuscated ones? Mar 20 22:14:41 @bankai - oh yeah, Qt isn't going anywhere :-p Mar 20 22:14:41 its sole purpose of existance is that you dont findViewById Mar 20 22:15:02 also comparing strings only works with equals Mar 20 22:15:09 not with == or != Mar 20 22:15:21 Twirl, I can explain it: A view gets passed in where item.text.equals("potato"), the color gets changed to red Mar 20 22:15:32 why would you even want to obfuscate a. qt app, no one wants to reverse that crap :p Mar 20 22:15:53 As you scroll, it gives that view back to you and binds it to a model that doesn't have text == "potato", however the text has already been set to red Mar 20 22:16:00 Because it's giving you an old view you already changed the color on Mar 20 22:16:19 alright, here it is http://pastebin.com/raw/2AmZKmqY Mar 20 22:16:21 still the same Mar 20 22:16:36 Twirl ^^ Just explained it Mar 20 22:17:13 konk3r: that doesn't explain why it only works for the text color, but it works for the layout Mar 20 22:17:18 konk3r: or the actual text Mar 20 22:17:22 https://gist.github.com/konk3r/01d8b0c6a2557cec8477 Mar 20 22:17:42 Twirl: Because the text is set no matter what the value is. Mar 20 22:17:51 And the background Resource gets changed under both statements Mar 20 22:18:02 oh Mar 20 22:18:03 It's literally recycling a view where you already set the color to red Mar 20 22:18:04 lets try Mar 20 22:18:04 :) Mar 20 22:18:21 It doesn't manually change anything for you Mar 20 22:18:41 oh i got it now Mar 20 22:18:48 it's using the same view Mar 20 22:19:10 yea it works now, thanks man Mar 20 22:19:39 Thanks for your helpful opinion on the matter @pfn. I'm sure that if you personally can't think of a reason for someone to do something there probably isn't a good one. Mar 20 22:19:56 konk3r: the only thing that was only changed sometimes was the color Mar 20 22:20:07 konk3r: ty for explaining it, what a relief Mar 20 22:20:16 Twirl: Yup, because everything else was being set every time Mar 20 22:20:21 yea Mar 20 22:20:25 No problem Mar 20 22:21:46 ShinyObjects, I just have no respect for crap Mar 20 22:28:39 @pfn - I'm grateful to have been graced with your helpful wisdom. Having that instead of a solution for my problem is so much more gratifying. You've made my day. Mar 20 22:28:42 konk3r lol Twirl still protecting top secret code Mar 20 22:28:49 oops sorry konk3r Mar 20 22:29:05 Haha at least he gave enough for me to pinpoint the issue Mar 20 22:29:11 if u see my code i would have to kill you Mar 20 22:29:43 i guess id have to kill myself after seeing it :p Mar 20 22:29:43 ShinyObjects, obfuscation is what you do on your own Mar 20 22:29:45 "i have a problem" "ok lets see the code" "no i've told you enough" ok, /ignore Mar 20 22:35:13 pfn: you should probably limit your advice to something you know about. You're pretty astonishingly ignorant on the purpose behind and ramifications of obfuscating a symbol table. Mar 20 22:35:33 yep, ignorant Mar 20 22:35:50 ignorant of the crap that you want to put out Mar 20 22:35:51 Quoting you: "why would you even want to obfuscate a. qt app, no one wants to reverse that crap :p" Mar 20 22:36:31 I'll tell you why. Because it's privacy/encryption software and highly paid people reverse engineer encryption software all the time for personal gain Mar 20 22:36:56 Another good reason could be things like protecting my intellectual property which is worth a great deal of money to the right people. Mar 20 22:37:15 Were either of those such a gigantic leap of the imagination that you physically could not arrrive at them yourself? Mar 20 22:37:52 konk3r a while back, you shared a gist with me https://gist.github.com/konk3r/dd01afcacec51b15ab92 Mar 20 22:38:09 Did you find a problem with it? Mar 20 22:38:46 konk3r now i thought somewhere in the support lib, there was some nifty little class that prevented flicker between the progress animation and the content loading, it held it there for some minimum amount of time, do you recall that class ? Mar 20 22:38:50 yep, I can't imagine you writing anything worth anything to anyone Mar 20 22:39:42 konk3r i remember reading at the time, hm this is weird. i think it guaranteed the spinner was up for 500ms or something Mar 20 22:40:33 as for encryption software, security by obscurity is fallacy Mar 20 22:40:34 Hmm, I'm not sure. So basically it forced a spinner to display for a set amount of time so users could see the content was loading? Mar 20 22:41:03 konk3r lol yeah Mar 20 22:41:05 And as for absolutes, they should be used in moderation Mar 20 22:42:06 Seriously though there are very good methods of encryption, all well known and open source and secure because they rely on mathematics, not encryption Mar 20 22:42:07 It's a matter of common sense that you need to apply astronomically more effort to reverse engineer code with symbols named afdguhy35h4w89h54445hg9 than ones named "aes_encrypt" Mar 20 22:42:22 I mean obfuscation as the last word obviously Mar 20 22:42:28 @Cedric I know what you meant to say (mathematics, not obfuscation) Mar 20 22:42:39 And the crypto layer of this app uses many of those open source frameworks Mar 20 22:42:41 cryptopp, etc Mar 20 22:43:20 its hard to trust any crypto / security thing if its not open source and can be audited Mar 20 22:43:31 "its secure, trust us" :) Mar 20 22:43:31 It uses proven mathematical methods and libraries for that, and uses them in a novel way. That novelty is worth protecting so it would be unwise to offer up a symbol table to anyone that wanted to reverse engineer it Mar 20 22:43:51 And pfn: your password is security through obscurity Mar 20 22:44:09 it would be better if it was open source, and still couldn't be broken with everything in plain sight ;) Mar 20 22:44:48 Technically ALL encryption is security through obscurity since you're relying on the other parties just not knowing your secret (password, keyfile, etc) Mar 20 22:44:56 false, a secret is not obscured Mar 20 22:45:01 It's just very very complicated and well put together obscurity Mar 20 22:45:26 @g00s there are reasons this project can't be open sourced that are out of my hands. Mar 20 22:46:45 To say security by obscurity cannot be trusted or relied upon is completely and indisputably true. Mar 20 22:46:50 konk3r aha !!! Mar 20 22:46:52 http://developer.android.com/reference/android/support/v4/widget/ContentLoadingProgressBar.html Mar 20 22:46:56 To say that it is never useful is completely wrong Mar 20 22:47:10 what's with all the '@' ... feels like twitter in here. are we going to start 'hashtagging' too? ;) Mar 20 22:47:10 man. Mar 20 22:47:19 Anyone trying to get your secrets has a finite amount of man-power, time, money, etc to do it in Mar 20 22:47:42 g00s that's awesome Mar 20 22:48:07 if obfuscation is an essential part of your security, you're doing it wrong Mar 20 22:48:11 An obscurity layer, applied as a compliment to (not replacement of) good solid crypto doesn't hurt anything and could be the difference between your opponents having the time and resources to break it or not Mar 20 22:48:41 You're not listening at all Pfn. Did I tell you it's an essential part of my security? Mar 20 22:48:42 No Mar 20 22:48:57 I simply said it's useful and it would be negligent of me not to apply it Mar 20 22:49:10 You'e really determined not to understand a damn thing I'm saying aren't you? Mar 20 22:49:12 yes, you basically said so as your original premise Mar 20 22:49:15 Ok let's stop with the obfuscation discussion. Mar 20 22:56:10 Sounds good @Cedric. It wasn't particularly productive anyway. Just resulting in frustration. Mar 20 22:56:36 learn2tab Mar 20 22:57:09 His name has an @ symbol in it. You're aware of that, right? Mar 20 22:57:47 * pfn lols Mar 20 22:58:07 Maybe I should more specifically say learn2irc Mar 20 22:58:18 hah Mar 20 22:59:25 Listen pfn - I don't want to keep you from whatever you're doing that's so important. I applaud your prioritization skills for recognizing it'd be more productive use of your time to spout ignorant nonsense and attempt to belittle a stranger than whatever rocket science you're saving the world with. Mar 20 23:00:02 salt is real Mar 20 23:02:09 just on the off-chance... Mar 20 23:02:48 ShinyObjects: the @ sign next to CedricBeust's name means that he's a channel operator - he's the boss in here. it's not part of his name Mar 20 23:03:05 pfn do you proguard Mar 20 23:03:24 missingno, yes, but -dontobfuscate Mar 20 23:03:43 and only for release. builds due to code size issues Mar 20 23:04:00 guys does #android-root actually have any life to it Mar 20 23:04:13 Thanks Leeds, I'll remember that Mar 20 23:10:19 missingno: judging by how many people come in here and ask, i'd say no Mar 20 23:11:50 meh, need to buy some ptfe tubing Mar 20 23:12:43 Can someone confirm if I'm on the right path here? I'm trying to prep data for a recycler view. Each item has a category, I want to sort the items by category and preface each of them with a header item Mar 20 23:13:38 I was thinking I could use GroupBy to sort them up, add a startWith() on each group to prefix the key as a header, and then use some form of switch to merge them back together Mar 20 23:15:16 the names on the offshore team are interesting Mar 20 23:15:31 Anniegracechristina Mar 20 23:15:37 not even joking, thats a first name Mar 20 23:20:49 is ContextThemeWrapper's sole purpose in life to get around the styling system's lameness? Mar 20 23:28:12 It looks like groupBy only works if the items are already sorted Mar 20 23:28:20 Or am I completely misunderstanding that? Mar 20 23:29:48 Nevermind it worked fine, I must not have waited for the app to update again Mar 20 23:34:18 missingno, that's one way to put it Mar 20 23:37:05 the styling system isn't lame though Mar 20 23:37:38 I am having the gnarliest time styling timepickerdialogs Mar 20 23:38:32 g00s, it's going to miss us Mar 20 23:38:35 maybe I shoult override alertDialogTheme, it makes the dialog background black for some reason... Mar 20 23:38:41 *shouldn't Mar 20 23:38:42 g00s, we were supposed to get a foot, but now, nothing Mar 20 23:54:49 is it dumb that I want mixins for style xml? Mar 20 23:54:58 I am tempted to write a gradle plugin or something Mar 20 23:55:43 when are attrbiutes resolved when you define a style? Mar 20 23:55:51 like I have a ?attr/colorPrimary Mar 20 23:56:09 and it uses the default platform colorPrimary and not my theme's colorPrimary Mar 21 00:26:06 gdi AssetManager is native Mar 21 00:27:39 "The secret "adb hell" command was removed", eh don't think so - i live adb hell every day :D Mar 21 01:01:21 gross, so if you want to add menu item to NavigationView programatically, using getMenu().add(...) ... you have to iterate through the child views of NavigationView until you find a ListView ... and the call notifyDatasetChanged.. Mar 21 01:07:34 g00s: hacky, but this works instad. Mar 21 01:07:57 g00s: navigationView.setItemTextColor(navigationView.getItemTextColor()); Mar 21 01:08:14 w Mar 21 01:08:15 u Mar 21 01:08:15 t Mar 21 01:08:24 lol wat!? Mar 21 01:08:29 g00s: same goes for other properties of the navView.. it calls updateMenuView() on the presenter Mar 21 01:08:39 they just dont register for changes to the Menu Mar 21 01:08:48 i dont think Menu actually supports that Mar 21 01:08:54 they should have added something like 'refresh()' or whatever Mar 21 01:09:29 another way Mar 21 01:10:31 ((MenuBuilder)navigationView.getMenu()).onItemsChanged(true); Mar 21 01:12:09 g00s: infact, you might be able to pass false as the param Mar 21 01:12:21 na, i wouldnt bother Mar 21 01:14:11 theming dialogs is super irritating Mar 21 01:14:36 maybe I should ignore Theme.AppCompat.Light.Dialog and just use the app theme as a parent Mar 21 01:25:12 How can I stop my FAB from sticking on screen? I want to scroll it away. Here's my layout: https://gist.github.com/anonymous/6d957311e98de53f8a30 Mar 21 01:26:12 IDK what I'm doing. Mar 21 01:26:25 Bcadren me neither ... Mar 21 01:30:18 mActivity.startActivityForResult(intent, 210); Mar 21 01:36:49 * Bcadren yawns Mar 21 01:56:15 theming dialogs isn't very difficult, pass a theme to the constructor and you're practically done Mar 21 02:30:29 hm, i set a NavigationView elevation to 0 and still get a shadow Mar 21 02:33:00 a n d r o i d Mar 21 02:38:22 lol - yeah i always had it in a NavigationDrawer , and never noticed it ... Mar 21 02:38:40 but i just plopped it in the middle of a plain layout and it has this damn shadow **** ENDING LOGGING AT Mon Mar 21 02:59:58 2016