**** BEGIN LOGGING AT Thu Jan 05 03:00:01 2017 Jan 05 03:21:14 hey guys, when does an out of memory exception occur vs just being allocated more memory? Jan 05 03:37:07 HELP Jan 05 03:37:20 Android/Telnet/Socket/ Jan 05 03:38:00 Need one to help me program my project app. Jan 05 03:40:55 Greywood: try English Jan 05 03:43:42 Roger that... Sorry for inconvenience Jan 05 03:51:04 Hmm... this might compile Jan 05 03:54:59 Compiles, yes. Runs... not so much. Jan 05 03:55:23 Ok in english. Im trying to make elastic mainactivity that uses WiFi or 3g for project. May be really simple for y'all but need some help Jan 05 03:56:13 elastic activity that use network ... still not clear :) Jan 05 03:56:41 Elastic? Jan 05 03:56:43 You're right Jan 05 03:57:00 I thought only Apple had the wobbly cheese slice apps Jan 05 03:57:30 I'm making a project for university. Its smarthouse. I made many arduino nodes Jan 05 03:57:30 if you don't care what kind of network you use then you only need to worry about the internet permission and you can use okhttp or whatever for your networking. If you care about WHICH network you use, look at the docs for ConnectivityManager Jan 05 03:57:38 Wait Jan 05 03:57:55 My project has multiple Arduino nodes using ESP8266 Jan 05 03:58:03 in either case you'll soon learn that you probably also need to look into background services because binding network io to your main thread will go poorly, but, baby steps. Jan 05 03:58:26 Yea baby steps but pls listen :) Jan 05 03:59:12 Next I have beagleboard that using PHP scripts that give Json what is in Mysql Jan 05 03:59:29 Greywood you are in the weeds :) Jan 05 03:59:44 Exactly :< sorry if saying gibberish Jan 05 04:00:20 So are you looking to address the Arduinos via multicast? Jan 05 04:00:35 ...or just reg'lar UDP broadcasts? Jan 05 04:00:55 Nah, Im looking for tips for android studio to handle ASyncTask and displaying Json data from nodes Jan 05 04:01:08 Or rather ANYTHING that will help me Jan 05 04:01:36 Sorry for any inconvenience but it's important for me Jan 05 04:01:41 over telnet? Jan 05 04:01:47 ESP8277 Jan 05 04:01:49 66* Jan 05 04:02:10 Its smarthome - Nodes are Arduino connected to esp-link(telnet) Jan 05 04:02:23 That's probably more trouble than it's worth Jan 05 04:02:28 Yup Jan 05 04:02:34 Its my graduation Jan 05 04:02:46 It'll be easier on the Arduinos to just listen for broadcast UDP commands. Jan 05 04:03:13 Arduino pro mini is connected to esp8266(that has esp-link firmware) Jan 05 04:03:16 No need to bother with keeping session or state and you've already walked away from security by settling on telnet. Jan 05 04:03:27 And its "perfected" Jan 05 04:03:27 I know Jan 05 04:03:43 I "shitted" on security selecting this protocol Jan 05 04:04:26 Well, if the nodes could do WPA2 you could rely on that at least Jan 05 04:05:05 But currently my problem is connecting fragments to sockets Jan 05 04:06:21 I have 4 fragments that should connect to many devides (esp8266). Jan 05 04:06:40 You need an interface Jan 05 04:06:45 And here I have question - how to make fragment socket connectionm Jan 05 04:06:57 Don't do it from the fragments Jan 05 04:07:17 mhm? Jan 05 04:07:32 If you implement an interface, you can call back to your main activity from the fragments Jan 05 04:07:43 ...and those calls can go do AsyncTasks Jan 05 04:07:49 So I have main activity with many connections (bear as I am new to Android programming) Jan 05 04:08:07 hmm ok Jan 05 04:09:13 Greywood: This guy explains using interfaces with fragments surprisingly well https://www.youtube.com/watch?v=VyyGP_d0Ia8 Jan 05 04:09:23 reading then! Jan 05 04:09:27 watching* Jan 05 04:09:50 Greywood: Follow along with the videos and you'll have fragment communication within the hour Jan 05 04:10:26 Ye ye, I know. Im trying, but lost in whole web Jan 05 04:10:40 Yeah but small steps Jan 05 04:10:43 I never wrote on IRC, but as fellow nerd I knew that Ya would direct me :D Jan 05 04:10:49 They've got another one for asynctasks and network communication Jan 05 04:11:02 i'd put all the coms in a service. have that modify your data structures. have the fragments subscribe to changes in those data structures Jan 05 04:11:10 Feel free to stick in Log.d statements that just pretend to do the network calls at first Jan 05 04:12:54 Dagmar - I'm mainly c++ programmer so java is kinda abstractive for me. Too many things happen in background withoug me knowing to easly understand. That's why I'm asking Jan 05 04:13:39 Oh but I will ask then Jan 05 04:14:14 That is a matter of knowledge Jan 05 04:15:03 If I make a process that is waiting till specific hour, is it using battery? Jan 05 04:15:18 If you use the AlarmManager properly, then no Jan 05 04:16:43 And it can be "included" in app, and it wont use up additional resource (sure here its "baby" question)? Jan 05 04:17:05 Wrong question, I have already read about alarm manager. Jan 05 04:17:28 Correct myself - I can use it in my app normally? Jan 05 04:18:04 that's going to be a big thing w/ android - get used to a lot of threads, and a lot of async callbacks. most c++ stuff is pretty linear, with event or select/poll loops; android isn't like that. Jan 05 04:18:55 Got overwhelmed simply but everything that goes in background. Man... It's "A WHOLE NEEEEW WOOORLD" Jan 05 04:20:34 yep; you'll get used to how it does things Jan 05 04:21:15 i would, in general, avoid doing raw sockets and do as much w/ rest/json as you can. There's several good libraries for that; look at okhttp and retrofit Jan 05 04:21:34 Dragorn. Jan 05 04:21:40 otherwise you can do generic raw sockets the same as any other java, but you'll have to do it in a background task Jan 05 04:22:22 if it was me I'd use the esp's to post to an aggregation service and query that from android rather than keep the esps awake all the time and polling them Jan 05 04:22:29 but it depends on your battery model Jan 05 04:22:47 Yea yea, I know what I'm trying to make here is really not secure Jan 05 04:22:56 But it's project for my diploma Jan 05 04:24:28 For now Im making "SmartHome" that has multiple nodes using esp8266 that has esp-link(telnet) integrated in them, beagleboard that has mysql reading temperature, humidity, light. Jan 05 04:24:47 And now im fighting with android app that will controll, connect with all that Jan 05 04:25:14 without previus knowledge of android developement. So Im writing here for tips :) Jan 05 04:26:14 beagleboard with mysql :) Jan 05 04:26:57 Tryin here! Jan 05 04:27:43 Greywood whats in the mysql ? Jan 05 04:28:10 not beagles i hope :D Jan 05 04:28:20 Date from one of esp8266 (Temp,Humidity,Light(in RH)) Jan 05 04:28:29 Data* Jan 05 04:28:54 And date from DS18B20 and DHT11 connected to it Jan 05 04:28:57 so ... time series data ? Jan 05 04:28:58 data*... Fuk Jan 05 04:30:26 On beagleboard I have python sript that connects to outside "Node" and is taking temperature, humidity and light (analog) value, and it is inserted in MySQL. Jan 05 04:31:16 Greywood too many moving parts, sounds like it needs re-architecting Jan 05 04:31:19 Same thing is done with "cable" connected ds18B20 and dht22, then inserted into database as "inside" Jan 05 04:31:20 * g00s cues dragorn Jan 05 04:31:48 g00es, yes, Jan 05 04:32:18 but it is my work for university, which normally has things like - hospital database, site and its done Jan 05 04:32:44 I made something more complicated and now im trying to make it all work Jan 05 04:33:35 without trying to redesign your whole thing, i'd say having the ESPs do a post to the BBB and aggregating the data there, then pulling from that to android via retrofit and a simple json interface would greatly simplify your efforts Jan 05 04:34:08 still better than any project I ever had in edu land Jan 05 04:35:20 Wait - currently ESP are transparent bridges that connect to arduino pro mini, that has connected relays, ds18b28, servos, byj28, photodiodes Jan 05 04:35:43 so you're f***... Freaking right, but still Jan 05 04:36:58 oh you're just using the esp w/ stock? even easier - iirc they have web posting built in :) Jan 05 04:37:36 anyhow, like I said - way cooler project than anything I had to do Jan 05 04:38:55 hahha nice to hear that. Jan 05 04:39:36 even doing a telnet-style poll of the nodes; if you can aggregate your state on the BBB and then export it as json, your life on android will be far simpler Jan 05 04:39:40 That's why I'm asking how to connect fragments to nodes Jan 05 04:44:34 In response what you said. Jan 05 04:45:13 Currently bbb have mysql and php that reads temp, humidity, light Jan 05 04:45:22 in python we belive Jan 05 04:45:27 This part is easy. Jan 05 04:46:13 Now im fighting with android drawers (weather connect, kitchen, aquarium, window blinds) Jan 05 04:46:28 I mean with android app Jan 05 04:47:59 * g00s wishes Greywood good luck Jan 05 04:50:18 hahahah. returning to question. How can I have socked used by fragment - (any tutorial?) Jan 05 04:50:38 like i mention above: Jan 05 04:50:47 i'd put all the coms in a service. have that modify your data structures. have the fragments subscribe to changes in those data structures Jan 05 04:54:04 That sounds like something I should do. Jan 05 04:54:39 But still, Im new to something like how to subscrube fragments to a service Jan 05 04:55:08 I made hole app in this design https://www.youtube.com/watch?v=TRa7GWRytT0 Jan 05 04:55:32 which is for sure funny for you, but surely helpfull for newbies like me Jan 05 04:56:33 Wrong link - https://www.youtube.com/watch?v=H4R-hz56oBA Jan 05 05:07:08 * g00s predicts greywood becomes driftwood Jan 05 06:02:48 is there anything like this but for android https://www.amazon.com/Pro-Continuous-Integration-Romain-Pouclet/dp/1484201256 Jan 05 06:03:21 i should learn to set something up, but i have no idea Jan 05 06:51:21 raoul11: Medium just fired 50 employees Jan 05 06:51:25 and closed 2 offices Jan 05 06:51:51 what Jan 05 06:51:53 why Jan 05 06:52:05 because they suck(?) Jan 05 06:52:13 they dont suck that bad Jan 05 06:52:29 lets buy it thepoosh Jan 05 06:52:54 https://techcrunch.com/2017/01/04/medium-lays-off-50-employees-shuts-down-new-york-and-d-c-offices/ Jan 05 06:54:03 what's up? Jan 05 06:55:13 gotta work on my own app today Jan 05 06:55:20 learn some git Jan 05 07:14:04 hi Jan 05 07:15:37 i want create image for different device , can i use mipmap instead of drawable folder ? Jan 05 07:56:18 does the android sdk manager have to be run as root to install any packages? Jan 05 07:58:17 nm Jan 05 08:28:50 How do I write a JsonDeserializer for Retrofit2 that receives this over network '{ "token" = "abc" }' and transforms it so the Retrofit method simply returns "abc" i.e. @GET("https://example.com") Call getToken (); ? Jan 05 08:30:29 Or is this bad practice? I currently have it return a class TokenResponse { public String token; } which is perhaps fine now I think about it. Still, I'd like to know how to do make such a deserializer =) Jan 05 08:44:30 thepoosh probably be a rough 2017 for many ;) Jan 05 08:45:50 Theranos, Yahoo, Twitter, Uber ... Jan 05 08:46:16 snapshat may have misrepresented its user base, boo pre ipo Jan 05 08:53:06 Which is easier to maintain in practice when app model doesn't match 1:1 with REST model: 1) JsonDeserializers and JsonSerializers or 2) Mapper Request and Response classes? Jan 05 08:53:39 Ah, perhaps this question is a bit vague.. Jan 05 10:07:17 * raoul11 thepooshes thepoosh Jan 05 10:16:27 raoul11: HAI Jan 05 10:16:42 whatcha doing today thepoosh Jan 05 10:17:01 listening to louis armstrong Jan 05 10:17:04 and you? Jan 05 10:17:10 reshet b Jan 05 10:17:16 bout to cook lunch Jan 05 10:17:22 damm son, you old! Jan 05 10:17:32 its either that or sheftel Jan 05 10:17:39 but he's unbearable today Jan 05 10:17:53 sheftel lis the lawyer who hates everyone? Jan 05 10:17:57 yep Jan 05 10:18:16 hates lefties Jan 05 11:03:24 What method can I use for scaling down images filesize before uploading them to my cloudstorage? It's not very optimal to have the user upload 3MB images. So just scaling down the "quality" I guess, without "cropping" it. Jan 05 11:04:09 my onFrameAvailable(SurfaceTexture surfaceTexture) is called only once. and it also stops the camera preview. what might be the reason? Jan 05 11:05:27 Bernzel, load them into bitmap, rescale (size) and save back to JPEG with a certain quality Jan 05 11:05:35 just make sure you use inScale to not run out of memory Jan 05 11:07:55 Mavrik, okey. Currently, I'm uploading images from the users gallery by opening an Inputstream on the Uri, but I would have to decode the stream into a bitmap first, rescale and then find a way to upload the resized JPEG? Or can I open en Inputstream on the JPEG somehow? Jan 05 11:12:54 How do I unwrap a single nested boolean in Retrofit? I get '{ "isOnline" = "true" } and I want @GET(...) Call isOnline (); ? Jan 05 11:27:53 anyone have the android sdk within their home directory instead of /opt? Jan 05 11:47:50 who hasnt Jan 05 12:20:47 I have it in ~/opt/android-sdk/ Jan 05 12:31:43 raj: Were you just blahblah, or did you have a real question? Jan 05 12:39:38 Gaah! Have I misuderstood Retrofit TypeAdapters? Shouldn't it be possible to automagically convert this "malformed" JSON from the backend to my lovely, clean model? http://pastebin.com/iwbHNmgi Jan 05 12:48:53 hm? http://stackoverflow.com/questions/16740078/serialize-and-deserialize-enum-with-gson Jan 05 12:54:07 Ashiren: The enum is not the case. Note how JSON has some fields as siblings to the user structure; I want them put inside like my model shows. Jan 05 12:54:59 oh Jan 05 12:55:27 so you want fields inside user put directly into your model? Jan 05 12:55:50 i think that would work depending how typeadapter is made Jan 05 12:57:47 I want Api.get("1234") to return a User objetct where id="1234", name="Alice", status=Status.Friend, isOnline=true. Jan 05 12:58:43 I think you're right about the TypeAdapter. How do I write one? =) Jan 05 12:59:28 dunno, i used it for for simpler things, and im at work atm Jan 05 13:11:47 Zta, why is it problematic for you to not match the json data? you would have something like "public class Response { public User user; public Status status...}" and of course a class User "public class User { String id; String name }}" etc.. ? Jan 05 13:12:12 in any case, everything is possible Jan 05 13:12:42 but it kinda defeat the purpose of a model to not match bijectively its other side Jan 05 13:19:11 This is what I currently have (see bottom): http://pastebin.com/L6dNFTnB Jan 05 13:21:01 So the GetUserResponse is a DTO that maps from API model to app model. I wish the two models were the the same, but reality prevented this =) Jan 05 13:24:38 Hey guys. I'm facing some issues regarding layout densities. Looking at the specs for Nexus 5 and Galaxy S5, both have almost the same configs - Nexus 5 is 5.0in and S5 is 5.1in. Both are xxhdpi, 360 x 640dp. But the layout doesn't fit the S5. It's too big. Jan 05 13:25:11 any tips on how to address this? Jan 05 13:26:37 use proportional metric instead of fixed/hardcoded Jan 05 13:27:02 The problem is that Status belongs to User and I therefore believe it should be put on the User. Object Oriented, and all that. The backend is modelled by ad database guy, and it returnes what was fastest to return at the time of writing, ignoring that the backend is actually serving a purpose.. Anyway, I'll continue with the DTO. Jan 05 13:27:18 or handle the different sizes vs dpi with layout qualifiers, birk_ Jan 05 13:27:23 birk_, https://developer.android.com/guide/practices/screens_support.html Jan 05 13:30:50 adq: but both are xxhdpi. They will use the same qualifier Jan 05 13:41:19 birk_: It's likely you've got the text sizes set differently between the devices. THey're both a 3:1 pixel to dp ratio and the same number of pixels, so sp differences are all that's left Jan 05 13:42:02 ...which it's good you're seeing _now_ rather than after someone using their phone in "old people mode" does, because they'll have the font sizes set BIG and things will _really_ go off the rails then Jan 05 13:42:50 Best practices or not, it's for this reason that I'll set a font to a dp size instead of sp in an eyeblink if it's going to screw up my layout Jan 05 13:45:41 Dagmar: the font size is set to "normal" on the settings. And I can't create a dimens.xml to use smaller SP because both will use the same folder, I think Jan 05 13:46:03 The pixel-to-SP ratio is effectively set by the user Jan 05 13:46:26 There's a phone config setting for font sizes they'll adjust. Jan 05 13:46:34 Otherwise, screenshots. Jan 05 13:46:53 I've _got_ an S5 and have spent a lot of time fighting with that kind of thing Jan 05 13:48:23 Dagmar: will ask for a screenshot of the config. screen. I don't have the S5 in hands Jan 05 13:48:38 Screenshots of the same display on both devices would be more useful Jan 05 13:48:54 ...but if there's text involved, it's almost certainly going to be the text overflowing the expected spaces Jan 05 13:49:49 Second best bet is usually differences in the notification bar size (since it's not standardized) Jan 05 13:50:16 Trailing at third would be "generalized Android bullshit with default margins between releases" Jan 05 13:51:47 As I can see on the screenshots, the text seems "ok". But some views have more margin. I have a view with different left margins between both devices Jan 05 13:52:31 Set using a @dimen value that's impacted by the theme I'm guessing Jan 05 13:53:08 When app is put in background and reopened. Is any of the code run again? Or is nothing done? Jan 05 13:54:05 Dagmar: the tester is using an unofficial 7.1.1 release... He'll downgrade and test again Jan 05 13:54:23 birk_: So... probably impacted by theme then. Great fun that stuff Jan 05 13:55:10 Sourcey: That's part of the Android Activity Lifecycle. There are specific methods that are called when an Activity leaves the foreground and comes back Jan 05 13:55:22 raoul11: this is interesting: https://youtu.be/TS_J0Qw4zl0 Jan 05 13:56:49 watchin Jan 05 13:57:22 she's one of us thepoosh ? Jan 05 13:57:35 she seems very jewy Jan 05 13:57:50 zeitouni Jan 05 13:58:06 "Hippie" is the word I'd use. ;) Jan 05 13:58:18 hipster Jan 05 13:58:36 Nah Jan 05 13:58:38 * thepoosh vomits in his own mouth Jan 05 14:04:37 thepoosh: as opposed to someone else's? Jan 05 14:05:17 just a weird phrase. normally you'd just say "i threw up in my mouth a little" not "i vomited in my own mouth". because then it implies it could happen in someone else's, which is even grosser. Jan 05 14:05:19 Lvl4Sword: would you like me to vomit in your mouth? Jan 05 14:05:29 thepoosh: ( ͡° ͜ʖ ͡°) i mean, now since you're asking Jan 05 14:05:39 there is internal vomiting and external vomiting Jan 05 14:07:55 how does one prevent a collapsing toolbar from collapsing on scroll events? i only want expand/collapose to be based on an onClickListener Jan 05 14:18:51 is there a way to sort pictures in camera roll by date Jan 05 14:18:57 by using metadata or something? Jan 05 14:21:15 treeman4: yes, use the new support EXIF library Jan 05 14:21:16 for that Jan 05 14:21:23 or just do it according to the file Jan 05 14:21:52 It helps to suggest to the user that they take photos in chronological order. ;) Jan 05 14:21:57 ty Jan 05 14:23:09 also, if you query via MediaStore contentresolver you can query by the date created Jan 05 14:54:29 Dagmar: it was not the Android version. The font size is default Jan 05 15:17:20 https://code.google.com/p/android/issues/list Jan 05 15:17:41 do you see only 5 items (one in jan 2015 and others in deb 2015)? Jan 05 15:17:47 feb* Jan 05 15:18:30 adq:yes Jan 05 15:18:40 lol ok, thx Jan 05 15:19:08 (i laugh because when bug tracker has an issue, there is no place to report it ;)) Jan 05 16:01:10 In my app, data is coming in the from of byte array and I need to parse it, is there a better way other than if else? I need to match corrosponding bytes with their meaning and then parse accordingly Jan 05 16:02:40 how can i disable appbar from collapsing on scroll? Jan 05 16:02:47 appbarlayout* Jan 05 16:04:40 KukOrkan, put it outside of coordinatorlayout Jan 05 16:07:24 aqd: coordinatorlayout is the root though Jan 05 16:08:17 you can place it elsewhere, you can also have multiple coordinatorlayout, it's up to you Jan 05 16:10:23 adq: not sure what you mean, this is what the layout looks like right now: http://pastebin.com/d95uWqa5 Jan 05 16:10:24 excuse my ignorance, just starting out, i'm on an amd64 machine on windows, so android studio is not producing an emulator saying i dont have hardware accelleration, amd hw virualization/acceleration/we support is available on linux i see. But would anyone happen to know if it would work in a virtualbox VM instance of linux, or would i have to dual boot, its more of a virualization question Jan 05 16:10:24 really. Jan 05 16:11:50 i dled a 3rd party working emulator compatible with my device but would prefer to use android studios. Jan 05 16:12:06 above, haxm on windows doesn't understand amd virtualization iirc, on the contrary kvm on linux should Jan 05 16:12:17 and iirc virtualbox has not issue with amd-v Jan 05 16:12:41 if you use AVD (emulator shipped with android sdk), it will request HAXM on win or KVM on linux Jan 05 16:12:52 if you use genymotion (virtualbox under the hood), it will use amd-v, etc Jan 05 16:13:00 explains a lot of thins right there Jan 05 16:13:02 there is also visual studio emualtor, but it uses hyper-v Jan 05 16:13:08 and i have no clue if hyper-v supports amd-v Jan 05 16:13:16 because i have noticed amd-vt working on virtualbox Jan 05 16:13:48 HAXM is from intel, FYI ;) Jan 05 16:13:57 this is probably why they don't even bother supporting their competitors lol Jan 05 16:15:28 im getting sick of amd im having other issues with them as well. like widi Jan 05 16:24:03 adq: without the coordinatorlayout root, it just stays expanded. i only want it to respond to an onclick and disable collapsing on scroll Jan 05 16:33:43 KukOrkan, i don't more sorry Jan 05 17:19:16 Is anyone successfully using constraint layout? I tried it last night and it was a hot mess. Every single child view was showing in the top left corner for the parent view no matter what I did. Jan 05 17:19:36 Are other people finding it ok to use, or is it generally regarded as unstable? Jan 05 17:19:47 It sounds like you're trying to use ConstraintLayout. Jan 05 17:20:05 haha, I am.... ? Jan 05 17:20:37 As far as I can tell it's mainly only useful when you want floating children arranged in some kind of proportional golden ratio Jan 05 17:20:52 It's been a mess for every other attempt I've made Jan 05 17:20:54 Still having problems with the layout size. Was able to reproduce it setting the density of the emulator to 480dp and screen to 5.1in. But both (S5 and Nexus 5) seems to use the xxhdpi and layout-large folder Jan 05 17:21:18 Dagmar, ah ok. Yeah, I think I'll continue avoiding it Jan 05 17:21:35 I like to think of ot as LastResortLayout Jan 05 17:23:13 <_rm> is constraintlayout the thing that's similar to autolayout on ios? Jan 05 17:25:06 kubast2: Knowing the itsec stuff I do, there's approximately a zero percent chance I'm going to be using a chinese phone with a chinese firmware Jan 05 17:25:13 @#$@# Jan 05 17:25:35 _rm No idea sorry. Jan 05 17:25:48 _rm: Not really. It's not automatic... you've still got to specify relationships between the widgets. You're just allowed to specify them very fancily Jan 05 17:32:04 <_rm> well i mean autolayout isn't automatic in that sense either Jan 05 17:32:12 <_rm> (it's just a damn nightmare) Jan 05 17:41:55 so the lint check which is supposed to tell you if your view does not have the layout_width/layout_height attributes doesn’t work if the view has a style applied to it Jan 05 17:42:56 even though that is part of what that check is supposed to be doing Jan 05 17:44:13 odd but I've seen pipe in oters code in android yet every-time I seem to have a use for it ( I.e two parent styles as sub-styles in xml) it just doesn't work. Why is that ? Jan 05 17:45:28 I assume that is just a feature not allowed so maybe a bad example in forcing two parent styles. But if i can remember other place I am amost sure it should have worked Jan 05 17:45:59 you can’t have two parent styles Jan 05 17:45:59 dar10s, example please? Jan 05 17:46:34 i assume you’re talking about something like “widget.mywidget.myspecialwidget” parent=“widget” Jan 05 17:47:05 the dot notation is an implicit parenting, but if you specify an explicit parent with the parent= attribute, that all goes out the window Jan 05 17:48:30 whats that website that has a custom control search engine? Jan 05 17:54:05 * bubbely pokes channnel Jan 05 17:59:30 =) Jan 05 18:00:20 android arsenal Jan 05 18:02:21 you are welcome Jan 05 18:03:17 Thank you! Jan 05 18:04:05 is that the only one? Jan 05 18:04:28 github Jan 05 19:02:39 Hi friends! I use mediaplayer to stream content that is served from cloudfront. The device is assigned an ipv4 address on lan but ipv6 on wan. Accessing media includes about a 15 second delay, which I assume is due to the device defaulting to ipv4, failing and switching to ipv6? Or perhaps I'm wrong. Is there an answer to this issue which would seem to affect the vast majority of Android devices out there. Jan 05 19:34:50 Hi all, I'm trying to use the old camera api with opengl. I've used .setPreviewTexture to place each frame to a texture accessible from my shader. One point of confusion though has been the orientation of the image. Despite rotating the image via .setDisplayOrientation and setRotation on the camera parameters, the texture always ends up in landscap Jan 05 19:34:50 e mode. Does this mean those settings don't apply to setPreviewTexture? Jan 05 19:49:58 I'm having a hard time building any of the NDK samples in the GVR SDK. I keep getting 'ld: cannot find -lgvr' Jan 05 19:53:32 Hello, which book you guys suggest for learning android app development for reader who has beginner level Java skills. Jan 05 19:54:41 jennie, start with an introduction to java first. It will be better in the long run to have the basics of programming as a foundation. Jan 05 19:54:43 didnt we go over this like two weeks ago Jan 05 19:55:04 whats yer play here jennie /: Jan 05 19:57:00 Yes, I am working on it but I would still like to read a book side by sidel Jan 05 19:57:31 big nerd ranch book is often cited here Jan 05 19:57:50 other than that, just be sure to not take a book older than 1 year ago Jan 05 19:58:57 ok adq thanks alot Jan 05 20:06:12 jennie big nerd ranch has a new edition (3rd i believe?) coming out in february, id wait until then to buy it Jan 05 20:06:24 alright, sounds good Jan 05 20:06:43 i recommend head first android Jan 05 20:06:48 its a good beginner book Jan 05 21:12:24 adq: finally figured out a solution Jan 05 21:12:59 tell us about it Jan 05 21:13:09 had to extend AppBarLayout.Behavior and return false on the override method onStartNestedScroll Jan 05 21:13:16 and make appbarlayout use that behavior Jan 05 21:13:27 only took me 3 hours Jan 05 21:13:49 :') Jan 05 21:14:36 yeah, im pretty happy Jan 05 21:14:39 enough programming today Jan 05 21:21:03 Hi all, I'm using the old camera API and am using a SurfaceTexture as the frame destination. Despite setting the rotation via setDisplayOrientation, the texture isn't in portrait. Jan 05 21:21:15 Any idea what could be causing this? Jan 05 21:42:49 toblarone I remember having a similar issue, try something like this: https://gist.github.com/Orbyt/db8e636306f4baf872337059240dfc08 Jan 05 21:44:46 orbyt_: Thanks, I been doing essentially that, but I think the difference is that instead of using .setPreviewDisplay, I'm using .setPreviewTexture. Jan 05 21:47:21 That method is just ripped out from my CameraPreview class, which extends SurfaceView. I think the main thing was setting the rotation of the cameras params, in addition to .setDisplayOrientation() Jan 05 21:47:31 This code is over a year old though, so its been awhile Jan 05 21:47:44 Ok, i'll double check to see if that works Jan 05 22:07:18 Anyone else having issues with api 25 emulator images sleeping and not turning back on? Jan 05 22:08:08 yiati: Images don't sleep Jan 05 22:10:25 Melatonina: with the "emulator" sleeping (or at least doing something that appears to be sleeping) Jan 05 22:11:01 yiati: sorry, I completely misread your message Jan 05 22:15:31 orbyt_: yea, still no luck : ( Jan 05 22:15:56 toblarone Would be best to try SO with some code examples then Jan 05 22:16:25 yeah, im getting to that point... thanks for the help anyways Jan 05 22:17:41 what is the best practice? let the fragment call a service or send the data to the activity in charge and then send it to the service? Jan 05 22:20:10 First best option is don't use fragment. Also if you must use Fragments, directly communicating up to an Activity is always better avoided Jan 05 22:20:30 tsousa: ^ Jan 05 22:20:58 yiati, dont use a fragment why? Jan 05 22:22:29 Very difficult to get right, very easy to shoot yourself in the foot with. Jan 05 22:24:09 i am making the preference part of the app. i have a fragment activity and show the main menu preferences, then call activity which options the user posted. and they it shows the new fragments of the options selected Jan 05 22:25:59 would it be better with activities? Jan 05 22:27:09 I'm sorry, but what in the world does this mean: firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) ... Specifically: catch(function(error) {... ??? from here: https://firebase.google.com/docs/auth/web/password-auth Jan 05 22:30:01 tsousa: Aww that's one of the few places I would suck it up and use a fragment since they did put a fair amount of work into the settings fragment Jan 05 22:30:22 Oh shoot, I'm reading the documentation for "Web" and not "Android. Jan 05 22:31:34 https://snag.gy/a4HhGM.jpg .... how to align the text fields to the top of these rows? Jan 05 22:31:39 its a ListActivity Jan 05 22:38:56 bubbely: Am I looking at two items in a ListActivity? And you want those two TextView that are currently centered vertically and to the left to be centered horizontally at the top? Jan 05 22:39:12 Do you plan to loose all the extra padding as well? Jan 05 22:39:29 yes thats two items Jan 05 22:39:39 i plan to not lose the padding although i want the height to be the same size Jan 05 22:41:14 Can I see the layout XML for the List Item? Jan 05 22:42:24 http://pastebin.com/8p1hTee8 Jan 05 22:43:37 Change your TextView's android:gravity="center_vertical" to android:gravity="top" =) Jan 05 22:44:10 woah thank you Jan 05 22:44:12 have you a good day :) Jan 05 22:44:41 On a side note, I'd use #000 and #fff for colors instead of "#ff00000000" and "#ffffffffff" Jan 05 22:45:39 And maybe look into RecyclerView instead of ListView. Jan 05 22:52:52 one more question.. cant find the answer on google. R.raw.videoone must be referred to how if im using viewvideo.setVideoPath ? Jan 05 23:02:25 Zta: u there? Jan 05 23:22:17 is it possible to use a listactivity for more than just one line of itmes ? Jan 05 23:22:59 I never used a listactivity Jan 05 23:23:25 I guess you can do whatever you can do with a ListView? Jan 05 23:25:57 A listActivity is really just a convenience item for an activity that displays a basic list Jan 05 23:26:24 if you want something outside of that, you’d best use a regular Activity and give it the layout you need Jan 05 23:28:55 that was my guess Jan 05 23:29:48 I don't use ListView. I use RecyclerView. And for handling correctly configuration changes I normalli host my RecyclerView in a retained fragment and then add the fragment in the activity Jan 05 23:30:32 is anyone using continuous integration / delivery to deploy APKs to Play Store ? is that even possible, or does that require human intervention ? Jan 05 23:33:50 what does CI means in Android development? Jan 05 23:35:05 continuous integration no? Jan 05 23:35:18 ok found this, seems possible http://blog.stablekernel.com/deploying-google-play-continuous-delivery-android-part-4/ Jan 05 23:35:22 g00s: they do support full ci Jan 05 23:36:00 herriojr ok thanks. i haven't looked at this at all in the years i've done android, totally clueless Jan 05 23:36:51 g00s: we do something similar with fabric Jan 05 23:38:09 herriojr any notable blogs / books you can share? i'd like to learn more of the various setups Jan 05 23:39:18 g00s: so, I set it up using shippable + fabric (fabric.io) Jan 05 23:39:27 i've heard of travis, hudson, jenkins - i guess there are a bunch of services like bitrise, etc Jan 05 23:39:41 yeah, you can do it with those Jan 05 23:39:41 * g00s google shippable Jan 05 23:40:07 shippable doesn't require you to run any instances on your own, they manage it Jan 05 23:40:30 you just define what kind of docker image to run to build and test your app and deploy it somewhere (in my case fabric) Jan 05 23:41:16 hm, i haven't used docker yet either Jan 05 23:41:24 do any server development? Jan 05 23:41:29 not atm Jan 05 23:41:37 right now I'm not even doing android (we pivoted so I'm helping on backend) Jan 05 23:41:57 using kubernetes or just plain docker ? Jan 05 23:42:01 ultimately, you don't have to worry about docker (it's just a detail what you're running in) Jan 05 23:42:10 in shippable's case Jan 05 23:43:09 I work alone on my Android application, that's why CI didn't make any sense yet Jan 05 23:43:13 the iOS guys have this book https://www.amazon.com/Pro-Continuous-Integration-Romain-Pouclet-ebook/dp/B00K6N4K2A ... which is what id like to read for android, starting from zero i find it easier to get a 10,000 foot view of the landscape Jan 05 23:43:35 we are deploying using amazon's cloudformation, so we don't use kubernetes Jan 05 23:43:50 I've never touched kubernetes Jan 05 23:43:53 herriojr are you using lambda? i was going to check that out Jan 05 23:43:59 not currently Jan 05 23:44:12 do you like server better than mobile ? Jan 05 23:44:26 I prefer UI — I just have a lot of backend experience as well Jan 05 23:44:35 nice Jan 05 23:45:41 i would read more about aws - but so many other choices like google cloud, azure ... and whats economical today may not be tomorrow, although i guess since they all compete with each other i would expect some convergence on price / features Jan 05 23:45:51 kinda dislike learning proprietary tech stacks Jan 05 23:46:17 for a long time amazon has been the most stable that I've experienced Jan 05 23:46:28 I dislike azure Jan 05 23:46:37 they also seem to have the most features; maybe a a higher cost though Jan 05 23:46:54 I had a good experience with Azure Jan 05 23:47:04 Microsoft has been doing great these past couple years Jan 05 23:47:05 if you're looking for a simple server setup, just do digitalocean Jan 05 23:47:11 In activities that should respond to device orientation changes the only thing that I must do in code is creating a (Linear)LayoutManager with the proper orientation. Can this be avoided? Jan 05 23:48:02 Melatonina: umm, if you programmed it right, your activity should get destroyed and recreated with the new layout Jan 05 23:48:38 Melatonina: there are some cases where you can't do that, but in most, you should just let the activity do its thing Jan 05 23:48:48 yes, but in onCreate (or onCreateView) I have to check the orientation and create the layout manager with the proper orientation Jan 05 23:49:13 Melatonina: ah, misunderstood what you were asking Jan 05 23:49:16 that's the only part of my code which depends on the device orientation Jan 05 23:49:23 is that normal? Jan 05 23:49:28 Melatonina: you still have access to the configuration Jan 05 23:49:41 RecyclerView.LayoutManager mLayoutManager = getResources().getConfiguration().orientation == ORIENTATION_LANDSCAPE ? new LinearLayoutManager(getApplicationContext(), LinearLayoutManager.HORIZONTAL, false) : new LinearLayoutManager(getApplicationContext()); Jan 05 23:49:45 Melatonina: I mean, it can be if you want it to scroll horizontally instead of vertically Jan 05 23:50:16 Melatonina: if it makes sense for you app's UI, then yeah, that will work Jan 05 23:50:25 herriojr: thanks! Jan 05 23:51:22 What's the advantage of using a service like Azure over using a virtual private server? Jan 05 23:51:35 Is it like a VPS with more features? Jan 05 23:53:46 As you said, Azure is a service, it has lots of different offerings. Jan 05 23:55:46 herriojr use swift on server yet ? Jan 05 23:56:02 Assume a basic setup of a navigation drawer, and upon click of an item in said drawer, the related fragment is loaded into the main activities container. I know of two ways to handle this: create a new instance of the fragment on each drawer click, or keep a reference to the fragment. Is there a third solution? Jan 05 23:56:52 orbyt_: even the VPS I'm using is a service and has different offerings. Jan 05 23:58:25 Melatonina Ok, let me be more clear: Azure is a cloud platform offering many services including virtual machines, databases and storage, DNS services, machine intelligence, and more. Jan 05 23:59:03 orbyt_: thanks for being more clear Jan 06 00:00:23 does android-sdk have the ability to keep itself updated? Jan 06 00:00:43 no, but it should let you know when there are updates Jan 06 00:00:56 s73v3r, so it can update everything except itself? Jan 06 00:01:25 if there’s an update to the updater tool, that can be applied. it just won’t happen automatically. Jan 06 00:01:50 is there an updater tool for linux? Jan 06 00:02:00 should be part of the download Jan 06 00:03:52 can I get to it from cli? Jan 06 00:04:34 yes, it’s in /tools or /platform-tools, I forget which Jan 06 00:07:22 cool thank you s73v3r Jan 06 00:09:24 Wow, reading the list of Azure services made my head spin: https://azure.microsoft.com/en-us/services/ Jan 06 00:09:44 I wonder what is worth learning. They do everything Jan 06 00:11:44 Do I have to continue developing my application and service as I'm doing now? Should I learn how to use those services instead? Jan 06 00:15:49 Will using or not using a service like that affect the development much? Should I learn to use a service like that before I apply for a job interview? Jan 06 00:19:44 keep going as you’re going Jan 06 00:22:34 s73v3r, besides permissions, is there any other advantage to keeping it in home directory instead of /opt if they are on the same partition? Jan 06 00:22:43 no idea Jan 06 00:29:37 s73v3r: thanks Jan 06 00:30:25 Melatonia: Most of what you'd learn to deploy there would only be deployable on their infrastructure. That information will not be portable. Jan 06 00:34:36 Dagmar: thanks Jan 06 00:36:16 hey all, I have a problem with PercentRelativeLayout's layout_marginTopPercent attribute.. It shows up fine on the editer but on the device it looks like it's ignoring the attribute, Everything is on the top, however it is minding the left and right attributes... Jan 06 00:41:56 hmm looks like you can't use them both? wtf? Jan 06 00:42:10 no top/bottom + left/right(start/end) Jan 06 00:50:44 whatever.., I'm just going to ask for a graphic heh. Jan 06 00:57:50 yeah.. layout_marginTopPercent seems broken.. Jan 06 01:17:38 hi Jan 06 01:17:47 is it possible to put a VideoView in a Listview cell Jan 06 01:20:03 ew, sounds nasty Jan 06 01:20:16 why not a viewpager? Jan 06 01:20:21 I know you can in a viewpager Jan 06 01:20:30 but when I think video I thik of inflating all those VideoViews Jan 06 01:20:36 esp while scrolling... Jan 06 01:21:00 And you might want to look at RecyclerView Jan 06 01:21:28 ill look up a viewpager Jan 06 01:21:35 or TextureView Jan 06 01:22:09 here is an example bubbely: https://github.com/atabouraya/VideoInRecyclerViewExamples Jan 06 01:22:28 RecyclerView is tons more eficient than ListView Jan 06 01:22:43 ListView might get you an OOM pretty quickly Jan 06 01:23:14 Tricknology: I don't agree that it's tons more efficient. Jan 06 01:24:00 From what I've seen, it can actually (and easily) end up being less efficient. Jan 06 01:24:28 fuck it, I think I'll get a bolt, even though it's small Jan 06 01:25:01 pfn=) Jan 06 01:25:13 I can barely fit in the back seat Jan 06 01:25:15 loading this example tricknology Jan 06 01:25:53 TacticalJoke: your saying use listview ? Jan 06 01:26:32 bubbely: Ohh, no. Just talking about RecyclerView and ListView in general. Jan 06 01:26:34 Is adding a public BehaviorSubject the RxJava way to implement observable properties? Jan 06 01:26:53 TacticalJoke: what do u advise i do about creating a listview that i want videos in their cells? amongst other things... Jan 06 01:27:52 Not sure, because I've never done anything like that, but can I ask why you want to? It's not something you hear every day. :D Jan 06 01:28:23 ill tell u when i can ;) Jan 06 01:29:19 bubbely: just do it. I did it using ExoPlayer. Jan 06 01:32:01 Melatonina: http://pastebin.com/a0h3K0Lp does that look right?? my videoview isnt showing upp Jan 06 01:32:10 thats the item layout (row layout) Jan 06 01:33:38 it looks ok. I didn't use VideoView though Jan 06 01:34:28 hmm well its not showing Jan 06 01:34:29 any ideas? Jan 06 01:34:30 How do I make a read-only observable property with RxJava? Jan 06 01:34:44 did you set the content? Jan 06 01:34:54 if not, that will have height = 0 Jan 06 01:35:05 oh Jan 06 01:35:16 anyway, as I said, I don't use VideoView Jan 06 01:35:21 set the content in the xml file ?? Jan 06 01:36:09 set the content somehow Jan 06 01:36:44 did you set layout_height to wrap content? Jan 06 01:36:50 You are getting what you asked for Jan 06 01:38:54 it worked Jan 06 01:38:55 thx Jan 06 01:39:12 np Jan 06 01:40:33 you're going to have a lot of trouble if you plan to embed play video on every item of your list (recyclerview or listview it does not matter much, experience will have a high probability to be poor for most of your users) Jan 06 01:41:05 what you can do to mitigate the performance impact, is only allow one video to play at same time, and not more Jan 06 01:41:50 adq good idea Jan 06 01:42:02 so users will likely scroll without stuttering and other issues, and if they hit your item or something in your item (or you could even do that automatically based on a particular visible position of an item) Jan 06 01:42:14 in order to explicitly request a "play this content" Jan 06 01:42:35 also, don't use surfaceview or any components inheriting from surfaceview in your list item Jan 06 01:42:58 usually, only one surfaceview is allowed per screen, more will definitely lead to many weird gfx issues Jan 06 01:43:15 so you also have this problem to address, what container should you use for playing your video Jan 06 01:43:23 good luck Jan 06 01:44:18 I planned to implement "only one player active at time" but I have to report that I'm not having problem with multiple SurfaceView playing at the same time in a RecyclerView Jan 06 01:44:58 maybe they fixed some issues in the latest API platform framework Jan 06 01:45:39 but when i tried (not even inside a listview or recyclerview), i have funny glitches where the contents of one surface would sometimes be found on the other Jan 06 01:45:55 among many other things i don't recall Jan 06 01:47:56 s73v3r, is it odd to use my package manager's java, or should I be downloading java along with the sdk manager? Jan 06 01:47:58 in all cases, surfaceview doesn't like to move or resized Jan 06 01:48:07 (because I believe it no longer comes with java) Jan 06 01:48:21 raj: i’m not a linux guy Jan 06 01:50:45 ah ok Jan 06 01:53:49 ello, peeps Jan 06 01:54:20 Ello ello ello. Jan 06 01:54:53 * g00s tries vivaldi browser Jan 06 01:54:59 i wonder how they make money Jan 06 01:55:18 do I have to make a public getter for the value and getter returning the underlying BehaviourSubject as IObservable? Jan 06 01:55:27 Observable Jan 06 01:55:35 Is that the correct way? Jan 06 01:56:11 "We use JavaScript and React to create the user interface with the help of Node.js" interesting Jan 06 01:57:37 don't anybody use RxJava here? Jan 06 01:58:23 Melatonina yeah but this is #android ^H^H^H sparta Jan 06 01:58:34 there are a lot of rxjava blogs, books, videos, tuts Jan 06 01:59:18 :( Jan 06 01:59:52 since a subject implements observable, of course your getter can just return the observable Jan 06 02:00:40 give you a chance Melatonina Jan 06 02:00:49 search and document yourself first for a while Jan 06 02:01:02 ask later, unlikely thus Jan 06 02:01:11 adq, I do it all the time and I do it for other people here too. Don't be offensive Jan 06 02:01:20 wat Jan 06 02:01:46 if you're new to something, just don't rush for asking help, that what i meant Jan 06 02:02:03 if you believe i'm offensive, good luck Jan 06 02:02:51 g00s: I remember when desktop Opera had ads back in the earlier 00s. I was outraged back then. Jan 06 02:02:56 lastly, helping ppl is good but there is no trade and you should not put yourself into theposition of because you provide help then you deserve as much when you ask for it Jan 06 02:03:18 also helping ppl != feeding ppl with google search or stackoverflow or spoon feeding Jan 06 02:03:22 it's bad. Jan 06 02:04:38 adq: recently I answer (and google for other people) more questions here than what I ask. I don't expect people to answer every question that I ask but it's not fair to be lectured about googling. Jan 06 02:05:15 adq you back from vacation ? :) Jan 06 02:05:18 I don't think I deserve answer. I don't deserve what you said to me tho either. SOrry Jan 06 02:05:28 well, i think it's not helping to searching for others, giving hints or providing official documentation is ok tho Jan 06 02:06:01 g00s, yes but physically only ^^ Jan 06 02:07:33 g00s, but i stayed "up to date" since i had time on my personal/side projects, so i even got gradle 3.3 and latest AS Jan 06 02:07:39 still keeping instant-ruin disabled Jan 06 02:08:10 lol Jan 06 02:08:17 instant ruin :) Jan 06 02:08:22 yes Jan 06 02:08:25 trying to make a trend Jan 06 02:08:30 also it is still xmAS Jan 06 02:08:39 report to google blinks every day, many times per day Jan 06 02:08:43 it will probably work well by i/o 2017 Jan 06 02:08:52 adq: sometimes I don't find good keywords that yield the desired results on google. That happen easily when you know so little of a subject that you didn't learn good keywords yet. That's why I sometimes google for other people. Jan 06 02:09:13 then provide them what to search for Jan 06 02:09:42 anyway, it's not a big deal Jan 06 02:09:51 Googling for others can be a good way to learn. I remember Jon Skeet saying he learned .NET that way. Jan 06 02:09:52 i'm just against spoon feeding Jan 06 02:10:10 yeah, at least you're the one benefiting the most from it maybe, lol Jan 06 02:10:23 like here, so many issues ppl got i don't (and other i have it seems they don't) Jan 06 02:10:43 I do it for the same reasons. I say "Let's see if I'm able to find this information in case I need it too" Jan 06 02:10:47 always things to absorb and learn Jan 06 02:11:06 Other times I don't care and don't answer Jan 06 02:11:09 well, tbh when i don't know i try to refrain myself because i want to answer Jan 06 02:11:20 but i learned not so late that it's better to not say anything if i'm not sure Jan 06 02:11:35 (implicitly meaning if i cannot prove it easily) Jan 06 02:18:47 Well, for the record, I could not google anything relevant on the subject. And it was not the first time. Jan 06 02:21:48 I'll try something of this kind for a while and see how it works: https://gist.github.com/anonymous/5202ae3c2d5d8a9b1396c28ec8f1cd3d Jan 06 02:22:23 no, that's not good enough Jan 06 02:26:45 Something like this: https://gist.github.com/anonymous/cf29f09e3bbb885df3e605c3639fe278 **** ENDING LOGGING AT Fri Jan 06 03:00:01 2017