**** BEGIN LOGGING AT Wed Nov 25 03:00:55 2015 Nov 25 03:06:28 Losing my mind a bit here, hoping someone can help. I have a built, signed Android app (built using PhoneGap), works perfectly in an emulator. But when I try to install it on a device, I get "App not installed" Nov 25 03:06:58 I run "jarsigner -verify", and can confirm that the app is signed. Nov 25 03:08:49 There are no duplicate lines/definitions in my AndroidManifest.xml file, so I have no idea why it's failing. Unfortunately, the error message is very vague. :( Nov 25 03:11:47 Anyone have code for how to make a inner bevelled rectangle (for divider)? Nov 25 03:19:47 hi Nov 25 03:20:09 I can't get shrinkResources to remove unused image from the apk Nov 25 03:20:40 do I need something in the proguard to flag unused resources ? Nov 25 03:30:00 it should be automatic Nov 25 03:37:08 Score! Figured out my issue. Was compiling an x86 app. Device is armv7. Nov 25 03:37:12 'Night peeps. Nov 25 03:46:00 mornin' all Nov 25 04:09:01 is this chat even active? Nov 25 04:11:13 With 439 users, I would hope so. Nov 25 04:11:29 All you have to do is ask a question which is difficult, but not too difficult, to answer. Or say something slight controversial. Nov 25 04:11:40 slightly* Nov 25 04:11:40 lol sounds good Nov 25 04:11:52 been trying to find a good community of Android Devs Nov 25 04:13:00 This is the best one I've found. /r/androiddev, by comparison, kinda sucks. Nov 25 04:13:29 yea thats the best i've found to.....every once in a while there will be a decent post Nov 25 04:14:24 saw one on Kotlin earlier today where a guy open sourced his project Nov 25 04:14:26 good resource for sure Nov 25 04:14:55 There's also #kotlin, but all the Kotlin people are on Slack now. Nov 25 04:15:33 what is Slack? Nov 25 04:15:37 Though some are here too. Nov 25 04:16:08 It's like IRC but the 2015 version. Nov 25 04:16:16 https://twitter.com/kotlin/status/646998583389110272 Nov 25 04:16:43 android-dev790: crappy instant chat thing that all the kids are using these days Nov 25 04:17:00 hmm... i see Nov 25 04:17:02 never heard of it Nov 25 04:17:13 this is my first time being on an IRC channel it prolly 15 years lol Nov 25 04:17:27 I don't like it because users can't hide their e-mail addresses. Nov 25 04:17:34 any other IRC channels you guys would recommend? Nov 25 04:17:52 ahh i see...yea thats a big no bueno Nov 25 04:18:06 There's ##git and #mercurial for DVCS questions. Nov 25 04:18:15 Though they get boring after a while. Nov 25 04:18:43 Oh, #git. Nov 25 04:20:03 cool thanks Nov 25 04:21:05 anyone here try out the new Android Studio? Nov 25 04:22:19 Some people have. Not sure how much success they've had with it. Personally, I've given up on trying pre-release ASes now. Nov 25 04:22:55 slack is really mean more for teams to communicate than for public channels Nov 25 04:22:57 i'm tempted because of the instant feature but i've seen some chatter about builds failing Nov 25 04:23:23 instant run is so overrated right now Nov 25 04:23:28 it can't handle anything Nov 25 04:23:44 no resources, large kinds of code changes, most plugins, etc Nov 25 04:24:04 I'm sure it can handle exactly the things that were demonstrated and not much more - that's what demos are for! Nov 25 04:24:29 hmm..it sounds like it just good for maybe checking UI Nov 25 04:25:29 One question I have is of whether it'll eventually support Kotlin. Nov 25 04:26:14 yea that's a good question Nov 25 04:26:25 i'm really interested in Kotlin...just too lazy to take the time to learn it Nov 25 04:26:34 seems like it takes less code to get things done though Nov 25 04:27:39 It addresses many problems with Java (especially Java 6/7). Nov 25 04:28:27 protify supports kotlin today Nov 25 04:28:49 has ever since kotlin-plugin was written Nov 25 04:30:00 android-dev790, learning to work idiomatically in many languages makes you a better programmer Nov 25 04:30:23 what is protify? Nov 25 04:30:59 android-dev790, https://youtu.be/LJLLyua0bYA Nov 25 04:31:57 wow Nov 25 04:32:02 thats pretty damn cool Nov 25 04:32:11 pin thanks for the info Nov 25 04:32:24 pfn* Nov 25 04:33:03 TacticalJoke: Slack is IRC but the 2015 version, or the 1982 version depending of the perspective Nov 25 04:33:43 Marlinski: without the R Nov 25 04:33:59 every modern "innovation" is just a refactoring of what already exists in a more centralized, controlled closed and blackboxed way Nov 25 04:34:04 there's only a few things protify doesn't support, multiprocees is one Nov 25 04:34:31 Yeah, I don't like that aspect of it. Nov 25 04:35:08 yea definitely cool concept though Nov 25 04:35:49 from decentralised mail to whatsapp, decentralised network of IRC server to slack, decentralised sip to skype, and so on Nov 25 04:35:57 it works reliably today, I use it on all my personal and professional projects Nov 25 04:36:57 slack looks like it has a nice UI, but it isn't even interesting from a technology perspective Nov 25 04:36:58 it's kind of hilarious, one of my projects is still 120k method id's after proguard.. m Nov 25 04:37:10 all java Nov 25 04:37:23 needs proguard *and* multidex Nov 25 04:37:27 even the protocols like IP are attacked with "smart iot" using a controlled and centralised network like sigfox Nov 25 04:38:00 g00s: Is there something that looks interesting? Just wondering, as I haven't looked into this. Nov 25 04:38:14 I kinda like IRC best so far, despite its flaws. Nov 25 04:38:15 guess openness and decentralisation is not as trendy now Nov 25 04:38:24 well, protify and it doesn't need proguard or multidex Nov 25 04:38:29 yea its definitely not these days Nov 25 04:38:51 never heard of SigFox Nov 25 04:39:06 one of the main actor in IoT networking Nov 25 04:39:27 it is basically a GSM network for thing, very low power, low throughput Nov 25 04:39:38 and low cost, but high range Nov 25 04:39:38 ok makes sense Nov 25 04:39:46 can anyone please take a look at this? http://stackoverflow.com/questions/33818936/senduseractionevent-is-null-galaxy-s5 i have no idea what to do Nov 25 04:40:05 lol i see galaxy s5 in the URL and i'm already worried Nov 25 04:40:12 i'll have a look Nov 25 04:40:20 TacticalJoke i saw a few things but didn't look at them (network effect) Nov 25 04:41:50 thank you android-dev790 Nov 25 04:42:48 Rush2112: What makes you think that's related to your code? Nov 25 04:43:47 I don't know. I haven't gotten that error on other apps run on the same device. Nov 25 04:43:48 ludkiller very odd that mView is showing in logcat Nov 25 04:44:10 i surprised nobody talked about Brillo at this Android Summit Nov 25 04:46:34 ludkiller actually i would start with separating those onClickListeners and debugging from there....otherwise sorry but no idea on that one Nov 25 04:46:55 are you talking to me? ludkiller left the group i think Nov 25 04:47:13 yea i was talking to ludkiller Nov 25 04:47:40 oh well, let me know when you get a chance to look at what i posted! Nov 25 04:50:30 Rush2112: Google that message. There are quite a few SO questions on it. Nov 25 04:57:10 i did google that message Nov 25 04:57:22 i said so in my SO question that the solutions involve changing code which doesnt exist in my program Nov 25 04:57:33 TacticalJoke i'm pretty sure i saw hans dockter at the Android Summit. i wonder if google has him in the wings for gradle plugin development :D Nov 25 04:59:42 Would be interesting. But I wonder whether they'd just have to move away from Groovy to maximize speed (if that's what they'd be working on). Nov 25 05:02:01 OMG, this is so funny. Sourcetree starts up, and says "new version available 2.0.5.7 - fixes crashing bug few seconds after startup", and then crashes before i got to say update Nov 25 05:02:35 TacticalJoke i think gradle stuff is getting there performance wise Nov 25 05:03:10 its just so damn complicated :D Nov 25 05:10:29 Anybody know how I can send a ping to an IP and store its resulting output? Nov 25 05:35:15 the android gradle plugin is overly complicated Nov 25 05:35:25 reading their sources make my brain hurt Nov 25 05:36:10 What is the best design choice for displaying different views of same data? I have a list that can be either displayed in a grouped way, sorted by date, or sorted by value. Where and what kind of switcher would be appropriate? Nov 25 05:36:28 My floatingactionbutton is a plus, that lets users add new items to list Nov 25 05:37:18 I don't want to do tabs, since they imply you transition between different sets of things, while here the things you are looking at are not changing, just how they are displayer Nov 25 05:37:22 displayed* Nov 25 05:40:01 lol dianne's only tweet "sorry I hate twitter and have no idea what this comment is about :)" Nov 25 05:40:33 pfn yeah, hearing all the stuff it does i'm thinking you need a PhD to work on it Nov 25 05:41:39 cool all the videos are up already https://www.youtube.com/playlist?list=PLWz5rJ2EKKc_Tt7q77qwyKRgytF1RzRx8&linkId=19033246 Nov 25 05:51:49 it's not thay Nov 25 05:52:11 the plugin and task system is stupidly complicated Nov 25 06:52:25 so has anyone used the new emulators with android studio 2? Nov 25 07:57:39 any idea why this wont return true on the emulator? ContextCompat.checkSelfPermission(this.getBaseContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED Nov 25 08:18:19 so how can i get raised buttons on api 15+? cardview seems like its good, but how do i get the shadow to change on click? Nov 25 08:22:07 Hi. I have a small class to display a meter. I want to use that in a fragment. this works fine for the first time, but when i close and reopen the fragment and call init(), my imageview appears not to have been drawn and therefore returns no width/height to create my overlayBitmap. http://paste.ubuntu.com/13500985/ Nov 25 08:23:03 I tried putting the init() call inside my fragment's onActivityCreated(), but to no avail. What am I missing here? Nov 25 08:23:33 onResume? Nov 25 08:24:07 thornekey: that was my initial implementation, height() and width() at that point are 0. Nov 25 08:24:21 Hmm Nov 25 08:28:14 So teh difference is, that when I first open teh fragment, i have to press a button to start the meter. fi i do not stop and leave leave/re-enter teh fragmemnt, then the fragment should check the state of teh analysis (running in a service) set teh button accordingly and reinitialize the meter. Nov 25 08:28:44 any idea why this wont return true on the emulator? ContextCompat.checkSelfPermission(this.getBaseContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED Nov 25 08:28:45 I really have to wotr on my 'the' Nov 25 08:38:25 thornekey: does your emulator support location? Nov 25 08:38:40 not quite sure how id set that up Nov 25 08:38:54 im just using AVD manager with android studio Nov 25 08:39:59 is there a way to set that up ? Nov 25 08:40:05 try http://developer.android.com/tools/devices/emulator.html#geo Nov 25 08:42:47 emfeld: this is a stupid question, mainly cos ive nvr had to use it.. where do i find the 'emulator console'? or is that just the terminal Nov 25 08:42:49 lol Nov 25 08:43:31 hey guys, i'm trying to write a program where the user has a "balance" read from text file that's displayed on app startup. then the user can press a button to add/subtract value from that balance, which is written to text file. the balance should update upon this, so i would then do another read from text file. i've already coded this process over at http://hastebin.com/jikoyokevu.avrasm could anyone please take a look and t Nov 25 08:43:36 this? i feel like i'm overcomplicating things Nov 25 08:44:18 thornekey: scroll up a bit on that page http://developer.android.com/tools/devices/emulator.html#console :) Nov 25 08:44:33 and yes that would be using the terminal Nov 25 08:44:39 asuming you're on *nix Nov 25 08:47:53 Hmm ok Nov 25 08:51:44 That does not work O.o Nov 25 08:54:07 also, does anyone know how to fix the senduseractionevent() mview == null issue? im using a samsung s5 and i don't have the luxury of using a different device Nov 25 09:11:52 i feel like the geo command is broken? Nov 25 09:24:28 why do i keep getting this error Nov 25 09:24:29 'adb' is not recognized as an internal or external command, operable program or batch file. Nov 25 09:26:26 maybe its not universal.. Nov 25 09:26:36 ive set it as universal Nov 25 09:26:46 + im opening terminal from the folder Nov 25 09:27:01 terminal from folder? :/ windows? Nov 25 09:27:09 yep Nov 25 09:27:15 and terminal in and studio Nov 25 09:28:02 try from cmd dos, check if its working there.. if no, then check the settings from scracth Nov 25 09:28:10 ok Nov 25 09:33:10 ok ive managed to connect into it Nov 25 09:33:29 why is this happening when i use geo fix? http://picpaste.com/pics/ex-ZGrJNvvd.1448443974.png Nov 25 09:33:38 im connecting to the device via telnet Nov 25 09:49:38 <_vaibhavingale_> hi, am compiling android from source, I got error as:make: *** No rule to make target `external/ffmpeg/libavcodec/arm/dsputil_vfp.S', needed by `out/target/product/generic/obj/SHARED_LIBRARIES/libamffmpeg_intermediates/libavcodec/arm/dsputil_vfp.o'. Nov 25 09:49:39 <_vaibhavingale_> any pointers for resolve? Nov 25 09:50:05 Hi Guys, does the Navigator Drawer work on Android 4.1.1 ? Nov 25 09:52:31 is there a way to play video from inputstream on android versions below 6.0? Nov 25 10:03:11 vompatti, perhaps ExoPlayer gives a good API for it? Nov 25 10:10:01 i keep getting this catch exception thrown.. it says " provider is null" https://ideone.com/UGFwow Nov 25 10:10:09 how do i set the provider on the emulator? Nov 25 10:11:43 Can you recommend a good tutorial for MVP? I want to keep my Activities/Fragments clear of business logic, but need an intermediate layer between the core business logic and the UI layer. Nov 25 10:18:25 anyone have a quick guide for how to make a 360-degree panorama image viewer app for VR glasses? that is, exactly what the middle column here promises but fails to deliver: http://www.samsung.com/us/samsungdeveloperconnection/developer-resources/gear-vr.html the instructions are in part for SDK 0.6, whereas 1.0 is out already Nov 25 10:36:52 Hi, does anyone know how i can fix my Rom building error? I stops telling me something about libqmi. I have tried intalling everything i can find about libqmi in app manager in ubuntu 15.10 Nov 25 10:38:56 wrong channel Sv1ngen, try #android-root or your rom channel Nov 25 10:39:12 @adq ah, sorry about that Nov 25 10:41:42 can anyone help answer this Nov 25 10:41:42 http://stackoverflow.com/questions/33914085/place-google-maps-marker-in-users-location-provider-is-null?noredirect=1#comment55589821_33914085 Nov 25 10:44:01 thornekey: are you following a tutorial? Nov 25 10:44:07 no Nov 25 10:44:17 should i be? Nov 25 10:44:30 I assume that's your question? Nov 25 10:44:38 I was wondering where you got the code from that's in there Nov 25 10:44:48 thats my code Nov 25 10:45:07 i just want to know why the provider is not set Nov 25 10:45:11 im using an emulator Nov 25 10:45:17 like, will it be set on a real device? Nov 25 10:45:40 in my try/catch i keep gettin the exception "provider is null" Nov 25 10:47:48 What can I do if I want to have a separate test build under a different namespace so that two apps can live next to each other on my phone? Nov 25 10:48:38 thornekey: what emulator do you use? Nov 25 10:48:46 um Nov 25 10:48:53 Android studios one? ahahha Nov 25 10:49:18 Arthur_Sa: if thats what you mean Nov 25 10:49:43 thornekey: Well in GenyMotion you have to enable your GPS from settings... that's why i'm asking? Nov 25 10:50:08 thornekey: Otherwise you could follow the more updated method to retrieve the user location http://developer.android.com/training/location/retrieve-current.html? Nov 25 10:50:09 Ah, shall i try that one? Nov 25 10:50:25 ill take a look at both, thanks Nov 25 10:50:29 thornekey: also Google's best practices at the moment are to use the Google Play location services Nov 25 10:50:54 Uhh yeah, that one ^ Nov 25 10:51:14 Hi. I'm having some issues with a post request via HTTPURLConnection. Get requests works fine, as do posts via chromes postman. When I try to post from java nothing happens server side. If I read the response I get the same thing as if I were to send a GET request without parameters. Tried alot of different variations of http://pastebin.com/xgqCTq8d Any idea where to start looking? Nov 25 10:51:15 Your Google Maps code looks like it's using an old version of the Play Services library too Nov 25 10:51:36 oh Nov 25 10:52:28 thornekey: Make sure you check the link i sent you. It uses the latest method to get location with Google Play services Nov 25 10:52:40 laggikoN: I can't see connection.setRequestMethod("POST") ? Nov 25 10:53:04 I am using CAB with AbsListView.MultiChoiceModeListener. Inside new instance of AbsListView.MultiChoiceModeListener I have declared variable HashMap to preserve selected items values. Problem is that display rotation errase variable with selected items. How can I (do you) overcome this problem? Nov 25 10:53:10 Estel I've tried with that aswell. All the posts i've found about it says that setDoOutput defaults it to post Nov 25 10:54:13 Arthur_Sa: so the stuff i wrote for my code is irrelevant now? Nov 25 10:54:14 :) Nov 25 10:54:21 like, use that example Nov 25 10:54:36 bolovanos: google -> onSavedInstanceState() Nov 25 10:54:50 Estel: Tried again with setRequestMethod("POST"). Same result. I'm thinking it might be something outside of my java code, but i have no idea where to start looking Nov 25 10:55:15 Like with encoding, or settings on the webserver or something. But I could really use some pointers Nov 25 10:55:24 i added leakcanary to my app, and i also have crashlytics. Now i want to use https://gist.github.com/pyricau/06c2c486d24f5f85f7f0#gistcomment-1455995 to send a report to crashlytics when a leak is detected. But now LeakCanary.install requires a third parameter of type ExcludedRefs.. what do i initialize it with? Nov 25 10:56:21 thornekey: Yes. Google Services will handle the location with FusedLocation provider. It checks the best way to get the user location(GPS, wifi etc..), plus it saves battery Nov 25 10:56:24 Arthur_Sa, ok - I was there and do not know how to implement it - where Nov 25 10:57:22 bolovanos: Learn to google mate. There are plenty of tutorials/articles about it Nov 25 10:57:25 Arthur_Sa, I am implementing AbsListView.MultiChoiceModeListener inside StableAdapter class Nov 25 10:58:06 and AbsListView.MultiChoiceModeListener - does not support onSaveInstanceState(Bundle savedInstanceState) Nov 25 10:59:15 bolovanos, can you please point me at the one, which is functional - because, as you can se, I was googling and got nothing functional Nov 25 11:07:22 Arthur_Sa: in that example you sent me, they set a textviews text when last location is not null, what should i do in my case? Nov 25 11:07:41 call the draw marker function, from my code i sent earlier? Nov 25 11:07:54 Anybody here know their way around httpurlconnection and have some time to try to help me? Nov 25 11:10:26 Why does not instant run detect when I change resource dimen values? Nov 25 11:10:42 Just says no changes and doesn’t rebuild. Nov 25 11:10:43 cezium: you should write a bug report Nov 25 11:10:48 b.android.com Nov 25 11:14:39 Estel: ive changed it to the latest library, ect, and used the example from arthur, but do i still need my tr/catch now? Nov 25 11:15:08 thornekey: you shouldn't need a LocationManager/LocationProvider at all Nov 25 11:15:30 where should i call my AddMarker method to place my marker Nov 25 11:15:37 in the interface onConnected? Nov 25 11:15:53 just connect to the Google API client, then get the last known location from the FusedLocationProvider Nov 25 11:17:38 im talking specifically about adding a marker. Nov 25 11:18:07 is there a way play video from InputStream with ExoPlayer? Nov 25 11:18:20 ill show you what ive got right now Nov 25 11:23:05 http://pastebin.com/BKW3NeKt L77 Nov 25 11:23:08 Estel: Nov 25 11:24:33 Estel: because i changed the services library it now says it was run unless i update google play services.... Nov 25 11:36:58 is romain back on the android team? Nov 25 11:39:03 I want an area (a rectangle) under my toolbar for notifications, that will slide down and consume the space of the view below it Nov 25 11:39:10 is there an existing widget for this sort of thing? Nov 25 11:39:15 looked around a bit. Nov 25 12:01:01 why wont onStart or onConnected fire in this android app? http://pastebin.com/1L0fkBQ0 Nov 25 12:02:36 hi, everybody. is there any easily deployable scripting solution for android? i have found sl4a, but it seems to be abandoned long time ago. Nov 25 12:03:58 what is the name of the simple hashmap that android has? can't remember the name of it >_<" Nov 25 12:13:12 i try to connect with this line mGoogleApiClient.connect(); but when i debug if its connected it says it isnt Nov 25 12:21:23 can i use gmail icon in my app ? could be any licence problem ? Nov 25 12:21:38 I found an example of MVP here: https://github.com/antoniolg/androidmvp/blob/master/app/src/main/java/com/antonioleiva/mvpexample/app/main/MainActivity.java In this example onClicklistener are set using listView.setOnItemClickListener(this); But how do you handle this pattern if you have multiple different onClickListeners? Nov 25 12:23:48 sci-fic, probably not Nov 25 12:24:02 to the first part of your question Nov 25 12:24:07 probably to the second Nov 25 12:25:57 i try to connect with this line mGoogleApiClient.connect(); but when i debug if its connected it says it isnt Nov 25 12:29:29 tx:i forgot saying. icon will be used in " share this app via gmail " Nov 25 12:48:32 hi... any idea how to get next alarm time in console in unix-timestamp format? im able to get it in format like "Fri.,20:10" with this command: $(eval sqlite3 -column /data/data/com.android.providers.settings/databases/settings.db \'select value from system where name = \"next_alarm_formatted\"\') Nov 25 12:57:19 maybe there is a command to convert? i tried "date".. but this version does not know "-d" Nov 25 12:58:29 i keep getting this error:Client must have ACCESS_FINE_LOCATION permission to request PRIORITY_HIGH_ACCURACY locations. Nov 25 12:58:34 but ive got the permissions.. Nov 25 13:01:12 did anyone run into ActionMode invalidation bug? https://code.google.com/p/android/issues/detail?id=159527 Nov 25 13:02:00 do you use that suggested workaround with success? Nov 25 13:19:24 thornekey: you call .connect() and after a while a callback is called with a result, after that you may use the functionality Nov 25 13:20:39 osxorgate: thats kinda solved itself now.. but it seems now my map wont show just the tiles itself from the map Nov 25 13:20:43 mind taking a look Nov 25 13:20:44 ? Nov 25 13:29:18 http://pastebin.com/QvJvZxS7 it doesnt like line 92, 208, or 213 in regards to my previous msgs Nov 25 13:53:59 hi, from android docs "When your activity is destroyed because the user presses Back or the activity finishes itself, the system's concept of that Activity instance is gone forever because the behavior indicates the activity is no longer needed.". Nov 25 13:55:11 So the only way to recreate the (let's say chat messages between two users) when back was hit, is to store everything in DB or sharedPreferences, loop over the messages and repaint them? Nov 25 13:57:20 I got a question do i need a domain for when i make my projects in android studio? Nov 25 14:01:46 I'm debugging an app, and I found someone in MainActivity's onBackPressed() { Intent setIntent = new Intent(Intent.ACTION_MAIN); setIntent.addCategory(Intent.CATEGORY_HOME); setIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(setIntent); } Nov 25 14:02:02 Is this a common way of doing things? Why not just do finish(); ? Nov 25 14:02:16 never mind Nov 25 14:20:00 hmm Nov 25 14:20:05 I have a recyclerview with a grid layout Nov 25 14:20:21 seems that it is not distributing each one evenly width-wise Nov 25 14:34:40 ugh, I really wish gradle could cache dependencies into ~/.m2 Nov 25 14:58:00 Hello guys, I managed to get push notification from Parse.com service. Next thing I want to know is, how I can open a custom Intent from the notification manager. Anyone has experience with this? Nov 25 15:14:27 i am trying to get the git-sha in my app, using donnfelker's method: http://www.donnfelker.com/why-you-should-use-a-git-sha-in-your-crash-reporting/ Now i get the following error: Error:Could not find property 'gitSha' on BuildType_Decorated{name=debug, blahblah...} anyone know what could be wrong? Nov 25 15:15:52 oh meh, the def should be above the call Nov 25 15:15:58 oldschool :( Nov 25 15:40:37 Hi Nov 25 15:41:11 Greetings. I have a layout question. In this layout: http://dose.se/~madman/pics/screenshots/HappyTail/floating_button.jpg Nov 25 15:41:55 can I make that TextView become less wide if the floating button at the bottom gets so far up that it covers it? Nov 25 15:42:09 I'm doing some research for an app I'm creating for a special needs school. It involves attempting to trace a set of basic shapes, and I need to find the area between the line drawn on a canvas and the 'target' shape Nov 25 15:42:27 e.g of shape: / or | or _ Nov 25 15:43:00 I was planning to use trapezium rule, but it seems like a very CPU intensive process Nov 25 15:43:16 any suggestions for an algorithm to find the area between two lines? Nov 25 15:43:51 I am doing this for free by the way, I'm not just ripping ideas for money or something :P Nov 25 15:45:23 Just to clarify the question, the app would have students attempting to trace one of the shapes I showed. The 'target' shape would be in the background, and the student would try to draw the shape on a canvas on top. Nov 25 15:50:51 Humorousone, the overlap? Nov 25 15:51:45 sounds like plain math that shouldn't be expensive Nov 25 15:52:26 if you're just trying to see how close to overlapping the line, I'd probably try to do something like make them both 1-bit color and xor and count pixels. Nov 25 15:53:02 otherwise you're pretty much just doing integrals, but it's been forever since i've done that sort of thing Nov 25 15:54:44 dragorn: hmm Nov 25 15:54:53 well, integrals if the lines are representable as functions Nov 25 15:54:54 :p Nov 25 15:55:14 but yeah, I was basically thinking the same thing, take area under lines with respect to an axis and take the difference Nov 25 15:55:19 dragorn: Thing is I don't have an equation for either the drawn line or the 'target line' Nov 25 15:55:44 fft it :p Nov 25 15:55:50 pfn: I was using an approximation of that with trap rule. Nov 25 15:55:54 fft? :P Nov 25 15:56:05 it's been like 15 years since I've done anything like that, and that was only slightly similar doing gps plotting Nov 25 15:56:17 https://en.wikipedia.org/wiki/Fast_Fourier_transform Nov 25 15:56:19 :p Nov 25 15:56:39 Humorousone, so you have two triangles and you're trying to see how close they are to overlapping, and they're solid filled? Nov 25 15:57:42 Humorousone, i guess the question is if you treat it as vectors or as a bitmap. If you can derive vectors from the input then you can be clever about it, but if you just have canvas bitmaps basically you can also just brute force it Nov 25 15:58:18 brute force pixel to pixel :p Nov 25 15:58:36 if you had bitmaps I'd just do something like xor them to get the overlap, decimate by 10 or something, whatever an acceptable margin of error is (ie, sample every 10th pixel), and just check if the pixel is lit Nov 25 15:59:25 sorry, decimate in that context is a sdr-ish thing. basically just x += 10 and y+= 10 (or whatever level of precision you want) on your bitmap Nov 25 15:59:40 I keep saying xor. I suspect I probably mean and'd. coffee hasn't kicked in. Nov 25 15:59:52 how many lines are you going to have anyway Nov 25 15:59:59 even pixel by pixel isn't that terrible Nov 25 16:00:04 yeah. it's probably not that bad anyhow Nov 25 16:00:51 pfn: hmm Nov 25 16:00:54 dragon: hm. Nov 25 16:01:00 because say you have 1920x1080 Nov 25 16:01:00 you can certianly be way more elegant if you have the vectors, but then you have to figure out how to get a vector from their input Nov 25 16:01:09 you're only going to do 1920 + 1080 operations Nov 25 16:01:15 if you want to go row by row Nov 25 16:01:29 Homorousone: the question will also be exactly what a teacher in this context would find useful Nov 25 16:01:37 why did I type my own name... Nov 25 16:01:39 well, 1920 * 1080 comparisons, but still Nov 25 16:01:40 and misspell it.. Nov 25 16:02:13 i'd assume getting input into vectors is going to suck, so work w/ bitmap. then i'd assume you have the power to just do it the dumb way, and see how it goes. Nov 25 16:02:20 dragorn: bearing in mind this will be running on 3 year old tablet hardware Nov 25 16:02:33 eh. it's just byte compares. it shouldn't be that bad. Nov 25 16:02:34 I think the bitmap idea will probably work pretty well Nov 25 16:02:42 hmm, hmm... Nov 25 16:02:43 dragorn, well, you actually need to scan in one axis Nov 25 16:02:57 so 1920 or 1080 * n operations (for n endpoints) Nov 25 16:05:04 pfn: the bitmap implementation would make this dependant on the resolution of the tablet though Nov 25 16:05:05 What do I need in order for retrofit to use gson? I added compile 'com.squareup.retrofit:converter-gson:2.0.0-beta1' to my build.gradle, but retrofit still complains about not finding it Nov 25 16:05:11 is proguard of any good except obsuring java code? (btw, my code will be free and open source) Nov 25 16:05:24 Humorousone, sure, but that's not terrible, because screen resolutions still aren't that huge Nov 25 16:05:34 kuldeep, size optimization Nov 25 16:05:44 pfn: good point. Nov 25 16:05:56 Humorousone, but you can use a sampling approach instead, as well Nov 25 16:05:59 pfn: I'm doing this as part of my computer science A2 level Nov 25 16:06:01 Humorousone, sample 1 every 10 rows, etc. Nov 25 16:06:15 pfn: gotcha. Nov 25 16:06:25 (this is basically just guessing at primitive math, there may be better algorithms) Nov 25 16:06:44 pfn, how much reduction? (just for reference) Nov 25 16:06:57 kuldeep, absolutely depends on the app and libraries you use Nov 25 16:07:12 if you use no libraries, maybe like 10% reduction or less Nov 25 16:07:13 pfn: I think with the resolution of the screen these tablets are running, it probably wouldn't be worth sampling anyway Nov 25 16:07:31 kuldeep, if you use a large number of libraries, then easily up to 90% reduction in code size Nov 25 16:08:07 pfn, i have many 7 libs (include app-compat's) Nov 25 16:08:28 pfn: I'm now wondering where I can fit some A level maths in this project now :P It's not required, but preferable by examiners. Nov 25 16:08:38 pfn, then i can expect some comparable results Nov 25 16:08:44 pfn, thanks Nov 25 16:08:45 Humorousone, that's for wikipedia to help you :p Nov 25 16:09:06 and by large, many of my projects have upwards of 60 libraries Nov 25 16:09:23 holy crap pfn :S Nov 25 16:09:51 grep -w compile mobile/build.gradle | wc -l: 43 Nov 25 16:09:51 s/many// Nov 25 16:09:54 direct dependencies Nov 25 16:09:57 plus transitives Nov 25 16:10:16 pdn: I just reread the spec. A level maths isn't needed Nov 25 16:10:18 >.> Nov 25 16:11:23 pfn: thank you for the help >3 Nov 25 16:11:26 <3 Nov 25 16:12:36 g00s, eh, business requirements Nov 25 16:12:44 pfn: I'm going to be honest, I haven't actually worked with bitmaps that much yet, looks like it's going to be a fun evening of messing with code :P Nov 25 16:12:49 and frantic googling. Nov 25 16:14:22 yep, beyond my ken Nov 25 16:17:47 What theme color do dialog buttons use? Nov 25 16:18:08 And I wonder the same thing about the dialog's message Nov 25 16:29:40 I'm running a simple camera app using the new Camera2 APIs and this device has a hardware support level of LEGACY. Is it possible that because it's LEGACY, the autofocus will not work? Nov 25 16:34:15 anyone got any idea how to convert something like "next friday, 11:45" into unix timestamp on android console? Nov 25 16:34:47 or how to get next alarm time in console as unix timestamp.. Nov 25 16:34:52 demlak, that's one of those things that's so insidiously complex I'd just go find a library to handle it Nov 25 16:35:00 ah Nov 25 16:35:25 well, you can do the math for next friday yourself and use date to convert that Nov 25 16:35:42 nope.. date does not accept "-d".. thats the problem Nov 25 16:36:01 date -d '2015/11/30 12:01AM' +%s Nov 25 16:36:05 well, busybox might not Nov 25 16:36:10 that's a different problem ;P Nov 25 16:36:36 get a real date command compiled if you HAVE to do it entirely on device, otherwise use your local systems date Nov 25 16:36:43 Is there a way to check what I asked myself? Nov 25 16:37:43 dragorn: the question is.. is there anyothing onboard.. without getting extra software.. maybe there is a solution.. currently im reading the next alarm time by asking the database.. Nov 25 16:37:56 like this: $(eval sqlite3 -column /data/data/com.android.providers.settings/databases/settings.db \'select value from system where name = \"next_alarm_formatted\"\' Nov 25 16:40:07 the column name does give me a hope of a chance, that there maybe is another solution =) Nov 25 16:43:07 Hi everyone! I'm trying to build an APK but it suddenly started to fail with "Error:Execution failed for task ':app:packageRelease' Failed to read key ..... from store ....: Keystore was tampered with, or password was incorrect" I'm trying to create totally new Keystore file with different credentials and it still fails to build the project with same error. At the same time other projects can be succesfully build... Nov 25 16:43:16 I'm totally confused with this Nov 25 16:46:03 Hi Android gurus ....I am going to rant..... can someone at google simplify the language ..... u guys have gone from dialog to toast to Snackbar ? common guys ... Nov 25 16:46:31 Snackbar ? Nov 25 16:46:40 d0d0: does it make you hungry? Nov 25 16:49:50 I can understand the fragmentation issues .... but such creativity in naming is confusing... Nov 25 16:50:24 this pure and simple communication issues ... Nov 25 16:51:03 O.o Nov 25 16:51:14 Not sure what do you expect? Nov 25 16:51:21 simplilcity Nov 25 16:51:28 make it simple for developers Nov 25 16:52:00 compare "stdout" to "snackbar" ... Nov 25 16:53:50 d0d0: but shouldn't they give a different name to a different bit of functionality? Nov 25 16:54:02 It would be way more confusing if all three were called dialogs Nov 25 16:54:05 it is just showing a message Nov 25 16:54:58 Hi, anything wrong with this imports http://pastebin.com/VHi4HXES , I'm having problem with fragments, I googled my problem an it says it has something to do with mixed imports Nov 25 16:55:09 thats all there is to it ... u r showing a message to the user ... why is one called a toast and another called a snackbar ? Nov 25 16:55:34 d0d0: because they are different ui elements Nov 25 16:56:06 import android.support.v4.app.FragmentTransaction Nov 25 16:56:08 @AndroidNewb Nov 25 16:56:11 AndroidNewb: you are using support FragmentManager with native FragmentTransaction Nov 25 16:56:36 should be using support FragmentTransaction Nov 25 16:56:46 @alexfu kinda new to Fragments, what should I do? Nov 25 16:57:07 Change the import to import android.support.v4.app.FragmentTransaction Nov 25 16:57:17 this is just showing a message to the user Nov 25 16:57:36 @liuwenhao, okay, thanks! Nov 25 16:58:47 and yeah any time you are importing anything to do with fragments, make sure you are selecting the support version and not the native version Nov 25 16:58:48 man .... u guys are complicating the simple things in life ... why is it even called snack bar ? Nov 25 16:59:21 It's called a snackbar because Google confused it's marketing team with it's developer team Nov 25 17:00:27 Toast make sense because it 'pops', but I had never even heard of a snack bar before Android Nov 25 17:00:43 toast makes no sense ... Nov 25 17:00:51 it is a message bos Nov 25 17:01:04 It pops up on the screen. Like toast Nov 25 17:01:05 tost is a dialog .... pur and simple Nov 25 17:02:19 it shuld all have been called dialog box ... if u want diff looks to serv diff purposes , then dialog should have be more customisable ... Nov 25 17:02:43 dragorn: awk is installed.. the function strftime() should work.. now i have to find out how to convert just weekday + time to date + time Nov 25 17:03:35 I am just ranting ... i appologize ... but things shuldnt be any more complicated than it is necessary ... Nov 25 17:04:44 with google maps api is there some form of onClick for markers? Nov 25 17:06:03 It's to make it simple that they are split up into different classes. Dialogs are modal, toasts are not. Also, toasts are not unique to android. Snackbars are part of the view hierarchy. They serve different purposes, and trying to have them be the same class would make for an ugly, and confusing, API Nov 25 17:06:28 it still is confusing ... Nov 25 17:07:13 guess I am stressed ....:-( Nov 25 17:08:15 Imo it's not confusing Nov 25 17:09:34 underlying implementation maybe different .... but the functionality is the same .... it is all just communicating a message to the users ... and so it shuld all me called the same ... Nov 25 17:10:11 https://code.google.com/p/android/issues/detail?id=194489 feature request -> declined: feature not available Nov 25 17:10:14 :'___] Nov 25 17:12:35 TextViews are also just used for displaying a message to the user Nov 25 17:12:36 i wonder what the next variant going to be called ? Nov 25 17:13:36 TextView server a diff purpose from dialogBox ... Nov 25 17:14:03 Hi, I still have problems with my fragments, http://pastebin.com/MRn3A4s7, I get and error on line 3. Nov 25 17:14:24 i'm very close to completetion :) Nov 25 17:14:40 followed this Youtube tutorial https://www.youtube.com/watch?v=Zuo3n-DjF7w lol Nov 25 17:16:22 Toasts serve a different purpose than dialogs Nov 25 17:17:33 I agree SimonVT .... I just wish that things were a bit simpler .... maybe there is a reason why my nickname is called 'd0d0' ;-) Nov 25 17:17:58 d0d0 = dodo .... get it ;-) ? Nov 25 17:18:42 Anyone have an idea of how I can get the stock lollipop Android dialer working on my CloudyG3 D851? Nov 25 17:20:31 tmobile wants more money by *charging* me the caller ID feature. Fuck that. lollipop dialer does it for free. Nov 25 17:21:05 i use toasts if theres no internet connection.. but i use dialog if if i want the user to click a button to turn it on Nov 25 17:21:21 or similar Nov 25 17:21:52 *AOSP, not Android. stupid autocorrect. Nov 25 17:26:25 thnx thornekey .... but it is still just showing a message to the users under diff conditions ... i still believe that it shuld be called the same ... but then I guess I shuld just read the documentation ... Nov 25 17:28:27 Yea, i suppose, regardless it gets the message across that something is up lol Nov 25 17:29:51 d0d0: no, they all have different enough behavior that they should be treated differently Nov 25 17:37:10 d0d0, this is the case of all UI toolkits Nov 25 17:37:35 d0d0, they are fundamentally different interfaces Nov 25 17:38:37 cant this be simplified further ? Nov 25 17:39:06 never mind ... me just ranting ... Nov 25 17:39:38 I don’t see how it could be simplified further without completely confusing things and making them less flexible Nov 25 17:40:40 how can I use the snackbar inside a fragmentActivity ? Nov 25 17:41:14 It's a one-liner in the documentation, Your theme has to extend AppCompat Nov 25 17:51:25 Hi there; I'm trying to get the Robolectric project's test suite running. Nov 25 17:51:52 Does anyone here have experience with that? Nov 25 17:52:34 I followed https://github.com/robolectric/robolectric/blob/master/CONTRIBUTING.md Nov 25 17:52:53 but scripts/install-robolectric.sh is giving me dependency resolution errors Nov 25 17:54:42 d0d0, you shouldn't rant without understanding, it's ignorant Nov 25 17:58:42 just came out. i'll read it and let you all know how it goes , if it can help me it can help anyone :D http://www.informit.com/store/android-user-interface-design-implementing-material-9780134191928 Nov 25 17:59:36 now whether to get the BNR swift book ;) Nov 25 18:00:51 this is why I like having a Safari subscription Nov 25 18:01:21 s73v3r how much per month ? Nov 25 18:01:36 $30, I think? Nov 25 18:01:42 hm Nov 25 18:01:53 they usually have trials and discounts for the first month or so Nov 25 18:05:01 pfn .... u r right ... i shuldnt rant .... I am ignorant .. but why keep me ignorant ? why cant a simple messaging feature be simpler or have a familiar signature or interface .... Nov 25 18:05:29 d0d0 nobody is keeping you ignorant except yourself, you d0d0 Nov 25 18:05:48 I shuld be able to undertsand what the code is doing from its signature ... Nov 25 18:06:11 someones inability to communicate is adding to my ignorance Nov 25 18:06:28 d0d0: A toast does have a familiar signature Nov 25 18:06:48 so everything android has disappeared from the eclipse, i cant even run as android app doesnt show up. anyone know what would cause this? im on make in el captain Nov 25 18:07:36 did you update to new Eclipse? Nov 25 18:07:41 d0d0, it does have a familiar signature and interface, to anyone that has developed any UI code at all Nov 25 18:07:51 no i nothing Nov 25 18:08:00 i did a disc clean last night thats about it Nov 25 18:08:02 right .... Nov 25 18:08:31 im guessing disc clean did something bad =( Nov 25 18:09:11 i read a book on how to keep code simple .. it is written by a guy in google .... Nov 25 18:09:26 i forget the name of the book.... i am pretty sure he wuld agree with me Nov 25 18:09:38 i don’t think he would Nov 25 18:09:45 the interfaces are pretty simple as is Nov 25 18:10:04 josh bloch has talked about api design, he was on the android team for a little bit - probably didn't go very well hahaha Nov 25 18:10:31 isnt he the guy behind the Go lang ? Nov 25 18:10:37 not josh bloch Nov 25 18:10:38 no Nov 25 18:10:41 lol Nov 25 18:11:18 let me get the name of the guy Nov 25 18:11:45 d0d0 doesn't matter, we're no using go Nov 25 18:12:13 I dont ant us to use go either ... Nov 25 18:12:26 I dont want us to use go ...either Nov 25 18:15:42 I am lazy and I wish google kept me lazy... ;-) Nov 25 18:25:50 Someone can recommend me a font for making memes (open-source project). Impact isn't compatible with license Nov 25 18:25:55 ? Nov 25 18:33:53 Aha, I think I found the bug Nov 25 18:34:02 See #robolectric, if anyone's interested. :) Nov 25 18:46:41 What would be the ideal place to store an access token for a REST API? SQLite? Nov 25 18:49:38 Well, SQL is just as vulnerable as anywhere else (i.e. SharedPreferences) Nov 25 18:49:46 have you considered using OAuth Nov 25 19:04:00 I accidentally made my cursor 3 lines tall in Android Studio... how to undo it? -.- Nov 25 19:05:10 hi guys, how can i check the database contents of my app? Nov 25 19:05:32 android device monitor Nov 25 19:05:36 liuwenhao install eclipse Nov 25 19:06:29 intellij for life :) Nov 25 19:06:45 I didn't even know you could change cursor lines until now Nov 25 19:06:47 liuwenhao, adm is for emulator only Nov 25 19:07:04 no, you can use it with a physical device Nov 25 19:07:07 avd* Nov 25 19:07:10 I'm using it with a samsung phone right now Nov 25 19:07:16 just navigate to the data folder Nov 25 19:07:23 DDMS Nov 25 19:07:36 https://developer.android.com/tools/debugging/ddms.html Nov 25 19:09:43 thanks liuwenhao Nov 25 19:11:15 so has anyone used the new android studio 2 emulators? Nov 25 19:13:47 I tried, it just loaded infinitely and never finished loading Nov 25 19:13:53 so back to device/genymotion for now Nov 25 19:27:05 so what to people use for designing the UI/UX of their apps? Nov 25 19:27:50 s73v3r i'm trying to figure out Pixate Nov 25 19:28:30 Pixate seems cool, but it also seems like it’s only half the equation Nov 25 19:28:32 I use blender ... Nov 25 19:28:56 really? how? Nov 25 19:29:09 blender ? O.o Nov 25 19:29:13 or are you doing games? Nov 25 19:29:41 http://hastebin.com/uzekifatir.avrasm can someone please take a look at this? i get an exception in the first block, is there something i need to do to get permission to read/write files? Nov 25 19:31:29 i do use blender for animations ... for UI ... i just design the UI elements and play wioth it until I am happy and them I load/replicate it in android Nov 25 19:31:38 I tried out Prott... it seems pretty cool @s73v3r Nov 25 19:31:46 Prott? Nov 25 19:32:05 https://prottapp.com/ Nov 25 19:32:41 interesting. I will check it out. thanks Nov 25 19:32:47 i also use paper and pen before belnder ... Nov 25 19:36:07 JakeWharton: are you around? Nov 25 19:36:19 was someone able to get Twisted to work on Android? Nov 25 19:36:42 trying to install it in qpython fails because there's no gcc bundled Nov 25 19:36:56 micechal: you're developing for android with python? Nov 25 19:37:08 autrilla: *trying to* Nov 25 19:37:28 It looks painful, I'd rather use Scala Nov 25 19:37:30 but until now everything is very much terrible Nov 25 19:38:09 autrilla: I believe that would be just as much troublesome Nov 25 19:38:30 autrilla: especially since I'm on Windows Nov 25 19:38:49 if it was some linux distro, I could just cross-compile the python modules Nov 25 19:38:54 on my pc Nov 25 19:40:06 is there a workaround to depend on the support libs aar in an aar I'm compiling? — basically to included them as provided? Nov 25 19:44:03 In javascript, what could cause android.location.LocationManager.getProviders() not to work ? (object otbtianed from getSysmService(Context.LOCATION_SERVICE) ? Nov 25 19:44:33 herriojr you can see what jake did here https://github.com/JakeWharton/RxBinding Nov 25 19:44:40 http://hastebin.com/owatukesut.avrasm how do i change the second block (the read file) to use a directory like i've done with the top block (the write file)? Nov 25 19:45:14 hey guys. I need help. I need to encrypt and decrypt mp4 files quickly. can anyone point me in the right directiom? Nov 25 19:45:18 direction* Nov 25 19:45:18 herriojr not much to do really. just depend on it; if the user wants a newer one they just specify that and gradle resolves to the newer one Nov 25 19:49:57 MartialLaw: http://libeasy.alwaysdata.net/network/#encryption worth a look, I've never used it so YMMV Nov 25 19:50:35 http://libeasy.alwaysdata.net/ Nov 25 19:50:42 Hi ! Nov 25 19:51:29 is it possible to make a notification that is displayed in foreground when received ? Nov 25 19:51:34 ok javascript bind failed Nov 25 19:52:15 What do you mean blusky? Do you mean you want to draw over whatever the active app is? Nov 25 19:54:18 anyone? Nov 25 19:55:06 Hi, I am trying to make a messenger where items start from bottom using recyclerview and stumbled upen setsetStackFromEnd and setReverseLayout Nov 25 19:55:32 I can't understand the difference between two and also which one should I use, for something like say whatsapp Nov 25 19:56:27 hey guys, noticing on Play Store ... searching for X brings up only one page of results, but I know there are more pages. Some of the apps I used to see in this search have simply disappeared. anyone have a clue ? (and X is in their title) Nov 25 19:57:49 liuwenhao: yes Nov 25 19:58:36 blusky: why? Keep in mind that usually that’s annoying as fuck Nov 25 19:59:48 s73v3r: yes I know, it's an app that detect some custom event Nov 25 20:00:05 and ask the user if he want to interact if it's detected Nov 25 20:00:11 not spam purpose, more like translation Nov 25 20:00:13 and a regular notification isn’t enough? Nov 25 20:00:17 ok Nov 25 20:00:30 regular notification is too... subtle Nov 25 20:00:40 it only adds a small icon Nov 25 20:00:43 i believe you want a notification with a blank window background Nov 25 20:00:44 on the upper left side of the device Nov 25 20:00:55 I just want the notification to be displayed Nov 25 20:01:00 not just an icon to be shown Nov 25 20:01:15 (not a dialog that can annoy the user) Nov 25 20:01:24 more like a small banner with action confirmation Nov 25 20:01:34 toast? Nov 25 20:01:42 does a toast can have a button ? Nov 25 20:01:49 or can I detect a click on it ? Nov 25 20:02:11 snackbar does, but I’m not sure if you can pop one up over someone else’s app Nov 25 20:02:17 nop I can't Nov 25 20:02:33 but it would be great for my purpose Nov 25 20:02:41 i think you’re stuck with just a notification Nov 25 20:02:42 (notification can have button, so I use it for the moment) Nov 25 20:03:28 to be more precise, I detect when a user select a mail adresse, and I ask him if he want to add the adress to his contact list Nov 25 20:03:39 (not exactly the real use case, but close enough) Nov 25 20:06:21 i think you need the activity with a blank window background Nov 25 20:06:50 you’d just need to be careful with how you design the dialog to be non-intrusive Nov 25 20:07:00 it is so funny to watch eclipse choke on a large project Nov 25 20:07:16 hm 10,000 errors... Maybe I should try cleaning the project first Nov 25 20:07:24 s73v3r: if I switch the app for the user ... Nov 25 20:07:25 g00s: are you saying just mark it as a compile dependency? Nov 25 20:07:27 it's really intrusive Nov 25 20:07:42 if you have a blank background, i don’t think it switches app Nov 25 20:07:49 g00s: I think the gradle project I have is behind on the build tools version, so I'm updating it Nov 25 20:07:57 g00s: so give me a sec, that might be my issue Nov 25 20:08:16 or at least, it doesn’t appear to; the user still sees the other app behind Nov 25 20:08:31 similar to how Chat Heads worked Nov 25 20:08:45 ooh, that would be nice Nov 25 20:08:57 anything I can google to have more info ? Nov 25 20:09:22 anyone here using vim + eclim for their android dev? Nov 25 20:10:02 teasp00n lol, thats ... ridiculous :D Nov 25 20:10:23 any help guys... Nov 25 20:10:32 g00s: ...you do it... dont you? :p Nov 25 20:10:49 astroduck: Why not just sort the list before you put it in the adapter? Nov 25 20:10:59 no, google puts stuff in AS and gradle, eclipse is out of the picture Nov 25 20:11:02 and then scroll the list to the last element Nov 25 20:11:31 blusky: not really. there’s a browser that also did something similar, unfortunately i can’t remember the name of it Nov 25 20:11:44 s73v3r: I want the scroll to start from bottom, not from top Nov 25 20:12:13 how is that any different than starting at the last element on the bottom? Nov 25 20:13:00 s73v3r: if recyclerview has 1 item, it'll be shown at top and not at bottom of screen? Nov 25 20:13:15 that’s how all chat programs work as is Nov 25 20:13:48 although you could write your own LayoutManager to do what you want Nov 25 20:14:16 * pfn hates the gradle cache, completely unportable Nov 25 20:14:44 I don't think caches are supposed to be portable, ever Nov 25 20:16:02 pfn, didn't you say you don't use gradle? Nov 25 20:17:05 Mavrik, I don't Nov 25 20:17:15 Mavrik, but I have to interact with it at least on a very basic level Nov 25 20:17:26 Mavrik, e.g. importing existing gradle projects Nov 25 20:17:35 for debugging random restarts, is it a good idea to use catlog to record the log, with the write period set to write on each log line (instead of the default write once every 200 lines)? Nov 25 20:17:36 http://hastebin.com/owatukesut.avrasm how do i change the second block (the read file) to use a directory like i've done with the top block (the write file)? Nov 25 20:17:36 Hmmf. Nov 25 20:17:51 or is there a different way to go about doing this? Nov 25 20:17:52 and in this particular situation, I have some artifacts hidden behind a vpn Nov 25 20:18:00 so I need to copy my gradle cache over so I can import Nov 25 20:20:30 Huh. Nov 25 20:20:49 Any reason why not choose the sane approach and get them from a repo? Nov 25 20:28:21 g00s: ok, so yeah, you are saying marking it as a compile (not provided) will automatically choose the best dependency when another app includes my aar? Nov 25 20:28:55 herriojr it will use what you put unless they override Nov 25 20:29:03 kk Nov 25 20:29:16 I just wanted to make sure there aren't conflicts Nov 25 20:29:41 if you put x:22 and they put x:23 then only x:23 gets included Nov 25 20:29:57 hopefully it doesn't break :) Nov 25 20:30:07 yeah Nov 25 20:30:16 that's essentially what provided would do Nov 25 20:30:43 i think there is a subtle difference Nov 25 20:31:33 yeah, the difference is it wouldn't add all the code/resources for provided and require them to include it Nov 25 20:31:34 if they aren't using x than their build will fail Nov 25 20:31:40 agreed Nov 25 20:31:42 Any idea what i could do to show a Snackbar info from a Service? In an Activity its pretty easy ill just pass android.R.id.content as the view Nov 25 20:31:57 ktwo don't, do a notification Nov 25 20:32:08 ktwo: what g00s said Nov 25 20:32:12 currently im using a Toast but its quite ugly Nov 25 20:32:16 or tell your foreground activity to show the snack Nov 25 20:32:41 ktwo: does this only display when you're in the foreground? Nov 25 20:32:58 its in a widget actually on the homescreen Nov 25 20:33:41 it would be cool having a way to display it in a snackbar window, but well i wont put too much effort on it if its not intended to do like that Nov 25 20:34:27 ktwo: well, you can with a system window overlay from a service Nov 25 20:34:36 but with M you'll have to be granted permission for it Nov 25 20:34:54 but yeah, usually when you're trying to do something like this, you're doing something wrong Nov 25 20:35:06 what exactly do you plan on showing with your snackbar? Nov 25 20:35:15 just some short info Nov 25 20:35:40 a notification seems overkill - so ill keep the Toast - maybe i can make it look better Nov 25 20:35:48 or you could do a transparent activity Nov 25 20:35:56 i dont like about the Toast that it isnt consistent troughout the android versions Nov 25 20:36:04 on my LG its blue, on another phone gray Nov 25 20:36:40 is the user able to interact with this snackbar you are creating? Nov 25 20:36:55 nope Nov 25 20:37:36 then yeah, you might be able to do a transparent activity and pass through the touch events via Window flags Nov 25 20:37:46 and then show your snackbar in there Nov 25 20:37:58 mh ok interesting ill try - but for this i dont need permissions right? Nov 25 20:38:06 no permissions to do this Nov 25 20:38:15 I have some code somewhere for this Nov 25 20:39:10 cool if you find it again or stumble across it id be happy to look at it ^^ Nov 25 20:39:33 yeah, give me a sec, it's on another computer, have to hook my monitor up to it Nov 25 20:39:43 yea no hurry, just when you got it Nov 25 20:39:44 or shit, I don't have a mouse that will work with it anymore Nov 25 20:41:38 hi Nov 25 20:41:40 question Nov 25 20:41:58 would it be better to have anroid apps as my portfolio or web apps? Nov 25 20:42:15 that probably depends on the kind of job you want. Nov 25 20:42:25 anything Nov 25 20:42:31 uh. Nov 25 20:42:33 I am new to the tech industry Nov 25 20:42:39 or im trying to break into it Nov 25 20:42:49 so I want to know what the job market is like Nov 25 20:42:52 systemsgotyou: you still need to find a direction you want to go Nov 25 20:42:52 oh, then i have no advice for you. sorry. Nov 25 20:42:57 in other words where is the demand? Nov 25 20:43:13 lulz Nov 25 20:43:22 eclipse complains: Error: no resource found that matches the given name... Nov 25 20:43:23 s73v3r: Well just reversing it before adding it to adapter made it a lot simpler and also removed a weird bug I was facing when using setStackFromEnd. Thanks :) Nov 25 20:43:32 which one is more in demand, apps or web apps? Nov 25 20:43:34 if you can't figure out where the demand is, you have already lost Nov 25 20:43:38 these resources are defined, but in a different project on the build path Nov 25 20:43:40 try something like farming Nov 25 20:43:47 s73v3r: I'll write a custom layout manager later to make it start from bottom Nov 25 20:43:49 always demand for food Nov 25 20:44:17 nuts in particular Nov 25 20:44:39 in other words, do companies want to hire web app creators or mobile app creators Nov 25 20:44:49 systemsgotyou: if you don't do something that interests you, you're not going to be good at it (web or android) Nov 25 20:44:56 maybe if I ask eclipse nicely this project will build Nov 25 20:46:03 What would be the ideal place to store an access token for a REST API? SQLite, SharedPreferences? Nov 25 20:46:42 autrilla: shared prefs but you need to encrypt it Nov 25 20:46:56 herriojr: "encrypt it"? Nov 25 20:47:07 Can other apps read my shared prefs? Nov 25 20:47:41 sure, if it gets rooted by an app or whatever — it's best practice to encrypt that stuff for storage on disk Nov 25 20:48:19 herriojr: a root user can decrypt it. Nov 25 20:48:25 Encrypting it doesn't help Nov 25 20:48:49 It's like obfuscating secrets into the source code, it doesn't actually prevent anything Nov 25 20:52:11 are you storing your auth token within your app as well? Nov 25 20:52:40 herriojr: no, the auth token is generated at runtime Nov 25 20:54:45 god, I hate gradle, everything I want to do won't work... Nov 25 20:54:57 pfn: that's how I've felt Nov 25 20:55:14 I want it to not resolve dependencies while configuring project: nope, I want to re-use the resolution cache across computers: nope Nov 25 20:55:28 https://discuss.gradle.org/t/copying-the-gradle-cache-to-another-machine/7546/16 Nov 25 20:55:55 https://discuss.gradle.org/t/gradle-resolves-dependencies-too-early-in-lifecycle-how-to-prevent-and-catch-this-behavior/507 Nov 25 20:56:01 I don't really understand what gradle does when I assemble my project, and why it takes so long Nov 25 20:56:13 Compiling my classes should take like 100ms Nov 25 20:56:50 autrilla, compiling java isnm't the only part of building android apps Nov 25 20:56:57 it's like 5% of the build process Nov 25 20:57:23 pfn: what's the rest? Nov 25 20:57:30 autrilla: fair enough on the access token thing — sorry, was confusing access token w/ auth token Nov 25 20:57:38 autrilla: but yeah — store it in a private shared prefs Nov 25 20:58:40 autrilla, look at the gradle output, ittelsl you Nov 25 20:58:43 I have no idea how it works, but having to wait at least 20s for each build is a really slow way to develop. You build a lot of times per day, or at least I do Nov 25 20:58:54 builds take 1s each for me Nov 25 20:58:59 simple answer, don't use gradle Nov 25 20:59:36 pfn: what do you use then? Nov 25 20:59:39 mvn? Nov 25 20:59:45 I've said a million times Nov 25 21:01:22 pfn: writing that probably took you more than writing what you actually use Nov 25 21:01:24 what do I declare ImageView as if I want to set a drawable? Nov 25 21:01:29 autrilla, I've told you, too Nov 25 21:01:34 I set it to null because I don't know what constructor args to use so I can use the setImageDrawable method on the object. Nov 25 21:01:46 pfn: maybe. I don't remember. Nov 25 21:01:48 adempus: what do you mean? Nov 25 21:02:01 Were you the one who used scala? Nov 25 21:02:26 I'm trying to put a resource image in a linear layout Nov 25 21:02:42 adempus: what I'm saying is I don't understand your question Nov 25 21:03:01 autrilla, yes Nov 25 21:04:49 I'm trying to use a resource image in a LinearLayout with an ImageView object. But I dont know what arguments to pass in it's constructor to make it work. Nov 25 21:05:16 Well, more like insert a res image in the LinearLayout using the addView method Nov 25 21:06:20 But I declared the object null, and I'm guessing thats what is causing the app to crash. Nov 25 21:08:06 How do I stick an image in a LinearLayout? Nov 25 21:08:17 adempus: Are you asking how to add an ImageView to a LinearLayout? Nov 25 21:08:27 yeah Nov 25 21:09:12 `addView` is the way. Nov 25 21:11:08 right, but when I do that, my app crashed. I think it's because I declared the ImageView as null. What should I put in the constructor to make it hold a drawable? Nov 25 21:12:21 Is using Retrofit's Callback interface for something else a bad idea? Nov 25 21:12:30 It's easiest to declare the ImageView in XML and set `android:src`. Nov 25 21:13:50 http://hastebin.com/megizutiga.avrasm Can anyone help me with this? I'm trying to assign a variable from a text file and then call it later but it's not working. Nov 25 21:15:49 Rush2112: The error message tells you everything. :) Nov 25 21:16:12 does Android M have any server certificate requirements such as forward secrecy and AES-256 encryption? Nov 25 21:18:04 autrilla: like most things it depends Nov 25 21:18:09 yeah, the error message tells me it's not assigned when i'm clearly assigning it a value. additionally, i tried assigning it a value such as "Test" which still didn't work and gave me the same error Nov 25 21:19:22 Rush2112: `totalString` is accessed at line 14 and yet it may not have been assigned. Nov 25 21:20:11 Okay, I'll rephrase. On Android, what's the best way to do callbacks? Say I want to create a bunch of helper classes that will handle social login for me (Google Sign In, for example). I'd like these classes to notify my activity when they're done logging in (getting the auth token). Is there an "Android way" of doing this? Nov 25 21:20:34 oh. spoke too soon. looks like marshmallow has detectCleartextNetwork and penaltyDeathOnCleartextNetwork Nov 25 21:26:05 Rush2112: This is the compiler being really helpful and pointing out a bug in your code. Many programming languages have compilers that would silently ignore the problem here. Nov 25 21:29:54 TacticalJoke: i'm aware of this. i pushed some stuff around and this http://hastebin.com/nehomopuri.avrasm runs (when line 16 ommitted), and when it runs it even says "file read successfully" . Yet when i add line 16, it still says that the variable may not have been initialized Nov 25 21:30:14 so i dont understand why setting a value to it doesn't work when the function it's in runs correctly (or seems to) Nov 25 21:31:10 If an exception is thrown while reading, does totalString have a value? Nov 25 21:31:23 I am tracking down a bug and it seems the only possible way this can occur is if "onServiceConnected" is invoked multiple times when I try to bind to a service. I can't find any documentation on whether this is possible. Would anyone know? Nov 25 21:31:49 I've just done my first View that draws something -- two triangles on Canvas. there's a problem that the upper one is hidden because it is drawn too high, even if its topmost y-coordinate is zero. how could I find out the highest visible y-coordinate, or perhaps set a baseline (from where?) ? Nov 25 21:34:41 saapas: 0 should be the highest point. Nov 25 21:39:01 TacticalJoke: also, while debugging, I try to print the value of totalString after it's read from the file. i get "java.io.FileInputStream@d77ffd1" instead of a string value. why is this? Nov 25 21:40:02 Can I get an activity's result using startActivity? That is, without startActivityForResult Nov 25 21:40:34 Is the result bundled in the Intent used to start the activity? Nov 25 21:42:14 Is it still possible to use google news api? Nov 25 21:42:28 No, autrilla Nov 25 21:42:43 That's extremely unfortunate Nov 25 21:44:18 I'm trying to abstract Google's Sign In stuff to a class with a single function void login(Context context, OAuthLoginServiceCallback callback). I obviously need the context to start the Google Sign In activity, but I don't want to handle the results in my main activity Nov 25 21:44:20 I don't see why Nov 25 21:44:30 Rush2112: You're not using FileInputStream correctly; you're just asking it to read one byte (which you're ignoring) and then saying `toString()` (which gives you nothing of interest). Nov 25 21:45:37 Is it illegal to store data that you have received from a News service or a Geolocation service in any respect? Nov 25 21:46:20 SimonVT: is there a clean way to do what I want? Nov 25 21:47:02 I doubt it. Results are between activities. Nov 25 21:47:27 You could just create a LoginActivty that you start when you need to login Nov 25 21:48:02 SimonVT: I already have a LoginActivity I start when I need to log in. Having Google code and Facebook code mixed in the same activity is messy Nov 25 21:48:33 Oh well Nov 25 21:48:45 That's the reasoning behind that sort of signature. Log in with this service, and notify me when you're done Nov 25 21:50:39 Rush2112: Why are you reading from a file? Nov 25 21:51:06 SimonVT: do you at least see why I say it's messy? Is there really no way to get the result wherever I want? It's just an Intent object. Nov 25 21:51:15 To be honest, it sounds like it'd be easier if you learned Java before trying to do something like this. Nov 25 21:53:47 No, I disagree Nov 25 21:53:56 Anyway, good luck Nov 25 21:54:06 hello, I have been looking a lot of pages for android and stuff, and I haven't found a single library or utility that makes easy to just queue tasks for an executor and forget about managing threads etc. Well, I have found RxJava, but is not simple, and introduces a lot of boilerplate code... Nov 25 21:54:12 autrilla you can also see how iosched does the login stuff Nov 25 21:54:34 g00s: iosched? what? Nov 25 21:54:37 isn't there any easy way to just say have everything taken care of in Java? Nov 25 21:55:00 txomon hm, there are a few - one is Goro (never used it) Nov 25 21:55:03 the Executor interface is nice from the android API, but I haven't found any library using it Nov 25 21:55:06 txomon: welcome to Java Nov 25 21:55:15 is there a built in method to ellipsize text at a certain character count? Nov 25 21:55:42 autrilla: coming from C and Python... I didn't thing it could be that bad really Nov 25 21:55:49 think* Nov 25 21:56:00 There's tons of boilerplate in C too Nov 25 21:56:40 txomon: I don't understand -- what does it matter whether libraries use Executor[Service]? Nov 25 21:56:41 autrilla: not in the projects I have, say linux kernel, or openwrt Nov 25 21:56:44 It works well. Nov 25 21:56:52 g00s: where's the login stuff on iosched? Nov 25 21:56:54 I also know of various libraries that use it. Nov 25 21:57:06 autrilla stob being lazy and look for it christ Nov 25 21:57:08 TacticalJoke: it's something like having an asyncio for java Nov 25 21:57:18 g00s: it's a huge app with 20 packages Nov 25 21:57:22 grep ? Nov 25 21:57:33 its in BaseActivity Nov 25 21:57:38 or a gloop for Java Nov 25 21:58:53 anyone have an issue where you android device just keeps restarting every minute or so Nov 25 21:59:22 g00s: well, I tried grepping for GoogleSignInApi, GOOGLE_SIGN_IN_API Nov 25 22:00:26 well, grepping for login shows exactly where it is so Nov 25 22:06:12 * g00s takes this moment to plug sift, a great replacement for grep, ack, and ag :) Nov 25 22:07:11 g00s: grep -Ii Nov 25 22:07:18 and with that you have what you need xD Nov 25 22:07:41 grep -rIi 'google.*sign' Nov 25 22:07:46 should give you what you need Nov 25 22:08:11 g00s: it looks like they use https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil Nov 25 22:08:12 one for only text files, the other for captials Nov 25 22:08:24 sift is better, sorry :) it lets me find hits where things are used within distance of each other Nov 25 22:08:54 But they then still deliver the result to the parent activity. Whyyyyyy Nov 25 22:09:06 why does the parent activity need to know about Google's Sign In call. It doesn! Nov 25 22:09:24 well thats one clue autrilla , you need to check login whenever user returns to any activity in the app Nov 25 22:09:31 most likely Nov 25 22:10:22 g00s: sure. What doesn't allow what I want is that you can only get the result of an activity on the activity that starts said activity. Nov 25 22:10:37 Which completely breaks encapsulation Nov 25 22:10:54 autrilla no, you can use template method, or compose this behavior with a fragment Nov 25 22:11:12 just include the fragment in any activity that needs to check for login behavior Nov 25 22:11:26 g00s: but why do I have to do that? Can't they just have startActivity return the result? Nov 25 22:11:41 autrilla anyhow as SimonVT said, good luck :) Nov 25 22:11:48 heh Nov 25 22:13:18 g00s: sift looks cool, chur Nov 25 22:13:37 i was using ack before that, also very convenient Nov 25 22:14:05 g00s: is it possible at all to have my Activity not know anything about Google Sign In? Nov 25 22:15:41 Why can't I cast a class that extends Fragment to a Fragment? Nov 25 22:16:01 yeah, im using ag atm. Nov 25 22:16:04 I have a class TasksFragment that extends Fragment Nov 25 22:16:18 AKK9: Probably the wrong import statements. Nov 25 22:16:27 hello, is this the cannel for help with this: https://developers.google.com/identity/protocols/OAuth2InstalledApp#handlingtheresponse Nov 25 22:16:32 I've followed all steps successfully until that part Nov 25 22:16:35 The Developers Console has only given me a "client ID" and a "client secret", not sure how or where to get a redirect_uri Nov 25 22:17:01 TacticalJoke i'm hemming and hawing about 'kotlin in action' did you get it ? Nov 25 22:17:04 Watching the typography talk from the Dev Sumit Nov 25 22:17:25 * g00s doesn't recall typography talk Nov 25 22:17:38 Nah, but it looks good. Nov 25 22:17:38 why would you? Nov 25 22:17:40 they didn’t stream it, sadly Nov 25 22:17:56 but they did record it. Nov 25 22:18:27 did people woop and clap at key parts? Nov 25 22:18:37 just started Nov 25 22:18:48 although it looks like they didn’t do the thing where they show the slides, too Nov 25 22:18:59 TacticalJoke: omg thanks Nov 25 22:19:51 g00s: I realize you're just ignoring me now for whatever reason, but anyway: should I make the class that takes care of logging in to Google and returning an auth token be a Fragment, and add it to my activity whenever I want to log in with Google? Nov 25 22:20:04 lol Nov 25 22:20:09 make it a dialog fragment Nov 25 22:20:38 I don't see what's funny Nov 25 22:20:45 has anyone experienced issues with your android phone where the phone gets locked into a state in which it reboots itself every 1-2 minutes? Nov 25 22:21:37 autrilla what is the matter with iosched solution ? Nov 25 22:21:53 get it working first and if you dont' like it, refactor to something else you decice Nov 25 22:21:58 g00s: the main activity gets called with Google's Sign in result. Nov 25 22:22:03 g00s: I have it working already Nov 25 22:22:07 anyone know how I get a redirect_uri from the Developer Console? Nov 25 22:22:27 hmm... I'll google! why didn't I think of that? Nov 25 22:22:40 i personally dislike having base activities, so i'd just take the logic out of their BaseActivity and move it to a fragment Nov 25 22:23:20 hmm.. I'm not developing a web app, this is a cli script Nov 25 22:23:23 But all the sign in code for Google and Facebook is on my Activity. I dislike that. I want it somewhere else. As I said, I just want to call whateverLoginService.login(this, callback); Nov 25 22:23:34 so I didnt' get a redirect_uri for that reason I guess Nov 25 22:23:38 so move it somewhere else Nov 25 22:23:46 autrilla lol, now i'm really lolling Nov 25 22:24:02 if you dont want it in your activity, put it in a fragment gaaaaahhhh Nov 25 22:25:02 g00s, what would that accomplish? :P Nov 25 22:25:18 compose behavior with fragments instead of base activities Nov 25 22:25:43 You need to pass through the activity result in any case. Nov 25 22:25:52 I guess it's more hidden with a fragment. Nov 25 22:26:02 I favor the DialogFragment approach, because then you can literally pop up a Login screen from anywhere in the app Nov 25 22:26:09 autrilla this should give you some ideas https://plus.google.com/+JoshBrown42/posts/FzNghPbKk2s Nov 25 22:27:07 Slightly related question: does startActivity block? Nov 25 22:27:12 no Nov 25 22:27:29 That explains why it doesn't return the result Nov 25 22:27:39 you need startActivityForResult Nov 25 22:27:46 in Activity or Fragment ;) Nov 25 22:28:02 uh, i think it might be busted in child fragments though Nov 25 22:28:16 Just... don't use child fragments. Nov 25 22:28:18 Just... no. Nov 25 22:28:22 Bad dog. :P Nov 25 22:28:22 :D Nov 25 22:28:26 I'm just saying I don't like its design. Why not startActivityForResult(Intent i, Callback resultCallback) Nov 25 22:29:06 Instead of it being hardcoded and calling onActivityResult on the activity that starts the new activity Nov 25 22:29:45 Mavrik: so how would you do it? You apparently don't like the Fragment approach Nov 25 22:30:27 Do what? The login service calls out to external activity, there's no avoiding going through onActivityResult of your current activity to handle the response code. Nov 25 22:31:33 Mavrik: okay, so the part I don't like is unavoidable. Nov 25 22:33:48 you guys Nov 25 22:34:31 Ah, it seems I'm not the first one to think about this http://stackoverflow.com/questions/16593572 Nov 25 22:35:39 hm, just noticed this bug in cheese square - sometimes if you fling the list it quickly reverses direction Nov 25 22:35:51 i guess thats appcompat again Nov 25 22:38:20 What's the place to suggest changes to Android's APIs? Nov 25 22:38:45 /dev/null is as good as any. Nov 25 22:38:51 According to their bug tracker :P Nov 25 22:39:10 (I don't see the Intent API changing anytime soon.) Nov 25 22:39:24 hardcoded behaviour is not good Nov 25 22:39:43 this is interesting, could it be 20k methods? https://www.reddit.com/r/androiddev/comments/3u9ai8/is_android_studio_20s_instant_run_adding_20k/ Nov 25 22:40:58 Any ideas to make this less ugly are welcome https://gist.github.com/autrilla/30369d2361724f670f8c Nov 25 22:41:27 g00s, adding a redirection shim does seem like a good idea on how to implement hotswap Nov 25 22:46:03 I would not be surprised if it were 20k methods Nov 25 22:46:08 from the description of how it works Nov 25 22:46:09 I’m trying to come up with a way to organize our interfaces for our data models into more of a component oriented structure Nov 25 22:46:26 the real travesty is how it falls on its face when multidex kicks in Nov 25 22:47:13 s73v3r i found it hard to do interface segregation (SOLID) without union types Nov 25 22:47:23 java isn't much help there Nov 25 22:47:58 yeah, this has been my problem when I’ve tried this before Nov 25 22:50:45 missingno, how did you expect that to work :) Nov 25 22:51:47 instant run is awesome, heh Nov 25 22:52:27 is there a built-in truncate/ellipsize method? Nov 25 22:52:32 or do I need to write my own Nov 25 22:53:00 grekkos, using textview? Nov 25 22:53:05 no programmatically Nov 25 22:53:21 like truncate to a character length Nov 25 22:53:23 get your width, measure the text paint width and do some maths Nov 25 22:53:36 grekkos, in TextUtils Nov 25 22:53:39 I need a character length, I only see methods using paint widths Nov 25 22:54:05 But yeah, it's meant for UI so for widths Nov 25 22:54:56 So string.substr(0, truncateLen - 1) + "…" it is ;) Nov 25 22:55:07 ah okay Nov 25 22:55:11 I thought so I was just checking Nov 25 22:57:05 Note that TextViews can do that themselves. Nov 25 22:57:17 yeah Nov 25 22:57:34 I was looking for a programmatic access to that, which looks like it's all UI based anyway Nov 25 23:00:29 g00s: lacking union types, have you found a satisfactory way to do this in Java? Nov 25 23:00:41 s73v3r no :( Nov 25 23:04:57 Does Kotlin have something useful for this? :p Nov 25 23:17:10 g00s: What if each of your interfaces was implemented as an anonymous inner class of your models? Maybe with something on an abstract base class for communicating which component each one has? Nov 25 23:18:23 i guess that wouldn’t help with generics, though Nov 25 23:21:30 s73v3r Ceylon does Nov 25 23:22:03 maybe TacticalJoke knows the kotlin side Nov 25 23:50:24 kotlin doesn't have union and intersection types Nov 26 00:00:16 s73v3r: I'm actually interested in what exactly you are trying to acheive? Nov 26 00:00:54 it’s a way to cope with a very screwed up data model Nov 26 00:01:16 its something that’s been carried over three different backend changes, without having any actual time to adapt to any of them Nov 26 00:01:17 just out of curiosity, is there a simple way to determine the owner of a certain branch Nov 26 00:01:19 in the AOSP Nov 26 00:01:35 s73v3r: so you just want to merge multiple data sets before presenting the data? Nov 26 00:01:38 huh? Nov 26 00:01:52 sleepster: define owner Nov 26 00:02:06 oh sorry... so if I submit a review to gerrit, how does it know who will review the change? Nov 26 00:02:16 pull request I mean Nov 26 00:02:29 we have individual data model objects that we get from the server. but many of them have overlapping functionality/data. Like many things might have a title, or many things might provide an image. Nov 26 00:02:30 have they actually been accepting public commits? Nov 26 00:02:55 oh not that I am aware of Nov 26 00:03:09 sleepster: back in the day it was a PITA to get them to accept anything Nov 26 00:03:20 I don't know if things have changed or not Nov 26 00:03:23 so we have many interfaces, and we use some of these instead of the concrete types when it’s possible that a list might have a mix of them, or when we want an item to be able to handle several similar models Nov 26 00:03:36 herriojr: ah I see.. Nov 26 00:04:17 herriojr: to be honest, I am just wondering how their whole review system works :) in the documentation on how to submit contributions, it says that the change will go to gerrit Nov 26 00:04:32 but are reviewers randomly assigned Nov 26 00:04:50 s73v3r: that's why I like to differentiate between UI models and backend models Nov 26 00:05:14 maybe that’s what should have happened Nov 26 00:05:26 s73v3r: yeah, lots of people don't do that Nov 26 00:05:33 but doing it will help things later Nov 26 00:05:39 when things change, etc. Nov 26 00:06:59 maybe I need to noodle on a good way to do that with the big pile of crap we have as models this weekend Nov 26 00:12:01 s73v3r: but it really depends on the type of requests you have to do Nov 26 00:12:33 basically, our app doesn’t know how to be an app without the server :( Nov 26 00:13:41 s73v3r: yeah, so that's fine — cache what you can, etc. Nov 26 00:14:23 we have a fairly extensive caching system. I’m just looking for a better way to organize our model layer Nov 26 00:15:19 I went to add a new thing that implements ModuleItem. All it has is a text item, but the ModuleItem interface required a dozen or two unrelated methods to be implemented. Nov 26 00:16:12 s73v3r: yeah, it just sounds like the code never really changed to reflect the mental model Nov 26 00:17:32 s73v3r: yeah, look at differentiating UI Model from the Data Model — it will make a lot of things easier at the UI Layer Nov 26 00:17:51 and it will push the complexity of merging them to a different layer Nov 26 00:18:01 no. i wasn’t here for them, but it seems like every time the backend changed, especially this last time, there was no time given to adapt. They just had to bolt stuff onto what they had Nov 26 00:18:36 it doesn’t help that the server is trying to dictate the ui, and the one guy has the idea that the app should be able to handle just about any object being sent at any time Nov 26 00:21:10 s73v3r: I've been there before, good luck :P Nov 26 00:21:18 thanks Nov 26 00:21:52 s73v3r: does your backend happen to be written in python? Nov 26 00:22:20 or some other weakly typed scripting language Nov 26 00:22:26 no. our original backend, written by people from our company was. But then the client pushed another backend on us, and that’s written in C# Nov 26 00:22:53 oh really, C# and they think you should automatically be able to handle any model? Nov 26 00:23:18 they want to be able to switch things out dynamically without having to push an update to the app Nov 26 00:24:56 s73v3r: yeah, apis are a contract — they can't just go and change things on you without expecting you update the app — if it isn't dynamic enough, that's their fault for a bad api design Nov 26 00:24:59 I guarantee that any of the savings of being able to use that system, provided they don’t make things crash, will not make up for all the extra work spent on adapting to it Nov 26 00:35:07 hello, any expert for retrofit is here Nov 26 00:41:53 ?? Nov 26 00:42:31 JakeWharton used to be fairly active in here, not sure if he still is Nov 26 00:43:09 I'm pretty sure he had an alert or something that pinged him anytime someone mentioned retrofit or dagger or butterknife Nov 26 00:43:16 those were the days... Nov 26 00:43:59 barbs: thanks Nov 26 00:44:42 slani: Ask or ask not; there is no "I'm considering asking a question, but first I'm gonna need to see everyone's credentials". Nov 26 00:50:16 does anybody have any idea why i’d not be able to load an image in a release build but is fine in development? Nov 26 00:50:43 E/AndroidProtocolHandler: Unable to open resource URL: file:///android_res/drawable/text_selector_left.png Nov 26 00:50:44 java.lang.ClassNotFoundException: Didn't find class "com….R$drawable" on path: DexPathList[[zip file "/data/app/….-1/base.apk"] Nov 26 00:51:48 shouldn’t be a path issue since it works in some builds and not others Nov 26 00:52:09 odd...maybe a proguard issue? Nov 26 00:52:29 that’s sort of what i’m inclined to think, but... Nov 26 00:53:04 i’m pretty sure this hasn’t failed in the past. i’ll look at changes Nov 26 00:53:22 ghostmoth try minify false Nov 26 00:55:04 trying... Nov 26 00:57:55 hey g00s that worked Nov 26 00:58:03 but… not optimal for production Nov 26 00:58:23 i guess if you aren't using the latest build tools / try updating that Nov 26 00:59:15 I'm trying to Nov 26 00:59:15 fetch data from server. I'm using retrofit 2.0.0-beta for client side. But response body is always NULL. Nov 26 00:59:18 If I fetch the same data in postman or with curl everything works fine. What could be wrong? I already tried to change a convert factory. Nov 26 01:03:35 have you turned on logging in Retrofit? From memory I think it'll log out the raw calls your making. maybe it's adding a param or requesting the data in a specific format? Nov 26 01:06:39 ghostmoth there may also be buried in one of the summit talks some annotation to force the tools to leave that resource alone, probably the tools talk Nov 26 01:06:54 the one xav talked mostly Nov 26 01:07:25 it’s just bizarre though… we have a ton of other pngs in the same dir, no problem Nov 26 01:07:56 hm, and not being accessed by reflection or something weird ? Nov 26 01:09:04 barbs: I don't know how to turn on logging. Nov 26 01:09:13 in retorfit Nov 26 01:11:36 well, it is accessed in a web view via css g00s Nov 26 01:11:43 that’s probably where the issue is? Nov 26 01:12:00 oh, so maybe the minify isn't smart enough and thinks its unused Nov 26 01:12:22 there is something in the XML you can put that says, whatever you think, keep this... can't remember what though Nov 26 01:12:36 although we’ve got -keepclassmembers on our interface Nov 26 01:12:52 for* our interface, in proguard-rules.pro Nov 26 01:13:24 i ... don't think proguard does anything to your resources Nov 26 01:13:27 pfn may know Nov 26 01:15:57 proguard does nothing to resources Nov 26 01:18:02 is it just that we can’t use css to load resources in res? something something move it to assets? Nov 26 01:22:09 ghostmoth some tips here http://tools.android.com/tech-docs/new-build-system/resource-shrinking Nov 26 01:22:26 See diagnostics, and stuff about js/css Nov 26 01:22:32 thank you! Nov 26 01:45:20 https://www.youtube.com/playlist?list=PLWz5rJ2EKKc_Tt7q77qwyKRgytF1RzRx8&linkId=19033246 Nov 26 01:45:25 if anyone missed it Nov 26 01:50:49 barbs: now I turon loging and I'm geting 406 reponse and i don't know why? <-- HTTP/1.1 406 Not Acceptable (448ms) Nov 26 01:56:36 g00s: pfn: in case you were interested, this did it: http://stackoverflow.com/questions/6280188/prevent-proguard-to-remove-specific-drawables/8925694#8925694 Nov 26 01:56:47 reflection was the culprit Nov 26 01:57:00 eh, imma never use js to do that Nov 26 01:58:18 it was css, but, “same difference" Nov 26 02:11:09 here Nov 26 02:37:40 heh, google/samsung http://www.sammobile.com/2015/11/25/crazy-rumor-google-to-help-samsung-optimize-touchwiz/ Nov 26 02:43:31 it sure as hell needs optimising Nov 26 02:54:39 AS 2.0 Nov 26 02:54:52 it would be good, but it crashes :) Nov 26 02:57:28 slani: I'd look to see if it can log out exactly what it's sending to the server, and then compare with what curl's doing Nov 26 02:58:08 406 is "Not acceptable" so I guess there's something different/wrong with how you're calling the endpoint **** ENDING LOGGING AT Thu Nov 26 03:00:38 2015