**** BEGIN LOGGING AT Mon Feb 13 03:00:02 2017 Feb 13 04:39:18 hey guys, does anybody know if its possible to change the bottom navigation view's typeface? Feb 13 04:52:31 Hey guys, I have an ImageView whose height is dynamic (wrap_content, adjustViewBounds set to true) Feb 13 04:52:43 whenever I animate the parent view such that its height grows (expands) Feb 13 04:52:49 the size of the imageview doesn't change. Feb 13 04:53:37 any way I can get around this? I guess it's a bit hard as it's probably rendering an already scaled version of the image Feb 13 05:47:24 Hi! Can someone help me and explan the in-app billing library here? https://developer.android.com/google/play/billing/billing_integrate.html#billing-requests Feb 13 05:47:37 explain *** Feb 13 06:03:40 My view can have a variable(large) number of buttons, right now it is added dynamically which causes a LOT of slowdown because of the ton of inflates needed. Is there a better way to do this? Feb 13 06:16:53 anyone familiar with generics? I'm having trouble adding a generic type to a list Feb 13 06:18:05 hm? Feb 13 06:18:11 https://gist.github.com/JelloRanger/6566f2874f24dc017ba6f94fd914a080 - Line 87 is where it's throwing the error add(T) in List cannot be applied to (java.lang.Object) Feb 13 06:19:35 either cast the getItem(i) or use ArrayAdapter Feb 13 06:19:59 ooo the did the trick :) thanks Feb 13 06:25:53 hm, do you know why I'm getting a "this cannot be referenced from a static context" on the T generics in the interface? Feb 13 06:27:11 derp nvm, the answer is anohter on the interface declaration:P Feb 13 06:27:39 are you using this in static method Feb 13 06:27:45 the this Feb 13 06:27:53 no, but I think inner interfaces are considered static for some reason Feb 13 06:28:23 adding the seemed to do the trick though, although I don't really understand why Feb 13 06:48:58 * raoul11 thepooshes thepoosh Feb 13 06:52:52 SHALOM! Feb 13 06:54:24 score? Feb 13 06:55:44 anyone using opencv? Feb 13 06:56:48 raoul11: 2-2 Feb 13 06:56:56 k Feb 13 07:01:20 what's the news by you? Feb 13 07:01:38 still implementing according to the iOS design with MVP? Feb 13 07:01:40 thepoosh u guys use google login on ios? Feb 13 07:01:43 or was it MVVM Feb 13 07:01:55 i dragged him off of it Feb 13 07:01:56 not yet, it's on the roadmap (using Firebase Auth) Feb 13 07:02:06 mvc shitstorm Feb 13 07:02:14 kek Feb 13 07:02:27 our ios dude is having issues with tokenId on ios Feb 13 07:02:31 and silentlogin Feb 13 07:02:53 via the google SDK? Feb 13 07:03:05 works fine for me on Android Feb 13 07:03:15 had some issue with the signatures for OAuth Feb 13 07:03:24 works fine for me as well on android Feb 13 07:03:25 but i figured it out and fixed Feb 13 07:03:35 tell him to look into that Feb 13 07:03:40 on ios it generates a basic auth, without the necesary scopes Feb 13 07:03:42 that is usually the issue Feb 13 07:03:50 weird Feb 13 07:04:16 the first login provides the proper auth response, with the required scores. silentlogin doesnt Feb 13 07:04:34 i need to implement fb login today, nd am so not feeling like i want to Feb 13 07:04:38 but i mustto Feb 13 07:05:04 raoul11: https://github.com/firebase/FirebaseUI-iOS Feb 13 07:05:13 it's easy, I'll send you a snippet Feb 13 07:05:35 is it possible to get each bottom navigation view menu items' textview and change its typeface? Feb 13 07:06:08 yes Feb 13 07:07:14 raoul11: https://gist.github.com/yishai-glide/65bd36b7abe600b155c02b1c0a23c41c Feb 13 07:07:34 wrote this a week and a half ago Feb 13 07:07:43 to have a single manager for this Feb 13 07:07:59 damn son Feb 13 07:08:19 im wondering if such a helper can work with google sign in Feb 13 07:08:30 since its so entangled with activity Feb 13 07:08:32 well, yes and no Feb 13 07:08:39 this is as well Feb 13 07:08:50 but I managed to do the method callback Feb 13 07:08:54 i see the connect method Feb 13 07:09:00 might have not reqired it well Feb 13 07:09:22 but this works nicely for us Feb 13 07:09:46 the origianl solution was not good enough, had a base activity Feb 13 07:09:52 lol yes Feb 13 07:10:01 thats what i currently have Feb 13 07:10:19 hows the activity side looks? instantiate manager, listen for callbacks? Feb 13 07:10:33 just a sec Feb 13 07:10:38 editing the snippet Feb 13 07:12:30 think i might use this snippet on google sign in as well Feb 13 07:12:35 i see u take care of most stuff Feb 13 07:14:16 raoul11: refresh the snippet Feb 13 07:15:00 cool stuff thepoosh thanks Feb 13 07:15:04 gonna rip onit yes? Feb 13 07:15:36 ? Feb 13 07:15:40 it's yours Feb 13 07:15:44 <3 Feb 13 07:16:11 I keep trying to build a project in android studio and I get this error telling me to select the android sdk. I checked to see if the correct path is selected for the SDK and it is. Anyone experience this issue or know how to fix it? Feb 13 07:16:33 amazoniantoad: what happens when you go into the project settings? Feb 13 07:16:39 do you see the path to the Android SDK? Feb 13 07:16:47 yes Feb 13 07:17:12 do you have the targetSdk installed? Feb 13 07:17:18 yes Feb 13 07:17:23 wait Feb 13 07:17:27 I was in project structure Feb 13 07:17:52 went to settings, yes the sdk is installed Feb 13 07:18:31 do you have the API you're targeting? Feb 13 07:18:54 yes. Feb 13 07:26:11 amazoniantoad: can you build from terminal? Feb 13 07:26:37 let me test Feb 13 07:28:52 thepoosh, it builds within the project. Feb 13 07:28:59 It's when I click run that I get a problem Feb 13 08:28:42 hey Feb 13 08:29:10 anyone here knows some stuff about kernels? Feb 13 08:31:17 sounds like ROM stuff Feb 13 08:31:28 more suitable for #android-root Feb 13 08:37:25 can someone help me to why when launching my app that uses certain exchange rates from this specific url it throws this error in my app debug menu ? W/ExchangeRatesProvider: Error 'No route to http://crownpay.infernopool.com; no connection specs' when fetching exchange rates from http://crownpay.infernopool.com/to-crypto/USD Feb 13 08:37:50 When is onViewCreated for a fragment called? When should i do stuff in it over onResume? Feb 13 08:37:59 Ashiren: thanks Feb 13 08:42:50 and I just got a message from someone working at a rate provider asking if I'm interested in a chat about possible work :D Feb 13 08:48:43 because i've been sitting here for the past hour going why is this error showing Feb 13 08:48:49 when browsing to the url directly loads fine xD Feb 13 08:49:48 do you use proxy Feb 13 08:50:08 check auth or cookies Feb 13 08:58:04 im using emulators instead of physical devices but that shouldn't make a difference should it ? Feb 13 08:58:43 no, but your browser may be sending headers that you dont know about Feb 13 08:59:22 i think i've set it up the same way https://ticker.coinomi.net/simple/to-crypto/USD is just without https:// Feb 13 09:00:24 there will be more info on the ticker one but its all json as far as i know Feb 13 09:01:08 hypermist: what are you using to access the data? Feb 13 09:02:01 http://pastebin.com/brRLSU7h this is the piece thats starting the url part Feb 13 09:02:55 from what i can see :D Feb 13 09:03:05 right, and that's totally not the answer to the question... Feb 13 09:03:09 intercept the actual url thats being parsed Feb 13 09:03:11 and check it Feb 13 09:03:52 in the code you have written in the app you are writing with your own code... what library or calls are you using? Feb 13 09:04:17 Its not my own code. its the same code from lastnight that i was talking about but just a different section :D Feb 13 09:04:50 which is why I phrased it like that, of course... Feb 13 09:05:13 That you probably were but im a bit stupid :( Feb 13 09:06:50 this would be a good opportunity for you to get more familiar with 'your' code Feb 13 09:08:29 that error sounded like it might come from something like retrofit... Feb 13 09:09:14 okhttp Feb 13 09:09:30 thepoosh: this guy making the real demands http://i.imgur.com/twjLmKJ.jpg Feb 13 09:09:49 https://android.googlesource.com/platform/external/okhttp/+/a2cab72/okhttp/src/main/java/com/squareup/okhttp/internal/http/RouteSelector.java Feb 13 09:10:12 looking at the coinomi one compared to my one it is different in a way i think Leeds Feb 13 09:11:43 soup guise Feb 13 09:19:04 I'm trying to give the user a choice of several playstore apps using a the same chooser you use for things like sharing a link (where you get a list of apps that you could use, e.g. facebook messenger, sms, email, skype...). This is working, except that I can not set Icons for that. Feb 13 09:19:33 I'm trying to get one of the NDK activity samples to build.. gradle has now been running for an hour. Feb 13 09:19:40 anyone know how to get past that? Feb 13 09:19:41 Syzygy, can you elaborate? Feb 13 09:19:48 Syzygy, also pastebin some code? Feb 13 09:20:11 baash05, sorry, never used gradle for native stuff yet.. Feb 13 09:20:25 Zharf, sure, anything specific you want me to elaborate? I'll show you a screenshot and then start pastbining. Feb 13 09:21:13 I've opened up AS and then imported a sample.. Figured it would be easy to get it working.. or that the readme would tell me any steps I'd need to take. Feb 13 09:21:18 Nap. Feb 13 09:21:19 Zharf, this is how it currently looks. https://goo.gl/photos/gviVuWb2jvXAT8TY7 Although I'm pretty sure I can set the correct name without trouble. Feb 13 09:22:27 Nap! Feb 13 09:22:31 * Odaym steals term Feb 13 09:22:47 (nap is a german insult btw) Feb 13 09:22:55 Syzygy, what's the usecase? Feb 13 09:22:59 baash05, sometimes gradle just gets hung up, depending on the size of your project it might just take that long. Feb 13 09:23:40 Right.. its a sample and I'm seeing an hour long gradle Feb 13 09:24:05 Zharf, not entirely sure, it's more of an online thing. Haven't seen it in years since I stopped partaking in german activities. Similar to useless person I guess. Feb 13 09:24:15 baash05, cancel, try again. Feb 13 09:24:30 Yeah.. I've even rebooted. Feb 13 09:24:57 maybe it says somewhere how long it should take? since it doesn't i would asume not that long? Feb 13 09:25:31 mm.. Have you ever built a native-activity Feb 13 09:25:38 app? Feb 13 09:25:59 Syzygy, I would think you'd know the usecases for your own stuff? :) anyway, are you trying to list applications the user hasn't installed yet? link them to the playstore then? Feb 13 09:26:02 no, sorry, just my regular old developer intuition. Feb 13 09:26:19 Zharf, that's exactly what I'm trying to do. Feb 13 09:26:32 Syzygy, ok, can I see some code Feb 13 09:27:14 sure, give me a minute Feb 13 09:28:19 https://gist.github.com/Syzygy2048/0f46b2f2b3eddade04fa21d2f91b834b Feb 13 09:30:20 actually, let me clean that up a bit more Feb 13 09:30:35 baash05, it certanly shouldn't run for an hour. Feb 13 09:31:12 Ha yep.. I rebooted and started over after that.. I've updated to the latest version of AS. and cmake Feb 13 09:31:30 *sigh* I wish turkish people would actually write why they give 1-star reviews -_- Feb 13 09:31:39 baash05, run it in cli with verbose mode Feb 13 09:31:47 How? Feb 13 09:31:49 sometimes AS is stuck with predex. Feb 13 09:31:57 with gradlew yourtask Feb 13 09:32:10 if you don't know, i recommand you read about it online and play with it first Feb 13 09:32:22 Cool. Feb 13 09:33:33 Zharf, I removed unneccesary code and added comments, maybe you want to refresh. Feb 13 09:33:48 there's these strange ads popping up on my Android device lately, and I can't figure out where they are launched from, they appear a couple of times a day at random Feb 13 09:34:06 GooglePlayScraper.WebScrapeException <- oO Feb 13 09:34:10 what is this lol Feb 13 09:34:12 oh, wrong channel Feb 13 09:34:28 adq, https://github.com/jaredrummler/GooglePlayScraper Feb 13 09:34:43 jesus, you will get into trouble Feb 13 09:35:54 Would I? It just accesses the HTML site. And I'm not using it to scrape all of google play, just the 4 or 5 apps that I want to suggest to my users. Feb 13 09:42:17 adq, do you really thing this is an issue? If so why? Feb 13 09:43:02 because gplay explicitly forbid scrapping of site if not allowed by owner, and you're scrapping gplay itself (lol) for 4 app you could easily know the details Feb 13 09:43:07 so i think it's not worth the risk Feb 13 09:43:45 Syzygy, I'm not sure you can actually do that with the stock Intent Chooser... you might have to write your own Feb 13 09:43:55 just make a custom dialog Feb 13 09:43:57 since you can't really pass a bitmap through the intent Feb 13 09:44:05 adq ok, thanks for your input. Feb 13 09:46:16 Zharf, internally, it's just using loadIcon which returns a drawable. But I'm having trouble parceling due to private access :/ Feb 13 09:47:20 the intent chooser uses PackageManager.loadIcon, yes Feb 13 09:47:56 erm, not packagemanager Feb 13 09:48:00 applicationinfo Feb 13 09:48:20 or ... I can't remember where it is Feb 13 09:48:21 aaanyway Feb 13 09:48:23 :p Feb 13 09:48:33 you can't pass that through an intent though Feb 13 09:48:48 Yeah, and I would be more than happy to extend LabledIntent to provide my own drawables, but it won't let me parcel for the reasons I mentioned before. Feb 13 09:50:54 adq, the problem with the 4 app thing is that it's a thing that changes by city the user lives in, so it's 4 here, but 3 completely different apps where you're living. Feb 13 09:51:13 but I understand, I'll try to get the resources from somewhere else. Feb 13 10:00:15 Robolectric anyone? When I run RuntimeEnvironment.application.getResources().getString(R.string.BASEURL_REST_DEV) it crashes with android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f06002d in packages [android, org.robolectric.default]. My class has @RunWith(RobolectricTestRunner.class) and the string does normally exist. Feb 13 10:01:58 Alright still no god damn clue Feb 13 10:01:58 ... Feb 13 10:03:52 Syzygy: Why worry about what google play allows or doesn't inside your app? Feb 13 10:04:23 because of this little thing called ban hammer. Feb 13 10:04:39 they can't ban an app from hitting their site? Feb 13 10:04:58 I would rather not violate their policies. Feb 13 10:07:06 And I'm pretty sure they can ban apps for whatever they want. Feb 13 10:07:43 They can't ban my app... I mean they can not list it on their site, but my app doesn't care about that. Feb 13 10:07:51 works rather well being hosted on amazon.. Feb 13 10:08:25 I get your point though. Feb 13 10:09:02 Is there a way to compile on android app for android? Feb 13 10:09:18 Garit.. yes Feb 13 10:09:28 baash05: looks like he wants to suggest apps on play to the user, so that does not make sense when he is not on play :P Feb 13 10:09:30 check out AIDE. Feb 13 10:10:13 baash05: i did check it,for anything nontrivial it cost money. And IDE isnt important, just the compiler Feb 13 10:10:39 There are several, but none free that I know of. Feb 13 10:11:10 If they can do it though, then there is support for it. Feb 13 10:12:09 yeah, that was my logic too Feb 13 10:13:10 does android have any built-in functionality to support cross-view selections Feb 13 10:13:56 Cross view selection of what? Feb 13 10:14:05 text Feb 13 10:14:29 if I have a list of textviews, is it possible to multi-line select them Feb 13 10:14:41 Like diff? Feb 13 10:14:54 hug? Feb 13 10:15:19 Diff, console program that exist in android, built in Feb 13 10:15:29 allows to view difference in 2 texts Feb 13 10:15:34 right Feb 13 10:15:47 what does it have to do with anything Feb 13 10:15:58 You can launch it from terminal Feb 13 10:16:10 Dunno, what you wanted/ Feb 13 10:16:21 1486980869 [13:14:29] if I have a list of textviews, is it possible to multi-line select them Feb 13 10:16:53 Too broad, if its not diff, explain better Feb 13 10:17:02 You have a list view with many text views in them? Feb 13 10:17:12 What is a textview Feb 13 10:17:14 In each "item" of the text view. Feb 13 10:17:47 baash05, well not exactly a listview, it's a recycleview Feb 13 10:18:23 but the schematics are similar I guess Feb 13 10:18:26 Okay.. and many textviews inside it.. And you want to select the text inside it. Feb 13 10:18:30 yes Feb 13 10:19:00 I know that textview has an is-selectable property but that only lets you select text within the textview Feb 13 10:19:32 so naturally I'd have to implement something myself, the question is, how much of that is supported by android itself and whether you can hook into it Feb 13 10:19:32 Well that's because it's an object and it doesn't know about the other textviews that may or may not exist. Feb 13 10:20:17 I would suspect zero... because object oriented programming. Feb 13 10:20:29 But I think you're going to have a harder time than that.. Feb 13 10:21:03 The text views in question are part of a recycleview, and so as you scroll the visual object may become out of scope. Feb 13 10:21:47 Am I wrong about that... I'm a hobbyist. Feb 13 10:22:04 yeah no, they do get destroyed Feb 13 10:22:22 Yep.. so you can't really maintain selection. Feb 13 10:22:24 obviously the selection has to be managed at a larger scale Feb 13 10:22:46 I find if one says the word obviously it's never the case.. Feb 13 10:22:51 :) Feb 13 10:22:59 it is to me Feb 13 10:24:06 Anyway.. it's the solution is obvious. Feb 13 10:24:14 not really Feb 13 10:24:18 it is to me. Feb 13 10:24:23 snap. :) Feb 13 10:24:26 thepoosh snippet works great, thanks Feb 13 10:24:29 I guess the question is, Feb 13 10:24:56 would I have to render the selection marker myself, implement their dragging etc, or is there stuff to assist with that Feb 13 10:25:19 like there is for, say, scrolling Feb 13 10:25:22 and flinging Feb 13 10:25:46 raoul11: thanks, great to hear my code works :) Feb 13 10:44:43 Robolectric anyone? How do I get String resources? When I run RuntimeEnvironment.application.getResources().getString(R.string.BASEURL_REST_DEV) it crashes with android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f06002d in packages [android, org.robolectric.default]. My class has @RunWith(RobolectricTestRunner.class) and the string does normally exist. Feb 13 10:57:50 When using viewpager/tablayout, it preloads tab3 when i switch from 1>2 and it preloads 1 when i goto 3>2 butit doesn't preload 2nd tab in any case, how can i force this? Feb 13 11:04:34 I'm trying to create a Span (extending ReplacementSpan) which always has the width of the hosting TextView, calling TextView#getMeasuredWidth() inside the span's getSize() method. It works on an emulated Nexus API 24 but it doesn't work on my actual device (a nexus with API 23). Is there anything that I can do to make this thing work in general? Feb 13 11:05:27 If I can't make this span to work, I'll have to rewrite a brand new text rendering view thus it's important for me. Feb 13 11:08:32 blaah ssl xD Feb 13 11:08:41 Solve one issue gain another XD Feb 13 11:09:18 Is it possible to get a resource Id for a file that was downloaded? E.g. a bitmap. Feb 13 11:15:59 You should be able to access it as a file Feb 13 11:19:06 nukeu666, you mean download, save, and then I got a resource Id for that file? Feb 13 11:19:46 not a resource id, as a File object Feb 13 11:20:05 but I need a resource Id. Feb 13 11:20:28 Syzygy, not possible Feb 13 11:20:34 Then it needs to be packaged in the res folder Feb 13 11:21:31 what's the best ssl cert place to use just for a single domain ? Feb 13 11:21:37 thats accepted by android Feb 13 11:22:43 any chance a placeholder resource file would work? e.g. have a placeholder.png in my drawable folder (R.drawable.placeholder) and be able to replace that file at runtime, basically highjacking it's resource id? Feb 13 11:23:04 don't think so... Feb 13 11:23:09 :( Feb 13 11:23:11 why are you going this route? Feb 13 11:23:35 you pretty much need to write your own intent chooser Feb 13 11:23:48 I guess I'll have to do that :/ Feb 13 11:24:00 why are you stuck with resourceId? Feb 13 11:24:29 LabeledIntent only takes resource ids Feb 13 11:24:29 because I need to use LabledIntents, which only accept resource ids even though they convert them to drawables anyway. Feb 13 11:24:35 what does everyone use as their ssl provider xD? Feb 13 11:24:37 ah Feb 13 11:25:09 I tried extending it, but that leads to parcelable exceptions, and I can't extend parcelable functionality since that's package private. Feb 13 11:25:12 because i found the issue with my ssl why things arent working haha Feb 13 11:25:22 Haven't messed around with reflection yet... and I would rather not. Feb 13 11:48:19 hey guys when i analyze my apk i can see classes from the java standard libs (like String) are there. are these not just provided by the runtime on the device? Feb 13 11:57:40 yay with the hours on continous work with my friend who hates java and apis we go it working Feb 13 11:57:40 xD Feb 13 12:07:13 teasp00n, they are, did you mess up your build scripts somehow? Feb 13 12:09:01 In case anyone wants to take a crack at my problem while I go eat dinner: http://stackoverflow.com/questions/42203635/suggest-several-apps-in-playstore-to-user-similar-to-share-dialog Feb 13 12:13:36 So, you have a dinner and we work for you? Feb 13 12:17:15 Zharf: i dont think so, im looking at a debug build if that makes a difference Feb 13 12:18:33 teasp00n, try using dex-method-counts.jar on the apk? Feb 13 12:19:49 Zharf: ok. just to be clear youre agreeing with me in that the runtime provides all these classes and seeing them in the classes.dex is strange right? Feb 13 12:23:18 teasp00n, it seems strange, but I'm not 100% sure if it's as intended or not Feb 13 12:24:55 Melatonina, a man's gotta eat. Feb 13 12:25:11 :) Feb 13 12:26:24 Zharf: hmm ok well i cant find string in the output of dex-method-counts Feb 13 12:26:25 teasp00n, I can see some java.lang stuff in dex-method-counts but not when I decompile the thing Feb 13 12:26:58 im seeing java.lang stuff too Feb 13 12:27:59 Zharf: you mean with apktool or something like that? Feb 13 12:28:21 I used jadx to decompile Feb 13 12:28:39 ok Feb 13 12:32:26 actually if i use --include-classes flag i get all the classes, not just pacakges. string is there Feb 13 12:32:54 yes String is there too Feb 13 12:33:23 teasp00n, why do you bother, i think it's normal that String class is embedded in the apk Feb 13 12:33:23 adq: if things like string are packaged into the classes.dex then what is the runtime giving us? Feb 13 12:33:46 oh im writing a post, so the understanding is academic Feb 13 12:33:57 what do you mean the runtime? like what the platform code provides? Feb 13 12:33:59 i dont actually care that theyre there, just dont want to misinform people Feb 13 12:34:05 yeah Feb 13 12:34:16 so weve moved to openjdk from apache harmony right? Feb 13 12:34:17 what available in the plaftom is huggeee Feb 13 12:34:20 i would not know where to start Feb 13 12:34:59 are you worried because if String is available in the platform, it would be useless to also embed it in the apk? Feb 13 12:35:31 well, worried might not be the exact workd but you get the idea Feb 13 12:35:37 essentially yeah, i had assumed it would be compiled against but the classpath on the device would provide it Feb 13 12:35:50 man it's full of duplicate and useless stuff Feb 13 12:36:15 would be interesting/interested to have stats about all those "noise" Feb 13 12:36:26 how much things present are totally useless and not trimmed down Feb 13 12:36:30 how many* Feb 13 12:37:07 i remember the old days where the tiniest apk was embedding so many things and resources not used in the app Feb 13 12:37:22 yeah, seems crazy that every app would contain redundant classes like that, assuming they are actually redundant Feb 13 12:37:24 i think they provide by default a set of class and you cannot get rid of it, even with proguard or other tools Feb 13 12:37:47 the runtime doesn't let you override them though, pretty sure Feb 13 12:38:04 i just recall, there is a lot of android.R.* totally unused Feb 13 12:38:07 but maybe dex is a stupid format that doesn't work if you don't have them there Feb 13 12:38:08 although actually if i understand how classloaders work (i really dont lol) it wont load a class for a given pacakge + name combo that it has previously loaded Feb 13 12:38:11 but it was like back in 2011 when i saw this study Feb 13 12:38:33 the 64k limit with dex.. is.. Feb 13 12:38:39 the 70s called Feb 13 12:38:43 they want their limit back Feb 13 12:38:46 :) Feb 13 12:38:57 so if it has loaded java.lang.String already you would never actually load the one packaged in your apk Feb 13 12:39:10 and due to the fact many are using official support lib and already take more than half of 64k...; Feb 13 12:39:15 it's even less understandable Feb 13 12:39:41 i'm no expert in how class are loaded, cannot answer Feb 13 12:40:06 all good, im pretty sure im right about that bit Feb 13 12:40:34 thats how its possible to end up with NoSuchMethod exceptions Feb 13 12:40:58 I have about 4k(+4.5k generated) LOC in my project right now, ~2.1k methods from my own code Feb 13 12:41:04 54k methods in total in the apk Feb 13 12:41:19 22k of it is support library Feb 13 12:42:23 though to be fair, proguarding it does take the total down to around 20k, I think Feb 13 12:47:51 23k for support lib's' here + 11k of external lib + 3k from my code and 1k from java & javax Feb 13 12:47:59 not even proguarded yet Feb 13 12:50:07 jackson is the second biggest dependency I have I think at 9.6k method Feb 13 12:50:07 s Feb 13 12:50:28 rxjava comes next at 5.4 Feb 13 12:56:50 yeah doesnt take much to hit that limit. proguard does a pretty good job of ripping out unused stuff though Feb 13 12:57:35 I've only hit the limit in one project though Feb 13 12:57:41 it has like 120kLOC Feb 13 12:58:01 and a ton of dependencies Feb 13 13:00:34 Do you know a source of information about the Android text rendering system? Feb 13 13:03:56 they use canvas.drawText with paint i think Feb 13 13:04:14 and then it goes to lower layers with font rasterisation & crazy stuff Feb 13 13:04:28 every letter is like a mini bitmap Feb 13 13:04:43 adq: I meant detailed information about the text.style hierarchy Feb 13 13:04:58 ^ https://medium.com/@romainguy/androids-font-renderer-c368bbde87d9#.ynkuk66qi Feb 13 13:05:10 romanguy heavily worked on the ui of android in the early days, FYI Feb 13 13:05:14 romainguy* Feb 13 13:05:42 i don't understand what do you mean by text.style hierarchy Feb 13 13:05:57 like bold, italic?? Feb 13 13:06:02 adq: https://developer.android.com/reference/android/text/style/package-summary.html Feb 13 13:06:26 the whole Span hierarchy Feb 13 13:06:29 urgg, would not touch that with a 10 foot pole except if forced Feb 13 13:06:39 it's very badly documented Feb 13 13:06:49 spannables make me sad Feb 13 13:06:50 well, you can style your span for sure like an individual component Feb 13 13:07:19 but you will suffer a lot from performance if you plan to make like a complex rich text view Feb 13 13:07:53 I need a span that has the size of a whole row, like LineBackgroundSpan but renders itself completely (LineBackgroundSpan only colors the background) Feb 13 13:08:13 I need to make a span that draws a background colour for a specific part of the text... that's easyish but adding padding on the left and right seems really annoying Feb 13 13:08:40 i remember the days when i was including picture inside textview spans, and had to resize on the fly the #@! and to multiple pass Feb 13 13:08:47 and do* Feb 13 13:09:17 I have my own basic rich text view. I need to understand if I have to keep re-writing a rich text layout engine or if I can hack something with Spans Feb 13 13:10:27 Maybe I should contact that romainguy guy Feb 13 13:11:05 why not just read the source code Feb 13 13:11:21 yeah, that's another option too Feb 13 13:11:34 I need to collect some energies before I can do that Feb 13 13:11:47 I'll do it later today or tomorrow Feb 13 13:11:53 "added in api level 1" Feb 13 13:11:56 xD Feb 13 13:12:12 thanks adq and TheSchaf Feb 13 13:13:49 you can try but i bet he won't reply Feb 13 13:15:28 dont distract him from working on the next android :D Feb 13 13:15:38 does he still work on android? Feb 13 13:15:45 I haven't heard anything from him in a couple of years I thin Feb 13 13:15:45 k Feb 13 13:16:04 I also seem to remember him coming here like 5 years ago Feb 13 13:16:10 but not sure about that Feb 13 13:16:34 yep he was here among other places Feb 13 13:16:54 he worked recently on constraintlayout iirc Feb 13 13:17:30 and some animations with chet haase obviously Feb 13 13:18:47 i think he is still with android but i am not sure Feb 13 13:21:13 cannot believe i have to copy some platform code from https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/com/android/internal/policy/PhoneWindow.java to fix a weird issue Feb 13 13:24:53 if I have some UI elements declared in a file and I need to show an overlay later after the rendering is done, how do I make that element (that was declared in the beginning before other elements) show up over them? Feb 13 13:25:46 will adding it to an existing relativelayout that already has elements, work? Feb 13 13:30:06 I think you have to add it to the root element at runtime without having the view it's going to sit in already existing, cause that view is gonna be followed by other views Feb 13 13:30:14 so they're going to appear ontop of it either way Feb 13 13:30:23 yep Feb 13 13:39:04 Odaym, too many ways to achieve that, from a simple view(group) on top of the others to popupwindow via a dialogfragment or activityfragment Feb 13 13:39:18 it's not atop of in that sense Feb 13 13:39:18 there are some external libs doing it too (like some showcase-something) Feb 13 13:39:22 it's literally like a sheet over them Feb 13 13:39:26 think of bottom sheet, but from above Feb 13 13:39:30 it's done now though, thanks Feb 13 13:39:39 yeah i meant above, when i said on top Feb 13 13:39:43 zorder above Feb 13 13:40:38 if i were you, i would not criple the default hierarchy with additional views just for that Feb 13 13:42:04 yea I'm not, I'm adding it to an existing view, but to the root Feb 13 13:51:16 https://hastebin.com/juconaluwe.java Feb 13 13:51:28 lines 7 - 18 have zero effect on the view Feb 13 13:51:43 I can only show it with a fade in, but it never fades out...what's wrong with the code? Feb 13 13:52:20 * Odaym sprinkles some invalidates() Feb 13 13:52:53 god damn command Q Feb 13 13:54:24 ah shit, I am referring to a new instance of the contractsChoiceView every time Feb 13 13:55:40 anyone looking for a partner Feb 13 13:55:47 for releasing android apps Feb 13 14:03:35 how do you mean a partner Feb 13 14:03:40 why dont you do it Feb 13 15:08:22 I'm trying to upload an image from the camera to an ftp server, but it ends up looking like this https://goo.gl/photos/j2rZ8j58Fon31JFk7 Feb 13 15:09:23 This is using apache commons net. The same upload code was working for for google drive. Here are both codes. https://gist.github.com/Syzygy2048/4361d1caef377fe344ab0128943b444f Feb 13 15:10:06 the only difference is that I close the stream and ftp connection in a handler because otherwise the file would not be created at all. Feb 13 15:11:23 any of you guys ever get a virus scanner heuristic complaining about some of your build files? Feb 13 15:11:56 nope mikedg, but on windows i tend to exclude those folders from real-time detection Feb 13 15:13:10 WIndows Defender _really_ slows down the build process Feb 13 15:14:09 Syzygy: Do they _all_ suffer from that same corruption? Feb 13 15:14:31 yes, some more some less, but they're all missing the bottom few rows Feb 13 15:15:16 Syzygy: You're looking at the wrong place. The corruption is happening about halfway down almost at the left edge on your sample image Feb 13 15:16:56 for most it's just the bottom row. I guess the image i uploaded was a particularly bad offender Feb 13 15:17:21 Syzygy: I'm not sure if this will be affecting it or not, but set binary transfer mode Feb 13 15:18:29 Syzygy: The FTP protocol, by RFC, assumes ascii files. You should try sending the 'binary' command to set the thing to binary transfer mode Feb 13 15:18:53 It might not be affecting what you've got running at 127.0.0.1, but it will eventually burn you Feb 13 15:19:31 (it's not actually 127.0.0.1) Feb 13 15:19:36 ok, doing that. Feb 13 15:19:40 Okay then it's quite possibly the problem Feb 13 15:20:09 ObWarning about FTP being a nasty plaintext protocol Feb 13 15:21:13 Is there a ftps like https? Feb 13 15:21:35 any recommendation about closing the streams? i find the current solution with the handler ugly and probably bad. Feb 13 15:22:24 thepoosh, iv adapted yer code on google sign in as well Feb 13 15:22:50 looks good Dagmar, seems like it was indeed an issue with the lacking binary mode. Feb 13 15:22:56 thank you. Feb 13 15:23:04 Syzygy: It burns people all the time when they don't know about it Feb 13 15:23:32 It's one of those things that made sense 25 years ago when people were only rarely pushing images through tin cans and string Feb 13 15:24:00 can you suggest something for closing the streams? Feb 13 15:25:37 ah, crap, seems like it didn't actually fix the problem, although it made it better Feb 13 15:25:40 I'm looking as just how asynch outputStream.write is Feb 13 15:26:12 Closing should really happen from a hook that triggers as the upload completes Feb 13 15:27:15 not aware of a way of setting a trigger either. Feb 13 15:27:22 if it were a blocking call, it would be perfect. Feb 13 15:27:31 I am _assuming_ this is asychronous Feb 13 15:28:25 Also you should probably be checking the reply code on all these commands you're issuing to the FTP server Feb 13 15:30:17 it seemed to be asynchronous in ascii mode. when i closed the streams it would not upload, when i set a breakpoint it did. Feb 13 15:30:19 You might be getting burned on the local end over the binary/ascii thing... one moment Feb 13 15:30:31 (like in addition to) Feb 13 15:32:08 Anyone here do any backend RESTful server stuff? Feb 13 15:32:30 some Feb 13 15:32:42 only client side. Feb 13 15:33:21 I did a server for a new service we're about to launch Feb 13 15:33:24 Would a HEAD request that doesn't return a "last-modified" header make sense if there is no associated date for the collection? (Say an inbox of messages) Feb 13 15:33:56 Or would you expect epoch/latest date Feb 13 15:34:54 I would expect it to have the same headers as GET Feb 13 15:35:52 Well they would be the same (not returned). Feb 13 15:36:37 Syzygy: I am not 100% but I think this is the bit you need to see https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html#completePendingCommand() Feb 13 15:37:05 but to be honest, I've never used HEAD for anything Feb 13 15:37:16 Syzygy: FTP is kind of strange and squirrely compared to more modern methods. It uses _two_ TCP sockets to do it's work. One is just to pass commands back and forth, and the other is solely for passing data. Feb 13 15:37:57 Syzygy: Mainly because it was designed by people who were already dealing with EBCDIC and non 8-bit-clean pipes as possibilities, so they didn't try to futz around with muxing commands into the same channel as data Feb 13 15:38:25 Syzygy: Call that function and by the look of it it will block until your file transfer is complete. Feb 13 15:38:44 thanks Feb 13 15:38:46 ...or at least prevent you from messing with a transfer already in progress Feb 13 15:40:41 (I'm currently modifying the code so that the connection remains open until the next call to the code, giving it the maximum time to execute. Feb 13 15:40:50 in this case that kinda makes sense. Feb 13 15:42:04 The reason the calls aren't all blocking is because the command channel is maintained separately Feb 13 15:42:20 You basically _gotta_ do something to wait for the file transfer to complete Feb 13 15:43:09 For what good it'll do you, in theory you _could_ be issuing cd commands while a file transfer happens Feb 13 15:44:40 Or... *cough*cough* sending cd commands that are actually a covert communications channel because IDSes won't notice them as being unusual. Feb 13 15:45:35 Zharf: I think a 204 actually makes more sense in the case I was describing. Feb 13 15:48:55 Dagmar, I think execution freezes on ftpClient.completePendingCommand(); Feb 13 15:49:51 It _should_ unless the file transfer you issued has already completed Feb 13 15:50:30 like, freezes permanently. Feb 13 15:50:50 Hrm Feb 13 15:51:53 (It does upload the picture though) Feb 13 15:53:00 Dude, according to https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html#storeFileStream(java.lang.String) you _have_ to call completePendingCommand Feb 13 15:53:51 So long as you're calling setFileType(FTP.BINARY_FILE_TYPE) before you initiate the transfer this should actually be working Feb 13 15:57:53 i'll pastebin my code again in a second. Feb 13 16:01:08 how can i increase the spacing between radio buttons in a radio group? where the buttons are added via code, not xml Feb 13 16:01:34 KukOrkan, you can set padding/margin in code. Feb 13 16:02:09 to the buttons? Feb 13 16:02:30 sure. to pretty much anything that accepts them in XML as well. http://stackoverflow.com/questions/12728255/in-android-how-do-i-set-margins-in-dp-programmatically Feb 13 16:04:07 thanks, ill take a look Feb 13 16:07:11 hi Feb 13 16:07:56 I have a question about Custom Views. Can someone help me? Feb 13 16:08:59 Depending on what you're doing you may _need_ to set margins in code Feb 13 16:09:36 I keep seeing a squirrely behaviour on Android 4.x where if you take an XML layout and set the background on something in it from within code, it blows away the padding/margins Feb 13 16:10:56 I created a custom view. At start the ondraw method is called and the view is drawed. I used the custom view in XML, but how can I change the Ondraw method in the activity? For example give special parameters. Feb 13 16:11:26 Getters and setters Feb 13 16:12:37 Just understand if you change stuff you'll need to call invalidate() and/or requestLayout() so that the view will actually be redrawn Feb 13 16:12:53 Okay, but if I make a object with setters and getters. The Custom View class has another reference to it than the activity? Feb 13 16:13:06 Do I need to create a inner class? Feb 13 16:13:16 for sharing the same variablse Feb 13 16:13:36 Why would it Feb 13 16:14:06 kevin1012_: you add getters and setters in your custom view Feb 13 16:14:13 Let's say for example you're making a button class, and you've created your XML of the button and it has R.id.button_label Feb 13 16:15:25 In the FancyButton class you're going to have an instance variable that stores the result of view.findViewById(R.id.button_label) which you'll access later from FancyButton.setLabelText(string) Feb 13 16:15:45 I described the view in my xml, how can I call a method in Custom View class, than must I create a new reference, but the new reference has no connection with the view in XML? Feb 13 16:16:07 That your English is lacking isn't helping matters Feb 13 16:17:58 Sorry for my bad English Feb 13 16:18:21 Here, this works (although I still have to go back and clean the cruft out of it) http://pastebin.com/29ZA5UBW Feb 13 16:18:25 I understand. if I call findviewbyId I get a reference to the right object Feb 13 16:18:44 ElementButton is a custom view, which even has custom attributes Feb 13 16:19:33 I sort of rolled up everything into initViews() which may cause cancer later, but, for example at line 55... attackReticuleView = (ImageView) this.findViewById(R.id.attackReticule); Feb 13 16:19:55 attackReticuleView is an instance variable, as declared at lne 19. Feb 13 16:20:16 attackReticuleView is also the right reference to the object Feb 13 16:20:16 It's value will stick around for as long as the specific instance of the custom view does. Feb 13 16:20:21 Yes I understand it Feb 13 16:20:41 Thank you very much for your help and patience Feb 13 16:20:46 So look at lines 76 and 80 Feb 13 16:21:17 I can flip that image on and off there, and if I werei looking to change the text labels the same thing would happen there Feb 13 16:21:43 It gets less confusing after you've done it a few times Feb 13 16:22:25 Everything makes much more sense Feb 13 16:22:35 When the custom view instance is being initialized, you just need to prepare instance values to store the things you'll need to modify later with getters and setters Feb 13 16:23:00 I understand Feb 13 16:23:19 Thank you very much Feb 13 16:23:38 No problem Feb 13 16:23:59 have a nice day Feb 13 16:24:48 Considering that I've got 36 of those on one page of the interface I had to learn about creating custom views or... get comfortable with a crapton of for loops Feb 13 16:25:23 Dagmar, somehow I got it to upload without blocking everything afterwards... but every image is still glitched to some degree. I'll try uploading to google drive again to check if that's an issue there as well. Feb 13 16:25:41 Wow, that will be difficult Feb 13 16:25:58 If you have a copy of hte unmangled JPG, comparing the two might yield something Feb 13 16:26:09 There's the code btw https://gist.github.com/Syzygy2048/cb3e80001c1e9324a961313045b5624f Feb 13 16:26:10 kevin1012_: Well, actually it would be easy but it would also be _ugly_ Feb 13 16:26:33 Again thank you, but i have to go now Feb 13 16:26:38 bye Feb 13 16:28:54 Syzygy: You really do need to make more use of checking the status of hte last command. The way you're changing directories could become much simpler as a result Feb 13 16:30:02 From experience you don't need to read a directory and look for an entry... the entry might not be writeable by you. If you just attempt to cd stright there and if it fails attempt a mkdir (of the whole path both times) before trying again, way simpler Feb 13 16:30:47 it's not very complex as it is. As long as it works, I'm happy while deving. optmizations are for when everything works. Feb 13 16:30:53 You need to set the file type to binary mode AFTER the connect Feb 13 16:31:03 Connecting to a server resets it Feb 13 16:31:24 It's actually sending a command to the FTP server of "binary" (yay inventive commands from the 80's) Feb 13 16:31:34 I think I do that after connect. Feb 13 16:31:42 but before login Feb 13 16:32:02 You're doing it on line 7. Feb 13 16:32:37 but i connect on line 4 Feb 13 16:33:14 Just the same I'm pretty sure it needs to happen after login because FTP servers don't listen to much people have to say until there's a login Feb 13 16:33:35 I moved it down, right before the store command. Feb 13 16:33:46 That should guarantee the server is in the right mode Feb 13 16:34:02 i'm pushing to both drive and ftp right now, so I actually get the same pictures on both Feb 13 16:34:24 Do you have a bizarrely low timeout on the FTP server? Feb 13 16:35:19 It's probably unrelated to your problem but the timeout you're setting controls when a 'NOOP' is sent down the command channel Feb 13 16:35:29 Every 20 seconds seems needlessly wasteful Feb 13 16:36:06 I set those because it seemed like the start of the picture would arrive just fine, but the end was corrupted and or missing Feb 13 16:36:10 (although they shouldn't be corrpting the file unless you have some cheap indonesian knockoff version of the apache FTP library Feb 13 16:36:30 I have a cheap indonesian phone for this task though. Feb 13 16:36:33 Remember, FTP daemons were designed to expect an interactive use Feb 13 16:36:57 It seems like it works now Feb 13 16:36:58 They would just hangup on someone after so many minutes of complete inactivity because sockets were precious and people would pass out on the keyboard late at night Feb 13 16:37:12 (I removed the timeouts btw) Feb 13 16:37:42 Well, I wouldn't remove the data timeout. Connections _can_ sometimes just go dead stick Feb 13 16:37:57 I'd have jacked the keepalive up to five minutes or so Feb 13 16:38:20 Odds are the remote FTP server isn't likely to consider dumping you for inactivity until at least 5-10 minutes have passed Feb 13 16:38:24 the way i coded it for now is to take an image, connect, upload, disconnect. Feb 13 16:38:37 so that really shouldn't be causing issues. Feb 13 16:38:41 Truth Feb 13 16:38:58 and the whole app is designed to do this one a minute anyway Feb 13 16:39:05 *once. Feb 13 16:39:11 (timelapse app) Feb 13 16:40:49 I mentioned diffing the files because a rahter long time ago I watched someone fighting an issue like this while SWEARING he didn't have call waiting or whatevs Feb 13 16:41:18 A diff of the corrupted file compared to the original file revealed "RING\n" repeating in several places Feb 13 16:43:45 they're no longer corrupted. what's "RING\n"? Feb 13 16:44:45 What a hayes-compatible modem would say when you were stupid and didn't disable call-waiting before dialing a BBS Feb 13 16:45:19 We just had to make a few changes to the modem's config to fix it Feb 13 16:47:25 I think I'm not working that closely with the hardware and the only thing FTP related to the library you haven't seen is the async function call where i pass the bytes, but nothing with ftp. Feb 13 16:47:33 I'll try to diff anyway. Feb 13 16:48:33 I have a problem with android studio, everytime I start it up it says gradle project refresh failed Feb 13 16:49:30 adempus, there's an event log at the bottom right of AS, is there some error output that might help you? Feb 13 16:51:39 Syzygy: https://hastebin.com/ajaqexicuw.sql Feb 13 16:51:57 first it told me permission denied for some folder Feb 13 16:52:06 chmodded those folders Feb 13 16:52:10 still gives me an error Feb 13 16:52:13 have you checked the IDE log for more details? Feb 13 16:52:48 i just pasted what the log told me Feb 13 16:52:59 Did you ever mistakenly run AS as root or something? Feb 13 16:53:12 no Feb 13 16:53:47 adempus, the log tells you to check another log. have you checked the other log? Feb 13 16:54:13 You might want to look at specifically what the log is saying, or run a bunch of find commands to ENSURE the files are all at least 640 and the directories are at least 750, and owned by you Feb 13 16:54:33 okay Feb 13 16:54:46 Like, `find . -type f -exec chmod ug+rw` etc etc Feb 13 16:54:56 er ug+rw {} \; Feb 13 16:54:56 I have a field in a fragment that I initialize only once in onCreate, but still I sometimes get NPEs for this field. How is this possible? Feb 13 16:55:27 Lots of ways Feb 13 16:56:17 For instance, if the GC reaps your app, those values will be long gone Feb 13 16:57:40 Hi ;-)# Feb 13 16:57:41 Then I access the field in onResume and the field is null Feb 13 16:58:08 I'm telling you 'there's a fire' and you're telling me 'I can only see smoke, man' Feb 13 16:58:23 Thou Shalt Not Ignore Lifecycle Methods Feb 13 16:58:26 Who's using rxjava 2 for android already? Feb 13 16:58:31 instead of interfaces and observables? Feb 13 16:59:18 and if yes, how's the "performance" compared to interfaces/listener while runtime? Feb 13 16:59:38 I don't understand how the field can be reaped between onCreate and onResume Feb 13 16:59:57 barq: You need to be saving that instance value via onSaveInstanceState Feb 13 17:02:15 OK, so when is onCreate skipped? I can see it in the log Feb 13 17:03:03 but is not called if the fragment instance is retained across Activity re-creation Feb 13 17:03:14 So that must be happening then Feb 13 17:03:52 What if I init the field when it is declared? Feb 13 17:05:13 There's nothing interesting stored in the field, I can just recreate it if null Feb 13 17:05:30 So I don't need onSaveInstanceState Feb 13 17:09:42 so android studio's gradle gives me a different error when I start a new libgdx project Feb 13 17:09:45 it says: Error:/home/adempus/AndroidProjects/Skelly/android/libs/armeabi/libgdx.so (Permission denied) Feb 13 17:17:29 nooo. atof woes back. works fine on my android 5.1.1 test tablet. i published closed beta, downloaded on wifes android 4.4 phone and: crash! in crashes & ANRs i see: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "atof" referenced by "libapp.so"... Feb 13 17:18:43 atof is probably a macro Feb 13 17:18:54 and your compiler failed to resolve it Feb 13 17:19:50 yeah i messed with this issue a lot changing out which sdk tools i was using and what minimum and target platform was etc, just to get it working on my dev device Feb 13 17:19:58 but i guess just because it works on 1 device doesnt mean it will work on others Feb 13 17:20:25 no idea how to conclusively fix Feb 13 17:20:57 im targeting sdk 23 with min sdk 19 and using the 19 tools Feb 13 17:21:29 I imagine getting the newest ndk would resolve this Feb 13 17:22:09 oh maybe i am using tools 23 i forgot Feb 13 17:22:55 hrm in android-toolchain/AndroidVersion.txt says 3.8.256229 Feb 13 17:23:37 i cant quite remember what version i supplied to the command that makes a toolchain directory. it mustve been the target version tho, not the minimum version. Feb 13 17:33:41 Any recommendations if i want to use firebase in a library project? Feb 13 17:35:24 gradle gives me an error in android studio: Error:/home/adempus/AndroidProjects/Skelly/android/libs/armeabi/libgdx.so (Permission denied) Feb 13 17:35:44 why is it telling me permission denied Feb 13 17:35:48 its a public folder Feb 13 17:39:25 fucking permissions Feb 13 17:39:45 project refresh failed wtf Feb 13 17:41:27 i have ios version of same app also in closed beta. ios works really really well. android i havent managed to get working well yet. Feb 13 17:42:15 right now im pretty frightened that i never will Feb 13 17:42:45 its not too ambitious to hope for wide distribution of jni app is it? Feb 13 17:43:59 Do you send your logs back home somehow? Feb 13 17:48:07 particularly error logs. Feb 13 17:48:21 (Not talking about crash management) Feb 13 18:12:16 Hmm... carat doesn't do what I thought it did Feb 13 18:15:47 What does Firebase Crashmanagers Performance > Connection State mean? Feb 13 18:16:02 Is that the internet connection? Feb 13 18:20:51 does it make sense to write into libraries `@Keep` annotations and drop the entire imposing rules on users? Feb 13 18:27:32 raoul11: hi luv Feb 13 18:28:04 Hey, Can someone help me understand something about Dagger Scopes? Many docs and tutorials use the example of @ApplicationScope and @ActivityScope. Feb 13 18:28:08 Application scoped dependencies last the lifetime of the Application, and Activity scoped dependencies only live until the activity dies. That makes sense. Feb 13 18:28:14 Should I be having an individual scope for each activity type: @MainActivityScope, @ProductDetailActivityScope, etc. or just reuse one @ActivityScope on each of the activity types? Feb 13 18:34:27 thepoosh Feb 13 18:34:47 how did the social login code work for you? Feb 13 18:34:54 awesome Feb 13 18:35:00 modified it as well for google login Feb 13 18:35:28 so now i have two fancy helper classes Feb 13 18:35:38 one login fragment to rule them all Feb 13 18:36:17 hi, does anyone know which source tree contains the android 7 phone app (if available at all)? Feb 13 18:37:22 packages/apps/Phone Feb 13 18:39:17 it hasn't been updated in 3 years, though Feb 13 18:45:15 looks like all of the tags are empty for the phone repo Feb 13 18:45:50 hi! i want to enqueue an audiobuffer in opensles es at every call back Feb 13 18:46:08 niekniek: and? Feb 13 18:46:28 i was thinking i could add the calculated wave data to a big buff which contains the whole track Feb 13 18:46:43 and then enqueue the right part of that buffer Feb 13 18:47:25 but every time i enqueue something the audio stops and starts at the position i enqueue it Feb 13 18:48:12 i’m not that good at c, but maybe it has something to do with the position of the cursor in the array or whatever??? Feb 13 19:14:45 thepoosh, that talk by jake about hidden costs of java: brainfuk Feb 13 19:14:55 yeah... Feb 13 19:15:14 @JakeWharton what was the plugin you suggested in that talk? Feb 13 19:15:25 i should start using it Feb 13 19:34:46 So... Feb 13 19:34:56 Anyone able/willing to step a complete newb through fixing a github-android studio integration? Feb 13 19:57:04 21 mins later and no volunteers :p Feb 13 19:57:24 He left anyway. Feb 13 19:57:39 * mrandroid thinks Mondays are awesome Feb 13 19:57:40 Also, over in #android he was informed we'd need a specific problem to address. Feb 13 19:58:06 At least he wasn't trying to use a Google Cloud Repository. Feb 13 19:58:10 _That's_ a mess. Feb 13 19:58:21 oh heh, didn't check he left Feb 13 19:58:37 FTC7090: I recommend just using the command line until you know all of the git commands. Once you do that then the Android Studio interface will make sense Feb 13 19:58:41 his question guaranteed no volunteers Feb 13 19:58:46 (it's got usability issues) Feb 13 19:59:09 capella: Yep. Sounded like a request for hand-holding to me Feb 13 19:59:12 i guess he did leave Feb 13 20:05:11 how does the ndk toolchain version you supply to make_standalone_toolchain.py --api 21, relate to the targetSdkVersion and minSdkVersion? Feb 13 20:08:39 YouCallItFar, it doesn't really Feb 13 20:08:44 It just chooses a set of headers Feb 13 20:14:32 hm ok. so maybe i should try and set it as low as possible? im using c++-14 so i cant set it that low. not seeing much info about the "ndk toolchain version" (is that an appropriate name for the parameter supplied to make_standalone_toolchain.py --api?) relates to this unsatisfied link error to atof Feb 13 20:20:31 hm maybe i can set it to 9. really would help to get some guidance but my web searches are coming up short. there are a lot of people that had trouble with similar issues. https://github.com/bytedeco/javacpp-presets/wiki/The-UnsatisfiedLinkError-X-File-(a-real-experience) https://medium.com/keepsafe-engineering/the-perils-of-loading-native-libraries-on-android-befa49dce2db#.q9i19boeo Feb 13 20:21:06 but my issue is just around basic libc. would like to see recommended version suite to maximize distribution Feb 13 20:26:04 hm ok. gonna do some more experiments. Feb 13 20:28:05 YouCallItFar: `--api 21` means minSdkVersion 21 Feb 13 20:28:41 C++14 doesn't relate to any Android API level Feb 13 20:28:56 All the C++ APIs are in the NDK itself, not exposed from the platform Feb 13 20:29:58 https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md#Target-API-Set-Higher-Than-Device-API Feb 13 20:30:37 Out of curiosity, what were you searching for? If I can change the language of that doc a bit to make it more googleable I'd be happy to do so Feb 13 20:44:07 when dissembling apps back to smali with apktool, is the p0 register passed to a method always the reference to its class, "this"? Feb 13 20:44:48 assuming it's not static, probably yes Feb 13 20:47:06 pfn: thanks for the info Feb 13 20:47:18 this makes sense now a lot more Feb 13 21:14:49 Hi. I am opening the wifi settings via a button in my app and using BroadcastReceiver to detect when the wifi is connected. How do I close the wifi settings automatically upon connection? Feb 13 21:17:59 you don't Feb 13 21:18:12 bring your app back to the front Feb 13 21:18:22 startActivity(youractivity) Feb 13 21:18:35 The problem is, if I do that, and the user presses back, they end up at the wifi settings again Feb 13 21:19:53 you can't force the wifi screen to finish Feb 13 21:19:58 all you can do is force a new task stack Feb 13 21:20:01 so the user can't press back Feb 13 21:21:01 How do I prevent the user from pressing back on the main screen of my app? Feb 13 21:21:09 whats up pfn bro long time! Feb 13 21:21:59 ? I think you're confusing with pifon again Feb 13 21:29:55 dan_j: Override onBackPressed() in your activity and do whatever you want there Feb 13 21:30:06 perfect. thanks Feb 13 21:33:10 dan_j: or you could try clearing the back stack Feb 13 21:35:40 god damn proguard does its job good, reversing proguarded smali is a nightmare Feb 13 21:38:55 not really Feb 13 21:40:09 pfn: how so? Feb 13 21:40:51 proguard optimizations are pretty straightforward, it's only a "nightmare" in that symbols have less-than-obvious names Feb 13 21:41:31 yeah that's what i meant Feb 13 21:41:37 bal, bah, bac, bal$b Feb 13 21:41:39 decompile to java first Feb 13 21:41:40 hard to keep track Feb 13 21:41:48 read the source code there, edit smali based on the symbol you find Feb 13 21:42:00 doing that yeah Feb 13 21:44:10 i'll try to assing names now Feb 13 21:44:23 bal will be ballas, bah will be bahamas etc. lol Feb 13 21:50:07 what does it mean when there is a $a, $b sign? subclasses? Feb 13 21:50:20 ex. class$a, class$v Feb 13 21:51:57 oh, its inner classes Feb 13 21:52:02 crap Feb 13 21:52:25 stop trying to reverse engineer apks Feb 13 21:54:28 why Feb 13 21:54:50 not really reversing apk, reversing a api that the apk uses Feb 13 21:56:05 :O Feb 13 21:58:29 Ashiren: what the face? lol Feb 13 21:59:32 its hyperventilation Feb 13 22:00:19 you can try this http://apk-deguard.com/ Feb 13 22:00:24 sometimes its very clever Feb 13 22:04:29 smclt30p: If the API isn’t documented, they probably don’t want you using it Feb 13 22:05:07 s73v3r: the api is illegal in itself so i don't really care Feb 13 22:05:28 O: Feb 13 22:05:59 then sniff the requests than try to decompile ap Feb 13 22:06:01 k Feb 13 22:06:20 can't be bothered to set up linux and then arp spoofing Feb 13 22:08:40 So use a crappy switch Feb 13 22:08:57 ...although if the request (rather properly) goes over HTTPs that won't do you any good. Feb 13 22:11:37 I don’t see how an API itself can be illegal, unless it’s for getting kiddie porn or something Feb 13 22:13:08 I've got some respect for anyone who plays around restrictions like that Feb 13 22:13:41 besides, even if the API is illegal that doesn't legitimize reverse engineering Feb 13 22:13:44 whatsapp used to ban anyone who developed their own clients, even from platforms which whatsapp doesn't support Feb 13 22:14:12 but two negatives give positive Feb 13 22:14:24 its an app for watching tv for free Feb 13 22:14:33 only in multiplication Feb 13 22:15:03 but this is an sum, and two negatives makes a bigger negative Feb 13 22:15:51 this channel is logged by NSA and FBI Feb 13 22:16:13 s/this channel/all channels/ Feb 13 22:16:15 not to mention god knows how many other international intelligence agencies Feb 13 22:16:20 MLP Feb 13 22:16:53 http://logs.nslu2-linux.org/livelogs/android-dev/android-dev.20170213.txt Feb 13 22:17:01 Of course none of them are going to care until it becomes "politically expedient" to do so Feb 13 22:18:43 this guy took the minecraft programming approach Feb 13 22:18:49 if in doubt, make it static!!!!11 Feb 13 22:19:20 If it's not going to be instanced, might as well Feb 13 22:19:39 Java will eventually get in a snit about it anyway Feb 13 22:19:50 it's because it's about tv... static Feb 13 22:20:53 https://www.youtube.com/watch?v=8E-MtJBAZvw Feb 13 22:22:07 yeah...right Feb 13 22:24:20 why don't you work on some legit app instead? Feb 13 22:26:24 i mean, anyone who could do that can easily get a job where they can afford cable Feb 13 22:26:57 about that broke student life Feb 13 22:31:09 They're just following Trump's example Feb 13 22:33:48 Dagmar, sniffing is easy, mitm as long as certificate pinning isn't in play Feb 13 22:33:56 and if certificate pinning is, replace the cert in the apk and re-sign it Feb 13 22:34:11 and if the code checks the certificate before use, change the code so that it compares the same thing Feb 13 22:34:26 etc. etc. Feb 13 22:34:38 I'm well aware, but I don't think MITM attacks are going to be likely against an HTTPs connection unless you happen to have a CA-signed cert around to play with that just happens to match the target name Feb 13 22:35:10 ...and someone struggling with it isn't likely to be able to figure out how to add their own cert to the device anyway Feb 13 22:43:03 finnaly found the method that populates data from the api after 3 hours of searching Feb 13 22:43:07 public final ArrayList> a(String paramString, Map paramMap) throws bch.a Feb 13 22:43:14 nicely decorated, isn't it? Feb 13 23:08:29 I need my app to start whenever the phone starts. I understand I need some kind of a background service for this. But what does a background service actually do? Feb 13 23:08:47 Is it an app in itself that never shuts down and always auto-starts? Feb 13 23:08:59 a service is a life-cycle container Feb 13 23:09:00 can I put whatever functionality in it, or can it only call my app? Feb 13 23:09:07 that is all a service is Feb 13 23:09:10 pfn, can you elaborate a bit more? Feb 13 23:09:19 CrowX-, it's going to be easier if you tell what you're actually trying to do. Feb 13 23:09:24 it's code that tells the android framework that your app is alive and shouldn't be killed Feb 13 23:09:28 CrowX-, since service MIGHT NOT be what you're really looking for. Feb 13 23:09:36 Mavrik, I did with my first sentence. I want if my phone reboots, the app to still run Feb 13 23:09:37 (Also services do get killed.) Feb 13 23:09:43 CrowX-, in what way? Feb 13 23:09:44 they do Feb 13 23:09:48 CrowX-, UI? Background processing? Feb 13 23:09:51 *shouldn't be* Feb 13 23:09:53 Upload? Always? Just some time? Feb 13 23:10:11 Mavrik, background processing Feb 13 23:10:12 CrowX-, as I asked, tell us what you're *REALLY* trying to accomplish. Feb 13 23:10:20 Spying on users? Feb 13 23:10:24 And you need it constantly? Feb 13 23:10:27 Or do you need to do a batch job? Feb 13 23:10:29 the app is supposed to take gps data on every 10 minutes, send it to server, and go back to sleep. Feb 13 23:10:30 CrowX- You need to hook into the ON BOOT COMPLETED broadcast Feb 13 23:10:40 CrowX-, ahh... ew. Feb 13 23:10:40 if you want something to happen when the phone starts Feb 13 23:10:41 if that’s the case, then that’s not what you want Feb 13 23:10:55 CrowX-, schedule a BOOT_COMPLETED hook to start your service Feb 13 23:10:55 s73v3r, not spying. the users using it are employees of the company, and they're provided these phones by the company. Feb 13 23:11:03 Then use JobScheduler to reschedule it every 10 minutes Feb 13 23:11:05 still fucking spying Feb 13 23:11:11 it's just a company that needs to know where its salesmen are at any given time. Feb 13 23:11:11 Also your phone battery will die. Feb 13 23:11:22 play-services provides location info without having to burn up the battery yourself Feb 13 23:11:25 i have never bought that argument, and never will Feb 13 23:11:30 Might not work well on Android 6. Feb 13 23:11:41 but yes, you can do so by signing up for significant location changes Feb 13 23:11:47 play services is currently using more battery than both the OS and the screen on my N5 =/ Feb 13 23:11:58 orbyt_, yes, it does way too much Feb 13 23:12:04 but better to use it, which is already burning up the battery Feb 13 23:12:09 than do it yourself, and burn up *more* battery Feb 13 23:12:15 That battery display is useless anyway. Feb 13 23:12:33 Doesn't really show anything actionable (and OS + screen values are hardcoded) Feb 13 23:12:38 pfn This just started happening though, I suspect a recent Play services update is the cause Feb 13 23:12:51 Full battery to dead in 30 minutes or so Feb 13 23:13:12 Makes a good hand warmer at least Feb 13 23:13:17 CrowX-, also consider implementation where the service polls the phone for location when someone wants to see it Feb 13 23:13:27 or you'll empty the battery in matter of hours Feb 13 23:14:51 Mavrik, can't the phone go back to sleep and wake up just to the the gps info? Feb 13 23:15:11 GPS is extremely expensive battery wise. Feb 13 23:15:26 don't worry folks they just invented batteries that last 10 years https://hardware.slashdot.org/story/17/02/13/1923200/researchers-working-on-liquid-battery-that-could-last-for-over-10-years?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Slashdot%2Fslashdot+%28Slashdot%29 Feb 13 23:15:28 Waking up phone every 10 minutes will drain it very fast, especially if you'll be in area with poor lock. Feb 13 23:15:37 Mavrik, I've considered that, but managers need to see where everywhere the salesmen went during the day at the end of the day. Feb 13 23:15:53 Well :) Feb 13 23:16:00 They'll just have to keep charging the phone then. Feb 13 23:16:16 that’s still horseshit reasoning Feb 13 23:17:34 so I need to use JobScheduler to do the periodic checks, and then I need to schedule a BOOT_COMPLETED hook. Correct? Feb 13 23:18:03 Also, what's the alternative mentioned with using play-services to give me location? Does play-services do what my app intends anyway? Feb 13 23:18:36 you can sign up to receive significant location changes Feb 13 23:19:16 battery... I just bought a spark ev over the weekend... Feb 13 23:23:03 Hi! Can someone please help with this? I have some questions that I need answered. https://developer.android.com/google/play/billing/billing_integrate.html#billing-requests Feb 13 23:23:12 s73v3r, what are significan't location changes? like, if a person moves a town? Feb 13 23:23:22 not quite that large Feb 13 23:23:35 but I think if they move out of the building they’re at? Feb 13 23:23:42 s73v3r, but it can't be used to get location on every 10 minutes, right? Feb 13 23:24:01 i mean, if you ahven’t gotten one, then that means they havent moved Feb 13 23:24:29 don't ask to ask ihedra, just ask Feb 13 23:24:46 Thank you, adq! Feb 13 23:28:02 I am trying to understand how the code that is provided works to better understand where I must implement it. In the first snippet of "Querying for items available for purchase" I see two things are being added to skuList. What is the purpose of this step? Do you have to add all possibilities or just the ones that you want to use at the moment? Feb 13 23:28:16 https://developer.android.com/google/play/billing/billing_integrate.html#billing-requests Feb 13 23:29:26 ihedra, those are 2 "product id", something you create and reference in the developer console Feb 13 23:29:46 you better play with the trivial sample i think, https://github.com/googlesamples/android-play-billing/tree/master/TrivialDrive Feb 13 23:29:58 and read more about it online Feb 13 23:30:33 I looked at the trivial sample and it has too much stuff that it's confusing for someone like me who is not really a programmer. Feb 13 23:31:11 well, you have to deal with it because you won't find something simpler, there are some other external libs but i would not recommand them Feb 13 23:31:39 also keep in mind the trivial sample is jsut an example and suffer of many caveats, so if you're not a developer maybe you should offload this task to someone who is Feb 13 23:33:08 Well, I have to understand this simple code first to go on to more complex one like the trivial sample. Then I can figure out what parts of that trivial sample I need to implement and which I do not. Feb 13 23:34:31 But back to my question above, so if you have 3 products instead of two, must you skuList.add all 3, or just the ones you plan to use right now? Feb 13 23:35:15 just the one you plan to use, you don't have to query all your items/products Feb 13 23:35:19 the one(s)* Feb 13 23:35:36 little advice, be careful you cannot delete items you created in the dev console ;) Feb 13 23:35:39 so think twice Feb 13 23:35:42 plan long term Feb 13 23:36:46 you mean if I start using them, I have to continue using them? Feb 13 23:36:58 no, if you create them, you cannot delete them Feb 13 23:37:08 you can only unpublish them i think Feb 13 23:37:31 ok, I will keep that in mind Feb 13 23:37:36 thanks for the tip. Feb 13 23:38:41 Alright! now "ITEM_ID_LIST" needs to be there as is, or it's just some random string that I can change to anything I want and it doesn't really matter? Or does it get referenced somewhere else? Feb 13 23:40:11 it's arbitrary, it's just the key of the bundle class being used Feb 13 23:40:22 ihedra, have you ever developed for android platform? Feb 13 23:40:45 because if not (no worry), you should start on that first Feb 13 23:41:13 it won't fly at all, if not Feb 13 23:42:38 I am writing an app. I'm just not knowledgeable in how some libraries and connections function, but I am able to figure things out, sometimes with some help. Feb 13 23:43:09 then i strongly recommand again you play with trivial sample, you can start easy by just replacing what is mandatory and creating the items in the dev console Feb 13 23:43:27 i'm trying to avoid you suffering much, the trivial sample provides a boilerplate for lot of things Feb 13 23:44:40 Yes, I will go there definitely, but I want to first get a feel for how in-app purchases functions. So that when I read the trivial sample, I am not reading a foreign language. Feb 13 23:45:38 So the purpose of that snippet pretty much is to access the google console in-app information to then pull things from it like price, bought or not, etc. Correct? Feb 13 23:45:44 sure but i'm not gonna answer all of your questions, especially if you don't recognize a key for a string array in a bundle, no offense man Feb 13 23:46:33 ihedra, correct, see the title: Querying for items available for purchase Feb 13 23:46:39 but it does not show everything Feb 13 23:47:05 sometimes, examples on the official doc are miserably empty, have some typos, are outdated, etc Feb 13 23:47:56 there are more metadata you can retrieve, but they probably keep it extremely simple Feb 13 23:48:28 Miserably empty is right! But gives me something to start with. Like algebra before calculus. Feb 13 23:48:30 see https://developer.android.com/google/play/billing/billing_reference.html#getSkuDetails Feb 13 23:48:56 they only show price & the product id (which is already known, since you query against it) Feb 13 23:49:23 i told you, start with trivial sample Feb 13 23:49:26 deal with it lol Feb 13 23:49:37 there is nothing more simpler imo Feb 13 23:50:34 I will. I already dealt with Google Sign In implementation. There is nothing more simpler than that! But it took me a while to figure it out. Feb 13 23:50:53 i see many ppl just struggling to set up a test account Feb 13 23:51:01 you will see Feb 13 23:55:01 Think about it this way, my knowledge of object oriented programming is close to zero. However, I can write non object oriented scripts without that big of a problem. Whenever I come to some object stuff, it's hard to figure out how they work. Those are the simple questions that I am asking you. I won't need to ask the more complex questions because when I understand the simple stuff, I Feb 13 23:55:01 can use that to figure out the complex. Feb 13 23:56:23 with android, everything is complicated ;) Feb 14 00:00:22 I have already built the whole app without any problems. Just need to link it to everything outside the app. I already have Google Sign In set up, Leaderboards, AdMob ads. I can do it! Just need a little tiny help sometimes and I can accomplish anything! =) Feb 14 00:00:52 I have the patience, LOL Feb 14 00:03:58 trivial sample :) Feb 14 00:04:05 why doesn't evgo have an app for their charging network.... Feb 14 00:04:33 https://developer.nrel.gov/docs/transportation/alt-fuel-stations-v1/all/ Feb 14 00:04:35 interesting Feb 14 00:05:36 has anyone used GCP with their backend? Feb 14 00:06:33 I've started building a video based app (analogous to Snapchat), and am thinking of using Google Cloud Storage for storing the videos Feb 14 00:07:21 i suppose if the rest of your backend is on Google, that’d make sense Feb 14 00:07:41 Would I essentially need to perform a call to my rest api, get the url of the object in storage, and then load the video using the returned URL? Feb 14 00:09:40 hmm, that api doesn't have station status :-( (available-ports, in-use ports) Feb 14 00:12:50 adq, thank you for answering those questions. Now everything that I am reading after that is making sense. Feb 14 00:13:04 np ihedra Feb 14 00:14:08 One more question, though, "For added security, you should perform the checking on your own secure server." you can Ctrl F it on that page: https://developer.android.com/google/play/billing/billing_reference.html#getSkuDetails Feb 14 00:14:23 Any good options if you don't have a server? Feb 14 00:17:22 no good options without a server Feb 14 00:17:44 security is a huge problem on android Feb 14 00:18:29 what is the drawback / loophole ? Feb 14 00:19:35 if the checking is performed in app Feb 14 00:19:39 security is a huge problem in any off-line application Feb 14 00:19:45 don't single out android Feb 14 00:20:31 ihedra, it's as easy as flipping a boolean Feb 14 00:21:23 somewhere in SharedPreferences, you mean? Feb 14 00:22:08 not necessarily, but don't focus on that just accept it's vulnerable atm Feb 14 00:24:05 but basically one flips a boolean and the app thinks that the purchase has been made and lets the user pass when he shouldn't have, correct? Feb 14 00:25:24 for the simplest scenario yes Feb 14 00:27:16 Alright, I will keep that in mind. Maybe I can think of something. The only thing I don't want people messing with is the Remove Ads in-app purchase part... Feb 14 00:27:28 there's a few things you can do to help protect, hardware-protected key-storage helps in this regard Feb 14 00:27:44 still doesn't do anything against people who will re-package your apps, though Feb 14 00:29:40 I'm just being a d**k and checking the vendor. if it's not Google Play, don't rely on the results. Feb 14 00:30:15 amazon and google play both have semi-good protection Feb 14 00:30:30 in the early days, there was some routine to make l*patcher and others tools to crash :)) Feb 14 00:32:26 Dagmar: checking on every app start? Feb 14 00:35:33 Yeah and repeatedly in different ways thrughout the app Feb 14 00:35:47 I'm not getting a bunch of spam mails from idiots in third-party app stores this time Feb 14 00:35:59 The app will straight up sabotage the user if it didn't come from Google Play Feb 14 00:36:29 It won't touch their data, but it may tell them their best bet to beating a Lapras is to use a Cp200 Ditto Feb 14 00:36:40 It also might give a bunch of random information for stats Feb 14 00:37:14 Where is this information stored? Vendor. Feb 14 00:37:31 I mean where do you check it against? Feb 14 00:37:35 http://stackoverflow.com/questions/17629787/how-android-app-can-detect-what-store-installed-it Feb 14 00:38:33 bdonnahue: Yeah but your problem has nothing to do with the cache Feb 14 00:39:15 My problem? Feb 14 00:39:58 Oh, sorry Feb 14 00:40:05 misread, not for me Feb 14 00:40:38 Thanks for the link Feb 14 00:44:57 Alright, I will read through another guide first and then move on to the trivial sample. =) Will come back with some questions about the Iab libraries. Feb 14 01:43:46 I have javaMaxHeapSize "4g" in my gradle files and I'm still running out of heap space during a build. Has anyone else seen this Feb 14 01:43:47 ? Feb 14 01:46:01 (Android Studio 2.2.3) Feb 14 01:59:48 You can just... getView()... o.O **** ENDING LOGGING AT Tue Feb 14 03:00:02 2017