**** BEGIN LOGGING AT Tue Nov 17 02:59:58 2015 Nov 17 02:59:59 Yea this is for child views inside the items in the RV, but the same idea applies for deciding what should handle what. Nov 17 03:00:20 Actually, hmm, that method does pass the clicked View. You could probably check the View's type and then act. Though it does feel a little hacky. Nov 17 03:00:26 Oh, yeah, and he's using RecyclerView. :D Nov 17 03:00:51 forget about OnItemCLicked and use OnClick Nov 17 03:01:00 but pass the onclick events to Foo Nov 17 03:01:19 ugh, and sources for 1.5.0 haven't been updated in aosp Nov 17 03:01:20 fml Nov 17 03:01:27 trhey're updated on central, of course Nov 17 03:01:44 guys, can I want to use Play services 8.3 but emulator is outdated Nov 17 03:01:56 damn .. ignore the typos Nov 17 03:01:57 use a real device Nov 17 03:02:00 you don't want to have the internal wiring of the adapter leak out into your activity or whatever, just knowing that a high level action was performed should be enough Nov 17 03:02:16 Don’t have one with 8.3 services Nov 17 03:02:21 eg. this Foo was selected, or that Barr was deleted Nov 17 03:03:50 if you add an interface, it's also really easy to know what to expect from the list Nov 17 03:04:12 if all the methods are defined, then you don't have to rememeber which ids to check...blah... blah Nov 17 03:12:33 orbyt_, TacticalJoke, I knocked this up to better explain. https://gist.github.com/alex-richards/66142bede4ec1c155c9a Nov 17 03:14:02 here the activity has no idea what the adapter's doing, it just knows that it has to do something when someone selects a foo Nov 17 03:14:42 the adapter could change to onitemselected, or more onclick or just call them all straight away Nov 17 03:14:48 the activity doesn't need to know Nov 17 03:15:09 Yeah, I just thought orbyt_ was talking about how much responsibility the adapter should have. For example, there are many cases (in general) where the adapter doesn't even need to say `listener.onFooSelected(foo)` and could handle stuff itself. Nov 17 03:15:18 I used to think the adapter should do it all, but I'm not so sure anymore. Nov 17 03:15:45 what stuff? Nov 17 03:15:51 I mean "I used to think the activity should do it all". Nov 17 03:16:31 An example is responding to a click by updating the data set. There are cases where the adapter could do that without the activity getting involved. Nov 17 03:16:35 the adapter shouldn't really be in charge of anything other than presenting the data it's given and telling someone else when an interaction happens, I think Nov 17 03:18:25 if you logic is decided too close to the view, it makes reusing views harder Nov 17 03:19:09 The problem I have with that approach is you get this ping-pong code where the adapter asks the activity to handle a click, the activity mutates the data set, and then the activity says `adapter.notifyDataSetChanged();` or whatever, and it's kinda spaghetti-like. Nov 17 03:19:42 the activity doesn't have to be an activity though Nov 17 03:20:05 g00s, so, where do the rendered . vectors go. by default in 1.5? Nov 17 03:20:11 make it a compound view or somthing and keep it all in one place Nov 17 03:22:10 for example, what if you have an activity on a phone that starts a new activity on a click and just replaces a fragment on a tablet Nov 17 03:22:26 do you pass thousands of booleans into your adapter to tell it how to behave? Nov 17 03:22:56 I don't see how that relates to what I said. :s Nov 17 03:23:17 I'm talking about cases where the click event just mutates the data set (which the adapter already has). Why should the adapter call out to a listener there? Nov 17 03:23:50 Probably the best argument I've heard against this is the one orbyt_ mentioned above: the name "adapter", which suggests only adapting data for Views. Nov 17 03:23:51 suppose that depends on where your data set comes from Nov 17 03:24:13 do you want an adapter doing sql? Nov 17 03:24:23 does anyone else need to know that the data set changed? Nov 17 03:24:39 how do you handle errors? Nov 17 03:25:13 anyway, I've got to go Nov 17 03:29:23 I guess my point could be summarised in a question: If, in an Activity (for example), we have code like `dataSet.mutate(); adapter.notifyDataSetChanged();`, should we instead say `adapter.mutateDataSet();`? Nov 17 03:29:44 Though there may not be an answer. Nov 17 03:31:29 Anyone have an issue with getting Android studio to see a Nexus 5x connected with usb? Nov 17 03:31:53 It doesn't like someting an "adapter" should do, but at the end of the day there is nothing stopping the adapter from doing this (unless we've given the adapter a read-only view of the data set). Nov 17 03:32:03 And doing this can lead to way-simpler code. Nov 17 03:34:01 cmendes0101: Isn't your real question something like "How can I get adb to see my Nexus 5X?"? Nov 17 03:36:35 I'm guessing you have to use the Google USB driver for the Nexus 5. Nov 17 03:36:38 5X* Nov 17 03:37:04 I was lucky with the Moto E2: it was just plug-and-play. Nov 17 03:37:13 And with all my Sonys. Nov 17 03:37:46 Yes I was thinking that after I hit enter but didn't redo the question Nov 17 03:38:37 Though this guy says "just change a setting": http://stackoverflow.com/questions/33489286/nexus-5x-not-showing-up-in-adb-on-win7 Nov 17 03:38:55 Oh, wait, the OP talked about the USB drivers. Nov 17 03:39:26 I'm actually on a mac but I did try playing with some settings that I could Nov 17 03:41:12 Got some dinner, I see you all got down and dirty with my question. Thanks for the gist alex_PP Nov 17 03:41:44 oh crap.. I didn't have the developers usb debugging on. That was it Nov 17 03:43:20 I had reset the device after turning that on so thought it was on the whole time. Too bad it didn't fixed the Android file transfer tool keep saying screen is locked Nov 17 03:56:05 ugh, I can't figure out where builder 1.5.0 is handling packaging options Nov 17 04:57:20 pfn i'm trying to remember how i did this Nov 17 04:57:30 i have an svg in res/drawable .... Nov 17 04:57:44 but there was some critical step O.o Nov 17 04:57:52 i may have to import it with AS first Nov 17 04:58:00 hey alex_PP ... around ? Nov 17 04:59:58 interesting. i tried to create a new vector drawable from a local SVG, OS X previewed it correctly but AS barfed Nov 17 05:01:23 bah "Exception while parsing XML file" whatever. Nov 17 05:01:54 i'll just keep using my python script, no confidence this will be working well soon Nov 17 05:04:28 Do we have any book which can help me to learn to make app with user sign in etc features? Maybe app engine and android Nov 17 05:05:47 Hardly any docs for app engine Nov 17 05:06:17 though i think firebase has a user system and you can integrate that with GCP Nov 17 05:07:45 I am thinking of not using firebase or parse Nov 17 05:10:12 You know that Google owns firebase and even they're own app engine docs have tutorials for using firebase right? Nov 17 05:10:19 their* Nov 17 05:10:56 orbyt_: a link pls. :) Nov 17 05:24:40 g00s: am now Nov 17 05:25:04 alex_PP_ have you used SVGs with gradle-plugin 1.5 / AS 1.4 Nov 17 05:25:09 not yet Nov 17 05:25:27 damn good idea though Nov 17 05:25:44 i exported a basic stuff from affinity designer, and it wouldn't handle it (parse error) Nov 17 05:25:57 i assume it just merges android asset studio with aapt(?) Nov 17 05:26:03 the correct way to do this would be for AS / gradle to allow a pluggable rasterizer Nov 17 05:26:12 i think they used apache batik, which is hmm Nov 17 05:27:02 run your avgs through something else? svgs almost always have a load of extra gumph added Nov 17 05:27:36 the file is like 3 lines long :D Nov 17 05:28:00 simple paths and group - oh, maybe they don't support group Nov 17 05:28:31 i wonder how cyril mottier is using AD, its been kinda pita for me Nov 17 05:29:17 I wonder how many Kotlin betas there'll be. Nov 17 05:31:05 alex_PP_ did you say you were using AD also ? Nov 17 05:31:15 g00s, you know it's not svg but VectorDrawable that it processes, right? Nov 17 05:31:25 pfn AS imports the svg Nov 17 05:31:35 yeah gradle can't handle it by itself Nov 17 05:32:05 so it imports svg and creates a vector drawable? Nov 17 05:32:14 i think it creates pngs Nov 17 05:32:25 huh? no Nov 17 05:32:27 but .. i was never able to get it to parse the svg Nov 17 05:32:31 that's not how it works Nov 17 05:32:40 yeah i think they added a png generator to autosize svg input Nov 17 05:32:46 it reads VectorDrawable Nov 17 05:32:48 not. svf Nov 17 05:32:50 svg Nov 17 05:32:57 pfn AS reads SVG Nov 17 05:33:14 not the gradle stuff Nov 17 05:33:37 "We are also excited to offer backwards compatibility for your vector assets in Android Studio 1.4. Once you have a vectorDrawable image in your res/drawable, the Gradle plugin will automatically generate raster PNG images for API level 20 and below during build time." Nov 17 05:33:41 http://android-developers.blogspot.com/2015/09/android-studio-14.html Nov 17 05:33:56 yeah, that guy is funny :D Nov 17 05:34:11 exactly, a VectorDrawable Nov 17 05:34:17 uh, watch the video Nov 17 05:34:20 which is generated from svg. Nov 17 05:35:36 that's all part of the 'feed it a svg' workflow Nov 17 05:35:45 nom Nov 17 05:35:51 "feed me a stray cat" Nov 17 05:35:52 (barf) Nov 17 05:36:04 https://media4.giphy.com/media/oy0f1mbtVRiUw/200_s.gif Nov 17 05:36:34 dragorn i'd be rich around here ... Nov 17 05:37:05 i bet the local avians programmed that in Nov 17 05:38:47 I want persistent search options, where should I put them? Nov 17 05:39:07 I was thinking a navigation drawer Nov 17 05:39:27 usually search lives in the action bar Nov 17 05:39:32 g00s, no I said I wanted AD & AP Nov 17 05:39:36 off again, byes Nov 17 05:39:45 alex_PP_ see ya Nov 17 05:41:21 dragorn: well this is a button that updates a mapactivity from search results, so I want to be able to filter some things based on what the user wants Nov 17 05:43:48 g00s, don't care what the video says, gradle only processes VectorDrawable Nov 17 05:44:27 5 -- pfn AS imports the svg Nov 17 05:44:27 -- 00:31:35 -- yeah gradle can't handle it by itself Nov 17 05:45:22 sure, but the conversion must be to VectorDrawable Nov 17 05:45:35 which gradle will then process as necessary Nov 17 05:46:00 when i imported an SVG from inkscape, it put PNGs in all my res/drawable-xx folders ... Nov 17 05:46:07 i really dont know, i'll wait until 1.5.0 Nov 17 05:46:43 so in that case AS did not convert the svg to vectorDrawable Nov 17 05:47:34 pfn remember a few weeks ago, i was confused that all these pngs were in my res/drawable folders ... Nov 17 05:47:38 that was from AS Nov 17 05:47:57 i was expecting something in build/generated/ or something Nov 17 05:51:35 right, the gradle support is only to backport / convert. VectorDrawable to png Nov 17 05:51:41 for I'm not interested in what as does Nov 17 05:52:28 I'm only implementing what is in builder Nov 17 05:52:36 i was hoping the gradle plugin would just handle the svg itself Nov 17 05:53:02 nope, it's a VectorDrawable compatibility port Nov 17 05:53:25 I still don't understand why they took out packagingOptions in builder 1.5.0 Nov 17 05:53:46 and aosp isn't updated... Nov 17 06:00:06 https://android.googlesource.com/platform/tools/base/+log/master/build-system/builder/src/main/java/com/android/builder/AndroidBuilder.java Nov 17 06:00:08 fml Nov 17 06:01:52 https://android.googlesource.com/platform/tools/base/+log/master/build-system/builder/src/main/java/com/android/builder/core/AndroidBuilder.java Nov 17 06:02:00 still, 4 Mos. old Nov 17 06:10:44 anyone use reddit sync Nov 17 06:12:53 I don't, but I wonder why you ask. Nov 17 06:13:43 Well when you click on a card with an image/gif link it loads it in a sort of theater mode. Was wondering how they might be doing that. Nov 17 06:14:09 Im gonna guess its another activity with a slightly transparent background, but i dunno Nov 17 06:14:29 actually i can grab a screenie if you want Nov 17 06:18:54 lol http://i.imgur.com/VPkvdOi.gifv Nov 17 06:19:02 I think I've seen it. I think it's an activity with a transparent background, but not sure. Nov 17 06:19:49 Look at this little guy: http://i.imgur.com/aNkuKLD.jpg Nov 17 06:19:56 Guess he or she is a Boston Terrier. Nov 17 06:20:35 poor dudes eyes gonna pop out of their sockets Nov 17 06:20:53 Yeah, that's one thing that concerns me about Bostons. They might not hold up in a fight. Nov 17 06:23:57 TacticalJoke when i look at some gapps (photos) via hierarchy viewer, there are like 10 nested FrameLayouts ... Nov 17 06:24:06 i wonder if the tool is confused Nov 17 06:24:33 How many do you get on a blank activity? I think that's like three or something. Nov 17 06:25:08 hm not sure, but yeah DrawerLayout is already quite far down, but the FLs were under it Nov 17 06:32:50 gah FF 42 is a trainwreck Nov 17 06:34:31 Hi guys, I have a single string that reads ax:-187,ay:-21,az:1063, gx:-2013,gy:1220,gz:-152 and I want just the numerical values (positive or negative) in six integer variables ax, ay, az, gx, gy, gz, can I do that with some kind of string function? Nov 17 06:34:31 Don't know if this makes a different but it is in an android app, thanks! Nov 17 06:35:32 if the string seperators are always static, just parse using delimiters based on known format Nov 17 06:35:34 eschur so you need to extract the numbers from the string ? Nov 17 06:36:11 yes exactly like for the ones that say ax I want an integer variable ax that equals -187 and so on Nov 17 06:36:15 six ints Nov 17 06:43:03 g00s: What's wrong with Firefox 42? Nov 17 06:43:26 on OSX i found if you full-screen it and then quit, you can't restart it Nov 17 06:44:31 meanwhile Quiver 3 is out, i love that app - keep all my android code snippets in there Nov 17 06:44:33 I used to be crazy about Firefox. Nov 17 06:44:42 I spent years on their bug tracker. Nov 17 06:45:00 Hi I have a query about debugging native heap memory Nov 17 06:45:12 I followed the guidelines at http://bricolsoftconsulting.com/how-to-enable-native-heap-tracking-in-ddms/ Nov 17 06:45:36 I successfully rooted as well as extracted the libc_malloc_debug_leak.so and libc_malloc_debug_qemu.so from the ROM Nov 17 06:45:52 placed in /system/lib/ directory on my rooted device Nov 17 06:45:56 eschur: You could also use regexes. Nov 17 06:46:34 now when I start my ddms for debugging purpose, dlopen fails with following reason Nov 17 06:46:50 dlopen failed: cannot locate symbol "getpagesize" referenced by "libc_malloc_debug_leak.so" Nov 17 06:47:12 can anybody help me to get things correct.. Nov 17 06:50:36 the_hulk thats pretty advanced; if you are lucky perhaps mavrik can help you but he's not here now Nov 17 06:54:02 g00s: I get that....in between is there any other way that I can run memory leak checks on my ndk code..... Nov 17 06:54:57 the_hulk haven't used the ndk, sorry Nov 17 06:55:29 alright, np Nov 17 07:37:32 Hi, I have an android studio project with two modules, and I want one one of the modules to access integer variables from the other Nov 17 07:37:44 Do you know how to do that? Should I use some kind of import statement? Nov 17 07:49:45 eschur: Just add the module as a dependency, and you should be able to call a getter method if its defined in the previous module. Nov 17 08:08:32 Hi! I need a little help. I have the text of the Google sign in button, com.google.android.gms.R.string.common_signin_button_text, but I want to get that text based on the locale chosen by the user inside the app, not the main one on the phone. Any ideas? Nov 17 08:09:45 a getter method? Nov 17 08:10:03 I have an android application that calls a game that is built as a library module Nov 17 08:10:19 How do I write variable values to variables that are in the game that is built as a library module? Nov 17 08:10:33 like there is a spaceship I want to control using the application's variables Nov 17 08:14:42 was "a getter method?" for me, eschur? Nov 17 08:30:01 Hello Nov 17 08:30:22 I want to create a material design app using NavigationDrawer and Activities Nov 17 08:30:40 How can i include the same NavigationDrawer in all the activities? Nov 17 08:30:56 I don't want to use fragments. Nov 17 08:31:07 add it to the activities Nov 17 08:32:05 activities are the root Nov 17 08:32:37 canvs2321: Ah ok, i think i get it Nov 17 08:33:48 you can pass data to new activities to pass to your navigation on the newly loaded activities. otherwise activities are the base of all screen activity Nov 17 08:34:18 yeah, i know that i can send some objects to another activity Nov 17 08:34:36 just know that there isn't something on top of activity Nov 17 08:35:36 what about fragments, I've just realized that since Toolbar exists there might be no reason for using Activities with NavigationDrawer, am I right? Nov 17 08:35:53 fragments need activity Nov 17 08:36:03 activity is the lowest Nov 17 08:36:14 yeah i know Nov 17 08:36:29 are you sure? Nov 17 08:36:44 [03:35] what about fragments, I've just realized that si........ Nov 17 08:37:00 but i mean using these fragments inside the main activity Nov 17 08:37:18 just for the navigationdrawer Nov 17 08:37:22 you always need an activity, then you branch off Nov 17 08:37:43 yeah i know, i'll test both of these solutions Nov 17 08:37:50 quit saying you know Nov 17 08:38:01 that means you don't need to ask questions Nov 17 08:38:37 not really, you helped me actually ;) Nov 17 08:39:12 quit saying he dont know Nov 17 08:39:20 he asks one question, you comment on an entirely different one Nov 17 08:39:36 yeah i know Nov 17 08:39:52 dumbass Nov 17 08:40:16 it's Dumass Nov 17 08:41:34 ... Nov 17 08:41:51 don't worry, liefer is a troll Nov 17 08:42:06 :D Nov 17 08:43:24 Is it a good idea to place toolbars in these fragments? Nov 17 08:43:54 I guess you could, but toolbars are really meant to be used in activities. Nov 17 08:44:02 fragments shouldn't be the life of an activity Nov 17 08:45:13 can use interfaces with fragments that activities implement. fragments should just be extensions that activities can gather data from Nov 17 08:45:24 Hmm okay Nov 17 08:46:19 So NavigationDrawer + different Activities for every page are a better way if i wsnt to replace toolbars right? Nov 17 08:46:28 if a want* Nov 17 08:46:38 if i*... Nov 17 08:47:22 fragments shouldn't dictate anything passed just giving value to data presented to the fragment. keep the fragment singular and have it pass off operations to whomever wants to use that fragment Nov 17 08:48:09 Oh okay :) Nov 17 08:48:15 mRokita, hmm, that might look funny due to animation transitions Nov 17 08:48:32 and you'll have to duplicate the navigation bar in each... I'd probably go with the fragment approach anyway Nov 17 08:48:49 We just never really tested what happens if you're manually hosting Toolbar in a fragment Nov 17 08:48:59 Or just avoid using fragments whenever possible, and save yourself the headache of aligning and sync'ing the mess that is fragment lifecycle with your activity lifecycle Nov 17 08:49:04 use custom views instead Nov 17 08:49:08 nice Nov 17 08:50:22 Okay, I'll use Fragments :) Nov 17 08:51:04 Mavrik: Yeah, it looks a bit weird in the Google I/O app Nov 17 08:52:13 why you wanna trust a guy who was just belittling you i have no idea. Masochism is a thing i guess. Oh well, i'll help you when you realize fragments are a PITA and come back here Nov 17 08:52:42 liefer, shush Nov 17 08:52:50 no Nov 17 08:53:01 such a troll Nov 17 08:53:19 Sure, but at least im not a newbie who doesnt understand basic communication :) Nov 17 08:54:30 :D you made me confused, liefer Nov 17 08:54:46 that's what trolls do, but for fun, have him explain Nov 17 08:55:42 mRokita, I'd advise against listening to canvs2321- too much ;) Nov 17 08:56:01 ;D Nov 17 08:56:21 then complete the advocation of non-fragment use, and using a custom view with sooo much extra code Nov 17 08:56:55 no extra code Nov 17 08:57:01 show it Nov 17 08:57:59 As long as you stay with support-v4 fragments and don't use child fragments it's ok. Nov 17 08:58:15 .... that isn't custom view Nov 17 08:58:18 that is fragments Nov 17 08:58:40 Mavrik show the example of NOT using fragments Nov 17 08:59:11 I'm not sure when we signed the contract of me being beholden to you for anything. Nov 17 08:59:29 There's enough examples on the internet, use your brain and choose what fits your use case. Nov 17 08:59:30 when you said don't listen to me for saying use fragments Nov 17 08:59:34 you fool Nov 17 08:59:46 Obviously some of the android api's require you to use fragments. In those cases, you have no choice. But dont go out of your way turning stuff into fragments when 99% of the time, a custom view is much faster to make initially, as well as being more maintainable Nov 17 09:00:06 liefer, my goodness, show your example of custom view Nov 17 09:00:31 go try for yourself, i wont waste my time proving myself to a random person on the internet i really dont care about :) Nov 17 09:00:38 hahah, exactly Nov 17 09:00:44 yes, exactly. Nov 17 09:00:57 liefer, mhm. There are some snags about accessing outside world from custom views that can be annoying. Nov 17 09:01:27 E.g. when you need a fragment manager (dialogs!), or the activity context (and getting that in a view so you don't have a spaghettti is fun) and some other detrails. Nov 17 09:01:28 *details Nov 17 09:01:37 i never belittled him Nov 17 09:02:24 liefer you came out of the blue with hating fragments and advocating custom views Nov 17 09:10:17 So +1 with fuck you to Mavrik and liefer Nov 17 09:10:41 Manners. Nov 17 09:14:26 you lost that Nov 17 09:22:05 with Picasso, who does the image decoding? Picasso itself or the device? I would like to know what filetypes (and/or their mimetypes) are possible Nov 17 09:24:29 check the code osxorgate, I would guess it's BitmapFactory though Nov 17 09:48:36 hi, does anyone know of a way to have a .jar dependency not included in an .aar project when built? (it are just some stubs to be able to compile) Nov 17 09:52:47 dzan, use provided instead of compile in your build.gradle Nov 17 09:55:49 thanks! Nov 17 10:31:44 did anyone manage to add a 'provided' dependency with the experimental gradle plugin? Nov 17 10:48:43 hi Nov 17 10:48:47 howdy Nov 17 10:49:04 Is the android source an example of good quality code? Nov 17 10:52:51 nobody? Nov 17 10:55:08 not a clue really, I would assume so Nov 17 11:04:06 Hey all Nov 17 11:23:06 hi Nov 17 11:23:33 what's best practice to put an app background ? Nov 17 11:23:52 a repeating pattern ? a big image in every size and format ? Nov 17 11:24:03 I was wondering how to keep it lightweight Nov 17 11:24:27 (I meant wallpaper background image, as in whatsapp for instance) Nov 17 11:29:43 is there a way I can send byte array to webview with @JavascriptInterface? Nov 17 11:31:21 Marlinski, pattern would be best one to keep it light. Nov 17 11:33:51 vompatti, perhaps serialize byte array to string? Nov 17 11:34:21 I'm trying but with no luck Nov 17 11:34:38 vompatti, http://www.mkyong.com/java/how-do-convert-byte-array-to-string-in-java/ Nov 17 11:36:01 vegetablesalad19: I can convert it to string but the problem is to convert it back to binary in javascript Nov 17 11:37:53 vompatti, that should be easy Nov 17 11:38:39 vompatti, google and stackoverflow returns lot's of results for that Nov 17 11:38:53 I have Nov 17 11:40:29 hi guys, is there a way to have a reliable, easy to use file picker ? I mean i tried some libs, but most of them dont work very well, and I tried to use ACTION_GET_CONTENT intents, but the behaviour is very inconsistent on different brands and android versions... I just want my users to be able to pick images from their devices, am I going to have to redevelop a file picker myself, or do anyone know of a reliable, easy to imp Nov 17 11:42:55 H3bus, I remember this being a huge pain Nov 17 11:43:29 vegetablesalad19: yeah, I can confirm. Samsung based tablets are particularly driving me insane Nov 17 11:43:42 did you manage to find a solution ? Nov 17 11:44:42 I think I just used intent, and then had to apply many fixes for Samsung and other non stock android phones Nov 17 11:45:13 or did I use some lib and made changes to it, hmmm can't remember now Nov 17 11:45:19 I'll take a look Nov 17 11:45:23 give me 5 min Nov 17 11:48:22 thanks in advance vegetablesalad19 (love your username btw) Nov 17 11:50:51 H3bus, So I am using this lib https://github.com/coomar2841/image-chooser-library, it was one of most consistent ones Nov 17 11:50:53 Hi all, does somebody know how to make this animation: https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B8v7jImPsDi-R2E3UGZZaHpORWc/components-buttons-fab-transition_fullscreen_01.webm Nov 17 11:51:18 I think I made some some changes for really old apis Nov 17 11:51:46 vegetablesalad19: cool thanks, now i'm wondering why its not referenced on android arsenal Nov 17 11:52:26 I used it 1.5 y ago, but it is actively suported Nov 17 11:52:49 500 stars, 150 forks Nov 17 11:53:06 still supported Nov 17 11:53:46 no problem, hope it works well for you, good luck Nov 17 11:59:36 FrancescoV, hard to see, it goes by quite fast Nov 17 12:00:07 doh, I can go frame by frame Nov 17 12:00:17 vegetablesalad19: well, I would like to start a new Activity with that animation Nov 17 12:02:13 FrancescoV, so after FAB ripple animation ends Nov 17 12:02:26 you take it and animate it's radius Nov 17 12:02:55 but it is inside a container so you have only one round side Nov 17 12:03:07 go frame by frame and you will see how it is created Nov 17 12:05:45 vegetablesalad19: thanks, but it would be nice if someone knew a lib because I'm not the only person who need this kind of animation Nov 17 12:08:08 well then you should rephrase your question Nov 17 12:08:42 you asked how create it Nov 17 12:30:34 do most devices use the same one or two graphics manufacturers? Nov 17 12:36:12 * rdnt shakes #android-dev ... wake UP! Nov 17 12:36:39 rdnt, graphics manufacturers? Nov 17 12:36:56 rdnt: Im guessing he means gpu manufactures Nov 17 12:37:21 yes sorry Nov 17 12:37:21 rdnt: and no not really, though the nexus line uses mostly gpus from qualcomm Nov 17 12:38:06 i've got a project that runs fine on phones, but doesn't like the gpu with imx6 Nov 17 12:42:35 what does your app do? Nov 17 12:50:07 I bought a samsung device - I should feel bad for that Nov 17 12:52:38 pretty much Nov 17 12:53:17 I only bought it because I know there are so many samsung related bugs, I need one for testing though :D Nov 17 12:53:25 still feel sad Nov 17 12:55:56 Anyone worked with gifs in a list/recyclerview? Nov 17 12:56:11 danijoo: don't feel bad because users are dumb Nov 17 12:57:25 and now I want to root it and antivirus instantly flags the Odin as virus :D seems like samsungs dev community is as bad as samsung ^^ Nov 17 13:06:30 pfn: I can't seem to understand how flavors work in android-sdk-plugin Nov 17 13:07:02 which aspect Nov 17 13:07:14 Darkwater: what are you finding difficult? Nov 17 13:07:24 I've put this in my build.sbt: Nov 17 13:07:25 flavors += (("flavor", Seq(sourceDirectories in Compile += projectLayout.value.src / "flavor" /"java"))) Nov 17 13:07:46 Darkwater, unmanagedSourceDirectories Nov 17 13:07:47 but when I enter sbt, variant veritas and android:run, it seems to just build the 'default' package Nov 17 13:08:08 Darkwater: http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Product-flavors Nov 17 13:08:20 and it's variant buildtype flavor Nov 17 13:08:25 thepoosh, ahem Nov 17 13:08:28 thepoosh: it's about the sbt plugin Nov 17 13:08:57 oh myy Nov 17 13:08:59 nvm Nov 17 13:09:01 Darkwater, unmanagedSourceDirectories Nov 17 13:09:05 teeheehee Nov 17 13:09:44 pfn: what is 'variant buildtype flavor'? Nov 17 13:10:04 Darkwater, the command takes 2 arguments, a buildtype and flavor Nov 17 13:10:16 (changed sourceDirectories to unmanagedSourceDirectories, no change) Nov 17 13:10:19 oh like that Nov 17 13:10:26 I assume you mean you did variant -- flavor Nov 17 13:10:50 actually seems like it works shorthand Nov 17 13:11:07 > variant veritas Nov 17 13:11:10 [info] Applying variant settings buildType=(none) flavor=veritas to nl-almanapp-designtest... Nov 17 13:11:23 hmm, that's odd, it shouldnt Nov 17 13:11:59 anyway, check compile:unmanagedSourceDirectories and show compile:sources Nov 17 13:12:30 the former should show your flavor source directory, and the latter files from that directory as well Nov 17 13:12:37 oh, there's also unmanagedResourceDirectories Nov 17 13:12:41 it's the resources that differ Nov 17 13:12:43 let me try that Nov 17 13:13:08 resources? android or java resources? Nov 17 13:13:15 xml/image resources Nov 17 13:13:20 if android, you use extraResDirectories Nov 17 13:13:20 android resources Nov 17 13:13:54 java resources are completely separate from android resources Nov 17 13:14:43 what keypresses does onKeyUp() handle? Nov 17 13:14:55 all Nov 17 13:15:13 that you previously returned true from down Nov 17 13:15:29 the things that I need to change per flavor are: package name, app name and other strings/values, launcher icons and other images Nov 17 13:15:34 pfn: okay. Nov 17 13:16:11 Darkwater, should all be doable Nov 17 13:17:21 currently got this, still no changes: Nov 17 13:17:22 > variant veritas Nov 17 13:17:25 [info] Applying variant settings buildType=(none) flavor=veritas to nl-almanapp-designtest... Nov 17 13:17:28 uhh Nov 17 13:17:34 damnit neovim, work with me here Nov 17 13:17:57 flavors += (("veritas", Seq(extraResDirectories += projectLayout.value.sources / "veritas" / "res"))) Nov 17 13:19:00 ah I see, projectLayout.value.sources leads to src/main Nov 17 13:19:16 so it ends up in src/main/veritas/res Nov 17 13:20:28 indeed Nov 17 13:21:50 * pfn goes back to sleep Nov 17 13:28:03 welp looks like google broke TabLayout in 23.1.1 so you can't set a 0dp tab padding Nov 17 13:28:15 :c Nov 17 13:28:21 back to 23.0.1 Nov 17 13:34:47 Hi all, Is it possible to make a view above an AppBarLayout (both the view & AppBarLayout are inside a CoordinatorLayout) Nov 17 13:41:18 hi what doesn an ? mean in style definition : style="?android:textAppearanceMedium Nov 17 13:42:41 FrancescoV, yes Nov 17 13:45:09 danijoo, can you give me some info/docs how I can do that? Nov 17 13:45:36 theres nothing to documentate. You just add that view to the Coordinatorlayout Nov 17 13:48:04 If i place a view inside my CoordinatorLayout, it's never visible above my AppBarLayout Nov 17 13:49:28 can a TabLayout have an impact on this? which is inside my AppbarLayout? Nov 17 13:53:19 that's it, the issue occurs when I have a TabLayout inside a Appbarlayout Nov 17 13:53:43 I think there are lots of blog posts about it Nov 17 13:54:02 how to add image/tablayout/whatever and use the fancy coordinatorlayout effects Nov 17 13:54:14 dont have one by hand unfortunatly :S Nov 17 14:00:58 hi I have this code, which doesn't work http://dpaste.com/26T0J5A, any reasons why? Nov 17 14:01:14 sanketdg: define not working Nov 17 14:01:38 also, have you tried debugging? Nov 17 14:02:10 thepoosh: no, I didn't try that. Nov 17 14:02:20 that's the first thing you should do Nov 17 14:02:44 thepoosh: okay. Nov 17 14:03:04 try putting a breakpoint in the first line of the method Nov 17 14:04:47 thepoosh: switch(keyCode) ? Nov 17 14:04:57 yep Nov 17 14:16:18 hi Nov 17 14:16:59 Cannot call this method while RecyclerView is computing a layout or scrolling exception thrown when i call holder.viewpager.setCurrentItem(x); Nov 17 14:17:12 aren't they seperated from each other ? Nov 17 14:17:55 i mean independent Nov 17 14:24:18 I dont think its a good idea to have a reference to the recyclerview in your viewholder. Nov 17 14:34:26 thepoosh: nothing happens on the debugging, it doesnt pause there. Nov 17 14:35:14 danijoo_:it is also not good to use a view pager as row item in recyclerview but my boss -.-' Nov 17 14:54:04 is there a way to avoid a complete build of your application when running tests? Android Studio seems to run gradle build every time I make a change to a test and rerun. Shouldn’t it just recompile the test? Nov 17 14:56:56 urbanmonk, have you enabled incremental building? Nov 17 14:57:16 danijoo_: haven’t heard about the feature so probably not :) Nov 17 14:57:24 :> Nov 17 14:57:32 now you have Nov 17 15:01:12 how can i acces my db thru android studio? Nov 17 15:01:23 thornekey, you cant Nov 17 15:01:41 danijoo_: i meant java. oops. ahahh Nov 17 15:02:06 you know when you read something above and accidentally type it haah Nov 17 15:02:11 that just happened Nov 17 15:02:14 a db on your server? Nov 17 15:02:21 yes. Nov 17 15:02:28 dont connect directly Nov 17 15:02:39 use an interface. ie REST Nov 17 15:02:48 ill check that out. Thanks. Nov 17 15:03:33 are there any guides or tutes for REST? Nov 17 15:04:11 you need to write a server application that connects to your DB and serves the information over HTTP Nov 17 15:05:14 Hm Nov 17 15:06:03 what would i write the server application in? Nov 17 15:06:52 what do you know? Nov 17 15:07:17 java, web languages, PHP, C# Nov 17 15:07:28 you can write it in whatever you want./ Nov 17 15:08:19 ruby Nov 17 15:08:26 so i need my app to connect to this server application; the SA pulls data from the db and returns it to the app Nov 17 15:08:38 exactly Nov 17 15:08:43 thornekey, yes. basically a web bases api as frontend Nov 17 15:09:06 little bit you can get help from code acedmy Nov 17 15:09:08 do i need to make this api or can you suggest one Nov 17 15:10:11 you have to write it since its your db that it should serve Nov 17 15:10:31 oh man Nov 17 15:10:34 ie if you have a table that stores User information, you might want to get users by their id Nov 17 15:10:53 so you write an api that has wwww.yourserver.com/yourapp/users/12314121 Nov 17 15:11:11 and serves the user with the id 12314121 as json, xml or whatever Nov 17 15:11:38 l Nov 17 15:13:08 so i should learn ruby? Nov 17 15:13:36 pretty much every language allows you to write http application nowadays Nov 17 15:13:47 php, java, ruby, kotlin, python Nov 17 15:13:49 they all work Nov 17 15:15:26 If I'm in a static class inside of an IntentService, and I create a new handler(getLooper()), am I doing work on the main thread? Nov 17 15:15:54 eghdk, i dont think so Nov 17 15:16:16 danijoo_: i wrote this in C# http://hastebin.com/ozilaveqix.avrasm wouldnt this structure work Nov 17 15:16:29 eghdk, but it would be easy to try that out Nov 17 15:16:50 danijoo_: Any easy way to test it? I inherited some code written like that, and I think that it's doing work on the main thread. Nov 17 15:16:52 thornekey, I dont C# Nov 17 15:16:53 the php file it goes to uses those fields (using $_POST) then it returns the info it needs Nov 17 15:17:06 Not sure how to test and make sure and say "Hey this is actually on the main thread. Nov 17 15:17:29 danijoo_: the structure is the same though. im just asking if thats how i could do it in say java (the same style) Nov 17 15:18:03 eghdk, yes. Nov 17 15:18:37 so would the php file i connect to serve as my server application you mentioned? Nov 17 15:18:53 thornekey, I dont know what WWWForm is, I dont know what WWW class is and I dont know what a coroutine is :p Nov 17 15:18:54 i connect to the db in the php file and return the app with the correct info Nov 17 15:19:04 or in other words: I dont C# :) Nov 17 15:19:30 What is a good book/resource to learn Java (for Android Dev)? Nov 17 15:20:08 WWWForm form = new WWWForm(); is the same as URL url = new URL(); Nov 17 15:20:27 new boston tut on youtube Nov 17 15:20:48 many people recommend but i haven't seen yet Nov 17 15:20:56 danijoo_: yes? There is an easy way to test it? What would you do in this case? Nov 17 15:21:02 greg: i watched him years ago, learnt a bit Nov 17 15:21:19 eghdk, yes and it took me 1 try to find a way on google :) Nov 17 15:21:59 danijoo_: im not asking if the C# is right. Im asking if my concept of connection is safe. when you say server application, im thinking a php file (which i connect to in the app), that opens teh db and returns the info. just trying to be safe with my app :) Nov 17 15:22:01 I think you can do it too. Maybe in 2 or 3 Nov 17 15:22:24 thornekey: before and after what you are following? Nov 17 15:22:26 danijoo_: =( Maybe my query is wrong. I'm searching "is getLooper() the main thread" Nov 17 15:22:47 greg: huh? Nov 17 15:23:53 thornekey, In general everyone can connect to it and use it - not only your app. So if you mean "is this limited to my app" by "secure", the answer is no. Nov 17 15:24:29 there are ways to secure it including keys, https and other, but this is a bit out of scope of this channel I think Nov 17 15:24:45 Ah. i see. Nov 17 15:25:05 eghdk, compare the looper to the main threads looper Nov 17 15:29:51 danijoo_: aha. that's a good one. Thanks Nov 17 15:31:34 danijoo_: hmm... maybe its duckduckgo leading me down the wrong path. still nothing. I'll try google. Nov 17 15:32:14 That was the solution, not a term for google :p Nov 17 15:34:53 eghdk, compare them and see if they are the same Nov 17 15:37:44 danijoo_: lmao. sorry. yeah that makes sense. im tired. haha. give me a break. I have been learning traceview thanks to Mavrik around here the past few days, and I used traceview to confirm that it's happening on another thread! Nov 17 15:43:46 How to gzip request body before posting ? Nov 17 15:44:44 suhas_sm, http://docs.oracle.com/javase/7/docs/api/java/util/zip/GZIPInputStream.html Nov 17 15:45:20 so many generic. questions. better suited asking in ##jaba Nov 17 15:45:35 thats an evil place :p Nov 17 15:48:05 Shouldn’t that be OutputStream ? Nov 17 15:48:15 yes Nov 17 15:48:21 Ok Nov 17 15:48:23 Thanks Nov 17 15:48:31 np. I love to google Nov 17 15:49:02 (thats a lie) Nov 17 15:49:13 :| Nov 17 16:07:09 God, I really wish there were a json schema validation standard Nov 17 16:07:35 so many random parse errors, and gson never yells me where Nov 17 16:12:27 pfn have u used capn proto Nov 17 16:12:38 ? Nov 17 16:13:08 Oh, alternative serialization Nov 17 16:13:16 yeah, json is a requirement Nov 17 16:21:35 hi, I have this example from android docs: https://gist.github.com/anonymous/2dc92a7d47b2a1438ae7 Nov 17 16:21:47 I get the error: cannot resolve constructor on the line 23 Nov 17 16:21:51 why is this happening? Nov 17 16:24:30 because the constructor you're using doesn't exist Nov 17 16:26:02 new ResponseListener()... is the constructor Nov 17 16:27:06 i have a viewgroup with a cardview in it, with a bunch of views on it, and on the cardview i set a clicklistener. only the click is not registered. what could be wrong? it even has android:clickable="true" Nov 17 16:27:10 moreover, if instead of System.out.print(...) (line 23) I put mTxtDisplay.setText("Response: " + response.toString()); that error is not shown anymore Nov 17 16:27:59 AS should automatically close itself everytime someone tries to type System.out.p Nov 17 16:29:42 ok.. it works when i remove android:clickable="true" o_O Nov 17 16:30:39 osxorgate, clickable captures. touch events Nov 17 16:31:09 osxorgate, if you set the listener on a child then the card will capture before the child can do anything Nov 17 16:31:47 pfn, but i set the listener on the card and not on any child Nov 17 16:32:00 i guess the android:clickable does something i did not expect Nov 17 16:37:47 it doesn't Nov 17 16:38:11 only way is if clickable and where you set the listener are not the same view Nov 17 16:53:36 Hi Nov 17 16:54:06 i had to delete null as one parameter, constructor's signature has changed and it is not the same as in the android's docs Nov 17 16:54:36 I am trying to use material theme for my app but I have set the minimum sdk required to 15. Will android take care of those APIs which don't support material theme? Nov 17 16:55:51 rudolf_: You can use AppCompat, which makes your app look "material" regardless of Android version. Nov 17 16:56:08 Though not everything looks material on < API 21 (one example is progress bars). Nov 17 16:56:50 TacticalJoke, does it have flat buttons ? I just need flat buttons. Nov 17 16:57:08 Yes. Nov 17 16:57:21 can anyone tell me how apps like tinder made Nov 17 16:57:31 i mean , i know they have backend . Nov 17 16:57:42 can i make such kind of app using parse? Nov 17 16:58:30 Ok...thanks TacticalJoke . Btw does android do something if I use material theme and set minimum API to 15? Or one has to manually do something for lower APIs? Nov 17 16:59:07 i did some googling , and came to know about some facts such as google cloud endpoints . restful api , parse and firebase Nov 17 16:59:46 hey, doesn anyone know how to actually create a library from a library module? I have the folder and that stuff, but I can't make it external... Nov 17 17:00:09 I want to use the same library from several projects Nov 17 17:00:56 txomon, publish it Nov 17 17:00:59 rudolf_: AppCompat does it for you. Nov 17 17:01:11 pfn: yeah, the problem is how to do it Nov 17 17:01:12 Without AppCompat, Android would do nothing to make your app look material on <21. Nov 17 17:01:22 I want to take it from github Nov 17 17:01:26 When running on <21. Nov 17 17:01:28 but I don't get it to work correctly Nov 17 17:01:31 Ah...all right Nov 17 17:01:35 Thanks a lot Nov 17 17:01:36 TacticalJoke: ? Nov 17 17:01:49 I don't want to upload it still to maven, it's really crappy atm Nov 17 17:01:59 TacticalJoke: can i make dating like app using just parse and firebase? Nov 17 17:06:16 So, in XML, i can put "@android:drawable/ic_menu_close_clear_cancel" into a background field of an ImageView. How can i translate this to java? Nov 17 17:06:32 so no one knows how to distribute a library without uploading it to maven... Nov 17 17:07:03 txomon, you can publish local Nov 17 17:07:17 txomon, or. just package and share the aar file directly Nov 17 17:07:49 pfn: the problem is at the beginning, this steps don't exist https://www.jetbrains.com/idea/help/sharing-android-source-code-and-resources-using-library-projects.html#d632730e162 Nov 17 17:08:18 dersand: android.R.drawable.ic_menu_close_clear_cancel Nov 17 17:08:41 TacticalJoke: thanks! Nov 17 17:10:24 You may or may not have to use Resources.getDrawable to load it. Nov 17 17:10:54 txomon, don't know, I don't use ide for crap like that Nov 17 17:11:24 yeah I am switching to manual mode now Nov 17 17:12:04 also you're reading docs for idea, android studio is different Nov 17 17:13:28 pfn: and I suppose there are no docs for android studio? Nov 17 17:14:02 because I searched "android studio create library project" Nov 17 17:14:03 xD Nov 17 17:14:16 android studio == intellij idea Nov 17 17:15:10 I think it's more like a fork. Nov 17 17:15:48 AS instanceof Intellij then :p Nov 17 17:16:06 it's not the same, the wizards are all different Nov 17 17:16:18 the steps should work though Nov 17 17:16:36 not if you're following wizard steps Nov 17 17:16:43 the wizards are all different Nov 17 17:17:29 meh. ok ;0 Nov 17 17:19:47 I'm not much of an artist, but I've always been told not to use pure white or pure black, and material design on Android sometimes uses these (e.g., the default text colour for a Toolbar is pure white). Should forget all I've been told? Nov 17 17:19:53 hmm, do the material icons come. in VectorDrawable format? Nov 17 17:20:35 rules are made to be broken Nov 17 17:20:58 I'm about to push to production an app I have only tested for about 30 minutes! I think this will go well Nov 17 17:21:07 i hope this well go well Nov 17 17:21:13 this is not going to go well Nov 17 17:21:18 Did you test it on samsung? Nov 17 17:21:21 so you got bored after 30minutes Nov 17 17:21:27 danijoo_: nope Nov 17 17:21:32 you are fucked then :p Nov 17 17:21:35 but i dont think anything well break on it Nov 17 17:21:45 not using any intents to any of there apps Nov 17 17:21:52 its really just CRUD at it's finest Nov 17 17:21:59 I test by making sure it launches Nov 17 17:22:06 the push! Nov 17 17:22:17 pfn isnt it enough if it compiles? Nov 17 17:22:41 its for my school's physical education department. They just need a early verison with mlimited functionality for Thursday so I threw it together Nov 17 17:22:47 sometimes I do that Nov 17 17:22:59 danijoo_: No! You might have forgot to add an activity to the manifest! Nov 17 17:23:18 I say thats better than a crashing activity :p Nov 17 17:23:45 the scariest part is that im about to get 300 users using it at the very least the first day... maybe i should try to test more Nov 17 17:24:07 300 beta testers for free? thats nice Nov 17 17:24:44 300 beta testers who will be very upset with me if it doesn't work Nov 17 17:25:04 anyone have any good articles for gaining an advanced understanding of ListView? I seem to recall a "deep dive listview" talk at some point but now can't find it Nov 17 17:25:13 fuck maybe i shouldnt have my name in the splash screen... this could make high school very painful for me Nov 17 17:25:26 Cyril has a good blog series about it but it's not general enough http://cyrilmottier.com/2011/06/20/listview-tips-tricks-1-handle-emptiness/ Nov 17 17:25:52 g1bbs: AFAIK, the only such "tutorial" is to read the source (AdapterView, AbsListView, and ListView). Nov 17 17:26:19 There is that Romain Guy YouTube video, but it's not very advanced. Nov 17 17:26:28 And then there are a bunch of clueless blog posts. Nov 17 17:27:22 TacticalJoke: ya thanks. I'll check out Romain's talk - even if it's basic I'm sure it has some new insight Nov 17 17:27:39 AFAIR, it's beyond the basic level, but it only goes so deep. Nov 17 17:28:34 TacticalJoke: recently there has been some debate as to whether the ViewHolder pattern adds meaningful performance. After reading about that I realized I don't have as deep an understanding of it as I'd like Nov 17 17:31:33 TacticalJoke: I also once came across some BS senior dev posting about looking for the type of people who could implement a more efficient Listview lol. I suppose it couldn't hurt to go back to basics for a bit Nov 17 17:31:48 TacticalJoke: God knows I've got enough new flashy libraries for a while Nov 17 17:32:18 Hi Android-dev experts! I have an Android studio project that has 2 modules, the main program and a separate mobile game that I imported as a library. Do you know how I can get the variables from the main activity to be used in the library module dependency to control the game? I have 6 float values but the game module can't see them! Nov 17 17:32:20 AFAIK, RecyclerView is intended to be a more efficient ListView (among other goals). Though whether it achieves this goal without massive customisation is open to quesiton. Nov 17 17:32:25 question* Nov 17 17:33:43 From what I've seen, there are many cases where RecyclerView is outright slower than ListView (using the default LayoutManager, Recycler, etc.). Nov 17 17:33:52 TacticalJoke: I was so discouraged by the difficulty in implementing simple click listeners with RecyclerView that I kind of said forget it until I have a really good reason to change Nov 17 17:33:54 Well, using LinearLayoutManager. Nov 17 17:38:14 RecyclerView feels very half-finished to me. Even this doesn't work: http://developer.android.com/reference/android/support/v7/widget/LinearLayoutManager.html#setSmoothScrollbarEnabled(boolean) Nov 17 17:38:51 And AFAIR it's tricky to draw dividers in the way ListView does (if there's no scrolling, draw a final divider; else, don't draw a final divider). Nov 17 17:41:38 TacticalJoke: ugh yeah. I won't be jumping on that bandwagon anytime soon Nov 17 17:54:15 Okay, I have the following situation: Nov 17 17:54:15 I have 3 checkbox preferences, let’s call them A, B and C Nov 17 17:54:15 when A is enabled, I want B enabled and C disabled. Nov 17 17:54:15 when B is disabled, I want B disabled and C enabled. Nov 17 17:54:15 Is it possible to do this with some XML tag similar to disableDependentsState? Nov 17 17:55:08 maybe, but I think this is one of the few instances where you’re going to find it easier to do in code than in XML Nov 17 17:55:30 well, yes, but that would make it less discoverable, and more bug prone. Nov 17 18:06:39 Is there a problem with the server? Nov 17 18:18:33 s73v3r: I now found a solution. I wrote a custom SwitchPreference that handles it: https://gist.github.com/justjanne/4ceba50107d53734e8a1 Nov 17 18:18:48 you can then just use app:dependencyStateInversed="true" to do that Nov 17 18:34:59 I'm using Browser.BookmarkColumns in an app and that field was removed in android 6.0, is it possible to annotate a method with targetApi (or similar) to remove the error? Nov 17 18:35:25 or do I need to use a gradle build variant/flavor? Nov 17 18:42:54 Hi guys do you know how I can share global variables accross two modules in Android studio? Nov 17 18:44:19 eschur set the value in gradle and have it be written out in BuildConfig of both projects. Nov 17 18:44:37 projects -> modules* Nov 17 18:48:49 ugh, why doesn't logcat have a command to just filter by pid Nov 17 18:49:01 logcat -p /pid doesn't seem to work (as indicated by logcat -h) Nov 17 18:49:28 is it possible to register a proprietary VPN with Android's built-in VPN functionality? Nov 17 18:49:38 pfn have you checked out pidcat? Nov 17 18:50:21 I don't want pidcat Nov 17 18:50:23 I want logcat by pid Nov 17 18:50:35 pidcat doesn't work when ActivityManager scrolls off already Nov 17 18:51:10 if adb shelled in can, logcat | grep "pid" Nov 17 18:51:12 are you starting more than one process from a package? Nov 17 18:51:35 yeah, I don't want to grep pid either, since it breaks my logcat colorizer Nov 17 18:52:40 you can also use android device monitor and filter by PID there Nov 17 18:52:46 yeah, don't want that either Nov 17 18:53:00 I'm just surprised logcat -p doesn't seem to operate as documented Nov 17 18:53:19 I can't help you then Nov 17 19:08:16 Anyone good at BaseExpandableListAdapter here? Nov 17 19:08:47 I'm following a guide about adapters but they don't explain what the overrided methods is doing when you implement that adapter Nov 17 19:12:08 The javadocs explain it Nov 17 19:12:09 Zajt look for an example in ApiDemos Nov 17 19:12:27 i don't really like their explanations, they are not so good Nov 17 19:13:15 what part do you not understand? Nov 17 19:13:37 (we wont explain you every single method you have to implement) Nov 17 19:16:35 So, i'm putting an ImageView into an TableRow, it works but when i implement a layoutParam on the imageview, it disapears. Is there a way to set the gravity of the params, but not pass width and height? Nov 17 19:16:36 well they explain what the methods does, but the example I looked at doesn't explain why you have to the stuff in the method getChildView for example. They have many stuff in that method Nov 17 19:17:27 Zajt, do you know how regular listviews work (the not-expandable ones) Nov 17 19:17:34 tjo carl @zajt Nov 17 19:17:47 yeah basically Nov 17 19:17:52 tja dersand vem? Nov 17 19:18:00 zajt erik från nti? Nov 17 19:18:07 wrong language guys Nov 17 19:18:14 sorry Nov 17 19:18:46 Zajt, expandables work exactly the same, but instead of getView() theres one getView method for the parent view and the child, while the child is the part shown when expanded Nov 17 19:19:49 danijoo_: alright Nov 17 19:24:23 test Nov 17 19:24:39 Any easy way to get an image in material design support lib Tabs? Nov 17 19:25:49 eghdk: drawables ya Nov 17 19:26:24 eghdk, you should try the docs once Nov 17 19:27:47 hey danijoo_ Nov 17 19:27:59 hey g00s Nov 17 19:32:11 oh do you know how to set that value in gradle? Nov 17 19:32:15 I didn't realize I could do that Nov 17 19:32:27 How could I set a variable from one module in gradle to be seen by the other library module? Nov 17 19:33:51 In case anyone needs a reason to use even more libraries to make up for verbose APIs https://github.com/davidbrazdil/dexter Nov 17 19:36:36 ugh wrong link https://github.com/Karumi/Dexter Nov 17 19:40:33 I'm having a very weird behavior (to me) with navigating back on my app. From activity A, I have a button when onclick will start a new activity B. Use the back button, now I can get back to activity A. Then I tap the button again to go to the activity B again. Everything is fine until now. If I use the back button, I need to tap it TWICE to go back to activity A. And so on, if I continue to tap that button on activity A, I will go to Nov 17 19:40:33 activity B, but to go back, now I need 3, 4, 5++ taps to go back from activity B to activity A. Anyone knows how I can manage this? Nov 17 19:41:44 so gradle 2.9 is out Nov 17 19:42:11 "Easier Gradle Plugin development with Gradle TestKit" that is kinda cool Nov 17 19:42:26 "Performance improvements for incremental builds" Nov 17 19:43:35 IwandeRerC, hard to say anything without some code Nov 17 19:45:02 Question in pastebin: http://pastebin.com/zWQUV3Xt Nov 17 19:46:36 my code is in xamarin, though :( http://pastebin.com/1kUGBeNT Nov 17 19:46:54 dersand, removeBtn is not measured yet and so getWidth()/getHeight() returns 0 Nov 17 19:46:56 IwandeRerC: well thereeeeees your problem :) jk Nov 17 19:47:35 danijoo_ so, addview(removeBtn), then do layoutparams? Nov 17 19:47:52 dersand, depends on where in the lifecycle of the activity/fragment you do this Nov 17 19:48:22 danijoo_: it's within the onCreate method Nov 17 19:49:12 in this case it will not work Nov 17 19:49:29 IwandeRerC: do you call startActivity from Activity B Nov 17 19:49:52 IwandeRerC: And you're saying you tap back several times and nothing happens from Activity B? Nov 17 19:51:04 that Activity B doesn't start any other activities Nov 17 19:51:31 and yes, on the first time of going to that activity B, I need to tap ONCE to go back to activity A. Nov 17 19:51:41 on the second time, I need to tap TWICE to go back. Nov 17 19:51:44 and so on... Nov 17 19:52:05 each time I tap back, it seems like it load the activity B again Nov 17 19:52:18 until I finally get back to activity A Nov 17 19:53:05 IwandeRerC: I mean either Xamerin is doing something wonky or the problem involves you doing something incorrect in the code we don't see Nov 17 19:53:33 danijoo_: Allright, since i'm adding it to a TableRow, can i put any gravity to force it to align to top-right? Nov 17 19:53:42 I can think that I actually did something wrong with the code but unfortunately I cannot share it :( Nov 17 19:53:44 Instead of center Nov 17 19:54:17 IwandeRerC: My advice would be to make a very small demo project and see if you can duplicate the problem with very minimal code Nov 17 19:54:25 IwandeRerC: if the problem persists, you can post that here Nov 17 19:54:36 g1bbs Yes that's what I'm trying to do. Nov 17 19:55:01 IwandeRerC: So why can't you post it then? Nov 17 19:55:05 Is there an intent that shows both create a contact and dial, from a phone number? Nov 17 19:55:30 Because I'm doing it. I'm not finished with it yet. Nov 17 19:56:11 dersand, yes. you can set gravity on the layout params. you just cant use getHeight/witdth for the params Nov 17 19:57:31 is it normal that std::thread crashes on android? Nov 17 19:57:33 std::thread t([](){int bleh=0;}); Nov 17 19:57:33 Nov 17 19:57:38 this crashes for me Nov 17 19:57:42 danijoo_: Allright, but i need that object, what can i pass to the constructor? Nov 17 19:58:10 dersand, you can pass WRAP_CONTENT or FILL_PARENT Nov 17 19:58:15 or use the already existing one Nov 17 19:58:41 danijoo_: existing? ... Nov 17 19:59:03 dersand, View.getLayoutParams() - Im not sure if this is null in your situation or not Nov 17 20:00:21 Do you guys know how to set a variable value in gradle from one module so it can be read by another module and have it be written out in BuildConfig of both modules? Nov 17 20:00:29 hello, trying to create a unit test, the method that I'm testing has a call to: Base64.encodeToString when this is execute it returns null, somebody knows why? Nov 17 20:01:50 danijoo_: nope, nullpointerexception. I'll try wrap content. Also, you mentioned fill_parent, but i thought that it was deprecated? Nov 17 20:02:07 dersand, match_parent. whatever :Lp Nov 17 20:02:10 its the same Nov 17 20:02:46 they renamed that once, but both will be available for the next years if not forever Nov 17 20:04:36 and I always forget which one is the old one :P Nov 17 20:05:47 danijoo_: as long as you're not still using the deprecated dialog system :P Nov 17 20:06:27 can anyone confirm http://1.bp.blogspot.com/-Ey4LVVav72E/VcMqZbJvJNI/AAAAAAAAWqI/a9OmqVQ1Djs/s1600/activity-fragment_lifecycle_4.png is correct? Nov 17 20:06:35 up to date* Nov 17 20:06:38 danijoo_: Didn't help. http://i.imgur.com/ZtMtuwY.png Nov 17 20:07:03 dersand, why do you do this in java? Nov 17 20:07:10 its way easier in xml Nov 17 20:07:36 danijoo_: Is it a good practice to use .xml layouts? Nov 17 20:07:44 re-use* Nov 17 20:07:52 of course Nov 17 20:08:11 Allright, then i guess that settles it Nov 17 20:08:21 For example what would be the syntax to share float foo from module 1 with an activity in library module 2? Nov 17 20:08:34 are there problems with textureview in recyclerview? Nov 17 20:08:38 txomon: yikes man that is the clearest example of "do my work" I've ever seen on here Nov 17 20:10:06 eschur, good question for #gradle Nov 17 20:15:50 ok I asked there but it's kind of dead so if anyone has a good idea how to share a float from an application module to a library module in the same project that would be so helpful thanks! Nov 17 20:16:45 eschur, I know that if you use ext.variableName = "something" in the root build.gradle, its available for all modules Nov 17 20:16:57 but I dont know about cross module :S Nov 17 20:20:07 hello Nov 17 20:21:06 dersand: https://github.com/futurice/android-best-practices Nov 17 20:23:06 I'm triggering different threads from a service... when the app goes to the background, android kills the threads (not the service)... can android be told to not kill threads started from the service? Nov 17 20:23:29 txomon, i disagree with a lot of those points :/ Nov 17 20:25:24 conceptually... is it possible? Nov 17 20:25:31 I type ext. but it doesn't autocomplete Nov 17 20:25:49 eschur, gradle is IDEs nightmare Nov 17 20:26:00 a lot doesnt autocomplete for gradle Nov 17 20:26:17 ok so Nov 17 20:26:49 project is called TerVel, module one is called agm and library module 2 is called terVelocity Nov 17 20:27:10 In the agm module there is a motion.java file that has six floats that I need to access in terVelocity file control.java Nov 17 20:27:28 float a float b etc Nov 17 20:27:44 do you know the syntax for sharing the floats? Nov 17 20:29:29 add module agm as dependency to the terVelocity module and you can use its classes Nov 17 20:30:18 tervelocity is already a dependency to the agm module Nov 17 20:30:23 It's ok to do the other way? Nov 17 20:30:27 no Nov 17 20:30:33 you cant have circular dependency Nov 17 20:31:06 one must compile before the other can use it. if A depends on B and B on A, no module can compile Nov 17 20:31:15 Error:(29, 0) Gradle DSL method not found: 'compile()' Nov 17 20:31:15 Possible causes:
  • The project 'TerVel' may be using a version of Gradle that does not contain the method. Nov 17 20:31:16 Open Gradle wrapper file
  • The build file may be missing a Gradle plugin. Nov 17 20:31:16 Apply Gradle plugin
  • Nov 17 20:31:35 ok Nov 17 20:31:39 I'll try to switch them Nov 17 20:31:56 sounds like you have a design problem in your structure :/ Nov 17 20:32:11 hmm Nov 17 20:32:20 still says it can't find compile Nov 17 20:33:12 its compile project(':ProjectB') Nov 17 20:33:20 in the dependencies{} blog Nov 17 20:33:23 block Nov 17 20:34:18 ok good that worked Nov 17 20:34:22 now I got Warning:Dependency TerVel:agm_test_app:unspecified on project terVelocity resolves to an APK archive which is not supported as a compilation dependency. File: /home/newuser/Downloads/gamesource/TerVel/agm_test_app/build/outputs/apk/agm_test_app-release-unsigned.apk Nov 17 20:35:29 oh I think I should change it to a library Nov 17 20:36:10 its not a library? Nov 17 20:36:29 the one that is receiving the bluetooth data is an application module Nov 17 20:36:38 thats not possible Nov 17 20:36:44 The one that is a game inside of it that uses it is a library Nov 17 20:36:53 an app can only depent on a library, not on another app Nov 17 20:37:02 right Nov 17 20:37:11 so if I make them both libraries Nov 17 20:37:16 how do I launch it as an apk? Nov 17 20:37:26 Do I need a master app one that calls both? Nov 17 20:37:47 something goes terribly wrong at your structure.. Nov 17 20:38:02 and I lost track what you are doing/trying to do tbh Nov 17 20:38:05 danijoo_: you can use it as a module Nov 17 20:38:05 ok Nov 17 20:38:16 orbyt_, but not as a library for another app Nov 17 20:38:29 I have module one application that receives a set of floats. I have module two library that I want to use those floats to control a game Nov 17 20:38:46 I want module 1 to share the floats with module to so module 2 can read those motion values to control the game Nov 17 20:39:17 I want to declare some variables that are global in module 1 that can be read by module 2 Nov 17 20:39:39 I think you dont understand how this works Nov 17 20:39:44 yeah you're right Nov 17 20:40:04 a module is either a library or an application Nov 17 20:40:07 or I want to be able to set the float values in the library module 2 from library module 1 Nov 17 20:40:09 apps can include libs Nov 17 20:40:10 danijoo_: Well no because its not a library, but you can use it like one. eschur: i answered this yesterday Nov 17 20:40:31 so the app does autocomplete the file names for the library Nov 17 20:40:40 I just don't know how to set variables from the app to be read by the library Nov 17 20:40:52 libraryClass.setFloats(float1, float2, ...) Nov 17 20:40:57 if your lib needs some float to work, you should make it possible for the app to initiualize some class of the module with that values Nov 17 20:41:53 is there any chance that textView.getText().toString() throws a NullPointerException? Nov 17 20:42:05 should I do an import for the .java file in library module 2 that I want access to the floats? Nov 17 20:42:12 like you said libraryClass.set Nov 17 20:42:22 so I do com.xxx.libraryname it doesn't autocomplete Nov 17 20:42:36 sanketdg, yes, if textView is null Nov 17 20:42:38 sanketdg: yes if you pass in a null Nov 17 20:43:04 danijoo_: so, "" is null? sorry I am new to java. Nov 17 20:43:26 no. textView is null Nov 17 20:43:56 danijoo_: no I mean is "" == null? because initially my textview is set to "" Nov 17 20:44:05 For your info, an empty String is way different from null. Nov 17 20:44:12 sanketdg, and I again mean textView == null :p Nov 17 20:45:23 I dont thing textView will every return null on getText() Nov 17 20:45:47 Yeah, the constructor has `mText = "";` or something. Nov 17 20:50:06 could I show you the class? Nov 17 20:50:11 It's so simple I just am not getting it yet Nov 17 20:53:38 do people manage logcat output with ANDROID_LOG_TAGS env var filters, or what’s a good way to make things reasonable running adb logcat from a shell? Nov 17 20:54:28 I don’t use a shell, but I do make use of tag filters if I’m looking for something specific Nov 17 20:54:29 It seems every device I use has a different set of spammy log messages I need to suppress, I can hardly see things from my app. Sometimes I do want certain system messages, ActivityManager or the vm occasionally give useful info when something has gone wrong it seems. Nov 17 20:54:49 you should be able to limit the messages to just your process, though Nov 17 20:55:28 i know both the AS and the old Eclipse Logcat clients would do that, and I guess I assumed they used shell flags to do so Nov 17 20:56:00 duboisj, if you are sticking with using shell i like to use 'logcat | grep "whatever"' Nov 17 20:56:01 yeah, I can do that pretty easily, but I miss things that way. I have a set of XXX:S filters in my .bashrc, but I have to keep adding to it when I use a new device, and even with that it’s very (sometimes very very) noisy. Nov 17 20:56:23 yeah, but the grep won’t get you anything from the system Nov 17 20:56:46 the grep can be stopped and restarted with whatever you want to track Nov 17 20:57:26 otherwise gonna have to check other tools, cause ya logcat can get quite spammy depending on the device Nov 17 20:57:40 yeah. It’s all doable, I can pipe to a file and filter through it if I want. I just thought there might be some better way. Nov 17 20:57:45 Nov 17 20:57:53 thx Nov 17 21:12:52 use pidcat Nov 17 21:13:04 danijoo_, did you know you can just type pidcat in sbt? :p Nov 17 21:14:09 So I have an old version of an app, with a patched and unpatched copy of the APK. I'd like to turn the difference between these two into a patch compatible with some third party program (most likely lucky patcher) so that I can have the app automatically re-patched on update. What's the best way to go about doing this? I've modified apks before, but I've never created a patch. It can't be that far of a leap, can it? Nov 17 21:14:38 pfn, whats the advantage over typing it into the shell itself :p Nov 17 21:14:41 people keep saying to use pidcat. I don’t see yet what good it would do for me - I already control the logcat tag, so I can grep pretty easily for that if I want to just get things from my own app. Nov 17 21:14:57 that’s easy - the hard part is getting that plus useful things from the system, without getting every single thing under the sun Nov 17 21:15:01 pidcat would limit things to only your app Nov 17 21:15:04 danijoo_, you don't have to specify package name Nov 17 21:15:37 maybe I’ll check out pidcat, but it’s not obvious that it’s a solution (also I have two processes, but maybe pidcat can do two pids. in any case that’s not the main problem) Nov 17 21:16:07 RegexNinja47, this is bad and you should feel bad. Nov 17 21:16:34 Morals aside, I've got problems I need to fix Nov 17 21:17:08 morals aside, this is not your app and you are stealing it. Nov 17 21:17:14 No it is my app Nov 17 21:17:20 And I payed for it with my own money Nov 17 21:17:21 https://googleblog.blogspot.com/2015/11/introducing-new-google.html Nov 17 21:17:34 if you use g+ Nov 17 21:17:41 But it doesn't do something I want it to Nov 17 21:17:48 Im sure you payed for the license to use it, not modify it Nov 17 21:18:03 Same difference Nov 17 21:18:09 nope Nov 17 21:18:14 Tbh I'm not doing anything bad Nov 17 21:18:37 And I'm sure if there were any disputes about the legitimacy of what I'm doing Nov 17 21:19:14 RegexNinja47: modifying apps is off topic for this channel Nov 17 21:19:19 I can say this: If I were to contact the developer and ask permission to do what I'd like to do, I'm sure he or she would have no issue with it Nov 17 21:19:25 SimonVT: what channel then? Nov 17 21:19:36 Don't know, don't care Nov 17 21:19:49 RegexNinja47, if you ask about something related to lucky patcher in a channel where most people try to make money from selling apps, you most likely wont get a positive answer ;) Nov 17 21:20:08 ah, pidcat seems to have a whitelist of other types of messages to let through the filter. Nov 17 21:20:24 danijoo_ You raise a good point Nov 17 21:20:31 nice Nov 17 21:22:07 hi Nov 17 21:24:07 Im trying to learn how to send updates to my app. Im watching a opensource project on github. I see that they refer to the .md file on their page. what is this doing? https://gist.github.com/anonymous/6cb3e6c09f3688e2aea7 Nov 17 21:25:04 Peyam, are you going to publish to google play store? Nov 17 21:25:10 danijoo_, no Nov 17 21:25:30 are you publishing to any store? Nov 17 21:25:44 you can store the version number on some server and check for that value periodically + show a notification if it doesnt match the app version Nov 17 21:25:59 pretty much every store does that automatically for you Nov 17 21:26:19 that’s what I’d assume the code snippet is doing: Checking the server for the last released version, and checking against the current app version Nov 17 21:26:20 danijoo_, bitbucket Nov 17 21:26:57 but why does it control the version from README.md Nov 17 21:27:07 why not Nov 17 21:27:11 that’s where the guy thought it would be easiest Nov 17 21:28:34 realize it could be any file they chose. They could even have a file called Version.TXT, and do much the same thing. Nov 17 21:28:36 but how? how does it work? Nov 17 21:28:57 does it read a string in readme.md that says the version number? Nov 17 21:29:00 although I think Bitbucket and Github treat the Readme file a little special, and allow for getting that without the whole repo Nov 17 21:29:08 yeah. what else would it do? Nov 17 21:29:15 Peyam, did you read the code? Nov 17 21:29:28 but the readme.md file says nothing about the version Nov 17 21:30:10 are you sure? Nov 17 21:30:30 no Nov 17 21:30:35 It looks to be in Swedish, but it does look like there’s a “latest Version” section Nov 17 21:30:36 wait Nov 17 21:30:41 “ladda ned" Nov 17 21:30:43 yes Nov 17 21:30:44 yes Nov 17 21:30:52 and there’s a pair of hashes Nov 17 21:30:54 Do I need the MD5 code too? Nov 17 21:30:59 if you want to be safe Nov 17 21:31:34 Peyam, that code you posted shows how he/she checks version Nov 17 21:31:41 yes yes Nov 17 21:31:43 Now I got it Nov 17 21:32:04 Is there any downsite of running a syncadapter in the same process and not a seperate process like suggested in the docs? Nov 17 21:32:37 i believe it’ll be killed when your app is killed, kinda defeating one of the uses of a syncadapter4 Nov 17 21:33:03 if you don’t care about having stuff synced when your app isn’t running, like say, overnight, then i guess it doesn’t matter Nov 17 21:34:11 problem is when I dont have it in the same process i cant use the eventbus :p Nov 17 21:35:18 I think if its not in the same process it still triggers a sync at the given period Nov 17 21:35:59 the only edgecase would be if the app is in background and gets killed while a sync is running + user has minimized it so app + sync is running Nov 17 21:36:58 danijoo_, but my project is private. does it do anything? Nov 17 21:37:14 Peyam, i guess the app wont be able to see the readme then Nov 17 21:37:35 what can I do then :( Nov 17 21:37:48 store it somewhere else Nov 17 21:37:55 the readme is a shitty solution imo Nov 17 21:38:19 ohhh Nov 17 21:38:50 so actually I can put the readme.md on dropbox and give a link in it to the release? Nov 17 21:39:22 I need a view that essentially has nothing, just to occupy a column in a row. What do i need? Nov 17 21:40:12 you need google Nov 17 21:40:31 danijoo_, was it to me? Nov 17 21:40:36 no Nov 17 21:40:51 so do you know if my dropbox idea could work? Nov 17 21:41:04 dersand, der is a ¨space¨ view - im not sure if its a good idea though Nov 17 21:41:19 Peyam: All you need is to put some file somewhere online where you app can get it, and update it every time you update the app Nov 17 21:41:24 you can set row and column in xml to tell every view exactly where it belongs in the listview Nov 17 21:41:28 it literally does not matter where it is Nov 17 21:41:31 then you dont need space Nov 17 21:41:37 danijoo_: i could just do a textview with a character and put a zero visibility Nov 17 21:41:40 s73v3r, thank you. I will try it Nov 17 21:42:16 dersand, is a valid view in android Nov 17 21:42:30 just give it some width+height Nov 17 21:44:03 Peyam, if upon your app reading a file that says a new version is available, where do they get the update? Nov 17 21:44:55 canvs2321-, also from dropbox Nov 17 21:45:04 it should download the latest .apk Nov 17 21:45:48 I would advise against Dropbox for this Nov 17 21:46:10 Peyam, whats the reason for not using the play store? Nov 17 21:46:18 get yourself some $5/month cheap host, put both the APK and the version file up there Nov 17 21:46:46 dropbox wasn’t made for that, and will kill your link if they feel you’re causing them too much traffic Nov 17 21:47:10 danijoo_, I dont know. im tired of trying to upload and it gives me error Nov 17 21:47:31 2 times i got warning becouse of screen shots Nov 17 21:47:39 so fix them Nov 17 21:47:44 the rules aren’t hard to follow Nov 17 21:47:49 I dont want to risk anything. they say 3th time my account gets suspendend Nov 17 21:48:15 Peyam, the three times only count for banns Nov 17 21:48:22 not if they dont let you publish at all Nov 17 21:48:37 yeah, if they’re warning you before upload, you should be safe Nov 17 21:49:00 yes but its time consuming Nov 17 21:49:11 so is writing the app in the first place Nov 17 21:49:15 I m waiting and after 3 hours it says " can not be published" Nov 17 21:49:25 what have been their reasons? are you stealing content? Nov 17 21:54:05 yeah, 95% of the time, when someone complains about getting in trouble with Google, it’s cause they broke a rule that they knew they were breaking Nov 17 21:55:53 problem is rules are different around the world Nov 17 21:56:06 and sometimes google is just stupid Nov 17 21:56:14 something with expired copyright in US might not be expired in UK Nov 17 21:56:19 they’re not that different. Nov 17 21:56:49 and for the most part, Google is based in the US, so most of their rules reflect US rules Nov 17 21:56:50 s73v3r: [citation needed] :D Nov 17 21:56:59 i'm pretty sure we've all broken rules today that are illegal in some part of the world, maybe even your own that you don't know ;) Nov 17 21:57:08 I wouldn't be surprised if a lot of the complaints I read (here, on Reddit, etc.) are purely down to Google's imcompetence. Nov 17 21:57:20 incompetence* Nov 17 21:57:30 I would, mainly because most of the complaints that surface on Reddit, later end up being the poster’s fault Nov 17 21:57:46 TacticalJoke don't think its incompetence, more like /indifference/ but efficiency at applying mostly-working algorithm for mediation Nov 17 21:57:51 We're both just guessing, s73v3r. Nov 17 21:58:02 we're all just bags of water to google ;) Nov 17 21:58:07 with uuids Nov 17 21:58:25 s73v3r, inteesstingly if i put my syncadapter in a seperate process, it still gets killed if i swipe the app away (kill it) Nov 17 21:58:28 and of course, rules need to be interpreted Nov 17 21:58:34 i remember back when there would be a new post on getting banned every other day, and most of those ended up with the poster admitting they broke the rule, but thought they deserved special treatment due to not being commercial or something Nov 17 21:58:42 so the seperate process seems to have no effect on that Nov 17 21:59:07 ahhh. my mistake, then Nov 17 21:59:08 s73v3r yes, many idiots - but i know a few that got caught by mistake Nov 17 21:59:14 s73v3r, didnt expect that too Nov 17 21:59:21 My memory isn't the same -- I seem to remember it being about 50/50 on /r/androiddev. Nov 17 21:59:25 once you talk to those people, and realize you could be next , it changes things Nov 17 21:59:33 yes, there were a few who had legitimate gripes, but the majority of them did not Nov 17 21:59:39 * danijoo_ is one of those people Nov 17 21:59:52 i think adq also Nov 17 22:00:05 yeah. I had a long private talk with him once Nov 17 22:00:08 i'm waiting for it, when i have to provide a letter i can use the trademark Nov 17 22:00:15 People's memories of posts on Reddit aren't very realiable, really. You keep saying "Most people did X", but you're saying that based on zero real data. Nov 17 22:00:19 reliable* Nov 17 22:00:31 highlight detected, backlogging to understand (lol) Nov 17 22:00:36 It'd be interesting to see actual statistics here. Nov 17 22:00:37 haha Nov 17 22:00:51 Ologn also had problems Nov 17 22:01:19 ohh it's about the "play store gate" :> Nov 17 22:01:21 one thing you guys need to know: if any of your apps gets flagged, all your apps will get deranked even if legit Nov 17 22:02:08 I’m just saying, it’s not that hard to follow the rules. Especially the big one: Don’t do stuff with shit that isn’t yours. Nov 17 22:02:21 seems inevitable someday, your car insurance policy gets yanked in real time because you were over the speed limit for the 60th minute that month Nov 17 22:02:23 I've read about cases where the app is taken down by Google, the user appeals, the user wins the appeal, and the app is taken down two weeks later. Nov 17 22:02:25 yeah i saw the story about tasked, and also localCast Nov 17 22:02:35 https://plus.google.com/u/0/109720416927515295704/posts/Vph4KjPZ4LN removed for a permission -___- Nov 17 22:02:37 For the same reason despite no significant change in the app. Nov 17 22:02:50 s/tasked/tasker/ Nov 17 22:04:00 wouldn't that be funny if your google car stopped working because they shut down your account :D Nov 17 22:04:09 i want to be sarcastic but i'm refraining myself right now (and i did not look if play service use this _forbidden_ permission lol) Nov 17 22:05:24 the permissions nastyness is a completely legitimate complaint until they issue better guidance and/or do pre-publish checking, but the issues with trademarks and copyrights? Not so much Nov 17 22:05:42 does anybody know if .ts format files are playable. it doesnt play on my phone Nov 17 22:05:59 anything’s playable if you have the right codecs Nov 17 22:06:09 and the right player Nov 17 22:06:17 And speakers Nov 17 22:06:17 s73v3r what if using trademark by part requires ack on your play page that causes google spam trigger ? Nov 17 22:06:22 i've seen that happen also Nov 17 22:06:32 s/part/party Nov 17 22:06:38 The issues with trademark/copyright violation are sometimes wrong as well. Look at the history of Reddit apps on the Play store. Several people have had their Reddit app taken down despite having made it clear that they have permission to use Snoo in the icon or whatever. Nov 17 22:06:52 s73v3r, I use exoplayer Nov 17 22:06:56 pretty much any asshole can file a dmca and you're left to sort it out Nov 17 22:07:02 Peyam: Ask them Nov 17 22:07:04 Peyam, it's a developer channel Nov 17 22:07:34 whenever the onus is proving innocence vs proving guilt it a stacked game Nov 17 22:07:41 adq, Exoplayer is a library :p Nov 17 22:07:54 ok my bad :p Nov 17 22:08:14 did the same mistake when he asked the same question a few days ago :D Nov 17 22:08:27 :)) Nov 17 22:08:42 wonder if ppl won't a solution with so less details Nov 17 22:08:49 want* what a lapsus Nov 17 22:09:05 it’s a library, but it’s one that would have it’s own documentation, or at least the list of formats it handles Nov 17 22:10:04 i'm rewritting my own visualizer atm, the one shipped in the sdk of android has too many flaws (not mentionning it's 8bit pcm mono) Nov 17 22:10:40 also i think they made a mistake in converting down from 16bit pcm stereo to 8 bit mono Nov 17 22:11:06 corrupting the values in amplitude Nov 17 22:11:21 .ts should be supported but it doesnt play it. Nov 17 22:15:49 Anyone know if there is any build in "add"-icon. Like for a button? Nov 17 22:16:22 dersand: File > New > Vector Asset. Nov 17 22:16:47 need newer android plugin for gradle :( Nov 17 22:16:51 or romannurik.github.io/AndroidAssetStudio/ but careful, it was broken with chrome a week ago (works in ff though) Nov 17 22:17:33 s73v3r: Is there a problem with updating? I've had no issues with 1.5.0 (and 1.4.0-betaN before). Nov 17 22:18:02 we don’t want to take the risk on updating the build server when we’re supposed to release any day now Nov 17 22:18:31 we’ve been in, “Release is at the end of the week, oh wait, no, it’s being pushed back a week” mode for about a month now Nov 17 22:20:03 this really doesnt make sense.. why is android killing my service thats in a seperate process if the app gets killed -_- Nov 17 22:20:31 i'd love to see a good blog on how to do multi-process right Nov 17 22:20:38 me too. Nov 17 22:20:49 im searching for one right now. Nov 17 22:20:54 d.android.com hints at some gotchas ... Nov 17 22:21:09 how are you starting the service. i've never done seperate process stuff, but if start service with bind, upon unbinding it'll kill service, but if startService then bind, you can keep it runnin Nov 17 22:21:11 yeah but only a snipped here and there. Nov 17 22:21:14 in their process=remote section there but they only hint some dragons will be there Nov 17 22:22:01 its actually not a service, but a syncadapter in my case Nov 17 22:22:24 it runs every hour,but I just realized if i swipe the app away while its in a run, it gets killed to Nov 17 22:22:34 that should not happen imo Nov 17 22:22:47 does it get restarted for the next sync? Nov 17 22:22:51 if the app is there or already killed, it gets started and runs Nov 17 22:23:03 s73v3r, yes Nov 17 22:23:13 this is why this looks like a bug to mee Nov 17 22:23:25 or at least not intended behaviour Nov 17 22:24:23 agreed Nov 17 22:24:35 weird thought, but have you checked how swipe to kill works in the android code? maybe it is doing a deeper connecting to app Nov 17 22:25:15 no I havent. I just assume it does the same as a process kill because of low memory Nov 17 22:25:36 any ways, this is not what it should do for me but seems i cant hinder android from doing that Nov 17 22:26:54 it maybe connecting other processes based on manifest. Nov 17 22:27:04 Yeah i just read it up Nov 17 22:27:31 seems like a swipe away is supposed to kill everything related to the app Nov 17 22:27:40 app, syncs, foreground service etc Nov 17 22:27:45 that would make sense with what is happening to you Nov 17 22:28:45 In this case the only real benefit of having the syncadapter run in a seperate process is to have it not sit in the heap of the app Nov 17 22:28:56 danijoo_, swipe on several APIs does a kill -9 of your process Nov 17 22:29:08 Which means death to everything in it. Nov 17 22:29:10 Mavrik, thanks for the clarification maveric Nov 17 22:29:34 In this case ill keep it in the main process and dont bother about it Nov 17 22:29:55 makes it easier to publish status to the ui while syncing Nov 17 22:30:12 *shrug* It'll restart later anyway. Nov 17 22:30:50 Mavrik, yes. the thing is if the app currently is in foreground, i need to show some progress if its syncing syncing in the same moment Nov 17 22:31:04 Yeah, running in the same process makes sense. Nov 17 22:31:08 if its in the same process I can use otto to publish status events. If its in a seperate process i cant Nov 17 22:31:13 I wouldn't worry too much about swipe thing. Nov 17 22:32:24 is there a way to simulate app kill while the main app is in background? Nov 17 22:32:33 something like a pm command Nov 17 22:32:56 i think dont keep activities is not killing application, only actvities Nov 17 22:33:03 if Mavrik says the swipe does kill -9, can just issues kill -9 pid Nov 17 22:33:27 guess that may need root tho :/ Nov 17 22:34:00 yes but now i dont want a kill -9, but I want to see if a low memory kill also affects subprocesses (it shouldnt) Nov 17 22:34:01 danijoo_, set number of background processes to 0, use kill in console, press force stop in application settings (even though that has side effects), swipe it away :) Nov 17 22:34:17 does swipe really do kill -9? i thought it left the process there if it had a foreground service Nov 17 22:34:30 g00s, depends on API, on newer ones it does kill a process. Nov 17 22:34:42 g00s, http://stackoverflow.com/questions/14943793/swipe-away-my-application-from-the-recents-activity-kills-my-service Nov 17 22:35:19 screw it. i just keep it in main and dont care anymore. A delay of 1 hour in some rare edge cases is not worth investigating this too long Nov 17 22:35:44 are there any docs about that, seems something google should make clear to devs Nov 17 22:36:18 (swipe = kill -9) Nov 17 22:36:40 I havent found anything but SO posts in an hour Nov 17 22:36:49 sp there doesnt seem to be something official Nov 17 22:36:58 so* Nov 17 22:38:04 my thoughts/hopes with the swipe to remove from recent is to clear any&all presence(sp?) of an app. not to just remove the thumbnail of the app. I always assumed it would kill everything,but i've never tested with apps that keep services runnin yet Nov 17 22:38:46 yeah it kinda makes sense for forground services. If you swipe away a music app, you want the music to stop Nov 17 22:38:52 danijoo_, g00s, no it's not documented. Nov 17 22:38:57 i've had apps that have issues with being updated with data sometimes, so i swipe to start a fresh copy Nov 17 22:39:06 And it doesn't kill a spawned second process (see GPM for example). Nov 17 22:39:16 No idea what it does if you use the new API 21 multidocument feature. Nov 17 22:39:22 But it doesnt make so much sense to stop a mail client from synching mails in the background Nov 17 22:39:49 or stopping the sync triggered by a GCM message Nov 17 22:40:09 *shrug* depends how you look at it. Nov 17 22:40:16 User said "go away and stop using my resources". Nov 17 22:40:21 The sync will restart anyway. Nov 17 22:40:47 Mavrik, seems like it doesnt if its triggered by GCM Nov 17 22:41:12 at least the swipe away didnt trigger an exponential retry for me. it just stopped the sync Nov 17 22:41:26 confession: i swipe away pretty much everything until i find the app i'm looking for in recents Nov 17 22:41:37 so in this (rare case) a GCM notification would be ignored and could result in data loss Nov 17 22:41:55 at least on 6.0 the carousel thing is hard to parse Nov 17 22:42:14 g00s: I've noticed that new Sony devices have an easy-to-access "clear all" button in the overview screen. Nov 17 22:42:26 TacticalJoke, samsung too Nov 17 22:42:27 lol kill -9 * Nov 17 22:43:18 Right now there are like 50 things in my overview screen. :/ Nov 17 22:43:23 And I barely have any apps installed on this device. Nov 17 22:43:43 TacticalJoke, if you have enough RAM, the system can keep everything open Nov 17 22:43:46 in theory Nov 17 22:44:17 Just because you have the app there, it doesn't mean it's running. Nov 17 22:44:18 Yeah, but finding stuff in there is tedious. Nov 17 22:44:47 danijoo_, true. There's much to be said about treating GCM as a reliable delivery. Nov 17 22:44:50 Mavrik, doesnt it mean that at least the process is still alive Nov 17 22:45:04 danijoo_, not on 5.x + Nov 17 22:45:10 good to know Nov 17 22:45:17 It's a pretty much infinite list Nov 17 22:45:23 Or limited to something large :) Nov 17 22:46:28 might depend on how many screenshots the corresponding app can keep in cache ^^ Nov 17 22:46:40 launcher app or whatever does this Nov 17 22:48:08 The cache is maintained by the OS and it's stored to the disk :) Nov 17 22:48:21 After all they persist across reboots :) Nov 17 23:03:49 hurr, in Android Studio when you generate a Fragment (List) it asks you if it should switch to grid on larger devices, when you select the option it generates additional view but nothing changes when I use the application on a bigger device. How is this supposed to work? Nov 17 23:08:26 is your bigger device big enough? Nov 17 23:14:09 fighting urge not to make a ‘Your mom thinks it’s big enough’ joke Nov 17 23:16:41 It asks to switch to a GridView on larger screens? Not sure I like the sound of that. Nov 17 23:17:00 Having a whole different UI on larger screens isn't exactly pure simplicity. Nov 17 23:17:18 depends on the content you’re using Nov 17 23:17:40 i think the example stems from the “Making Beautiful Apps on Android” series from a couple years ago Nov 17 23:18:02 The fact that the wizard does this by default doesn't sit right with me. Nov 17 23:18:23 As if "Yeah, use a different UI on large screens" is just some afterthought. In reality, it's often way more work, way more bugs, etc. Nov 17 23:18:31 smaller screens have a listview with a thumbnail on the left, bigger screens had a two column list with the cell having a larger thumbnail above the title Nov 17 23:18:32 I havent used the AS scaffolds for a long time Nov 17 23:18:44 it sounds like it asked if you wanted to do it Nov 17 23:18:49 Same here, danijoo_. Also, on this topic, I don't think I'd ever use ListFragment. Nov 17 23:18:51 From the questions here they seem to become worse and worse Nov 17 23:19:00 s73v3r: No, it does it by default. You have to opt out. Nov 17 23:19:09 Sure, it tells you, but it's selected by default. Nov 17 23:19:42 TacticalJoke i came to the conclusion poking through all the gapps that google has scaled back its effort wrt responsive design on large devices; i could only find master/detail in gmail. pretty much every other app has minimal accomodations for large screens Nov 17 23:19:44 I checked before responding. (I don't use these wizard things.) Nov 17 23:19:48 not much more than extra padding Nov 17 23:19:55 Yeah, I've noticed that. Nov 17 23:20:01 I guess they just don't have the time or something. Nov 17 23:20:19 and they wonder why people don’t buy android tablets Nov 17 23:20:25 the new thing on big devices seems to be a big background in one color, and then just the phone layout as card Nov 17 23:20:39 wat? Nov 17 23:20:45 take for example Contacts, it used to be master / detail. but now its not ... and in the detail screen, on tablets, they just fill the left 1/3 with a useless stick figure icon Nov 17 23:21:10 superfluous graphics are no no, man that goes back to cooper like 15 years ago Nov 17 23:21:25 danijoo_ yeah i noticed that too Nov 17 23:21:56 so why would anyone bother buying a tablet if they’re going to get the app looking the same as it is on the phone, just blown up a bit, but not using the extra space? Nov 17 23:22:23 well they look nice but the information density is about the same Nov 17 23:22:23 because its still nicer to browse the www on a tablet while sitting on your couch Nov 17 23:23:31 that’s probably the one thing. and even then, I’m not sure the cost is worth it Nov 17 23:23:50 s73v3r, im with you Nov 17 23:24:06 I have one and I barely use it Nov 17 23:24:09 only for debugging Nov 17 23:24:38 Yeah, I almost never used my tablet outside of debugging. Nov 17 23:24:44 yup. i barely used my Nexus 7. I use my iPad all the time, though Nov 17 23:25:39 apple said they won't make iPads like a general purpose device (Surface) Nov 17 23:25:45 that means they will but are behind schedule Nov 17 23:25:46 Maybe Android should become a phone OS. :D Nov 17 23:25:49 Would make our lives easier. Nov 17 23:26:16 i think android will become IoT platform and Chrome will become phone / tablet / desktop Nov 17 23:26:32 (brillo). so those guys will be build on android Nov 17 23:26:38 thats my bet anyhow Nov 17 23:27:24 it’s kinda hard to blame developers to not take the time to make apps tablet ready when Google won’t really do it Nov 17 23:28:02 i also suspect android java framework will be a "Player" on chrome, but they will give framework for doing desktop / chrome / phone thats different Nov 17 23:28:06 if it's such a problem, don't use their apps. Use something that works for you Nov 17 23:28:51 the problem is, nobody is making their apps tablet supported, because they don’t see the need Nov 17 23:29:04 * g00s is making tablet app because all i have is N7 :P Nov 17 23:29:07 and so I gave in, and got an ipad Nov 17 23:29:12 they may not know how android works :/ Nov 17 23:29:15 g00s: You don't have an Android phone? ;o Nov 17 23:29:21 no Nov 17 23:29:22 sw-600dp ftw :) Nov 17 23:29:46 g00s: If you get desperate then the E2 is good. Nov 17 23:29:49 Amazing for the price. Nov 17 23:30:00 Feels like a premium handset. Nov 17 23:30:02 need to be able to flash updates up and down easily ... Nov 17 23:30:07 i would only do a nexus Nov 17 23:30:22 By "feels", I meant physically. Nov 17 23:30:54 Actually feels kinda like one of those stress balls. Nov 17 23:30:58 That soft-ish feeling. Nov 17 23:32:22 ugh, MergeJavaResourcesTransform has no proper support for incremental processing at all, wtf builder 1.5.0 Nov 17 23:33:58 gotta fix that to outdue whatever Cedric was makin Nov 17 23:34:47 I hope CB's thing takes off. Gradle is about as fast an arthritic tortoise. Nov 17 23:35:01 :) Nov 17 23:35:03 So I've been handed an existing Android project and I'm trying to wrap my brain around something. We support 4.0+, so that's Sdk version 14. Target SDK is 21. I am trying to compile on the minimum target version but get errors: "Attribute '...' has already been defined' 'Error retrieving parent for item: No resource found that matches...', 4 errors in total. Compiling under 21 works fine. Can anyone clue me into w Nov 17 23:35:03 hat's going on? Nov 17 23:35:25 xml stuff Nov 17 23:35:43 that matches what? Nov 17 23:36:13 e.g. "Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. Nov 17 23:36:28 I'm actually thinking of suing Gradle, Inc., for being a key player in the slow death of my hard drive. Nov 17 23:36:58 makes sense if you aren't setting themes dependant on api and you are using Material on <21 without support usage. need more detail Nov 17 23:40:34 Let me try a different tack. Is it necessary to compile against the older version of the SDK to test, or is it sufficient to compile using a later SDK, and run on the emulator as an older API? Nov 17 23:41:05 write your code based on apis you allow Nov 17 23:41:17 It's enough to compile against a new version and run on an old version. Nov 17 23:42:33 TacticalJoke, but if compile against new version and older versions don't have the adherence to new apis, you need legacy or code to work with older Nov 17 23:43:09 canvs2321-: right, I get that part. Nov 17 23:43:11 Oh, I thought he meant "Can I reproduce this problem even if I compile against a new version". Nov 17 23:43:26 you'll get lint errors etc for older, or won't compile if don't use some kind of fix Nov 17 23:44:13 TacticalJoke, he hasn't specified what code yet, so it's all in the air Nov 17 23:46:53 Various WebView overrides that have changed over time; I am attempting to test code paths going back to ICS. As regards the first question, apparently I have screwed something up because setting the compile SDK back to 21 hasn't fixed the problem, so I'll have to find out what happened there Nov 17 23:49:08 wow did google remove Tasker ? Nov 17 23:50:16 TheComrade: I'm confused -- why would changing `compileSdkVersion` fix anything here? Nov 17 23:50:17 ah tasker dev used REQUEST_IGNORE_BATTERY_OPTIMIZATIONS Nov 17 23:51:05 TheComrade: It might help if you could reduce your question to a simple sentence. :D Nov 17 23:51:11 Though I know that's not always easy. Nov 17 23:51:50 TacticalJoke: I have almost no knowledge of the ecosystem here, so I'm kind of guessing. I was originally going down the path of altering the compile sdk stuff in a few places, trying to build against an older SDK, but apparently I'm hearing that is not necessary. Which is great. When I tried to move it back, my build errors remained, but I found what changed and fixed it - some Studio magic added some stuff into Nov 17 23:51:50 the gradle config. Nov 17 23:52:09 TheComrade guessing with gradle won't work, its pretty complex Nov 17 23:52:19 you'll have to spend some time reading the docs Nov 17 23:52:35 danijoo_: I created a Nexus 10 device and it still displays a ListView. Nov 17 23:53:28 is it in portrait or landscape? Nov 17 23:54:11 Landscape. Nov 17 23:55:22 do you have a grid cell and a grid layout made? Nov 17 23:56:21 Yes, android studio generates fragment__{grid,list}.xml files. Nov 17 23:56:44 Quintasan: IMO, it's best to implement this stuff manually at first. It's hard to learn when a wizard just generates a bunch of stuff. Nov 17 23:56:50 Or not touch it if you don't want it. Nov 17 23:57:20 agreed Nov 17 23:57:30 I guess you could learn from what it generates, but this whole thing seems questionable to me. Nov 17 23:57:50 My biggest gripe with Android so far is that there is no "good patterns" in the documentation. Nov 17 23:58:04 define what you mean by “pattern" Nov 17 23:58:20 Like is using a navigation drawer with activities a good idea. Nov 17 23:58:24 there are software design patterns, ui design patterns, and usage patterns Nov 17 23:58:39 The guide uses Fragments but says nothing about using activities in that scenario. Nov 17 23:58:40 From what I've seen of Android, Google doesn't always have a good grasp on good patterns for Android development. Nov 17 23:58:47 Yes. Nov 17 23:58:55 Exactly what I meant. Nov 17 23:59:08 fragments need an activity Nov 17 23:59:21 And sometimes the official documentation recommends things that are just bad (e.g., AsyncTask as a general threading solution). Nov 17 23:59:28 Is there any inkling as to when Android Pay might be coming to the UK? Nov 17 23:59:39 That said I was wondering if it was me doing it wrong or this generator doesn't actually work and I should file a bug report. Nov 18 00:00:01 Quintasan: The best way to tell is to look at the resources it generates. Nov 18 00:00:07 Quintasan, Fragments need an Activity Nov 18 00:00:17 There's just too much discrepancy between the current state of API and the IDE. Nov 18 00:00:31 it's just a lack of understanding Nov 18 00:00:33 TacticalJoke: The irony here is that it just generates the views but not the logic. Nov 18 00:00:41 it should be doing so Nov 18 00:00:44 Quintasan: The framework should take care of the logic. Nov 18 00:00:55 do you guys use data binding ? Nov 18 00:00:58 It's all about naming and stuff with those resources. Nov 18 00:01:01 there should be an XML file with the name of a fragment Nov 18 00:01:14 (Assuming we're talking about different-screen logic.) Nov 18 00:01:15 canvs2321-: I know that, I was asking about if menu entries should fire up new activities or use fragments. Nov 18 00:01:19 and based on if the screen is big enough, it’d return the grid or the list Nov 18 00:01:29 Quintasan, no Nov 18 00:01:33 you weren't Nov 18 00:01:37 GrecKo: Haven't used it yet. Nov 18 00:01:40 no mention of menus Nov 18 00:01:51 it’s easiest to use fragments with the drawer, but it’s entirely possible to do Activity. Nov 18 00:02:11 and again, you can't just fire up a fragment, it needs an activity Nov 18 00:02:46 i'm hoping they get rid of activities, so its just fragments all the way down. and you get a context, and can register listeners for certain things if you want. Nov 18 00:02:49 i’m fairly certain they’re referring to the activity that’s holding the drawer in the first place Nov 18 00:03:16 g00s: I hope not. I'm an activity kinda guy. :D Nov 18 00:03:18 who is they? Nov 18 00:03:31 they is dianne :) Nov 18 00:03:32 I'm not a java guy but the tool I usually use a comparable approach (a declarative UI) so this seems like a good idea for my pet projet Nov 18 00:03:35 s73v3r: So I'm probably doing it wrong then. I generated an Fragment (List), bound that to activity and it still uses ListView. Nov 18 00:03:35 Quintasan Nov 18 00:04:15 possibly. I believe the auto-generator stuff should generate everything you need Nov 18 00:04:54 TacticalJoke if they got rid of activities they could probably simplify Fragments, no need for onActivityCreated right ? Nov 18 00:05:03 Yeah, that could be cool. Nov 18 00:05:26 Maybe they could introduce a new Screen (or something) class that's simple and powerful. Nov 18 00:05:27 canvs2321-: To make it clear for you – what I was saying is that there is no mention of firing up Activities from Navigation Drawer. The guide uses Fragments but says literally nothing about using Activities where it's reasonably easy to use them. Not even "You can fire up new Activities using Navigation Drawer but we don't recommend it" or anything. Nov 18 00:05:31 i think there should just be one composeable abstraction for the controller side of things, besides application Nov 18 00:05:38 This stuff should be really easy. Nov 18 00:05:54 Quintasan, don't direct to me Nov 18 00:06:02 Quintasan: It’s not really recommended to do so, but it’s possible to hack things together to do it Nov 18 00:06:38 Why can't he direct to you? He's responding directly to what you said. Nov 18 00:06:46 false Nov 18 00:06:54 True. Nov 18 00:07:12 i never commented on Navigation Drawer use Nov 18 00:07:12 true Nov 18 00:07:16 canvs2321-: Please don't turn this into another ##java. Nov 18 00:07:29 you were responding to what they were saying regarding activities Nov 18 00:07:38 you didn’t understand their question Nov 18 00:07:45 Yeah, no activity = no fragments Nov 18 00:08:15 who is they Nov 18 00:08:20 you keep saying they Nov 18 00:08:31 Quintasan Nov 18 00:08:34 haha Nov 18 00:08:39 Leave it be, he was too quick to jump the gun and forcing him to admit he was wrong is not going to yield any profit. Nov 18 00:08:40 they = more than one Nov 18 00:08:41 the exact conversation we’re having about Nov 18 00:08:53 they is also an indirect pronoun Nov 18 00:08:55 "They" can be used as a gender-neutral third-person pronoun. Nov 18 00:09:01 Even in the singular. Nov 18 00:09:07 good luck with that Nov 18 00:09:53 is this worth the fight? Nov 18 00:10:18 They is also a colloquialism in the South-West of England for "them". Nov 18 00:10:22 "I'll have one of they" Nov 18 00:10:26 Sometimes the fight is more subtle: ##java-style communcation versus civilization. :D Nov 18 00:10:49 i dunno. it’d be nice to not have as much meanness in the channel, especially toward people asking questions Nov 18 00:11:33 Yeah, the ##java thing is "I don't recognise your name, and you have a question I can't answer in an instant, so you can go die in a fire". (To be fair, though, I haven't been there in a long time. Maybe they've changed.) Nov 18 00:12:06 i would hope, but i wouldn’t be surprised Nov 18 00:12:29 his questions was should menu selections fire a new activity or fragments. answer that Nov 18 00:13:01 They already did. Nov 18 00:13:13 then next Nov 18 00:13:13 we did. you went off talking about fragments needing an activity, like they’re an idiot Nov 18 00:15:51 Quintasan: In general, though, I'm not sure I'd recommend ListFragment, since it adds a bunch of complexity with little or no benefit. Nov 18 00:16:58 agreed. If you’re using entirely built in stuff (no custom adapters, or fancy list cells) it’s ok, but the second you need to do something slightly different, you’re better off going your own Nov 18 00:17:17 TacticalJoke: New -> Fragment -> Fragment (List) generates a class extending Fragment. Not ListFragment. Nov 18 00:17:57 hahah Nov 18 00:18:15 i wonder if that’s to accomodate the possibility of using a gridview Nov 18 00:18:37 which uses AbsListView so I'm getting even more confused about why it's not working when bound to a FrameLayout inside of an Activity. Nov 18 00:19:25 could you show the part where the activity creates the fragment? Nov 18 00:20:06 Hmm yeah, actually this reminds me it would be a good idea to put this in a git repository. Nov 18 00:23:40 s73v3r: https://github.com/Quintasan/KulturalnaMapaWroclawia/blob/master/app/src/main/java/me/michalzajac/kulturalnamapawrocawia/activities/MainActivity.java#L77-L115 Nov 18 00:26:28 Quintasan: Did the wizard generate that code which uses reflection? Nov 18 00:28:08 No, that's my hackery. The wizard adds no code to handle fragment loading save for ifelse based on item.getItemID() Nov 18 00:28:54 Oh. Why do you use reflection there? You can just call the constructor. Nov 18 00:29:56 You can just say `fragment = new EventFragment();` and so on. Nov 18 00:29:57 you don't call constructors Nov 18 00:30:01 canvs2321-: Gtfol Nov 18 00:30:03 Gtfo.* Nov 18 00:30:18 TacticalJoke: I guess too much of Ruby. I just don't really fancy pasting fragmentManager.beginTransaction() and so on in every branch. Nov 18 00:30:36 But yeah, that's an option. Nov 18 00:32:09 You guys are soooo close Nov 18 00:37:52 Just factory reset my phone, its turned back on....and not reset - still has all my accounts etc added - bit annoying... Nov 18 00:40:33 TacticalJoke, regarding your comment about ##java - I've been frequenting there a bit, and to be fair they are a LOT nicer than when I first went in. Nov 18 00:41:50 Anthaas: A factory reset should clear it all. Are you sure you didn't uncheck the "clear everything" (or whatever it's called) setting? Nov 18 00:42:55 TacticalJoke, running a second time, didnt see any option though... Nov 18 00:46:44 is it possible to test SQLite things in robolectrics? Nov 18 00:47:25 I'm trying to get some tests running and if I try to do it as a connected test, I can't get it to find my tests it says "no tests found", if I try with robolectric I keep erroring out at NPEs in different classes Nov 18 00:47:34 and I'm not sure if I'm making progress or not in the robolectric route Nov 18 00:47:49 yes Nov 18 00:48:19 how do you do it missingno Nov 18 00:48:28 i mean do you use robo or androidTest ? Nov 18 00:48:29 uh I just do Nov 18 00:48:34 oh Nov 18 00:48:37 robolectric Nov 18 00:48:44 okay Nov 18 00:48:47 I have setUp methods that load test data in Nov 18 00:48:53 I'll keep trying this way then since I've made better progress so far Nov 18 00:49:06 only issue I had was clearing stale sqlite connections between tests Nov 18 00:49:18 well my code should be setting up the tables too at runtime Nov 18 00:49:29 or does it not work for test? Nov 18 00:49:37 that works Nov 18 00:49:59 problem is I didn't really write the original code that I'm testing so I'm not too sure how it works lol Nov 18 00:50:25 right now it's crashing in my ContentProvider class Nov 18 00:52:34 oh Nov 18 00:52:34 I'm silly Nov 18 00:52:38 I can use some assertions here I guess since junit is running -ea Nov 18 00:57:33 can a animated gif be converted to a byte array? Nov 18 00:58:05 s73v3r: So, any ideas? :D Nov 18 00:59:02 I am trying to run certain system images from Studio in the emulator. Certain downloadable images are disappearing after they are installed.. meaning they are just gone from the list of downloadable images. Has anyone seen this behavior? Nov 18 01:00:31 the view inflation, did you touch that part? the onCreateView? Nov 18 01:01:52 orbyt_: What do you mean by "an animated GIF"? You mean a android.graphics.Bitmap that holds an animated GIF? Nov 18 01:01:55 an* Nov 18 01:04:33 anyone here worked w google cloud storage? Nov 18 01:04:57 I really like the aws s3 sdk but I can't make the head or tail of gcs :( Nov 18 01:05:12 TacticalJoke: Just take a regular animated .gif and convert it to a byte array in any way possible Nov 18 01:05:45 s73v3r: In POIFragment – yes. In any other fragment – no. Nov 18 01:05:59 this is interesting, Google Photos uses Nav Drawer, but you can swipe between pages (they are in a viewpager) as if they were in tabs. Nov 18 01:06:07 that might be it Nov 18 01:06:22 s73v3r: EventFragment doesn't work either. And I didn't touch that. Nov 18 01:06:45 TrailFragment? Nov 18 01:06:51 ListView as well. Nov 18 01:07:07 It might be a problem with the emulator but hell if I know. Nov 18 01:07:15 orbyt_: Where is the animated GIF? On disk? Nov 18 01:08:03 well, what should be happening is that something should be looking at the refs.xml to decide what layout to use Nov 18 01:08:10 TacticalJoke: Well itll probably be pulled remotely but by the time it needs to be converted yes it will be local Nov 18 01:08:23 orbyt_: A file on disk is just a bunch of bytes. No conversion is necessary. Nov 18 01:08:35 inside values-sw600dp, it defines using grid layouts. in the others, it defines using list layouts Nov 18 01:09:12 Is there a way to force a new version of Android to use the fallback/compatibility behavior of a view? Specifically, CardView: "CardView uses elevation property on L for shadows and falls back to a custom shadow implementation on older platforms." What I really want it to do is fall back on the custom shadow implementation even on new Android versions Nov 18 01:09:13 anything can be converted to a byte array orbyt_, you have to care of endianess and if you use more than 1 byte for a data sample Nov 18 01:09:20 as a test, go inside values/refs.xml, and change that to use the grid layouts Nov 18 01:10:11 now it works Nov 18 01:10:24 bleh, how is Nexus 10 not big enough. Nov 18 01:11:17 that i do not understand Nov 18 01:11:43 At least I know that it works. Nov 18 01:11:47 s73v3r: Thanks. Nov 18 01:15:32 adq TacticalJoke hmm weird I remember building having to convert images manually to a byte array in a previous application, ill have to just try it i guess Nov 18 01:16:04 i remember having* Nov 18 01:16:39 i think we have an XY problem again with you orbyt_ Nov 18 01:16:58 adq: what? Nov 18 01:17:01 what you ask for, which is technically possible, might not be what you want for solving the issue you did not very explain Nov 18 01:17:14 orbyt_, http://xyproblem.info/ Nov 18 01:17:30 Nice site. Nov 18 01:17:53 well my question was is it possible to convert a .gif to a byte array, kinda straight foward. Nov 18 01:18:06 ranked first when googling "xy problem" lol Nov 18 01:18:17 well, and meta.stackexchange Nov 18 01:18:35 orbyt_: To load a file into a byte array, it's just a case of reading it in, regardless of what the file contains. Nov 18 01:18:36 orbyt_, already answered Nov 18 01:19:00 adq: I know it was answered.... Nov 18 01:19:36 gif is compressed with LZW fyi, and few more metadata for animation Nov 18 01:19:46 it's not a regular bitmap where each pixel contains the color value Nov 18 01:20:03 but anything is bits, so anything is bytes Nov 18 01:21:02 my build takes about 15 sec, but xfer to device + AOT compilation takes another 15 sec about - is there any way to speed the 2nd part up ? Nov 18 01:21:10 adq: I suppose that was the core of my question, I know the gif has that metadata for animation, so was wondering if there would be an issue when converting back to a gif from a byte[] for displaying Nov 18 01:21:59 almost want to put kitkat back on the device :D Nov 18 01:22:02 i don't think it should be an issue, and your gif to bytes conversion must be non destructive, in both way (bytes to gif too) Nov 18 01:22:10 you can checksum the output result to verify that Nov 18 01:22:15 but we are far from android atm Nov 18 01:22:53 g00s, i'm still using few vm with the dalvik runtime Nov 18 01:23:05 it's much faster to directly deploy, since no art post-comp Nov 18 01:23:24 it's annoying they removed the .so of dalvik on latest android :' Nov 18 01:23:31 g00s: One thing I like with my E2 is that I get so little scrolling lag in my ListViews. I wonder whether it's ART. Nov 18 01:23:53 i think they should put the AOT compiler in platform-tools so the build system can do it on a better machine Nov 18 01:24:03 and ship the ready binary Nov 18 01:24:09 s/ship/upload Nov 18 01:24:18 yeah but that would mean art compil is indep of the device target Nov 18 01:24:43 i think it does few things/optimizations based on the device, arch & stuff, but i never looked into it Nov 18 01:24:54 at least that what renderscript is doing with the bytecode Nov 18 01:25:23 maybe, but in all reality, there’s only a couple of processor families being used Nov 18 01:26:46 Is an Android simlator still feasible? I lost track over the years of discussion. Nov 18 01:26:50 simulator* Nov 18 01:26:53 also, pushing an apk 10000 times per day is bad, but there is no choice for looking at UI changes, the wysiwyg of AS is a big fail most of the time, even worst with customviews & deep hierarchy Nov 18 01:27:33 agreed. for me, it always complains about CardView, even if I don’t have a cardview in the layout Nov 18 01:27:36 kinda wish they didn't bother with UI designer but improved the preview Nov 18 01:27:37 TacticalJoke, unrelated to android though they are focusing on it a bit recently, but the JUCE framework got with their "projucer" something called ICE Nov 18 01:27:37 The ICE ('Instant Compilation Environment') Engine is a toolchain that allows programmers to compile C++ in real time. Nov 18 01:27:45 you can change in real-time the code, it's awesome Nov 18 01:27:57 i saw a demo of it with some opengl & audio stuff Nov 18 01:28:06 * g00s remembers when ICE was in circuit emulator Nov 18 01:28:36 i found that pushing apk to a local vm (genymotion or visual studio emulator) is the fastest path/road atm Nov 18 01:28:47 gradle + AS is still the bottleneck Nov 18 01:28:58 Speaking of cool stuff – I wish Scala was viable as a platform for Android. Nov 18 01:29:04 This is part of why I have a lot of JVM unit tests. Nov 18 01:29:07 Quintasan pfn uses it Nov 18 01:29:09 Also because it's just simle. Nov 18 01:29:10 simple* Nov 18 01:29:21 ohh protify is using ICE? Nov 18 01:29:23 awesome Nov 18 01:29:54 g00s: My biggest gripe is that I still can't make heads or tails out of how to configure anything to get started. Nov 18 01:30:12 Quintasan: If you want just a better language than Java, Kotlin is great (and almost 1.0). Nov 18 01:30:27 It's not quite as revolutionary as Scala, but it's viable. Nov 18 01:30:38 and Ceylon support is coming soon Nov 18 01:30:53 which seems to sit between Scala and Java Nov 18 01:31:07 and rust compiled lib workso n android too Nov 18 01:31:10 I should learn Ceylon. I just got put off by the site. Nov 18 01:31:19 TacticalJoke: I'm probably going to use something else for proper development but currently I'm writing my engineering "thesis" and I'm not sure I can pull it off. Nov 18 01:31:19 just reading Scala is taking off because of Apache Spark Nov 18 01:31:21 hype everything, all-the-thing Nov 18 01:31:43 Quintasan what is the thesis about ? Nov 18 01:32:41 g00s: It's not a proper thesis but I don't know if there is more proper word for this. In short you're supposed to design and implement something CS related (since I'm studing CS) Nov 18 01:32:54 So I'm implementing a cultural map of my city. Nov 18 01:33:06 Quintasan what is a cultural map ? Nov 18 01:33:22 doesn't sound to CS-y :) Nov 18 01:33:38 this neighborhood over there uses scala Nov 18 01:33:52 the russian parts use kotlin Nov 18 01:34:18 g00s: Theaters, philharmonies and associated events. As well as what I call trails – for example a route that takes you through all buildings desgined by a certain architect. Nov 18 01:34:34 can anyone help me recompile this app Nov 18 01:34:42 the source is on github but i cant seem to make it run inside eclipse Nov 18 01:34:52 i know it's possible because people have done it before.. Nov 18 01:34:56 ecofriendly forget about eclipse Nov 18 01:35:05 i tried in android studio as well. Nov 18 01:35:15 .still no luck Nov 18 01:36:06 you probably don’t have your dependencies set up Nov 18 01:36:37 I'm trying to debug a webview in Android, but Chrome cannot connect to it. I set up a localhost port to forward the webkit debugging port in the device, but I cannot connect to that socket... Any ideas what might be happening? Nov 18 01:36:59 g00s: Looking at it's quite simple but I started like two days ago with prior experience. Nov 18 01:37:12 I'm quite surprised it's going this smootly. Nov 18 01:37:15 wut? Nov 18 01:37:40 scala is a perfectly viable platform for android Nov 18 01:37:53 is there a way to see compile errors from within android studio or am I forever doomed to running the task again from the command line to see them? Nov 18 01:38:06 adq, yes, protify is instant-compilation Nov 18 01:38:20 Quintasan, I put a lot of effort to make it stupidly easy Nov 18 01:38:22 i really need to try it, sooner or later :) Nov 18 01:38:51 adq, doesn't support renderscript or ndk, though (i.e. no instant-compile for those) Nov 18 01:38:56 pfn: oh, sbt or Android Studio or what? I found like two or three different guides to Scala on Android and all of them had me running in circles. Nov 18 01:39:02 I'll add ndk/rs support in 1.2 Nov 18 01:39:06 pfn, yeah but for xml ui, i saw your vid Nov 18 01:39:09 Quintasan, sbt is the one true way Nov 18 01:39:18 adq, 1.2.0 will add rs/ndk support Nov 18 01:39:19 or at least ndk Nov 18 01:39:22 o/ Nov 18 01:39:37 and for that matter, rs support probably works in 1.1 already Nov 18 01:39:37 grekkos: Yes, you can see compile errors in Android Studio. Nov 18 01:39:43 since rs is compiled to res/raw Nov 18 01:39:44 Why do you think otherwise? Nov 18 01:39:50 and protify incremental deploys rs Nov 18 01:39:52 it should just work Nov 18 01:39:52 right Nov 18 01:39:58 er, res Nov 18 01:40:27 awefawfaw: you don't need to port forward to debug Nov 18 01:40:51 Quintasan, there is no better way than using sbt Nov 18 01:40:55 I don't think anyways, it just magically worked in linux/desktop chrome Nov 18 01:40:56 all the .bc go into res/raw, the .so are in the traditional lib folder Nov 18 01:40:59 even for java projects, sbt is the best way Nov 18 01:41:11 adq, yeah, but the .so never change; those are just support/platform implementations Nov 18 01:42:08 g00s, protify is how you speed it up :p Nov 18 01:42:12 g00s, you can try vmSafeMode as well Nov 18 01:42:18 but protify is fasater Nov 18 01:43:20 never heard of vmSafeMode, is that device, manifest, or gradle option ? Nov 18 01:43:37 pfn: is there any reference for setting up the dev environment for scala? I found Macroid and scaloid tutorials but I can't say I could get that running. Nov 18 01:43:52 Nov 18 01:44:08 Quintasan, quick start guide on android-sdk-plugin page Nov 18 01:44:21 sbt "gen-android android-23 package.name activityname" Nov 18 01:44:23 import into intellij Nov 18 01:44:25 go from there Nov 18 01:45:14 Thanks. I'll probably rewrite it when I'm done with the thesis. Nov 18 01:46:01 wow, TIL http://stackoverflow.com/questions/31174713/override-androidvmsafemode-attribute-for-debug-builds Nov 18 01:46:13 thx pfn Nov 18 01:46:16 g00s, but the speed increase is next to nothing Nov 18 01:46:20 if you want *fast*, use protify Nov 18 01:46:52 hello what is your favorite recyclerview stickerheaders lib Nov 18 01:47:00 I ask cuz the one I am using is NPEing Nov 18 01:47:14 missingno is it jacobabak's ? Nov 18 01:47:22 https://github.com/timehop/sticky-headers-recyclerview Nov 18 01:47:25 yes? Nov 18 01:47:29 What happened to JacobTabak? Nov 18 01:47:40 well he committed something 7 days ago Nov 18 01:47:41 he used to hang out here, haven't seen him lately Nov 18 01:47:53 so 7 days ago he was not hit by a bus Nov 18 01:49:31 shh everyone quiet Nov 18 01:49:57 maybe I am not understanding the "registerAdapterDataObserver" part of the readme Nov 18 01:56:15 nope still NPEs Nov 18 01:58:07 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.support.v7.widget.RecyclerView$ViewHolder.shouldIgnore()' on a null object reference at android.support.v7.widget.RecyclerView.findMinMaxChildLayoutPositions(RecyclerView.java:2973) Nov 18 01:58:12 if anyone cares Nov 18 01:59:18 huh that is googleable Nov 18 02:02:53 crud I was hoping this random stackoverflow post I found would solve it Nov 18 02:02:58 o well Nov 18 02:04:59 i feel like most of the duhroach perf patters avoid the interesting scenarios. like this last one on services Nov 18 02:06:02 missingno: Is it a LayoutManager thing? Nov 18 02:29:17 Is anyone using a newer version of Gradle and getting better performance? Nov 18 02:29:32 People on /r/androiddev don't seem to think it's better on Android (despite being better elsewhere). Nov 18 02:29:53 Allegedly better elsewhere, anyway. Nov 18 02:29:55 Hi I registered the step_detector_sensor like so: Nov 18 02:30:03 mSensorManager.registerListener(this, mStepDetector, SensorManager.SENSOR_DELAY_NORMAL, 20 * 1000 ); Nov 18 02:30:21 it just keeps getting called repeatedly even though the phone isnt moving Nov 18 02:30:50 this before: mStepDetector = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR); Nov 18 02:31:49 can anyone tell me how to only make it trigger upon an actual step? Nov 18 02:56:58 Anyone have experience with using Messaging intents or Email intents? Nov 18 02:57:26 I have the intent open so the user can send a text or an email, but I want it to close after the message is sent, so the user returns back to my app Nov 18 02:57:29 Not sure if theres a way **** ENDING LOGGING AT Wed Nov 18 02:59:59 2015