**** BEGIN LOGGING AT Wed Mar 02 02:59:59 2016 Mar 02 03:08:00 g00s: what's that do? Mar 02 03:09:28 androidplot is just a plotting lib Mar 02 03:11:19 so no GUI stuff? charts or what not? Mar 02 03:13:51 its like mpandroidchart, etc Mar 02 03:14:06 but it has time series. but i just tried the demo and looks like shit Mar 02 03:14:17 yeah Mar 02 03:14:19 i'll probably just go with mpandroidchart and resample Mar 02 03:15:07 yup Mar 02 03:20:50 <_xor> Hey guys, quick question. What are the top 2-3 most commonly used browsers on Android? Mar 02 03:21:03 <_xor> The stock browser (is there a name for it?), Chrome, and...? Mar 02 03:28:21 sadpone, you can put anything on top of the lock screen if you want to represent your own Mar 02 03:28:47 sadpone, as long as the lock screen is not PIN or password, or any other secure screen, you are free to dismiss it at will from an app Mar 02 03:28:58 sadpone, g00s is wrong on these points Mar 02 03:39:07 _xor: stock android browser, chrome, firefox Mar 02 03:39:31 there's also opera, but I'd forget aobut it ;) Mar 02 03:40:19 yeah not a proper password or pin, just something random like a series of multiple choice questions or again, something like a gps or time condition that has to be met so you can get to the actual lock screen Mar 02 03:44:13 chrome is the stock android browser these days... Mar 02 03:44:17 I guess maybe not for some oems Mar 02 03:44:38 sadpone, yeah, that has always been supported on android without needing root Mar 02 03:45:09 oh awsome Mar 02 03:49:59 Hi.. how do I change the FONT of text inside a PagerTabStrip ? Mar 02 03:50:37 how can I call the static object.Equals from an override of Equals? Mar 02 04:08:06 do you use genymotion on linux? Mar 02 04:08:25 I have no idea what to do with a .bin file Mar 02 04:24:10 <_xor> gordon_: Cool, thanks :) Mar 02 04:24:27 <_xor> gordon_: I thought I read somewhere that Chrome is now (or becoming) the default? Mar 02 04:24:49 it is default on new phones Mar 02 04:24:55 at least most of them Mar 02 04:25:01 can't hug every app Mar 02 04:25:26 RustyShackleford: if you dont know what to do with .bin file.. you shouldnt be using linux :P Mar 02 04:25:39 chomod +x genymotion.bin Mar 02 04:25:45 *chmod +x Mar 02 04:25:49 ./genymotion.bin Mar 02 04:29:24 gordon_: I got it figured out Mar 02 04:29:30 its been a while, okay? :p Mar 02 04:29:41 not an excuse ;) Mar 02 04:30:04 usually they dont use a file extension for executables Mar 02 04:41:54 anyone with a bit of rxjava experience mind answering a few questions? Mar 02 04:42:23 ask to ask is the best Mar 02 04:42:52 indeed Mar 02 04:43:42 I'm using retrofit and rxjava and trying to figure out how to get the two to work together nicely Mar 02 04:43:50 kommunicate: which retrofit Mar 02 04:43:53 2 Mar 02 04:44:15 Man, I still can't figure out this recyclerview issue Mar 02 04:44:21 maybe it's a bug.. Mar 02 04:44:42 i have an api call that returns a List and another api call that returns a List Mar 02 04:45:02 then return a list of Object and cast it. Mar 02 04:45:13 no Mar 02 04:45:15 ;) Mar 02 04:45:37 or wrap it all in a Response object? Mar 02 04:46:04 the SecondType has an ID in it that I want to fish out. I want to return a List for elements in List using that ID Mar 02 04:46:05 (you'll prolly need to make a deserializer / wrapping object to get the outer JSON layer off anyway) Mar 02 04:46:23 you set up deserializer for retrofit, so it will do it for you Mar 02 04:46:29 i've done that Mar 02 04:46:39 good Mar 02 04:46:43 so what is the question ? Mar 02 04:46:45 but... i'm struggling to get the types to work properly Mar 02 04:47:00 because.. the type returned by both of these calls isn't a List, it's an Observable Mar 02 04:47:15 so how do I iterate through the elements of that inner list? Mar 02 04:47:25 no Mar 02 04:47:25 (I'm using retrolamdba too) Mar 02 04:49:12 usersDao().getUsers().observeOn(main).subscribeOn(io).subscribe( u -> users;, e -> log(e.getMessage);); Mar 02 04:49:25 will give you List as users Mar 02 04:50:01 where usersDao.getUsers() will return your observable Mar 02 04:50:01 right, but you can chain calls too Mar 02 04:50:36 you can, then ? Mar 02 04:50:44 right, so you have an Observable> from that Mar 02 04:51:18 since that is also an observable, you should be able to transform that using .flatMap( x -> something ) into another observable Mar 02 04:51:40 flatMap will return type not observable Mar 02 04:51:42 map will Mar 02 04:52:16 If you map this, you'll get Observable>>. So you need to flatten it. flatMap will collapse Observable I think you're right, but either way, the problem I'm having is with the inside of the lamdba Mar 02 04:52:38 did I make a mistake ? ;) Mar 02 04:53:45 referencing the object inside the lamdba gives me a List, but I want to iterate over that List's contents, not access the List itself Mar 02 04:53:51 how do I do that? Mar 02 04:54:12 then you need to iterate I guess Mar 02 04:56:09 right, but my issue is really that I have Observable> and Observable>, but I'm not sure how I can reference the two together Mar 02 04:56:21 sorry, this is not a good explaination :/ Mar 02 04:59:34 you should be able to change type with flatMap I think Mar 02 04:59:36 let me check Mar 02 05:00:19 i'm pretty sure you can do that, but i'm not sure how to access the two inner types simultaneously Mar 02 05:00:40 yes, you can do that Mar 02 05:01:05 ok I get it now Mar 02 05:01:22 you have two obserables and want you combine them and return result ? Mar 02 05:01:52 exactly Mar 02 05:02:03 so you need to use zip function Mar 02 05:02:26 ok, going to take a quick look Mar 02 05:02:28 Observable.zip(obs1, obs2, transformFunction) Mar 02 05:12:05 does that transformFunction return an observable too? Mar 02 05:12:08 i'm guessing it must do Mar 02 05:15:13 yes Mar 02 05:15:36 my recyclerview draws identical data again on rotation Mar 02 05:15:37 as far as I remember ;) Mar 02 05:15:54 hah I dunno, any ideas? Mar 02 05:15:58 RustyShackleford: you probably have if(something != null) somewhere Mar 02 05:16:08 and dont reset values if it's not null Mar 02 05:16:41 uh maybe I should screenshot it Mar 02 05:17:04 it's not that data is not updated. it prints another copy on top of the previous Mar 02 05:17:08 and looks messed up Mar 02 05:17:52 that happens, sometimes, if you put another copy of the same fragment in the activity Mar 02 05:17:59 you'll get a weird ghosting kinda look Mar 02 05:18:45 https://imgur.com/bINRumX Mar 02 05:22:28 bankai_: yeah that sounds like the issue. how would I fix it? Mar 02 05:22:44 don't add the same fragment twice :P Mar 02 05:23:44 lol thats cool RustyShackleford Mar 02 05:26:51 I guess I need to keep a reference to the fragments? Mar 02 05:26:53 thanks gordon_: almost got this Mar 02 05:27:04 np Mar 02 05:27:17 only create a new one if it's null Mar 02 05:28:10 RustyShackleford: ah, like bankai_ said you might be adding two fragments on the same time Mar 02 05:29:59 got to say RustyShackleford, I'm a bit afraid of my next step since now I want to hook up the Observables to a RecyclerView Mar 02 05:31:13 I've done that Mar 02 05:31:18 kommunicate: I am doing exactly this Mar 02 05:31:20 wasnt scary ;) Mar 02 05:31:23 and looked what happened Mar 02 05:31:38 and then network call happens twice too hah Mar 02 05:31:49 kommunicate: rxjava works nice with mvp Mar 02 05:32:04 gordon_: i'm using android-boilerplate as a template Mar 02 05:32:05 mvp? Mar 02 05:32:11 do you have an mvp example you like? Mar 02 05:32:40 RustyShackleford: yes, my own one ;P Mar 02 05:33:08 wonder if it's updated Mar 02 05:33:33 gordon_: is it somewhere public? Mar 02 05:33:40 looking Mar 02 05:33:49 just like mvc, seems like everyone has their own take on MVP Mar 02 05:34:28 it is, but this doesnt do anything exciting Mar 02 05:34:39 just showing list of elements I guess Mar 02 05:34:45 does it event work... Mar 02 05:34:47 *even Mar 02 05:35:59 wait a sec I will check if it works :D Mar 02 05:36:10 if it works, we can laugh at my code together Mar 02 05:38:50 it works wrong activity is set on start Mar 02 05:39:57 so cannot recommend ;) Mar 02 05:43:07 gordon_: now that you know what I've done with the Observables, can I get your $0.02 on how to use them inside some fragments? Mar 02 05:44:25 I have a TabLayout, and each tab has a fragments with a recyclerview inside (same everything else, just different datasource) Mar 02 05:45:02 My plan was to pass in the observables right after I created the fragments, then set the Observables inside the adapter. Does that sound.. advisable? Mar 02 05:45:18 I dont use observables in fragments Mar 02 05:45:43 the observables are instantiated in the activity then passed into the fragments Mar 02 05:45:48 at least, that is the plan Mar 02 05:45:49 I have dao / repository classes, and fetch data in presenter then I just pass simple list to fragments (views) Mar 02 05:46:06 so views are super dummy Mar 02 05:46:27 do you wrap the dao/repositories inside a service? Mar 02 05:46:34 i was considering doing htat Mar 02 05:46:44 what do you mean by service ? Mar 02 05:46:53 a design pattern or android service ? Mar 02 05:46:58 android service Mar 02 05:47:05 no, I dont do that Mar 02 05:47:27 is it worthwhile exiting android studio for an update? http://i.imgur.com/EHUcnXW.png Mar 02 05:47:35 I always do exit, but it is kind of a pain Mar 02 05:47:43 how are you passing in the daos? Mar 02 05:47:56 stillrowan7: never seen that dialog before Mar 02 05:48:05 I get it all the time Mar 02 05:48:09 i am on cannary channel Mar 02 05:48:15 beta channel Mar 02 05:48:31 kommunicate: my daos are returning observables Mar 02 05:48:38 I always restart on SDK updates, but that's because I saw the emulator totally crap out after doing that Mar 02 05:48:52 *after not restarting Mar 02 05:49:27 yeah, that is the kind of thing I am trying to avoid. Mar 02 05:49:47 I should probably switch to stable channel. but then no shiney new things Mar 02 05:50:45 shiny new bugs Mar 02 05:50:59 lol Mar 02 05:51:00 that too Mar 02 05:53:20 gordon_: where in the fragment lifecycle do you create the presenter? Mar 02 05:55:36 dagger module Mar 02 05:55:40 ;) Mar 02 05:55:59 and injecting it Mar 02 05:56:08 you can create it in onCreate() Mar 02 05:57:24 in the fragment's onCreate? Mar 02 05:57:47 yeah this template used dagger. I figured i'd take it one library at a time Mar 02 06:01:56 yes in fragment's onCreare Mar 02 06:01:58 *onCreate Mar 02 06:04:50 I cannot understand why this is double drawing on rotation! Mar 02 06:05:17 does inflating a view that contains a recyclerview cause multiple copies to be created? Mar 02 06:05:26 no Mar 02 06:05:31 onCreateView() is called on screen orientation Mar 02 06:05:39 it is Mar 02 06:05:48 and activity's onCreate Mar 02 06:10:57 hm.. gordon_, i've been thinking about your approach -- do you use static references to your daos? Mar 02 06:11:12 nope Mar 02 06:11:15 injecting them Mar 02 06:11:32 when/how? Mar 02 06:11:45 in dagger module Mar 02 06:12:11 I should write a blog post... Mar 02 06:12:13 ;) Mar 02 06:12:13 oh, is dagger an ioc framework? Mar 02 06:12:24 yes, di framework Mar 02 06:12:45 if you use static reference, you cannot write unit test for presenter Mar 02 06:12:46 this is month 2 of android for me.. i wish i'd known about a few of these frameworks before i got started Mar 02 06:13:14 do I keep a reference to my presenter, adapter, recyclerview when I change screen orientation? Mar 02 06:13:39 or do I null them out in onDestroy(), recreate them in onCreate()? something like that Mar 02 06:13:39 no Mar 02 06:13:41 no Mar 02 06:13:53 pfn: *bro fist* Mar 02 06:14:09 yeah two no's in less than a second Mar 02 06:14:14 I guess its official Mar 02 06:19:41 man, dagger looks awesome Mar 02 06:19:47 thanks for the suggestion :) Mar 02 06:19:52 wish it was awesome ;) Mar 02 06:20:03 oh.. is it a bit disappointing? Mar 02 06:20:13 a bit of boilerplate Mar 02 06:20:18 but still better than nothing Mar 02 06:20:42 it's boilerplate for trivial apps Mar 02 06:21:02 for anything non-trivial manual dependency management would be ridiculous Mar 02 06:22:28 I didn't say it's bad, it's still better than nothing Mar 02 06:22:47 I didn't say you say it was bad Mar 02 06:23:00 I don't see how double drawing is even possible here Mar 02 06:23:02 I just wish that I could make one inject method for i.e. BaseActivity Mar 02 06:23:10 use Dagger 1 Mar 02 06:23:13 instead of wiritng inject for each one of them Mar 02 06:23:28 JakeWharton: I see ;) Mar 02 06:23:41 "dagger2 is new python3" Mar 02 06:23:47 you still have to write an injects= list with all your injection points though Mar 02 06:23:51 Hello. Mar 02 06:23:56 i don't see what's the big deal about either, really Mar 02 06:24:37 it's the most important part about using Dagger and its the piece that affords its biggest advantage: compile-time validation Mar 02 06:25:17 JakeWharton: there is an issue with Timber and cleaning the project. I saw on github that this is an Android Studio bug. Just wondering if you know of a workaround Mar 02 06:25:21 I'm trying to connect to a site that uses Openid. Has anyone had luck with this? Mar 02 06:25:28 RustyShackleford: nope. only happens on Windows I'm told Mar 02 06:25:48 installed ubuntu today actually. Lets try a clean and see what hapens Mar 02 06:27:32 awesome. Works fine for me on ubuntu Mar 02 06:28:15 Anyone? Mar 02 06:33:00 JakeWharton: I'm just being lazy, please forgive me :) Mar 02 06:33:51 laziness is a virtue Mar 02 06:34:12 i want to do the minimal amount of work possible as well Mar 02 06:36:58 I wish I could be lazier Mar 02 06:38:24 I have so much documentation to write, I'm so sick of it... Mar 02 06:39:03 documentation [*] Mar 02 06:39:13 $work documentation, so it pays the bills Mar 02 06:43:52 what am I supposed to do with fragments on screen rotation? Mar 02 06:44:09 put them in a bundle? null them out and create new ones? Mar 02 06:45:20 recreate Mar 02 06:45:54 recreate ? Mar 02 06:46:03 ? Mar 02 06:46:03 you should null nothing out Mar 02 06:46:17 unless you maintain a reference from outside the lifecycle of the component that may go away Mar 02 06:46:31 RustyShackleford in your activity onCreate, see if the fragment manager has the fragment Mar 02 06:46:44 are you dealing with the same Object when you go throrough the lifecycle methods again? Mar 02 06:46:53 thats why you often see if (savedInstanceState == null) { create fragment } Mar 02 06:46:56 he has some "wizard like flow" I guess, so he needs to hold something what current fragment is Mar 02 06:47:09 and then replace root element with fragment again Mar 02 06:47:11 if it's null Mar 02 06:48:02 uh, just put the tag of the current fragment in a bundle, then make sure thats the one on display Mar 02 06:48:30 oh ha, unless you are using FragmentPagerAdapter :D Mar 02 06:48:38 fragmentpageradapter ftl Mar 02 06:48:46 don't do it Mar 02 06:48:57 unless you need to manage the actionbar menus Mar 02 06:49:05 i'm too sleepy for this Mar 02 06:49:25 i'll be here tomorrow to ask another thouseand questions Mar 02 06:50:20 what's up Mar 02 06:54:45 I'm trying to login to a site that uses Openid, is there a library that helps with this? Mar 02 06:55:11 It's Amazon Mar 02 06:58:24 google has lots of answers Mar 02 06:58:27 should try it Mar 02 08:44:08 Good morning devs, let's rock 'n roll :) Mar 02 08:45:14 ok Mar 02 08:51:48 rocking Mar 02 08:51:55 mornin Mar 02 09:02:05 https://events.google.com/io2016/ Mar 02 09:04:34 thepoosh: you going? Mar 02 09:07:21 Leeds: I asked, but it's quite expensive (including flight tickets etc.) Mar 02 09:07:44 SimonVT: are you adding this to the topic? Mar 02 09:08:01 yeah, I'd have no problem paying for the event, but the travel costs would make it silly Mar 02 09:08:35 Leeds: last year we got invited by Google but the heads of the company decided it's a networking event and didn't send any devs Mar 02 09:09:07 I have heard people say the main value is in hanging out with Googlers and other devs Mar 02 09:10:19 Offtopic: Can someone tell me why loader is being called more than once here, and how should I fix it? http://pastie.org/10744561 Mar 02 09:16:57 how is that off-topic for a dev channel o0 Mar 02 09:17:12 also TL;DR Mar 02 09:17:22 ^ big help Mar 02 09:17:26 liefer: it;s a nick Mar 02 09:17:34 oh, lol Mar 02 09:17:53 dunno trying to do polite im new here :P Mar 02 09:18:21 barbs, its a hint that he should not expect people to read fucking 500 lines of code just to locate his issue Mar 02 09:18:27 oh, loll Mar 02 09:19:33 calm down, geez Mar 02 09:21:19 im pretty calm :) stop being so sensitive. Just shorten down your paste to the minimal piece of code that exhibits the problem(s) you want help with Mar 02 09:21:22 Just having problems to integrate this loader manager it seem to be a problem that repeats itself according to Mar 02 09:21:25 http://stackoverflow.com/questions/14719814/onloadfinished-called-twice Mar 02 09:22:02 or dont, its up to you Mar 02 09:22:23 Seems that it’s a repeating problem and thought maybe someone can help or already encountered this issue Mar 02 09:22:24 Hello, i want to use Wii Balance Board with my Android Device, i already paired it with my Device ( rooted Custom Rom), but now i don't know how to grab the RawData of the InputDevice? Is there any way to get it? Mar 02 09:24:29 anyone using espresso? dont know why it but it lanches my activity and test gets terminated. all I get in logs is "Client not ready yet..Waiting for process to come online" Mar 02 09:30:25 Ok I shortend the pastie to the imidiate suspects http://pastie.org/10744572 Mar 02 09:34:13 sivi, check for your loader id.. and swap only if id match Mar 02 09:35:06 ok ill try it thanks Mar 02 09:49:46 Hey, my fresh install of Android studio cant find the build tools, I get an error about build toold 23.0.x is not found, install and sync. installing any version doesnt solve the issue Mar 02 09:57:46 viran, my suggestion: download the sdk separately and set as to its folder Mar 02 09:59:07 and make sure that the version of your build tools is the same as the one of the gradle file ( build.gradle -> buildToolsVersion "23.0.2" ) Mar 02 10:14:34 any good libraries for mirroring the contents of two directories Mar 02 10:14:39 (like rsync) Mar 02 10:14:43 not just copying Mar 02 10:14:48 actual archival mirroring Mar 02 11:51:41 mmm, Android SDK tools update Mar 02 12:01:25 Quick one from an android dev noob. I have a RelativeLayout that contains a LinearLayout that contains two buttons. The buttons have onClickListeners that don't fire when buttons are clicked. If I remove the LinearLayout, though, they work. Been hunting around but can't seem to find a solution Mar 02 12:06:26 pastebin the xml and code Mar 02 12:12:51 Sorry Ashiren, missed your response... Here's the XML and code: http://pastebin.com/J3RvsuH4 Mar 02 12:21:28 schnitzi: you should use match_parent and not fill_parent Mar 02 12:22:11 also I assume that you have a different layout above the LinearLayout that takes the click Mar 02 12:22:58 In your onCreate you need to Mar 02 12:22:59 setContentView(R.layout.whatever); Mar 02 12:23:06 before you call findViewById Mar 02 12:23:45 Cool -- will try some of this stuff. brb Mar 02 12:23:48 Either that or you can use ButterKnife and ButterKnife.bind(this); in your onCreate -- - and then you can use an @OnClick annotation instead of click listeners Mar 02 12:24:08 liuwenhao: how will that solve his issue? Mar 02 12:24:18 the onClickListener is set and the views are not null Mar 02 12:24:19 he isn't setting the content view Mar 02 12:27:31 Well without more code it's not entirely clear but setContentView should always be called before findViewById unless you're going to use a custom layout inflater Mar 02 12:27:34 or something along those lines Mar 02 12:27:48 I do a setContentView in the parent class -- sorry, forgot to say this is an child class Mar 02 12:28:21 I might rip that out temporarily until I get things working Mar 02 12:28:32 Are you using a fragment? Mar 02 12:29:54 no fragment Mar 02 12:30:29 Why are you calling findViewById in a class that isn't setting the content view anyways? Mar 02 12:30:42 you can just use an interface if you need to update that UI Mar 02 12:31:08 +1 Mar 02 12:31:50 i.e. resetButton.setOnClickListener(v -> ExploreViewInterface.reset()); in the parent Mar 02 12:32:04 Or something like that, sorry it's very late and I cant think clearly Mar 02 12:36:00 Okay, here's an updated version where everything's in one class, and I've added some comments as well. Mar 02 12:36:02 http://pastebin.com/EVEY0ABz Mar 02 12:36:27 XML is same as before Mar 02 12:36:59 schnitzi: did you try adding a Toast or a Snackbar when clicked? Mar 02 12:37:22 thepoosh - I put a breakpoint in and it never hits it Mar 02 12:37:29 hmmm Mar 02 12:37:37 that means something is taking the touch event Mar 02 12:37:43 do you have onTouch? Mar 02 12:38:40 doing onClick, not onTouch; not sure what the latter even is (apologies, this is my first app) Mar 02 12:39:34 Or rather, what the difference would be... I assumed buttons would take an onClick Mar 02 12:45:57 tried an onTouchListener instead and it seems to get eaten as well Mar 02 12:48:00 that makes no sense Mar 02 12:48:20 is there a view above this? try dumping the hierarchy view Mar 02 12:58:13 sorry, just learning what hierarchy view is... and Android Device Monitor while I'm at it... :/ Mar 02 13:03:37 whats cuboidview Mar 02 13:04:29 it's a View subclass I created Mar 02 13:05:24 and its not overlaying the button and consuming click event by any chance? Mar 02 13:05:38 It's certainly possible Mar 02 13:06:47 add android:layout_below="@+id/layout" to the explore_view Mar 02 13:07:31 ok will try Mar 02 13:09:14 That did it. Woop! Thanks, Ashiren! Mar 02 13:21:18 And thanks to everyone else who had a look... Cheers, it's bedtime here Mar 02 13:23:47 Hey guys, I have a recyclerview using a grid layout manager Mar 02 13:24:00 I want the recyclerview's height to wrap based on the items in the recyclerview Mar 02 13:24:03 which it does! Mar 02 13:24:18 except when there are no items, when this happens it consumes height to match its parent Mar 02 13:24:27 is there a way I can not have this happen? Mar 02 13:25:39 sounds like a job for the layoutmanager Mar 02 13:26:05 and its measuring things Mar 02 13:27:05 hmm Mar 02 13:27:21 I am using the default one and setting it to fill from the bottom of the screen (reverse) atm Mar 02 13:27:40 what do you expect when there are no items Mar 02 13:27:54 for there to be no height Mar 02 13:27:57 (perhaps) Mar 02 13:28:23 so something I'll have to override yeah Mar 02 13:28:24 ? Mar 02 13:28:34 then you could change visibility to View.GONE when there are no children Mar 02 13:44:12 Hi everyone, I have problem deleting pointer in my app. I store a pointer to my object in my main activity, that I store as a long. I delete this object at the onDestroy event of the activity, the interface between JNI and my activity is very simple https://bpaste.net/show/01308a7dd0c5 . I alway have an error when closing the app => https://bpaste.net/show/225b5563a215 Mar 02 13:45:22 Anyone here could tell my why ? :) Mar 02 13:48:23 OK sorry, I’ve been mislead by a Segfault error that I solved Mar 02 13:48:46 it was another problem, and I juste solved it :) Mar 02 13:48:50 thanks anyway Mar 02 14:00:08 thanks Ashiren Mar 02 14:00:16 simple solution, was overthinking Mar 02 14:20:03 Hello people. Mar 02 14:21:53 Hello. I'm trying to figure out retrofit2 interceptors. Am I barking up the wrong tree if I'm trying to write one interceptor which will add parameters to the request regardless of the request method? Ie. add a get or post parameter with the given name depending on the type of request as determined by retrofit/okhttp Mar 02 14:21:56 hi! i'm using this line to test and android app, but monkey appears to ignore the seed value and the input it generates changes with every run. what could be wrong? 'timeout 10m adb shell monkey -s 1337 --throttle 150 --ignore-crashes --ignore-timeouts --ignore-security-exceptions --pct-majornav 0 --pct-syskeys 0 -p $package -v 1000000 &> $RESULTDIR$p/monkey.log' Mar 02 14:49:32 Hi I am getting - SERVICE_VERSION_UPDATE_REQUIRED error message in onConnectionFailed when connecting to google play services Mar 02 14:50:09 Is a way to know which is minimum version that is required if I build my sdk against a particular sdk version number ? Mar 02 14:50:31 Hi Mar 02 14:51:37 Hi Mar 02 14:52:54 I have an Activity that pushes a series of Fragments on its back stack to make a signup flow. If I pause the app and destroy the Activity in the middle of this flow, and I later resume the app, I want to be able to resume where I left off. Should I handle Bundle in onCreate() and onSaveInstanceState() manually? I.e. should I save/restore values of all the Fragment's input fields manally? Mar 02 14:54:05 Or does Android do it for me? Mar 02 15:01:05 hi\ Mar 02 15:05:00 i am experiencing something very strange, i am using reflection and it crashes on some devices with this message: Exception: java.lang.IncompatibleClassChangeError: Couldn't find com.mypackage.HandlesMessages.packageOnly Mar 02 15:07:18 is parse.com down for anyone else? Mar 02 15:09:07 Wasn't Parse discontinued recently? Mar 02 15:09:55 Ah apparently it should still be up until January next year Mar 02 15:10:09 yup Mar 02 15:10:18 they're having some issues today apparently Mar 02 15:10:27 according to > https://status.parse.com/ Mar 02 15:13:04 Hi, i connected a gamepad to my android device, is it possible to listen to the raw data sent by the gamepad? Mar 02 15:23:30 Btw, I'd really like an answer to this: http://stackoverflow.com/questions/35747852/result-not-returned-from-activity-after-onnewintent-invoked-activity-destroys Mar 02 15:42:55 Zta77 , what about other modes Mar 02 15:58:34 is steps detector really battery hungry? Mar 02 16:31:57 Hey, do any of you know how to have an app get a string from a website's html? Mar 02 16:32:54 For Example - a horribly implemented clock that checked a server for what time it is. Mar 02 16:33:45 yes Mar 02 16:43:53 is Jetbrains Rider new ? Mar 02 16:45:07 is there any pitfall in signing your debug version with the same keystore as release? Mar 02 16:45:38 i'm asking because i need to register some sha1 with google/facebook developer console and this sha1 needs to be shared between the whole team Mar 02 16:45:53 i'm guessing the default debug key won't be the same from one computer to the other Mar 02 16:46:02 and release is sort of what you need at the end of the day Mar 02 16:47:01 cool http://www.tomshardware.com/news/basemark-pat-power-assessment-tool,31315.html Mar 02 16:47:44 Hi Mar 02 16:49:55 I'm trying to understand how API Key works, we generate sha1 of our private key that we register on backend. So how the backend make the verification based on API Key? Mar 02 16:50:22 bloody magic Mar 02 16:50:39 i'm guessing it gets sent with the request? Mar 02 16:52:03 ugh, card.io 5.3.0 is incorrectly packaged Mar 02 17:01:22 i'll ask my question differently... Mar 02 17:01:35 any harm in signing a debug build with a release certificate? Mar 02 17:01:44 (as in not using the default debug keystore) Mar 02 17:11:40 lol, "how to move to canada" popular google search Mar 02 17:12:08 A recent court case (from a user against Amazon) sets a precedent that also applies to Android and Google: Mar 02 17:12:16 If a user pays for some content or service, Mar 02 17:12:22 and later violates the ToS, Mar 02 17:12:29 you can’t end their account. Mar 02 17:12:43 They have the right to continue accessing the paid data and using the paid service. Mar 02 17:13:07 For example, if a user buys a book via Amazon Kindle, and then violates the Amazon Marketplace ToS, they have to be able to access the book. Mar 02 17:13:40 Case OLG Köln, 26.02.2016 - 6 U 90/15 Mar 02 17:13:47 Anyone want to answer a quick poll? I just made it out of curiosity regarding library usage: http://strawpoll.me/6974134 Mar 02 17:14:17 carcrash: you can only answer one... Mar 02 17:14:20 not multiple. Mar 02 17:14:40 What if i use Otto, Picasso, ButterKnife and Retrofit? Mar 02 17:15:27 carcrash what is the point? better is actual data from analyzing the apks, i think thats out there somewhere ... Mar 02 17:15:31 You'll live happily ever after Mar 02 17:15:44 justJanne, thanks. That was a mistake. Mar 02 17:15:45 ooks Mar 02 17:15:59 g00s, I just thought i'd see what people here are using :) Mar 02 17:16:20 if its not a scientific poll, its useless Mar 02 17:17:14 'what irc devs mostly in US which happen to be watching channel at 12:15 are using' Mar 02 17:18:02 Ologn doesn't AppAnnie have this ? Mar 02 17:18:16 g00s: not really. Mar 02 17:18:37 I’d bet most people awake in the channel right now and active are not even from the US Mar 02 17:18:39 g00s, I agree and I don't. If i were using the results for anything other than my own idle curiosity, scientific rigor would be important. But just as an idle question to which i know the limitations of, it is not so important Mar 02 17:18:45 i was just visiting a website that showed the most popular libraries used - was it from scraping github or play store Mar 02 17:19:50 g00s, http://www.appbrain.com/stats/libraries/ad Mar 02 17:20:33 JakeWharton will be speaking in NYC next week Mar 02 17:20:44 oh noes Mar 02 17:21:08 He's speaking now too! Mar 02 17:21:11 I have my Square ticket but the Google event got filled up quick Mar 02 17:21:22 both will be recorded Mar 02 17:21:25 JakeWharton Nine Old Androids #2 http://www.appbrain.com/stats/libraries/tag/android-utility/android-utility-libraries Mar 02 17:21:38 ...i can't even... Mar 02 17:22:08 wonder what the street value of one of those tickets is Mar 02 17:22:28 JakeWharton: well, a lot of people still have to support Gingerbread today. Mar 02 17:22:48 Gingerbread users don't need animations Mar 02 17:22:56 I think one of the apps I use just dropped Cupcake and Froyo support, because the 2% of users weren’t worth it anymore. Mar 02 17:22:58 they need new phones ! Mar 02 17:23:13 whatsapp Mar 02 17:23:14 well, JakeWharton, sometimes animations are necessary to understand some visualisations. Mar 02 17:23:26 suckers support gingerbread today Mar 02 17:23:33 I still have Eclair users from one of my apps from 2011 Mar 02 17:24:24 We#re currently working on an app for a bunch of hospitals and research organizations that’s supposed to run on patient phones, and the requirements also argue that, while only Marshmallow support is a MUST, gingerbread+ is a SHOULD Mar 02 17:24:45 justJanne thought most hospitals / docs use iPhones anyhow ... Mar 02 17:24:53 g00s: the docs, but not the patients. Mar 02 17:25:42 an app for hospital patients O.o Mar 02 17:25:56 03-01 13:44:39.097 I/TextInputLayout(12339): EditText added is not a TextInputEditText. Please switch to using that class instead. Mar 02 17:25:58 that's a dumb warning Mar 02 17:26:04 AppCompatEditText doesn't even extend it Mar 02 17:26:15 i'd be like "no thanks, do not resuscitate / install" Mar 02 17:26:16 Well, a lot of patients in rural areas are old, and can’t often go to the doctor – Mar 02 17:26:28 oh so this is telemedicine Mar 02 17:26:49 the app is supposed to allow (a) gathering data on how much they move, and (b) allow doctors to send info, or request the patient to fill out things. Mar 02 17:27:08 they should just have a fitbit or MS band or something Mar 02 17:27:17 Yes, that’s why I have an MS Band 2 on my desk. Mar 02 17:27:44 cool, sounds fun Mar 02 17:28:07 the data will be stored obviously on two seperate systems, one storing UUID -> medical history, the other storing UUID -> patient name, etc. Mar 02 17:28:26 full end-to-end crypto everywhere, everything encrypted everywhere, Mar 02 17:28:31 Would doctors have the time to partcipate in this? They seem pretty busy Mar 02 17:28:48 but scientists from universities can request access to the UUID -> medical data, aggregated, obviously. Mar 02 17:28:56 drose379: in fact, the doctors suggested this ;) Mar 02 17:29:05 Sweet, I like the idea a lot Mar 02 17:29:06 drose379 yeah going around room to room asking "how are you feeling" , listening for 2 minutes, and then charhing $300 ha Mar 02 17:29:13 Can I have Espresso click on UI elements, and then use an assert() to make sure that something equals something? Any time I've seen espresso tests, they never had assert() statements, only matching views and stuff. Mar 02 17:30:54 it is still in the stage of "let’s take 60 students and let them work on it for a month" (two times a year), but the current result is already pretty interesting. Mar 02 17:38:41 hmm, I should remove card.io from my lite.apk, save some space Mar 02 17:47:55 Hi, i'm looking for help, i want to read raw data of an Bluetooth Input Device, is anyone here who can help me? Maybe in private chat? Mar 02 17:49:14 If I have a custom ViewGroup which implements NestedScrollingParent and I put a RecyclerView as a child for said ViewGroup, shouldn't the ViewGroup be receiving the scroll events? Mar 02 17:49:31 i'm too unhealthy to provide real help, but if what you want is to handle BT serial data, there's an example app already on d.android.com for doing it Mar 02 17:49:51 if you want to read anything other than SPP serial data, you're fairly out of luck, android doesn't expose much else Mar 02 17:51:50 dargorn, Yes that's the problem, i have a wii balance board paired with my Device. It's paired as Input Device, and now i have to find a way to read the data the balance board sends to the device. It sends Motion Events all the time, but i can't find a way to read the raw data of this motion events Mar 02 17:52:16 Two Options: read the Data directly from bluetooth socket or read the data from the input device Mar 02 18:09:23 http://hanhuy-acra.appspot.com/public/com.hanhuy.android.keepshare.lite/0a0233c22f237e84147c66990b95caa460923433 Mar 02 18:09:26 are you serious... Mar 02 18:10:01 Logcat says "service leaked broadcast receiver, 2ba45fc7" and immediately follows up with a crash: "receiver not registered 2ba45fc7" Mar 02 18:20:02 Krid886, afaik you can't Mar 02 18:20:42 okay, thanks Mar 02 18:24:50 hi, how is this possible that antivirus app can read other process(app) source? Mar 02 18:26:04 they’re not Mar 02 18:26:35 surprise - "antivirus" on android is almost all bullshit. Mar 02 18:26:40 Bored: they can’t, that’s why they’re snake oil. Mar 02 18:26:54 well, snake oil actually had some effectiveness, antivirus is worse than snake oil. Mar 02 18:27:24 if anything, the companies behind the AV would be cracking the apps by hand, and just having the app look for the signature of the app (they’re not, though) Mar 02 18:27:43 and even if they did, a simple decompile/mod/recompile will change the signature Mar 02 18:28:15 well they somehow manage to read my app source beacuse they found this string: "yyyy_MM_dd_HH:mm:ss" related to virus :\ Mar 02 18:28:37 Bored: they do it a different way. Mar 02 18:28:44 the app finds the list of installed apps by id. Mar 02 18:28:50 for example, com.google.quicksearchbox. Mar 02 18:28:57 i have android 5.0.1 and its not rooted. this isnt suppose to happen but still it does :\ Mar 02 18:29:01 then the company downloads the app from google play into their test devices, Mar 02 18:29:04 and decompiles it there. Mar 02 18:29:48 Um, is espresso not updated with support 23.2 yet? Mar 02 18:29:57 justJanne my app isnt published at google play, i just started to develop it Mar 02 18:30:09 Bored: that’s interesting. Mar 02 18:30:12 which AV? Mar 02 18:30:12 which antivirus? Mar 02 18:30:22 avg free Mar 02 18:30:31 I’m gonna decompile theirs now, brb Mar 02 18:30:41 and that string, is it in the Strings.xml, or is it hardcoded into code? Mar 02 18:31:00 its in my code Mar 02 18:31:02 and what was the actual message the AV mentioned? Mar 02 18:31:23 Has anyone in the world ever been able to run: unit tests + android tests + tests with espresso **in the same project** ? Mar 02 18:31:24 and I’m guessing you’re not using Proguard Mar 02 18:31:42 i dont know how to setup proguard Mar 02 18:32:05 if you’re not ready for release yet, it’s not important Mar 02 18:32:09 i added it on project.properties Mar 02 18:32:35 don’t bother with it while you’re developing. it’ll just get in the way Mar 02 18:33:09 what was the actual message that AVG mentioned relating to your app? Mar 02 18:33:15 well, not if you disable obfuscation ;) Mar 02 18:33:30 it slows down your build Mar 02 18:33:43 I don’t really notice that, tbh. Mar 02 18:33:54 it’s about 10sec without it, 12s with Mar 02 18:34:11 10s builds... such utopia Mar 02 18:34:17 i guess it would depend on how big your app is Mar 02 18:34:55 about 40k LOC – but I use eclipse compiler in IDEA for incremental builds. Mar 02 18:35:48 anyways, back to the AV thing. I find it really weird, even if the AV is decompiling the app looking for strings, that it would trigger on a date format string of all things Mar 02 18:36:35 my incremental builds take at least 40 seconds Mar 02 18:36:45 often about 2 minutes, occasionally 4 minutes Mar 02 18:37:48 and dammit, he left Mar 02 18:37:58 s73v3r: so, I looked into it Mar 02 18:38:07 sorry got dc Mar 02 18:38:17 the AV actually takes all apks it can find, makes a local SQLite db with Signature, pkgid, filesize. Mar 02 18:38:19 and? Mar 02 18:38:25 then sends that db to the server. Mar 02 18:38:34 the server then answers with a list pf pkgids, Mar 02 18:38:41 then the app takes the apks for those, Mar 02 18:38:44 and uploads them. Mar 02 18:39:05 so this is the biggest front for piracy out there Mar 02 18:39:13 but only if the device isn’t currently used, is charging, and the wifi is connected. Mar 02 18:39:26 how considerate of them Mar 02 18:39:57 I’d recommend looking into com.antivirus.core.apploader Mar 02 18:40:02 How do people usually deal with mulitple developers working on a single app and wanting to test each others’ builds? Shared build server that builds everything with one signing key? Mar 02 18:40:35 I’d like to be able to adb install -r , but I can’t because it’s signed with their private cert instead of mine (which I originially installed the app with) Mar 02 18:40:35 duboisj: if you use different signing keys, use also different packageids. Mar 02 18:40:37 duboisj: separate keys for the Play store and for debug Mar 02 18:40:53 and share the debug key between everyone Mar 02 18:40:55 you can also append a suffix to the packageid via gradle for debug builds. Mar 02 18:40:56 give everyone the same debug key - OK. Mar 02 18:41:07 I currently append the user’s local name to the packageid Mar 02 18:41:19 I haven’t looked at that, but yeah. Mar 02 18:41:30 justJanne, why? :o Mar 02 18:41:32 you could, but i think that’s too much trouble Mar 02 18:41:44 duboisj: You could also just pull from git Mar 02 18:41:45 so kuschku@discovery gets com.example.app.debug.kuschku, janne@endevaour gets com.example.debug.janne Mar 02 18:41:50 I want the package to be the same so it shares data … that’s whole point of not reinstalling. debug keys from everyone makes sense Mar 02 18:41:55 and for release it’s com.example. Mar 02 18:41:56 pull from git? Mar 02 18:42:01 ah, sharing data. Mar 02 18:42:05 you are using version control, right? Mar 02 18:42:12 well, yes. Mar 02 18:42:22 yeah, I wanted to avoid that, because people use different database situations, and down-migrations are hard to get right. Mar 02 18:42:24 but pull what? Mar 02 18:42:42 pull from version control Mar 02 18:42:48 are you guys not merging? Mar 02 18:43:36 we don’t merge often actually (we push to a shared fast-foward branch), but I’m talking about sharing built .apks. Oh, I see … you mean always grab another dev’s patches before building. Mar 02 18:43:40 sure, I could do that. Mar 02 18:44:04 you guys should have a single Master branch that’s kept up to date Mar 02 18:44:04 but it’s often convenient to develop in a private branch and it’d be nice to be able to run those things without a rebuild. Mar 02 18:44:08 shared debug key will do it Mar 02 18:44:14 > Turn off animations on your test device — leaving system animations turned on in the test device might cause unexpected results or may lead your test to fail. Turn off animations from Settings by opening Developing Options and turning all the following options off: Mar 02 18:44:23 how can I do that easily on an emulator? Mar 02 18:44:28 I want to run UI tests via CI Mar 02 18:44:36 yeah, we do. it’s running test stuff that’s not pushed yet that’s the issue Mar 02 18:44:40 there is a way to do it in Espresso Mar 02 18:44:58 well, the espresso documentation specifically says you have to do it manually. Mar 02 18:45:05 (the quote is from the documentation) Mar 02 18:46:37 i thought we had something to do that. turns out it was just our internal tests Mar 02 18:47:06 err, internal animations Mar 02 18:47:21 still different to develop for a platform that requires signing everything :) We sign for OS X, but that’s optional, and unsigned debug builds are still easy to push around. Thanks :) Mar 02 18:48:36 If i'm testing view interaction, where views interact with a Handler that uses the MainLooper- I'm screwed, right? The tests create the view hierarchy on a different thread. But the Handler "touches" those views on the main thread. So you get the exception: CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. Mar 02 18:49:50 then create the handler on the test thread Mar 02 18:50:01 or there's an annotation to specify that your stuff runs on a particular thread Mar 02 18:50:08 :| that's a deep dependency I shouldn't have to change. Mar 02 18:50:19 @UiThreadTest fails immediately Mar 02 18:54:08 Fixe'd Mar 02 18:59:23 aha Mar 02 18:59:27 found the damned thing Mar 02 19:00:48 Ologn: ? Mar 02 19:02:26 thepoosh, I found this data - https://github.com/MarcelloLins/GooglePlayAppsCrawler Mar 02 19:02:45 from late 2014 or so Mar 02 19:17:56 s73v3r if i were using proguard you beleive it wouldnt detect my string as suspicious? Mar 02 19:18:06 i don’t know Mar 02 19:18:17 I’ve asked multiple times for you to post the actual thing it said Mar 02 19:18:36 oh sorry didnt see :X Mar 02 19:20:38 proguard doesn't inspect strings Mar 02 19:21:31 when is android 7 coming out Mar 02 19:21:43 android has been rolling out new os like crazy Mar 02 19:21:52 no they haven't Mar 02 19:21:55 or has time just fly by like insane Mar 02 19:21:57 anyone have experience with Charles? I can't seem to get the certificate working on my Nexus 5X Mar 02 19:22:05 wondering if it's a marshmallow thing Mar 02 19:22:11 it’s been rolling out roughly once a year Mar 02 19:22:32 grekkos: I don’t think it’s a marshmallow thing. have you gone to the URL and installed the cert? Mar 02 19:23:20 s73v3r: I mean you don't see desktop os like window rolls off a new window every year Mar 02 19:23:35 OS X comes out every year Mar 02 19:23:46 pwnt Mar 02 19:24:20 is os x a real os Mar 02 19:24:22 * horny-sama hides Mar 02 19:24:46 if you’re going to make childish jokes, then don’t come back Mar 02 19:24:48 s73v3r: nothing happens when I go there, and when I download the cert manually it doesn't install Mar 02 19:24:51 let me check the message Mar 02 19:24:54 his name is mrfool for a reason Mar 02 19:25:58 Btw, the ULD has started investigating the matter regarding push notifications, privacy, Android 6, Doze, and GCM. Mar 02 19:26:29 what's the uld Mar 02 19:26:34 fine I will behave Mar 02 19:27:04 i’m guessing the ULD is a european consumer protection agency Mar 02 19:28:08 pfn s73v3r I am surprise that you guys still remember me Mar 02 19:28:14 I have not been here for ages Mar 02 19:28:33 because you're so incredibly annoying, it's hard to forget Mar 02 19:28:48 pfn: any positive? Mar 02 19:28:55 s73v3r: yeah, in fact, it's even only on state level, but the ULD has been most prominently in fighting these battles for privacy. Mar 02 19:29:06 horny-sama, zip Mar 02 19:29:16 okay fair enough Mar 02 19:29:55 They also looked at the situation comparing with other systems, Mar 02 19:30:04 And, for now, suggested just ignoring doze: Mar 02 19:30:25 Only power users are on 6.0 anyway, and those usually don't have occasions where doze is started anyway. Mar 02 19:30:50 Even though I’d probably not use it, it’d be nice if a lot of the Google integrations in the OS were pluggable, and the user could choose their location provider, and stuff like that Mar 02 19:30:54 Ignoring the people on 6.0 until a legal solution is found isn't ideal, but the best solution at the moment. Mar 02 19:31:02 Yeah, exactly. That'd be pretty awesome. Mar 02 19:31:14 whoo it worked that time Mar 02 19:31:24 Especially in areas where Google's services are mediocre, or aren't even supported in the local language. Mar 02 19:31:29 s73v3r: never mind i got it working :) I'll probably buy a license tonight then Mar 02 19:31:43 could you give those people a choice? Say, if you want to enable this feature, know that it’s going to be done using GCM? Mar 02 19:32:14 What's going on w/ GCM? Mar 02 19:32:33 Yes, I can, but I have to explain in layman's speak the situation. Mar 02 19:32:33 there’s no alternative to it regarding Doze Mar 02 19:33:09 Whats doze Mar 02 19:33:22 For example, if I use GCM notifications where GCM does the on-device notification, and therefore also sees the content of the message, I have to tell the user that potentially every private message of theirs can end up at Google, in the US. Mar 02 19:33:23 is this just the data being exposed to Google, or is it the thing with the data going between EU and the US? Mar 02 19:33:43 It's exposing data to a third party that's problematic. Mar 02 19:34:27 I can share data unencrypted only with myself, or within my organisation. Encrypted (but with metadata) only within EU, or safe harbour. Encrypted without metadata everywhere. Mar 02 19:35:06 drose379: Doze is a feature of Android 6 which will put the device in a low power state if it detects that it’s not moving and not plugged in. As of right now, the only way for a push message to wake the device if it is in Doze is for it to be a high priority message, and through GCM Mar 02 19:35:29 Ahhh, interesting Mar 02 19:35:37 Similar issues exist on iOS. Mar 02 19:35:42 Thanks s73v3r Mar 02 19:36:16 do they? I mean, I know the only push provider is Apple, but I would think that they would have a better setup regarding privacy Mar 02 19:36:18 Did GCM, like Apple push, also allow sending a JSON with notification title, icon and text via GCM to the device? Mar 02 19:37:10 I dont think so Mar 02 19:37:16 i couldn’t tell you offhand Mar 02 19:37:24 Anyway, GCM may at no point read the notification content. Mar 02 19:38:16 Anyway, they're investigating it and will contact Google Hamburg as well to hear their point. Mar 02 19:38:30 No need to speculate. Mar 02 19:40:33 Hi guys. Are there some official guidelines on form validation? Until today I had not deal with forms more complicated than 2-3 EditTexts and 1-2 Radios, but now I have to implement really big form and I wonder how exactly eror messages and other related stuff must be working and looking. Mar 02 19:42:26 AlexBernikov: the Material Design Guidelines have rules on how to display error messages for forms. Mar 02 19:42:45 I'm not sure where exactly, though. (Am on mobile) Mar 02 19:43:50 justJane: I tried to find such before asking but no luck... I'll try better Mar 02 19:44:14 AlexBerdnikov i read this, pretty short, was good. recommend http://www.amazon.com/Forms-that-Work-Interactive-Technologies/dp/1558607102 Mar 02 19:44:40 AlexBerdnikov but the actionable stuff could be distilled into a blog post really, but i don't know of anything material specific ... Mar 02 19:44:50 because goof form design transcends material Mar 02 19:45:05 good* :) Mar 02 19:49:24 Will Android save/restore content of e.g. TextView etc. if the Fragment is destroyed? Mar 02 19:49:32 ...and later recreated? Mar 02 19:49:34 if it has ID Mar 02 19:49:54 g00s: Thank you for the link. I have a background in web development, and in fact I have some considerations of how forms might and should be working, although Android is not one of millions web pages where every frontend developer is free to make it as he wants, so I think it must have some common rules, you know... Mar 02 19:50:05 I see, thanks. Mar 02 19:50:07 unless you actually recreate a new Fragment yourself Mar 02 19:50:47 AlexBerdnikov i looked into this ... form design between the gapps was all crazy Mar 02 19:51:08 for example, the old email client had lots of fields for host, port, etc. now i see more wizards Mar 02 19:51:16 hi goosbumps Mar 02 19:51:37 Hm, that may exactly be what I'm doing wrong. Mar 02 19:51:41 hey thepoosh :) Mar 02 19:52:23 g00s: It's weird that Android hasn't any guidelines for such a common thing as forms. Mar 02 19:52:44 AlexBerdnikov yeah i agree ... material spec should have something Mar 02 19:53:58 AlexBerdnikov https://www.google.com/design/spec/components/text-fields.html#text-fields-required-fields Mar 02 19:53:59 I have an Activity where I push Fragments on to create a signup process. I'd like to have it so that if the app is paused during signup, and later resumed, then the user can pick up where they left. Mar 02 19:54:05 is all i can find Mar 02 19:54:24 Is that possible with Android's out of the box save/restore system? Mar 02 19:54:48 g00s: thanks Mar 02 19:54:59 Or do I need to maintain state myself using onCreate(Bundle) and onSaveInstanceState(Bundle) Mar 02 19:55:48 thepoosh http://www.theverge.com/2016/3/2/11140928/app-store-economy-apple-android-pixite-bankruptcy Mar 02 19:56:46 That's default behavior, Zta77 Mar 02 19:57:19 Assuming everything has ids Mar 02 19:57:43 is there a view hierarchy tool in AS, or is that still in the Android Monitor? Mar 02 19:58:08 still in monitor. and its a steaming pile of crap Mar 02 19:58:17 hierarchy viewer works great Mar 02 19:58:36 Then something is wrong in my app. My Activity's onCreate() explicitly creates a new Fragment and adds it. This was it is never actually restored, if I read this correctly. Mar 02 19:58:37 for some reason for me anyhow the stupid cursor turns into a crosshair and has wrong hotzone Mar 02 19:58:44 get a new computer Mar 02 19:59:02 Zta77, you may have added the fragment multiple times Mar 02 19:59:14 pfn i'm sure my computer isn't the problem with SWT ;) Mar 02 19:59:20 I'm sure it is Mar 02 19:59:21 hierarchy viewer isn’t the problem. I was hoping to hit a breakpoint, then dump the view, then continue. Mar 02 19:59:28 yeah, nope Mar 02 19:59:29 no go Mar 02 19:59:51 balls Mar 02 19:59:52 g00s: tl;dr Mar 02 19:59:59 maybe tomorrow if i have downtime Mar 02 20:00:04 seems sad Mar 02 20:00:06 thepoosh tld;dr is "Consumer boredom with apps is a key reason that the smart money in Silicon Valley began turning last year to messaging apps and bots, which many observers believe could represent the next phase of the internet." Mar 02 20:00:30 well, good thing I am in the messaging world Mar 02 20:01:17 still sad but the truth is that there are a lot of apps and if you want to make money you should either freelance or make the app as part of something else Mar 02 20:01:19 was reading last week most VC money is going to startups with some AI component Mar 02 20:01:39 AI is the new mobile Mar 02 20:01:42 ML is all the rage these days if i recall correctly Mar 02 20:02:30 pfn: The fragment is added like this http://pastebin.com/0urrrMt3 where addToBackstack is false. This looks wrong.. Mar 02 20:02:51 Zta77, add the fragment with a tag Mar 02 20:03:01 Zta77, and check existence in fragment manager prior to adding Mar 02 20:04:23 they don't need a tag if the container view has an ID Mar 02 20:04:43 you can add multiple into a single container Mar 02 20:05:48 but sure, if you only have one, then you can find by id Mar 02 20:05:48 Zta77 see http://developer.android.com/guide/components/fragments.html Mar 02 20:05:48 meet these requirements "Note: Each fragment requires a unique identifier" Mar 02 20:05:48 findFragmentByTag Mar 02 20:05:48 you need to put that in your tag Mar 02 20:05:53 adding by ID does not provide the unique id Mar 02 20:06:14 it's unique up until the point where you add a second item to the container Mar 02 20:06:49 I'm adding fragments for a signup flow to a container. No fragment will be added more than once. Mar 02 20:07:40 Maybe that's why the code does .addToBackStack(null)? I didn't write this code to begin with, so I'm trying to understand what it does. I'm a total noob when it comes to fragments. Mar 02 20:07:57 :D Mar 02 20:07:59 And i'm trying to fix it so state is properly saved/restored. Mar 02 20:08:15 Zta77 i feel like a newb with fragments all this time later ;) Mar 02 20:08:31 they are pretty straightforward, except in places where google broke things Mar 02 20:09:11 of course "straightforward" is in the eye of beholder after some nontrivial amount of confusion Mar 02 20:10:12 =) Mar 02 20:10:37 I got burned by FragmentStateViewPager something some years ago. Never touched them again. Mar 02 20:12:11 seems now google broke nested fragments in ViewPager for some people Mar 02 20:12:31 they tried to fix onActivityResult not working and broke other stuff in the process Mar 02 20:12:34 for 23.2 Mar 02 20:12:55 :S Mar 02 20:13:06 one could argue, if they can't get that stuff working - they should burn it to the ground and try again Mar 02 20:13:26 sometimes sheet needs to be destroyed for progress Mar 02 20:13:26 Ok, I've been reading http://developer.android.com/guide/components/fragments.html#Transactions and it seems the addToBackStack(null) is pretty normal. Mar 02 20:14:16 thepoosh have you guys looked at Flow or any of those things ? Mar 02 20:14:27 nope Mar 02 20:14:30 what is that? Mar 02 20:15:01 thepoosh from today https://www.reddit.com/r/androiddev/comments/48mz58/abandoning_the_activity_stack_with_flow_10alpha/ Mar 02 20:15:29 * thepoosh is reading Mar 02 20:15:43 So in my Activity's onCreate() I should check my FragmentManager to see if the expected root fragment is present. If it isn't it's because nothing has been restored, and I add the first fragment myself. If it is present, I do nothing; Android has restored the backstack for me with all Fragments and all their Views and the Views' content? Mar 02 20:15:49 i really think google should make some xml DSL thing that explicitly maps out the transitions and scenes in an app ... Mar 02 20:18:28 don’t they have something like that? Mar 02 20:18:42 navigation editor? Mar 02 20:18:43 there is something in AS but thought it was abandoned Mar 02 20:19:28 hi all. my app requests the WRITE_SETTINGS permission on Marshmallow platforms. One weird behavior i'm seeing is the Nexus7 works fine, but the 2013 Nexus6 brings up the settings intent with the permission already (erroneously) granted. I have to toggle it twice to get it working. Mar 02 20:19:58 even though the permission looks to be on at first, if i go back to the app, it doesn't have permission Mar 02 20:20:24 that kinda sounds like the 'grant bt permission' dialog being malformed Mar 02 20:21:21 is there a way to clear a stored refresh token with the GoogleApiClient Mar 02 20:21:38 it stored a null token and it seems to think that those are valid credentials Mar 02 20:22:00 it reads it from disk instead of making a request to google Mar 02 20:22:05 it's a bit annoying Mar 02 20:25:37 it uses sharedprefs DrGonzo Mar 02 20:25:48 anyway that i can flush those? Mar 02 20:25:56 I am guessing it is your sharedprefs Mar 02 20:25:57 i uninstalled/reinstalled the application and they're still there Mar 02 20:26:06 oh Mar 02 20:26:10 I guess not then Mar 02 20:26:19 DrGonzo you can iterate the keys with getAll Mar 02 20:26:24 weird I thought I saw something like that in the decompiled source Mar 02 20:26:34 i would have thought so as well to be honest... Mar 02 20:26:36 DrGonzo i would investigate using Stetho , you can view the prefs file Mar 02 20:26:48 but as i said, uninstalled, reinstalled and it's still picking up on some cached credentials Mar 02 20:26:51 or you can nuke google-play-services data Mar 02 20:27:05 how do i nuke google play service data? Mar 02 20:27:05 oh shit yeah maybe cached there too Mar 02 20:27:07 (if I had root, I woulld look at the data before nuking it) Mar 02 20:27:11 it is listed as an app Mar 02 20:27:14 like any other app Mar 02 20:27:18 k Mar 02 20:28:45 Ah! Does this sound correct? In SignupActivity onCreate() I should only add the FirstFragment if the FragmentManager currently has 0 Fragments added? If it contains Fragments, it's because it's been restored, and I shouldn't add the initial FirstFragment. I've implemented this now and it seems to work. I just want to check if this is correct. Mar 02 20:29:20 clearing google play service data didn't help it Mar 02 20:30:12 my guess is that it's a token with an expiracy and it'll wait until it expires to then go back to the refresh token to get a new one... Mar 02 20:30:19 (in the worst of the case) Mar 02 20:31:19 it'd be good to have at least a funciton to flush it... it literally went in and stored the token as null Mar 02 20:31:32 which is the best way to resize /data partition ? Mar 02 20:35:23 Zta77: Yep, assuming you always have fragments in the FragmentManager Mar 02 20:35:47 ech0s7: Offtopic for this channel Mar 02 20:36:04 SimonVT: which channel is on topic ? Mar 02 20:36:33 Maybe #android-root Mar 02 20:45:43 java.lang.OutOfMemoryError: Failed to allocate a 3950617296 byte allocation with 12582304 free bytes and 126MB until OOM Mar 02 20:45:53 heh, someone thought it was a good idea to set their message buffer to like 1 billion rows Mar 02 20:49:25 pfn: IRC? Mar 02 20:50:21 I’ll switch over to using a disk cache for IRC message buffers soon, with around 300 messages per buffer stored on disk, and the rest loaded on request. That allows faster reconnect, too. Mar 02 20:50:44 (as I don’t have to request all messages from the bouncer then every time) Mar 02 20:53:54 i dont understand why more than the # of entries to show in a log would be in memory ... Mar 02 20:54:02 show on the screen at once Mar 02 20:56:49 justJanne are you using GMS activity recognition in the medical app ? Mar 02 20:57:17 g00s: we’ve been thinking about allowing the user to optionally use Google Fit as backend for info, Mar 02 20:57:22 but with big red warning screens. Mar 02 20:57:35 yeah ... Mar 02 20:57:56 It’s an issue. Mar 02 20:57:56 the TOS for fit is 'no medical stuff' though Mar 02 20:58:01 heh Mar 02 20:58:10 Well, yeah, it’s not "medical stuff" in that meaning, Mar 02 20:58:33 It’s more like your doctor asking: "are you doing sports?" Mar 02 20:58:39 just a bit more accurate. Mar 02 20:58:44 not for medical emergencies, etc. Mar 02 20:58:47 yet. Mar 02 20:59:25 g00s: one issue you can probably imagine: Mar 02 20:59:46 How do we make sure the 90yo user that clicks "send all my data to the NSA" actually understands what they’re doing there? Mar 02 21:00:20 talk to him about Edgar Hoover? Mar 02 21:00:40 obviously, ToS and contracts and so on are only binding if both sides actually had a reasonable chance to understand them. Mar 02 21:01:52 pfn: who? was that a president? Mar 02 21:02:57 fail irc client Mar 02 21:03:10 lol Mar 02 21:03:12 indeed. Mar 02 21:03:16 what could possibly go wrong, nursing home denies because patient is unprofitable ? Mar 02 21:03:31 g00s: well, the nursing home gets paid anyway. Mar 02 21:04:07 the app isn’t planned to be released outside of the central and northern european market. Mar 02 21:04:20 sup Mar 02 21:04:54 ugh Mar 02 21:05:16 http://www.theregister.co.uk/2016/03/02/chinese_backdoor_found_in_ebays_popular_cheap_smart_watch/ Mar 02 21:05:46 "Raggo said buyers download the pairing app from an IP address scrawled on a piece of paper that comes with the u8 watch." Mar 02 21:05:48 sounds legit Mar 02 21:06:12 you know, that can be easily sovled. Mar 02 21:06:21 a chinese backdoor was found in a chinese-made product? No way Mar 02 21:06:30 just needs one person to decompile the app, describe the way it interacts with the system, Mar 02 21:06:33 and build their own app. Mar 02 21:06:58 Ironthighs: a backdoor was found in a -made product? No way. Mar 02 21:07:03 ^ Mar 02 21:07:04 "If you are worried about fragmentation of Android, just take a look at smart watches," Mar 02 21:07:12 Im good thanks Mar 02 21:07:17 where global superpower contains, but is not limited to: US, Israel, China, Russia... Mar 02 21:07:20 they will never catch on anyway Mar 02 21:07:35 UK Mar 02 21:07:53 well, the UK isn’t really relevant: They don’t have many products on the global market. Mar 02 21:08:09 im amazed daily at how people want their privacy and at the same time want to have fancy high tech gadgets that store their info online Mar 02 21:08:14 people are retarded i guess Mar 02 21:08:22 jvrodrigues: those are not exclusive. Mar 02 21:08:25 you can have both. Mar 02 21:08:35 not the average person Mar 02 21:08:49 for example, as long as the client app is trustworthy – for example, because it’s open source, AND it uses end-to-end crypto Mar 02 21:08:57 yes Mar 02 21:08:59 see: third-party clients for MEGA.co.nz. Mar 02 21:09:05 go explain that to my 50 yo mom Mar 02 21:09:09 or my 40 yo boss Mar 02 21:09:10 I just use one really secure password for all my things, duh Mar 02 21:09:19 go explain on how to check if it has end-to-end encryption Mar 02 21:09:26 p_l did you read today Eric Schmidt is going to be working with the pentagon ? Mar 02 21:09:41 jvrodrigues: you don’t go check, you trust others you know. Mar 02 21:09:43 we developers can have an illusion of privacy Mar 02 21:09:46 concept of web-of-trust. Mar 02 21:09:57 others shouldnt Mar 02 21:09:59 I trust X, X read source of App A => I trust App A. Mar 02 21:10:43 Is this supposed to look like this? can't call int com.xxx.vspplayer.decoder.DecoderBase.readCallback(byte[], int, int) on instance of java.lang.Class Mar 02 21:10:56 Shouldn't it be: can't call int com.xxx.vspplayer.decoder.DecoderBase.readCallback(byte[], int, int) on instance of com.xxx.vspplayer.decoder.DecoderBase Mar 02 21:11:15 explodes: is the method static? Mar 02 21:11:21 ^ Mar 02 21:11:28 nope Mar 02 21:11:39 Oh Mar 02 21:11:45 I get it - thanks Mar 02 21:11:46 :D Mar 02 21:11:56 quick rx question: why does Observable.from() not except arrays of a primitive type? Mar 02 21:12:33 accept* Mar 02 21:12:41 orbyt_: use Observable.from(Arrays.asList({1,2,3})) ? Mar 02 21:12:56 * OverCoder punches himself Mar 02 21:13:03 Yes I could but im just wondering why it cant accept primitive types Mar 02 21:13:44 well, why should it add support for something that’s very rarely used anyway and which can be just as easily accomplished with 13 more characters? Mar 02 21:14:41 orbyt_, because an Array is not a Collection Mar 02 21:15:41 that, btw, is an argument for adding features to an existing type via default implementations on interfaces. Mar 02 21:15:45 it# Mar 02 21:16:02 it has nothing to do with primitive types Mar 02 21:16:14 it’d be neat to be able to write an interface, add default methods, and say "add those to Array, int, etc" Mar 02 21:16:23 pfn: Right, an array is not an Iterable. Mar 02 21:16:31 I just upgraded from windows 7 to win10, and re-installed Android Studio. However, I copied my entire C:\Users\joakimk\AndroidStudioProjects dir from the old OS to the new one. When I opened a project, I got an error "failed to find target with hash string 'android-21'". So I went to the SDK Manager and installed API 21, 22 and 23. Now my app compiles, but when I try to install/run it on my phone (Sony Z5) I get INSTALL_FAILED_U Mar 02 21:16:31 well, being unable to use generics with primitives us a thing, but not the issue Mar 02 21:16:32 AS 2.0 beta 5 is freezing, how can I report the bug? Mar 02 21:16:57 joakimk, uninstall your old app Mar 02 21:18:25 OverCoder: can you reproduce it? do you have steps to reproduce it? do you have a stacktrace? Mar 02 21:18:28 if not then I wouldnt bother Mar 02 21:18:43 pfn: yeah, that's what AS is asking me to do... But, it also warns about data loss. Now, my app reads the images on the device, and stores some data in the MediaStore. So there really shouldn't be any data to lose, along with the app itself, right? (Admittedly, hard for you to say, off-hand, but as I say I only read and write the MediaStore and JPEGs on the device) Mar 02 21:18:49 jvrodrigues: even then just don’t bother. Mar 02 21:19:14 justJanne: why? Mar 02 21:19:30 i've always gotten follow ups on my bug reports Mar 02 21:19:50 Well, I didn’t. Mar 02 21:19:59 But I’m waiting, Mar 02 21:20:12 and by the time I have 500 coredumps in my home directory, Mar 02 21:20:15 jvrodrigues, I am quite interesting into tracking the bug, but, basically there are no exact steps to follow to reproduce it, basically it only happens during building the app, sometimes when installing or launching the APK too, but when the building is idle it never happened, note that I have 2 gigs of RAM and around 93% is being used at the moment, I don't think that'd be a reason for that but just in case Mar 02 21:20:17 I’m gonna file all at once. Mar 02 21:20:43 Simply because it just 'freezes' there are no stack traces or anything for that, i just happen to kill the process Mar 02 21:20:52 interested** Mar 02 21:20:56 OverCoder: use jVisualVM to do a trace? Mar 02 21:21:32 justJanne, should I run that before AS freezes? or I can just run it when AS freezes? Mar 02 21:21:57 OverCoder: just run it while it freezes, connect to the JVM, do a profiling Mar 02 21:22:12 Great, will do when it freezes :) Mar 02 21:22:57 (I've also noticed InstantRun not doing anything at all, code isn't being updated, but let's fix the first bug at first) Mar 02 21:28:38 OverCoder, 2g of ram is the reason Mar 02 21:29:58 it's not a bug, you don't have enough ram Mar 02 21:30:51 joakimk, you have no choice Mar 02 21:30:56 joakimk, and you only lose app-data Mar 02 21:31:11 pfn: OK :) But, why is this happening? Mar 02 21:31:12 joakimk, you can also retrieve your old debug.keystore Mar 02 21:31:23 pfn, That's not a reason for crashing, there's too much allowed swap, I expect anything except a freeze Mar 02 21:31:26 joakimk, no idea what the error is, you never said Mar 02 21:31:35 OverCoder, what crash, it's freezing waiting on memory Mar 02 21:31:57 im developing an android app for the first time, and it uses sockets. i come from a huge windows development background. the windows app is the server and the android app is the client. im not sure if im missing something in android sockets or in windows sockets, but when i get a half-open connection due to my phone losing connectivity when i put it in airplane mode, i can still successfully Mar 02 21:31:57 write to that socket on the windows end. thats not suppose to be possible... Mar 02 21:31:57 pfn: well, there shouldn't be any error. I re-installed windows + AS, and re-opened the project. Mar 02 21:31:58 OverCoder, take a stack, file a bug report Mar 02 21:32:05 Yeah but the disk is IDLE, if it was waiting for memory then I'd expect the disk to be swapping data Mar 02 21:32:06 joakimk, you said there's an error Mar 02 21:32:19 pfn, yeah I'll just look at the stack and see Mar 02 21:32:40 maybe, maybe not Mar 02 21:32:43 pfn: only in installing the APK on the device, suddenly. Worked from win7 -- exact same codebase/project and phone Mar 02 21:32:50 joakimk, and WHAT IS THE ERROR Mar 02 21:32:53 hold on Mar 02 21:33:21 update incompatible? you nuked your old debug.keystore Mar 02 21:33:23 restore it Mar 02 21:33:25 pfn: AS just tells me (when I try to run on the phone, right): Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] Mar 02 21:33:33 nothing more Mar 02 21:33:35 it compiles fine Mar 02 21:33:40 I already explained why Mar 02 21:33:42 several times Mar 02 21:34:11 restore your old debug.keystore Mar 02 21:34:15 if you don't have it, uninstall Mar 02 21:35:27 this is kinda gross http://blog.jooq.org/2016/03/01/how-to-support-java-6-8-9-in-a-single-api/ Mar 02 21:36:08 emceelovin: why would you except a hardware cut of the connection to send a tcp reset to your server Mar 02 21:36:13 *expect Mar 02 21:36:24 what is the difference between retrofit2 package and retrofit package? Mar 02 21:36:36 I don't actually know if airplane mode sends RST or not, but I would not be surprised if it didn't Mar 02 21:36:54 well the thing is, writes eventually do fail, but it takes some time Mar 02 21:36:56 it's airplane mode, it should send /nothing/ Mar 02 21:36:59 missingno Mar 02 21:37:03 emceelovin, that's standard IP behavior Mar 02 21:37:12 jvrodrigues: one is version 2 Mar 02 21:37:25 so i take it i should implement a "what was the last thing that i received" on my android app when it reconnects to the server? Mar 02 21:37:45 JakeWharton: they both have the Call method of version 2 and come bundled when importing version 2 from gradle Mar 02 21:37:58 however the Gson converter does not have retrofit2 package only 1 Mar 02 21:38:22 it's possible to have both retrofit and retrofit2 packages? without have both as dependencies? Mar 02 21:38:54 pfn: ah, I think I understand what you're saying. The debug.keystore (and the .android folder) on the old SSD (with windows 7) is what's missing? Mar 02 21:39:00 yes Mar 02 21:39:11 but yeah, actually, I said what to do, not why Mar 02 21:39:14 but whatever :P Mar 02 21:39:23 :) Mar 02 21:39:28 missingno receive will return -1, which results in a half-open, so i wait until the connection comes back, then reconnect to my server. on my servers end, of course it still thinks theres a legit connection, when there isnt, but i have an acknowledgement timer that will disconnect the connection if it doenst receive the acknowledgement, so now i have two connections. the new good one, Mar 02 21:39:28 and the old dirty one. if i send on the old one it still succeeds though Mar 02 21:39:57 well InputStream::read. i call it receive because im new to android. i have a huge windows api background so im use to send/receive Mar 02 21:39:57 jvrodrigues: that isn't true Mar 02 21:40:08 so, uninstalling the app -- letting AS do it's thing here -- will fix this? Give me a new debug.keystore, and "sync it all back up"? Mar 02 21:40:18 joakimk, yes, but not the sync part Mar 02 21:40:26 unless you implemented backup of your app-data Mar 02 21:40:27 jvrodrigues: "com.squareup.retrofit2:converter-gson:2.0.0-beta4" Mar 02 21:40:31 works fine Mar 02 21:40:39 it does? Mar 02 21:40:46 yes Mar 02 21:41:01 I mean, only in the sense that it'll allow me to resume working on my app, and installing it onto my phone. There shouldn't be any app-data to lose, I think. Mar 02 21:41:02 fails to resolve on my end Mar 02 21:41:45 pfn: thanks for clearing this up! Mar 02 21:41:48 ah seems to work now Mar 02 21:41:55 thanks Mar 02 21:42:23 aren't acks part of standard tcp emceelovin Mar 02 21:42:31 why do you need a second connection to ack Mar 02 21:42:43 just tweak the tcp options on your first connection Mar 02 21:43:22 thats another thing i was gonna change, but i wanted to get this issue resolved first, since thats kind of irellevant maybe? unless im wrong Mar 02 21:43:23 oh I guess I misunderstood what the second connection was Mar 02 21:43:29 oh ok Mar 02 21:43:47 well i shouldve said "acks" when its basically a higher level keepalive Mar 02 21:43:59 kinda like IRC and its PONG Mar 02 21:44:14 I think this depends on what your higher level protocol is Mar 02 21:44:34 like, with http, you normally have pretty well defined start and end to a particular conversation over a connection Mar 02 21:44:42 but it looks like you do not have this well defined Mar 02 21:44:48 orbyt_: how can I set the log level on the new retrofit? Mar 02 21:44:53 right, but my main question was, from what i read and heard on various websites, you arent suppose to be able to write to a connection thats broken on the other end Mar 02 21:45:13 and from what youre saying, thats not correct either, so now im lost lol Mar 02 21:45:13 that sounds wrong emceelovin Mar 02 21:45:29 read about the low level details of tcp Mar 02 21:45:32 well there is no start and endpoint Mar 02 21:45:37 i mean there is, but Mar 02 21:45:46 shitty wireless communication will rain on your day Mar 02 21:45:54 =) Mar 02 21:45:58 thats the thing. the nature of my app being ona cell phone, and that i have sprint lol Mar 02 21:46:04 exactly Mar 02 21:46:06 is really exposing the problems of networking development Mar 02 21:46:10 so im experiencing EVERYTHING Mar 02 21:46:13 jvrodrigues: add the HTTP logging interceptor from OkHttp Mar 02 21:46:13 the creators of tcp anticipated this Mar 02 21:46:33 you just need to also anticipate it by understanding tcp Mar 02 21:46:38 i guess all i can think of is that i need to have a "heres a new connection on phone blah, what was the last thing you sent me" strategy Mar 02 21:46:39 right, thanks Mar 02 21:46:48 yeah ill read about tcp at the lower level some more for sure Mar 02 21:46:53 that may be the answer Mar 02 21:46:59 thats all i can think of honestly Mar 02 21:47:04 I don't know your business details, so I assume you know the best solution Mar 02 21:47:20 well all im doing is sending sms for now to my computer. which works fine Mar 02 21:47:34 multiple sms over the same connection? Mar 02 21:47:40 new/deleted contacts, updated contacts etc. call log. blah blah blah. it all works, but im trying to handle the disconnec/half-opens right now Mar 02 21:47:50 multiple sms? Mar 02 21:48:09 disconnecting and everything is fine in terms of a natural graceful disconnect, but these half-opens are what im stuck at Mar 02 21:48:22 i.e. i send the phone a disconnect it sends the server a disconnect Mar 02 21:48:44 have the phone send over the last id or timestamp of the message it got Mar 02 21:48:49 when it reconnects Mar 02 21:48:55 then it receives everything since then Mar 02 21:49:38 ill send the server a disconnect, then close the output stream. itll receive 0 and it disconnects fine and dandy. same with the server app. ill send the phone a disconnect, shutdown the input, close the output after i send the last message which is a disconnect, close the socket, and itll return -1 on the android end and quit gracefully Mar 02 21:49:49 right thats what i was thinking. is that a typical response to something like this? Mar 02 21:50:33 sounds like doing that is kind of like how TCP is with its data accountability Mar 02 21:52:04 i can logically understand why my server wouldn get an RST on airplane mode. theres no way to send it other than magic lol. Mar 02 21:52:25 then writes not failing until a certain time later on my server would be the server side timeout values etc i assume Mar 02 21:53:18 i appreciate the help though Mar 02 21:55:25 id have to implement this bothways too of course Mar 02 21:59:56 could someone point me in the right direction for using JSON post, alot of tutorial use HTTPPOST but I don’t think its used anymore Mar 02 22:01:20 retrofit? Mar 02 22:02:43 thanks Ashiren, i’ll have a look, was looking into volley but will check this aswell Mar 02 22:07:25 JakeWharton: Can I plant a Debug tree in release? Or since it's a DebugTree will it just remove itself? Mar 02 22:08:10 Suggestions on the best way to integrate the errorprone checker into a gradle build? any success stories/pointers to code would be perfect. Mar 02 22:26:02 Hi! Mar 02 22:28:09 I'd want to make library in Android Studio that will use JNI to call an existing C library. I had to update to some "experimental" gradle plugin with gradle 2.10 and android plugin 2.0.0-beta5. I don't know what I'm doing and I get: Gradle sync failed: Project does not have any prebuilt library repositories. Mar 02 22:28:26 What should I do? Why do they use gradle and not makefiles with simple rules? Mar 02 22:29:50 you don't have to Mar 02 22:29:56 just use the standard ndk-build Mar 02 22:30:00 How? Mar 02 22:30:03 no one really uses the experimental gradle plugin Mar 02 22:30:05 except for suckers Mar 02 22:30:08 google for android.mk ndk Mar 02 22:31:14 Ok, but then How do I integrate it in Android Studio? Mar 02 22:32:14 you add ndk-build as a build-step in your build.gradle Mar 02 22:32:16 that's all Mar 02 22:32:21 ok Mar 02 22:32:35 I'll try; I'll be back… Mar 02 22:36:24 so i managed to implement google login using debug by grabbing the sha1 of the debug keystore and putting it in my project on the development console and that works great. now i want to do the same thing for my release build which use its own keystore and it doesn't work Mar 02 22:36:30 anything i might have overlooked? Mar 02 22:36:37 google returns INVALID_AUDIENCE Mar 02 22:38:22 When I update the data populating the spinner, it gets updated, but the name for the selected one isn't Mar 02 23:00:28 eghdk: nothing prevents you Mar 02 23:00:55 eghdk: the way it works is pretty expensive Mar 02 23:06:33 check jni is automatically enabled for tests, right? Mar 02 23:06:45 It'd be ridiculous if it wasn't Mar 02 23:07:48 I use the gradle experimental plugin Mar 02 23:07:51 works great for us Mar 02 23:13:32 can two components inject different fields in one class with dagger 2? Mar 02 23:13:47 no Mar 02 23:14:21 :( So how do I provide different fields from different components to that class? good ol' assignment? Mar 02 23:14:36 JakeWharton: Well I didn't want my Logs to get out there, but I want them when my app is in alpha, so I wasn't sure if this statement `if (BuildConfig.DEBUG || BuildConfig.FLAVOR.equals("alpha")) ` would be fine. Mar 02 23:14:45 ugh, apidoc for vectordrawablecompat isn't in ref doc yet :( Mar 02 23:14:58 Afzal: use a nested class Mar 02 23:15:10 eghdk: yep. that's fine Mar 02 23:15:19 JakeWharton I'll look into that later. Thanks! Mar 02 23:15:35 pfn none of the stuff in 23.2 is Mar 02 23:16:28 JakeWharton: Thanks for confirming. Mar 02 23:36:22 hi folks. I'm new to android application development. I'm having difficulty figuring out how a bound service built using the Messenger pattern differs from an IntentService Mar 02 23:36:37 it seems like you basically get the same thing, only in the former case you pass Messages and in the latter case you pass Intents Mar 02 23:37:18 when would you prefer to use a bound service? What are they typically used for? Mar 02 23:38:45 ugh, there's so much mental burden with using vectordrawablecompat Mar 02 23:39:11 you /must/ only use VectorDrawableCompat on files that are actually vector drawables Mar 02 23:40:41 so you can't just have a generic method that processes all drawables, but you have to be aware of the fact that a resource is a vector drawable and then handle it Mar 02 23:41:17 maybe with srcCompat handles it better Mar 02 23:42:13 Also... if you create a service whose binder just returns a reference to the service itself..... how is that different from just having a singleton class? What advantages does that offer? It seems there's a pretty significant disadvantage which is that you have to account for the fact that the binding will happen asynchronously. Mar 02 23:58:31 i just got an automated crash ticket with absolutely no info in it. Mar 02 23:58:50 It’s a BadTokenException, but there is absolutely none of my app’s code in it Mar 03 00:11:44 hi, here is my code http://pastebin.com/XipH6B0A i am trying make live audo stream to my server(web - php) this class i use to add the record into queue then send to server from queue. what i do wrong? Mar 03 00:15:33 you’re going go have to tell us what’s happening first Mar 03 00:16:58 thirst i create instance of that class then it trigger the tread to record. after that i run new asynctast that sends from the queue created in the class. Mar 03 00:17:23 and what’s the problem Mar 03 00:17:39 the audio isnt playable Mar 03 00:17:48 how so? Mar 03 00:18:13 maybe something wrong in my class? Mar 03 00:18:45 no, i mean, what’s the issue with the audio? what happens when you try to play it? Mar 03 00:19:06 to be honest, just dumping a listing of code and saying “problem?” is kinda rude Mar 03 00:19:50 s73v3r i am sorry, didnt mean to be rude. it just most of the time people ask for code Mar 03 00:20:07 right, but we also expect a minimum of troubleshooting and investigation Mar 03 00:20:45 i am using Audacity because i didnt reconstruct the file header Mar 03 00:21:10 and still it says "did not recognize the file type..." Mar 03 00:21:16 so maybe you should be reconstructing the file header Mar 03 00:21:33 what kind of audio file are you saving it as? Mar 03 00:21:42 3gp Mar 03 00:21:52 You don't mention any exceptions and seem to have some data, so presumably it's not actually a problem, but the taking the *minimum* buffer size (from getMinBufferSize) and dividing it by two shouldn't work at all, according the documentation. Mar 03 00:22:39 why not? it conver size in byte, i use short Mar 03 00:22:50 *return size for byte array Mar 03 00:22:57 The AudioRecord constructor also takes size in bytes. Mar 03 00:23:07 why are you using short? Mar 03 00:24:05 someone told me here because its AudioFormat.ENCODING_PCM_16BIT Mar 03 00:24:21 The last parameter is called "bufferSizeInBytes", and documented as: "the total size (in bytes) of the buffer -- Using values smaller than getMinBufferSize() will result in an initialization failure." Mar 03 00:25:55 well it return the size in bytes right? if i stroe it in short it should take half space. am i wrong ? Mar 03 00:26:14 but that method is counting that number as being bytes Mar 03 00:26:31 when a service is started (via startService()) from a BroadcastReceiver listening for android.intent.action.BOOT_COMPLETED, what process does it run in, assuming it's not specifically configured to run in a separate process in the manifest file? Mar 03 00:26:54 and no, it shouldn’t take half the space Mar 03 00:27:15 ie, when it's launched as a result of a broadcast from outside the application main process, before the main activity has been launched Mar 03 00:28:17 pipegeek, there is no advantage to using a service in that manner, accessing the binder as a singleton instance Mar 03 00:28:44 pfn: thanks. the android docs seem to suggest that that's the most common way to use a service, though. Mar 03 00:28:57 pfn: ie, binding locally, and having the binder return a reference Mar 03 00:29:11 pfn: why would people do that if there were no advantage? Mar 03 00:29:31 pipegeek, because people feel good keeping it "contained within a service" Mar 03 00:30:24 pipegeek, makes the migration path to a remote service a tiny bit easier Mar 03 00:30:44 yeah. I suppose that makes sense. I guess my next question would be---if I want to access some functionality that's "contained within a service" from an IntentService, what's the Right Way to accomplish that? Since bindService is asynchronous there's no guarantee that onServiceConnected() will be called before onHandleIntent(), and by the time it *is* called the service may have been destroyed Mar 03 00:31:15 (since it's no longer handling an intent) Mar 03 00:31:33 well i am using byte array now, and i dont divide by 2. and if i change the name to .mp3 i can play it but all i hear is static noises. Mar 03 00:31:48 pipegeek, yeah, don't Mar 03 00:32:28 you can try using a short array again, but make sure that the thing you’re passing the size into is using the correct unit Mar 03 00:32:38 if it’s asking for size in bytes, give it the size in bytes Mar 03 00:32:39 pipegeek, communicate via intents Mar 03 00:33:38 it wad correct unit, anyway its something else because it seems much different in some editor then records that works for me Mar 03 00:35:50 pfn: when is it useful to bind to a service? Like.... it seems like the advantage to binding to a service is that you can call methods on it synchronously. But if you bind to a service from an Activity, you probably don't want to be doing anything that blocks, so having the ability to call synchronous methods on the service seems not very useful. If you bind to a service from another service, however, the service lifecycle may result in your service goi Mar 03 00:36:16 pipegeek, IPC Mar 03 00:36:18 pfn: I have a feeling I'm conceiving of this whole thing wrong, and I'm feeling p. dumb :P Like... what's the typical use case for a bound service? Mar 03 00:36:20 aaaaaaaaaaaaah. Mar 03 00:36:24 gooooooooot it. Mar 03 00:37:02 pfn: and what are people doing who are binding to local services? Are they typically binding from a controller and calling methods from there that must return quickly? Mar 03 00:37:11 excuse me >_< from an Activity, not a controller Mar 03 00:37:32 pfn: thank you for all your help, by the way. I really appreciate it. This is all making more sense Mar 03 00:39:37 seems i get nowhere. thanks for trying to help:) Mar 03 00:40:50 pfn: like... when would it be useful to bind to a local service? It seems like the only contexts you could do that from you either don't want to block (Activity) or you can't rely on being able to bind (Service) Mar 03 00:41:23 never Mar 03 00:41:51 haha okay. So "wrapping things up in a service" Just Because is actually a bad pattern Mar 03 00:43:26 how does a webapp hold up against a native app? Mar 03 00:44:07 they don’t compare Mar 03 00:44:20 I know native apps would always be better, but what are good examples of app that would be good using the web app functionality? Mar 03 00:44:48 maybe data entry apps Mar 03 00:47:31 ok Mar 03 00:47:41 next question... Mar 03 00:48:32 pipegeek some tips from chet https://medium.com/google-developers/developing-for-android-vii-the-rules-framework-concerns-d0210e52eee3 Mar 03 00:48:43 see * Service Mar 03 00:48:49 what are the best practices for server technology for network apps? Mar 03 00:48:52 thank you g00s and pfn :) Mar 03 00:49:02 e.g. chat apps, multiplayer games, etc Mar 03 00:49:08 sector_0: that’s kinda outside of the scope of this channel Mar 03 00:49:22 g00s this is awesome. thank you. Mar 03 00:49:32 s73v3r, oh ok Mar 03 00:50:05 I was assuming google had a similar API to the game center on Apple Mar 03 00:50:14 they do. Mar 03 00:50:34 Google Play Games Mar 03 00:50:44 sector_0 some stuff sector_0 https://developers.google.com/games/services/ Mar 03 00:51:01 leaderboard, etc Mar 03 01:16:01 3 days in a row I've had to do work past 7pm Mar 03 01:16:25 Is this good or bad Mar 03 01:16:35 bad Mar 03 01:16:47 Why you gotta work late? Mar 03 01:16:54 I was at a 7:45 AM meeting Mar 03 01:16:55 don't do it Mar 03 01:17:55 Overtime though Mar 03 01:18:10 nope Mar 03 01:18:16 Why? Mar 03 01:18:29 salaried software developers don't get paid overtime Mar 03 01:18:31 expempt salaried employee Mar 03 01:18:38 Agh Mar 03 01:18:42 you can get overtime if youre nonexmpt Mar 03 01:18:42 Are you an android developer? Mar 03 01:18:49 How do you become non-exempt Mar 03 01:19:03 you don't decide hah. The company does when they hire you Mar 03 01:19:15 Are you an android dev Mar 03 01:19:39 yeah Mar 03 01:19:45 You like Mar 03 01:19:46 ? Mar 03 01:20:14 sometimes, when I'm not being rushed this bad Mar 03 01:20:29 Are you in USA? Mar 03 01:20:50 yeah. I think I'm looking for a new job, but I would like to continue working on android Mar 03 01:20:58 I'm still getting the hang of it Mar 03 01:21:07 You are a new Android dev? Mar 03 01:21:14 What did you work on before Android Mar 03 01:21:27 been doing this 5 months Mar 03 01:21:36 I was a student before this Mar 03 01:21:49 CS Major? Mar 03 01:22:14 math actually. I did take some CS classes too though Mar 03 01:22:33 Did you have a software dev background? Mar 03 01:22:33 programming was/is a hobby Mar 03 01:22:37 Oh ok Mar 03 01:22:48 Was wondering how you got an Android dev position w/ a math degree Mar 03 01:23:11 a great many software engineers don't start with a CS degree Mar 03 01:23:15 yeah I had a (crappy) android app I made Mar 03 01:23:25 and some other programs on my github Mar 03 01:23:26 On the Play Store? Mar 03 01:23:31 * pfn knows plenty of physics, electrical, math, and english degrees that end up doing software Mar 03 01:23:31 The app Mar 03 01:23:36 no, not in the play store. That looks way better Mar 03 01:23:50 It looks way better with something in the play store? Mar 03 01:24:03 trying to get a rewritten version of that app in the Play store to aid my job search Mar 03 01:24:19 where in appcompat does it handle the srcCompat attribute Mar 03 01:24:21 drose379: I'd say so. It especially helps if you have lots of downloads Mar 03 01:24:31 RustyShackleford, do you use math a lot at your job? Mar 03 01:25:06 not at all Mar 03 01:25:13 I forgot most of the math I know already Mar 03 01:25:28 is there a decent writeup for hashing and salting a pass in java (for a android app pass gen -- a young dev with very little knowledge is asking and I seem to be getting too low level for him) Mar 03 01:25:37 Hm, I hate my math classes, but I love software dev Mar 03 01:25:45 I was wondering if that was gonna be an issue down the line Mar 03 01:25:50 I was a CS major who switched to math Mar 03 01:25:59 except for doing graphics, you don't do a whole lot of typical math in development Mar 03 01:26:36 RustyShackleford, why did you switch to math? Mar 03 01:27:09 hmm, I don't think the sources.jar in appcompat 23.2.0 is actually for 23.2.0 Mar 03 01:27:11 teachers were better and I liked it Mar 03 01:27:54 So you enjoy math RustyShackleford Mar 03 01:28:42 programming and math proofs are similar in a way Mar 03 01:28:50 How? Mar 03 01:29:46 breaking logic into reusable pieces, working slowly and carefully Mar 03 01:30:07 Yeah I can see that Mar 03 01:31:44 hmm, AppCompatDrawableManager should be a part of support-vector-drawable Mar 03 02:30:29 dang, am I stupid or could Dagger have so much more functionality that it currently doesn't? Mar 03 02:30:49 (2) Mar 03 02:33:37 Afzal: example? Mar 03 02:34:39 multiple of the same type of components, workaround, just use an arraylist of the dependency instances of course. Mar 03 02:34:47 optional dependencies Mar 03 02:35:26 There are set and map bindings for providing multiple things. Mar 03 02:35:29 whoa Mar 03 02:35:48 Optional dependencies sounds like a graph composition failure. You could also just use Optional in the graph. Mar 03 02:36:01 right I thought there was an annotation for that Mar 03 02:36:19 Guice has optional bindings but it was something we didn't carry over. Mar 03 02:36:34 It's more like delayed injection of the field for when that dependency becomes available Mar 03 02:37:17 I'll check it out, thanks again JakeWharton Mar 03 02:47:22 how do you handle passing arguments to fragments? Mar 03 02:47:46 My ArrivalsFragment will need a few arguments like stopId and routeId Mar 03 02:54:04 RustyShackleford you don't like to read documentation :( Mar 03 02:54:15 http://developer.android.com/guide/components/fragments.html Mar 03 02:54:17 lol ^ Mar 03 02:54:25 http://developer.android.com/reference/android/app/Fragment.html Mar 03 02:59:12 anyone know of any good free game engines I can use with android? Mar 03 02:59:26 sector_0 have you googled, there are a few Mar 03 02:59:36 I'm currently considering cocos2dx, but that seems rather difficult to setup **** ENDING LOGGING AT Thu Mar 03 02:59:58 2016