**** BEGIN LOGGING AT Wed Dec 07 03:00:00 2016 Dec 07 03:01:58 Dagmar Is it bad to have 4 fragment class for each suit? Dec 07 03:07:00 Of course most of the photomosaic app would be written in Java. But the script that actually would be doing the image transformation could be written in renderscrip Dec 07 03:08:39 I've experience with Java/Android but not with renderscrip, just wondering if it make sense/worth just this particular case Dec 07 04:10:50 http://codepen.io/waynedunkley/pen/YPJWaz/ Dec 07 04:11:09 Hey all, I have a problem that must be pretty common - if my activity receives an http async response when the user has already clicked away from that activity, I'm getting an error. Is there an easy way to fix this using retrofit? Dec 07 04:12:21 Cancel the request when your activity is leaving Dec 07 04:12:59 I did, but it goes to the onFail callback in the call which I guess is a problem since the activity is stopped Dec 07 04:16:32 hmm, nevermind. It was only a problem because I was trying to show a dialog in the onFailure callback. Dec 07 07:18:08 Anyone with experience in widgets? I want to add widget programmatically to home screen. Is it possible? Dec 07 07:22:36 I think so Dec 07 07:22:36 you need a runtime permission though Dec 07 07:24:21 tx, Which runtime permission would that be? Dec 07 07:46:15 hi folks, I would like to ask for advice. I have application, which provides some text with images (its offline song book). Text is loaded from /res/raw/data and images from /res/drawables/image.png. Question is: Is possible to create new application, which will add (or provide) new data and images, which will be possible to use in current application? Dec 07 07:47:31 probably something like https://play.google.com/store/apps/details?id=com.htc.sense.ime.langpack.teng_uk Dec 07 07:49:15 jridky: maybe you want to read about content providers https://developer.android.com/guide/topics/providers/content-providers.html Dec 07 07:50:05 jridky: maybe you could structure your app as a viewer for data coming from your content providers and provide additional content providers as "extension pack" Dec 07 07:50:22 jridky: I never do it myself. But I would read about that Dec 07 07:50:47 never did it Dec 07 07:51:10 Melatonina, thanks, it is probably, what I am looking for :) I'll check it. Dec 07 07:55:17 how to open widget picker screen programmatically? Dec 07 08:17:52 hey guys what's the best http library for java. I've seen a lot of people using okhttp - is this the one to go with? Dec 07 08:19:18 okhttp and/or retrofit Dec 07 08:19:45 thanks i'll check out retrofit Dec 07 08:22:54 idontknowanythin: retrofit is the tool to serialize requests and responses to pojos, OkHttp is the Networking client Dec 07 08:22:59 they work very well together Dec 07 08:23:47 I see, so i would make requests to an api with okhttp and parse the json with retrofit? Dec 07 08:25:20 no, you use retrofit to call an api, retrofit uses okhttp to do the actual calling Dec 07 08:26:42 retrofit wraps OkHttp and is the only entry point for you Dec 07 08:26:53 it's an auto-parser Dec 07 08:27:15 Oh that makes sense. Sorry not that experienced with Java networking. Dec 07 08:27:29 no worries, that's what this channel is for Dec 07 08:27:39 for more reading, go here: https://github.com/square/retrofit Dec 07 08:27:43 Awesome thanks, I appreciate the help. Dec 07 08:33:39 Is Jake Wharton the author of retrofit as well? He seems to make almost every popular android library Dec 07 08:37:49 yes, he is Dec 07 08:38:21 wow, that is very impressive Dec 07 08:41:55 how to get launcher App Widget Host id? Dec 07 08:59:57 What is that android tool for measuring views/elements in px? Dec 07 09:00:23 Bernzel: there is a snapshot to do in the Android Monitor Dec 07 09:00:42 thepoosh, that might be the one. I'll check it out, thanks Dec 07 09:09:56 * raoul11 thepooshes thepoosh Dec 07 09:10:09 hi hi Dec 07 09:12:44 raoul11: what's news? Dec 07 09:13:11 contemplating suicide, doing another screen Dec 07 09:13:14 as usual Dec 07 09:14:54 for me the usual is taking over the world Dec 07 09:16:34 you should average the two extremes Dec 07 09:16:39 you two Dec 07 09:19:49 TacticalJoke thanks Dec 07 09:21:39 Hi. No 32bit android emulators anymore (for linux)? Dec 07 09:25:26 ohi Melatonina Dec 07 09:25:48 hi :) Dec 07 09:30:16 thepoosh gets his strength from his yamaka and the hilbe he puts in his soup Dec 07 09:33:18 no yamaka and hilbe for you? Dec 07 09:33:23 nope Dec 07 09:34:45 because you don't follow traditions or because you are different flavor of Jew? Dec 07 09:34:55 why not both /: Dec 07 09:35:04 ok, both Dec 07 09:35:07 Just asking Dec 07 09:35:12 his flavor his yemenite Dec 07 09:35:15 is* Dec 07 09:35:57 Yes, I read that hilbe is a typical yemenite condiment Dec 07 09:44:33 does anyone know if we can we use layout_weight in relative layout? Dec 07 09:55:45 Can I use Android Device Monitor and observe the layout of ad emulator running a mdpi device to measure the pixel width/height of some of my images and then scale them to approximately those measurements in order to optimize my ui resources? Does it sound sane? Dec 07 09:55:53 of an* Dec 07 09:58:44 Bernzel, you can use pre-launch report on the play store console to generate screenshots of your alpha/beta apks Dec 07 09:59:02 also look into firebase testlab Dec 07 09:59:27 those tools will generate screenshots in various devices Dec 07 10:00:03 raoul11, cool just started using Firebase, didn't know they had that. Thanks Dec 07 10:00:25 in firebase its a bit more limited if you're on the free/spark plan Dec 07 10:00:44 you only get to run 15 tests a day Dec 07 10:01:21 with each device is actually 1 test, in a pre-defined test matrix you set Dec 07 10:01:32 Hello. I need to access the dialer for when you are already in a call. Different from the normal dialer Dec 07 10:01:37 raoul11, okey. But using the Android Device Monitor must be a solid way of doing this too? I just launch a different emulator each time. Dec 07 10:01:41 prelaunch is free, will give you a lot to look into Dec 07 10:02:00 well, its a lot more resources hogger and time consuming Dec 07 10:02:21 imagine just uploading an apk, and see how it renders on different devices Dec 07 10:02:30 i think like 7 or 9 on the prelaunch report Dec 07 10:03:55 also, use vectordrawables whereever its possible which will allow you to have much more control on the images/icons sizes Dec 07 10:04:28 raoul11, yeah point made. it's an Instrumentation test ? Dec 07 10:04:29 anyone had issues running AS 2.1 HAXM with Docker on the same machine ? Dec 07 10:04:56 its basically a workflow test Dec 07 10:05:07 see which bugs jumps out, supposefly security checkups Dec 07 10:05:16 gonna try upgrading to 2.2.3 and see if it has problems working with VMs Dec 07 10:05:17 yeah but which of the options: "Robo Test" or "Instrumentation Test" Dec 07 10:05:23 oh Dec 07 10:05:26 raoul11 firebase testlab sounds interesting. Im not too familiar with it yet. Is it a good beginner tutuorial for firebase? Dec 07 10:05:31 i usually do the robo test Dec 07 10:05:38 ok thanks Dec 07 10:05:50 but its limited Bernzel to 15 tests a day afaik Dec 07 10:05:53 on the free plan Dec 07 10:06:07 that won't be a problem. Dec 07 10:06:22 15 test A DAY , I'll just have to sleep through to the next day and continue then :) Dec 07 10:06:42 droidace: it is, though if you have some login activities you might wanna exclude them Dec 07 10:06:52 and kinda direct the way testlab explores your app Dec 07 10:06:57 awesome Dec 07 10:06:58 thanks Dec 07 10:07:07 and again - pre launch is free Dec 07 10:19:43 Does anyone know if there is a method to add the 'flagNoExtractUi' flag on all EditText fields in an app? Dec 07 10:21:04 I'd like to get rid of that confusing default behaviour, as easy as possible Dec 07 10:34:54 raoul11, hm seems strange. "1 device/API level combination is unsupported and will be marked as skipped in the test matrix." no matter what device/API combination I choose. Dec 07 10:35:06 I'll go into the firebase support srry Dec 07 10:35:39 Bernzel Dec 07 10:36:02 when you hover with the mouse on a device, it tells you which api it supports Dec 07 10:36:38 oh right! Dec 07 10:36:44 so if you choose nexus 5 (19-23) Dec 07 10:37:02 you just pick which api you want on the api levels Dec 07 10:37:21 got it now. Thanks Dec 07 10:37:50 try with 1 device at first Dec 07 10:38:24 so if you got some activities which will loop on itself (like a login, open external webpage), you wont just waste those tests Dec 07 10:38:24 sup bro Dec 07 10:52:46 raoul11, yeah nice tool indeed! Dec 07 10:53:09 yeah it is Dec 07 10:53:28 lots of stuff on firebase are Dec 07 10:54:02 is/are/whatever Dec 07 10:54:05 regarding my resources. Do you really do xxxhdpi resources? A button for me (mdpi * 3 = xxxhdpi) would make it 1570px wide, that seems gigantic even for such a device? Dec 07 10:54:29 I'm sure it would look nice, but performance wise.. sounds like it will swallow alot Dec 07 10:55:00 tbh lately i am mostly using vectordrawables Dec 07 10:55:16 and just state their dp sizes Dec 07 10:55:34 raoul11, elaborate if you please. Haven't heard of that Dec 07 10:55:50 basically support for svg on android Dec 07 10:56:01 ill show you an example Dec 07 10:56:05 sure Dec 07 10:58:53 Bernzel http://pastebin.com/5124Efnm Dec 07 10:58:57 I'm reading about it now, sounds amazing. This should be insdustry standard way of using graphical resources Dec 07 10:59:18 ah Dec 07 10:59:23 lets see Dec 07 10:59:24 right click on the drawables folder/new drawable resource file Dec 07 10:59:37 and dump this paste on it (remove everythin else) Dec 07 11:00:01 now when you are using a buttom, an imageview or whatever, you just link to that drawable Dec 07 11:00:32 but you can set the sizes either on that drawable in dps, or later dynamically, without having to recreate 6 versions of the same image Dec 07 11:00:49 so dont think in pixels, but in dp Dec 07 11:00:50 raoul11, can't believe I haven't heard of this method before.. Dec 07 11:01:38 once you get used to it, you wont wanna go back Dec 07 11:01:52 so this one resource file would represent one drawable resource? Like a button image e.i Dec 07 11:01:54 you can also animate it, tint it, do whatever you want to it Dec 07 11:02:28 you can use it for a drawableLeft button, and a recyclerview item image Dec 07 11:02:45 and for each sort of widget you can customize it Dec 07 11:03:36 it does have some limitations it seems. Dec 07 11:03:43 "We recommend that you limit a vector image to a maximum of 200 x 200 dp; otherwise, it can take too long to draw." Dec 07 11:04:02 with the widget attributes: so for a go back button you can set it sizes to 48dp, and for a recyclerview you can set its sizes to 24dp Dec 07 11:04:18 200dp is a lot Dec 07 11:04:25 you might be confused with px Dec 07 11:05:09 play with it a bit, see how it works out for you Dec 07 11:05:26 I have buttons in sw600dp layout's that are 450dp wide. Dec 07 11:07:36 those buttons are pretty much full width buttons Dec 07 11:07:43 i see Dec 07 11:07:47 anyways bbl lunch Dec 07 11:07:49 o/ Dec 07 11:07:54 o/ Dec 07 11:11:26 bonjello! Dec 07 11:11:28 o/ Dec 07 11:42:24 Is there a way to open the dialpad for the ongoing call? like when you call a answermachine and dial 2 etc. not the normal dialpad Dec 07 11:50:31 gang Dec 07 12:07:39 Hi, how do I specify which view should be on top of which in a RelativeLayout ? ( if I want then layered on top of each other ) Dec 07 12:07:50 them* Dec 07 12:14:55 they are drawn in z order in relation to the layout, so first view can be under second, second can be under third etc Dec 07 12:17:00 whatitis, I have a WebView and a button placed over each other in RelativeLayout. If I change their order in the xml file the button stays on top. Dec 07 12:17:53 show the layout Dec 07 12:19:28 Where can I put it up ? Dec 07 12:19:41 It is really just a standard generated xml page in AS. Dec 07 12:19:44 with two views. Dec 07 12:34:32 on a pastebin site Dec 07 12:40:19 I added some more views and they all behave like expected. Change the position in the xml and thier zindex changes. But the button stays on top. Dec 07 12:40:27 Fortunately I don't really need a button. Dec 07 12:40:46 I just wanted to check something. Dec 07 12:41:57 maybe button has something special bout it. Try googlin it. I don't really use buttons much i just use a other views that are clickable so i wouldn't be the best to ask :) Dec 07 13:23:40 Argh... Dec 07 13:24:38 While doing IAB I set the DeveloperPayload. But after finishing the purchase flow, my iabHelper.handleActivityResult() doesn't get DeveloperPayload in the Intent data. Anyone know what could be wrong? Dec 07 13:25:28 Hi, how does one use data binding with ViewStub? Dec 07 13:37:37 raoul11, srry to disturb, if you're back? Dec 07 13:37:49 am back buddy Dec 07 13:40:02 cool, I tried importing an SVG icon using the Vector Asset Studio. So I imported a local SVG into my drawable folder. And I got an .xml file generated like you showed me. But also the actual .svg file was imported and is giving me: http://pastebin.com/WDHBdD1t Dec 07 13:40:24 saying "Element SVG must be declared" . Dec 07 13:40:53 So just delete the svg file? Dec 07 13:41:05 yeah Dec 07 13:41:11 i dont use AS vector maker Dec 07 13:41:13 dont like it Dec 07 13:41:22 http://a-student.github.io/SvgToVectorDrawableConverter.Web/ Dec 07 13:41:28 drag/drop/copy/paste Dec 07 13:41:57 oh cool. There's online tools for everything .. Dec 07 13:42:19 theres actually quite a few for that translate into vectors Dec 07 13:42:27 but this one i find most easy to work with Dec 07 13:42:49 then i just c/p the output to a new icons_whatever drawable file Dec 07 13:43:34 alright, thanks man. And I figured, I'd use vector resources for the small stuff like toolbar icons, minor buttons and such. And simply generate different image resources xxhdpi,mdpi etc for the large buttons and background images e.i . Sounds reasonable? Dec 07 13:43:37 also Bernzel: https://materialdesignicons.com/ this should come in handy if yer lookin into material icons in vectorish form, you can actually get them directly without translating an svg to a vector Dec 07 13:43:48 that's the site I got mine from :) Great stuff Dec 07 13:43:51 reasonable enough Dec 07 13:44:13 so on that site you can copy/paste the vectorish code Dec 07 13:44:42 just click on that button and view vector drawable Dec 07 13:44:47 then you dont need to translate Dec 07 13:45:39 awesome, really. Dec 07 13:45:47 Thanks again Dec 07 13:46:02 np Dec 07 13:58:05 Good morning Dec 07 13:59:58 So I need to display a few facebook feeds in an android app in gridview but I'm not sure if Facebook scraping up to about 50 posts for each feed is fine or whether i should use Facebook's API Dec 07 14:00:02 but tha's too much hassle Dec 07 14:01:13 I mean one page shows at least about 10-20 posts so maybe its not that bad and acceptable Dec 07 14:01:16 What’s the longevity of your app? I wouldn’t scrape Facebook for an app that you plan on maintaining Dec 07 14:01:27 ok then Dec 07 14:01:40 There’s no contract between you and the API so the format could change at any point Dec 07 14:01:55 is that why you say or because of legal issues Dec 07 14:01:57 Which would break your app Dec 07 14:02:31 I am trying to create a login with slim2 and retrofit2 but I get a 404 on logcat, can anyone help me to solve this problem? my old stackoverflow is here, http://stackoverflow.com/questions/40748866/retrofit2-login/ Dec 07 14:02:43 I don’t really care about legal issues, if you’re hacking together a small app for something personal I don’t think anyone at Facebook cares Dec 07 14:02:45 That and if they decide your app is a problem, may "take steps" to kill it's ability to access FB Dec 07 14:03:04 ok Dec 07 14:04:23 Any sqlite experts here? I’m running into a really weird issue Dec 07 14:04:51 Hi guys...I need a powerbank that have dual output for charging. Any recomendations? (my apologizes if this is offtopic :x) Dec 07 14:07:26 I have a basic setup where I pull down content from the server and store it locally, if the content is already stored I update it. I was originally just doing a basic “ON CONFLICT REPLACE” on the table, but now I’m storing additional fields for if the user has seen the content already so I can’t do that anymore Dec 07 14:10:27 I saw a stack overflow post recommending that you switch to failing on conflicts, so instead you insert everything then immediately update everything after that finishes. That way you can update specific fields without clearing meta data values. Dec 07 14:10:56 The inserts appear to be working fine, but updates seem to only be working about 30% of the time Dec 07 14:12:20 Does anyone have an idea why that would happen? I’ve tried inserting then updating within a single transaction, and doing it in back to back transactions and both have similar fail rates Dec 07 14:19:27 hi guys, I have a issue with a BLE Hid Report Map not showing up as an actual HID device, anyone familiar with this? Dec 07 14:19:30 I'm looking into the source, especially in bta_hh_* Dec 07 14:19:36 the dscp_len (descriptor length) being passed is zero. Should be != 0 obviously Dec 07 14:19:47 The same peripheral application is working in Android 6.0 Dec 07 14:19:54 the problem pops up in Android 7.0 Dec 07 14:20:39 Worst case scenario I could query the DB for matches to incoming IDs, update the metadata fields on the new items from the DB and insert with ON CONFLICT REPLACE again but that sounds so ugly I don’t really want to consider it outside of a last resort. Dec 07 14:29:12 Hello, I tro to generate a hash debug key for Facebook app. My key is properly generated (a 28length key), but Facebook says it need a 28 length key with = at the end Dec 07 14:29:29 So, am I doing something wrong ? Or it's facebook ? Dec 07 14:31:18 * Dagmar checks the name of the channel carefully Dec 07 14:31:40 an android hash key* , hehe Dec 07 14:32:19 The android question is: is it normal to have a debug android hash key with no '=' at the end ? Dec 07 14:39:48 Colmea: How did you generate the key? Dec 07 14:40:38 keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 Dec 07 14:44:15 konk3r, it's theproper way, isn't it ? Dec 07 14:44:52 It looks like it Dec 07 14:46:05 It looks like if that’s not working you can grab it from code Dec 07 14:46:06 http://stackoverflow.com/questions/7506392/how-to-create-android-facebook-key-hash Dec 07 14:48:10 unfortunately I'm on React-native so I can't put this native code Dec 07 14:55:10 hey everyone Dec 07 14:55:41 what is difference between emulator and emulator64-x86 ??? Dec 07 14:58:21 emulator is probably 32bits binary, while the other is 64bits for x86_64 arch Dec 07 14:59:54 anyone here seeing issues with webview and 7.0 and up with daynight mode? Dec 07 15:08:58 When reusing a theme that removes toolbar/action bar I am getting an error of android.view.InflateException, how can I debug this ? there is no place to set a breakpoint for loading a theme is there? Dec 07 15:09:20 the odd thing is it points to "Binary XML file line #19: Binary XML file line #20: Binary XML file line #20: Error inflating class Button" Dec 07 15:09:43 on a fragment that has no buttons and only is 14 line long ? So confussed Dec 07 15:11:29 Nevermind, I’m an idiot. The sql updates were working fine, the issue was my recyclerview adapter not displaying the updated items Dec 07 15:28:02 Hi I'm using Eclipse and keep getting errors about my Grundle Dec 07 15:28:08 Any help is appreciated Dec 07 15:38:42 join #chat Dec 07 15:38:47 doh Dec 07 15:38:49 lol Dec 07 15:43:57 hi Dec 07 15:44:01 THIS IS A VIRUS Dec 07 15:44:04 http://csmgdl.lgmobile.com/dn/downloader.dev?fileKey=FW63EXF452MCADX4FA6D8VX/D405n20c_00_0207.kdz Dec 07 15:44:10 could someone check if it starts downloading for them Dec 07 15:44:33 i just get a 400 response Dec 07 15:46:13 TY Dec 07 15:46:24 huh Dec 07 15:47:08 just tell me if it start downloading Dec 07 15:47:09 -.- Dec 07 15:47:53 ... Dec 07 15:49:05 s Dec 07 15:59:23 i have two layouts one for when locale language is english and other for when it is not english in one activity but android framework can not find out correct it to use Dec 07 15:59:39 i have never written any code for hanle it in java file Dec 07 16:04:56 Probably because that's not a useful way to switch layouts Dec 07 16:07:25 Dagmar : do u have any idea ? Dec 07 16:11:57 you can define strings in strings.xml Dec 07 16:12:11 it has a built in translation editor (where you can specify or even buy translations) Dec 07 16:12:17 based on locale Dec 07 16:12:25 of the phone Dec 07 16:15:19 It's as black91 says. _That_ is the correct way to handle differnet languages. Your layouts aren't supposed to need changing. Dec 07 16:17:12 iresf, https://developer.android.com/training/basics/supporting-devices/languages.html Dec 07 16:17:43 adq : i have read it for times Dec 07 16:17:47 well sometimes, the best help we can provide is just redirecting ppl to documentation like they're not aware they should have read it Dec 07 16:18:46 if you have red it for times, just ask about what you haven't understand because it's pretty straight-forward for this part Dec 07 16:19:03 you should be able to right click strings -> translation editor is what it doesnt say Dec 07 16:19:10 it will format it automagically Dec 07 16:19:21 if you use as Dec 07 16:19:27 that's not the android studio documentation Dec 07 16:24:29 anyone know a good tutorial that explains how custom views can be added to a ViewHolder in a RecyclerView.Adapter? Dec 07 16:24:59 It's actually pretty much obvious once you've done a RecyclerView Dec 07 16:26:47 Dagmar: i've done that Dec 07 16:28:29 So then what's confusing you? Dec 07 16:29:25 my inflater crashes. i'm not sure if the issue is in my custom view or in the adapter Dec 07 16:29:27 'cuz returning your own view from onCreateViewHolder just leapt out at me as being the right place Dec 07 16:29:42 What's the specific error message it crashes with? Dec 07 16:30:12 ...use a pastebin Dec 07 16:31:10 http://pastebin.com/RvNPmzT3 Dec 07 16:32:50 THere's more to the error than just that one line Dec 07 16:33:06 At a guess tho it looks like your custom view is crashing Dec 07 16:33:11 yeah Dec 07 16:34:47 i should get familiar with all the method calls and data binding logic in Adapter. so far i've pretty much just imitated what the tutorials say Dec 07 16:35:42 Take a shot at watching the slidenerd video on recyclerviews Dec 07 16:36:04 Probbaly the docs you read were using weren't clear enough Dec 07 16:36:15 er docs you were reading Dec 07 16:36:28 alright, i'll check it out Dec 07 16:36:56 After the mess that goes on with some of the other list-like widgets I wasn't looking forward to RecyclerViews, but they're actually a bit easier Dec 07 16:37:51 all docs implemented existing elements like TextViews and such, i'm trying to learn how to use a custom view for dynamic drawables and other fancy stuff Dec 07 16:38:45 Just do a custom view (like say, a button with two lines of text on it) first Dec 07 16:39:17 Once you've gotten the hang of extending classes to make your own views, using them anywhere/everywhere isn't even a little hard Dec 07 16:40:41 what if i want to add my own view inside the view that's given to the inflater? Dec 07 16:41:24 Feel free Dec 07 16:41:53 If you can generate them as objects to just .add into the inflated view, go right ahead Dec 07 16:43:00 do i need to write them in the layout file that the inflater uses? Dec 07 16:43:02 There's no difference between view structures you created in pure java and view structures that came from an XML file once they're inflated Dec 07 16:43:41 ok but if i add my view in the xml the inflater crashes Dec 07 16:44:20 This might be a verbiage issue, but you don't add views to the XML Dec 07 16:44:26 That's not how that works Dec 07 16:44:47 how come Dec 07 16:44:54 i already have Dec 07 16:45:05 Given something like View view = inflater.inflate(R.layout.layout_pokereferencelistitem, parent, false); to add things you just walk that view hierarchy like any other Dec 07 16:45:43 i currently have two textviews inside a linearlayout and it inflates just fine Dec 07 16:46:03 i guess i don't understand you Dec 07 16:47:10 So you grabbed a handle to the LInearLayout with LinearLayout mLayout = (LinearLayout) view.findViewById(R.id.layout_somelayoutbox); right? Dec 07 16:48:23 ...because after that point it woudl just be mLayout.addView(someOtherView) Dec 07 16:48:40 no, my ViewHolder constructor is always called with the View object itself Dec 07 16:49:24 the inflated view that is Dec 07 16:50:40 So? Dec 07 16:50:56 If the view is already inflated you can make any changes it to it that you like Dec 07 16:51:28 You're not doing something insane like attempting to construct XML from string fragments and then inflate _that_ are you? Dec 07 16:51:37 i guess i could, if the inflater didn't crash Dec 07 16:51:56 If the inflater is crashing nad you suspect it's your custom view, then remove your custom view and try again Dec 07 16:52:14 ...but that sounds like your custom view is going to crash anything it's in. Dec 07 16:52:22 ...meaning it needs to be put out of it's misery Dec 07 16:52:44 probably Dec 07 16:52:57 ...or you need to read the _rest_ of the stack trace until you see where it's hinting strongly that you goofed. Dec 07 16:53:07 Small steps Dec 07 16:53:37 Go modify a button or make a textView that's always purple or something first Dec 07 16:54:58 my custom view overrides onDraw, i'm guessing i'm doing something wrong there Dec 07 16:55:18 Probably so, but the stack trace will save you a lot of itme looking Dec 07 17:00:28 i'm currently inspecting it, here's the full trace if you're interested http://pastebin.com/1mnETGSQ Dec 07 17:02:11 You might get more detail if you just make an empty linearlayout and shove one of those custom views into it so it's by itself Dec 07 17:03:01 That things are going to hell when it's trying to measure the thing to put it in the layout is a very good sign you've done something evil in your custom view Dec 07 17:05:23 Well, if you ever are, try to remember that causing damage to the property is the _least_ of your concerns. Dec 07 17:05:27 @!#$@# wrong channel Dec 07 17:11:54 hmm it still crashes Dec 07 17:12:27 Yeah but now the stack trace should indicate more closely what the problem with yoru customview is Dec 07 17:12:28 my custom view is now just a subclass of View with a constructor Dec 07 17:13:51 anyone want here to create a team and work on a challenge ? ? Dec 07 17:15:37 i get the same stack trace, except for the XML file line that's changed because of the view rearrangement Dec 07 17:28:31 hithere Dec 07 17:29:58 anyone using http://developer.samsung.com/galaxy/multiwindow# - I have added some lines (accordingly to S guide) and it was enough to activate it Dec 07 17:30:48 but following (hello multiwindow) code is more "complicated" - Dec 07 17:31:57 it demonstrates changing program size - is there anything else ("mandatory") to be done? Dec 07 17:33:31 How can i download android image for Vmware workstation? Dec 07 17:33:54 *where Dec 07 17:36:19 i don’t think there is one Dec 07 17:37:20 s73v3r, I see a website https://www.osboxes.org/android-x86/#android-x86-5_1-rc1-vmware Dec 07 17:37:44 cool Dec 07 17:38:15 Hope they are good Dec 07 17:39:50 http://pastebin.ca/3744855 Dec 07 17:40:37 Someone should probably kline that idiot Dec 07 17:41:46 its a Sun Sparc which is standard issue Sun Sparc Dec 07 17:41:54 40 Dec 07 17:46:00 can i add custom views in the xml just like built-in ones? Yeah Dec 07 17:46:28 Hello. I'm trying to publish an alpha test on the google store. When I try to install it from the generated link, it says my device is not compatible and won't let me install. But my device is compatible, it is the one I've been using for testing up until now, and I can install my app on it without problems from Android Studio. I've no idea what is the problem. Can anyone help me fix this? Dec 07 17:48:35 jorgebonafe: What changes did you recently make to the AndroidManifest.xml and/or gradle files? Dec 07 17:49:28 hold on... Dec 07 17:49:39 Also, AndroidStudio doesn't care whether an APK is "compatible" or not so it means nothing that you can get AS to install the APK you built Dec 07 17:49:53 just this line, I think: zipAlignEnabled true Dec 07 17:50:18 ...but there's lots of ways to make minor changes to the manifest that will flush compatibility with hundreds if not thousands of devices Dec 07 17:50:34 ...and occasionally Google screws up the scripts that analyze the packages. Dec 07 17:51:46 here's my manifest: http://pastebin.com/ZMLWSWz0 Dec 07 17:52:06 jorgebonafe: Start by deleting that alpha and seeing if you can still install the previous one Dec 07 17:52:07 I have no idea what I have to change here, honestly. Dec 07 17:52:26 I never installed on google store, I'm trying now Dec 07 17:52:35 up until now I only installed through AS Dec 07 17:52:51 So basically, you don't know if your package was ever actually compatible with the store Dec 07 17:52:55 yes Dec 07 17:53:24 ...and you know the manifest is an XML file, right? Dec 07 17:53:34 oh Dec 07 17:53:35 You pastebinned a gradle file Dec 07 17:53:40 sorry, I sent you the wrong file Dec 07 17:54:04 http://pastebin.com/CbeXeFeM Dec 07 17:54:47 The dev console buries people in details, but just on a whim... shove in there Dec 07 17:55:26 It goes before the sections but after the sections Dec 07 17:56:02 Ok, I'll give it a go Dec 07 17:56:08 Worst-case is that it'll do nothing Dec 07 17:56:40 It's possible their importer just broke again Dec 07 17:56:53 by the way, when I update the apk, it's not clear how long it take to update.. it says it could be hours, but then I update the website and it's already there... So I guess it's usually pretty fast? Dec 07 17:57:14 It'll take hours to be visible to the world at large Dec 07 17:57:18 it'll be in the dev console immediately Dec 07 17:57:24 No, if you upload an update and it's suddenly "already there" you are not seeing hte updated version, you're still seeing the old version Dec 07 17:57:26 ah, ok. Thanks Dec 07 17:57:43 I mean, it doesn't show without the link Dec 07 17:57:56 They've got a developer console app that'll just give you a notification when your updates go live Dec 07 17:58:47 jorgebonafe: I'm aware. It's still not going to be the version you just uploaded 30 seconds ago Dec 07 18:00:40 ah... ok, so without this app, there is no way to know of it's updated through the console? Dec 07 18:01:42 You should get a notification in the console, eventually, that it's now publicly available Dec 07 18:01:51 yay, i fixed my custom view, just don't know how Dec 07 18:02:09 It's just handy to have your phone tell you, raher than hope you notice some part of a web page changing Dec 07 18:04:00 I found "google play developer console" on the app store, I assume this is the one? Dec 07 18:04:08 Yeah Dec 07 18:04:14 thanks Dec 07 18:04:30 I'll install it to make sure I'm testing the latest version here Dec 07 18:05:32 o.O Dec 07 18:05:49 If you want to test the latest version of something you're building, just use AS to push a copy of it to your phone over USB Dec 07 18:06:00 No, I mean Dec 07 18:06:16 I want to know if I'm trying the latest version uploaded to the developer console Dec 07 18:06:25 Ah Dec 07 18:06:49 When you upload, pay attention to the summary about how many devices are supported by the APK you're uploading Dec 07 18:07:07 ok Dec 07 18:07:15 If you had ~8,000 before and you see it drop to like ~4,000 for no apparent reason, back up and find out WHY Dec 07 18:07:34 jorgebonafe, if you're counting on the store download it may be most of a day per upload Dec 07 18:07:40 ok, 74 were added from this line I added Dec 07 18:07:50 jorgebonafe, otherwise upload to the store and then use AS to upload to your device Dec 07 18:08:17 @dragonr the issue is that it works on AS and not on the store Dec 07 18:08:46 Unless you've added code to punish chinese app store users from stealing your APK and spamming you, there's going to be no differnce between installing from the Play Store and installing via AS Dec 07 18:09:44 I hope it shouldn't have any difference... which is why I'm so confused as to why it's not allowing me to install it no my device Dec 07 18:09:54 Have you gone through the guidelines for publishing on the store and set the stock stuff in your manifest? https://developer.android.com/google/play/filters.html and https://developer.android.com/studio/publish/preparing.html Dec 07 18:10:08 specifically look at the "add support for multiple screen configurations" section Dec 07 18:10:12 jorgebonafe: Well, if you've never published it before it might just _not actually be in there yet_ Dec 07 18:10:28 The play store determines if you can run an APK based on inspecting your manifest for what you say you can support Dec 07 18:10:38 Installing an apk direct onto your device via adb does not do this Dec 07 18:10:51 so it's 100% plausible to make an apk that you told google, by an error of omission likely, can't be run on your hw Dec 07 18:11:06 if you didn't add the screen options, for instance, it will block a huge number of devices Dec 07 18:11:28 I'll check out those options.. I didn't configure anything specific. Dec 07 18:11:36 and as others have said, when you upload to the store, the dev console will show you how many devices you support and how many you're filtering out b/c of your manifest attributes Dec 07 18:11:47 if you didn't add the stuff to prep for the store, that's probably why you're being filtered Dec 07 18:12:48 jorgebonafe: If the console is still saying you have updates pending, then it shouldn't be a suprise Dec 07 18:12:48 If there's no manifest then there's no compatibility. ;) Dec 07 18:12:49 ...and very rarely, they screw up. Dec 07 18:12:49 Not really Dec 07 18:13:12 so for instance one of my apps which doesn't support tablets has 10,000 devices supported. So you should expect to see a number in that range, or more, when you upload your fixed APK Dec 07 18:13:44 That XML line I gave him mainly just makes sure the thing is compatible with emulators what don't properly mention they have a touch screen and a few gumstick android computers Dec 07 18:13:56 Looks like generic apk w/ support for tablets should get you around 14,000 supported devices Dec 07 18:13:58 I've got no other uses-feature declarations in my packages at all generally Dec 07 18:14:15 Dagmar, *shrug* i've seen lots of filtering issues w/out them in the past Dec 07 18:14:33 jorgebonafe, also check your min sdk version; set that too high and you filter out anyone who doesn't have a nexus or pixel, more or less Dec 07 18:14:49 minsdkversion should be 19. Dec 07 18:14:53 hint hint Dec 07 18:15:04 ...unless you want to support ancient burner phones. Dec 07 18:15:23 I put 16 on my min Dec 07 18:16:01 I've got 7747 showing (6478 unsupported) with just min 19 Dec 07 18:16:30 by the way, I got 11063 supported Dec 07 18:16:40 People trying to use the thingt on a screen less than 1280x720, I'm just going to wait until they complain and disable them one at a time Dec 07 18:16:42 I don't know how much that is... Dec 07 18:17:15 ...except there's one guy who is going to mysteriously not get an update to my oldest package because @#$@ him Dec 07 18:17:19 still no sources for API 25 Dec 07 18:17:43 I'm marking his phone model as incompatible right now. He can just go and replace his xposed setup the little bitch. Dec 07 18:17:51 jorgebonafe, so that implies you're in the ballpark for supported devices (see the numbers I gave above as an example, and dagmar's). So if it's filtering your *specific* device you'll have to dig deeper to see what you missed. If it's just not visible at all in the store yet, wait. Dec 07 18:18:02 Dagmar, ha Dec 07 18:18:09 My guess is that it has no actual APK yet, therefore there can be no comaptibility Dec 07 18:18:35 dragorn: This is some dimwit that thought it would be a good idea to post libelous reviews and personally attacks on my play store entry Dec 07 18:18:53 Dagmar, never read the comments, is all I can say Dec 07 18:18:59 is there a way to see if my device is on the list on the console? Dec 07 18:19:05 that would save me some time Dec 07 18:19:05 dragorn: ...using all five of his bogus G+ accounts which I don't think he realizes let me see what type of phone and Android release his setup claims to be Dec 07 18:19:27 dragorn: When they say things like "Threatens to kill people all the time" and so on, I'm going to read them Dec 07 18:19:59 People who've pissed me off to the degree that I spent a few bucks and pulled their file don't get to engage in libel Dec 07 18:21:18 So now my oldest app is officially incompatible with Android 4.3 and the AT&T variant of the Galaxy S4. Dec 07 18:21:20 Boo hoo. Dec 07 18:22:09 dragorn: not reading the comments isn’t really a solution, as apps live and die by the reviews and download numbers Dec 07 18:22:56 w/out going too far down the rabbit hole, since there's not really anything you can do about it, and responding to a comment doesn't help the overall rating... I dont' see the point. Toxic comments are there to stay until google comes up w/ a new rating solution. Dec 07 18:23:33 The number of negative reviews I get because my app does *exactly what it says it does* (controls wifi based on tower location) imply that the userbase is split between people who can read, and drooling morons :P Dec 07 18:23:39 if the app is no longer compatible, they won’t get updates. So as the app itself is updated, their bogus reviews get pushed further and further down Dec 07 18:23:59 dragorn: sounds like this isn’t just bad reviews, it’s attacks and harassment Dec 07 18:24:09 yeah that's not a real solution though, I'm not going to expire JB+ devices just to push peoples reviews down the list Dec 07 18:24:56 are they harassing and attacking you? Dec 07 18:24:56 for me it doens't matter, I licensed the app for $oldjob while I was there and bought a truck. I've got a lot of sympathy for people who have zero recourse but to live w/ the crappost reviews that a lot of people make Dec 07 18:25:24 it seems the more technical an app is the omre likely people are going to refuse to read and 1-star it Dec 07 18:25:34 basically, you’re saying that your situation isn’t the same Dec 07 18:25:43 Heh. I'm not looking to push people down the list. I'm looking to take my app out of this little bitch's hands Dec 07 18:25:57 The update I pushed last night, by design, does not work. Dec 07 18:26:05 ...at least, not on that model phone. Dec 07 18:26:21 sometimes it feels good to be able to blacklist someone Dec 07 18:26:24 Now that it's out there and updated, I'm making sure he can't get the new update that'll go out in a few hours. Dec 07 18:26:49 pfn: beats the hell out of my first plan. Driving to Illinois and shitting in his mailbox Dec 07 18:26:57 s73v3r, you seem to be searching for a disagreement, so, yes, fine - my situation is different and there are no problems with the review process, I suppose. Dec 07 18:27:21 i didn’t say there weren’t problems. Dec 07 18:27:50 I’m saying that there is a difference between bad reviews, which you have run into, and outright harassment, which it sounds like Dagmar is experiencing Dec 07 18:32:40 Ok, so my device appears to be on the list of allowed devices. It's still not letting me install though, but I assume that is because of the time it takes to update. I hope. Dec 07 18:34:01 do you see anything in logcat when it tries to install? or is the button to install just not there? Dec 07 18:41:38 I import picture to PS and scale down from 300px to 120px and the size goes UP from 8kb to 20kb Dec 07 18:42:22 welcome to compression Dec 07 18:42:33 when your dictionnary takes more space than the actual data Dec 07 18:43:01 mentazoom: ignore the problems with your images for now Dec 07 18:43:26 s73v3r haha, yea man. I need to continue, caching was a bit too har for me now Dec 07 18:43:46 how is it hard? you literally hold the views in a hashmap Dec 07 18:43:56 s73v3r Just for future, do you think image library will help? Dec 07 18:44:01 no Dec 07 18:44:52 mentazoom: Is it using the same bit depth? Maybe it was an 8 bit image and photoshop saved it in 24 bit. Dec 07 18:44:55 s73v3r Something like this? https://stackoverflow.com/questions/23133912/android-viewpager-update-off-screen-but-cached-fragments-in-viewpager Dec 07 18:44:56 mentazoom, if you want to dig it later on, read https://medium.com/@duhroach/reducing-png-file-size-8473480d0476#.79m4wdptc and maybe even https://medium.com/@duhroach/understanding-compression-69c874de6ad7#.456vzdagx Dec 07 18:45:08 (about img compression) Dec 07 18:45:33 mentazoom: yes Dec 07 18:45:44 Bleke Not sure, i have never used these tools but I converted svg from Illustrator to .png then imported to PS Dec 07 18:45:50 Colt is really doing good tutorials Dec 07 18:45:53 adq Thanks will read that Dec 07 18:46:11 s/tutorials/articles/ Dec 07 18:46:17 compileSdkVersion / targetSdkVersion 25 - is it wise? Dec 07 18:46:42 mentazoom: before you go down that rabbit hole, though, go through the things on how to profile the app Dec 07 18:46:52 that’ll tell you what’s actually causing the stutter Dec 07 18:47:16 will try that now Dec 07 18:47:17 bolovanos, it's wise if you have tested at runtime on api 25 only Dec 07 18:47:54 s73v3r Actually true, I am not even sure how app will look in the end Dec 07 18:47:58 will save that link for now Dec 07 18:48:12 bolovanos, don't target an API where you haven't tested your app against it Dec 07 18:53:18 adq, ok - sounds wise - I have run my app on emulator with API 24 - there is image available for 25 also - but not sure if this can be considered reliable testing Dec 07 18:54:21 bolovanos, https://developer.android.com/guide/topics/manifest/uses-sdk-element.html Dec 07 18:59:14 bolovanos, I know this page, what r u referring to? Dec 07 18:59:35 \: Dec 07 19:00:23 I was rather asking whether it is save to compile against 25 Dec 07 19:00:32 Sure Dec 07 19:00:49 but anyway - I can stick to 24 because https://developer.android.com/guide/topics/ui/multi-window.html#overview will be functional there Dec 07 19:00:50 It's not like you're asking if you should compile with java 1.9 Dec 07 19:01:12 fine - thank you :) Dec 07 19:01:15 Just understand that the biggest thing that will impact is the _requirements_ imposed by API 25. Dec 07 19:01:41 Not a whole lot of difference between 24 & 25, but if you were going from say... API 19 to 25, THEN you'd have some permissions-related code you'd need to write Dec 07 19:02:21 Dagmar, nn I was already 24... Dec 07 19:02:23 With KK permissions were granted more or less automatically at install time, so if your app declared in the manifest that it needed to use high-accuracy location services, it would get those permissions when you installed it Dec 07 19:02:35 ...so long as you were only targeting API 19. Dec 07 19:02:47 thepoosh http://i.imgur.com/oWJjkzU.mp4 Dec 07 19:03:01 The moment you bump up to 25, someone on a newer phone will find that your app _doesn't work_ because it won't get that permission and you didn't put any code in to _request_ the permission Dec 07 19:03:41 raoul11: https://www.youtube.com/watch?v=IJNR2EpS0jw Dec 07 19:06:44 Dagmar, good point with those permission think - you probably mean this https://developer.android.com/training/permissions/requesting.html Dec 07 19:07:21 bolovanos: There's no "probably" to it Dec 07 19:07:54 bolovanos: I am somewhat amused by the fact that one of the "competitors" for one of my apps is still targeting API 19 because he can't figure out permissions Dec 07 19:09:08 Dagmar, from where you know that this is the Why for him? Dec 07 19:09:40 bolovanos: because if he knew he'd have updated his build Dec 07 19:10:18 must admit that I have just one permission in my app - that is INTERNET - I am using it for crash reporting Dec 07 19:12:00 but as I can clearly see as I have not solved this in my app - such user will never report an crash Dec 07 19:12:07 in my case - because I have not asked him Dec 07 19:13:00 but anyway if I ask him and he decides not to grant that permission - I will not receive a thing Dec 07 19:20:34 Hello! Dec 07 19:20:53 Any1 here with experience with Retrofit2? Or REST calls from Java in general? Dec 07 19:21:32 just ask your actual question, if somebody knows the answer they'll respond ;) Dec 07 19:25:32 Well.. I just dont understand how I can use Retrofit to create a rest call like this: https://en.wikipedia.org/w/api.php?action=opensearch&search= :::INPUT::: &limit=1&format=json , like.. I dont understand how the @GET field works. Dec 07 19:25:48 Would this work? @GET("action=opensearch&search="+ searchterm + "&limit=1&format=json") Dec 07 19:25:48 Or is that not how it is supposed to be used? Dec 07 19:26:32 no Dec 07 19:27:15 @GET("?action=opensearch&limit=1&format=json") Call search(@Query("search") String search); Dec 07 19:28:58 Ooh, so then it just appends the @query parameter with its value to the end of the @get adress? Dec 07 19:29:10 Thank you very much JakeWharton! Dec 07 19:29:25 essentially, yes Dec 07 19:57:47 ok If am right INTERNET is not listed among dangerous permissions (interesting) https://developer.android.com/guide/topics/security/permissions.html#perm-groups Dec 07 19:58:50 it’s not. everything gets that one Dec 07 19:59:08 i believe the user can go into settings and turn it off, though Dec 07 20:02:23 It's not listed as dangerous because it can't directly do anything but talk on the internet, which doesn't particularly endanger the device itself or the security of the user's data on said device Dec 07 20:03:34 I want to switch the position of this button and ViewPager in the android xml. I want to achieve that the viewpager takes up all space except the little space at the bottom that the button uses. xm with the button above the viewpager: https://gist.github.com/anonymous/b9f12644db5763e1e86897aa26e85381 Dec 07 20:05:38 Any idea how I can achieve that? Dec 07 20:10:22 Henrykvdb: Probably wrapping it in a linearlayout of it's own and setting layout_weight to 1 will do it Dec 07 20:10:45 Okay thanks! Dec 07 20:13:10 Dagmar: That fixed it indeed! Dec 07 20:30:19 hello, im trying to set android default style to my LinearLayout, i can do this with >style="@android:style/Widget.Holo.Button"< in xml but doing it programatically as: > LinearLayout ll = new LinearLayout(getApplicationContext(), null, android.R.style.Widget_Holo_Button); < does not give any effect. Can someone help? This should be easy Dec 07 20:44:30 what is best way to set click listener to several imageviews at once? Dec 07 20:49:27 retrolambda and a method reference? Dec 07 20:54:22 hello, im trying to set android default style to my LinearLayout, i can do this with >style="@android:style/Widget.Holo.Button"< in xml but doing it programatically as: > LinearLayout ll = new LinearLayout(getApplicationContext(), null, android.R.style.Widget_Holo_Button); < does not give any effect. Can someone help? This should be eas Dec 07 20:58:08 Hey again! So I am still having some troubles implementing Retrofit. It doesnt throw any exceptions, but it doesnt seem to return anything.. (null) I'd be really greatful if anyone could see if I've done any obvious errors here: https://github.com/smholsen/whatIsThisThing/blob/master/app/src/main/java/com/simon/whatisthisthing/RetrofitBuilder.java? Dec 07 20:58:08 This is the uri I am trying to use: https://en.wikipedia.org/w/api.php?&action=query&prop=extracts&exintro=&explaintext=&titles=pizza And the @GET is implemented here: https://github.com/smholsen/whatIsThisThing/blob/master/app/src/main/java/com/simon/whatisthisthing/WikiService.java Dec 07 20:59:30 JakeWharton: yous till here? =D Dec 07 21:12:37 hello, im trying to set android default style to my LinearLayout, i can do this with >style="@android:style/Widget.Holo.Button"< in xml but doing it programatically as: > LinearLayout ll = new LinearLayout(getApplicationContext(), null, android.R.style.Widget_Holo_Button); < does not give any effect. Can someone help? Dec 07 21:16:58 jonek: I'm a complete beginner, but I guess you should use LinearLayout ll = findViewById(R.style.Widget_Holo_Button); instead Dec 07 21:18:46 Is this the correct way to query this URI? : https://en.wikipedia.org/w/api.php?&action=query&prop=extracts&exintro=&explaintext=&titles=pizza&format=json Dec 07 21:18:46 http://pastebin.com/1UnMP4nz Dec 07 21:18:58 Using retrofit library ^ Dec 07 21:19:18 Jonek: Or.. hm. You are trying to create the layout. Ok, my mistake. Dec 07 21:20:23 jonek: I still think you should drop the android before R. Dec 07 21:27:57 Bleke: if I drop R, i have no access to Holo Button, its android default style, not mine Dec 07 21:28:29 Not the R. the "android". Dec 07 21:28:32 Bleke: if i drop "android"*** Dec 07 21:30:10 The LinearLayout constructor says that the third option should be an int. LinearLayout (Context context, AttributeSet attrs, int defStyleAttr) Dec 07 21:33:32 android.R.style.Widget_Holo_Button is an int Dec 07 21:35:00 ok Dec 07 21:43:06 Why does clearing a viewpagers adapter and calling notifyDataSetChanged() not work properly? Dec 07 21:43:32 hey everyone Dec 07 21:43:33 It looks like it freezes the viewpager with the current fragment on screen Dec 07 21:44:20 i can not run emulator64-x86 on ubuntu because of this error : This application failed to start because it could not find or load the Qt platform plugin "xcb". Dec 07 21:44:55 orbyt_: You’d have to profile to be sure, but I’m guessing it’s cause you’ve cleared it, and now it’s trying to recreate stuff Dec 07 21:45:15 recreate what? Dec 07 21:47:15 Hmm I found this: http://stackoverflow.com/a/23914064/3917064 Dec 07 21:47:30 implementing that override seems to of worked Dec 07 21:47:58 i can not run emulator64-x86 on ubuntu because of this error : This application failed to start because it could not find or load the Qt platform plugin "xcb". Dec 07 22:31:54 a savedInstanceState bundle will always be there if a fragment is resuming, right? Even if nothing was passed into it? Dec 07 22:48:21 konk3r: It might be null. Always check for that first. Dec 07 22:54:13 Dagmar: If it’s null that means it’s not restoring, right? Dec 07 22:54:54 When we’re popping the fragment backstack it’s sending a null instant state instead of returning our saved state, I’m trying to figure out if we’re setting up the transaction wrong Dec 07 22:56:02 In theory yeah Dec 07 22:56:19 You might just be assembling the bundle wrong Dec 07 22:57:25 That’s what I was thinking, but we’re just adding in a key value pair into the bundle provided then calling `super.onSaveInstanceState(outState);` Dec 07 22:59:53 That should work. Dec 07 23:02:15 You're not trying to save anything *weird* like a Context or something are you? Dec 07 23:06:38 Dagmar: Ha nope. I’m going over a junior dev’s code here, we need to store a LinearLayoutManager’s saved instance state along with the base dataset (arraylist of parcelables), but he ran into the issue trying to store a single integer as a test Dec 07 23:07:37 That's usually what happens to me. The simple test will fail for no apparent reason. rather infuriating Dec 07 23:08:09 Throw some more log statements in there for each of the overrides to be sure it's doing what ya'll think it's doing in the lifecycle Dec 07 23:08:11 if you pop, I don’t think it’ll restore Dec 07 23:08:11 I’m sure no one else has ever said this, but god do fragments suck Dec 07 23:08:17 try remove instead of pop Dec 07 23:08:24 The documentation does _not_ match what actually happens in a number of different releases Dec 07 23:08:27 s73v3r: thanks Dec 07 23:09:53 can I just copy the DiffUtil source into my project? Dec 07 23:10:06 Double checked, we’re removing instead of popping. I’ll try popping Dec 07 23:10:49 so what’s the bigger context, navigation wise here? Dec 07 23:11:25 you add fragments to the stack, going deeper and deeper in the nav tree. then you go back, and then you go forward again? Dec 07 23:12:06 We’re returning from an item detail view back to the main list view and we want to restore the list’s position Dec 07 23:12:21 so why are you popping? Dec 07 23:12:23 or removing? Dec 07 23:12:29 shouldn’t you be replacing or pushing? Dec 07 23:12:48 So in my head the flow should just be add detailFragment when viewing, then popping the backstack to return Dec 07 23:13:07 the detail one should be able to be popped, yes Dec 07 23:13:16 but how do you put it on the stack? Dec 07 23:13:35 Let me grab that Dec 07 23:13:45 i’m assuming the list fragment is the one who’s instance bundle you’re trying to restore? Dec 07 23:13:54 Right Dec 07 23:15:55 https://gist.github.com/konk3r/e5102215694af95d94201a9fbba6daed Dec 07 23:16:29 Wait, I’m guessing we should call add instead of replace Dec 07 23:16:30 try add instead of replace? Dec 07 23:17:01 try this: https://inthecheesefactory.com/blog/fragment-state-saving-best-practices/en Dec 07 23:18:10 also, this might be sily, but you’re sure onSaveInstanceState is being called when switching fragments? Dec 07 23:18:38 That's why I was suggesting a liberal sprinkling of log statement Dec 07 23:18:41 I’ll double check, nothing is silly to check when it comes to fragment lifecycles Dec 07 23:19:01 The more time I spend on this project the more I remember why I haven’t used fragments in years Dec 07 23:19:40 They actually work pretty well, once you get over the lifecycle funnery Dec 07 23:19:50 that’s a pretty big thing to get over, though Dec 07 23:19:59 “Once you get over the part that sucks everything is great” ;) Dec 07 23:21:11 Well, the biggest source of suck I found was where it deviates from the damn docs Dec 07 23:22:07 A friend of mine has a set of classes that do nothing but call extend their named class and call log for *all* the overrides, and I need to get another set of those from him Dec 07 23:22:12 hah the docs on Build.VERSION_CODES say "N MR1: Nougat++" Dec 07 23:22:43 They were what I eventually escalated to using so I could see exactly when the hell everything was being called Dec 07 23:22:53 It turns out several things don't get called in the order the docs claim Dec 07 23:26:08 Hmm… I wonder if the issue is that we’re not calling addToBackstack on the initial list fragment when it’s being added? Dec 07 23:26:31 I wouldn’t think that’s how it would work, but there are a lot of things with fragments that work slightly differently than expected Dec 07 23:26:40 Anyone alive? I need some help Dec 07 23:26:52 Sure, what’s up? Dec 07 23:27:08 azure232: just ask the question. if someone can answer, they will Dec 07 23:27:37 konk3r: it’s possible. What happens when you go back, in terms of things called on the list fragment? Dec 07 23:27:38 I'm trying to consume an API using retrofit 2, and I've set up the model already Dec 07 23:28:02 I'm getting an error because part of the model is being returned as either an array or a single object Dec 07 23:28:30 take whoever designed that endpoint out back and shoot them Dec 07 23:28:41 I know right.. Dec 07 23:28:51 It's a public API, I'm doing this for a final project Dec 07 23:28:53 you’re probably going to need two different models Dec 07 23:29:01 or a custom deserializer Dec 07 23:29:13 Vodka. Dec 07 23:29:14 http://www.jsonschema2pojo.org/ Dec 07 23:29:17 Vodka will help. Dec 07 23:29:18 probably the custom deserializer Dec 07 23:29:23 this usually makes those shitty apis painless Dec 07 23:29:25 Haha. Dec 07 23:29:33 which API is it? Dec 07 23:29:35 That's what I used to get to where I am Dec 07 23:29:39 unless it has a dual personality? Dec 07 23:29:42 PetFinder Dec 07 23:29:46 It seems to Dec 07 23:30:08 I don't know why they didn't just make it return a list regardless of the number of objects Dec 07 23:30:08 wait it really returns different json formats at different times? Dec 07 23:30:13 wow Dec 07 23:30:19 which endpoint? Dec 07 23:30:30 Yeah so if it's a single object it just returns the key value pair instead of a list Dec 07 23:30:32 yeah we need to the coordinates so we can nuke it from orbit Dec 07 23:30:42 pet.find Dec 07 23:30:44 LOL Dec 07 23:31:21 Currently I'm calling this: http://api.petfinder.com/pet.find?location=95117&format=json&key=8ed5a6a2883bd0e47fe636efe4b14821 Dec 07 23:31:38 it’s an XML api? Dec 07 23:31:53 You can specify format Dec 07 23:32:16 you can just do 2 models and catch the exception on the first and try the second Dec 07 23:32:19 I'm consuming it as json in retrofit with a gson converter Dec 07 23:32:31 dragorn: not a good idea Dec 07 23:32:48 exceptions should not be used for flow control like that Dec 07 23:33:04 Fine. Catch the exception, set a variable, and try the second model. Dec 07 23:33:12 that’s literally the same thing Dec 07 23:33:16 Yep. Dec 07 23:33:16 lol xD Dec 07 23:33:37 the thing that is still using exceptions for flow control, which is bad Dec 07 23:33:44 It's a crapton better than writing a custom deserializer. Dec 07 23:33:49 How difficult is writing a custom deserializer?? I have absolutely no experience doing something like that Dec 07 23:33:53 no, it isn't Dec 07 23:33:53 You could always just test the type returned Dec 07 23:34:44 This is a sub object of the main response Dec 07 23:35:06 It's throwing the exception on the callback because it can't parse the breed part Dec 07 23:35:10 can you paste both kinds of example responses? Dec 07 23:35:15 Some are a single breed, some are a mix Dec 07 23:35:36 Hey Dec 07 23:35:37 Yeah let me find some examples Dec 07 23:35:39 guys, i know i'm not supposed to, but for several conditions, i'm using JDBC on this app, i'm trying to make a Spinner that could load a String from my database, but can't figure out how to add items at the Spinner list after setting my resultSet.getString("attribute from db"); on my query method Dec 07 23:35:42 So you're saying the JSON is different? Dec 07 23:35:47 could anyone help me figure out why? Dec 07 23:35:53 s73v3r: I’m not sure, I also just realized that we’ve been using `public void onViewStateRestored(Bundle savedInstanceState)` Dec 07 23:35:56 Anyone worked with the camera api? Dec 07 23:36:13 android-dev162: just ask your question. if someone can help, they will Dec 07 23:36:37 Instead of onActivityCreated(). My coworker has been working on this on a side branch and I’ve been going over his logs but he already left and hasn’t pushed, I’m going to pull and check out those suggestions tomorrow Dec 07 23:37:05 hexagonSun_: you should be able to just add the results to your spinner adapter Dec 07 23:37:12 I know this is a Xamarin question on SO but it really relates to Android camera. I can easily translate Java to C# but I'm wondering on how to do this? http://stackoverflow.com/questions/41025563/how-to-implement-visual-indicator-when-camera-is-focused Dec 07 23:37:20 hexagonSun_: also, shame on you Dec 07 23:37:31 I also tagged a bunch of related SO questions that have been asked but no one gave an official answer to Dec 07 23:37:44 i'll take the shame Dec 07 23:37:49 u_u Dec 07 23:37:54 tried my best Dec 07 23:37:57 Jesus. Dec 07 23:38:11 It looks like Sprint just crossed that final damn line Dec 07 23:38:12 no, trying your best would be flat out refusing to do something that reckless Dec 07 23:38:39 "breeds":{"breed":{"$t":"Chihuahua"}} is one of the single ones, "breeds":{"breed":[{"$t":"Shih Tzu"},{"$t":"Lhasa Apso"}]} is a multiple case Dec 07 23:38:41 My brief pass back to stock made them apparently decide it was a good idea to !@#$@ erase my adopted SDcard Dec 07 23:38:57 I'm going to Project Fi damnit Dec 07 23:39:01 These are objects of a parent "Pet" object Dec 07 23:39:27 azure232: Welcome to "Why I Hate People Who Use JSON" Dec 07 23:39:30 i cannot afford to flat out refuse s73v3r Dec 07 23:39:33 Haha. Dec 07 23:39:51 It would be fine if they had just returned a list Dec 07 23:40:02 I'm thinking maybe I need to find a different API :\ Dec 07 23:40:06 azure232: It might be worth poking the people running the site and ask them to fix their damn code so that it generates an array all the time instead of "optimizing" Dec 07 23:40:23 azure232: It shoudln't be possible for that change to break anyone else's code downstream Dec 07 23:40:38 That's true Dec 07 23:40:39 people are too conservative in that regard, though Dec 07 23:40:53 i doubt they’ll fix it. They might give you some sample code to deal with it, though Dec 07 23:40:56 Yeah I doubt they'd respond in time anyway Dec 07 23:41:06 They're probably doing it all in PHP with some cockeyed framework and had no idea it was generating a single item sometimes and a list other times Dec 07 23:42:08 How do I have it serialize when it gets to the breed objects? Dec 07 23:42:36 Everything I've seen on stack overflow seems to be for Retrofit 1 Dec 07 23:42:48 azure232: same thing Dec 07 23:42:52 I'm sort of a novice using this stuff Dec 07 23:43:12 and you’re actually looking for Gson, not retrofit Dec 07 23:43:17 retrofit uses Gson Dec 07 23:43:34 Can't you use a fancy word when you get to that section and test to see if you're being handed an array or a singular item? Dec 07 23:43:49 but… if you have the ability, use a different API Dec 07 23:44:02 retrofit uses what you tell it Dec 07 23:44:05 I'd like to just have it convert the single object to a list Dec 07 23:44:35 Heck tell it to use a list and see what it does when it gets just one object Dec 07 23:45:01 it’d be ugly, but you could write a custom Response thingy that would automatically add the [ ] around the breeds object if they’re not there Dec 07 23:46:04 Okay thanks Dec 07 23:46:11 I'm going to dig around a bit Dec 07 23:46:21 I appreciate the help Dec 07 23:51:20 https://developer.android.com/reference/android/preference/Preference.OnPreferenceChangeListener.html#onPreferenceChange(android.preference.Preference, java.lang.Object) Dec 07 23:51:21 lies Dec 07 23:51:31 the setting is saved to shared preferences before it's called Dec 07 23:51:33 liars... Dec 07 23:52:04 i think you mistook this channel for b.android.com Dec 07 23:59:28 pfn: You could be seeing the pain of not using commit() Dec 07 23:59:53 I know they just started pushing everyone to use an apparently async method, which _should_ work but still... Dec 08 00:04:20 seems like it's more likely to be caused by my need to go async in onPreferenceChange Dec 08 00:06:26 why can't i acces the list fo fill my Spinner on line 127? http://pastebin.com/qywQkqJD Dec 08 00:07:58 hey everyone Dec 08 00:08:20 hexagonSun_: I don’t see any list member variable in your activity Dec 08 00:08:22 anyone know how to run emulator64-x86 on ubuntu 14.04 ? Dec 08 00:09:25 String elemento_lista_curso; and String elemento_lista_alumno; are not? Dec 08 00:09:43 line 127 just says “list" Dec 08 00:09:48 iresf: Largely you just need the kvm/qemu packages installed and you tell Android Studio to start an emulator Dec 08 00:10:46 i’m also not immediately seeing where that async task is used Dec 08 00:10:56 i'm calling the "lisCurso" and "listAlumno" forgot to paste that part Dec 08 00:11:18 lines 75 and 76? Dec 08 00:11:26 Dagmar : yes i have done those but i want to run emolator64-x86 on ubuntu 14.04 not emulator Dec 08 00:11:46 but it does not work and has error Dec 08 00:12:02 hexagonSun_: I’m still not seeing where “list” comes in Dec 08 00:12:33 iresf: Then that's something you should be asking the Ubuntu people about Dec 08 00:12:51 that "list" is misspelled, it was meant to be "listCurso" or "listaAlumno" but still can't access them Dec 08 00:13:06 eh the emu should Just Work on ubuntu Dec 08 00:13:18 although I haven't gotten it to just work right myself Dec 08 00:13:33 don't remember if I had to install qemu Dec 08 00:13:46 and still can't tell if kvm is working or not... Dec 08 00:13:54 hexagonSun_: ok. I don’t see listCurso or listaAlumno among your member variables Dec 08 00:14:00 how much emulator64-x86 is faster than emulator ? Dec 08 00:14:20 hexagonSun_: I do see listCurso as a local variable to the onCreate method Dec 08 00:14:31 They'll both be slower than KVM is. Hint hint. Dec 08 00:14:43 missingno : kvm works correct because i can run emulator Dec 08 00:15:43 s73v3r: it's on line 62 Dec 08 00:15:45 ? o: Dec 08 00:16:37 hexagonSun_: Yes, i see it. It’s a local variable, not a member variable Dec 08 00:16:42 nothing outside of that method can see it Dec 08 00:17:25 s73v3r how do i make it a member variable? Dec 08 00:18:04 i guess java calls them fields Dec 08 00:18:17 they need to be declared in class scope, not in method scope Dec 08 00:21:33 This application failed to start because it could not find or load the Qt platform plugin "xcb". ? Dec 08 00:21:42 So install that Dec 08 00:24:26 so has anyone else experienced strange StackOverflowErrors when using ChangeTransform on your layout on android 5.x Dec 08 00:24:32 ok i get it s73v3r, now i could acces from within, but now my app crashes x) Dec 08 00:24:47 so look at your stack trace and fix that Dec 08 00:24:52 like Dec 08 00:24:52 android.view.GLES20Canvas.setupFinalizer line 89 Dec 08 00:24:52 java.lang.StackOverflowError: stack size 8MB Dec 08 00:25:10 not a single line of app code in all 8mb of stacktrace Dec 08 00:25:18 i am doing that :p Dec 08 00:25:45 do it faster Dec 08 00:27:15 hahah Dec 08 00:27:22 it worked :B Dec 08 00:27:43 to late Dec 08 00:27:45 too Dec 08 00:33:18 i hate that there's not enough documentation for jdbc and android (but i get why).. in the end if i have had the damn php api knowledge i could've done it in less time with retrofit Dec 08 00:33:24 that¿s the part i got stuck at :/ Dec 08 00:33:33 just go do it anyway Dec 08 00:33:47 what? Dec 08 00:33:58 who cares what they said. do the right thing anyway Dec 08 00:34:11 don’t tell them you’re doing it Dec 08 00:34:57 i have a deadline, and i'm not sure i'm gonna be capable of learning how to make a php api and then how to make the retrofit thing in my app Dec 08 00:35:08 i'm running out of time Dec 08 00:35:25 blow off the deadline Dec 08 00:35:54 i can't :'( Dec 08 00:35:58 things happened, bugs were encountered; ther’s not much they can do Dec 08 00:38:08 i can't man u_u i'm between the sword and the wall Dec 08 00:38:44 what’re they gonna do? Dec 08 00:41:33 i don't want to get too personal Dec 08 00:41:56 if you’re worried that they’ll fire you, they won't Dec 08 00:42:05 but the whole reason i'm in here(in this country) is because of me making this project work on time u_u Dec 08 00:43:25 hexagonSun_: Italy? Dec 08 00:43:41 Bleke: canada Dec 08 00:43:49 ok Dec 08 00:44:49 Are you the only person on the project? Dec 08 00:45:02 konk3r yes Dec 08 00:45:18 hexagonSun_: Maybe it's best to be honest with them and say that you probably won't be able to make it in time. Being all stressed out won't make it better for anyone. Dec 08 00:45:20 And they’re expecting you to do the full backend and app on a tight deadline? That’s harsh Dec 08 00:45:22 i feel i'm gonna end up giving out all information about me, but that's ok, i don't care no more x) Dec 08 00:45:56 it is konk3r Dec 08 00:46:04 the whole semester has been Dec 08 00:46:04 Honestly, there’s nothing you can really do about it, EVERY project is going to hit snags Dec 08 00:46:12 i thought i could take it.. Dec 08 00:46:17 so the deadline will slip. big deal. Dec 08 00:47:32 I guess his work permit may expire too Dec 08 00:48:02 How much extra time do you think it would take? A week? A month? Dec 08 00:48:22 a month or.. maybe a little more Dec 08 00:49:39 tell them that it’ll take two months, and you can’t finish it on time. Then, while you’re working, find a different job. These guys are terrible Dec 08 00:49:52 i appreciate you asking guys, i'm gonna make this short, here's the truth, i'm going back to my country and i HAVE GOT to come back with this app WORKING on this business database, the deadline is setted from a very while ago, i get it, it's my fault, it always was you know, i thought i could take like i have taken anything so far.. Dec 08 00:50:58 Yeah, if they’re really that strict that’s going to make your life hell. Sorry man, good luck Dec 08 00:51:03 i'm working on this university because i'm also studying in it, i have passed all courses, not a single problem with them, but my 'scholarship' is being paid by this particular business... Dec 08 00:51:24 anyway, i'm gonna survive :B it just may be really awful Dec 08 00:51:25 have you gone to your advisor? Dec 08 00:51:28 specially for my app Dec 08 00:51:36 If it’s any consolation, I guarantee that every single person here has underestimated a deadline by at least a month on a job Dec 08 00:52:13 we have. We also find out that it’s not a huge deal. the world keeps on turning Dec 08 00:52:27 You’d be surprised how many companies are understanding Dec 08 00:52:42 yeah, maybe i'm making a big deal out of this.. life ain't supposed to be so serious right :p Dec 08 00:52:44 If things don’t work out, don’t feel guilty about it Dec 08 00:52:54 Especially since you seem to be a junior developer Dec 08 00:53:10 the company basically hired you as an intern, right? Dec 08 00:53:18 they know what they were getting in for? Dec 08 00:53:32 yes, all of the time Dec 08 00:53:41 still i always said i could do it Dec 08 00:53:50 because i thought i could, every time so far i had Dec 08 00:54:07 there are two kinds of companies that do that: Companies run by people who understand students, and want to help provide experience, give back, yadda yadda Dec 08 00:54:18 and companies run by assholes looking for cheap labor Dec 08 00:54:27 i know i can still make it work with jdbc and that it's going to be awful, believe me, i'm the most frustated about this, it's my app you know, i feel like i'm corrupting it Dec 08 00:54:41 A few months ago I estimated a new feature as 2 months and it took 4, I’ve been leading teams for 5 years. I told them up until the 2nd month that it would be done on time because it looked like it would Dec 08 00:55:28 but it's my easy way out :'/ Dec 08 00:55:41 im genuinely sad about this Dec 08 00:55:47 srry Dec 08 00:55:54 like we said, go to your academic advisor Dec 08 00:56:09 The fact is that you don’t know what you don’t know. You’re creating something new and you can never be sure. The best advice I’ve ever been given on it is for future estimates look at the longest you can picture the work taking and double it, it’s never as easy as it sounds. Dec 08 00:57:13 i guess this is how i'll learn for the future Dec 08 00:57:17 i will s73v3r, thanks Dec 08 01:12:36 I have an idea that I should load maybe a hundred items into my recycler view. When you have scrolled to item 80 items 101 to 200 should be loaded. After 120 items 1 to 100 are removed. At item 180 items 201 - 300 are loaded and so on. From an SQLite db. I'm not sure if that's a good way to go about it. Maybe it's better to continuosly read from the DB? Dec 08 01:13:13 Bleke idk why it wouldnt work Dec 08 01:13:29 prolly be better to do it periodically to cut down on load time as sql can be quite big Dec 08 01:13:52 plus, why load material they are not accessing? Dec 08 01:14:06 I'm sure it will work, but I thought I'd ceck and see if it's a noob solution. :) Dec 08 01:14:17 sounds not so noob to me Dec 08 01:14:19 ^^ Dec 08 01:14:38 don’t remove the old items Dec 08 01:14:45 Preloading so that it won't stutter at the change Dec 08 01:15:04 s73v3r: The list has 114000 items Dec 08 01:17:24 Another thing I'm thinking about is if I should do this in the adapter or in the activity class Dec 08 01:17:54 it’s a lazy loading adapter Dec 08 01:18:37 you should load the stuff separate. the activity should probably kick it off Dec 08 01:19:16 Thanks for giving me a name for it! :) Dec 08 01:24:11 s73v3r: The lazy adapter, you mean recyclerview adapter, don't you? Not the loading of items from the DB thingie? Dec 08 01:24:26 yeah, recyclerview adapter Dec 08 01:47:47 Hey, I'm sending a large file via retrofit. But I have an Uri, not an absolute path to the file. I understood Uris are the new way to handle any content. But how do I use it with Retrofit Multipart? The RequestBody.create() method only accepts a byte array or File object. Converting the contents to a byte array will throw outofmemory exception. Dec 08 01:51:26 You can write your own RequestBody that takes a Uri, opens a stream, and copies the bytes Dec 08 02:05:51 Joozey: Maybe this would work? Uri uri = new Uri("somethingsomething"); File file = new file(uri.getPath()); RequestBody.create(file); Dec 08 02:08:05 For locally stored things it does, but not if you select a file from google drive or dropbox, or if the file is just a blob of data received through an intent, if I'm not mistaken. Dec 08 02:09:13 This is fairly new for me, so if that is incorrect please let me know Dec 08 02:10:08 I'll leave that judgment to the more experienced patrons of this channel. :) Dec 08 02:11:09 JakeWharton, thanks, I'm attempting to write my own RequestBody now Dec 08 02:21:18 Not at a computer so I can't help ya Dec 08 02:28:30 Hello, my webview is displaying a webpage differently then for example on firefox. also some basic 3d party webbrowsers are viewing them differently. is there anything i missed? Dec 08 02:49:41 what is difference between emulator64_x86 and qemu-system-x86_64 ? Dec 08 02:52:02 http://serverfault.com/questions/767212/difference-between-qemu-kvm-qemu-system-x86-64-qemu-x86-64 Dec 08 02:59:23 Converting a project to Rx is meditational **** ENDING LOGGING AT Thu Dec 08 03:00:01 2016