**** BEGIN LOGGING AT Wed Feb 22 03:00:02 2017 Feb 22 03:34:07 hi, I am new to android studio. The first time I run android-studio in linux (archlinux), the final setup of setup wizard shows a notification "your system can emulator in an accelerated performance mode. search for install instructions for your particular linux config that kvm is enabled" and it gave me a link. I checked the link. it does not have anything related to kvm. Feb 22 03:34:26 the link given is https://developer.android.com/studio/run/emulator.html#vm-linux (there is no #vm-linux actually). Feb 22 03:35:11 is this a bug of android studio setup wizard? it gave me a link which is actually kinda wrong. where can I find the linux config for kvm enabled? Feb 22 03:36:14 well, you could google Feb 22 03:37:30 arch kernels seem to have kvm as modules so it should be up to your cpu Feb 22 03:40:15 mniip, I did google. i am a newbie and not a native english speaker. I am not sure what it means. What does those words really mean? (1) Enable kvm support in android studio (2) Enable kvm in your linux (3) you have kvm enabled already. do nothing. I just don't get what it means. btw, I have kvm module loaded already if I check "lsmod | grep kvm". it returns kvm_intel kvm irqbypass. Feb 22 03:42:42 do you have vmx and/or svm in /proc/cpuinfo? Feb 22 03:45:24 mniip, I did grep. I have vmx in the "flags:" section/option. Feb 22 03:46:14 then you should be all set Feb 22 03:47:03 mniip, got it. thank you very much for your kind help. Feb 22 03:47:27 lol, will google ever get this working right https://code.google.com/p/android/issues/detail?id=233211 Feb 22 04:08:46 hmm Feb 22 04:31:02 a newbie question. I read "Android Studio is built on IntelliJ". Does it mean android studio will install "IntelliJ IDEA" IDE for me? thanks. Feb 22 04:32:36 sgo11: that means Android Studio is a modified version of IDEA. Feb 22 04:35:12 sudhirkhanger, ok, does it mean if I want to use IDEA for non-android projects, I have to install IDEA again? thanks. Feb 22 04:37:19 I mean I have to install the real IDEA app instead of using the modified version provided by android studio. Feb 22 05:23:04 Is there any good free Privacy Policy generator / template available anywhere? Feb 22 05:43:11 t2mkn there was one on reddit the other day Feb 22 05:44:21 g00s may I have a link please Feb 22 05:44:33 you'll have to find it on /r/androiddev Feb 22 05:44:52 ok Feb 22 05:44:54 reddit Feb 22 05:45:18 er, ah, worth using? heh, never tried Feb 22 06:23:40 g00s: planning to replace Jake? you can have my roommates dog... Feb 22 06:24:21 you can talk to nasa scientist on reddit today Feb 22 06:25:37 they will answer all questions in English and Spanish Feb 22 06:27:23 15 hours from this moment Feb 22 06:27:50 12 hours to some intriguing announcement Feb 22 06:37:28 mission to Mars planets... manned Feb 22 06:37:53 if what I read earlier is correct ;) Feb 22 06:38:09 er, moons of course Feb 22 06:45:39 they don't disclose details Feb 22 06:46:33 > The event will air live on NASA Television and the agency's website. Feb 22 06:46:34 > Details of these findings are embargoed by the journal Nature until 1 p.m. Feb 22 07:10:38 In gridlayout [http://dpaste.com/23JZ026], how can I make first 2 items to span 1 column each, with last 3rd column empty. Using column_weight doesn't work and I can't get colspan to work Feb 22 07:18:31 Hey , I tried replacing Linearlayout with a fragment (successfully did it) , but later I added a button in the xml file and button hid the text that was replacing linearlayout Feb 22 07:18:37 http://pastebin.com/gfPwH73u Feb 22 07:21:14 The button will be drawn last, and you have it match_parent for height&width, so itll be drawn over everything Feb 22 07:21:53 Ah nm width is only match parent, have a screenshot? Feb 22 07:23:22 yes , Feb 22 07:23:24 Uhhh I hate gridlayout and tablelayout so much Feb 22 07:25:12 Why can't gridlayout just support weightsum Feb 22 07:26:47 +1 Feb 22 07:27:52 http://tinypic.com/r/a9w95z/9 Feb 22 07:38:07 SharedPreferences is still viable for keeping user's data or it was replaced by something in android 5.0+? Feb 22 07:43:14 not sure if its been replaced, but its useful and proper Feb 22 07:43:36 ok ,thx Feb 22 10:22:51 Yay... SO down. Feb 22 10:23:12 so much for my programming skills Feb 22 10:25:55 Stack Overflow is currently offline for maintenance Feb 22 10:25:55 - WHOIS YOUR GOD NOW? Feb 22 10:26:30 basic java q: implementing only some interface methods ? Feb 22 10:31:44 D; Feb 22 10:31:51 How do I survive until it comes up Feb 22 10:32:04 it is already up Feb 22 10:32:08 raoul11: have a class with all empty methods and subclass that and override the few you want Feb 22 10:32:48 see for example https://developer.android.com/reference/android/animation/AnimatorListenerAdapter.html Feb 22 10:36:49 k Feb 22 10:36:56 thats abstract class Feb 22 10:37:12 afaik in java 8 you can partly implement interfaces Feb 22 10:38:04 yeah, id rather avoid abstract classes Feb 22 10:45:15 so what that it's abstract? Feb 22 10:53:53 you can implements multiple interfaces at once Feb 22 10:54:05 but extend only one class Feb 22 12:08:12 I have a scenario to confirm with you guys. I have imx6 platform with Android M from Freescale/NXP. I need to make this android into Android N.Car. I got the N.Car source code from Google. Is it possible to do this? Feb 22 12:08:15 The source code for N.Car from Google is not BSP Feb 22 12:27:05 kanupatar, wrong channel try #android-root or some forums on the big internet Feb 22 12:39:00 I am trying to connect to a server running in VirtualBox and Vagrant, using URL and HttpURLConnection. I have mapped the domain name for the server (homestead.app) to the IP address (192.168.10.10), in /etc/hosts on the development machine. A ConnectException is thrown: "failed to connect to homestead.app/127.0.53.53 (port 80): connect failed: ECONNREFUSED (Connection refused)". It seems Java is using the wrong IP address 127.0.53.53. How can I Feb 22 12:39:01 fix this? Feb 22 12:40:34 how is that related to android? :P Feb 22 12:43:59 TheSchaf, android studio. Feb 22 12:45:55 code? Feb 22 12:46:18 what is this code? Feb 22 12:49:05 My colleague reminded me I am trying to connect from the phone, not the machine. Feb 22 12:49:27 raoul11: here? Feb 22 12:49:28 Does anyone have a n idea why "Access for less secure apps" turns itself off automatically in my google account? Seems like I need it for what I'm currently trying to do in my app. Feb 22 12:49:30 at work Feb 22 12:49:39 * raoul11 thepooshes thepoosh Feb 22 12:49:54 how are you buddy? Feb 22 12:50:15 ok i guess, I am back at work Feb 22 12:50:23 need to design a freaking feature Feb 22 12:50:32 which is overcompicated AF Feb 22 12:51:03 aren't all features? Feb 22 12:51:07 https://github.com/square/retrofit/blob/master/CHANGELOG.md Feb 22 12:51:27 Syzygy: nah, this is a dual sync token system Feb 22 12:52:22 when are you doing the chopping thepoosh ? Feb 22 12:52:25 tommorow? Feb 22 12:52:34 yeah, tomorrow morning Feb 22 12:52:48 nice man Feb 22 12:52:56 scares the shit outta me Feb 22 12:52:57 I need to figure out some fun questions like "How can I make it impossible to uninstall my app?" or "How can my app brick a phone." Feb 22 12:53:03 yeah i bet it does Feb 22 12:53:14 Syzygy: wait, WOOT?! Feb 22 12:53:32 malicious user detected Feb 22 12:53:54 Syzygy: I know someone who implemented an uninstall survey popup Feb 22 12:53:58 thepoosh: new meetup next week Feb 22 12:53:59 which was shady as fuck Feb 22 12:54:02 I saw Feb 22 12:54:06 looks amazing actual Feb 22 12:54:07 coming? Feb 22 12:54:11 theft prevention for a waiting room. Feb 22 12:54:15 especially now that there is a new retrofit Feb 22 12:54:16 fb, butterknife, retrofit Feb 22 12:54:25 retrofit 2.2 is out Feb 22 12:54:31 congratz JakeWharton! Feb 22 12:54:34 i actually added butterknife today Feb 22 12:54:58 why butterknife and not databinding Feb 22 12:55:10 i donno Feb 22 12:55:10 are you guys from the same area? Feb 22 12:55:21 Syzygy: neighboor countries Feb 22 12:55:32 Syzygy, you could use device administration, other than that it's beyond this place and you have to deal with it at rom level Feb 22 12:55:36 without a border unfortunnetly ): Feb 22 12:55:52 ah. Feb 22 12:56:41 Syzygy: an hour apart Feb 22 12:56:56 I am a war criminal Feb 22 12:56:56 adq, thanks for that advice, I assumed that this was the only way as well. Do you by any chance know if this can also prevent the user from putting my app in the background? Feb 22 12:56:59 and raoul11is not Feb 22 12:57:12 raoul11: https://github.com/square/retrofit/blob/master/CHANGELOG.md Feb 22 12:57:27 yeah looks nice Feb 22 12:57:32 yeah, you once told me where you're from and i pretty much understood the rest from this discussion. Feb 22 12:57:35 i don't think dev adm can enforce that Feb 22 12:57:36 it's time to learn how to RX Feb 22 12:57:56 just imagine, how some ppl would abuse of those kind of features Feb 22 12:58:22 NEVAH thepoosh Feb 22 12:58:24 you need a custom rom, Syzygy Feb 22 12:58:26 adq, sure, but it's not abuse if the device admin does it. Feb 22 12:58:53 i actually should learn rx, but got so much todo theres no time, and the curve is high Feb 22 12:58:54 hmm, I guess that exceeds the scope of this project. Feb 22 12:59:27 most important thing is that the app can not be uninstalled i guess. Feb 22 12:59:42 again, this is done at rom level usually Feb 22 12:59:51 device admin should be fine. Feb 22 12:59:53 with different protection level, like system or sig Feb 22 13:00:07 yeah but you will have a trouble with dev administration Feb 22 13:00:18 anyone can go there and untoggle your app, and then remove it Feb 22 13:00:27 except if you have a way to manage a fleet of android devices Feb 22 13:00:38 which again, put you very close to "you needa custom rom" Feb 22 13:01:27 i just know it's very annoying when you don't know an app was toggled in dev adm, that when you (the regular user) wants to uninstall it (and it will fail) Feb 22 13:01:29 how does the fleet of devices prevent removal of the app? Feb 22 13:01:38 there is no message telling the user to go in dev adm and untoggle it first Feb 22 13:02:00 Syzygy, what i meant by a fleet of devices is that you already have a management solutions Feb 22 13:02:12 so you already have more control and what can be done or not Feb 22 13:02:35 these are devices in a waiting room for a specific client. So a management solution is fine. gsuite I assume. Feb 22 13:04:07 not sure it suited Feb 22 13:04:09 but you will see **** BEGIN LOGGING AT Wed Feb 22 13:32:44 2017 Feb 22 14:04:13 Hi can anyone here help me with how to use Bouncycastle library on Android? Feb 22 14:04:43 Perhaps if you ask specific questions. Feb 22 14:05:02 Syzygy_ I am not sure how to add Bouncycastle as the security provider to my Android application. Feb 22 14:05:20 I'm sure there are tutorials on google. Feb 22 14:05:25 When I write Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); I get an error saying BouncyCastleProvider cannot be found. Feb 22 14:05:36 There are tutorials for SpongyCastle not BouncyCastle Feb 22 14:05:51 BouncyCastle is one of the Security providers that come with Android. Feb 22 14:06:14 People were using SpongyCastle to replace the default BouncyCastle because older versions of Android didn't have all the algorithms. Feb 22 14:06:36 However, I hear that current versions of Android come with most of the algorithms. Feb 22 14:06:49 So I thought I will use the default BouncyCastle provider that comes bundled with Android. Feb 22 14:06:53 Syzygy_ Feb 22 14:07:13 are your imports working? usually you would just write new BouncyCastleProvider(). Feb 22 14:08:00 If it's not on d.android.com, then it's not part of the public api Feb 22 14:08:04 Syzygy_ no imports are not working. Feb 22 14:08:40 Syzygy_ I found something https://android.googlesource.com/platform/external/bouncycastle/+/5db505e1f6a68c8d5dfdb0fed0b8607dea7bed96/bcprov/src/main/java/org/bouncycastle/jce/provider/BouncyCastleProvider.java Feb 22 14:08:42 Let me try Feb 22 14:16:53 Syzygy_ SimonVT I added import org.bouncycastle.jce.provider; and the import statement just vanishes from Android studio! No idea why. I check the collapsed list of import statements and it's not there. Feb 22 14:18:00 perhaps you have "manage imports on the fly" enabled. if you're not using it in the code it's removed as unneccesary. Feb 22 14:18:38 Syzygy_ ok Feb 22 14:18:41 Try using BouncyCastleProvider in your code without the package name in front of it like you did earlier. Feb 22 14:19:18 if it's marked red because no package name can be found, try alt+ enter and the import option. Feb 22 14:19:24 Syzygy_ Feb 22 14:19:26 ok Feb 22 14:20:02 Syzygy_ says create class or create inner class. It doesn't import the required packages. Wonder why. Feb 22 14:20:53 chances are you still haven't imported the library correctly. Feb 22 14:21:52 Syzygy_ how do we remove manage imports on the fly? Feb 22 14:22:36 hi, I'm having a problem with a custom view I've created that extends EditText and saves state. I get this parcelable error: http://pastebin.com/raw/9bEbiyRy Feb 22 14:22:39 trupheenix, the link you pasted earlier is about platform code Feb 22 14:22:42 through the android studio settings, there's a search feature. try something like auto import. Feb 22 14:22:45 many things there won't be available for app dev Feb 22 14:23:27 I don't get why I get that error since android.text.style.UnderlineSpan implements ParcelableSpan Feb 22 14:23:30 adq, this is available. It's default android code. Feb 22 14:23:38 ... Feb 22 14:24:11 trupheenix, chances are it's not. I can not access Bouncycastleprovider either. you'll need an extra library for that. Feb 22 14:24:28 Syzygy_ hmmm http://nelenkov.blogspot.com/2011/12/using-ecdh-on-android.html Feb 22 14:24:37 Syzygy_ it's quite dated Feb 22 14:24:43 but he says it's already there. Feb 22 14:25:08 even in 2011, you have to add the (jar?) dependency iirc Feb 22 14:25:16 you had* Feb 22 14:25:49 adq, that is if you wanted the entire BouncyCastle Feb 22 14:26:02 adq, on devices which were < Ice Cream Sandwich Feb 22 14:26:16 adq, now most devices are on KitKat or Lollipop Feb 22 14:26:50 trupheenix, the example that that sourcecode is from uses springycastle. Feb 22 14:26:52 https://github.com/nelenkov/ecdh-kx/blob/master/build.gradle Feb 22 14:27:02 well, it's not complicated, you won't be able to import something not part of the sdk or your dependencies Feb 22 14:27:02 spongy Feb 22 14:27:06 Syzygy_ yes. Feb 22 14:27:36 Syzygy_ but he says that one could use BouncyCastle also. So for my requirements I want to use BouncyCastle and not bundle another extra lib with my code. Feb 22 14:29:44 that doesn't necessarily mean that you don't have to include the bouncycastle library. It's my opinion that you need to include it if you want to use it. You might be able to hack access to the systems bouncycastle library via reflection, but since it's not exposed to us, there's a reason we shouldn't use it. Feb 22 14:29:58 So either you import the library, or you're on your own here. Feb 22 14:32:08 Ok Feb 22 14:32:40 As far as I can see BC functionality might be wrapped by the android system, but I have no idea how. So you'll have to look into that yourself as well. Feb 22 14:33:08 http://stackoverflow.com/questions/2584401/how-to-add-bouncycastle-algorithm-to-android see the last comment. Feb 22 14:35:57 Hi folks, anyone knows how to save a gl texture to a bitmap? Feb 22 14:39:43 I am having a problem with a custom view I've created that extends EditText and saves state. I get this parcelable error: http://pastebin.com/raw/9bEbiyRy Feb 22 14:40:07 however android.text.style.UnderlineSpan is an Android internal class, and it implements ParcelableSpan Feb 22 14:40:41 It reproduces every time locally. why does it throw that error? Feb 22 14:48:54 I'm also overriding the onSaveInstanceState() and onRestoreInstanceState(Parcelable) methods: http://pastebin.com/8zU9rZQR Feb 22 14:55:59 i'm trying to get a simple vertical seekbar on top of a button in landscape mode but can't get the height high enough. the boundary in layout looks ok but the bar itself is only half the height of the boundary Feb 22 15:05:15 alphaferret, in your phones developer settings you can enable something along the lines of "visualize layout bounds". can't help you more than that unless you post some code/screenshots. Feb 22 15:05:34 i'll post a shot, i'm using emulaotr Feb 22 15:06:11 code might actually be more helpful. and do try the layout bounds thing. Feb 22 15:09:15 too short here https://uploadpie.com/l9XUPg longer here but i have to resize boundary too wide https://uploadpie.com/lV8vro Feb 22 15:11:53 is th layout bounds setting relevant since i can't even get it working in android studio? Feb 22 15:15:56 helps visualizing the problem. Feb 22 15:16:28 maybe go for the to large option and make it smaller via margin/padding? Feb 22 15:17:15 i tried margins and padding all 1dip, but will try again Feb 22 15:17:46 http://dpaste.com/2W5S4EN Feb 22 15:17:59 1dp isn't much, try 20 and see if that makes a difference Feb 22 15:18:00 Isn't running am set-debug-app meant to stop apps being force-closed by ANRs when they hit breakpoints? Feb 22 15:18:05 because it's not working for me... Feb 22 15:18:57 apps don't get force closed due to anr... Feb 22 15:19:10 then again, amazon devices will force-close due to anr, and there's nothing you can do about it Feb 22 15:20:54 pfn: https://gist.github.com/cyberjacob/cfdaa679e773530f8fdf0b3f9eb823da Feb 22 15:27:10 hi guys... can anybody tell me how I can use the draw(Canvas canvas) method in AnimatedVectorDrawableCompat? I am trying to dynamically render a text on top of an animated vector drawable... any ideas? Feb 22 15:29:08 evident, simply call super.onDraw(canvas) inside your custom AnimatedVectorDra.. class and just after use canvas.drawText to render text on top of it Feb 22 15:29:25 inside onDraw of* Feb 22 15:30:21 well, not sure if onDraw or draw, but anyway you just have to let it draw like it should and call some canvas method after it has drawn Feb 22 15:30:43 is there a 3rd aprty widget that would work better, all i want is a value bar display that will fit above those buttons Feb 22 15:30:51 adq: but I can't really extend AnimatedVectorDrawableCompat, can I? since I don't have a public constructor in that class and can only create instances with its create() method Feb 22 15:32:31 i don't remember (and not in front atm) evident sorry, but you can always use an horrible hack which consists of putting a view (where you will display your text) on top of the view responsible for displaying your animated drawable Feb 22 15:33:24 it's not like the hierarchy is not already close to infinite+1 number of views just by using default decorview+coordinator+toolbar+etc Feb 22 15:33:59 hi, I have installed Android studio because I don't have an Android phone and want to use some Apps on my PC using the "emulator". How can I start the emulator? This site https://developer.android.com/studio/run/emulator.html says I need to open the AVD manager but I can't find it. Feb 22 15:34:17 right... there's always a hacky solution... ;) But it gets quite worse if I want to use that drawable as an icon in a toolbar menu... ;) I've got it working quite well for loading a static drawable and rendering my text on top, but that doesn't work with the animated ones... but well.. I'll keep looking Feb 22 15:34:47 fr8 it's the icon right underneath help Feb 22 15:34:51 gr8 Feb 22 15:34:57 don't they use animator or something for animated drawable, evident? Feb 22 15:34:58 I was just wondering because there already is a public draw() method in the AnimatedVectorDrawableCompat so I thought it's possible to use this ;) Feb 22 15:35:08 because internally, i think it's still rendering a path per frame Feb 22 15:35:21 yes in the end it's a drawable with an animator combined... Feb 22 15:35:23 alphaferret: ooh thanks :) Feb 22 15:35:24 it's very close to calling canvas.drawPath multiple times to get your animation Feb 22 15:35:31 I might try to add the animator manually Feb 22 15:35:32 and you woulod just like to add canvas.drawText above that Feb 22 15:35:48 right Feb 22 15:35:54 keep digging, you will find a way Feb 22 15:36:52 I will. :) thanks for the help Feb 22 15:55:17 I have an User Experience question. I have a list of things that the user selects one or more of. However, it may not be obvious what each thing is so there is a description for each. How should the user access this description for a list-item? Longpress is an option, i guess, but is there a better solution? Feb 22 15:56:28 long press is not discoverable Feb 22 16:00:45 agreed Feb 22 16:01:10 i thought about solving that by creating a good "introduction" or "onboarding"-sequence that highlights the different features of the app Feb 22 16:01:38 ideally the app should be so intuitive and easy to use that that is not needed, but in practice thats probably wishful thinking Feb 22 16:06:26 so I have just installed Android Studio and created an AVD. When I want to run it, I get an error message in the "Run" window: /home/user/Android/Sdk/tools/emulator: 1: /home/user/Android/Sdk/tools/emulator: Syntax error: "(" unexpected Feb 22 16:06:35 something is wrong here?? Feb 22 16:09:04 in the event log it says Consult IDE log for more details (Help | Show Log) Feb 22 16:09:14 but there is no (Help | Show Log) in the IDE Feb 22 16:09:32 I have Show Log in File Manager Feb 22 16:11:19 the executable /home/user/Android/Sdk/tools/emulator is a 549kB executable Feb 22 16:13:05 apparently it is because I have a 32bit computer :( http://stackoverflow.com/questions/34216342/android-studio-adb-syntax-error-unexpected Feb 22 16:13:27 this damn software incompatibility Feb 22 16:18:14 well ... 32 bit computers are a bit outdated maybe Feb 22 16:34:22 that sentence still sounds funny to me lol Feb 22 16:34:28 we're living in the future xD Feb 22 16:34:37 oh 32 bit PC's are so old!! xD Feb 22 16:57:26 HGi guys! I have a question about MVP concept. I read many people say that Presenter must be completely free of android-specific classes in order to be testable via JUnit and it makes prefect sense, but let’s imagine we have some kind of repository where we obtain a list of entities from the DB and we have a Cursor object as a result. What will you do with Cursor? Will you explicitly convert in to some Collection in order not to pass Feb 22 16:57:26 a Cursor to the Presenter? What if cursor contains really big amount of data? Feb 22 17:00:32 Or maybe I should implement Iterator and pass it from my repo to presenter? Feb 22 17:23:59 If a app is built for android-6 , will it run on android-7? Feb 22 17:31:41 yes Feb 22 18:53:34 Can anyone help me remove an FRP Lock on a Samsung Galaxy S6 (SM-G920T)? Or if you know of another channel specifically for this type of help??? Feb 22 18:54:30 #android-root maybe Feb 22 18:55:04 Yea I'm in that channel too looking for help...thank you for answering though Feb 22 18:56:11 xda web forums re the best place for that sort of thing usually Feb 22 18:57:17 Yea I've searched them and found some topics but I always run into a jam and posting problem takes forever waiting for a response...so i figured I'd resort to IRC - :) I Love that IRC is still alive! Feb 22 18:58:25 I started using IRC in 1994 then BBS, even ran my own for a year lol! Feb 22 19:01:34 irc will nevah die Feb 22 19:08:09 * raoul11 dapooshes thepoosh Feb 22 19:08:16 oh yeah! Feb 22 19:09:41 what's news? Feb 22 19:09:42 sup thepoosh Feb 22 19:09:50 finishing up on this login module Feb 22 19:09:50 mmmkay Feb 22 19:09:52 i guess Feb 22 19:09:56 noice Feb 22 19:10:00 hows yer twoway auth Feb 22 19:10:05 started designing sync services Feb 22 19:10:16 we use a service called sinch Feb 22 19:10:30 to help correlate users and phone numbers Feb 22 19:10:38 and the rest is an exchange Feb 22 19:10:42 pretty regular Feb 22 19:13:00 nice Feb 22 19:13:11 u coming next week thepoosh ? Feb 22 19:13:30 I wanna but don't see it happening Feb 22 19:13:38 next week is first day of school Feb 22 19:13:48 which means I won't be home on Wed noght Feb 22 19:36:57 So MVP question, how do you manage opening a new screen if presenters are entirely disconnected from Android? Do you use an interface that the activity implements? Feb 22 19:40:57 konk3r google mvvm-c (coordinator) Feb 22 19:41:19 i think it started off in iOS land so some of the examples look like swift Feb 22 19:41:43 Cool Feb 22 19:47:09 errrr Feb 22 19:51:27 raoul11 have something to say, speak up ! :) Feb 22 19:51:56 googleapiclient pisses me off /: Feb 22 20:22:05 raoul11: go on Feb 22 20:27:51 meh, dunno if I wanna try to buy tickets for IO this year Feb 22 20:27:59 last year was an incredible disappointment Feb 22 20:28:13 how much are those pfn Feb 22 20:28:14 no value for the money Feb 22 20:28:21 1150 this year Feb 22 20:28:28 thepoosh wont invite me on his company expense Feb 22 20:28:34 pfff Feb 22 20:34:08 (rx java) with `observable.onBackpressureBuffer().onBackpressureLatest()` , is a buffer kept in the chain? Feb 22 20:35:51 Does anyone know how to get a unique device fingerprint from an android device using php that can be used for authentication with a REST API? Feb 22 20:36:35 https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID Feb 22 20:36:54 That is unique per user per device setup Feb 22 20:37:13 Hmm, and can you get that via php? Feb 22 20:37:24 you can send it as a header to your API Feb 22 20:37:32 or as a query parameter, etc Feb 22 20:37:49 Hmm. Do you have any instructions on how to do that? I've never done it before. Feb 22 20:37:51 you can't *get* that off the device unless the device sends it Feb 22 20:38:05 sending it is fine, as long as it can be done from the browser. Feb 22 20:38:11 what Feb 22 20:38:17 Ohhh Feb 22 20:38:29 Yeah. Exactly...That makes it tougher. Feb 22 20:38:29 This is part of the android api. not chrome's javascript api Feb 22 20:38:37 hmmm idk Feb 22 20:38:48 what problem are you trying to solve, maybe I know of a different way Feb 22 20:39:42 Well, the client wants a progressive web app that works in the web browser and is offline first. The REST API will be used to send the data to the client side, which has it's own framework. I need some way to identify the device without using a login, because they don't have a login system, but instead identify themselves by device id and with a pin code. Feb 22 20:40:10 I am wondering if I might have to just resort to a login system anyway or something. I don't really want to, but it's seeming like that's my only option. Feb 22 20:40:27 Since you're using offline-first, you're likely using the local storage javascript api Feb 22 20:40:40 yeah. IndexedDB Feb 22 20:40:55 You can generate your own ID, but it is subject to loss in the same way that the offline-first data is subject to loss Feb 22 20:41:05 They would need to re-register their device if that ID is lost. Feb 22 20:41:33 Generate it how? and would it be secure enough? Feb 22 20:41:51 device id would effectively be a username, and pin would be a password Feb 22 20:42:00 except the user doesn't know their device ID. Feb 22 20:42:04 they know their pin Feb 22 20:42:06 but not the device ID. Feb 22 20:42:11 since they're using pin numbers i dont imagine they have a big emphasis on security anyway Feb 22 20:42:12 that's handled automatically in the systems they're currently using. Feb 22 20:42:21 gotcha Feb 22 20:42:24 haha, believe it or not, this is the police we're talking about here. xD Feb 22 20:42:33 damn Feb 22 20:42:39 doesn't surprise me Feb 22 20:42:56 something about government systems being built by the highest bidder Feb 22 20:43:04 well Feb 22 20:43:07 Yeah. I know what you mean. Although this is technically a prototype to hand over to the client and then the web app will be further developed by their own tech team. Feb 22 20:43:28 But, to me, it seems like it's just overcomplicated for no reason in some places. Feb 22 20:43:34 especially with the authentication Feb 22 20:43:37 the correct answer is to build a real login system, it isn't much different than what they already have Feb 22 20:44:03 i mean, if it’s a prototype, do you need to worry about auth? Feb 22 20:44:03 so how does the user know what pin they need to enter? Feb 22 20:44:30 Well, since it's a REST API, it needs some form of authentication even in a prototype. You don't want someone going and messing with the data even in a prototype. Feb 22 20:44:52 how does the user get the pin to enter? Feb 22 20:44:59 oh wait i just asked that Feb 22 20:45:07 i'm going in circles in my own head Feb 22 20:46:08 Yeah. I am too. xD Feb 22 20:46:11 Now you see my predicament. lol Feb 22 20:47:12 but was is the answer to that question? Feb 22 20:47:36 No idea. I assume they have some kind of register for the devices and then the pin numbers are assigned to each one. I dunno. Feb 22 20:47:40 Each device belongs to one person. Feb 22 20:47:48 So it never changes. So they could register a pin code to each device id. Feb 22 20:48:00 do that as a form of login. Feb 22 20:48:12 But....actually doing that on the web interface is going to be near impossible. Feb 22 20:48:30 I thought it was, I just wanted to see if anyone had a novel idea for it .xD Feb 22 20:50:25 (there is nothing wrong with using a pin as long as it gets locked with few attempts (retry counter) and as long as where the pin and the retry counter are stored in a place "secure enough") Feb 22 20:51:45 Hmm. I guess so. Feb 22 20:52:11 BlackHorn, you could generate a guid-like on your device, very low probability to have a collision Feb 22 20:52:30 and you can still upload it to one of your server to check if the guid already exists (in this case, you regenerate) Feb 22 20:52:57 Hmm. I guess. Feb 22 20:53:09 I am thinking that either way, it's going to be annoying to handle. lol. Feb 22 20:53:28 those things are not specific to android Feb 22 20:54:14 you're reaching closer and closer IAM (identity and access mngmnt) since you want to identify and authenticate your users it seems Feb 22 20:54:33 this will cost you a leg, or lot of time Feb 22 20:54:47 Yeah. I think I might just have to simplify it and go with a login system. Feb 22 21:42:42 Ok, I open an OutputStream and run it through some crypto. I'm getting an excessive amount of allocations when I .write(...) to my CipherOutputStream, buried in com.android.org.conscrypt Feb 22 21:42:57 Any miracle workers here have any ideas how to decrease that alloc count? Feb 22 21:54:28 Basically this line gets called a lot, if I make it not get called, I'll be fine. https://android.googlesource.com/platform/external/conscrypt/+/4757cdbe3c9e06f243a8cb07086ced5537d69af2/src/main/java/org/conscrypt/OpenSSLCipher.java#383 Feb 22 21:58:23 so dont make it called Feb 22 22:00:01 thumbs_up_emoji.jpg Feb 22 22:00:30 Yea, I think if I make sure the input to the cipher is of a certain length than it will avoid the copy altogether Feb 22 22:06:31 So… how do you guys manage libraries like Glide while trying to maintain MVP or MVVC? Feb 22 22:06:45 It seems like those would have to go into the View, but they also seem like presenter logic Feb 22 22:07:46 The data to me is the URL Feb 22 22:08:10 The view can "draw" the url via Glide Feb 22 22:08:41 That’s what I was thinking of doing, but it feels about as far as you can stretch it without having it be presenter logic Feb 22 22:08:44 But, you could also make the same argument that the data is the actual Bitmap. So, the presenter would decode it and push it to the view Feb 22 22:09:59 I personally push the URL onto my views Because It Is Easier™ and justify it by saying that I don't need it refactored out in order to test Glide itsself Feb 22 22:10:42 But yea, I agree with you. It is a line really that you can draw Feb 22 22:12:45 explodes: you don't "draw the URL" unless you render the string of the URL. Your data is the bitmap Feb 22 22:15:22 I totally know what you mean. And I even agree with you. I suppose my statement that "it is easier" isn't true either. I'm sure Glide has a mechanism like picasso where you can just handle the bitmap yourself once it is decoded. Feb 22 22:20:34 I'm going to apply for an Android job. I'll have to try my best to persuade somebody to hire me for a job that I don't care about. Feb 22 22:22:35 why not trying to work in a field where you might care about your job, Melatonina? Feb 22 22:23:03 explodes, i don't think you can avoid those allocations Feb 22 22:23:26 maybe write per bigger buffer block Feb 22 22:23:43 but some algo will not like that maybe Feb 22 22:24:31 adq: Yea, reading more into the code, my assumptions were wrong. Those look almost impossible to avoid. Feb 22 22:36:50 adq: Because I have a scientific attitude more than an engineering attitude. I've not been given the opportunity to follow a path of study where I would belong and I lost 20 years of my life to understand that. I'm studying NLP while working on my Android project but any idea of an academic career, in any field, is ridiculous. Feb 22 22:37:41 well, i disagree :) but it's up to you to find your own path for sure Feb 22 22:38:05 What do you disagree with? Feb 22 22:38:30 that any idea of an academic career, in any fields, is ridiculous Feb 22 22:38:50 maybe you would love teaching what you know, who knows Feb 22 22:39:04 knowledge transmission is extremely important Feb 22 22:39:11 (and storage too) Feb 22 22:41:04 also "scientific attitude" is kinda very blur, like take a reasoning in maths or philosophy versus a reasoning in biology or a reasoning in physics, or etc.. reasoning in CS Feb 22 22:42:21 and finally, idk how you can quantify a loss of amount time without the other cloned experiment with this different factor you believe would not have make you lost 20 years (maybe 40? :)) Feb 22 22:42:40 i thought i was disagreeing with only the end, but it's on everything lol Feb 22 22:43:22 i just think it makes no sense to try to be hired for something you owuld not care, except if you don't have any choice and need food in plates and bed under roof Feb 22 22:51:05 I see no other choices. The only choice I see is trying to make as much money as I can in any possible way and hope I figure how to make something meaningful out of it. Sorry for this discussion. These are things that make me very angry and sad. It's better if I try and do some work and write the application letter for that job. Thanks for listening and for sharing your point of view. I'll think about what you said Feb 22 22:55:24 yeah for sure do it Melatonina, but next time try to target a place/job that you would care about Feb 22 22:55:57 from what i heard, the offer in skilled android dev seems higher than its respectiv demand on the market Feb 22 22:56:22 of course, there are plenty of offers for junior dev or trainees Feb 22 22:57:28 i was "suprisingly suprised" when i heard that in town like paris, many companies seem to struggle finding an experienced android dev Feb 22 23:01:59 This job is in Milan, the second largest city in Italy, its business capital Feb 22 23:04:10 The product is advertised multiple times a day on TV Feb 22 23:13:08 molto bene Feb 22 23:13:52 first time i drove in italia, i forgot green and blue for highway and regular road where swapped compared to france ;') Feb 22 23:14:13 green and blue panels* Feb 22 23:58:43 android devs can get jobs ?? Feb 22 23:58:58 * capella starts googling again Feb 22 23:59:57 I'm using a ImageView, and I'm trying to call "setImageDrawable" on it, with a class that extends Drawable. In my draw() method in the Drawable class, I have just "canvas.drawRect(0, 0, 100, 100, this.paint);", but nothing is getting drawn. It does work when I call setImageBitmap with a Bitmap though. Any thoughts? Feb 23 00:06:32 thomasross: maybe color is the same as background? Feb 23 00:08:13 DoITCreative: Maybe... I doubt it though, because before I was trying to draw a bitmap on the canvas and still getting the same issue Feb 23 00:11:03 thomasross: maybe alpha then? Feb 23 00:12:02 DoITCreative: i'm not using an alpha anywhere...? Feb 23 00:12:30 thomasross, you need to call .invalidate() on your view doing the draw call Feb 23 00:13:03 setImageDrawable probably triggers it, no clue check the source but otherwise you have to tell the view to be redrawed via invalidate Feb 23 00:13:51 adq: no luck. I'm using the ImageView inside a RecyclerView if that helps.. Feb 23 00:14:17 and yeah, invalidate is called by setImageDrawable Feb 23 00:14:59 uh indeed then idk, why not just making a custom ImageView where you draw your rect inside this custom class? Feb 23 00:15:34 well what I'm _actually_ trying to do is draw a couple of bitmaps inside it, but I need to make this work first ._. Feb 23 00:16:24 It can be issue with target system. Try to target different version of android Feb 23 00:16:48 okay, I don't think there's an issue with the Drawable itself -- I tried using it inside a random FAB and it works Feb 23 00:17:53 the imageview previous drawable is also gone when I set the new drawable Feb 23 00:18:59 setBackground is working Feb 23 00:27:54 Hey guys, how can I get from kernel 3.10.105 to 3.11?. Feb 23 00:28:22 start by reading the topic Feb 23 00:28:42 ? Feb 23 00:36:58 reujea0: This is for app dev. Stop asking in multiple channels. Feb 23 01:10:37 ugh, this is super frustrating. setBackground only works when I set a srcCompat in XML.... Feb 23 01:32:52 https://medium.com/dartlang/zero-to-one-with-flutter-43b13fd7b354 Feb 23 01:35:14 I'm using a ImageView, and I'm trying to call "setImageDrawable" on it, with a class that extends Drawable. In my draw() method in the Drawable class, I have just "canvas.drawRect(0, 0, 100, 100, this.paint);", but nothing is getting drawn. It does work when I call setImageBitmap with a Bitmap though. Any thoughts? Feb 23 01:35:36 hey g00s Feb 23 01:35:43 hey Napalm Feb 23 01:36:07 thomasross: what? Feb 23 01:37:04 thomasross: ImageView.setImageBitmap() takes a Bitmap.. ofc it works Feb 23 01:37:24 yeah. setImageDrawable() isn't working though :( Feb 23 01:37:36 pastebin your drawable class Feb 23 01:37:50 alright, 1 sec Feb 23 01:38:23 https://hastebin.com/bavuzezeyu.java Feb 23 01:38:40 you dont manage the bounds Feb 23 01:38:42 if it changes anything, i'm trying to use this drawable on an ImageView which is a recyclerview list item Feb 23 01:38:55 hm.. Feb 23 01:39:00 i was doing that Feb 23 01:39:02 in the class Feb 23 01:39:11 that sets the imageview to use that drawable Feb 23 01:39:23 is that wrong? Feb 23 01:39:36 override getIntrinsicWidth() and getIntrinsicHeight() and return 100 each Feb 23 01:40:20 asduifgasdhkgfasdhjkgfasdhjkgasdfhjkgfasdhjkgasdfhj Feb 23 01:40:21 then override onBoundsChange and Log out the Rect to verify your getting a 100x100 size assigned Feb 23 01:40:24 thank you... Feb 23 01:40:29 i just spent like 900 years on that Feb 23 01:41:10 your draw function should really use the bounds given to you by onBoundsChange have a private final Rect mBounds = new Rect(); and in onBoundsChange do mBounds.set(bounds); Feb 23 01:41:33 then the width and height of your rect would be the size of the drawable Feb 23 01:41:47 the drawable size is assigned by its host Feb 23 01:41:58 with setBounds? Feb 23 01:44:19 ...or automatically? Feb 23 01:47:03 Napalm: ^ Feb 23 01:47:41 thomasross: what are you asking? Feb 23 01:47:47 08:41 < Napalm> the drawable size is assigned by its host Feb 23 01:47:59 do I do that programmatically with setBounds or does the layout decide? Feb 23 01:48:46 ImageView decides if I remember correctly, but thats why i said log onBoundsChange() if it doesnt get called, your Drawables bounds where not set so you can set them with setBounds Feb 23 01:49:15 okay, and in getInstrisicWidth/Height do I have to return the bounds set in onBoundsChange? Feb 23 01:50:01 no, these are the hints to ImageView about what size you would like to be Feb 23 01:50:22 READ THE DOCS Feb 23 01:50:40 OKAY SORRY, THANKS FOR THE HELP! :] Feb 23 02:11:00 thomasross is you are doing a lot with bitmaps, look at Glide Feb 23 03:00:00 wow, holy shit https://www.reddit.com/r/androiddev/comments/5vkria/no_time_limit_on_customer_refunds_anymore/ **** ENDING LOGGING AT Thu Feb 23 03:00:02 2017