**** BEGIN LOGGING AT Mon Mar 13 03:00:01 2017 Mar 13 03:12:29 SomeoneÉ Mar 13 03:12:31 ? Mar 13 03:14:20 use a service Mar 13 03:39:04 Something like this bankai_? https://gist.github.com/Redrield/a9ace45580bc2e20486728173a2968d9 Mar 13 04:23:56 Nope... That won't work Mar 13 04:24:05 How can I just have a handler being bound once Mar 13 04:24:17 service rather Mar 13 04:24:32 I need to find a way to only have that code block run when the app first starts up Mar 13 04:30:20 Is using IMEI of device good for validation purpose? I want to validate each device which uses my app. Is there any other method better than this? Mar 13 04:37:35 Can anyone please help? Mar 13 04:37:51 what do you mean "validate" Mar 13 04:38:52 p_l: i want my app to run on certain known devices only. For this purpose, I have registered their IMEI with backend and validating it upon login. Mar 13 04:40:21 Ali_Waris: How do you validate and who has control etc. over the device? Mar 13 04:40:35 p_l: but i read that using IMEI for such purposes is not recommended, my question is, what is the other unique thing which can identify each device independently. Mar 13 04:41:06 Ali_Waris: there's a Device ID that is regenerated when the device is wiped Mar 13 04:41:13 which is probably a better way Mar 13 04:41:32 p_l: the user has to get its device registered with me. I store all such devices IMEIs into sha1 hash in my database, and then validate it upon login Mar 13 04:41:56 Ali_Waris: just use device ID instead of IMEI Mar 13 04:42:10 if they wipe the device, they have to come back to re-register the device Mar 13 04:42:18 Hypothetical: how long does a single dev need to port the device tree from an older android version (e.g. Android 20 to 21). Mar 13 04:42:19 p_l: yes, but what is user wipes his/her device. I would probably never be able to validate him /her. Mar 13 04:42:21 though it sounds like you're doing something that probably doesn't need to be done Mar 13 04:42:36 Ali_Waris: you validate them as new device Mar 13 04:42:57 Ali_Waris: also, it works even for devices that don't have IMEI Mar 13 04:43:05 p_l: that would not be good. As it increases the overhead. Mar 13 04:43:45 Someone? Mar 13 04:43:57 Ali_Waris: the question you want to ask yourself is whether the wipes are common enough and validation hard enough that you need to use a validation method that might mean a sold device is going to still be validated Mar 13 04:44:03 p_l: is there some other way round? Mar 13 04:44:09 Ali_Waris: IMO, you're optimizing the wrong thing Mar 13 04:44:39 unless the validation involves people in antarctica wiping their phones more often than a year Mar 13 04:46:05 p_l: lol.. My requirement is such that only authorized devices should be allowed to use my app and it must fail to authorize on devices which are not known to me. Mar 13 04:47:04 Ali_Waris: Then you need to ask yourself what is the actual validation process and whether or not it can't even be done by some remote enrollment program Mar 13 04:47:16 (also, consider using Google for Work APIs etc.) Mar 13 04:48:13 because in my humble opinion, you're overstating both how often you'd have to revalidate one device, and the overhead of validation itself Mar 13 04:48:32 p_l: i am thinking of using some MDM solutions for BYOD concept. But, i am confused because they are very 'pricey' for ny budget. Is there any open source solution available? Mar 13 04:49:08 I'm not current on them, but you *do* want something that works with android for work Mar 13 04:50:24 p_l: i've read about several MDM providers, but they charge 12-15 $ for a single device for one year. That's way too much for me. :( Mar 13 04:50:56 well, your validation ideas are more costly Mar 13 04:51:22 (in terms of work hours, because I assume it's some form of work device that has to be validated) Mar 13 04:52:46 p_l: yes, sort of, but my devices won't be within the same network. Mar 13 04:52:58 so what? Mar 13 04:53:10 I never mentioned a need to be in one network at all Mar 13 04:54:28 p_l: yes, but those solutions are costing me like anything. :( that's why i am inclined towards validating devices by myself (by coding my app accordingly). Mar 13 04:55:36 Ali_Waris: ok, how much are you paying the people who will have to come in with the devices? because as long as it is over $4/h and you validate once per year, you have already made something that costs you more than MDM provider Mar 13 04:56:54 p_l: its not that I am costing each user separately; those users are my client's. Mar 13 04:57:42 Ali_Waris: then quite possibly you're costing them even more and you need to imagine them putting anywhere up to $1000 price tag on going for validation, depending on your market Mar 13 04:57:58 p_l: IMEI is so far okay, but I am afraid as its not recommended. Mar 13 04:58:10 (and if you have legal professionals as clients, think a magnitude more) Mar 13 04:58:15 Ali_Waris: because it is bad Mar 13 04:58:31 if you want to go with your in-person validation idea, bind on device id, not imei Mar 13 04:58:45 your users won't validate that often anyway, if they do, you have bigger problems Mar 13 04:59:01 p_l: well, the discussion moved from technical to financial domain. That is obvious though. :) Mar 13 04:59:38 Ali_Waris: well, I'm trying to dispute the actual need and use of such feature in that manner, and why there's absolutely no need (and it's even harmful) to use IMEI Mar 13 05:01:12 p_l: hey can i save the build id hash to the device's shared preferences? Mar 13 05:01:34 ... use device id. Mar 13 05:01:38 that's what it's for Mar 13 05:01:43 p_l: ohh but if it gets wiped out, shared prefs won't remain either. :( Mar 13 05:01:59 Ali_Waris: if it's wiped, your validation *should* be wiped as well Mar 13 05:02:05 hell, it *MUST* be wiped Mar 13 05:02:26 otherwise you open yourself to a phone being sold to unknown person but remain validated with your app Mar 13 05:02:29 Yeah true. Mar 13 05:02:47 Someone? Mar 13 05:02:51 p_l: ohh, thanks for pointing that out. Mar 13 05:03:05 p_l: i was so dumb to think that way Mar 13 05:03:36 Redrield: you can disable a component programmatically Mar 13 05:03:53 p_l: is build id and device id different? Mar 13 05:03:55 I don't remember the API now, but you can disable an intent handler in your own app Mar 13 05:04:07 Ali_Waris: build_id is for firmware image Mar 13 05:04:16 so every device with same firmware has the same build id Mar 13 05:04:31 Maybe I haven't made this clear, it's a bit foggy for me, too. Mar 13 05:04:52 I want to make some sort of daemon thread that runs until my app is killed, I only want one instance of this thread running at any time Mar 13 05:05:07 p_l: okay, so device id would be unique for each device? Mar 13 05:05:18 Redrield: use a bound service and handle service lifecycle apropraitely Mar 13 05:05:26 Ali_Waris: yes, it's generated on every wipe Mar 13 05:05:42 and iirc it's pretty much guaranteed to be unique Mar 13 05:05:55 p_l: thanks man.. IRC just saves me each time. ;) Mar 13 05:06:16 Redrield: When your application exits, your service would become unbound, and should shut down and exit Mar 13 05:06:28 Redrield: this depends on you handling the lifecycles properly, though Mar 13 05:06:29 p_l: i'll google it more. Thanks Mar 13 05:06:42 https://gist.github.com/Redrield/a9ace45580bc2e20486728173a2968d9 Mar 13 05:06:44 Pardon the kotlin Mar 13 05:06:52 But does that follow the idea of it? Mar 13 05:15:45 p_l, that good? Mar 13 05:16:23 whats the news Mar 13 05:16:34 Redrield: moment Mar 13 05:16:55 cooterlin Mar 13 05:17:10 at least kotlin is succinct Mar 13 05:17:21 seems like it could make jvm dev a lot more reasonable =) Mar 13 05:17:23 Redrield: general gist of it is right, but I'd recommend you review it carefully Mar 13 05:17:36 Personally it's been long time since I wrote anything on android Mar 13 05:17:41 haha Mar 13 05:17:48 dont see many of the old schoolers here Mar 13 05:17:55 so saying I'm "dusty" is giant understatement Mar 13 05:17:56 and the ones that hang out dont do android anymroe =) Mar 13 05:17:59 I've made a few changes, I set the startCommand return to START_STICKY Mar 13 05:18:08 And I've replaced the (un)bind calls with start/stopService Mar 13 05:18:21 Cause it's really acting completely separately from the rest of the app Mar 13 05:18:21 ron_frown: I never got to seriously do android, when I was most interested the Play Store was closed off to me Mar 13 05:18:31 ahh Mar 13 05:19:14 still look over new releases for api changes and the like, but it's no longer the high interest of even 2013 or so, not to mention the heady days of Eclair or earlier :) Mar 13 05:19:37 This has been my first real app thing Mar 13 05:19:45 The only other thing I've made is a 30 line root checker Mar 13 05:19:45 :P Mar 13 05:19:58 I still feel like writing code in any other language Mar 13 05:20:04 feels soooooooooo much more sane Mar 13 05:20:10 (the quality definitely didn't go up since then, IMO, because of how slow devices that have seriously more power than my old Spica have gotten) Mar 13 05:20:11 er other platform Mar 13 05:20:34 I used to manage and build embedded android devices, ported android to it Mar 13 05:20:36 man Mar 13 05:20:39 I just use android cause I don't feel like being extorted by Apple Mar 13 05:20:39 huge mistake Mar 13 05:20:43 And who owns a Windows phone? Mar 13 05:20:51 honestly android isnt the worst thing in the world Mar 13 05:20:57 Seems rational, eh? Mar 13 05:20:59 Redrield: nobody? :D Mar 13 05:21:00 it just seems like google isnt actually addressing ANY of the actual problems Mar 13 05:21:14 Oh yeah, I don't even use the OEM Mar 13 05:21:16 I'm intrigued with the adromeda rumors Mar 13 05:21:19 using ResurrectionRemix Mar 13 05:21:41 I've been rocking official images only since switching from N4 to N6 Mar 13 05:22:06 but running chrome os on my pi3 vs windows IOT Mar 13 05:22:17 windows iot is amazingly faster and app dev is better Mar 13 05:22:20 But I've always done more server programming or mostly actually infrastructure Mar 13 05:22:30 I do it all Mar 13 05:22:34 ^ Mar 13 05:22:39 Sometimes I'm in an android mood Mar 13 05:22:41 ron_frown: what about the chromeOs-derived IoT system from Google Mar 13 05:22:46 Other times I'm feeling masochistic and use PHP Mar 13 05:22:50 * p_l also runs a chrome-os derivative on servers) Mar 13 05:22:54 And other times I feel insane and write an OS in Rust Mar 13 05:22:54 that thing was kinda a joke Mar 13 05:23:00 fuschia looks Mar 13 05:23:05 interesting Mar 13 05:23:09 but the UI stuff isnt there Mar 13 05:23:23 fuschia is for now mostly vaporware as far as i am concerned Mar 13 05:23:30 ehh its there it boots Mar 13 05:23:45 for all we know it might be the OS for second-gen titan chips Mar 13 05:24:02 Also, even though this is my first "real" app, it's not even going on the play store Mar 13 05:24:02 lol Mar 13 05:24:03 there is a UI but it seems like its still only REALLY accessible to gogole devs Mar 13 05:24:22 Just making a digital UI for my FRC scouting team Mar 13 05:24:26 I mean rearchitecting android at this point would be painful I think but probably great Mar 13 05:24:47 dart and flutter as a core is... pretty impressive actually Mar 13 05:24:56 since Android doesn't actually *need* POSIX it's probably less painful than some people think Mar 13 05:25:15 p_l whats the os derived from chrome os? Mar 13 05:25:25 I was hopeful that a pure skia based UI would be great Mar 13 05:25:43 but it was slow and clunky and chrome remote desktop maxed out like 3fps over a ethernet Mar 13 05:25:44 While we're talking about stuff like this, have either of you checked out RemixOS on PC Mar 13 05:26:04 ron_frown: on Google compute, it's Container-VM, on elswhere it's CoreOS Mar 13 05:26:10 Basically tries to put android on a bigger screen, and on an x86/x86_64 chip Mar 13 05:26:21 Redrield I've built shit like that Mar 13 05:26:26 of course I can't often use CoreOS so there's still a bunch of Ubuntu 14.04 and 16.05 Mar 13 05:27:05 if you know me, you know I absolutely despise java Mar 13 05:27:07 and oracle Mar 13 05:27:18 if they make a chromebook with decent performance, android app compatibility and battery life of a thinkpad X260 (with full battery spec), I might actually change over Mar 13 05:27:25 at least for some tasks Mar 13 05:27:27 would *LOVE* to see google give oracle the finger by pushing for another language for dev Mar 13 05:27:32 another platform Mar 13 05:27:46 yes it would be great if google stopped using java Mar 13 05:28:07 well, you *can* target DVM/ARK with different language, nobody stops you Mar 13 05:28:22 which other languages Mar 13 05:28:22 there are reasons why Dalvik ISA will remain, though Mar 13 05:28:46 I mean at this point after all the cmpilation you arent really using java Mar 13 05:28:52 but seriously Mar 13 05:28:55 eff oracle Mar 13 05:29:01 ron_frown: I have no idea, you are free to write compilers, hell, many compilers for JVM were created and not just for consing-happy languages like Clojure that abuse Android GC to unusability Mar 13 05:29:05 java is probably alive because of google alone Mar 13 05:29:13 ron_frown: not really Mar 13 05:29:16 and oracle has the nerve to make threats Mar 13 05:29:25 ehh Mar 13 05:29:26 IBM is huge on java, and Enterprise *lives* Java Mar 13 05:29:32 mhe Mar 13 05:29:35 ibm meh Mar 13 05:29:42 enterprise in the java aspect is a joke Mar 13 05:29:55 https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition Mar 13 05:30:03 Oh christ Mar 13 05:30:07 and thats so close to what I've seen in every java enterprise app =0 Mar 13 05:30:12 (IBM's JVM is actually very, very good, because IBM still uses desktop java apps and *demands* speed) Mar 13 05:30:37 That repo makes me want to reconsider if I want to make programming a profession Mar 13 05:30:39 elastic thoroughly impresses me Mar 13 05:30:41 That just looks like pain Mar 13 05:30:46 and more pain Mar 13 05:31:04 ron_frown: that's called "fresh grad of low-end coding school sometimes masquerading as university who was told all the time about how OOP is great panacea for everything" Mar 13 05:31:08 jetbrains has impressed the hell out of me Mar 13 05:31:19 they have the "crazy russian factor" Mar 13 05:31:24 and I dont mean that in a bad way at all Mar 13 05:31:27 if they could make x work Mar 13 05:31:31 er if anyone coudl Mar 13 05:31:35 russians could Mar 13 05:31:42 because a lot of the enterprise coding tends to be shitty fresh grads, or *very shittily managed fresh grads Mar 13 05:32:01 I've been building software for 20yr, and seen lots of that Mar 13 05:32:21 I've def been proven wrong, but I'm generally predujiced against fresh grads Mar 13 05:32:23 leads to cases like "your common first job after uni will be some crappy changes to a Swing form" Mar 13 05:32:27 not for lack of knowlege or experience Mar 13 05:32:48 but more for dunning kruger effect college inspires in some Mar 13 05:32:58 ron_frown: also, it's nothing specific to Russians, but it's simply because "Java Schools" as Joel Spolsky calls them arrived, like all fads, much later Mar 13 05:33:09 in central and eastern europe, that is Mar 13 05:33:20 yeah Mar 13 05:33:41 I'm also biased because as soon as .net hit the world in ~2000 I dropped java like a bad habbit Mar 13 05:33:56 Also, you have much higher group of people who go into CS courses purely because "programming pays" so they learn enough to be those low-paid low-end devs Mar 13 05:33:56 I mean I still had to use it in my rom porting/os building Mar 13 05:34:04 yeah sadly Mar 13 05:34:07 had to weed a lot of those Mar 13 05:34:09 but Mar 13 05:34:21 I will say I've mentored people that have never touched code because I saw it in them Mar 13 05:34:21 and the people who go for awesome stuff don't show as much Mar 13 05:34:22 Like right now I'm programming purely as a hobby Mar 13 05:34:34 I'm a highschool freshman Mar 13 05:34:41 well there you go Mar 13 05:34:48 good start Mar 13 05:34:51 there is money in it Mar 13 05:34:59 but a quality engineer costs money Mar 13 05:35:02 everywhere Mar 13 05:35:36 thats what I tried to explain to my company when they were talkng outsourcing Mar 13 05:35:47 nothing against people in these other countries Mar 13 05:36:00 a QUALITY candidate costs money and pretty close to the same money everywhere Mar 13 05:39:22 well, not necessarily the same, but there's a difference between taking up Tata Consulting Services or Infosys vs. finding quality people Mar 13 05:40:38 has g00s been around? Mar 13 05:41:01 ron_frown: haven't seen him today Mar 13 05:41:10 last few days? Mar 13 05:41:11 weeks? Mar 13 05:43:34 couple days gone Mar 13 05:43:44 cool Mar 13 05:43:49 just been a while Mar 13 05:57:58 hi guys Mar 13 05:58:22 hi Mar 13 05:58:55 guys, I have a small problem. I'm to show a dialog from a service. Mar 13 05:59:07 it is said that it is not a good idea. Mar 13 05:59:19 so I'm sending a message from my service Mar 13 05:59:46 to my main app and have used singletask launchmode for my app. Mar 13 06:00:27 so in newIntent() callback I notice that I need to create that dialog when service requests it. Mar 13 06:01:05 but I wonder where is the best time after onNewIntent() for showing that dialog. Mar 13 06:01:35 currently I'm doing it in onresume. but it seems it is not a good idea. Mar 13 06:02:55 hero_biz: have a look at activity lifecycle graph https://developer.android.com/guide/components/images/activity_lifecycle.png Mar 13 06:03:54 I know lifecycle. but still not sure where is best place. Mar 13 06:04:37 when yuo are on singleTask mode, onCreate() is just called one. Mar 13 06:04:41 *once Mar 13 06:09:27 hero_biz: maybe have a look how they do it ExoPlayer https://github.com/google/ExoPlayer/blob/release-v2/demo/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java Mar 13 06:10:45 ok,ty. I will check it out. :) Mar 13 06:11:03 they set player.setPlayWhenReady(shouldAutoPlay); from inside ‘onStart’ and ‘onResume’ Mar 13 06:11:48 ‘shouldAutoPlay’ is set to true in ‘onCreate’ and in ‘onNewIntent’ Mar 13 06:12:51 cancel it inside ‘onPause’ and in ‘onStop’ Mar 13 06:20:26 my method is really similar to this one. But I'm trying to show a DialogFragment which causes exception. so I need to debug more, I guess. Mar 13 06:31:12 morning all Mar 13 06:41:36 How complex a dialog? Couldn't a notification do? Mar 13 06:42:45 mmmm, never tried callback from/to service... Mar 13 06:43:19 HAHAHHA Mar 13 06:44:30 I personally show a dialog only when the service is bound to a view, or a notification otherwise Mar 13 06:47:17 @capella: if you need to just show a dialog,it will be simple. but if you need a dialog with user interaction, it is irritating(for example enter a password). Mar 13 07:00:06 if I try to show a dialogfragment on onResume(), I get "java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState" if app goes into paused mode when dialog is up and try resume again. Mar 13 07:02:15 hero_biz: this is a bug in android system Mar 13 07:02:57 google it up Mar 13 07:03:24 http://stackoverflow.com/questions/7575921/illegalstateexception-can-not-perform-this-action-after-onsaveinstancestate-wit Mar 13 07:03:37 accepted answer here is not to call super Mar 13 07:04:32 I saw this yesterday when I was searching for exception. Mar 13 07:05:03 doesn't help? Mar 13 07:05:04 but I didn't get how I should implement that commitAllowingStateLoss() Mar 13 07:05:28 where I should use it? Mar 13 07:05:38 hero_biz: idk Mar 13 07:06:23 in my fragment I have this "public void onSaveInstanceState(Bundle outState) {outState.putInt(DIALOG_PARAM_TIMEOUT, mTimeout); super.onSaveInstanceState(outState);}" Mar 13 07:06:57 and if you comment super as the answer suggests? Mar 13 07:10:04 nope Mar 13 07:10:22 I wonder if it is because of dialogFragment. Mar 13 07:11:00 generally you just use show() method, and you don't add it by beginTransation() and commit() Mar 13 07:16:37 anyway thanks squ. I try to find problem :) Mar 13 07:16:48 have fun Mar 13 07:17:08 don't forget to reply if you figure that out Mar 13 07:20:30 * raoul11 thepooshes thepoosh Mar 13 07:20:57 it's about flippin' time man Mar 13 07:21:21 u still alive? Mar 13 07:21:36 i overslept today (: Mar 13 07:21:51 oh myyy Mar 13 07:21:59 thepoosh, raoul11 https://www.youtube.com/watch?v=Xi4bZn0hGRI Mar 13 07:22:20 squ: why thanks i guess Mar 13 07:22:37 was in the middle of this though: https://www.youtube.com/watch?v=gavcjNniIvk Mar 13 07:23:07 dis so random squ lol Mar 13 07:23:15 :) Mar 13 07:24:25 still sick thepoosh ? Mar 13 07:24:46 nah, back @work Mar 13 07:25:24 nice Mar 13 07:25:37 what's up? Mar 13 07:26:41 it seems if I add "if (getSupportFragmentManager().findFragmentByTag("String_dialog_frag") == null) {dialog.show();}", it can solve problem. idiot.... Mar 13 07:27:39 show method just tries to add, onResume() will try to add agai and everything crashs. idiot... Mar 13 07:29:19 btw, does setIntent(null); correct or not? or removing previouly effect of setIntent(intent); Mar 13 07:29:52 how was the hackathon thepoosh ? Mar 13 07:34:03 I missed it because I was sick Mar 13 07:34:16 but the FB group said it was kickass Mar 13 07:35:06 how many apps/groups? Mar 13 07:36:19 seems like there were a few Mar 13 07:36:56 just a sec Mar 13 07:36:57 looking Mar 13 07:38:34 thepoosh u using retrolambda or jack? Mar 13 07:38:39 i assume rl Mar 13 07:39:01 don't use any at the moment Mar 13 07:39:07 but rl is awesome Mar 13 07:39:20 so u use rx without lambdas? Mar 13 07:39:24 AndriodStudio minimizes to lambda appearance Mar 13 07:39:46 with those uglyass Func1 stuff? Mar 13 07:39:55 better wait for java8 support Mar 13 07:40:29 jack isnt supported yet? i know instantrun is broken Mar 13 07:40:30 another dependency is more uglier Mar 13 07:40:34 but it works Mar 13 07:40:46 jack i mean Mar 13 07:41:02 it works until it doesn't Mar 13 07:41:15 lol Mar 13 07:42:00 lambdas and method refrences work Mar 13 07:44:48 according to what I remember, the diff between rl and jack support is not that large so maybe using rl for now is a better option Mar 13 07:44:57 they both generate the methods under the hood Mar 13 07:45:04 it's just a method count issue Mar 13 07:45:16 yeah Mar 13 07:45:27 that talk by jake cleared that Mar 13 07:45:55 just finding the slide now Mar 13 07:46:07 finally figured out how to filter properly using rx thepoosh Mar 13 07:46:40 https://speakerdeck.com/jakewharton/exploring-hidden-java-costs-360-andev-july-2016 Mar 13 07:46:45 slide #106 Mar 13 07:46:52 raoul11: noice! Mar 13 07:46:59 you're passing the major hurdles now Mar 13 07:47:42 thepoosh http://pastebin.com/7ms6USRZ Mar 13 07:47:54 squ, raoul11: http://imgur.com/a/ZeOpr Mar 13 07:48:11 i dont get one thing though: if i do .map(BaseSearchResult::new) i get a borked object back Mar 13 07:48:41 broken? Mar 13 07:48:42 yeah its bad Mar 13 07:48:49 yeah, null on everything Mar 13 07:49:03 think the constructor pf BaseSearchResult is borked Mar 13 07:49:12 that depends on the mapping object Mar 13 07:49:22 map takes one type of object and returns another Mar 13 07:49:34 so if your mapping is bad the returned value is bad Mar 13 07:49:40 yeah, but what should the constructor of the returned object look like? Mar 13 07:50:02 you need to have the correct mapping, not a correct constructor Mar 13 07:50:04 is it an empty constructor that takes only one arg: BaseSearchResult result ? Mar 13 07:50:15 not sure exactly how this works Mar 13 07:50:29 you should ask someone with actual experience Mar 13 07:50:47 anyways, it works without rebuilding a new object actually Mar 13 07:50:48 if you want' I can ask one of the mentors from the AndroidAcademy Mar 13 07:50:51 unlike a deserializer Mar 13 07:50:54 who gave a talk about this Mar 13 07:51:03 how?! Mar 13 07:51:07 makes no sense to me Mar 13 07:51:29 coz this rx is black magic Mar 13 07:52:02 srsly, if you have in the end a list of objects, they have to be created somewhere Mar 13 07:53:16 flatMap? Mar 13 07:53:24 no idea Mar 13 07:53:34 but i dont need .map to convert it Mar 13 07:54:01 wait, flatmap is not an actual mapper it only flattens the given data Mar 13 07:54:07 i.e. if there are nested lists Mar 13 07:54:18 renders correctly Mar 13 07:54:21 it returns o a list with a depth of 1 Mar 13 07:55:12 raoul11: look at what I just found Mar 13 07:55:12 http://www.ibm.com/developerworks/java/library/j-java-streams-1-brian-goetz/index.html?ca=drs- Mar 13 07:55:17 I love ibm tuts Mar 13 07:56:16 thepoosh: what are these numbers in screenshot Mar 13 07:56:33 looks good Mar 13 07:57:59 does it matter if i do multiple .filter or use just big lambda to filter all the bad results? Mar 13 07:58:06 this api is a bitch to work with Mar 13 07:58:13 :) Mar 13 08:00:55 squ: are you asking which slide that screeshot is taken from? Mar 13 08:01:16 #106 Mar 13 08:01:41 yeah Mar 13 08:01:56 but what numbers say? Mar 13 08:02:11 the amount of methods generated under the hood Mar 13 08:02:16 oh Mar 13 08:06:33 raoul11: getSpecificSearchResults queries full database? and filters it locally? Mar 13 08:06:58 queries for beer/brewries and filter out results without images/labels Mar 13 08:07:12 and no titles Mar 13 08:07:17 beer and brewery is checked for equality locally on device Mar 13 08:07:48 no idea why they allow put requests without a title Mar 13 08:08:19 SQL query idea was made for a reason Mar 13 08:08:31 its a rest client Mar 13 08:08:42 not sure they even support it Mar 13 08:08:53 yeah you are fetching full database inside that Rx handler Mar 13 08:08:57 :) Mar 13 08:09:09 its not a full db, its matchin a query Mar 13 08:09:14 while SQL was made to filter and process computation on server side Mar 13 08:09:34 no, matching (checking equality) is done inside Rx handler Mar 13 08:09:57 the rx handler only filters out the search results Mar 13 08:10:06 yes Mar 13 08:10:16 the query itself returns a 10-15 items that the api provided Mar 13 08:10:32 I see Mar 13 08:10:44 nd im filtering those without images/labels on the client side, coz it fugs up my RV Mar 13 08:10:49 so the api returns list of available tags Mar 13 08:11:04 http://www.brewerydb.com/developers/docs-endpoint/search_index Mar 13 08:38:43 hi, I'm trying to understand how the 's in the manifest work Mar 13 08:39:07 I've read everything I could find online but the information seems to be contradictory or confusing Mar 13 08:41:11 for example, what does this do? http://pastebin.com/Ud9r5dxe Mar 13 08:42:04 it means that the activity/service/whatever picks up the intents directed at viewing text files Mar 13 08:42:24 is it this? (action == NAME) && (category == DEFAULT) && (data.scheme == file || data.scheme == content) && (data.mimeType == text/*) ? Mar 13 08:42:49 or is it this? (action == NAME) && (category == DEFAULT) && (data.scheme == file || data.scheme == content || data.mimeType == text/*) ? Mar 13 08:46:50 danix111: ok, but how do they interact? because I'm looking at Google Docs.apk and other .apk's and the way they're using the tag seems to contradict the official documentation on ho they should work Mar 13 08:49:08 Hello, i have started a project with Fragments (first time). It has 3 Fragments inside a TabLayout. In the first fragment i have two ListViews and one EditText (listview1, listview2, edit ) and i want to show listview1 in some cases and listview2 in some other cases and edit in some cases. Mar 13 08:49:11 There are operations between these 3 views (f.i. if some element is clicked in listview1, listview2 shows up, listview1 hides). I make this by setting visibility to VISIBLE/INVISIBLE, but i am wondering if this is the right approach and if it would be cleaner (codewise) to put 3 more fragments inside the first fragment?! Mar 13 08:49:47 for example this official documentation page says specifying properties on the same element is the same as specifying them on 2 different elements: https://developer.android.com/guide/topics/manifest/data-element.html Mar 13 08:49:50 manix: my understanding is that it's the former suggestion of yours Mar 13 08:50:34 those tags even appear to be redundant, according to the docs: If the filter has a data type set (the mimeType attribute) but no scheme, the content: and file: schemes are assumed. Mar 13 08:50:57 so adding the same property multiple times would be redundant, yet Google Docs.apk do this everywhere in their manifest in many combinations, which seems to contradict that documentation page Mar 13 08:52:35 for example this is from Google Docs.apk's manifest.xml: http://pastebin.com/XeK9WRrf Mar 13 08:53:30 they seem to have many combinations of properties on the same element\ Mar 13 08:54:02 yet the official docs say this is the same as having each property on a separate element: https://developer.android.com/guide/topics/manifest/data-element.html Mar 13 08:54:25 it looks obvious to me: http://docs.google.com/document/* || http://docs.google.com/a/*/document/* || http://docs.google.com/Doc || etc Mar 13 08:55:08 maybe it does allow that, you never know with google Mar 13 08:55:59 danix111: it looks like that is their intent to me too, but the docs say that this http://pastebin.com/raw/9qE15ps2 is equivalent to this http://pastebin.com/raw/AEJ37JTy Mar 13 08:58:20 which should mean this: (scheme=http || scheme == https) && (host == docs.google.com) && (path matches /document/.* || path matches /a/.*/document/.* || ...) Mar 13 08:59:22 so if the docs are right then Google Docs.apk has really confusing & redundant entries, or the docs are wrong/missleading in some way\ Mar 13 09:00:05 and I've seen 's arranged like that in Microsoft Word.apk's manifest as well Mar 13 09:12:28 any thoughts about how to test Doze correctly? Mar 13 09:12:28 I am trying to open a foreground service if some work is still needed when Doze arrives but using adb is not going through all the steps correctly and is making it very hard to test Mar 13 09:36:19 Hello, anyone got a workaround? http://stackoverflow.com/questions/42752856/textview-bug-workaround-needed Mar 13 09:54:57 with an sdk install on a 64 bit system... I should have an Sdk/tools/lib64 directory correct? Mar 13 09:55:28 I have a lib64 directory on my x86_64 linux SDK install Mar 13 09:55:51 hmm.. mine disappeared the other day. Just reinstalled sdk and still don't have it for some reason Mar 13 09:55:56 http://pastebin.com/gfy5yyfs Mar 13 09:56:10 so now my emulator won't start Mar 13 09:56:17 thanks for verifying danix111 Mar 13 10:04:09 anyone know why i might not have Sdk/tools/lib64 or how i might reinstall in a way to recreate it? Mar 13 10:05:04 what version of SDK tools do you have? Mar 13 10:05:58 25.3.1 Mar 13 10:06:50 I have 25.2.5 because that's the latest `$SDK/tools/android sdk` offers to me Mar 13 10:07:08 I noticed that discrepancy between `$SDK/tools/android sdk` and `sdkmanager` earlier Mar 13 10:07:13 emulator was working fine, then suddenly started complaining about not being able to find intel video drivers. Online solutions tell you to remove lbistdc++ from Sdk/tools/lib64 to force androids studio to use system libs.. but no dir Mar 13 10:10:02 guess ill just use my device for now. Have had nothing but problems with android studio in the last couple days. Seems im not the only one though, so i imagine they'll fix whatever is screwed up soon enough Mar 13 12:27:05 How do I read from an existing db? Or How do I copy records from a db in the assets folder to one passed to SQLiteOpenHelper's onCreate() callback? Mar 13 12:38:37 thepoosh sup Mar 13 12:39:06 raoul11: !!! Mar 13 12:39:36 how was your trip to NZ Mar 13 12:39:59 was wonderful Mar 13 12:40:11 hehe Mar 13 12:40:13 sup raoul11 Mar 13 12:40:17 not bad Mar 13 12:40:32 drinkin coffeez nao Mar 13 12:40:53 did u see mobileeye and intel Mar 13 12:40:56 15bil /: Mar 13 12:41:03 visited NZ raoul11? Mar 13 12:41:09 no squ Mar 13 12:41:18 why not Mar 13 12:41:19 tx is mockin me for not being a tech-star Mar 13 12:41:31 who else? Mar 13 12:41:43 if not you Mar 13 12:42:06 thepoosh is a good candidate Mar 13 12:42:12 he is busy man Mar 13 12:42:16 squ: https://www.lookseewellington.co.nz/Maintenance.aspx Mar 13 12:43:23 https://www.wellingtonnz.com/work/looksee-wellington/ Mar 13 12:45:27 raoul11: I have, and sent pms to friends who work there Mar 13 12:45:32 waiting for updates Mar 13 12:45:47 the ultimate tech trip Mar 13 12:46:57 ill go one day squ, when the mrs will allow it /: Mar 13 12:47:07 should have done it a decade ago Mar 13 12:47:12 take her with you Mar 13 12:47:20 train her to be an elite hacker extrodinaire Mar 13 12:47:23 return as Digital Strategist? Mar 13 12:49:47 raoul11: I found a new platform to dev for Mar 13 12:49:54 :) Mar 13 12:49:58 kotlin? Mar 13 12:49:59 https://xkcd.com/1809/ Mar 13 12:50:15 ohthat Mar 13 12:50:24 — can feel pain Mar 13 12:50:34 — foldable (once) Mar 13 12:50:57 squ: I remember the flip phones Mar 13 12:51:03 talk to dov moran, maybe pick up his project Mar 13 12:51:17 heh Mar 13 12:51:28 flip phones were the best Mar 13 12:51:43 LG tried making on with android but it was terrible Mar 13 12:52:11 there was also a Samsung "smart" phone back in 2008 Mar 13 12:52:18 and Sony had a slider Mar 13 12:52:21 it sucked Mar 13 12:52:47 xperia (mini) pro was a good device... mine only lasted 4 years though :( Mar 13 12:52:48 member that matrix nokia thepoosh Mar 13 12:52:59 that was ubercool back at the day Mar 13 12:53:17 you deffo would get laid with one of those \: Mar 13 12:53:22 oh I member Mar 13 12:53:31 i wanted one real bad Mar 13 12:53:36 back in 99 Mar 13 12:53:44 How do I run a system command in my app? I tried Runtime.getRuntime().exec("/system/bin/touch /sdcard/test.txt"); but it doesn't look like the command was executed and no error was thrown Mar 13 12:53:58 megadeth: you should try and avoid that Mar 13 12:54:17 also, you probably didn't have permissions to do what you were trying to Mar 13 12:54:46 Depending on the API being used Mar 13 12:54:50 Shouldn't an error be thrown if I don't have permissions? Mar 13 12:54:54 you probably don't have permission to write to the sdcard Mar 13 12:54:57 no Mar 13 12:55:02 because you're not calling java code Mar 13 12:55:11 you're just executing an arbitrary string to an interpreter Mar 13 12:55:25 Ah, I see. Mar 13 12:55:36 run it in adb shell Mar 13 12:55:41 Works fine in adb shell Mar 13 12:55:52 hmm, adb probably has permissions :) Mar 13 12:55:59 what's your end goal? Mar 13 12:56:03 I assume touch is just a test Mar 13 12:57:05 Well, I have a Chinese OEM TV stick on which I need to load a few kernel modules on boot. The device is already rooted and I can do that from adb but it doesn't have an init.d to run startup scripts. Mar 13 12:57:28 right Mar 13 12:57:34 So I figured I could just run the system commands from an app that's started on boot Mar 13 12:57:39 so you want to get root first lol Mar 13 12:57:45 It's already rooted Mar 13 12:57:49 no Mar 13 12:57:53 you need to give the APP root access Mar 13 12:58:01 doesn't matter if the device is rooted, it's still sandboxed Mar 13 12:58:20 Not on this device. There's no superuser app or anything.. You can just call su and it'll give you a root shell Mar 13 12:58:21 and I might get flamed out of here for explaining how to run root commands lol Mar 13 12:58:31 megadeth: which is exactly what you need to do lol Mar 13 12:59:06 http://stackoverflow.com/questions/33823794/running-root-commands-on-android-device Mar 13 12:59:12 something like the top answer there Mar 13 12:59:22 pretty crazy that it came rooted tbh Mar 13 13:00:09 TLDR: You need to add "su" to your commands because applications don't run as the superuser. Mar 13 13:00:23 Well it's an OEM device and the ROM is just there as an example/PoC Mar 13 13:00:52 I tried Runtime.getRuntime().exec("/system/xbin/su -c 'insmod /data/local/external/ath.ko'"); but that didn't do anything either Mar 13 13:01:28 I'll try again that stackoverflow example and report back in a few minutes Mar 13 13:01:36 megadeth: yeah Mar 13 13:01:39 get a process object from that Mar 13 13:01:43 and print the result etc. Mar 13 13:01:44 :) Mar 13 13:09:07 raoul11: nokia continues making dumbphones Mar 13 13:09:10 normally i have supersu app which pops dialog everytime app wants a root Mar 13 13:09:29 did lenovo buy rights to the nokia brand? Mar 13 13:09:39 raoul11: website mentions plans switching to android Mar 13 13:09:40 I got an email from lenovo (usual crappy deals + ads) Mar 13 13:09:49 advertising a.. ahh actually Mar 13 13:09:50 it was motorola. Mar 13 13:10:18 I'm thinking about to buy nokia phone Mar 13 13:10:46 squ: I think about buying garbage too Mar 13 13:10:53 I usually stop before I do it though Mar 13 13:11:17 I need a phone to carry it with me Mar 13 13:12:00 smartphone can't be carried Mar 13 13:12:10 You need stronger bones Mar 13 13:12:20 if you can't carry a hundred gram or so phone Mar 13 13:12:28 I have bad news about your muscle tone / density. Mar 13 13:13:07 Besides, I bet the nokia oldphone isn't as light anyway Mar 13 13:13:28 have to figure how big and heavy its Mar 13 13:17:26 tx: That worked great, thanks! :) Mar 13 13:17:35 yay! Mar 13 13:20:01 Does anyone have an up to date guide on building iconv on macOS for aarch64-linux-android? Mar 13 13:34:32 <_0xbadc0de> hello Mar 13 13:34:39 olleh Mar 13 13:35:03 <_0xbadc0de> I have a brand new android (arm) emulator with API v19 Mar 13 13:35:13 <_0xbadc0de> I can't drag and drop certificates Mar 13 13:35:52 <_0xbadc0de> I can't install new applications (in particular file explorers, it doesn't throw any error, however it doesn't show the installed application) Mar 13 13:36:07 <_0xbadc0de> help? Mar 13 13:38:25 hm? Mar 13 13:38:32 how do you install the applications Mar 13 13:38:50 also does the emulator has "enable from third party apps" Mar 13 13:39:01 althought i think emulator should have that by default Mar 13 13:43:15 hey so every time we update our app. all the users seem to forget username and password. How do you handle not erasing user data when the app updates ? Mar 13 13:43:40 <_0xbadc0de> I just install aplications by drag-and-drop Mar 13 13:43:55 it copies it in sdcard, it's not installing via dnd Mar 13 13:44:00 persist it on shared pref dar10s Mar 13 13:44:12 <_0xbadc0de> wtf Mar 13 13:44:14 dar10s, updating should not erase user data Mar 13 13:44:20 <_0xbadc0de> thats brilliant Mar 13 13:44:27 indeed it doesnt Mar 13 13:44:35 <_0xbadc0de> so I should install via adb? Mar 13 13:47:21 thats one way to do it Mar 13 13:49:27 <_0xbadc0de> Success Mar 13 13:49:30 <_0xbadc0de> thank you Mar 13 13:49:38 <_0xbadc0de> but that wont make me hate android Mar 13 13:49:45 <_0xbadc0de> but that wont make me stop hating android Mar 13 13:51:45 no one cares what you feel about the platform Mar 13 13:55:44 hi, how can I check if a method is running in the UI thread, as for example by runOnUiThread? Mar 13 13:56:17 (Looper.getMainLooper().getThread() == Thread.currentThread()) Mar 13 13:57:00 there is no pre-wrapped method Mar 13 13:57:06 that should work from API 1 and up though :) Mar 13 13:58:05 tx: right, the first call was what I wanted, thank you! :) Mar 13 13:58:19 np ;) Mar 13 13:58:44 you're on fire today tx Mar 13 14:00:02 crap. really!? Mar 13 14:00:06 * tx checks for a fire. Mar 13 14:04:42 hello Mar 13 14:06:15 I hav an service which runs an AsyncTask. That AsyncTask handles network communication via sockets. now, inside the AsyncTask I have a BufferedReader which is associated with the socket. I am able to see the received data (when using breakepoint) landing in the BufferedReader.. But how can I send that data to my UI= Mar 13 14:07:18 No I am reading about broadcast and intents. But have no clue which way to choose Mar 13 14:07:22 some advice? Mar 13 14:07:35 an asynctask has a return object Mar 13 14:07:42 you define it when you make the asynctask Mar 13 14:07:48 (it might be void right now) Mar 13 14:08:01 <_0xbadc0de> hmm btw Mar 13 14:08:29 <_0xbadc0de> I sent a certificate that I want to use as trusted root on my emulated device Mar 13 14:08:31 like AsyncTask ? Mar 13 14:08:36 yep! Mar 13 14:08:44 in order, Input, Progress, Output Mar 13 14:08:51 hmmm.. Mar 13 14:08:53 or rather Mar 13 14:09:03 Params, Progress, Result Mar 13 14:09:08 So I could pass String as the last object ? Mar 13 14:09:09 <_0xbadc0de> I sent it to /sdcard/Download/ . So when I access it using a filemanager with android and tap on it, it says : could not install root certificate because it can not be accessed Mar 13 14:09:22 <_0xbadc0de> so...wtf Mar 13 14:09:37 thx tx, will try that way Mar 13 14:10:50 What's the whole deal between different types of arm chips when coding with ndk? Mar 13 14:10:58 does it affect in any shape or form the code I write? Mar 13 14:11:11 The deal is that there are a few different ARM architectures Mar 13 14:11:23 it just means that you need to compile for each Mar 13 14:11:28 (that you want to support) Mar 13 14:11:33 some may support more or less features Mar 13 14:11:47 and some will do some things faster and slower than others (more efficiently) Mar 13 14:12:21 tx, so when releasing a project I need to have several .apks for different arhitectures? Mar 13 14:12:36 No, you can include them all in the same one. Mar 13 14:12:49 (native libs) Mar 13 14:13:16 so after all I do not need to worry about different cpu types? Mar 13 14:13:16 haha, nice. Android Studio won't run the build on my device if i have amazon prime video playing. That's a new one Mar 13 14:13:31 DrAwesomeClaws: some sort of DRM thing? Mar 13 14:13:55 tx, i dont think so. Just random screwiness. I thought maybe memory, but i have 9GB free Mar 13 14:14:05 Murii: https://developer.android.com/google/play/publishing/multiple-apks.html#CpuArchOptions Mar 13 14:14:07 see that :) Mar 13 14:14:11 ignore the page title, this is for one apk Mar 13 14:14:17 if i press "play" with amazon prime going it just hangs though, haha Mar 13 14:14:21 hi Mar 13 14:14:31 tx, thx! Mar 13 14:14:34 np Mar 13 14:14:44 I'd like to set preview image for a widget, and I should use avd for getting preview image. I've tried to run emulator but I get an error message Mar 13 14:15:03 PANIC: Unknown AVD name [mytest], use -list-avds to see valid list. HOME is defined but could not find mytest.ini file in $HOME/.android/avd (Note: avd is searched in the order of $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/.android/avd and $HOME/.android/avd Mar 13 14:15:29 tried to run how? Mar 13 14:15:34 what did you to to lead up to that? Mar 13 14:15:37 do to* Mar 13 14:17:05 tx: yeah, I've tried Mar 13 14:20:09 tx: I've tried to run ./emulator -avd mytest Mar 13 14:21:09 is ./emultor resolving because if you haven't added the directory to your $PATH it won't find it Mar 13 14:22:02 it's located in android-sdk-linux/tools, wordsToLiveBy Mar 13 14:22:18 that isn't naturually a part of your $PATH Mar 13 14:22:22 type env on your CLI Mar 13 14:22:26 and see if the "env" Mar 13 14:22:33 contains the directory Mar 13 14:22:42 if not you need to edit your .bashrc to add it Mar 13 14:23:05 I suspect for all his faults, cristian_c knows how to set his $PATH Mar 13 14:23:06 have I to change .profile file? Mar 13 14:24:11 so I have a class extending AlertDialog, and a numberDecimal softkeyboard displayed while the dialog is active. My dialog implements onKey for getting keyboard input. This works fine for numbers, if i press the numbers on screen i can grab them in onKey. But if i press the "." decimal point on the soft keyboard it doesn't hit onKey. Anyone know why that might be? Mar 13 14:26:22 wordsToLiveBy: android-sdk-linux/tools is in my PATH Mar 13 14:26:35 verified by env command Mar 13 14:27:01 (platform-tools also) Mar 13 14:31:35 https://gist.github.com/NuclearHorseStudios/1f67b91620437a16190f9e7940ceba3a there's my class with onKey. I get log output when pressing 0-9 on the soft keyboard, but nothing when pressing "." or "," Mar 13 14:36:41 im really hoping not to have to create my own keyboard Mar 13 14:37:35 but so far it seems that numberDecimal input type isn't well supported (no way to create one programatically without creating a hidden edittext, and now this problem) Mar 13 14:40:59 guys, what's the best way to get a prepopulated database in your application? I want it to come with a database that already has stuff in it. How do I do this easier? Mar 13 14:41:14 Thisisme, probably just use sqlite Mar 13 14:44:28 Thisisme: I haven't used it myself, but https://github.com/jgilfelt/android-sqlite-asset-helper seems interesting Mar 13 14:44:42 yes okay, but does android have anything to import a prepopulated database? or I need to use some lib? Mar 13 14:45:18 Thisisme, you'd just create the sqlite database locally, then include the file with your assets Mar 13 14:45:21 Thisisme: not in the base frameworks that I know of Mar 13 14:45:59 you'll still need to do some work to copy/import whatever is included in assets, etc. Mar 13 14:47:50 Thisisme, https://blog.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ Mar 13 14:49:14 holy crap this is frustrating Mar 13 14:50:08 seems easier to use the sql asset helper hm, I'll check both solutions Mar 13 14:50:09 thanks guys Mar 13 14:51:04 DrAwesomeClaws, unfortunately your own keyboard won't be a good solution either because the user has to choose to use it :) Mar 13 14:51:20 wordsToLiveBy: I confirm, there are also two related export lines in .bashrc Mar 13 14:51:27 DrAwesomeClaws, your best bet is to use TextWatcher Mar 13 14:51:29 I think Mar 13 14:51:45 Zharf, well, i mean just creating a view with numbers and decimal separator and slide it up. Not an actual keyboard apk Mar 13 14:51:54 DrAwesomeClaws, oh, right Mar 13 14:52:36 hi all - I have some code that's connecting to a BLE device - how the F.... do I dosconnect from it ?? Mar 13 14:52:50 TextWatcher might work, but it will make my code a lot more complicated. Im only using an edittext (hidden) because that seems to be the only way to spawn one. But the user will be touching other controls, so the edittext will lose focus, and i'd have to make sure it gets refocused before they touch the keyboard again Mar 13 14:53:53 basically my dialog has two numberpickers, one for integer value, one for decimal value. I want them to just be able to hit "15.33" or whatever on the soft keyboard and it sets one numberpicker to 15 and the other to 33 Mar 13 14:54:06 or they can interact with the number pickers via touch Mar 13 14:55:10 strangely enough, if i run the code in the emulator and press "." on my physical keyboard... that gets passed to onKey, but pressing the "." on the soft keyboard never hits onKey for some reason Mar 13 14:56:00 the soft keyboard works differently from hardware keyboard Mar 13 14:56:04 it's a clusterfuck Mar 13 14:56:09 Hi all, I have an issue with build an android project on a jenkins server. Any advice? http://pastebin.com/gG99UrfH Mar 13 14:56:10 yeah, haha Mar 13 14:56:12 I've been struggling with similar issues Mar 13 14:56:41 im kind of just venting right now. Going to whine about my problems a bit and maybe create a keyboard implementation when im done pouting Mar 13 15:01:25 how should I manage preferences if I want to support API level 9? Mar 13 15:01:37 mniip, what do you mean? Mar 13 15:01:48 I see a lot of API changes in that region Mar 13 15:02:02 what region specifically? Mar 13 15:02:18 PreferenceActivity, PreferenceScreen, etc Mar 13 15:03:30 ach, I always found those yucky, but maybe these will help https://developer.android.com/reference/android/support/v7/preference/package-summary.html Mar 13 15:08:24 i haven't implemented preferences yet, so maybe im wrong. But it seems like there should be some simple preferences API to be able to get and set strings, ints, etc right? Then you should be able to create a simple UI for setting those? Mar 13 15:08:30 that's what i was planning to do Mar 13 15:08:48 I thought so too Mar 13 15:09:38 I've always implemented my own with sharedpreferences as storage Mar 13 15:10:37 ok, then another question Mar 13 15:10:56 I've got an homescreen widget and I'd like to make a menu displaying when clicking widget Mar 13 15:11:14 I've already got layout xml file for menu, and I've already got widgetprovider for changing look 9f the widget, when clicked Mar 13 15:11:32 what type of class could I use for my menu? Mar 13 15:11:44 Any ideas? Mar 13 15:21:28 how do I increase font in a Sialoag box ? Mar 13 15:21:37 Dialog box Mar 13 15:57:34 Morning all Mar 13 16:01:06 Morning sir Tricknology :) Mar 13 16:07:30 guys I'm experiencing issue with PercentRelativeLayout and android 7 Mar 13 16:07:45 do you know if this is a common issue? can't find anything online Mar 13 16:13:22 having WRITE_EXTERNAL_STORAGE implies READ_EXTERNAL_STORAGE, right? Mar 13 16:13:30 yes, it is a common issue Mar 13 16:26:57 pfn: are you talking to me? Mar 13 16:42:02 ugh, getRunningTasks was deprecated? fml Mar 13 16:58:44 is there a way to set watch on varaible on ADT ? Mar 13 17:11:13 yes Mar 13 17:14:30 Hi how do I make columns like this in xml ? http://imgur.com/PUx9Pl8 Mar 13 17:14:50 either a GridLayout Mar 13 17:15:08 or coerce the data into a RecyclerView Mar 13 17:15:40 okay thanks :) Mar 13 17:15:52 recyclerview is probably the preferred way Mar 13 17:16:30 almost definitely the easiest Mar 13 17:24:34 those are rows, not columns Mar 13 17:25:17 you could imagine a simple row pseudo structure like Mar 13 17:26:07 it's not even specific to a listview, or a recyclerview, especially if it does not scroll and row count are so little and fixed Mar 13 17:26:08 etc Mar 13 17:43:57 Is emitting a cursor for each row in the cursor going to cause problems with threading? Tests pass, but I've augmented the io scheduler to be immediate... http://pastebin.com/izw6v1c4 Mar 13 17:44:12 ^ rxjava question mainly Mar 13 17:48:58 I've added a "transformer" argument to eachRow which folds lines 8,9 into one call to eachRow. I think that will guarantee the safety that otherwise might not be present Mar 13 17:49:47 explodes thats ridiculous, you could get fired for that Mar 13 17:52:07 heads up everyone, bookmark this for reference in 2030 http://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-7744EF96-5899-4FB2-B34E-86D49B2E89B6 Mar 13 17:53:51 g00s: whatchu talkin about willis Mar 13 17:54:05 :) Mar 13 17:55:21 Is it bad code? Mar 13 17:55:57 Hello, how could I possibly change the background color in a ListView without breaking the onclick animation? Mar 13 18:03:13 explodes, i ssaw something like that last week, don't remember where Mar 13 18:04:04 and it doesn't smell good, i'd say Mar 13 18:08:06 szt just set it? Mar 13 18:08:17 set the bg color of your listitems Mar 13 18:11:27 Tricknology: that breaks the selector animation Mar 13 18:12:33 you mean the material circle thing that propogates? Mar 13 18:12:41 you might have to set a custom drawable then Mar 13 18:12:48 color != drawable Mar 13 18:18:48 Hello, I'm setting up my system to build a kernel for Android, to be run on the emulator. I'm trying to understand the toolchain requirements: do I need to download the NDK? Or is the gcc already available on my system? Mac El Capitan. Mar 13 18:19:16 Enrico_Menotti: This is not the place to ask questions about buildilng AOSP Mar 13 18:19:28 but yes you have gcc on your system if you install the Xcode Build tools Mar 13 18:20:49 s73v3r: Sorry, I asked on ##kernel and have been redirected here. I have Xcode. I will check for gcc. Mar 13 18:21:04 Tricknology: yes I am talking about that Mar 13 18:21:14 I "fixed" it now by using half-transparent colors Mar 13 18:21:18 What is the right channel for questions about Android kernel? Mar 13 18:21:22 yeah seems right Mar 13 18:21:29 Enrico_Menotti: #android-root iirc Mar 13 18:21:31 you're laying a color over the cool animation stuff Mar 13 18:21:42 danalbert: Thanks! Mar 13 18:21:49 or straight up replacing it Mar 13 18:22:26 anyoen familiar with databinding images? Mar 13 18:22:44 should I use android:src (which isnt working?) or something different? Mar 13 18:23:07 like this https://developer.android.com/topic/libraries/data-binding/index.html#customsetters Mar 13 18:23:21 oop nevermind Mar 13 18:23:39 I was retuning an int ID for the android:src, which was R.drawable.something Mar 13 18:23:53 but I had to actually create a Drawable object in the ViewModel and return that Mar 13 18:35:56 seasoned programmer looking to pick up android software development. any recommended books? Mar 13 18:37:12 SimonVT: Can we get a link to the common answers to that in the welcome message? Mar 13 18:37:46 rougend: The Big Nerd Ranch book is good, and a new edition just came out. The commonsware book has a lot of info and is updated constantly Mar 13 18:37:51 and there’s the official docs Mar 13 18:40:52 s73v3r: all right, thanks. i'll take a look at the docs and the book. Mar 13 18:49:50 I'm trying to use themes to show a splash screen rather than an ugly grey screen for a few seconds while my app starts, so I set the activity to my theme with a drawable background, but it seems to apply the background to all the xml elements, even copies on top of other images within the layout. Any way around this? Mar 13 18:50:33 your theme just has android:background set to a drawable? Mar 13 18:51:15 check this out for a splash screen: https://www.bignerdranch.com/blog/splash-screens-the-right-way/ Mar 13 18:52:50 s73v3r: Isn't he doing the same? He is setting the activity's background to his theme, and the theme just has windowBackground set to his drawable. Mar 13 18:53:28 he's applying a diff theme for the splash activity Mar 13 18:53:40 and he has an activity just for the splash Mar 13 18:53:48 ah Mar 13 18:54:01 jep 261 : " It is the responsibility of build tools and container applications to configure module paths so as to avoid version conflicts; it is not a goal of the module system to address the version-selection problem." hmm Mar 13 18:54:05 nice thank you that will work Mar 13 18:54:12 * raoul11 g00ses g00s Mar 13 18:54:16 hey raoul11 Mar 13 18:54:28 u havnt linked anything interesting in days g00s Mar 13 18:54:50 lol, sorry :( Mar 13 18:56:01 g00s do u use services much? Mar 13 18:56:59 raoul11 i use them when i need to , why whats up ? Mar 13 18:57:21 i havnt so far, not sure what im missing Mar 13 18:57:33 had an argument with an interviewer Mar 13 18:57:46 singleton vs service for a rest client Mar 13 18:57:55 i'd to service Mar 13 18:58:21 havnt found many codebases who advocates on service Mar 13 19:00:11 when using ndk do I have to compile manually the cmake file or eclipse handles that? Mar 13 19:00:25 eclipse? Mar 13 19:00:34 I don't use Android Studio Mar 13 19:00:59 with the NDK integration introduced in gradle plugin 2.2 (iirc) gradle should launch the cmake file by itself? Mar 13 19:01:16 or do you not use gradle either? Mar 13 19:01:34 I use it Mar 13 19:02:09 Yep, Gradle plugin will compile CMake code since 2.2 if you use integration Mar 13 19:02:18 http://tools.android.com/tech-docs/new-build-system/gradle-experimental/migrate-to-stable Mar 13 19:03:47 raoul11 have you reversed any google apps ? Mar 13 19:03:52 s73v3r, just tried with a separate activity, unfortunately it doesn't work because it shows the splash but still shows the grey screen while my main activity loads its WebView. Is there a way to apply the theme to only the base element? It Mar 13 19:04:01 negative Mar 13 19:04:33 in that case, you don’t want a splash screen, you may just want to change the background color of the webview Mar 13 19:04:42 or wait to display the webview until it’s loaded Mar 13 19:04:51 raoul11 pick some newish things like google keep Mar 13 19:04:59 gmail is pretty crufty Mar 13 19:06:41 I know there's a way to do it I got it working with themes yesterday but somehow lost all my progress after saving and packaging it for the play store. Mar 13 19:07:41 And changing the background of the webview doesn't work s73v3r Mar 13 19:08:00 hey llvm 4.0 is out "This marks the first release where the AVR backend has been completely merged from a fork into LLVM trunk." Mar 13 19:08:06 \o/ Mar 13 19:08:10 you can just create a style, and apply that style to the element Mar 13 19:09:27 anyone know if there's a correct way to add a custom SDK to android studio? Mar 13 19:10:30 or can anyone comment on whether the reply here is correct about what is an official method to do so http://stackoverflow.com/questions/40460258/how-to-use-custom-android-sdk-in-android-studio Mar 13 19:10:31 You mean apply the theme s73v3r ? That's what I'm doing but it's applying to every element in the activity instead of just the Root RelativeLayout which is causing a weird effect of multiple layers of the same image copied over everything Mar 13 19:10:44 no, apply the style to the element Mar 13 19:10:52 How can I do that? Mar 13 19:11:11 style= Mar 13 19:11:19 style=“@style/mystyle" Mar 13 19:11:24 apply that to the webview Mar 13 19:12:21 It says no resource identifier for attribute 'style' in package 'android' Mar 13 19:12:52 because you haven’t created one Mar 13 19:13:56 I think I have it's called SplashTheme, it usually autocompletes for attributes but if I type android:style it only shows android:scrollbarStyle as an option Mar 13 19:14:11 no, you haven't Mar 13 19:14:16 read up on styles and themes Mar 13 19:14:47